content
stringlengths 7
1.05M
| fixed_cases
stringlengths 1
1.28M
|
|---|---|
class Calculator:
def __init__(self):
self.calculation = 0
self.operation = None
def plus(self, num):
self.calculation += num
def minus(self, num):
self.calculation -= num
def multiply(self, num):
self.calculation *= num
def divide(self, num):
self.calculation /= num
|
class Calculator:
def __init__(self):
self.calculation = 0
self.operation = None
def plus(self, num):
self.calculation += num
def minus(self, num):
self.calculation -= num
def multiply(self, num):
self.calculation *= num
def divide(self, num):
self.calculation /= num
|
# Apache License Version 2.0
#
# Copyright (c) 2021., Redis Labs Modules
# All rights reserved.
#
def create_extract_arguments(parser):
parser.add_argument(
"--redis-url",
type=str,
default="redis://localhost:6379",
help="The url for Redis connection",
)
parser.add_argument(
"--output-tags-json",
type=str,
default="extracted_tags.json",
help="output filename containing the extracted tags from redis.",
)
parser.add_argument(
"--s3-bucket-name",
type=str,
default="benchmarks.redislabs",
help="S3 bucket name.",
)
parser.add_argument(
"--upload-results-s3",
default=False,
action="store_true",
help="uploads the result files and configuration file to public "
"'benchmarks.redislabs' bucket. Proper credentials are required",
)
parser.add_argument(
"--cluster-mode",
default=False,
action="store_true",
help="Run client in cluster mode",
)
return parser
|
def create_extract_arguments(parser):
parser.add_argument('--redis-url', type=str, default='redis://localhost:6379', help='The url for Redis connection')
parser.add_argument('--output-tags-json', type=str, default='extracted_tags.json', help='output filename containing the extracted tags from redis.')
parser.add_argument('--s3-bucket-name', type=str, default='benchmarks.redislabs', help='S3 bucket name.')
parser.add_argument('--upload-results-s3', default=False, action='store_true', help="uploads the result files and configuration file to public 'benchmarks.redislabs' bucket. Proper credentials are required")
parser.add_argument('--cluster-mode', default=False, action='store_true', help='Run client in cluster mode')
return parser
|
####################################################################
#
# Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Filename - globaldefinesrsaformat.py
# Description - This file contains global defines used in the RSA
# Format parser
####################################################################
# Parameter type
PARAM_MOD = 1
PARAM_PRIV_EXP = 2
PARAM_EXP = 3
# PEM header and footer
PEM_START = "-----BEGIN RSA PRIVATE KEY-----\n"
PEM_END = "\n-----END RSA PRIVATE KEY-----\n"
# PEM header size
PEM_HEADER_SIZE_BYTES = 4
# PEM version size
PEM_VERSION_SIZE_BYTES = 3
# Parameters ASN.1 DER type
PARAM_HEADER_INTEGER_TYPE = 2
# Length ASN.1 DER
PARAM_LENGTH_INDICATION_BIT = 7
PARAM_LENGTH_INDICATION = 0x1 << PARAM_LENGTH_INDICATION_BIT
PARAM_LENGTH_BITS_MASK = 0x7F
# Size of expected Mod & Priv exponent
RSA_MOD_SIZE_BYTES = 256
# Modulus & Priv Exponent ASN.1 header size
MOD_HEADER_FIXED_SIZE_BYTES = 4
# Exponent ASN.1 header size
EXP_HEADER_FIXED_SIZE_BYTES = 2
# Exponent expected value
EXP_EXPECTED_VAL = 65537
# AES key fixed size
AES_KEY_SIZE_IN_BYTES = 32
|
param_mod = 1
param_priv_exp = 2
param_exp = 3
pem_start = '-----BEGIN RSA PRIVATE KEY-----\n'
pem_end = '\n-----END RSA PRIVATE KEY-----\n'
pem_header_size_bytes = 4
pem_version_size_bytes = 3
param_header_integer_type = 2
param_length_indication_bit = 7
param_length_indication = 1 << PARAM_LENGTH_INDICATION_BIT
param_length_bits_mask = 127
rsa_mod_size_bytes = 256
mod_header_fixed_size_bytes = 4
exp_header_fixed_size_bytes = 2
exp_expected_val = 65537
aes_key_size_in_bytes = 32
|
"""
Entradas
salario --> int --> s
categoria --> int --> c
Salidas
aumento --> int --> a
salario nuevo --> int --> sn
"""
s = int (input ( "Digotar el salario:" ))
c = int (input ( " Digitar categoria del 1 al 5: "))
if ( c == 1 ):
a = s * .10
if ( c == 2 ):
a = s * .15
if ( c == 3 ):
a == s * .20
if ( c == 4 ):
a = s * .40
if ( c == 5 ):
a = s * .60
sn = s + a
print ( "El aumento es de:" + str (a))
print ( "Valor del nuevo sueldo:" + str (sn))
|
"""
Entradas
salario --> int --> s
categoria --> int --> c
Salidas
aumento --> int --> a
salario nuevo --> int --> sn
"""
s = int(input('Digotar el salario:'))
c = int(input(' Digitar categoria del 1 al 5: '))
if c == 1:
a = s * 0.1
if c == 2:
a = s * 0.15
if c == 3:
a == s * 0.2
if c == 4:
a = s * 0.4
if c == 5:
a = s * 0.6
sn = s + a
print('El aumento es de:' + str(a))
print('Valor del nuevo sueldo:' + str(sn))
|
class Trie(object):
def __init__(self):
self.child = {}
def insert(self, word):
word = word.strip()
current = self.child
for l in word:
if l not in current:
current[l] = {}
current = current[l]
current['#']=1
def search(self, word):
word = word.strip()
current = self.child
for l in word:
if l not in current:
return False
current = current[l]
return '#' in current
def startsWith(self, prefix):
prefix = prefix.strip()
current = self.child
for l in prefix:
if l not in current:
return False
current = current[l]
return True
def tostring(self):
print("Trie structure: ")
print(self.child)
|
class Trie(object):
def __init__(self):
self.child = {}
def insert(self, word):
word = word.strip()
current = self.child
for l in word:
if l not in current:
current[l] = {}
current = current[l]
current['#'] = 1
def search(self, word):
word = word.strip()
current = self.child
for l in word:
if l not in current:
return False
current = current[l]
return '#' in current
def starts_with(self, prefix):
prefix = prefix.strip()
current = self.child
for l in prefix:
if l not in current:
return False
current = current[l]
return True
def tostring(self):
print('Trie structure: ')
print(self.child)
|
def SB_BinaryStats(y,binaryMethod = 'diff'):
yBin = BF_Binarize(y,binaryMethod)
N = len(yBin)
outDict = {}
outDict['pupstat2'] = np.sum((yBin[math.floor(N /2):] == 1)) / np.sum((yBin[:math.floor(N /2)] == 1))
stretch1 = []
stretch0 = []
count = 1
for i in range(1,N):
if yBin[i] == yBin[i - 1]:
count = count + 1
else:
if yBin[i - 1] == 1:
stretch1.append(count)
else:
stretch0.append(count)
count = 1
if yBin[N-1] == 1:
stretch1.append(count)
else:
stretch0.append(count)
outDict['pstretch1'] = len(stretch1) / N
if stretch0 == []:
outDict['longstretch0'] = 0
outDict['meanstretch0'] = 0
outDict['stdstretch0'] = None
else:
outDict['longstretch0'] = np.max(stretch0)
outDict['meanstretch0'] = np.mean(stretch0)
outDict['stdstretch0'] = np.std(stretch0,ddof = 1)
if stretch1 == []:
outDict['longstretch1'] = 0
outDict['meanstretch1'] = 0
outDict['stdstretch1'] = None
else:
outDict['longstretch1'] = np.max(stretch1)
outDict['meanstretch1'] = np.mean(stretch1)
outDict['stdstretch1'] = np.std(stretch1,ddof = 1)
try:
outDict['meanstretchdiff'] = outDict['meanstretch1'] - outDict['meanstretch0']
outDict['stdstretchdiff'] = outDict['stdstretch1'] - outDict['stdstretch0']
except:
pass
return outDict
|
def sb__binary_stats(y, binaryMethod='diff'):
y_bin = bf__binarize(y, binaryMethod)
n = len(yBin)
out_dict = {}
outDict['pupstat2'] = np.sum(yBin[math.floor(N / 2):] == 1) / np.sum(yBin[:math.floor(N / 2)] == 1)
stretch1 = []
stretch0 = []
count = 1
for i in range(1, N):
if yBin[i] == yBin[i - 1]:
count = count + 1
else:
if yBin[i - 1] == 1:
stretch1.append(count)
else:
stretch0.append(count)
count = 1
if yBin[N - 1] == 1:
stretch1.append(count)
else:
stretch0.append(count)
outDict['pstretch1'] = len(stretch1) / N
if stretch0 == []:
outDict['longstretch0'] = 0
outDict['meanstretch0'] = 0
outDict['stdstretch0'] = None
else:
outDict['longstretch0'] = np.max(stretch0)
outDict['meanstretch0'] = np.mean(stretch0)
outDict['stdstretch0'] = np.std(stretch0, ddof=1)
if stretch1 == []:
outDict['longstretch1'] = 0
outDict['meanstretch1'] = 0
outDict['stdstretch1'] = None
else:
outDict['longstretch1'] = np.max(stretch1)
outDict['meanstretch1'] = np.mean(stretch1)
outDict['stdstretch1'] = np.std(stretch1, ddof=1)
try:
outDict['meanstretchdiff'] = outDict['meanstretch1'] - outDict['meanstretch0']
outDict['stdstretchdiff'] = outDict['stdstretch1'] - outDict['stdstretch0']
except:
pass
return outDict
|
"""Basic memory stream with random sampling."""
class MemoryStream(object):
def __init__(self, size):
self.memory = deque([])
def add(self, item):
self.memory.append(item)
if len(self.memory) > size:
memory.popleft()
def sample(self, shape):
return np.random.sample(memory, shape)
|
"""Basic memory stream with random sampling."""
class Memorystream(object):
def __init__(self, size):
self.memory = deque([])
def add(self, item):
self.memory.append(item)
if len(self.memory) > size:
memory.popleft()
def sample(self, shape):
return np.random.sample(memory, shape)
|
"""
Custom exceptions for Clinical Research Study Manager package
"""
class MyException(ValueError):
def __init__(self, msg):
super().__init__(msg)
class HeaderException(MyException):
def __init__(self, msg):
super().__init__(msg)
class InputException(MyException):
"""
Exceptions for different user inputs. Will display a different error message based on the input type.
If input type is not one of the given exceptions will default to the error message in the called functions.
"""
def __init__(self, msg, input_type):
messages = dict()
messages['age'] = 'Please enter a number greater than 0'
messages['enrollment status'] = 'Please enter Y, N, NA'
messages['eligibility status'] = 'Please enter Y, N, NA'
messages['follow up complete'] = 'Please enter Y, N, NA'
messages['sex'] = 'Please enter M, F, O, U'
if messages.get(input_type) is not None:
msg = messages[input_type]
else:
msg = msg
super().__init__(msg)
|
"""
Custom exceptions for Clinical Research Study Manager package
"""
class Myexception(ValueError):
def __init__(self, msg):
super().__init__(msg)
class Headerexception(MyException):
def __init__(self, msg):
super().__init__(msg)
class Inputexception(MyException):
"""
Exceptions for different user inputs. Will display a different error message based on the input type.
If input type is not one of the given exceptions will default to the error message in the called functions.
"""
def __init__(self, msg, input_type):
messages = dict()
messages['age'] = 'Please enter a number greater than 0'
messages['enrollment status'] = 'Please enter Y, N, NA'
messages['eligibility status'] = 'Please enter Y, N, NA'
messages['follow up complete'] = 'Please enter Y, N, NA'
messages['sex'] = 'Please enter M, F, O, U'
if messages.get(input_type) is not None:
msg = messages[input_type]
else:
msg = msg
super().__init__(msg)
|
"""
Copyright (C) 2018 SunSpec Alliance
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.
"""
class socket(object):
def __init__(self, family=None, stype=None, proto=None):
self.test_socket = True
self.family = family
self.stype = stype
self.proto = proto
self.connected = False
self.timeout = 0
self.in_buf = b''
self.out_buf = b''
def connect(self, addr_port):
self.connected = True
def settimeout(self, timeout):
self.timeout = timeout
def close(self):
self.connected = False
def recv(self, size):
data = ''
read_len = size
data_len = len(self.in_buf)
if data_len < read_len:
read_len = data_len
if read_len > 0:
data = self.in_buf[:read_len]
self.in_buf = self.in_buf[read_len:]
return data
def send(self, data):
self.out_buf += data
def sendall(self, data):
self.out_buf += data
|
"""
Copyright (C) 2018 SunSpec Alliance
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.
"""
class Socket(object):
def __init__(self, family=None, stype=None, proto=None):
self.test_socket = True
self.family = family
self.stype = stype
self.proto = proto
self.connected = False
self.timeout = 0
self.in_buf = b''
self.out_buf = b''
def connect(self, addr_port):
self.connected = True
def settimeout(self, timeout):
self.timeout = timeout
def close(self):
self.connected = False
def recv(self, size):
data = ''
read_len = size
data_len = len(self.in_buf)
if data_len < read_len:
read_len = data_len
if read_len > 0:
data = self.in_buf[:read_len]
self.in_buf = self.in_buf[read_len:]
return data
def send(self, data):
self.out_buf += data
def sendall(self, data):
self.out_buf += data
|
#
# PySNMP MIB module LINKSYS-WLAN-ACCESS-POINT-REF-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/LINKSYS-WLAN-ACCESS-POINT-REF-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:07:23 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection", "ValueSizeConstraint")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
iso, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, TimeTicks, IpAddress, Bits, ObjectIdentity, Counter32, MibIdentifier, enterprises, Gauge32, Integer32, Counter64, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "TimeTicks", "IpAddress", "Bits", "ObjectIdentity", "Counter32", "MibIdentifier", "enterprises", "Gauge32", "Integer32", "Counter64", "Unsigned32")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
linksys = ModuleIdentity((1, 3, 6, 1, 4, 1, 3955))
linksys.setRevisions(('2014-04-09 12:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: linksys.setRevisionsDescriptions(('Initial release.',))
if mibBuilder.loadTexts: linksys.setLastUpdated('201404090000Z')
if mibBuilder.loadTexts: linksys.setOrganization('Linksys, LLC. Corporation')
if mibBuilder.loadTexts: linksys.setContactInfo(' Postal: Linksys International, Inc. 131 Theory Drive Irvine, CA 92617 Tel: +1 949 270 8500')
if mibBuilder.loadTexts: linksys.setDescription('Wireless-AC Dual Band LAPAC1750PRO Access Point with PoE.')
smb = MibIdentifier((1, 3, 6, 1, 4, 1, 3955, 1000))
mibBuilder.exportSymbols("LINKSYS-WLAN-ACCESS-POINT-REF-MIB", PYSNMP_MODULE_ID=linksys, linksys=linksys, smb=smb)
|
(octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, constraints_union, value_range_constraint, constraints_intersection, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ConstraintsUnion', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ValueSizeConstraint')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(iso, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, module_identity, time_ticks, ip_address, bits, object_identity, counter32, mib_identifier, enterprises, gauge32, integer32, counter64, unsigned32) = mibBuilder.importSymbols('SNMPv2-SMI', 'iso', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ModuleIdentity', 'TimeTicks', 'IpAddress', 'Bits', 'ObjectIdentity', 'Counter32', 'MibIdentifier', 'enterprises', 'Gauge32', 'Integer32', 'Counter64', 'Unsigned32')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
linksys = module_identity((1, 3, 6, 1, 4, 1, 3955))
linksys.setRevisions(('2014-04-09 12:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
linksys.setRevisionsDescriptions(('Initial release.',))
if mibBuilder.loadTexts:
linksys.setLastUpdated('201404090000Z')
if mibBuilder.loadTexts:
linksys.setOrganization('Linksys, LLC. Corporation')
if mibBuilder.loadTexts:
linksys.setContactInfo(' Postal: Linksys International, Inc. 131 Theory Drive Irvine, CA 92617 Tel: +1 949 270 8500')
if mibBuilder.loadTexts:
linksys.setDescription('Wireless-AC Dual Band LAPAC1750PRO Access Point with PoE.')
smb = mib_identifier((1, 3, 6, 1, 4, 1, 3955, 1000))
mibBuilder.exportSymbols('LINKSYS-WLAN-ACCESS-POINT-REF-MIB', PYSNMP_MODULE_ID=linksys, linksys=linksys, smb=smb)
|
print("The variable Pp/Ptot, i.e. the fraction of paused polymerases, seems to provide the best contrast between its minimal and maximal values as K_3 varies, regardless of the values of K_1 and K_2. In this example, it is not very surprising. Sometimes it is more difficult to find which model output is the most sensitive to a given parameter. ")
print(" The sensitivity is optimal for low values of K_3, i.e. K_3<K_1*K_2, where the slope of the curve Pp/Ptot=function(K_3) is the steepest.")
print(" To find out whether Pp/Ptot is sensitive to K_1 and or K_2, we need to give a value to K_3 and plot as a function of the other variables. ")
print("Starting with low K_3=0.3, we find that Pp is sensitive to K_2 mostly for K_2 lower than K_3, for larger values it becomes a flat curve. This remains true for larger K_3. And this is even more true for Pp/Ptot as a function of K_1, where the curve is flat for almost the entire range of K_1, regardless of the values of K_2 and K_3.")
print("")
print("So in summary, to measure differences across the genes in the pausing rate, we would need to 1) measure the fraction of paused polymerase complexes Pp/Ptot, and 2) try to work in experimental conditions where the other rates are as large as possible, where their influence on Pp/Ptot=function(K_3) is minimal. Maximizing K_1 could for instance be achieved by stabilizing the polymerase on DNA, which would reduce the k_off rate; maximizing K_2 could be achieved by selecting genes with low mRNA transcription rate, indicative in this model a low termination rate.")
|
print('The variable Pp/Ptot, i.e. the fraction of paused polymerases, seems to provide the best contrast between its minimal and maximal values as K_3 varies, regardless of the values of K_1 and K_2. In this example, it is not very surprising. Sometimes it is more difficult to find which model output is the most sensitive to a given parameter. ')
print(' The sensitivity is optimal for low values of K_3, i.e. K_3<K_1*K_2, where the slope of the curve Pp/Ptot=function(K_3) is the steepest.')
print(' To find out whether Pp/Ptot is sensitive to K_1 and or K_2, we need to give a value to K_3 and plot as a function of the other variables. ')
print('Starting with low K_3=0.3, we find that Pp is sensitive to K_2 mostly for K_2 lower than K_3, for larger values it becomes a flat curve. This remains true for larger K_3. And this is even more true for Pp/Ptot as a function of K_1, where the curve is flat for almost the entire range of K_1, regardless of the values of K_2 and K_3.')
print('')
print('So in summary, to measure differences across the genes in the pausing rate, we would need to 1) measure the fraction of paused polymerase complexes Pp/Ptot, and 2) try to work in experimental conditions where the other rates are as large as possible, where their influence on Pp/Ptot=function(K_3) is minimal. Maximizing K_1 could for instance be achieved by stabilizing the polymerase on DNA, which would reduce the k_off rate; maximizing K_2 could be achieved by selecting genes with low mRNA transcription rate, indicative in this model a low termination rate.')
|
def F():
a,b = 0,1
while True:
yield a
a, b = b, a + b
def SubFib(startNumber, endNumber):
for cur in F():
if cur > endNumber: return
if cur >= startNumber:
yield cur
# for i in SubFib(10, 200):
# print(i)
def fib(x):
if x < 2:
return [i for i in range(x+1 )]
ans = fib(x-1)
return ans + [ans[-1] + ans[-2]]
print(fib(10))
|
def f():
(a, b) = (0, 1)
while True:
yield a
(a, b) = (b, a + b)
def sub_fib(startNumber, endNumber):
for cur in f():
if cur > endNumber:
return
if cur >= startNumber:
yield cur
def fib(x):
if x < 2:
return [i for i in range(x + 1)]
ans = fib(x - 1)
return ans + [ans[-1] + ans[-2]]
print(fib(10))
|
#!/usr/bin/python3
Rectangle = __import__('2-rectangle').Rectangle
my_rectangle = Rectangle(2, 4)
print("Area: {} - Perimeter: {}".format(my_rectangle.area(), my_rectangle.perimeter()))
print("--")
my_rectangle.width = 10
my_rectangle.height = 3
print("Area: {} - Perimeter: {}".format(my_rectangle.area(), my_rectangle.perimeter()))
|
rectangle = __import__('2-rectangle').Rectangle
my_rectangle = rectangle(2, 4)
print('Area: {} - Perimeter: {}'.format(my_rectangle.area(), my_rectangle.perimeter()))
print('--')
my_rectangle.width = 10
my_rectangle.height = 3
print('Area: {} - Perimeter: {}'.format(my_rectangle.area(), my_rectangle.perimeter()))
|
# -*- coding: utf-8 -*-
"""common/tests/__init__.py
By David J. Thomas, thePortus.com, dave.a.base@gmail.com
The init file for the common module tests
"""
|
"""common/tests/__init__.py
By David J. Thomas, thePortus.com, dave.a.base@gmail.com
The init file for the common module tests
"""
|
a = b = c = d = e = f = 12
x, y = 1, 2 # unpacking tuple
print(x)
print(y)
print('unpack tuple - or any sequence type')
data = (1, 2, 3)
a, b, c = data
print(a)
print(b)
print(c)
print('unpack list - or any sequence type')
data_list = [4, 5, 6]
a, b, c = data_list
print(a)
print(b)
print(c)
|
a = b = c = d = e = f = 12
(x, y) = (1, 2)
print(x)
print(y)
print('unpack tuple - or any sequence type')
data = (1, 2, 3)
(a, b, c) = data
print(a)
print(b)
print(c)
print('unpack list - or any sequence type')
data_list = [4, 5, 6]
(a, b, c) = data_list
print(a)
print(b)
print(c)
|
def calcu():
pass
def calc_add(a,b):
return a+b
def calc_minus(a,b):
return a-b
|
def calcu():
pass
def calc_add(a, b):
return a + b
def calc_minus(a, b):
return a - b
|
HEALTH_STATES = []
class App:
def __init__(self, j):
self.url = 'https://api.newrelic.com/v2/applications.json'
if j:
self.id = j.get('id')
self.name = j.get('name')
self.health_status = j.get('health_status')
links = j.get('links')
self.policy_id = links.get('alert_policy')
self.hosts = links.get('application_hosts', [])
self.instances = links.get('application_instances', [])
self.servers = links.get('servers', [])
self.channels = []
self.application_summary = j.get('application_summary', {})
self.end_user_summary = j.get('end_user_summary', {})
self.labels = []
def __str__(self):
return ', '.join(['"%s":"%s"' % x for x in self.__dict__.items()])
"""{
"id": "integer",
"name": "string",
"language": "string",
"health_status": "string",
"reporting": "boolean",
"last_reported_at": "time",
"application_summary": {
"response_time": "float",
"throughput": "float",
"error_rate": "float",
"apdex_target": "float",
"apdex_score": "float",
"host_count": "integer",
"instance_count": "integer",
"concurrent_instance_count": "integer"
},
"end_user_summary": {
"response_time": "float",
"throughput": "float",
"apdex_target": "float",
"apdex_score": "float"
},
"settings": {
"app_apdex_threshold": "float",
"end_user_apdex_threshold": "float",
"enable_real_user_monitoring": "boolean",
"use_server_side_config": "boolean"
},
"links": {
"servers": [
"integer"
],
"application_hosts": [
"integer"
],
"application_instances": [
"integer"
],
"alert_policy": "integer"
}
}"""
|
health_states = []
class App:
def __init__(self, j):
self.url = 'https://api.newrelic.com/v2/applications.json'
if j:
self.id = j.get('id')
self.name = j.get('name')
self.health_status = j.get('health_status')
links = j.get('links')
self.policy_id = links.get('alert_policy')
self.hosts = links.get('application_hosts', [])
self.instances = links.get('application_instances', [])
self.servers = links.get('servers', [])
self.channels = []
self.application_summary = j.get('application_summary', {})
self.end_user_summary = j.get('end_user_summary', {})
self.labels = []
def __str__(self):
return ', '.join(['"%s":"%s"' % x for x in self.__dict__.items()])
'{\n "id": "integer",\n "name": "string",\n "language": "string",\n "health_status": "string",\n "reporting": "boolean",\n "last_reported_at": "time",\n "application_summary": {\n "response_time": "float",\n "throughput": "float",\n "error_rate": "float",\n "apdex_target": "float",\n "apdex_score": "float",\n "host_count": "integer",\n "instance_count": "integer",\n "concurrent_instance_count": "integer"\n },\n "end_user_summary": {\n "response_time": "float",\n "throughput": "float",\n "apdex_target": "float",\n "apdex_score": "float"\n },\n "settings": {\n "app_apdex_threshold": "float",\n "end_user_apdex_threshold": "float",\n "enable_real_user_monitoring": "boolean",\n "use_server_side_config": "boolean"\n },\n "links": {\n "servers": [\n "integer"\n ],\n "application_hosts": [\n "integer"\n ],\n "application_instances": [\n "integer"\n ],\n "alert_policy": "integer"\n }\n }'
|
def has_cycle(head):
slowref=head
if not slowref or not slowref.next:
return False
fastref=head.next.next
while slowref != fastref:
slowref=slowref.next
if not slowref or not slowref.next:
return False
fastref=fastref.next.next
return True
|
def has_cycle(head):
slowref = head
if not slowref or not slowref.next:
return False
fastref = head.next.next
while slowref != fastref:
slowref = slowref.next
if not slowref or not slowref.next:
return False
fastref = fastref.next.next
return True
|
__title__ = 'electric'
__description__ = "A package manager for Windows, MacOS And Linux!"
__url__ = 'https://github.com/TheBossProSniper/Electric'
__version__ = '0.0.1'
__author__ = 'Electric Inc.'
__credits__ = ""
__license__ = """Apache License 2.0
A permissive license whose main conditions require preservation
of copyright and license notices. Contributors provide an express
grant of patent rights. Licensed works, modifications, and larger
works may be distributed under different terms and without source
code.
"""
|
__title__ = 'electric'
__description__ = 'A package manager for Windows, MacOS And Linux!'
__url__ = 'https://github.com/TheBossProSniper/Electric'
__version__ = '0.0.1'
__author__ = 'Electric Inc.'
__credits__ = ''
__license__ = 'Apache License 2.0\nA permissive license whose main conditions require preservation\nof copyright and license notices. Contributors provide an express\ngrant of patent rights. Licensed works, modifications, and larger\nworks may be distributed under different terms and without source\ncode.\n'
|
def main():
# input
S = list(input())
# compute
N = len(S)
cnt = 0
while ''.join(S).count('BW') != 0:
for i in range(N-1):
if S[i]=='B' and S[i+1]=='W':
S[i], S[i+1] = S[i+1], S[i]
cnt += 1
print(cnt, ''.join(S))
# output
print(cnt)
if __name__ == '__main__':
main()
|
def main():
s = list(input())
n = len(S)
cnt = 0
while ''.join(S).count('BW') != 0:
for i in range(N - 1):
if S[i] == 'B' and S[i + 1] == 'W':
(S[i], S[i + 1]) = (S[i + 1], S[i])
cnt += 1
print(cnt, ''.join(S))
print(cnt)
if __name__ == '__main__':
main()
|
class Solution:
def reverse(self, x: int) -> int:
# get the sign of x
if x == 0:
return x
sign = abs(x) / x
x = abs(x)
# reverse number
num = 0
# reverse process
while x != 0:
temp = x % 10
num = num * 10 + temp
x = x // 10
num = int(sign * num)
return num if -2**31 < num < 2**31 - 1 else 0
|
class Solution:
def reverse(self, x: int) -> int:
if x == 0:
return x
sign = abs(x) / x
x = abs(x)
num = 0
while x != 0:
temp = x % 10
num = num * 10 + temp
x = x // 10
num = int(sign * num)
return num if -2 ** 31 < num < 2 ** 31 - 1 else 0
|
#* Asked in Uber
#? You are given a string of parenthesis. Return the minimum number of parenthesis that would need to be removed
#? in order to make the string valid. "Valid" means that each open parenthesis has a matching closed parenthesis.
#! Example:
# "()())()"
#? The following input should return 1.
# ")"
def count_invalid_parenthesis(string):
count = 0
for i in string:
if i == "(" or i == "[" or i == "{":
count += 1
elif i == ")" or i == "]" or i == "}":
count -= 1
return abs(count)
print(count_invalid_parenthesis("()())()"))
# 1
|
def count_invalid_parenthesis(string):
count = 0
for i in string:
if i == '(' or i == '[' or i == '{':
count += 1
elif i == ')' or i == ']' or i == '}':
count -= 1
return abs(count)
print(count_invalid_parenthesis('()())()'))
|
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/config.ipynb (unless otherwise specified).
__all__ = ['AppConfig', 'PathConfig', 'TrainConfig']
# Cell
class AppConfig:
SEED = 8080
NUM_CLASSES = 7
class PathConfig:
# DATA_PATH = '/content/data'
# IMAGE_PATH = '/content/data/images'
# CSV_PATH = '/content/data/HAM10000_metadata.csv'
DATA_PATH = "/Work/Workspace/ML/HAM10000/data"
IMAGE_PATH = DATA_PATH + "/images"
CSV_PATH = DATA_PATH + "/HAM10000_metadata.csv"
class TrainConfig:
BATCH_SIZE = 64
EPOCHS = 100
LR = 1e-6
|
__all__ = ['AppConfig', 'PathConfig', 'TrainConfig']
class Appconfig:
seed = 8080
num_classes = 7
class Pathconfig:
data_path = '/Work/Workspace/ML/HAM10000/data'
image_path = DATA_PATH + '/images'
csv_path = DATA_PATH + '/HAM10000_metadata.csv'
class Trainconfig:
batch_size = 64
epochs = 100
lr = 1e-06
|
#accessibility numbers for science. Pretty sure fosscord just hardcodes this as 128.
class ACCESSIBILITY_FEATURES:
SCREENREADER = 1 << 0
REDUCED_MOTION = 1 << 1
REDUCED_TRANSPARENCY = 1 << 2
HIGH_CONTRAST = 1 << 3
BOLD_TEXT = 1 << 4
GRAYSCALE = 1 << 5
INVERT_COLORS = 1 << 6
PREFERS_COLOR_SCHEME_LIGHT = 1 << 7
PREFERS_COLOR_SCHEME_DARK = 1 << 8
CHAT_FONT_SCALE_INCREASED = 1 << 9
CHAT_FONT_SCALE_DECREASED = 1 << 10
ZOOM_LEVEL_INCREASED = 1 << 11
ZOOM_LEVEL_DECREASED = 1 << 12
MESSAGE_GROUP_SPACING_INCREASED = 1 << 13
MESSAGE_GROUP_SPACING_DECREASED = 1 << 14
DARK_SIDEBAR = 1 << 15
REDUCED_MOTION_FROM_USER_SETTINGS = 1 << 16
class Accessibility:
@staticmethod
def calculate_accessibility(types):
accessibility_num = 0
for i in types:
feature = i.upper().replace(' ', '_')
if hasattr(ACCESSIBILITY_FEATURES, feature):
accessibility_num |= getattr(ACCESSIBILITY_FEATURES, feature)
return accessibility_num
@staticmethod
def check_accessibilities(accessibility_num, check):
return (accessibility_num & check) == check
|
class Accessibility_Features:
screenreader = 1 << 0
reduced_motion = 1 << 1
reduced_transparency = 1 << 2
high_contrast = 1 << 3
bold_text = 1 << 4
grayscale = 1 << 5
invert_colors = 1 << 6
prefers_color_scheme_light = 1 << 7
prefers_color_scheme_dark = 1 << 8
chat_font_scale_increased = 1 << 9
chat_font_scale_decreased = 1 << 10
zoom_level_increased = 1 << 11
zoom_level_decreased = 1 << 12
message_group_spacing_increased = 1 << 13
message_group_spacing_decreased = 1 << 14
dark_sidebar = 1 << 15
reduced_motion_from_user_settings = 1 << 16
class Accessibility:
@staticmethod
def calculate_accessibility(types):
accessibility_num = 0
for i in types:
feature = i.upper().replace(' ', '_')
if hasattr(ACCESSIBILITY_FEATURES, feature):
accessibility_num |= getattr(ACCESSIBILITY_FEATURES, feature)
return accessibility_num
@staticmethod
def check_accessibilities(accessibility_num, check):
return accessibility_num & check == check
|
"""
Rename this file to 'secret.py' once all settings are defined
"""
SECRET_KEY = "..."
HOSTNAME = "example.com"
DATABASE_URL = "mysql://<user>:<password>@<host>/<database>"
AWS_ACCESS_KEY_ID = "12345"
AWS_SECRET_ACCESS_KEY = "12345"
|
"""
Rename this file to 'secret.py' once all settings are defined
"""
secret_key = '...'
hostname = 'example.com'
database_url = 'mysql://<user>:<password>@<host>/<database>'
aws_access_key_id = '12345'
aws_secret_access_key = '12345'
|
#!/usr/bin/python
# --------------------------------------- #
# Cara Define Sebuah Function pada Python #
# --------------------------------------- #
# def functionname( parameters ): #
# "function_docstring" #
# function_suite #
# return [expression] #
# --------------------------------------- #
# Define Function
def changeme( mylist ):
"This changes a passed list into this function"
mylist.append([1,2,3,4]);
print ("Values inside the function: ", mylist)
return
# Calling the Function
mylist = [10,20,30];
changeme( mylist );
print ("Values outside the function: ", mylist)
|
def changeme(mylist):
"""This changes a passed list into this function"""
mylist.append([1, 2, 3, 4])
print('Values inside the function: ', mylist)
return
mylist = [10, 20, 30]
changeme(mylist)
print('Values outside the function: ', mylist)
|
class Custom(
):
pass
|
class Custom:
pass
|
def primitive_triplets():
pass
def triplets_in_range():
pass
def is_triplet():
pass
|
def primitive_triplets():
pass
def triplets_in_range():
pass
def is_triplet():
pass
|
n, m = map(int, input().split())
for i in range(n):
if i % 2 == 0:
print('#' * m)
else:
if (i + 1) % 4 == 0:
print('#' + '.' * (m - 1))
else:
print('.' * (m - 1) + '#')
|
(n, m) = map(int, input().split())
for i in range(n):
if i % 2 == 0:
print('#' * m)
elif (i + 1) % 4 == 0:
print('#' + '.' * (m - 1))
else:
print('.' * (m - 1) + '#')
|
# Binary dependencies needed for running the bash commands
DEPS = ["mvn", "openssl", "awk"]
# helper function to encapsulate bash commands.
def _execute(ctx, command):
return ctx.execute(["bash", "-c", """
set -ex
%s""" % command])
# Assert that all relevant binaries are on class path
#TODO(petros): how should I depend on the migration_tool project. Should I fetch it like I do bazel.
def _check_dependencies(ctx):
for dep in DEPS:
if ctx.which(dep) == None:
fail("%s requires %s as a dependency. Please check your PATH." % (ctx.name, dep))
#TODO(petros): actually implement this.
#TODO(petros): how to integrate the migration_tool and then call shell command use it.
def _transitive_maven_jar_impl(ctx):
print("Checking if dependencies are met.")
_check_dependencies(ctx)
_common_maven_rule_attrs = {
"artifact":attr.string(
default="",
mandatory=True,
),
"sha1":attr.string(default = ""),
}
def _printer_impl(ctx):
print("Rule name = %s, package = %s" % (ctx.label.name, ctx.label.package))
print("There are %d deps" % len(ctx.attr.deps))
for i in ctx.attr.deps:
print("- %s" % i.label)
print(" files = %s" % [f.path for f in i.files])
printer = rule(
implementation=_printer_impl,
attrs={
"number":attr.int(default = 1),
"deps":attr.label_list(allow_files=True),
}
)
transitive_maven_jar = repository_rule (
implementation=_transitive_maven_jar_impl,
attrs=_common_maven_rule_attrs + {
"exclude":attr.string_list(mandatory=False),
"generate_workspace_tool" : attr.label(executable=True, cfg="host",
default=Label("//pkg:generate_workspace"))
},
local=False,
)
|
deps = ['mvn', 'openssl', 'awk']
def _execute(ctx, command):
return ctx.execute(['bash', '-c', '\nset -ex\n%s' % command])
def _check_dependencies(ctx):
for dep in DEPS:
if ctx.which(dep) == None:
fail('%s requires %s as a dependency. Please check your PATH.' % (ctx.name, dep))
def _transitive_maven_jar_impl(ctx):
print('Checking if dependencies are met.')
_check_dependencies(ctx)
_common_maven_rule_attrs = {'artifact': attr.string(default='', mandatory=True), 'sha1': attr.string(default='')}
def _printer_impl(ctx):
print('Rule name = %s, package = %s' % (ctx.label.name, ctx.label.package))
print('There are %d deps' % len(ctx.attr.deps))
for i in ctx.attr.deps:
print('- %s' % i.label)
print(' files = %s' % [f.path for f in i.files])
printer = rule(implementation=_printer_impl, attrs={'number': attr.int(default=1), 'deps': attr.label_list(allow_files=True)})
transitive_maven_jar = repository_rule(implementation=_transitive_maven_jar_impl, attrs=_common_maven_rule_attrs + {'exclude': attr.string_list(mandatory=False), 'generate_workspace_tool': attr.label(executable=True, cfg='host', default=label('//pkg:generate_workspace'))}, local=False)
|
"""
Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n.
Example:
Input: 13
Output: 6
Explanation: Digit 1 occurred in the following numbers: 1, 10, 11, 12, 13.
"""
class Solution:
def countDigitOne(self, n: int) -> int:
cnt = 0
mark = 1
while n >= mark:
c, r = divmod(n, (mark * 10))
cnt += c * mark
if r >= mark:
cnt += min(r - mark + 1, mark)
mark *= 10
return cnt
|
"""
Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n.
Example:
Input: 13
Output: 6
Explanation: Digit 1 occurred in the following numbers: 1, 10, 11, 12, 13.
"""
class Solution:
def count_digit_one(self, n: int) -> int:
cnt = 0
mark = 1
while n >= mark:
(c, r) = divmod(n, mark * 10)
cnt += c * mark
if r >= mark:
cnt += min(r - mark + 1, mark)
mark *= 10
return cnt
|
# Copyright 2015 VMware, Inc.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# Edge size
COMPACT = 'compact'
LARGE = 'large'
XLARGE = 'xlarge'
QUADLARGE = 'quadlarge'
# Edge type
SERVICE_EDGE = 'service'
VDR_EDGE = 'vdr'
# Internal element purpose
INTER_EDGE_PURPOSE = 'inter_edge_net'
|
compact = 'compact'
large = 'large'
xlarge = 'xlarge'
quadlarge = 'quadlarge'
service_edge = 'service'
vdr_edge = 'vdr'
inter_edge_purpose = 'inter_edge_net'
|
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
fb_native = struct(
android_aar = native.android_aar,
android_app_modularity = native.android_app_modularity,
android_binary = native.android_binary,
android_build_config = native.android_build_config,
android_bundle = native.android_bundle,
android_instrumentation_apk = native.android_instrumentation_apk,
android_instrumentation_test = native.android_instrumentation_test,
android_library = native.android_library,
android_manifest = native.android_manifest,
android_prebuilt_aar = native.android_prebuilt_aar,
android_resource = native.android_resource,
apk_genrule = native.apk_genrule,
apple_asset_catalog = native.apple_asset_catalog,
apple_binary = native.apple_binary,
apple_bundle = native.apple_bundle,
apple_library = native.apple_library,
apple_package = native.apple_package,
apple_resource = native.apple_resource,
apple_test = native.apple_test,
cgo_library = native.cgo_library,
command_alias = native.command_alias,
config_setting = native.config_setting,
constraint_setting = native.constraint_setting,
constraint_value = native.constraint_value,
core_data_model = native.core_data_model,
csharp_library = native.csharp_library,
cxx_binary = native.cxx_binary,
cxx_genrule = native.cxx_genrule,
cxx_library = native.cxx_library,
cxx_lua_extension = native.cxx_lua_extension,
cxx_precompiled_header = native.cxx_precompiled_header,
cxx_python_extension = native.cxx_python_extension,
cxx_test = native.cxx_test,
d_binary = native.d_binary,
d_library = native.d_library,
d_test = native.d_test,
export_file = native.export_file,
filegroup = native.filegroup,
gen_aidl = native.gen_aidl,
genrule = native.genrule,
go_binary = native.go_binary,
go_library = native.go_library,
go_test = native.go_test,
groovy_library = native.groovy_library,
groovy_test = native.groovy_test,
gwt_binary = native.gwt_binary,
halide_library = native.halide_library,
haskell_binary = native.haskell_binary,
haskell_ghci = native.haskell_ghci,
haskell_haddock = native.haskell_haddock,
haskell_library = native.haskell_library,
haskell_prebuilt_library = native.haskell_prebuilt_library,
http_archive = native.http_archive,
http_file = native.http_file,
jar_genrule = native.jar_genrule,
java_annotation_processor = native.java_annotation_processor,
java_binary = native.java_binary,
java_library = native.java_library,
java_test = native.java_test,
js_bundle = native.js_bundle,
js_bundle_genrule = native.js_bundle_genrule,
js_library = native.js_library,
keystore = native.keystore,
kotlin_library = native.kotlin_library,
kotlin_test = native.kotlin_test,
lua_binary = native.lua_binary,
lua_library = native.lua_library,
ndk_library = native.ndk_library,
ocaml_binary = native.ocaml_binary,
ocaml_library = native.ocaml_library,
platform = native.platform,
prebuilt_apple_framework = native.prebuilt_apple_framework,
prebuilt_cxx_library = native.prebuilt_cxx_library,
prebuilt_cxx_library_group = native.prebuilt_cxx_library_group,
prebuilt_dotnet_library = native.prebuilt_dotnet_library,
prebuilt_go_library = native.prebuilt_go_library,
prebuilt_jar = native.prebuilt_jar,
prebuilt_native_library = native.prebuilt_native_library,
prebuilt_ocaml_library = native.prebuilt_ocaml_library,
prebuilt_python_library = native.prebuilt_python_library,
prebuilt_rust_library = native.prebuilt_rust_library,
python_binary = native.python_binary,
python_library = native.python_library,
python_test = native.python_test,
remote_file = native.remote_file,
robolectric_test = native.robolectric_test,
rust_binary = native.rust_binary,
rust_library = native.rust_library,
rust_test = native.rust_test,
scala_library = native.scala_library,
scala_test = native.scala_test,
scene_kit_assets = native.scene_kit_assets,
sh_binary = native.sh_binary,
sh_test = native.sh_test,
swift_library = native.swift_library,
test_suite = native.test_suite,
versioned_alias = native.versioned_alias,
worker_tool = native.worker_tool,
xcode_postbuild_script = native.xcode_postbuild_script,
xcode_prebuild_script = native.xcode_prebuild_script,
xcode_workspace_config = native.xcode_workspace_config,
zip_file = native.zip_file,
)
|
fb_native = struct(android_aar=native.android_aar, android_app_modularity=native.android_app_modularity, android_binary=native.android_binary, android_build_config=native.android_build_config, android_bundle=native.android_bundle, android_instrumentation_apk=native.android_instrumentation_apk, android_instrumentation_test=native.android_instrumentation_test, android_library=native.android_library, android_manifest=native.android_manifest, android_prebuilt_aar=native.android_prebuilt_aar, android_resource=native.android_resource, apk_genrule=native.apk_genrule, apple_asset_catalog=native.apple_asset_catalog, apple_binary=native.apple_binary, apple_bundle=native.apple_bundle, apple_library=native.apple_library, apple_package=native.apple_package, apple_resource=native.apple_resource, apple_test=native.apple_test, cgo_library=native.cgo_library, command_alias=native.command_alias, config_setting=native.config_setting, constraint_setting=native.constraint_setting, constraint_value=native.constraint_value, core_data_model=native.core_data_model, csharp_library=native.csharp_library, cxx_binary=native.cxx_binary, cxx_genrule=native.cxx_genrule, cxx_library=native.cxx_library, cxx_lua_extension=native.cxx_lua_extension, cxx_precompiled_header=native.cxx_precompiled_header, cxx_python_extension=native.cxx_python_extension, cxx_test=native.cxx_test, d_binary=native.d_binary, d_library=native.d_library, d_test=native.d_test, export_file=native.export_file, filegroup=native.filegroup, gen_aidl=native.gen_aidl, genrule=native.genrule, go_binary=native.go_binary, go_library=native.go_library, go_test=native.go_test, groovy_library=native.groovy_library, groovy_test=native.groovy_test, gwt_binary=native.gwt_binary, halide_library=native.halide_library, haskell_binary=native.haskell_binary, haskell_ghci=native.haskell_ghci, haskell_haddock=native.haskell_haddock, haskell_library=native.haskell_library, haskell_prebuilt_library=native.haskell_prebuilt_library, http_archive=native.http_archive, http_file=native.http_file, jar_genrule=native.jar_genrule, java_annotation_processor=native.java_annotation_processor, java_binary=native.java_binary, java_library=native.java_library, java_test=native.java_test, js_bundle=native.js_bundle, js_bundle_genrule=native.js_bundle_genrule, js_library=native.js_library, keystore=native.keystore, kotlin_library=native.kotlin_library, kotlin_test=native.kotlin_test, lua_binary=native.lua_binary, lua_library=native.lua_library, ndk_library=native.ndk_library, ocaml_binary=native.ocaml_binary, ocaml_library=native.ocaml_library, platform=native.platform, prebuilt_apple_framework=native.prebuilt_apple_framework, prebuilt_cxx_library=native.prebuilt_cxx_library, prebuilt_cxx_library_group=native.prebuilt_cxx_library_group, prebuilt_dotnet_library=native.prebuilt_dotnet_library, prebuilt_go_library=native.prebuilt_go_library, prebuilt_jar=native.prebuilt_jar, prebuilt_native_library=native.prebuilt_native_library, prebuilt_ocaml_library=native.prebuilt_ocaml_library, prebuilt_python_library=native.prebuilt_python_library, prebuilt_rust_library=native.prebuilt_rust_library, python_binary=native.python_binary, python_library=native.python_library, python_test=native.python_test, remote_file=native.remote_file, robolectric_test=native.robolectric_test, rust_binary=native.rust_binary, rust_library=native.rust_library, rust_test=native.rust_test, scala_library=native.scala_library, scala_test=native.scala_test, scene_kit_assets=native.scene_kit_assets, sh_binary=native.sh_binary, sh_test=native.sh_test, swift_library=native.swift_library, test_suite=native.test_suite, versioned_alias=native.versioned_alias, worker_tool=native.worker_tool, xcode_postbuild_script=native.xcode_postbuild_script, xcode_prebuild_script=native.xcode_prebuild_script, xcode_workspace_config=native.xcode_workspace_config, zip_file=native.zip_file)
|
def findDecision(obj): #obj[0]: Passanger, obj[1]: Time, obj[2]: Coupon, obj[3]: Education, obj[4]: Occupation, obj[5]: Bar, obj[6]: Coffeehouse, obj[7]: Restaurant20to50, obj[8]: Direction_same, obj[9]: Distance
# {"feature": "Coupon", "instances": 8148, "metric_value": 0.4751, "depth": 1}
if obj[2]>1:
# {"feature": "Coffeehouse", "instances": 5867, "metric_value": 0.461, "depth": 2}
if obj[6]>0.0:
# {"feature": "Distance", "instances": 4415, "metric_value": 0.44, "depth": 3}
if obj[9]<=2:
# {"feature": "Passanger", "instances": 3980, "metric_value": 0.4296, "depth": 4}
if obj[0]<=2:
# {"feature": "Time", "instances": 2590, "metric_value": 0.4538, "depth": 5}
if obj[1]<=3:
# {"feature": "Bar", "instances": 2109, "metric_value": 0.4613, "depth": 6}
if obj[5]<=3.0:
# {"feature": "Direction_same", "instances": 2050, "metric_value": 0.4587, "depth": 7}
if obj[8]<=0:
# {"feature": "Occupation", "instances": 1153, "metric_value": 0.4716, "depth": 8}
if obj[4]>0:
# {"feature": "Restaurant20to50", "instances": 1144, "metric_value": 0.4729, "depth": 9}
if obj[7]<=3.0:
# {"feature": "Education", "instances": 1129, "metric_value": 0.4745, "depth": 10}
if obj[3]<=4:
return 'True'
elif obj[3]>4:
return 'True'
else: return 'True'
elif obj[7]>3.0:
# {"feature": "Education", "instances": 15, "metric_value": 0.2909, "depth": 10}
if obj[3]>0:
return 'True'
elif obj[3]<=0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[4]<=0:
# {"feature": "Education", "instances": 9, "metric_value": 0.1111, "depth": 9}
if obj[3]<=0:
return 'True'
elif obj[3]>0:
# {"feature": "Restaurant20to50", "instances": 2, "metric_value": 0.5, "depth": 10}
if obj[7]<=1.0:
return 'True'
else: return 'True'
else: return 'True'
else: return 'True'
elif obj[8]>0:
# {"feature": "Occupation", "instances": 897, "metric_value": 0.4395, "depth": 8}
if obj[4]>0:
# {"feature": "Restaurant20to50", "instances": 892, "metric_value": 0.4409, "depth": 9}
if obj[7]<=2.0:
# {"feature": "Education", "instances": 801, "metric_value": 0.4454, "depth": 10}
if obj[3]<=2:
return 'True'
elif obj[3]>2:
return 'True'
else: return 'True'
elif obj[7]>2.0:
# {"feature": "Education", "instances": 91, "metric_value": 0.3801, "depth": 10}
if obj[3]<=3:
return 'True'
elif obj[3]>3:
return 'True'
else: return 'True'
else: return 'True'
elif obj[4]<=0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[5]>3.0:
# {"feature": "Occupation", "instances": 59, "metric_value": 0.4428, "depth": 7}
if obj[4]<=7:
# {"feature": "Education", "instances": 41, "metric_value": 0.4497, "depth": 8}
if obj[3]<=2:
# {"feature": "Restaurant20to50", "instances": 32, "metric_value": 0.3877, "depth": 9}
if obj[7]>0.0:
# {"feature": "Direction_same", "instances": 17, "metric_value": 0.2773, "depth": 10}
if obj[8]<=0:
return 'True'
elif obj[8]>0:
return 'True'
else: return 'True'
elif obj[7]<=0.0:
# {"feature": "Direction_same", "instances": 15, "metric_value": 0.4786, "depth": 10}
if obj[8]>0:
return 'False'
elif obj[8]<=0:
return 'True'
else: return 'True'
else: return 'False'
elif obj[3]>2:
# {"feature": "Direction_same", "instances": 9, "metric_value": 0.3333, "depth": 9}
if obj[8]<=0:
# {"feature": "Restaurant20to50", "instances": 6, "metric_value": 0.5, "depth": 10}
if obj[7]<=4.0:
return 'False'
else: return 'False'
elif obj[8]>0:
return 'False'
else: return 'False'
else: return 'False'
elif obj[4]>7:
# {"feature": "Restaurant20to50", "instances": 18, "metric_value": 0.2685, "depth": 8}
if obj[7]<=3.0:
# {"feature": "Education", "instances": 12, "metric_value": 0.1111, "depth": 9}
if obj[3]>0:
return 'False'
elif obj[3]<=0:
# {"feature": "Direction_same", "instances": 3, "metric_value": 0.0, "depth": 10}
if obj[8]<=0:
return 'False'
elif obj[8]>0:
return 'True'
else: return 'True'
else: return 'False'
elif obj[7]>3.0:
# {"feature": "Direction_same", "instances": 6, "metric_value": 0.4, "depth": 9}
if obj[8]<=0:
# {"feature": "Education", "instances": 5, "metric_value": 0.4667, "depth": 10}
if obj[3]<=0:
return 'True'
elif obj[3]>0:
return 'False'
else: return 'False'
elif obj[8]>0:
return 'False'
else: return 'False'
else: return 'False'
else: return 'False'
else: return 'False'
elif obj[1]>3:
# {"feature": "Education", "instances": 481, "metric_value": 0.4106, "depth": 6}
if obj[3]>0:
# {"feature": "Bar", "instances": 314, "metric_value": 0.4334, "depth": 7}
if obj[5]<=1.0:
# {"feature": "Occupation", "instances": 211, "metric_value": 0.407, "depth": 8}
if obj[4]<=13.096181893771217:
# {"feature": "Restaurant20to50", "instances": 178, "metric_value": 0.3918, "depth": 9}
if obj[7]<=2.0:
# {"feature": "Direction_same", "instances": 165, "metric_value": 0.4021, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[7]>2.0:
# {"feature": "Direction_same", "instances": 13, "metric_value": 0.2604, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[4]>13.096181893771217:
# {"feature": "Restaurant20to50", "instances": 33, "metric_value": 0.4718, "depth": 9}
if obj[7]>0.0:
# {"feature": "Direction_same", "instances": 29, "metric_value": 0.4851, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[7]<=0.0:
# {"feature": "Direction_same", "instances": 4, "metric_value": 0.375, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
else: return 'True'
elif obj[5]>1.0:
# {"feature": "Occupation", "instances": 103, "metric_value": 0.4649, "depth": 8}
if obj[4]<=19:
# {"feature": "Restaurant20to50", "instances": 101, "metric_value": 0.4709, "depth": 9}
if obj[7]<=3.0:
# {"feature": "Direction_same", "instances": 93, "metric_value": 0.4791, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[7]>3.0:
# {"feature": "Direction_same", "instances": 8, "metric_value": 0.375, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[4]>19:
return 'False'
else: return 'False'
else: return 'True'
elif obj[3]<=0:
# {"feature": "Bar", "instances": 167, "metric_value": 0.3508, "depth": 7}
if obj[5]<=2.0:
# {"feature": "Occupation", "instances": 150, "metric_value": 0.3215, "depth": 8}
if obj[4]>2:
# {"feature": "Restaurant20to50", "instances": 118, "metric_value": 0.281, "depth": 9}
if obj[7]<=2.0:
# {"feature": "Direction_same", "instances": 109, "metric_value": 0.2879, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[7]>2.0:
# {"feature": "Direction_same", "instances": 9, "metric_value": 0.1975, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[4]<=2:
# {"feature": "Restaurant20to50", "instances": 32, "metric_value": 0.4271, "depth": 9}
if obj[7]>0.0:
# {"feature": "Direction_same", "instances": 24, "metric_value": 0.4965, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[7]<=0.0:
# {"feature": "Direction_same", "instances": 8, "metric_value": 0.2188, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
else: return 'True'
elif obj[5]>2.0:
# {"feature": "Occupation", "instances": 17, "metric_value": 0.3922, "depth": 8}
if obj[4]>4:
# {"feature": "Restaurant20to50", "instances": 15, "metric_value": 0.4074, "depth": 9}
if obj[7]<=1.0:
# {"feature": "Direction_same", "instances": 9, "metric_value": 0.3457, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[7]>1.0:
# {"feature": "Direction_same", "instances": 6, "metric_value": 0.5, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[4]<=4:
return 'False'
else: return 'False'
else: return 'True'
else: return 'True'
else: return 'True'
elif obj[0]>2:
# {"feature": "Bar", "instances": 1390, "metric_value": 0.3797, "depth": 5}
if obj[5]<=3.0:
# {"feature": "Education", "instances": 1328, "metric_value": 0.3739, "depth": 6}
if obj[3]<=3:
# {"feature": "Occupation", "instances": 1246, "metric_value": 0.3798, "depth": 7}
if obj[4]<=7.746388443017657:
# {"feature": "Restaurant20to50", "instances": 778, "metric_value": 0.361, "depth": 8}
if obj[7]<=1.0:
# {"feature": "Time", "instances": 521, "metric_value": 0.3817, "depth": 9}
if obj[1]<=3:
# {"feature": "Direction_same", "instances": 380, "metric_value": 0.3903, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[1]>3:
# {"feature": "Direction_same", "instances": 141, "metric_value": 0.3585, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[7]>1.0:
# {"feature": "Time", "instances": 257, "metric_value": 0.3099, "depth": 9}
if obj[1]>0:
# {"feature": "Direction_same", "instances": 203, "metric_value": 0.3558, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[1]<=0:
# {"feature": "Direction_same", "instances": 54, "metric_value": 0.1372, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
else: return 'True'
elif obj[4]>7.746388443017657:
# {"feature": "Restaurant20to50", "instances": 468, "metric_value": 0.4073, "depth": 8}
if obj[7]>-1.0:
# {"feature": "Time", "instances": 464, "metric_value": 0.4104, "depth": 9}
if obj[1]<=3:
# {"feature": "Direction_same", "instances": 350, "metric_value": 0.4177, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[1]>3:
# {"feature": "Direction_same", "instances": 114, "metric_value": 0.3878, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[7]<=-1.0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[3]>3:
# {"feature": "Occupation", "instances": 82, "metric_value": 0.246, "depth": 7}
if obj[4]<=12:
# {"feature": "Restaurant20to50", "instances": 58, "metric_value": 0.3353, "depth": 8}
if obj[7]>0.0:
# {"feature": "Time", "instances": 45, "metric_value": 0.379, "depth": 9}
if obj[1]>0:
# {"feature": "Direction_same", "instances": 36, "metric_value": 0.4244, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[1]<=0:
# {"feature": "Direction_same", "instances": 9, "metric_value": 0.1975, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[7]<=0.0:
# {"feature": "Time", "instances": 13, "metric_value": 0.1154, "depth": 9}
if obj[1]<=2:
return 'True'
elif obj[1]>2:
# {"feature": "Direction_same", "instances": 4, "metric_value": 0.375, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
else: return 'True'
elif obj[4]>12:
return 'True'
else: return 'True'
else: return 'True'
elif obj[5]>3.0:
# {"feature": "Occupation", "instances": 62, "metric_value": 0.437, "depth": 6}
if obj[4]<=12:
# {"feature": "Education", "instances": 47, "metric_value": 0.4186, "depth": 7}
if obj[3]>0:
# {"feature": "Restaurant20to50", "instances": 35, "metric_value": 0.4502, "depth": 8}
if obj[7]>0.0:
# {"feature": "Time", "instances": 33, "metric_value": 0.4703, "depth": 9}
if obj[1]>0:
# {"feature": "Direction_same", "instances": 25, "metric_value": 0.4608, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[1]<=0:
# {"feature": "Direction_same", "instances": 8, "metric_value": 0.5, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[7]<=0.0:
return 'True'
else: return 'True'
elif obj[3]<=0:
# {"feature": "Time", "instances": 12, "metric_value": 0.2593, "depth": 8}
if obj[1]<=2:
# {"feature": "Restaurant20to50", "instances": 9, "metric_value": 0.3016, "depth": 9}
if obj[7]>0.0:
# {"feature": "Direction_same", "instances": 7, "metric_value": 0.2449, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[7]<=0.0:
# {"feature": "Direction_same", "instances": 2, "metric_value": 0.5, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[1]>2:
return 'True'
else: return 'True'
else: return 'True'
elif obj[4]>12:
# {"feature": "Time", "instances": 15, "metric_value": 0.3333, "depth": 7}
if obj[1]>0:
# {"feature": "Education", "instances": 10, "metric_value": 0.4444, "depth": 8}
if obj[3]<=0:
# {"feature": "Restaurant20to50", "instances": 9, "metric_value": 0.4889, "depth": 9}
if obj[7]>1.0:
# {"feature": "Direction_same", "instances": 5, "metric_value": 0.48, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[7]<=1.0:
# {"feature": "Direction_same", "instances": 4, "metric_value": 0.5, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[3]>0:
return 'False'
else: return 'False'
elif obj[1]<=0:
return 'False'
else: return 'False'
else: return 'False'
else: return 'True'
else: return 'True'
elif obj[9]>2:
# {"feature": "Passanger", "instances": 435, "metric_value": 0.485, "depth": 4}
if obj[0]>0:
# {"feature": "Education", "instances": 419, "metric_value": 0.484, "depth": 5}
if obj[3]>0:
# {"feature": "Time", "instances": 281, "metric_value": 0.4684, "depth": 6}
if obj[1]>0:
# {"feature": "Bar", "instances": 243, "metric_value": 0.485, "depth": 7}
if obj[5]>-1.0:
# {"feature": "Restaurant20to50", "instances": 240, "metric_value": 0.4876, "depth": 8}
if obj[7]<=2.0:
# {"feature": "Occupation", "instances": 217, "metric_value": 0.4907, "depth": 9}
if obj[4]>0:
# {"feature": "Direction_same", "instances": 215, "metric_value": 0.4952, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
elif obj[4]<=0:
return 'False'
else: return 'False'
elif obj[7]>2.0:
# {"feature": "Occupation", "instances": 23, "metric_value": 0.3794, "depth": 9}
if obj[4]<=12:
# {"feature": "Direction_same", "instances": 22, "metric_value": 0.3967, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
elif obj[4]>12:
return 'True'
else: return 'True'
else: return 'False'
elif obj[5]<=-1.0:
return 'False'
else: return 'False'
elif obj[1]<=0:
# {"feature": "Occupation", "instances": 38, "metric_value": 0.3008, "depth": 7}
if obj[4]<=11:
# {"feature": "Bar", "instances": 28, "metric_value": 0.3869, "depth": 8}
if obj[5]<=1.0:
# {"feature": "Restaurant20to50", "instances": 16, "metric_value": 0.4167, "depth": 9}
if obj[7]>0.0:
# {"feature": "Direction_same", "instances": 15, "metric_value": 0.4444, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
elif obj[7]<=0.0:
return 'True'
else: return 'True'
elif obj[5]>1.0:
# {"feature": "Restaurant20to50", "instances": 12, "metric_value": 0.2667, "depth": 9}
if obj[7]>0.0:
# {"feature": "Direction_same", "instances": 10, "metric_value": 0.32, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
elif obj[7]<=0.0:
return 'False'
else: return 'False'
else: return 'False'
elif obj[4]>11:
return 'False'
else: return 'False'
else: return 'False'
elif obj[3]<=0:
# {"feature": "Restaurant20to50", "instances": 138, "metric_value": 0.4841, "depth": 6}
if obj[7]<=3.0:
# {"feature": "Time", "instances": 136, "metric_value": 0.4842, "depth": 7}
if obj[1]>0:
# {"feature": "Occupation", "instances": 113, "metric_value": 0.4765, "depth": 8}
if obj[4]<=22:
# {"feature": "Bar", "instances": 112, "metric_value": 0.477, "depth": 9}
if obj[5]<=3.0:
# {"feature": "Direction_same", "instances": 107, "metric_value": 0.4769, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[5]>3.0:
# {"feature": "Direction_same", "instances": 5, "metric_value": 0.48, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
else: return 'False'
elif obj[4]>22:
return 'False'
else: return 'False'
elif obj[1]<=0:
# {"feature": "Occupation", "instances": 23, "metric_value": 0.4306, "depth": 8}
if obj[4]>1:
# {"feature": "Bar", "instances": 21, "metric_value": 0.4121, "depth": 9}
if obj[5]<=0.0:
# {"feature": "Direction_same", "instances": 11, "metric_value": 0.4959, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[5]>0.0:
# {"feature": "Direction_same", "instances": 10, "metric_value": 0.32, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
else: return 'False'
elif obj[4]<=1:
return 'True'
else: return 'True'
else: return 'False'
elif obj[7]>3.0:
return 'False'
else: return 'False'
else: return 'True'
elif obj[0]<=0:
# {"feature": "Restaurant20to50", "instances": 16, "metric_value": 0.1786, "depth": 5}
if obj[7]<=1.0:
return 'True'
elif obj[7]>1.0:
# {"feature": "Bar", "instances": 7, "metric_value": 0.0, "depth": 6}
if obj[5]>1.0:
return 'True'
elif obj[5]<=1.0:
return 'False'
else: return 'False'
else: return 'True'
else: return 'True'
else: return 'False'
elif obj[6]<=0.0:
# {"feature": "Passanger", "instances": 1452, "metric_value": 0.4944, "depth": 3}
if obj[0]<=1:
# {"feature": "Distance", "instances": 925, "metric_value": 0.4846, "depth": 4}
if obj[9]<=1:
# {"feature": "Time", "instances": 498, "metric_value": 0.486, "depth": 5}
if obj[1]>0:
# {"feature": "Bar", "instances": 313, "metric_value": 0.473, "depth": 6}
if obj[5]<=0.0:
# {"feature": "Direction_same", "instances": 169, "metric_value": 0.4379, "depth": 7}
if obj[8]>0:
# {"feature": "Occupation", "instances": 94, "metric_value": 0.4613, "depth": 8}
if obj[4]>3:
# {"feature": "Education", "instances": 63, "metric_value": 0.4968, "depth": 9}
if obj[3]<=3:
# {"feature": "Restaurant20to50", "instances": 60, "metric_value": 0.4986, "depth": 10}
if obj[7]>0.0:
return 'True'
elif obj[7]<=0.0:
return 'True'
else: return 'True'
elif obj[3]>3:
# {"feature": "Restaurant20to50", "instances": 3, "metric_value": 0.3333, "depth": 10}
if obj[7]>0.0:
return 'True'
elif obj[7]<=0.0:
return 'False'
else: return 'False'
else: return 'False'
elif obj[4]<=3:
# {"feature": "Restaurant20to50", "instances": 31, "metric_value": 0.3752, "depth": 9}
if obj[7]<=1.0:
# {"feature": "Education", "instances": 24, "metric_value": 0.3964, "depth": 10}
if obj[3]<=1:
return 'True'
elif obj[3]>1:
return 'True'
else: return 'True'
elif obj[7]>1.0:
# {"feature": "Education", "instances": 7, "metric_value": 0.2143, "depth": 10}
if obj[3]<=0:
return 'True'
elif obj[3]>0:
return 'True'
else: return 'True'
else: return 'True'
else: return 'True'
elif obj[8]<=0:
# {"feature": "Education", "instances": 75, "metric_value": 0.3407, "depth": 8}
if obj[3]>0:
# {"feature": "Restaurant20to50", "instances": 40, "metric_value": 0.2083, "depth": 9}
if obj[7]<=1.0:
# {"feature": "Occupation", "instances": 30, "metric_value": 0.2711, "depth": 10}
if obj[4]<=6:
return 'True'
elif obj[4]>6:
return 'True'
else: return 'True'
elif obj[7]>1.0:
return 'True'
else: return 'True'
elif obj[3]<=0:
# {"feature": "Occupation", "instances": 35, "metric_value": 0.4573, "depth": 9}
if obj[4]>4:
# {"feature": "Restaurant20to50", "instances": 22, "metric_value": 0.4052, "depth": 10}
if obj[7]>0.0:
return 'True'
elif obj[7]<=0.0:
return 'True'
else: return 'True'
elif obj[4]<=4:
# {"feature": "Restaurant20to50", "instances": 13, "metric_value": 0.4615, "depth": 10}
if obj[7]>0.0:
return 'True'
elif obj[7]<=0.0:
return 'False'
else: return 'False'
else: return 'False'
else: return 'True'
else: return 'True'
elif obj[5]>0.0:
# {"feature": "Occupation", "instances": 144, "metric_value": 0.4721, "depth": 7}
if obj[4]<=20:
# {"feature": "Education", "instances": 136, "metric_value": 0.4907, "depth": 8}
if obj[3]>1:
# {"feature": "Direction_same", "instances": 92, "metric_value": 0.4865, "depth": 9}
if obj[8]>0:
# {"feature": "Restaurant20to50", "instances": 49, "metric_value": 0.4685, "depth": 10}
if obj[7]<=2.0:
return 'False'
elif obj[7]>2.0:
return 'False'
else: return 'False'
elif obj[8]<=0:
# {"feature": "Restaurant20to50", "instances": 43, "metric_value": 0.4857, "depth": 10}
if obj[7]>0.0:
return 'True'
elif obj[7]<=0.0:
return 'False'
else: return 'False'
else: return 'True'
elif obj[3]<=1:
# {"feature": "Restaurant20to50", "instances": 44, "metric_value": 0.4568, "depth": 9}
if obj[7]<=1.0:
# {"feature": "Direction_same", "instances": 31, "metric_value": 0.4578, "depth": 10}
if obj[8]<=0:
return 'True'
elif obj[8]>0:
return 'False'
else: return 'False'
elif obj[7]>1.0:
# {"feature": "Direction_same", "instances": 13, "metric_value": 0.3192, "depth": 10}
if obj[8]>0:
return 'True'
elif obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
else: return 'True'
elif obj[4]>20:
return 'True'
else: return 'True'
else: return 'True'
elif obj[1]<=0:
# {"feature": "Occupation", "instances": 185, "metric_value": 0.4726, "depth": 6}
if obj[4]<=7.951351351351351:
# {"feature": "Education", "instances": 114, "metric_value": 0.4532, "depth": 7}
if obj[3]<=3:
# {"feature": "Bar", "instances": 103, "metric_value": 0.4401, "depth": 8}
if obj[5]>-1.0:
# {"feature": "Direction_same", "instances": 102, "metric_value": 0.4422, "depth": 9}
if obj[8]<=0:
# {"feature": "Restaurant20to50", "instances": 61, "metric_value": 0.4554, "depth": 10}
if obj[7]>0.0:
return 'False'
elif obj[7]<=0.0:
return 'False'
else: return 'False'
elif obj[8]>0:
# {"feature": "Restaurant20to50", "instances": 41, "metric_value": 0.4103, "depth": 10}
if obj[7]<=1.0:
return 'False'
elif obj[7]>1.0:
return 'False'
else: return 'False'
else: return 'False'
elif obj[5]<=-1.0:
return 'True'
else: return 'True'
elif obj[3]>3:
# {"feature": "Restaurant20to50", "instances": 11, "metric_value": 0.4545, "depth": 8}
if obj[7]<=1.0:
# {"feature": "Direction_same", "instances": 10, "metric_value": 0.4762, "depth": 9}
if obj[8]<=0:
# {"feature": "Bar", "instances": 7, "metric_value": 0.4762, "depth": 10}
if obj[5]>0.0:
return 'True'
elif obj[5]<=0.0:
return 'True'
else: return 'True'
elif obj[8]>0:
# {"feature": "Bar", "instances": 3, "metric_value": 0.4444, "depth": 10}
if obj[5]<=0.0:
return 'False'
else: return 'False'
else: return 'False'
elif obj[7]>1.0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[4]>7.951351351351351:
# {"feature": "Direction_same", "instances": 71, "metric_value": 0.4524, "depth": 7}
if obj[8]<=0:
# {"feature": "Education", "instances": 39, "metric_value": 0.4732, "depth": 8}
if obj[3]>0:
# {"feature": "Bar", "instances": 29, "metric_value": 0.4606, "depth": 9}
if obj[5]<=3.0:
# {"feature": "Restaurant20to50", "instances": 28, "metric_value": 0.4675, "depth": 10}
if obj[7]>0.0:
return 'False'
elif obj[7]<=0.0:
return 'False'
else: return 'False'
elif obj[5]>3.0:
return 'False'
else: return 'False'
elif obj[3]<=0:
# {"feature": "Restaurant20to50", "instances": 10, "metric_value": 0.4444, "depth": 9}
if obj[7]<=1.0:
# {"feature": "Bar", "instances": 9, "metric_value": 0.4815, "depth": 10}
if obj[5]<=0.0:
return 'False'
elif obj[5]>0.0:
return 'True'
else: return 'True'
elif obj[7]>1.0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[8]>0:
# {"feature": "Bar", "instances": 32, "metric_value": 0.3822, "depth": 8}
if obj[5]<=1.0:
# {"feature": "Restaurant20to50", "instances": 26, "metric_value": 0.3178, "depth": 9}
if obj[7]<=0.0:
# {"feature": "Education", "instances": 14, "metric_value": 0.4396, "depth": 10}
if obj[3]>0:
return 'True'
elif obj[3]<=0:
return 'True'
else: return 'True'
elif obj[7]>0.0:
# {"feature": "Education", "instances": 12, "metric_value": 0.1333, "depth": 10}
if obj[3]>0:
return 'True'
elif obj[3]<=0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[5]>1.0:
# {"feature": "Education", "instances": 6, "metric_value": 0.25, "depth": 9}
if obj[3]<=0:
# {"feature": "Restaurant20to50", "instances": 4, "metric_value": 0.3333, "depth": 10}
if obj[7]>1.0:
return 'True'
elif obj[7]<=1.0:
return 'True'
else: return 'True'
elif obj[3]>0:
return 'False'
else: return 'False'
else: return 'True'
else: return 'True'
else: return 'True'
else: return 'False'
elif obj[9]>1:
# {"feature": "Bar", "instances": 427, "metric_value": 0.466, "depth": 5}
if obj[5]<=1.0:
# {"feature": "Restaurant20to50", "instances": 341, "metric_value": 0.4776, "depth": 6}
if obj[7]<=1.0:
# {"feature": "Occupation", "instances": 269, "metric_value": 0.4701, "depth": 7}
if obj[4]<=6:
# {"feature": "Time", "instances": 143, "metric_value": 0.4445, "depth": 8}
if obj[1]<=3:
# {"feature": "Education", "instances": 121, "metric_value": 0.4697, "depth": 9}
if obj[3]<=3:
# {"feature": "Direction_same", "instances": 108, "metric_value": 0.4664, "depth": 10}
if obj[8]<=0:
return 'False'
elif obj[8]>0:
return 'False'
else: return 'False'
elif obj[3]>3:
# {"feature": "Direction_same", "instances": 13, "metric_value": 0.4957, "depth": 10}
if obj[8]<=0:
return 'False'
elif obj[8]>0:
return 'False'
else: return 'False'
else: return 'False'
elif obj[1]>3:
# {"feature": "Education", "instances": 22, "metric_value": 0.2864, "depth": 9}
if obj[3]<=0:
# {"feature": "Direction_same", "instances": 12, "metric_value": 0.375, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
elif obj[3]>0:
# {"feature": "Direction_same", "instances": 10, "metric_value": 0.18, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
else: return 'False'
else: return 'False'
elif obj[4]>6:
# {"feature": "Education", "instances": 126, "metric_value": 0.4844, "depth": 8}
if obj[3]<=3:
# {"feature": "Direction_same", "instances": 115, "metric_value": 0.4801, "depth": 9}
if obj[8]<=0:
# {"feature": "Time", "instances": 81, "metric_value": 0.4525, "depth": 10}
if obj[1]>0:
return 'False'
elif obj[1]<=0:
return 'False'
else: return 'False'
elif obj[8]>0:
# {"feature": "Time", "instances": 34, "metric_value": 0.4303, "depth": 10}
if obj[1]>0:
return 'False'
elif obj[1]<=0:
return 'True'
else: return 'True'
else: return 'False'
elif obj[3]>3:
# {"feature": "Time", "instances": 11, "metric_value": 0.3961, "depth": 9}
if obj[1]<=2:
# {"feature": "Direction_same", "instances": 7, "metric_value": 0.1905, "depth": 10}
if obj[8]<=0:
return 'True'
elif obj[8]>0:
return 'False'
else: return 'False'
elif obj[1]>2:
# {"feature": "Direction_same", "instances": 4, "metric_value": 0.375, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
else: return 'False'
else: return 'True'
else: return 'False'
elif obj[7]>1.0:
# {"feature": "Education", "instances": 72, "metric_value": 0.4683, "depth": 7}
if obj[3]>0:
# {"feature": "Time", "instances": 52, "metric_value": 0.4623, "depth": 8}
if obj[1]>0:
# {"feature": "Occupation", "instances": 43, "metric_value": 0.4508, "depth": 9}
if obj[4]<=12:
# {"feature": "Direction_same", "instances": 39, "metric_value": 0.4959, "depth": 10}
if obj[8]<=0:
return 'False'
elif obj[8]>0:
return 'False'
else: return 'False'
elif obj[4]>12:
return 'False'
else: return 'False'
elif obj[1]<=0:
# {"feature": "Occupation", "instances": 9, "metric_value": 0.1944, "depth": 9}
if obj[4]<=12:
# {"feature": "Direction_same", "instances": 8, "metric_value": 0.2188, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
elif obj[4]>12:
return 'True'
else: return 'True'
else: return 'False'
elif obj[3]<=0:
# {"feature": "Occupation", "instances": 20, "metric_value": 0.375, "depth": 8}
if obj[4]<=7:
# {"feature": "Time", "instances": 16, "metric_value": 0.3462, "depth": 9}
if obj[1]<=3:
# {"feature": "Direction_same", "instances": 13, "metric_value": 0.4126, "depth": 10}
if obj[8]<=0:
return 'True'
elif obj[8]>0:
return 'False'
else: return 'False'
elif obj[1]>3:
return 'True'
else: return 'True'
elif obj[4]>7:
# {"feature": "Direction_same", "instances": 4, "metric_value": 0.0, "depth": 9}
if obj[8]<=0:
return 'False'
elif obj[8]>0:
return 'True'
else: return 'True'
else: return 'False'
else: return 'True'
else: return 'False'
elif obj[5]>1.0:
# {"feature": "Occupation", "instances": 86, "metric_value": 0.3849, "depth": 6}
if obj[4]>5:
# {"feature": "Education", "instances": 64, "metric_value": 0.4409, "depth": 7}
if obj[3]<=2:
# {"feature": "Time", "instances": 58, "metric_value": 0.4183, "depth": 8}
if obj[1]>0:
# {"feature": "Restaurant20to50", "instances": 47, "metric_value": 0.3969, "depth": 9}
if obj[7]<=2.0:
# {"feature": "Direction_same", "instances": 46, "metric_value": 0.4038, "depth": 10}
if obj[8]<=0:
return 'False'
elif obj[8]>0:
return 'False'
else: return 'False'
elif obj[7]>2.0:
return 'False'
else: return 'False'
elif obj[1]<=0:
# {"feature": "Direction_same", "instances": 11, "metric_value": 0.297, "depth": 9}
if obj[8]>0:
# {"feature": "Restaurant20to50", "instances": 6, "metric_value": 0.25, "depth": 10}
if obj[7]>0.0:
return 'True'
elif obj[7]<=0.0:
return 'True'
else: return 'True'
elif obj[8]<=0:
# {"feature": "Restaurant20to50", "instances": 5, "metric_value": 0.3, "depth": 10}
if obj[7]>0.0:
return 'False'
elif obj[7]<=0.0:
return 'False'
else: return 'False'
else: return 'False'
else: return 'True'
elif obj[3]>2:
# {"feature": "Direction_same", "instances": 6, "metric_value": 0.2667, "depth": 8}
if obj[8]<=0:
# {"feature": "Time", "instances": 5, "metric_value": 0.2667, "depth": 9}
if obj[1]<=1:
# {"feature": "Restaurant20to50", "instances": 3, "metric_value": 0.4444, "depth": 10}
if obj[7]<=1.0:
return 'True'
else: return 'True'
elif obj[1]>1:
return 'True'
else: return 'True'
elif obj[8]>0:
return 'False'
else: return 'False'
else: return 'True'
elif obj[4]<=5:
# {"feature": "Time", "instances": 22, "metric_value": 0.0909, "depth": 7}
if obj[1]>0:
return 'False'
elif obj[1]<=0:
# {"feature": "Education", "instances": 4, "metric_value": 0.3333, "depth": 8}
if obj[3]>0:
# {"feature": "Restaurant20to50", "instances": 3, "metric_value": 0.0, "depth": 9}
if obj[7]<=1.0:
return 'False'
elif obj[7]>1.0:
return 'True'
else: return 'True'
elif obj[3]<=0:
return 'True'
else: return 'True'
else: return 'False'
else: return 'False'
else: return 'False'
else: return 'False'
elif obj[0]>1:
# {"feature": "Distance", "instances": 527, "metric_value": 0.4617, "depth": 4}
if obj[9]>1:
# {"feature": "Bar", "instances": 356, "metric_value": 0.4414, "depth": 5}
if obj[5]<=2.0:
# {"feature": "Time", "instances": 323, "metric_value": 0.4297, "depth": 6}
if obj[1]>0:
# {"feature": "Restaurant20to50", "instances": 252, "metric_value": 0.4506, "depth": 7}
if obj[7]>-1.0:
# {"feature": "Occupation", "instances": 241, "metric_value": 0.4626, "depth": 8}
if obj[4]<=7.132780082987552:
# {"feature": "Education", "instances": 160, "metric_value": 0.4669, "depth": 9}
if obj[3]<=1:
# {"feature": "Direction_same", "instances": 89, "metric_value": 0.4469, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[3]>1:
# {"feature": "Direction_same", "instances": 71, "metric_value": 0.492, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[4]>7.132780082987552:
# {"feature": "Education", "instances": 81, "metric_value": 0.4416, "depth": 9}
if obj[3]<=3:
# {"feature": "Direction_same", "instances": 77, "metric_value": 0.4385, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[3]>3:
# {"feature": "Direction_same", "instances": 4, "metric_value": 0.5, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
else: return 'False'
else: return 'True'
elif obj[7]<=-1.0:
# {"feature": "Occupation", "instances": 11, "metric_value": 0.1515, "depth": 8}
if obj[4]>6:
# {"feature": "Education", "instances": 6, "metric_value": 0.25, "depth": 9}
if obj[3]<=0:
# {"feature": "Direction_same", "instances": 4, "metric_value": 0.375, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[3]>0:
return 'True'
else: return 'True'
elif obj[4]<=6:
return 'True'
else: return 'True'
else: return 'True'
elif obj[1]<=0:
# {"feature": "Restaurant20to50", "instances": 71, "metric_value": 0.2784, "depth": 7}
if obj[7]>-1.0:
# {"feature": "Occupation", "instances": 68, "metric_value": 0.28, "depth": 8}
if obj[4]<=9:
# {"feature": "Education", "instances": 47, "metric_value": 0.215, "depth": 9}
if obj[3]<=2:
# {"feature": "Direction_same", "instances": 38, "metric_value": 0.2659, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[3]>2:
return 'True'
else: return 'True'
elif obj[4]>9:
# {"feature": "Education", "instances": 21, "metric_value": 0.3866, "depth": 9}
if obj[3]>0:
# {"feature": "Direction_same", "instances": 17, "metric_value": 0.3599, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[3]<=0:
# {"feature": "Direction_same", "instances": 4, "metric_value": 0.5, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
else: return 'True'
elif obj[7]<=-1.0:
return 'False'
else: return 'False'
else: return 'True'
elif obj[5]>2.0:
# {"feature": "Occupation", "instances": 33, "metric_value": 0.4242, "depth": 6}
if obj[4]<=18:
# {"feature": "Time", "instances": 28, "metric_value": 0.4792, "depth": 7}
if obj[1]>0:
# {"feature": "Education", "instances": 24, "metric_value": 0.4921, "depth": 8}
if obj[3]<=2:
# {"feature": "Restaurant20to50", "instances": 21, "metric_value": 0.4952, "depth": 9}
if obj[7]>0.0:
# {"feature": "Direction_same", "instances": 16, "metric_value": 0.5, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
elif obj[7]<=0.0:
# {"feature": "Direction_same", "instances": 5, "metric_value": 0.48, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
else: return 'False'
elif obj[3]>2:
# {"feature": "Restaurant20to50", "instances": 3, "metric_value": 0.4444, "depth": 9}
if obj[7]<=1.0:
# {"feature": "Direction_same", "instances": 3, "metric_value": 0.4444, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
else: return 'False'
else: return 'False'
elif obj[1]<=0:
# {"feature": "Restaurant20to50", "instances": 4, "metric_value": 0.25, "depth": 8}
if obj[7]<=1.0:
return 'True'
elif obj[7]>1.0:
# {"feature": "Education", "instances": 2, "metric_value": 0.5, "depth": 9}
if obj[3]<=2:
# {"feature": "Direction_same", "instances": 2, "metric_value": 0.5, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
else: return 'True'
else: return 'True'
elif obj[4]>18:
return 'False'
else: return 'False'
else: return 'False'
elif obj[9]<=1:
# {"feature": "Occupation", "instances": 171, "metric_value": 0.4644, "depth": 5}
if obj[4]>1.3264107549745603:
# {"feature": "Education", "instances": 137, "metric_value": 0.4459, "depth": 6}
if obj[3]<=3:
# {"feature": "Time", "instances": 126, "metric_value": 0.432, "depth": 7}
if obj[1]>0:
# {"feature": "Bar", "instances": 94, "metric_value": 0.3985, "depth": 8}
if obj[5]<=3.0:
# {"feature": "Restaurant20to50", "instances": 93, "metric_value": 0.3939, "depth": 9}
if obj[7]<=2.0:
# {"feature": "Direction_same", "instances": 88, "metric_value": 0.4163, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
elif obj[7]>2.0:
return 'False'
else: return 'False'
elif obj[5]>3.0:
return 'True'
else: return 'True'
elif obj[1]<=0:
# {"feature": "Bar", "instances": 32, "metric_value": 0.4688, "depth": 8}
if obj[5]>-1.0:
# {"feature": "Restaurant20to50", "instances": 30, "metric_value": 0.4974, "depth": 9}
if obj[7]<=1.0:
# {"feature": "Direction_same", "instances": 21, "metric_value": 0.4989, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[7]>1.0:
# {"feature": "Direction_same", "instances": 9, "metric_value": 0.4938, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
else: return 'False'
elif obj[5]<=-1.0:
return 'False'
else: return 'False'
else: return 'False'
elif obj[3]>3:
# {"feature": "Bar", "instances": 11, "metric_value": 0.1455, "depth": 7}
if obj[5]<=0.0:
return 'True'
elif obj[5]>0.0:
# {"feature": "Restaurant20to50", "instances": 5, "metric_value": 0.2667, "depth": 8}
if obj[7]<=0.0:
# {"feature": "Time", "instances": 3, "metric_value": 0.3333, "depth": 9}
if obj[1]>0:
# {"feature": "Direction_same", "instances": 2, "metric_value": 0.5, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[1]<=0:
return 'False'
else: return 'False'
elif obj[7]>0.0:
return 'False'
else: return 'False'
else: return 'False'
else: return 'True'
elif obj[4]<=1.3264107549745603:
# {"feature": "Education", "instances": 34, "metric_value": 0.444, "depth": 6}
if obj[3]>1:
# {"feature": "Restaurant20to50", "instances": 18, "metric_value": 0.3704, "depth": 7}
if obj[7]<=1.0:
# {"feature": "Bar", "instances": 15, "metric_value": 0.4103, "depth": 8}
if obj[5]<=2.0:
# {"feature": "Time", "instances": 13, "metric_value": 0.4256, "depth": 9}
if obj[1]>0:
# {"feature": "Direction_same", "instances": 10, "metric_value": 0.42, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[1]<=0:
# {"feature": "Direction_same", "instances": 3, "metric_value": 0.4444, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
else: return 'False'
elif obj[5]>2.0:
return 'True'
else: return 'True'
elif obj[7]>1.0:
return 'True'
else: return 'True'
elif obj[3]<=1:
# {"feature": "Restaurant20to50", "instances": 16, "metric_value": 0.4271, "depth": 7}
if obj[7]<=1.0:
# {"feature": "Time", "instances": 12, "metric_value": 0.3429, "depth": 8}
if obj[1]<=2:
# {"feature": "Bar", "instances": 7, "metric_value": 0.2286, "depth": 9}
if obj[5]<=0.0:
# {"feature": "Direction_same", "instances": 5, "metric_value": 0.32, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
elif obj[5]>0.0:
return 'False'
else: return 'False'
elif obj[1]>2:
# {"feature": "Bar", "instances": 5, "metric_value": 0.48, "depth": 9}
if obj[5]<=0.0:
# {"feature": "Direction_same", "instances": 5, "metric_value": 0.48, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
else: return 'True'
elif obj[7]>1.0:
# {"feature": "Time", "instances": 4, "metric_value": 0.0, "depth": 8}
if obj[1]<=3:
return 'True'
elif obj[1]>3:
return 'False'
else: return 'False'
else: return 'True'
else: return 'False'
else: return 'True'
else: return 'False'
else: return 'True'
else: return 'True'
elif obj[2]<=1:
# {"feature": "Bar", "instances": 2281, "metric_value": 0.4567, "depth": 2}
if obj[5]<=1.0:
# {"feature": "Occupation", "instances": 1601, "metric_value": 0.4436, "depth": 3}
if obj[4]>1.887387522319548:
# {"feature": "Education", "instances": 1333, "metric_value": 0.4585, "depth": 4}
if obj[3]>0:
# {"feature": "Time", "instances": 882, "metric_value": 0.438, "depth": 5}
if obj[1]>0:
# {"feature": "Coffeehouse", "instances": 613, "metric_value": 0.4124, "depth": 6}
if obj[6]<=3.0:
# {"feature": "Direction_same", "instances": 574, "metric_value": 0.4244, "depth": 7}
if obj[8]<=0:
# {"feature": "Restaurant20to50", "instances": 515, "metric_value": 0.4338, "depth": 8}
if obj[7]<=1.0:
# {"feature": "Passanger", "instances": 361, "metric_value": 0.4108, "depth": 9}
if obj[0]<=2:
# {"feature": "Distance", "instances": 303, "metric_value": 0.3955, "depth": 10}
if obj[9]<=2:
return 'False'
elif obj[9]>2:
return 'False'
else: return 'False'
elif obj[0]>2:
# {"feature": "Distance", "instances": 58, "metric_value": 0.4786, "depth": 10}
if obj[9]>1:
return 'False'
elif obj[9]<=1:
return 'False'
else: return 'False'
else: return 'False'
elif obj[7]>1.0:
# {"feature": "Distance", "instances": 154, "metric_value": 0.465, "depth": 9}
if obj[9]>1:
# {"feature": "Passanger", "instances": 108, "metric_value": 0.447, "depth": 10}
if obj[0]<=2:
return 'False'
elif obj[0]>2:
return 'False'
else: return 'False'
elif obj[9]<=1:
# {"feature": "Passanger", "instances": 46, "metric_value": 0.49, "depth": 10}
if obj[0]<=1:
return 'True'
elif obj[0]>1:
return 'False'
else: return 'False'
else: return 'True'
else: return 'False'
elif obj[8]>0:
# {"feature": "Restaurant20to50", "instances": 59, "metric_value": 0.2805, "depth": 8}
if obj[7]<=3.0:
# {"feature": "Passanger", "instances": 58, "metric_value": 0.2819, "depth": 9}
if obj[0]<=1:
# {"feature": "Distance", "instances": 51, "metric_value": 0.263, "depth": 10}
if obj[9]>1:
return 'False'
elif obj[9]<=1:
return 'False'
else: return 'False'
elif obj[0]>1:
# {"feature": "Distance", "instances": 7, "metric_value": 0.4082, "depth": 10}
if obj[9]<=2:
return 'False'
else: return 'False'
else: return 'False'
elif obj[7]>3.0:
return 'True'
else: return 'True'
else: return 'False'
elif obj[6]>3.0:
# {"feature": "Passanger", "instances": 39, "metric_value": 0.148, "depth": 7}
if obj[0]<=2:
# {"feature": "Distance", "instances": 35, "metric_value": 0.1048, "depth": 8}
if obj[9]<=2:
# {"feature": "Direction_same", "instances": 24, "metric_value": 0.15, "depth": 9}
if obj[8]<=0:
# {"feature": "Restaurant20to50", "instances": 20, "metric_value": 0.1765, "depth": 10}
if obj[7]<=2.0:
return 'False'
elif obj[7]>2.0:
return 'False'
else: return 'False'
elif obj[8]>0:
return 'False'
else: return 'False'
elif obj[9]>2:
return 'False'
else: return 'False'
elif obj[0]>2:
# {"feature": "Restaurant20to50", "instances": 4, "metric_value": 0.3333, "depth": 8}
if obj[7]<=1.0:
# {"feature": "Direction_same", "instances": 3, "metric_value": 0.4444, "depth": 9}
if obj[8]<=0:
# {"feature": "Distance", "instances": 3, "metric_value": 0.4444, "depth": 10}
if obj[9]<=2:
return 'True'
else: return 'True'
else: return 'True'
elif obj[7]>1.0:
return 'False'
else: return 'False'
else: return 'False'
else: return 'False'
elif obj[1]<=0:
# {"feature": "Restaurant20to50", "instances": 269, "metric_value": 0.4746, "depth": 6}
if obj[7]<=1.0:
# {"feature": "Coffeehouse", "instances": 193, "metric_value": 0.4579, "depth": 7}
if obj[6]>-1.0:
# {"feature": "Distance", "instances": 188, "metric_value": 0.4641, "depth": 8}
if obj[9]<=2:
# {"feature": "Direction_same", "instances": 166, "metric_value": 0.4761, "depth": 9}
if obj[8]<=0:
# {"feature": "Passanger", "instances": 86, "metric_value": 0.4493, "depth": 10}
if obj[0]>0:
return 'False'
elif obj[0]<=0:
return 'False'
else: return 'False'
elif obj[8]>0:
# {"feature": "Passanger", "instances": 80, "metric_value": 0.4916, "depth": 10}
if obj[0]<=1:
return 'False'
elif obj[0]>1:
return 'True'
else: return 'True'
else: return 'False'
elif obj[9]>2:
# {"feature": "Passanger", "instances": 22, "metric_value": 0.2944, "depth": 9}
if obj[0]<=1:
# {"feature": "Direction_same", "instances": 21, "metric_value": 0.3084, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
elif obj[0]>1:
return 'True'
else: return 'True'
else: return 'False'
elif obj[6]<=-1.0:
return 'False'
else: return 'False'
elif obj[7]>1.0:
# {"feature": "Passanger", "instances": 76, "metric_value": 0.4869, "depth": 7}
if obj[0]<=1:
# {"feature": "Distance", "instances": 58, "metric_value": 0.4701, "depth": 8}
if obj[9]<=2:
# {"feature": "Coffeehouse", "instances": 49, "metric_value": 0.4592, "depth": 9}
if obj[6]<=1.0:
# {"feature": "Direction_same", "instances": 28, "metric_value": 0.4955, "depth": 10}
if obj[8]>0:
return 'True'
elif obj[8]<=0:
return 'True'
else: return 'True'
elif obj[6]>1.0:
# {"feature": "Direction_same", "instances": 21, "metric_value": 0.4021, "depth": 10}
if obj[8]>0:
return 'True'
elif obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[9]>2:
# {"feature": "Coffeehouse", "instances": 9, "metric_value": 0.2667, "depth": 9}
if obj[6]<=1.0:
# {"feature": "Direction_same", "instances": 5, "metric_value": 0.48, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[6]>1.0:
return 'False'
else: return 'False'
else: return 'False'
elif obj[0]>1:
# {"feature": "Distance", "instances": 18, "metric_value": 0.4148, "depth": 8}
if obj[9]>1:
# {"feature": "Coffeehouse", "instances": 15, "metric_value": 0.3905, "depth": 9}
if obj[6]>1.0:
# {"feature": "Direction_same", "instances": 8, "metric_value": 0.3333, "depth": 10}
if obj[8]<=0:
return 'False'
elif obj[8]>0:
return 'False'
else: return 'False'
elif obj[6]<=1.0:
# {"feature": "Direction_same", "instances": 7, "metric_value": 0.3714, "depth": 10}
if obj[8]<=0:
return 'True'
elif obj[8]>0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[9]<=1:
return 'False'
else: return 'False'
else: return 'False'
else: return 'True'
else: return 'False'
elif obj[3]<=0:
# {"feature": "Restaurant20to50", "instances": 451, "metric_value": 0.4786, "depth": 5}
if obj[7]<=2.0:
# {"feature": "Coffeehouse", "instances": 425, "metric_value": 0.4768, "depth": 6}
if obj[6]>-1.0:
# {"feature": "Time", "instances": 422, "metric_value": 0.4766, "depth": 7}
if obj[1]<=3:
# {"feature": "Passanger", "instances": 342, "metric_value": 0.4842, "depth": 8}
if obj[0]>0:
# {"feature": "Distance", "instances": 309, "metric_value": 0.4823, "depth": 9}
if obj[9]>1:
# {"feature": "Direction_same", "instances": 227, "metric_value": 0.4867, "depth": 10}
if obj[8]<=0:
return 'False'
elif obj[8]>0:
return 'False'
else: return 'False'
elif obj[9]<=1:
# {"feature": "Direction_same", "instances": 82, "metric_value": 0.47, "depth": 10}
if obj[8]>0:
return 'False'
elif obj[8]<=0:
return 'False'
else: return 'False'
else: return 'False'
elif obj[0]<=0:
# {"feature": "Distance", "instances": 33, "metric_value": 0.4481, "depth": 9}
if obj[9]>1:
# {"feature": "Direction_same", "instances": 21, "metric_value": 0.4898, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
elif obj[9]<=1:
# {"feature": "Direction_same", "instances": 12, "metric_value": 0.375, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
else: return 'True'
elif obj[1]>3:
# {"feature": "Passanger", "instances": 80, "metric_value": 0.4119, "depth": 8}
if obj[0]>0:
# {"feature": "Distance", "instances": 53, "metric_value": 0.3645, "depth": 9}
if obj[9]<=1:
# {"feature": "Direction_same", "instances": 31, "metric_value": 0.4121, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
elif obj[9]>1:
# {"feature": "Direction_same", "instances": 22, "metric_value": 0.2975, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
else: return 'False'
elif obj[0]<=0:
# {"feature": "Distance", "instances": 27, "metric_value": 0.4921, "depth": 9}
if obj[9]<=1:
# {"feature": "Direction_same", "instances": 21, "metric_value": 0.4898, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
elif obj[9]>1:
# {"feature": "Direction_same", "instances": 6, "metric_value": 0.5, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
else: return 'False'
else: return 'False'
else: return 'False'
elif obj[6]<=-1.0:
return 'True'
else: return 'True'
elif obj[7]>2.0:
# {"feature": "Passanger", "instances": 26, "metric_value": 0.4141, "depth": 6}
if obj[0]<=2:
# {"feature": "Time", "instances": 20, "metric_value": 0.44, "depth": 7}
if obj[1]>0:
# {"feature": "Direction_same", "instances": 15, "metric_value": 0.3909, "depth": 8}
if obj[8]<=0:
# {"feature": "Coffeehouse", "instances": 11, "metric_value": 0.2909, "depth": 9}
if obj[6]<=2.0:
# {"feature": "Distance", "instances": 10, "metric_value": 0.3, "depth": 10}
if obj[9]<=2:
return 'True'
elif obj[9]>2:
return 'True'
else: return 'True'
elif obj[6]>2.0:
return 'False'
else: return 'False'
elif obj[8]>0:
# {"feature": "Distance", "instances": 4, "metric_value": 0.0, "depth": 9}
if obj[9]>1:
return 'False'
elif obj[9]<=1:
return 'True'
else: return 'True'
else: return 'False'
elif obj[1]<=0:
# {"feature": "Distance", "instances": 5, "metric_value": 0.0, "depth": 8}
if obj[9]<=2:
return 'True'
elif obj[9]>2:
return 'False'
else: return 'False'
else: return 'True'
elif obj[0]>2:
# {"feature": "Coffeehouse", "instances": 6, "metric_value": 0.2222, "depth": 7}
if obj[6]<=1.0:
# {"feature": "Time", "instances": 3, "metric_value": 0.0, "depth": 8}
if obj[1]<=2:
return 'True'
elif obj[1]>2:
return 'False'
else: return 'False'
elif obj[6]>1.0:
return 'True'
else: return 'True'
else: return 'True'
else: return 'True'
else: return 'False'
elif obj[4]<=1.887387522319548:
# {"feature": "Education", "instances": 268, "metric_value": 0.3409, "depth": 4}
if obj[3]<=3:
# {"feature": "Restaurant20to50", "instances": 250, "metric_value": 0.3173, "depth": 5}
if obj[7]>0.0:
# {"feature": "Coffeehouse", "instances": 204, "metric_value": 0.3657, "depth": 6}
if obj[6]<=1.0:
# {"feature": "Passanger", "instances": 121, "metric_value": 0.3252, "depth": 7}
if obj[0]<=2:
# {"feature": "Time", "instances": 100, "metric_value": 0.3062, "depth": 8}
if obj[1]>0:
# {"feature": "Direction_same", "instances": 70, "metric_value": 0.2832, "depth": 9}
if obj[8]<=0:
# {"feature": "Distance", "instances": 56, "metric_value": 0.2616, "depth": 10}
if obj[9]>1:
return 'False'
elif obj[9]<=1:
return 'False'
else: return 'False'
elif obj[8]>0:
# {"feature": "Distance", "instances": 14, "metric_value": 0.2449, "depth": 10}
if obj[9]>1:
return 'False'
elif obj[9]<=1:
return 'False'
else: return 'False'
else: return 'False'
elif obj[1]<=0:
# {"feature": "Distance", "instances": 30, "metric_value": 0.35, "depth": 9}
if obj[9]<=2:
# {"feature": "Direction_same", "instances": 28, "metric_value": 0.3743, "depth": 10}
if obj[8]>0:
return 'False'
elif obj[8]<=0:
return 'False'
else: return 'False'
elif obj[9]>2:
return 'False'
else: return 'False'
else: return 'False'
elif obj[0]>2:
# {"feature": "Time", "instances": 21, "metric_value": 0.3714, "depth": 8}
if obj[1]>2:
# {"feature": "Distance", "instances": 15, "metric_value": 0.3143, "depth": 9}
if obj[9]>1:
# {"feature": "Direction_same", "instances": 14, "metric_value": 0.3367, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
elif obj[9]<=1:
return 'False'
else: return 'False'
elif obj[1]<=2:
# {"feature": "Direction_same", "instances": 6, "metric_value": 0.5, "depth": 9}
if obj[8]<=0:
# {"feature": "Distance", "instances": 6, "metric_value": 0.5, "depth": 10}
if obj[9]<=2:
return 'True'
else: return 'True'
else: return 'True'
else: return 'True'
else: return 'False'
elif obj[6]>1.0:
# {"feature": "Distance", "instances": 83, "metric_value": 0.4109, "depth": 7}
if obj[9]<=2:
# {"feature": "Passanger", "instances": 65, "metric_value": 0.4364, "depth": 8}
if obj[0]>0:
# {"feature": "Time", "instances": 60, "metric_value": 0.4303, "depth": 9}
if obj[1]<=3:
# {"feature": "Direction_same", "instances": 55, "metric_value": 0.4397, "depth": 10}
if obj[8]<=0:
return 'False'
elif obj[8]>0:
return 'False'
else: return 'False'
elif obj[1]>3:
# {"feature": "Direction_same", "instances": 5, "metric_value": 0.32, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
else: return 'False'
elif obj[0]<=0:
# {"feature": "Time", "instances": 5, "metric_value": 0.4667, "depth": 9}
if obj[1]<=0:
# {"feature": "Direction_same", "instances": 3, "metric_value": 0.4444, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[1]>0:
# {"feature": "Direction_same", "instances": 2, "metric_value": 0.5, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
else: return 'True'
elif obj[9]>2:
# {"feature": "Passanger", "instances": 18, "metric_value": 0.1961, "depth": 8}
if obj[0]<=1:
# {"feature": "Time", "instances": 17, "metric_value": 0.1991, "depth": 9}
if obj[1]>0:
# {"feature": "Direction_same", "instances": 13, "metric_value": 0.2604, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
elif obj[1]<=0:
return 'False'
else: return 'False'
elif obj[0]>1:
return 'True'
else: return 'True'
else: return 'False'
else: return 'False'
elif obj[7]<=0.0:
# {"feature": "Coffeehouse", "instances": 46, "metric_value": 0.0425, "depth": 6}
if obj[6]>-1.0:
# {"feature": "Passanger", "instances": 45, "metric_value": 0.0356, "depth": 7}
if obj[0]<=2:
return 'False'
elif obj[0]>2:
# {"feature": "Time", "instances": 5, "metric_value": 0.2, "depth": 8}
if obj[1]>2:
return 'False'
elif obj[1]<=2:
# {"feature": "Direction_same", "instances": 2, "metric_value": 0.5, "depth": 9}
if obj[8]<=0:
# {"feature": "Distance", "instances": 2, "metric_value": 0.5, "depth": 10}
if obj[9]<=2:
return 'False'
else: return 'False'
else: return 'False'
else: return 'False'
else: return 'False'
elif obj[6]<=-1.0:
return 'True'
else: return 'True'
else: return 'False'
elif obj[3]>3:
# {"feature": "Coffeehouse", "instances": 18, "metric_value": 0.4, "depth": 5}
if obj[6]<=1.0:
# {"feature": "Distance", "instances": 15, "metric_value": 0.3692, "depth": 6}
if obj[9]<=2:
# {"feature": "Passanger", "instances": 13, "metric_value": 0.3462, "depth": 7}
if obj[0]>0:
# {"feature": "Direction_same", "instances": 12, "metric_value": 0.3333, "depth": 8}
if obj[8]<=0:
# {"feature": "Time", "instances": 9, "metric_value": 0.381, "depth": 9}
if obj[1]<=3:
# {"feature": "Restaurant20to50", "instances": 7, "metric_value": 0.4857, "depth": 10}
if obj[7]<=0.0:
return 'False'
elif obj[7]>0.0:
return 'False'
else: return 'False'
elif obj[1]>3:
return 'False'
else: return 'False'
elif obj[8]>0:
return 'False'
else: return 'False'
elif obj[0]<=0:
return 'True'
else: return 'True'
elif obj[9]>2:
return 'True'
else: return 'True'
elif obj[6]>1.0:
return 'True'
else: return 'True'
else: return 'True'
else: return 'False'
elif obj[5]>1.0:
# {"feature": "Restaurant20to50", "instances": 680, "metric_value": 0.4641, "depth": 3}
if obj[7]<=1.0:
# {"feature": "Time", "instances": 365, "metric_value": 0.4856, "depth": 4}
if obj[1]>0:
# {"feature": "Passanger", "instances": 267, "metric_value": 0.4792, "depth": 5}
if obj[0]<=2:
# {"feature": "Occupation", "instances": 207, "metric_value": 0.4675, "depth": 6}
if obj[4]<=14.155999220544217:
# {"feature": "Distance", "instances": 174, "metric_value": 0.4853, "depth": 7}
if obj[9]<=2:
# {"feature": "Coffeehouse", "instances": 128, "metric_value": 0.483, "depth": 8}
if obj[6]>-1.0:
# {"feature": "Education", "instances": 125, "metric_value": 0.4898, "depth": 9}
if obj[3]<=3:
# {"feature": "Direction_same", "instances": 119, "metric_value": 0.4906, "depth": 10}
if obj[8]<=0:
return 'False'
elif obj[8]>0:
return 'False'
else: return 'False'
elif obj[3]>3:
# {"feature": "Direction_same", "instances": 6, "metric_value": 0.4444, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[6]<=-1.0:
return 'False'
else: return 'False'
elif obj[9]>2:
# {"feature": "Coffeehouse", "instances": 46, "metric_value": 0.4536, "depth": 8}
if obj[6]<=3.0:
# {"feature": "Education", "instances": 40, "metric_value": 0.4677, "depth": 9}
if obj[3]>0:
# {"feature": "Direction_same", "instances": 29, "metric_value": 0.4946, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[3]<=0:
# {"feature": "Direction_same", "instances": 11, "metric_value": 0.3967, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[6]>3.0:
# {"feature": "Education", "instances": 6, "metric_value": 0.2222, "depth": 9}
if obj[3]>0:
return 'True'
elif obj[3]<=0:
# {"feature": "Direction_same", "instances": 3, "metric_value": 0.4444, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
else: return 'True'
else: return 'True'
elif obj[4]>14.155999220544217:
# {"feature": "Coffeehouse", "instances": 33, "metric_value": 0.2857, "depth": 7}
if obj[6]<=3.0:
# {"feature": "Distance", "instances": 28, "metric_value": 0.3222, "depth": 8}
if obj[9]>1:
# {"feature": "Education", "instances": 18, "metric_value": 0.3571, "depth": 9}
if obj[3]<=2:
# {"feature": "Direction_same", "instances": 14, "metric_value": 0.3956, "depth": 10}
if obj[8]<=0:
return 'False'
elif obj[8]>0:
return 'True'
else: return 'True'
elif obj[3]>2:
return 'False'
else: return 'False'
elif obj[9]<=1:
# {"feature": "Education", "instances": 10, "metric_value": 0.1, "depth": 9}
if obj[3]<=2:
return 'False'
elif obj[3]>2:
# {"feature": "Direction_same", "instances": 2, "metric_value": 0.5, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
else: return 'False'
elif obj[6]>3.0:
return 'False'
else: return 'False'
else: return 'False'
elif obj[0]>2:
# {"feature": "Occupation", "instances": 60, "metric_value": 0.4169, "depth": 6}
if obj[4]>0:
# {"feature": "Coffeehouse", "instances": 59, "metric_value": 0.3999, "depth": 7}
if obj[6]<=2.0:
# {"feature": "Education", "instances": 43, "metric_value": 0.4543, "depth": 8}
if obj[3]<=2:
# {"feature": "Distance", "instances": 40, "metric_value": 0.4524, "depth": 9}
if obj[9]>1:
# {"feature": "Direction_same", "instances": 33, "metric_value": 0.4444, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[9]<=1:
# {"feature": "Direction_same", "instances": 7, "metric_value": 0.4898, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[3]>2:
# {"feature": "Direction_same", "instances": 3, "metric_value": 0.4444, "depth": 9}
if obj[8]<=0:
# {"feature": "Distance", "instances": 3, "metric_value": 0.4444, "depth": 10}
if obj[9]<=2:
return 'False'
else: return 'False'
else: return 'False'
else: return 'False'
elif obj[6]>2.0:
# {"feature": "Education", "instances": 16, "metric_value": 0.1786, "depth": 8}
if obj[3]<=2:
# {"feature": "Distance", "instances": 14, "metric_value": 0.131, "depth": 9}
if obj[9]>1:
# {"feature": "Direction_same", "instances": 12, "metric_value": 0.1528, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[9]<=1:
return 'True'
else: return 'True'
elif obj[3]>2:
# {"feature": "Direction_same", "instances": 2, "metric_value": 0.5, "depth": 9}
if obj[8]<=0:
# {"feature": "Distance", "instances": 2, "metric_value": 0.5, "depth": 10}
if obj[9]<=2:
return 'False'
else: return 'False'
else: return 'False'
else: return 'False'
else: return 'True'
elif obj[4]<=0:
return 'False'
else: return 'False'
else: return 'True'
elif obj[1]<=0:
# {"feature": "Passanger", "instances": 98, "metric_value": 0.4319, "depth": 5}
if obj[0]<=1:
# {"feature": "Distance", "instances": 90, "metric_value": 0.4178, "depth": 6}
if obj[9]<=1:
# {"feature": "Occupation", "instances": 46, "metric_value": 0.3188, "depth": 7}
if obj[4]>3:
# {"feature": "Coffeehouse", "instances": 33, "metric_value": 0.4167, "depth": 8}
if obj[6]<=2.0:
# {"feature": "Education", "instances": 25, "metric_value": 0.4762, "depth": 9}
if obj[3]<=2:
# {"feature": "Direction_same", "instances": 21, "metric_value": 0.4717, "depth": 10}
if obj[8]<=1:
return 'True'
else: return 'True'
elif obj[3]>2:
# {"feature": "Direction_same", "instances": 4, "metric_value": 0.5, "depth": 10}
if obj[8]<=1:
return 'False'
else: return 'False'
else: return 'False'
elif obj[6]>2.0:
# {"feature": "Education", "instances": 8, "metric_value": 0.125, "depth": 9}
if obj[3]<=2:
return 'True'
elif obj[3]>2:
# {"feature": "Direction_same", "instances": 2, "metric_value": 0.5, "depth": 10}
if obj[8]<=1:
return 'False'
else: return 'False'
else: return 'False'
else: return 'True'
elif obj[4]<=3:
return 'True'
else: return 'True'
elif obj[9]>1:
# {"feature": "Occupation", "instances": 44, "metric_value": 0.4325, "depth": 7}
if obj[4]>4:
# {"feature": "Education", "instances": 33, "metric_value": 0.3866, "depth": 8}
if obj[3]>0:
# {"feature": "Coffeehouse", "instances": 23, "metric_value": 0.4551, "depth": 9}
if obj[6]<=2.0:
# {"feature": "Direction_same", "instances": 15, "metric_value": 0.4978, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[6]>2.0:
# {"feature": "Direction_same", "instances": 8, "metric_value": 0.375, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[3]<=0:
# {"feature": "Direction_same", "instances": 10, "metric_value": 0.0, "depth": 9}
if obj[8]<=0:
return 'True'
elif obj[8]>0:
return 'False'
else: return 'False'
else: return 'True'
elif obj[4]<=4:
# {"feature": "Coffeehouse", "instances": 11, "metric_value": 0.3697, "depth": 8}
if obj[6]>1.0:
# {"feature": "Education", "instances": 6, "metric_value": 0.1667, "depth": 9}
if obj[3]>0:
return 'False'
elif obj[3]<=0:
# {"feature": "Direction_same", "instances": 2, "metric_value": 0.0, "depth": 10}
if obj[8]<=0:
return 'False'
elif obj[8]>0:
return 'True'
else: return 'True'
else: return 'False'
elif obj[6]<=1.0:
# {"feature": "Education", "instances": 5, "metric_value": 0.4, "depth": 9}
if obj[3]<=0:
# {"feature": "Direction_same", "instances": 4, "metric_value": 0.5, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[3]>0:
return 'True'
else: return 'True'
else: return 'True'
else: return 'False'
else: return 'True'
elif obj[0]>1:
# {"feature": "Occupation", "instances": 8, "metric_value": 0.3, "depth": 6}
if obj[4]<=6:
# {"feature": "Distance", "instances": 5, "metric_value": 0.3, "depth": 7}
if obj[9]>1:
# {"feature": "Coffeehouse", "instances": 4, "metric_value": 0.25, "depth": 8}
if obj[6]<=2.0:
return 'True'
elif obj[6]>2.0:
# {"feature": "Education", "instances": 2, "metric_value": 0.5, "depth": 9}
if obj[3]<=2:
# {"feature": "Direction_same", "instances": 2, "metric_value": 0.5, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
else: return 'False'
else: return 'False'
elif obj[9]<=1:
return 'False'
else: return 'False'
elif obj[4]>6:
return 'False'
else: return 'False'
else: return 'False'
else: return 'True'
elif obj[7]>1.0:
# {"feature": "Education", "instances": 315, "metric_value": 0.417, "depth": 4}
if obj[3]>1:
# {"feature": "Time", "instances": 197, "metric_value": 0.451, "depth": 5}
if obj[1]>0:
# {"feature": "Passanger", "instances": 150, "metric_value": 0.4737, "depth": 6}
if obj[0]<=2:
# {"feature": "Coffeehouse", "instances": 119, "metric_value": 0.462, "depth": 7}
if obj[6]<=3.0:
# {"feature": "Occupation", "instances": 94, "metric_value": 0.4693, "depth": 8}
if obj[4]<=17:
# {"feature": "Distance", "instances": 82, "metric_value": 0.4883, "depth": 9}
if obj[9]>1:
# {"feature": "Direction_same", "instances": 49, "metric_value": 0.4624, "depth": 10}
if obj[8]<=0:
return 'False'
elif obj[8]>0:
return 'True'
else: return 'True'
elif obj[9]<=1:
# {"feature": "Direction_same", "instances": 33, "metric_value": 0.4953, "depth": 10}
if obj[8]<=0:
return 'True'
elif obj[8]>0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[4]>17:
# {"feature": "Distance", "instances": 12, "metric_value": 0.2333, "depth": 9}
if obj[9]>1:
# {"feature": "Direction_same", "instances": 10, "metric_value": 0.175, "depth": 10}
if obj[8]<=0:
return 'True'
elif obj[8]>0:
return 'True'
else: return 'True'
elif obj[9]<=1:
# {"feature": "Direction_same", "instances": 2, "metric_value": 0.5, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
else: return 'True'
else: return 'True'
elif obj[6]>3.0:
# {"feature": "Direction_same", "instances": 25, "metric_value": 0.2087, "depth": 8}
if obj[8]<=0:
# {"feature": "Occupation", "instances": 23, "metric_value": 0.2008, "depth": 9}
if obj[4]<=12:
# {"feature": "Distance", "instances": 21, "metric_value": 0.1655, "depth": 10}
if obj[9]>1:
return 'True'
elif obj[9]<=1:
return 'True'
else: return 'True'
elif obj[4]>12:
# {"feature": "Distance", "instances": 2, "metric_value": 0.5, "depth": 10}
if obj[9]<=1:
return 'True'
else: return 'True'
else: return 'True'
elif obj[8]>0:
return 'False'
else: return 'False'
else: return 'True'
elif obj[0]>2:
# {"feature": "Coffeehouse", "instances": 31, "metric_value": 0.2184, "depth": 7}
if obj[6]<=3.0:
# {"feature": "Occupation", "instances": 26, "metric_value": 0.1918, "depth": 8}
if obj[4]<=17:
# {"feature": "Distance", "instances": 23, "metric_value": 0.1556, "depth": 9}
if obj[9]>1:
# {"feature": "Direction_same", "instances": 19, "metric_value": 0.1884, "depth": 10}
if obj[8]<=0:
return 'True'
else: return 'True'
elif obj[9]<=1:
return 'True'
else: return 'True'
elif obj[4]>17:
# {"feature": "Direction_same", "instances": 3, "metric_value": 0.4444, "depth": 9}
if obj[8]<=0:
# {"feature": "Distance", "instances": 3, "metric_value": 0.4444, "depth": 10}
if obj[9]<=2:
return 'False'
else: return 'False'
else: return 'False'
else: return 'False'
elif obj[6]>3.0:
return 'False'
else: return 'False'
else: return 'True'
elif obj[1]<=0:
# {"feature": "Direction_same", "instances": 47, "metric_value": 0.3225, "depth": 6}
if obj[8]<=0:
# {"feature": "Coffeehouse", "instances": 25, "metric_value": 0.426, "depth": 7}
if obj[6]>1.0:
# {"feature": "Passanger", "instances": 18, "metric_value": 0.3519, "depth": 8}
if obj[0]>0:
# {"feature": "Occupation", "instances": 12, "metric_value": 0.2381, "depth": 9}
if obj[4]<=7:
# {"feature": "Distance", "instances": 7, "metric_value": 0.4082, "depth": 10}
if obj[9]<=2:
return 'True'
else: return 'True'
elif obj[4]>7:
return 'True'
else: return 'True'
elif obj[0]<=0:
# {"feature": "Occupation", "instances": 6, "metric_value": 0.4, "depth": 9}
if obj[4]<=12:
# {"feature": "Distance", "instances": 5, "metric_value": 0.48, "depth": 10}
if obj[9]<=2:
return 'True'
else: return 'True'
elif obj[4]>12:
return 'False'
else: return 'False'
else: return 'False'
elif obj[6]<=1.0:
# {"feature": "Passanger", "instances": 7, "metric_value": 0.2286, "depth": 8}
if obj[0]>0:
# {"feature": "Occupation", "instances": 5, "metric_value": 0.2, "depth": 9}
if obj[4]<=9:
return 'False'
elif obj[4]>9:
# {"feature": "Distance", "instances": 2, "metric_value": 0.5, "depth": 10}
if obj[9]<=2:
return 'True'
else: return 'True'
else: return 'True'
elif obj[0]<=0:
return 'True'
else: return 'True'
else: return 'False'
elif obj[8]>0:
# {"feature": "Occupation", "instances": 22, "metric_value": 0.0909, "depth": 7}
if obj[4]<=16:
return 'True'
elif obj[4]>16:
# {"feature": "Coffeehouse", "instances": 4, "metric_value": 0.3333, "depth": 8}
if obj[6]>0.0:
# {"feature": "Passanger", "instances": 3, "metric_value": 0.4444, "depth": 9}
if obj[0]<=1:
# {"feature": "Distance", "instances": 3, "metric_value": 0.4444, "depth": 10}
if obj[9]<=1:
return 'False'
else: return 'False'
else: return 'False'
elif obj[6]<=0.0:
return 'True'
else: return 'True'
else: return 'False'
else: return 'True'
else: return 'True'
elif obj[3]<=1:
# {"feature": "Occupation", "instances": 118, "metric_value": 0.3338, "depth": 5}
if obj[4]>7:
# {"feature": "Time", "instances": 64, "metric_value": 0.2462, "depth": 6}
if obj[1]<=2:
# {"feature": "Coffeehouse", "instances": 38, "metric_value": 0.1373, "depth": 7}
if obj[6]<=2.0:
# {"feature": "Direction_same", "instances": 23, "metric_value": 0.1978, "depth": 8}
if obj[8]<=0:
# {"feature": "Distance", "instances": 17, "metric_value": 0.1078, "depth": 9}
if obj[9]<=2:
# {"feature": "Passanger", "instances": 12, "metric_value": 0.15, "depth": 10}
if obj[0]>0:
return 'True'
elif obj[0]<=0:
return 'True'
else: return 'True'
elif obj[9]>2:
return 'True'
else: return 'True'
elif obj[8]>0:
# {"feature": "Passanger", "instances": 6, "metric_value": 0.4444, "depth": 9}
if obj[0]<=1:
# {"feature": "Distance", "instances": 6, "metric_value": 0.4444, "depth": 10}
if obj[9]<=1:
return 'True'
else: return 'True'
else: return 'True'
else: return 'True'
elif obj[6]>2.0:
return 'True'
else: return 'True'
elif obj[1]>2:
# {"feature": "Passanger", "instances": 26, "metric_value": 0.3401, "depth": 7}
if obj[0]<=2:
# {"feature": "Direction_same", "instances": 19, "metric_value": 0.4145, "depth": 8}
if obj[8]<=0:
# {"feature": "Distance", "instances": 16, "metric_value": 0.4667, "depth": 9}
if obj[9]<=2:
# {"feature": "Coffeehouse", "instances": 15, "metric_value": 0.4636, "depth": 10}
if obj[6]>0.0:
return 'False'
elif obj[6]<=0.0:
return 'True'
else: return 'True'
elif obj[9]>2:
return 'True'
else: return 'True'
elif obj[8]>0:
return 'True'
else: return 'True'
elif obj[0]>2:
return 'True'
else: return 'True'
else: return 'True'
elif obj[4]<=7:
# {"feature": "Coffeehouse", "instances": 54, "metric_value": 0.3991, "depth": 6}
if obj[6]>0.0:
# {"feature": "Distance", "instances": 49, "metric_value": 0.4314, "depth": 7}
if obj[9]<=2:
# {"feature": "Direction_same", "instances": 43, "metric_value": 0.4197, "depth": 8}
if obj[8]<=0:
# {"feature": "Passanger", "instances": 31, "metric_value": 0.4334, "depth": 9}
if obj[0]<=2:
# {"feature": "Time", "instances": 23, "metric_value": 0.4503, "depth": 10}
if obj[1]<=3:
return 'True'
elif obj[1]>3:
return 'True'
else: return 'True'
elif obj[0]>2:
# {"feature": "Time", "instances": 8, "metric_value": 0.3571, "depth": 10}
if obj[1]<=3:
return 'True'
elif obj[1]>3:
return 'True'
else: return 'True'
else: return 'True'
elif obj[8]>0:
# {"feature": "Time", "instances": 12, "metric_value": 0.3636, "depth": 9}
if obj[1]<=1:
# {"feature": "Passanger", "instances": 11, "metric_value": 0.3967, "depth": 10}
if obj[0]<=1:
return 'True'
else: return 'True'
elif obj[1]>1:
return 'True'
else: return 'True'
else: return 'True'
elif obj[9]>2:
# {"feature": "Passanger", "instances": 6, "metric_value": 0.4, "depth": 8}
if obj[0]>0:
# {"feature": "Time", "instances": 5, "metric_value": 0.48, "depth": 9}
if obj[1]<=1:
# {"feature": "Direction_same", "instances": 5, "metric_value": 0.48, "depth": 10}
if obj[8]<=0:
return 'False'
else: return 'False'
else: return 'False'
elif obj[0]<=0:
return 'True'
else: return 'True'
else: return 'True'
elif obj[6]<=0.0:
return 'True'
else: return 'True'
else: return 'True'
else: return 'True'
else: return 'True'
else: return 'True'
else: return 'False'
|
def find_decision(obj):
if obj[2] > 1:
if obj[6] > 0.0:
if obj[9] <= 2:
if obj[0] <= 2:
if obj[1] <= 3:
if obj[5] <= 3.0:
if obj[8] <= 0:
if obj[4] > 0:
if obj[7] <= 3.0:
if obj[3] <= 4:
return 'True'
elif obj[3] > 4:
return 'True'
else:
return 'True'
elif obj[7] > 3.0:
if obj[3] > 0:
return 'True'
elif obj[3] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[4] <= 0:
if obj[3] <= 0:
return 'True'
elif obj[3] > 0:
if obj[7] <= 1.0:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[8] > 0:
if obj[4] > 0:
if obj[7] <= 2.0:
if obj[3] <= 2:
return 'True'
elif obj[3] > 2:
return 'True'
else:
return 'True'
elif obj[7] > 2.0:
if obj[3] <= 3:
return 'True'
elif obj[3] > 3:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[4] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[5] > 3.0:
if obj[4] <= 7:
if obj[3] <= 2:
if obj[7] > 0.0:
if obj[8] <= 0:
return 'True'
elif obj[8] > 0:
return 'True'
else:
return 'True'
elif obj[7] <= 0.0:
if obj[8] > 0:
return 'False'
elif obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'False'
elif obj[3] > 2:
if obj[8] <= 0:
if obj[7] <= 4.0:
return 'False'
else:
return 'False'
elif obj[8] > 0:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[4] > 7:
if obj[7] <= 3.0:
if obj[3] > 0:
return 'False'
elif obj[3] <= 0:
if obj[8] <= 0:
return 'False'
elif obj[8] > 0:
return 'True'
else:
return 'True'
else:
return 'False'
elif obj[7] > 3.0:
if obj[8] <= 0:
if obj[3] <= 0:
return 'True'
elif obj[3] > 0:
return 'False'
else:
return 'False'
elif obj[8] > 0:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[1] > 3:
if obj[3] > 0:
if obj[5] <= 1.0:
if obj[4] <= 13.096181893771217:
if obj[7] <= 2.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[7] > 2.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[4] > 13.096181893771217:
if obj[7] > 0.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[7] <= 0.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[5] > 1.0:
if obj[4] <= 19:
if obj[7] <= 3.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[7] > 3.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[4] > 19:
return 'False'
else:
return 'False'
else:
return 'True'
elif obj[3] <= 0:
if obj[5] <= 2.0:
if obj[4] > 2:
if obj[7] <= 2.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[7] > 2.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[4] <= 2:
if obj[7] > 0.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[7] <= 0.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[5] > 2.0:
if obj[4] > 4:
if obj[7] <= 1.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[7] > 1.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[4] <= 4:
return 'False'
else:
return 'False'
else:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[0] > 2:
if obj[5] <= 3.0:
if obj[3] <= 3:
if obj[4] <= 7.746388443017657:
if obj[7] <= 1.0:
if obj[1] <= 3:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[1] > 3:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[7] > 1.0:
if obj[1] > 0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[1] <= 0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[4] > 7.746388443017657:
if obj[7] > -1.0:
if obj[1] <= 3:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[1] > 3:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[7] <= -1.0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[3] > 3:
if obj[4] <= 12:
if obj[7] > 0.0:
if obj[1] > 0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[1] <= 0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[7] <= 0.0:
if obj[1] <= 2:
return 'True'
elif obj[1] > 2:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[4] > 12:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[5] > 3.0:
if obj[4] <= 12:
if obj[3] > 0:
if obj[7] > 0.0:
if obj[1] > 0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[1] <= 0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[7] <= 0.0:
return 'True'
else:
return 'True'
elif obj[3] <= 0:
if obj[1] <= 2:
if obj[7] > 0.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[7] <= 0.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[1] > 2:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[4] > 12:
if obj[1] > 0:
if obj[3] <= 0:
if obj[7] > 1.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[7] <= 1.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[3] > 0:
return 'False'
else:
return 'False'
elif obj[1] <= 0:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'True'
else:
return 'True'
elif obj[9] > 2:
if obj[0] > 0:
if obj[3] > 0:
if obj[1] > 0:
if obj[5] > -1.0:
if obj[7] <= 2.0:
if obj[4] > 0:
if obj[8] <= 0:
return 'False'
else:
return 'False'
elif obj[4] <= 0:
return 'False'
else:
return 'False'
elif obj[7] > 2.0:
if obj[4] <= 12:
if obj[8] <= 0:
return 'False'
else:
return 'False'
elif obj[4] > 12:
return 'True'
else:
return 'True'
else:
return 'False'
elif obj[5] <= -1.0:
return 'False'
else:
return 'False'
elif obj[1] <= 0:
if obj[4] <= 11:
if obj[5] <= 1.0:
if obj[7] > 0.0:
if obj[8] <= 0:
return 'False'
else:
return 'False'
elif obj[7] <= 0.0:
return 'True'
else:
return 'True'
elif obj[5] > 1.0:
if obj[7] > 0.0:
if obj[8] <= 0:
return 'False'
else:
return 'False'
elif obj[7] <= 0.0:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[4] > 11:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[3] <= 0:
if obj[7] <= 3.0:
if obj[1] > 0:
if obj[4] <= 22:
if obj[5] <= 3.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[5] > 3.0:
if obj[8] <= 0:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[4] > 22:
return 'False'
else:
return 'False'
elif obj[1] <= 0:
if obj[4] > 1:
if obj[5] <= 0.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[5] > 0.0:
if obj[8] <= 0:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[4] <= 1:
return 'True'
else:
return 'True'
else:
return 'False'
elif obj[7] > 3.0:
return 'False'
else:
return 'False'
else:
return 'True'
elif obj[0] <= 0:
if obj[7] <= 1.0:
return 'True'
elif obj[7] > 1.0:
if obj[5] > 1.0:
return 'True'
elif obj[5] <= 1.0:
return 'False'
else:
return 'False'
else:
return 'True'
else:
return 'True'
else:
return 'False'
elif obj[6] <= 0.0:
if obj[0] <= 1:
if obj[9] <= 1:
if obj[1] > 0:
if obj[5] <= 0.0:
if obj[8] > 0:
if obj[4] > 3:
if obj[3] <= 3:
if obj[7] > 0.0:
return 'True'
elif obj[7] <= 0.0:
return 'True'
else:
return 'True'
elif obj[3] > 3:
if obj[7] > 0.0:
return 'True'
elif obj[7] <= 0.0:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[4] <= 3:
if obj[7] <= 1.0:
if obj[3] <= 1:
return 'True'
elif obj[3] > 1:
return 'True'
else:
return 'True'
elif obj[7] > 1.0:
if obj[3] <= 0:
return 'True'
elif obj[3] > 0:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[8] <= 0:
if obj[3] > 0:
if obj[7] <= 1.0:
if obj[4] <= 6:
return 'True'
elif obj[4] > 6:
return 'True'
else:
return 'True'
elif obj[7] > 1.0:
return 'True'
else:
return 'True'
elif obj[3] <= 0:
if obj[4] > 4:
if obj[7] > 0.0:
return 'True'
elif obj[7] <= 0.0:
return 'True'
else:
return 'True'
elif obj[4] <= 4:
if obj[7] > 0.0:
return 'True'
elif obj[7] <= 0.0:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'True'
else:
return 'True'
elif obj[5] > 0.0:
if obj[4] <= 20:
if obj[3] > 1:
if obj[8] > 0:
if obj[7] <= 2.0:
return 'False'
elif obj[7] > 2.0:
return 'False'
else:
return 'False'
elif obj[8] <= 0:
if obj[7] > 0.0:
return 'True'
elif obj[7] <= 0.0:
return 'False'
else:
return 'False'
else:
return 'True'
elif obj[3] <= 1:
if obj[7] <= 1.0:
if obj[8] <= 0:
return 'True'
elif obj[8] > 0:
return 'False'
else:
return 'False'
elif obj[7] > 1.0:
if obj[8] > 0:
return 'True'
elif obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[4] > 20:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[1] <= 0:
if obj[4] <= 7.951351351351351:
if obj[3] <= 3:
if obj[5] > -1.0:
if obj[8] <= 0:
if obj[7] > 0.0:
return 'False'
elif obj[7] <= 0.0:
return 'False'
else:
return 'False'
elif obj[8] > 0:
if obj[7] <= 1.0:
return 'False'
elif obj[7] > 1.0:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[5] <= -1.0:
return 'True'
else:
return 'True'
elif obj[3] > 3:
if obj[7] <= 1.0:
if obj[8] <= 0:
if obj[5] > 0.0:
return 'True'
elif obj[5] <= 0.0:
return 'True'
else:
return 'True'
elif obj[8] > 0:
if obj[5] <= 0.0:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[7] > 1.0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[4] > 7.951351351351351:
if obj[8] <= 0:
if obj[3] > 0:
if obj[5] <= 3.0:
if obj[7] > 0.0:
return 'False'
elif obj[7] <= 0.0:
return 'False'
else:
return 'False'
elif obj[5] > 3.0:
return 'False'
else:
return 'False'
elif obj[3] <= 0:
if obj[7] <= 1.0:
if obj[5] <= 0.0:
return 'False'
elif obj[5] > 0.0:
return 'True'
else:
return 'True'
elif obj[7] > 1.0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[8] > 0:
if obj[5] <= 1.0:
if obj[7] <= 0.0:
if obj[3] > 0:
return 'True'
elif obj[3] <= 0:
return 'True'
else:
return 'True'
elif obj[7] > 0.0:
if obj[3] > 0:
return 'True'
elif obj[3] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[5] > 1.0:
if obj[3] <= 0:
if obj[7] > 1.0:
return 'True'
elif obj[7] <= 1.0:
return 'True'
else:
return 'True'
elif obj[3] > 0:
return 'False'
else:
return 'False'
else:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'False'
elif obj[9] > 1:
if obj[5] <= 1.0:
if obj[7] <= 1.0:
if obj[4] <= 6:
if obj[1] <= 3:
if obj[3] <= 3:
if obj[8] <= 0:
return 'False'
elif obj[8] > 0:
return 'False'
else:
return 'False'
elif obj[3] > 3:
if obj[8] <= 0:
return 'False'
elif obj[8] > 0:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[1] > 3:
if obj[3] <= 0:
if obj[8] <= 0:
return 'False'
else:
return 'False'
elif obj[3] > 0:
if obj[8] <= 0:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[4] > 6:
if obj[3] <= 3:
if obj[8] <= 0:
if obj[1] > 0:
return 'False'
elif obj[1] <= 0:
return 'False'
else:
return 'False'
elif obj[8] > 0:
if obj[1] > 0:
return 'False'
elif obj[1] <= 0:
return 'True'
else:
return 'True'
else:
return 'False'
elif obj[3] > 3:
if obj[1] <= 2:
if obj[8] <= 0:
return 'True'
elif obj[8] > 0:
return 'False'
else:
return 'False'
elif obj[1] > 2:
if obj[8] <= 0:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'True'
else:
return 'False'
elif obj[7] > 1.0:
if obj[3] > 0:
if obj[1] > 0:
if obj[4] <= 12:
if obj[8] <= 0:
return 'False'
elif obj[8] > 0:
return 'False'
else:
return 'False'
elif obj[4] > 12:
return 'False'
else:
return 'False'
elif obj[1] <= 0:
if obj[4] <= 12:
if obj[8] <= 0:
return 'False'
else:
return 'False'
elif obj[4] > 12:
return 'True'
else:
return 'True'
else:
return 'False'
elif obj[3] <= 0:
if obj[4] <= 7:
if obj[1] <= 3:
if obj[8] <= 0:
return 'True'
elif obj[8] > 0:
return 'False'
else:
return 'False'
elif obj[1] > 3:
return 'True'
else:
return 'True'
elif obj[4] > 7:
if obj[8] <= 0:
return 'False'
elif obj[8] > 0:
return 'True'
else:
return 'True'
else:
return 'False'
else:
return 'True'
else:
return 'False'
elif obj[5] > 1.0:
if obj[4] > 5:
if obj[3] <= 2:
if obj[1] > 0:
if obj[7] <= 2.0:
if obj[8] <= 0:
return 'False'
elif obj[8] > 0:
return 'False'
else:
return 'False'
elif obj[7] > 2.0:
return 'False'
else:
return 'False'
elif obj[1] <= 0:
if obj[8] > 0:
if obj[7] > 0.0:
return 'True'
elif obj[7] <= 0.0:
return 'True'
else:
return 'True'
elif obj[8] <= 0:
if obj[7] > 0.0:
return 'False'
elif obj[7] <= 0.0:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'True'
elif obj[3] > 2:
if obj[8] <= 0:
if obj[1] <= 1:
if obj[7] <= 1.0:
return 'True'
else:
return 'True'
elif obj[1] > 1:
return 'True'
else:
return 'True'
elif obj[8] > 0:
return 'False'
else:
return 'False'
else:
return 'True'
elif obj[4] <= 5:
if obj[1] > 0:
return 'False'
elif obj[1] <= 0:
if obj[3] > 0:
if obj[7] <= 1.0:
return 'False'
elif obj[7] > 1.0:
return 'True'
else:
return 'True'
elif obj[3] <= 0:
return 'True'
else:
return 'True'
else:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[0] > 1:
if obj[9] > 1:
if obj[5] <= 2.0:
if obj[1] > 0:
if obj[7] > -1.0:
if obj[4] <= 7.132780082987552:
if obj[3] <= 1:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[3] > 1:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[4] > 7.132780082987552:
if obj[3] <= 3:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[3] > 3:
if obj[8] <= 0:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'True'
elif obj[7] <= -1.0:
if obj[4] > 6:
if obj[3] <= 0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[3] > 0:
return 'True'
else:
return 'True'
elif obj[4] <= 6:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[1] <= 0:
if obj[7] > -1.0:
if obj[4] <= 9:
if obj[3] <= 2:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[3] > 2:
return 'True'
else:
return 'True'
elif obj[4] > 9:
if obj[3] > 0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[3] <= 0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[7] <= -1.0:
return 'False'
else:
return 'False'
else:
return 'True'
elif obj[5] > 2.0:
if obj[4] <= 18:
if obj[1] > 0:
if obj[3] <= 2:
if obj[7] > 0.0:
if obj[8] <= 0:
return 'False'
else:
return 'False'
elif obj[7] <= 0.0:
if obj[8] <= 0:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[3] > 2:
if obj[7] <= 1.0:
if obj[8] <= 0:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[1] <= 0:
if obj[7] <= 1.0:
return 'True'
elif obj[7] > 1.0:
if obj[3] <= 2:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[4] > 18:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[9] <= 1:
if obj[4] > 1.3264107549745603:
if obj[3] <= 3:
if obj[1] > 0:
if obj[5] <= 3.0:
if obj[7] <= 2.0:
if obj[8] <= 0:
return 'False'
else:
return 'False'
elif obj[7] > 2.0:
return 'False'
else:
return 'False'
elif obj[5] > 3.0:
return 'True'
else:
return 'True'
elif obj[1] <= 0:
if obj[5] > -1.0:
if obj[7] <= 1.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[7] > 1.0:
if obj[8] <= 0:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[5] <= -1.0:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[3] > 3:
if obj[5] <= 0.0:
return 'True'
elif obj[5] > 0.0:
if obj[7] <= 0.0:
if obj[1] > 0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[1] <= 0:
return 'False'
else:
return 'False'
elif obj[7] > 0.0:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'True'
elif obj[4] <= 1.3264107549745603:
if obj[3] > 1:
if obj[7] <= 1.0:
if obj[5] <= 2.0:
if obj[1] > 0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[1] <= 0:
if obj[8] <= 0:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[5] > 2.0:
return 'True'
else:
return 'True'
elif obj[7] > 1.0:
return 'True'
else:
return 'True'
elif obj[3] <= 1:
if obj[7] <= 1.0:
if obj[1] <= 2:
if obj[5] <= 0.0:
if obj[8] <= 0:
return 'False'
else:
return 'False'
elif obj[5] > 0.0:
return 'False'
else:
return 'False'
elif obj[1] > 2:
if obj[5] <= 0.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[7] > 1.0:
if obj[1] <= 3:
return 'True'
elif obj[1] > 3:
return 'False'
else:
return 'False'
else:
return 'True'
else:
return 'False'
else:
return 'True'
else:
return 'False'
else:
return 'True'
else:
return 'True'
elif obj[2] <= 1:
if obj[5] <= 1.0:
if obj[4] > 1.887387522319548:
if obj[3] > 0:
if obj[1] > 0:
if obj[6] <= 3.0:
if obj[8] <= 0:
if obj[7] <= 1.0:
if obj[0] <= 2:
if obj[9] <= 2:
return 'False'
elif obj[9] > 2:
return 'False'
else:
return 'False'
elif obj[0] > 2:
if obj[9] > 1:
return 'False'
elif obj[9] <= 1:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[7] > 1.0:
if obj[9] > 1:
if obj[0] <= 2:
return 'False'
elif obj[0] > 2:
return 'False'
else:
return 'False'
elif obj[9] <= 1:
if obj[0] <= 1:
return 'True'
elif obj[0] > 1:
return 'False'
else:
return 'False'
else:
return 'True'
else:
return 'False'
elif obj[8] > 0:
if obj[7] <= 3.0:
if obj[0] <= 1:
if obj[9] > 1:
return 'False'
elif obj[9] <= 1:
return 'False'
else:
return 'False'
elif obj[0] > 1:
if obj[9] <= 2:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[7] > 3.0:
return 'True'
else:
return 'True'
else:
return 'False'
elif obj[6] > 3.0:
if obj[0] <= 2:
if obj[9] <= 2:
if obj[8] <= 0:
if obj[7] <= 2.0:
return 'False'
elif obj[7] > 2.0:
return 'False'
else:
return 'False'
elif obj[8] > 0:
return 'False'
else:
return 'False'
elif obj[9] > 2:
return 'False'
else:
return 'False'
elif obj[0] > 2:
if obj[7] <= 1.0:
if obj[8] <= 0:
if obj[9] <= 2:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[7] > 1.0:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[1] <= 0:
if obj[7] <= 1.0:
if obj[6] > -1.0:
if obj[9] <= 2:
if obj[8] <= 0:
if obj[0] > 0:
return 'False'
elif obj[0] <= 0:
return 'False'
else:
return 'False'
elif obj[8] > 0:
if obj[0] <= 1:
return 'False'
elif obj[0] > 1:
return 'True'
else:
return 'True'
else:
return 'False'
elif obj[9] > 2:
if obj[0] <= 1:
if obj[8] <= 0:
return 'False'
else:
return 'False'
elif obj[0] > 1:
return 'True'
else:
return 'True'
else:
return 'False'
elif obj[6] <= -1.0:
return 'False'
else:
return 'False'
elif obj[7] > 1.0:
if obj[0] <= 1:
if obj[9] <= 2:
if obj[6] <= 1.0:
if obj[8] > 0:
return 'True'
elif obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[6] > 1.0:
if obj[8] > 0:
return 'True'
elif obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[9] > 2:
if obj[6] <= 1.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[6] > 1.0:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[0] > 1:
if obj[9] > 1:
if obj[6] > 1.0:
if obj[8] <= 0:
return 'False'
elif obj[8] > 0:
return 'False'
else:
return 'False'
elif obj[6] <= 1.0:
if obj[8] <= 0:
return 'True'
elif obj[8] > 0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[9] <= 1:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'True'
else:
return 'False'
elif obj[3] <= 0:
if obj[7] <= 2.0:
if obj[6] > -1.0:
if obj[1] <= 3:
if obj[0] > 0:
if obj[9] > 1:
if obj[8] <= 0:
return 'False'
elif obj[8] > 0:
return 'False'
else:
return 'False'
elif obj[9] <= 1:
if obj[8] > 0:
return 'False'
elif obj[8] <= 0:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[0] <= 0:
if obj[9] > 1:
if obj[8] <= 0:
return 'False'
else:
return 'False'
elif obj[9] <= 1:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[1] > 3:
if obj[0] > 0:
if obj[9] <= 1:
if obj[8] <= 0:
return 'False'
else:
return 'False'
elif obj[9] > 1:
if obj[8] <= 0:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[0] <= 0:
if obj[9] <= 1:
if obj[8] <= 0:
return 'False'
else:
return 'False'
elif obj[9] > 1:
if obj[8] <= 0:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[6] <= -1.0:
return 'True'
else:
return 'True'
elif obj[7] > 2.0:
if obj[0] <= 2:
if obj[1] > 0:
if obj[8] <= 0:
if obj[6] <= 2.0:
if obj[9] <= 2:
return 'True'
elif obj[9] > 2:
return 'True'
else:
return 'True'
elif obj[6] > 2.0:
return 'False'
else:
return 'False'
elif obj[8] > 0:
if obj[9] > 1:
return 'False'
elif obj[9] <= 1:
return 'True'
else:
return 'True'
else:
return 'False'
elif obj[1] <= 0:
if obj[9] <= 2:
return 'True'
elif obj[9] > 2:
return 'False'
else:
return 'False'
else:
return 'True'
elif obj[0] > 2:
if obj[6] <= 1.0:
if obj[1] <= 2:
return 'True'
elif obj[1] > 2:
return 'False'
else:
return 'False'
elif obj[6] > 1.0:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'False'
elif obj[4] <= 1.887387522319548:
if obj[3] <= 3:
if obj[7] > 0.0:
if obj[6] <= 1.0:
if obj[0] <= 2:
if obj[1] > 0:
if obj[8] <= 0:
if obj[9] > 1:
return 'False'
elif obj[9] <= 1:
return 'False'
else:
return 'False'
elif obj[8] > 0:
if obj[9] > 1:
return 'False'
elif obj[9] <= 1:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[1] <= 0:
if obj[9] <= 2:
if obj[8] > 0:
return 'False'
elif obj[8] <= 0:
return 'False'
else:
return 'False'
elif obj[9] > 2:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[0] > 2:
if obj[1] > 2:
if obj[9] > 1:
if obj[8] <= 0:
return 'False'
else:
return 'False'
elif obj[9] <= 1:
return 'False'
else:
return 'False'
elif obj[1] <= 2:
if obj[8] <= 0:
if obj[9] <= 2:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'False'
elif obj[6] > 1.0:
if obj[9] <= 2:
if obj[0] > 0:
if obj[1] <= 3:
if obj[8] <= 0:
return 'False'
elif obj[8] > 0:
return 'False'
else:
return 'False'
elif obj[1] > 3:
if obj[8] <= 0:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[0] <= 0:
if obj[1] <= 0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[1] > 0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[9] > 2:
if obj[0] <= 1:
if obj[1] > 0:
if obj[8] <= 0:
return 'False'
else:
return 'False'
elif obj[1] <= 0:
return 'False'
else:
return 'False'
elif obj[0] > 1:
return 'True'
else:
return 'True'
else:
return 'False'
else:
return 'False'
elif obj[7] <= 0.0:
if obj[6] > -1.0:
if obj[0] <= 2:
return 'False'
elif obj[0] > 2:
if obj[1] > 2:
return 'False'
elif obj[1] <= 2:
if obj[8] <= 0:
if obj[9] <= 2:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[6] <= -1.0:
return 'True'
else:
return 'True'
else:
return 'False'
elif obj[3] > 3:
if obj[6] <= 1.0:
if obj[9] <= 2:
if obj[0] > 0:
if obj[8] <= 0:
if obj[1] <= 3:
if obj[7] <= 0.0:
return 'False'
elif obj[7] > 0.0:
return 'False'
else:
return 'False'
elif obj[1] > 3:
return 'False'
else:
return 'False'
elif obj[8] > 0:
return 'False'
else:
return 'False'
elif obj[0] <= 0:
return 'True'
else:
return 'True'
elif obj[9] > 2:
return 'True'
else:
return 'True'
elif obj[6] > 1.0:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'False'
elif obj[5] > 1.0:
if obj[7] <= 1.0:
if obj[1] > 0:
if obj[0] <= 2:
if obj[4] <= 14.155999220544217:
if obj[9] <= 2:
if obj[6] > -1.0:
if obj[3] <= 3:
if obj[8] <= 0:
return 'False'
elif obj[8] > 0:
return 'False'
else:
return 'False'
elif obj[3] > 3:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[6] <= -1.0:
return 'False'
else:
return 'False'
elif obj[9] > 2:
if obj[6] <= 3.0:
if obj[3] > 0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[3] <= 0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[6] > 3.0:
if obj[3] > 0:
return 'True'
elif obj[3] <= 0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[4] > 14.155999220544217:
if obj[6] <= 3.0:
if obj[9] > 1:
if obj[3] <= 2:
if obj[8] <= 0:
return 'False'
elif obj[8] > 0:
return 'True'
else:
return 'True'
elif obj[3] > 2:
return 'False'
else:
return 'False'
elif obj[9] <= 1:
if obj[3] <= 2:
return 'False'
elif obj[3] > 2:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'False'
elif obj[6] > 3.0:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[0] > 2:
if obj[4] > 0:
if obj[6] <= 2.0:
if obj[3] <= 2:
if obj[9] > 1:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[9] <= 1:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[3] > 2:
if obj[8] <= 0:
if obj[9] <= 2:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[6] > 2.0:
if obj[3] <= 2:
if obj[9] > 1:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[9] <= 1:
return 'True'
else:
return 'True'
elif obj[3] > 2:
if obj[8] <= 0:
if obj[9] <= 2:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'True'
elif obj[4] <= 0:
return 'False'
else:
return 'False'
else:
return 'True'
elif obj[1] <= 0:
if obj[0] <= 1:
if obj[9] <= 1:
if obj[4] > 3:
if obj[6] <= 2.0:
if obj[3] <= 2:
if obj[8] <= 1:
return 'True'
else:
return 'True'
elif obj[3] > 2:
if obj[8] <= 1:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[6] > 2.0:
if obj[3] <= 2:
return 'True'
elif obj[3] > 2:
if obj[8] <= 1:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'True'
elif obj[4] <= 3:
return 'True'
else:
return 'True'
elif obj[9] > 1:
if obj[4] > 4:
if obj[3] > 0:
if obj[6] <= 2.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[6] > 2.0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[3] <= 0:
if obj[8] <= 0:
return 'True'
elif obj[8] > 0:
return 'False'
else:
return 'False'
else:
return 'True'
elif obj[4] <= 4:
if obj[6] > 1.0:
if obj[3] > 0:
return 'False'
elif obj[3] <= 0:
if obj[8] <= 0:
return 'False'
elif obj[8] > 0:
return 'True'
else:
return 'True'
else:
return 'False'
elif obj[6] <= 1.0:
if obj[3] <= 0:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[3] > 0:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'False'
else:
return 'True'
elif obj[0] > 1:
if obj[4] <= 6:
if obj[9] > 1:
if obj[6] <= 2.0:
return 'True'
elif obj[6] > 2.0:
if obj[3] <= 2:
if obj[8] <= 0:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[9] <= 1:
return 'False'
else:
return 'False'
elif obj[4] > 6:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'True'
elif obj[7] > 1.0:
if obj[3] > 1:
if obj[1] > 0:
if obj[0] <= 2:
if obj[6] <= 3.0:
if obj[4] <= 17:
if obj[9] > 1:
if obj[8] <= 0:
return 'False'
elif obj[8] > 0:
return 'True'
else:
return 'True'
elif obj[9] <= 1:
if obj[8] <= 0:
return 'True'
elif obj[8] > 0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[4] > 17:
if obj[9] > 1:
if obj[8] <= 0:
return 'True'
elif obj[8] > 0:
return 'True'
else:
return 'True'
elif obj[9] <= 1:
if obj[8] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[6] > 3.0:
if obj[8] <= 0:
if obj[4] <= 12:
if obj[9] > 1:
return 'True'
elif obj[9] <= 1:
return 'True'
else:
return 'True'
elif obj[4] > 12:
if obj[9] <= 1:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[8] > 0:
return 'False'
else:
return 'False'
else:
return 'True'
elif obj[0] > 2:
if obj[6] <= 3.0:
if obj[4] <= 17:
if obj[9] > 1:
if obj[8] <= 0:
return 'True'
else:
return 'True'
elif obj[9] <= 1:
return 'True'
else:
return 'True'
elif obj[4] > 17:
if obj[8] <= 0:
if obj[9] <= 2:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[6] > 3.0:
return 'False'
else:
return 'False'
else:
return 'True'
elif obj[1] <= 0:
if obj[8] <= 0:
if obj[6] > 1.0:
if obj[0] > 0:
if obj[4] <= 7:
if obj[9] <= 2:
return 'True'
else:
return 'True'
elif obj[4] > 7:
return 'True'
else:
return 'True'
elif obj[0] <= 0:
if obj[4] <= 12:
if obj[9] <= 2:
return 'True'
else:
return 'True'
elif obj[4] > 12:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[6] <= 1.0:
if obj[0] > 0:
if obj[4] <= 9:
return 'False'
elif obj[4] > 9:
if obj[9] <= 2:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[0] <= 0:
return 'True'
else:
return 'True'
else:
return 'False'
elif obj[8] > 0:
if obj[4] <= 16:
return 'True'
elif obj[4] > 16:
if obj[6] > 0.0:
if obj[0] <= 1:
if obj[9] <= 1:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[6] <= 0.0:
return 'True'
else:
return 'True'
else:
return 'False'
else:
return 'True'
else:
return 'True'
elif obj[3] <= 1:
if obj[4] > 7:
if obj[1] <= 2:
if obj[6] <= 2.0:
if obj[8] <= 0:
if obj[9] <= 2:
if obj[0] > 0:
return 'True'
elif obj[0] <= 0:
return 'True'
else:
return 'True'
elif obj[9] > 2:
return 'True'
else:
return 'True'
elif obj[8] > 0:
if obj[0] <= 1:
if obj[9] <= 1:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[6] > 2.0:
return 'True'
else:
return 'True'
elif obj[1] > 2:
if obj[0] <= 2:
if obj[8] <= 0:
if obj[9] <= 2:
if obj[6] > 0.0:
return 'False'
elif obj[6] <= 0.0:
return 'True'
else:
return 'True'
elif obj[9] > 2:
return 'True'
else:
return 'True'
elif obj[8] > 0:
return 'True'
else:
return 'True'
elif obj[0] > 2:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[4] <= 7:
if obj[6] > 0.0:
if obj[9] <= 2:
if obj[8] <= 0:
if obj[0] <= 2:
if obj[1] <= 3:
return 'True'
elif obj[1] > 3:
return 'True'
else:
return 'True'
elif obj[0] > 2:
if obj[1] <= 3:
return 'True'
elif obj[1] > 3:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[8] > 0:
if obj[1] <= 1:
if obj[0] <= 1:
return 'True'
else:
return 'True'
elif obj[1] > 1:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[9] > 2:
if obj[0] > 0:
if obj[1] <= 1:
if obj[8] <= 0:
return 'False'
else:
return 'False'
else:
return 'False'
elif obj[0] <= 0:
return 'True'
else:
return 'True'
else:
return 'True'
elif obj[6] <= 0.0:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'True'
else:
return 'False'
|
del_items(0x80124F0C)
SetType(0x80124F0C, "void GameOnlyTestRoutine__Fv()")
del_items(0x80124F14)
SetType(0x80124F14, "int vecleny__Fii(int a, int b)")
del_items(0x80124F38)
SetType(0x80124F38, "int veclenx__Fii(int a, int b)")
del_items(0x80124F64)
SetType(0x80124F64, "void GetDamageAmt__FiPiT1(int i, int *mind, int *maxd)")
del_items(0x8012555C)
SetType(0x8012555C, "int CheckBlock__Fiiii(int fx, int fy, int tx, int ty)")
del_items(0x80125644)
SetType(0x80125644, "int FindClosest__Fiii(int sx, int sy, int rad)")
del_items(0x801257E0)
SetType(0x801257E0, "int GetSpellLevel__Fii(int id, int sn)")
del_items(0x80125854)
SetType(0x80125854, "int GetDirection8__Fiiii(int x1, int y1, int x2, int y2)")
del_items(0x80125A70)
SetType(0x80125A70, "void DeleteMissile__Fii(int mi, int i)")
del_items(0x80125AC8)
SetType(0x80125AC8, "void GetMissileVel__Fiiiiii(int i, int sx, int sy, int dx, int dy, int v)")
del_items(0x80125C7C)
SetType(0x80125C7C, "void PutMissile__Fi(int i)")
del_items(0x80125D80)
SetType(0x80125D80, "void GetMissilePos__Fi(int i)")
del_items(0x80125EA8)
SetType(0x80125EA8, "void MoveMissilePos__Fi(int i)")
del_items(0x80126010)
SetType(0x80126010, "unsigned char MonsterTrapHit__FiiiiiUc(int m, int mindam, int maxdam, int dist, int t, int shift)")
del_items(0x80126384)
SetType(0x80126384, "unsigned char MonsterMHit__FiiiiiiUc(int pnum, int m, int mindam, int maxdam, int dist, int t, int shift)")
del_items(0x80126AE4)
SetType(0x80126AE4, "unsigned char PlayerMHit__FiiiiiiUcUc(int pnum, int m, int dist, int mind, int maxd, int mtype, int shift, int earflag)")
del_items(0x80127550)
SetType(0x80127550, "unsigned char Plr2PlrMHit__FiiiiiiUc(int pnum, int p, int mindam, int maxdam, int dist, int mtype, int shift)")
del_items(0x80127D2C)
SetType(0x80127D2C, "void CheckMissileCol__FiiiUciiUc(int i, int mindam, int maxdam, unsigned char shift, int mx, int my, int nodel)")
del_items(0x8012846C)
SetType(0x8012846C, "unsigned char GetTableValue__FUci(unsigned char code, int dir)")
del_items(0x80128500)
SetType(0x80128500, "void SetMissAnim__Fii(int mi, int animtype)")
del_items(0x801285D0)
SetType(0x801285D0, "void SetMissDir__Fii(int mi, int dir)")
del_items(0x80128614)
SetType(0x80128614, "void AddLArrow__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x801287F4)
SetType(0x801287F4, "void AddArrow__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x801289B0)
SetType(0x801289B0, "void GetVileMissPos__Fiii(int mi, int dx, int dy)")
del_items(0x80128AD4)
SetType(0x80128AD4, "void AddRndTeleport__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x80128E44)
SetType(0x80128E44, "void AddFirebolt__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int micaster, int id, int dam)")
del_items(0x801290B0)
SetType(0x801290B0, "void AddMagmaball__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x801291C4)
SetType(0x801291C4, "void AddTeleport__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x801293BC)
SetType(0x801293BC, "void AddLightball__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x80129510)
SetType(0x80129510, "void AddFirewall__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x801296F8)
SetType(0x801296F8, "void AddFireball__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x80129954)
SetType(0x80129954, "void AddLightctrl__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x80129A3C)
SetType(0x80129A3C, "void AddLightning__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x80129C04)
SetType(0x80129C04, "void AddMisexp__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x80129E10)
SetType(0x80129E10, "unsigned char CheckIfTrig__Fii(int x, int y)")
del_items(0x80129EF4)
SetType(0x80129EF4, "void AddTown__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012A318)
SetType(0x8012A318, "void AddFlash__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012A528)
SetType(0x8012A528, "void AddFlash2__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012A708)
SetType(0x8012A708, "void AddManashield__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012A7D0)
SetType(0x8012A7D0, "void AddFiremove__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012A92C)
SetType(0x8012A92C, "void AddGuardian__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012AD98)
SetType(0x8012AD98, "void AddChain__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012ADF4)
SetType(0x8012ADF4, "void AddRhino__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012AFB0)
SetType(0x8012AFB0, "void AddFlare__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012B2A8)
SetType(0x8012B2A8, "void AddAcid__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012B3AC)
SetType(0x8012B3AC, "void AddAcidpud__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012B484)
SetType(0x8012B484, "void AddStone__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012B77C)
SetType(0x8012B77C, "void AddGolem__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012B934)
SetType(0x8012B934, "void AddBoom__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012B9C8)
SetType(0x8012B9C8, "void AddHeal__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012BBF0)
SetType(0x8012BBF0, "void AddHealOther__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012BC58)
SetType(0x8012BC58, "void AddElement__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012BE84)
SetType(0x8012BE84, "void AddIdentify__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012BF34)
SetType(0x8012BF34, "void AddFirewallC__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012C1E4)
SetType(0x8012C1E4, "void AddInfra__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012C2E0)
SetType(0x8012C2E0, "void AddWave__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012C364)
SetType(0x8012C364, "void AddNova__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012C57C)
SetType(0x8012C57C, "void AddRepair__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012C62C)
SetType(0x8012C62C, "void AddRecharge__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012C6DC)
SetType(0x8012C6DC, "void AddDisarm__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012C744)
SetType(0x8012C744, "void AddApoca__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012C980)
SetType(0x8012C980, "void AddFlame__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int seqno)")
del_items(0x8012CB9C)
SetType(0x8012CB9C, "void AddFlamec__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012CC8C)
SetType(0x8012CC8C, "void AddCbolt__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int micaster, int id, int dam)")
del_items(0x8012CE80)
SetType(0x8012CE80, "void AddHbolt__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int micaster, int id, int dam)")
del_items(0x8012D040)
SetType(0x8012D040, "void AddResurrect__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012D0B4)
SetType(0x8012D0B4, "void AddResurrectBeam__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012D13C)
SetType(0x8012D13C, "void AddTelekinesis__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012D1A4)
SetType(0x8012D1A4, "void AddBoneSpirit__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012D3A0)
SetType(0x8012D3A0, "void AddRportal__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012D440)
SetType(0x8012D440, "void AddDiabApoca__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)")
del_items(0x8012D57C)
SetType(0x8012D57C, "int AddMissile__Fiiiiiiciii(int sx, int sy, int v1, int v2, int midir, int mitype, int micaster, int id, int v3, int spllvl)")
del_items(0x8012D8C8)
SetType(0x8012D8C8, "int Sentfire__Fiii(int i, int sx, int sy)")
del_items(0x8012DAAC)
SetType(0x8012DAAC, "void MI_Dummy__Fi(int i)")
del_items(0x8012DAB4)
SetType(0x8012DAB4, "void MI_Golem__Fi(int i)")
del_items(0x8012DD10)
SetType(0x8012DD10, "void MI_SetManashield__Fi(int i)")
del_items(0x8012DD4C)
SetType(0x8012DD4C, "void MI_LArrow__Fi(int i)")
del_items(0x8012E508)
SetType(0x8012E508, "void MI_Arrow__Fi(int i)")
del_items(0x8012E724)
SetType(0x8012E724, "void MI_Firebolt__Fi(int i)")
del_items(0x8012EDF0)
SetType(0x8012EDF0, "void MI_Lightball__Fi(int i)")
del_items(0x8012F078)
SetType(0x8012F078, "void MI_Acidpud__Fi(int i)")
del_items(0x8012F188)
SetType(0x8012F188, "void MI_Firewall__Fi(int i)")
del_items(0x8012F44C)
SetType(0x8012F44C, "void MI_Fireball__Fi(int i)")
del_items(0x8012FE10)
SetType(0x8012FE10, "void MI_Lightctrl__Fi(int i)")
del_items(0x8013037C)
SetType(0x8013037C, "void MI_Lightning__Fi(int i)")
del_items(0x801304F8)
SetType(0x801304F8, "void MI_Town__Fi(int i)")
del_items(0x80130740)
SetType(0x80130740, "void MI_Flash__Fi(int i)")
del_items(0x80130B78)
SetType(0x80130B78, "void MI_Flash2__Fi(int i)")
del_items(0x80130DC0)
SetType(0x80130DC0, "void MI_Manashield__Fi(int i)")
del_items(0x801313C8)
SetType(0x801313C8, "void MI_Firemove__Fi(int i)")
del_items(0x80131804)
SetType(0x80131804, "void MI_Guardian__Fi(int i)")
del_items(0x80131BD0)
SetType(0x80131BD0, "void MI_Chain__Fi(int i)")
del_items(0x80131ECC)
SetType(0x80131ECC, "void MI_Misexp__Fi(int i)")
del_items(0x801321CC)
SetType(0x801321CC, "void MI_Acidsplat__Fi(int i)")
del_items(0x80132368)
SetType(0x80132368, "void MI_Teleport__Fi(int i)")
del_items(0x80132730)
SetType(0x80132730, "void MI_Stone__Fi(int i)")
del_items(0x801328DC)
SetType(0x801328DC, "void MI_Boom__Fi(int i)")
del_items(0x801329D4)
SetType(0x801329D4, "void MI_Rhino__Fi(int i)")
del_items(0x80132D80)
SetType(0x80132D80, "void MI_FirewallC__Fi(int i)")
del_items(0x801330E8)
SetType(0x801330E8, "void MI_Infra__Fi(int i)")
del_items(0x801331A0)
SetType(0x801331A0, "void MI_Apoca__Fi(int i)")
del_items(0x80133434)
SetType(0x80133434, "void MI_Wave__Fi(int i)")
del_items(0x80133930)
SetType(0x80133930, "void MI_Nova__Fi(int i)")
del_items(0x80133BF0)
SetType(0x80133BF0, "void MI_Flame__Fi(int i)")
del_items(0x80133DE8)
SetType(0x80133DE8, "void MI_Flamec__Fi(int i)")
del_items(0x80134070)
SetType(0x80134070, "void MI_Cbolt__Fi(int i)")
del_items(0x80134374)
SetType(0x80134374, "void MI_Hbolt__Fi(int i)")
del_items(0x80134680)
SetType(0x80134680, "void MI_Element__Fi(int i)")
del_items(0x80134D38)
SetType(0x80134D38, "void MI_Bonespirit__Fi(int i)")
del_items(0x80135140)
SetType(0x80135140, "void MI_ResurrectBeam__Fi(int i)")
del_items(0x801351B0)
SetType(0x801351B0, "void MI_Rportal__Fi(int i)")
del_items(0x801353D4)
SetType(0x801353D4, "void ProcessMissiles__Fv()")
del_items(0x801357C8)
SetType(0x801357C8, "void ClearMissileSpot__Fi(int mi)")
del_items(0x80135880)
SetType(0x80135880, "void MoveToScrollTarget__7CBlocks(struct CBlocks *this)")
del_items(0x80135894)
SetType(0x80135894, "void MonstPartJump__Fi(int m)")
del_items(0x80135A28)
SetType(0x80135A28, "void DeleteMonster__Fi(int i)")
del_items(0x80135A60)
SetType(0x80135A60, "int M_GetDir__Fi(int i)")
del_items(0x80135ABC)
SetType(0x80135ABC, "void M_StartDelay__Fii(int i, int len)")
del_items(0x80135B04)
SetType(0x80135B04, "void M_StartRAttack__Fiii(int i, int missile_type, int dam)")
del_items(0x80135C1C)
SetType(0x80135C1C, "void M_StartRSpAttack__Fiii(int i, int missile_type, int dam)")
del_items(0x80135D40)
SetType(0x80135D40, "void M_StartSpAttack__Fi(int i)")
del_items(0x80135E28)
SetType(0x80135E28, "void M_StartEat__Fi(int i)")
del_items(0x80135EF8)
SetType(0x80135EF8, "void M_GetKnockback__Fi(int i)")
del_items(0x801360D0)
SetType(0x801360D0, "void M_StartHit__Fiii(int i, int pnum, int dam)")
del_items(0x801363C8)
SetType(0x801363C8, "void M_DiabloDeath__FiUc(int i, unsigned char sendmsg)")
del_items(0x801366EC)
SetType(0x801366EC, "void M2MStartHit__Fiii(int mid, int i, int dam)")
del_items(0x80136998)
SetType(0x80136998, "void MonstStartKill__FiiUc(int i, int pnum, unsigned char sendmsg)")
del_items(0x80136C6C)
SetType(0x80136C6C, "void M2MStartKill__Fii(int i, int mid)")
del_items(0x80137034)
SetType(0x80137034, "void M_StartKill__Fii(int i, int pnum)")
del_items(0x80137124)
SetType(0x80137124, "void M_StartFadein__FiiUc(int i, int md, unsigned char backwards)")
del_items(0x80137278)
SetType(0x80137278, "void M_StartFadeout__FiiUc(int i, int md, unsigned char backwards)")
del_items(0x801373C0)
SetType(0x801373C0, "void M_StartHeal__Fi(int i)")
del_items(0x80137440)
SetType(0x80137440, "void M_ChangeLightOffset__Fi(int monst)")
del_items(0x801374E0)
SetType(0x801374E0, "int M_DoStand__Fi(int i)")
del_items(0x80137548)
SetType(0x80137548, "int M_DoWalk__Fi(int i)")
del_items(0x801377CC)
SetType(0x801377CC, "int M_DoWalk2__Fi(int i)")
del_items(0x801379B8)
SetType(0x801379B8, "int M_DoWalk3__Fi(int i)")
del_items(0x80137C7C)
SetType(0x80137C7C, "void M_TryM2MHit__Fiiiii(int i, int mid, int hper, int mind, int maxd)")
del_items(0x80137E44)
SetType(0x80137E44, "void M_TryH2HHit__Fiiiii(int i, int pnum, int Hit, int MinDam, int MaxDam)")
del_items(0x80138458)
SetType(0x80138458, "int M_DoAttack__Fi(int i)")
del_items(0x801385FC)
SetType(0x801385FC, "int M_DoRAttack__Fi(int i)")
del_items(0x80138774)
SetType(0x80138774, "int M_DoRSpAttack__Fi(int i)")
del_items(0x80138964)
SetType(0x80138964, "int M_DoSAttack__Fi(int i)")
del_items(0x80138A38)
SetType(0x80138A38, "int M_DoFadein__Fi(int i)")
del_items(0x80138B08)
SetType(0x80138B08, "int M_DoFadeout__Fi(int i)")
del_items(0x80138C1C)
SetType(0x80138C1C, "int M_DoHeal__Fi(int i)")
del_items(0x80138CC8)
SetType(0x80138CC8, "int M_DoTalk__Fi(int i)")
del_items(0x80139134)
SetType(0x80139134, "void M_Teleport__Fi(int i)")
del_items(0x80139368)
SetType(0x80139368, "int M_DoGotHit__Fi(int i)")
del_items(0x801393C8)
SetType(0x801393C8, "void DoEnding__Fv()")
del_items(0x80139474)
SetType(0x80139474, "void PrepDoEnding__Fv()")
del_items(0x80139598)
SetType(0x80139598, "int M_DoDeath__Fi(int i)")
del_items(0x80139768)
SetType(0x80139768, "int M_DoSpStand__Fi(int i)")
del_items(0x8013980C)
SetType(0x8013980C, "int M_DoDelay__Fi(int i)")
del_items(0x801398FC)
SetType(0x801398FC, "int M_DoStone__Fi(int i)")
del_items(0x80139980)
SetType(0x80139980, "void M_WalkDir__Fii(int i, int md)")
del_items(0x80139BA8)
SetType(0x80139BA8, "void GroupUnity__Fi(int i)")
del_items(0x80139F94)
SetType(0x80139F94, "unsigned char M_CallWalk__Fii(int i, int md)")
del_items(0x8013A180)
SetType(0x8013A180, "unsigned char M_PathWalk__Fi(int i, char plr2monst[9], unsigned char (*Check)())")
del_items(0x8013A244)
SetType(0x8013A244, "unsigned char M_CallWalk2__Fii(int i, int md)")
del_items(0x8013A358)
SetType(0x8013A358, "unsigned char M_DumbWalk__Fii(int i, int md)")
del_items(0x8013A3AC)
SetType(0x8013A3AC, "unsigned char M_RoundWalk__FiiRi(int i, int md, int *dir)")
del_items(0x8013A54C)
SetType(0x8013A54C, "void MAI_Zombie__Fi(int i)")
del_items(0x8013A744)
SetType(0x8013A744, "void MAI_SkelSd__Fi(int i)")
del_items(0x8013A8DC)
SetType(0x8013A8DC, "void MAI_Snake__Fi(int i)")
del_items(0x8013ACC0)
SetType(0x8013ACC0, "void MAI_Bat__Fi(int i)")
del_items(0x8013B078)
SetType(0x8013B078, "void MAI_SkelBow__Fi(int i)")
del_items(0x8013B25C)
SetType(0x8013B25C, "void MAI_Fat__Fi(int i)")
del_items(0x8013B40C)
SetType(0x8013B40C, "void MAI_Sneak__Fi(int i)")
del_items(0x8013B7F8)
SetType(0x8013B7F8, "void MAI_Fireman__Fi(int i)")
del_items(0x8013BAF0)
SetType(0x8013BAF0, "void MAI_Fallen__Fi(int i)")
del_items(0x8013BE0C)
SetType(0x8013BE0C, "void MAI_Cleaver__Fi(int i)")
del_items(0x8013BEF4)
SetType(0x8013BEF4, "void MAI_Round__FiUc(int i, unsigned char special)")
del_items(0x8013C360)
SetType(0x8013C360, "void MAI_GoatMc__Fi(int i)")
del_items(0x8013C380)
SetType(0x8013C380, "void MAI_Ranged__FiiUc(int i, int missile_type, unsigned char special)")
del_items(0x8013C5A0)
SetType(0x8013C5A0, "void MAI_GoatBow__Fi(int i)")
del_items(0x8013C5C4)
SetType(0x8013C5C4, "void MAI_Succ__Fi(int i)")
del_items(0x8013C5E8)
SetType(0x8013C5E8, "void MAI_AcidUniq__Fi(int i)")
del_items(0x8013C60C)
SetType(0x8013C60C, "void MAI_Scav__Fi(int i)")
del_items(0x8013CA24)
SetType(0x8013CA24, "void MAI_Garg__Fi(int i)")
del_items(0x8013CC04)
SetType(0x8013CC04, "void MAI_RoundRanged__FiiUciUc(int i, int missile_type, unsigned char checkdoors, int dam, int lessmissiles)")
del_items(0x8013D118)
SetType(0x8013D118, "void MAI_Magma__Fi(int i)")
del_items(0x8013D144)
SetType(0x8013D144, "void MAI_Storm__Fi(int i)")
del_items(0x8013D170)
SetType(0x8013D170, "void MAI_Acid__Fi(int i)")
del_items(0x8013D1A0)
SetType(0x8013D1A0, "void MAI_Diablo__Fi(int i)")
del_items(0x8013D1CC)
SetType(0x8013D1CC, "void MAI_RR2__Fiii(int i, int mistype, int dam)")
del_items(0x8013D6CC)
SetType(0x8013D6CC, "void MAI_Mega__Fi(int i)")
del_items(0x8013D6F0)
SetType(0x8013D6F0, "void MAI_SkelKing__Fi(int i)")
del_items(0x8013DC2C)
SetType(0x8013DC2C, "void MAI_Rhino__Fi(int i)")
del_items(0x8013E0D4)
SetType(0x8013E0D4, "void MAI_Counselor__Fi(int i, unsigned char counsmiss[4], int _mx, int _my)")
del_items(0x8013E5A0)
SetType(0x8013E5A0, "void MAI_Garbud__Fi(int i)")
del_items(0x8013E750)
SetType(0x8013E750, "void MAI_Zhar__Fi(int i)")
del_items(0x8013E948)
SetType(0x8013E948, "void MAI_SnotSpil__Fi(int i)")
del_items(0x8013EB7C)
SetType(0x8013EB7C, "void MAI_Lazurus__Fi(int i)")
del_items(0x8013EDF4)
SetType(0x8013EDF4, "void MAI_Lazhelp__Fi(int i)")
del_items(0x8013EF14)
SetType(0x8013EF14, "void MAI_Lachdanan__Fi(int i)")
del_items(0x8013F0A4)
SetType(0x8013F0A4, "void MAI_Warlord__Fi(int i)")
del_items(0x8013F1F0)
SetType(0x8013F1F0, "void DeleteMonsterList__Fv()")
del_items(0x8013F30C)
SetType(0x8013F30C, "void ProcessMonsters__Fv()")
del_items(0x8013F894)
SetType(0x8013F894, "unsigned char DirOK__Fii(int i, int mdir)")
del_items(0x8013FC7C)
SetType(0x8013FC7C, "unsigned char PosOkMissile__Fii(int x, int y)")
del_items(0x8013FCE4)
SetType(0x8013FCE4, "unsigned char CheckNoSolid__Fii(int x, int y)")
del_items(0x8013FD28)
SetType(0x8013FD28, "unsigned char LineClearF__FPFii_Uciiii(unsigned char (*Clear)(), int x1, int y1, int x2, int y2)")
del_items(0x8013FFB0)
SetType(0x8013FFB0, "unsigned char LineClear__Fiiii(int x1, int y1, int x2, int y2)")
del_items(0x8013FFF0)
SetType(0x8013FFF0, "unsigned char LineClearF1__FPFiii_Uciiiii(unsigned char (*Clear)(), int monst, int x1, int y1, int x2, int y2)")
del_items(0x80140284)
SetType(0x80140284, "void M_FallenFear__Fii(int x, int y)")
del_items(0x80140454)
SetType(0x80140454, "void PrintMonstHistory__Fi(int mt)")
del_items(0x8014067C)
SetType(0x8014067C, "void PrintUniqueHistory__Fv()")
del_items(0x801407A0)
SetType(0x801407A0, "void MissToMonst__Fiii(int i, int x, int y)")
del_items(0x80140C04)
SetType(0x80140C04, "unsigned char PosOkMonst2__Fiii(int i, int x, int y)")
del_items(0x80140E20)
SetType(0x80140E20, "unsigned char PosOkMonst3__Fiii(int i, int x, int y)")
del_items(0x80141114)
SetType(0x80141114, "int M_SpawnSkel__Fiii(int x, int y, int dir)")
del_items(0x8014126C)
SetType(0x8014126C, "void TalktoMonster__Fi(int i)")
del_items(0x8014138C)
SetType(0x8014138C, "void SpawnGolum__Fiiii(int i, int x, int y, int mi)")
del_items(0x801415E4)
SetType(0x801415E4, "unsigned char CanTalkToMonst__Fi(int m)")
del_items(0x8014161C)
SetType(0x8014161C, "unsigned char CheckMonsterHit__FiRUc(int m, unsigned char *ret)")
del_items(0x801416E8)
SetType(0x801416E8, "void MAI_Golum__Fi(int i)")
del_items(0x80141A5C)
SetType(0x80141A5C, "unsigned char MAI_Path__Fi(int i)")
del_items(0x80141BC0)
SetType(0x80141BC0, "void M_StartAttack__Fi(int i)")
del_items(0x80141CA8)
SetType(0x80141CA8, "void M_StartWalk__Fiiiiii(int i, int xvel, int yvel, int xadd, int yadd, int EndDir)")
del_items(0x80141E08)
SetType(0x80141E08, "void FreeInvGFX__Fv()")
del_items(0x80141E10)
SetType(0x80141E10, "void InvDrawSlot__Fiii(int X, int Y, int Frame)")
del_items(0x80141E94)
SetType(0x80141E94, "void InvDrawSlotBack__FiiiiUc(int X, int Y, int W, int H, int Flag)")
del_items(0x801420E8)
SetType(0x801420E8, "void InvDrawItem__FiiiUci(int ItemX, int ItemY, int ItemNo, unsigned char StatFlag, int TransFlag)")
del_items(0x801421B8)
SetType(0x801421B8, "void InvDrawSlots__Fv()")
del_items(0x80142490)
SetType(0x80142490, "void PrintStat__FiiPcUc(int Y, int Txt0, char *Txt1, unsigned char Col)")
del_items(0x8014255C)
SetType(0x8014255C, "void DrawInvStats__Fv()")
del_items(0x801430E8)
SetType(0x801430E8, "void DrawInvBack__Fv()")
del_items(0x80143170)
SetType(0x80143170, "void DrawInvCursor__Fv()")
del_items(0x8014364C)
SetType(0x8014364C, "void DrawInvMsg__Fv()")
del_items(0x80143814)
SetType(0x80143814, "void DrawInvUnique__Fv()")
del_items(0x80143938)
SetType(0x80143938, "void DrawInv__Fv()")
del_items(0x80143978)
SetType(0x80143978, "void DrawInvTSK__FP4TASK(struct TASK *T)")
del_items(0x80143CA8)
SetType(0x80143CA8, "void DoThatDrawInv__Fv()")
del_items(0x80144470)
SetType(0x80144470, "unsigned char AutoPlace__FiiiiUc(int pnum, int ii, int sx, int sy, int saveflag)")
del_items(0x80144790)
SetType(0x80144790, "unsigned char SpecialAutoPlace__FiiiiUc(int pnum, int ii, int sx, int sy, int saveflag)")
del_items(0x80144B2C)
SetType(0x80144B2C, "unsigned char GoldAutoPlace__Fi(int pnum)")
del_items(0x80144FFC)
SetType(0x80144FFC, "unsigned char WeaponAutoPlace__Fi(int pnum)")
del_items(0x80145288)
SetType(0x80145288, "int SwapItem__FP10ItemStructT0(struct ItemStruct *a, struct ItemStruct *b)")
del_items(0x80145384)
SetType(0x80145384, "void CheckInvPaste__Fiii(int pnum, int mx, int my)")
del_items(0x80147070)
SetType(0x80147070, "void CheckInvCut__Fiii(int pnum, int mx, int my)")
del_items(0x80147B20)
SetType(0x80147B20, "void RemoveInvItem__Fii(int pnum, int iv)")
del_items(0x80147DC8)
SetType(0x80147DC8, "void RemoveSpdBarItem__Fii(int pnum, int iv)")
del_items(0x80147EC8)
SetType(0x80147EC8, "void CheckInvScrn__Fv()")
del_items(0x80147F40)
SetType(0x80147F40, "void CheckItemStats__Fi(int pnum)")
del_items(0x80147FC4)
SetType(0x80147FC4, "void CheckBookLevel__Fi(int pnum)")
del_items(0x801480F8)
SetType(0x801480F8, "void CheckQuestItem__Fi(int pnum)")
del_items(0x80148520)
SetType(0x80148520, "void InvGetItem__Fii(int pnum, int ii)")
del_items(0x8014881C)
SetType(0x8014881C, "void AutoGetItem__Fii(int pnum, int ii)")
del_items(0x8014928C)
SetType(0x8014928C, "int FindGetItem__FiUsi(int idx, unsigned short ci, int iseed)")
del_items(0x80149340)
SetType(0x80149340, "void SyncGetItem__FiiiUsi(int x, int y, int idx, unsigned short ci, int iseed)")
del_items(0x801494CC)
SetType(0x801494CC, "unsigned char TryInvPut__Fv()")
del_items(0x80149694)
SetType(0x80149694, "int InvPutItem__Fiii(int pnum, int x, int y)")
del_items(0x80149B3C)
SetType(0x80149B3C, "int SyncPutItem__FiiiiUsiUciiiiiUl(int pnum, int x, int y, int idx, int icreateinfo, int iseed, int Id, int dur, int mdur, int ch, int mch, int ivalue, unsigned long ibuff)")
del_items(0x8014A098)
SetType(0x8014A098, "char CheckInvHLight__Fv()")
del_items(0x8014A3E0)
SetType(0x8014A3E0, "void RemoveScroll__Fi(int pnum)")
del_items(0x8014A5C4)
SetType(0x8014A5C4, "unsigned char UseScroll__Fv()")
del_items(0x8014A82C)
SetType(0x8014A82C, "void UseStaffCharge__FP12PlayerStruct(struct PlayerStruct *ptrplr)")
del_items(0x8014A894)
SetType(0x8014A894, "unsigned char UseStaff__Fv()")
del_items(0x8014A954)
SetType(0x8014A954, "void StartGoldDrop__Fv()")
del_items(0x8014AA50)
SetType(0x8014AA50, "unsigned char UseInvItem__Fii(int pnum, int cii)")
del_items(0x8014AF74)
SetType(0x8014AF74, "void DoTelekinesis__Fv()")
del_items(0x8014B09C)
SetType(0x8014B09C, "long CalculateGold__Fi(int pnum)")
del_items(0x8014B1D4)
SetType(0x8014B1D4, "unsigned char DropItemBeforeTrig__Fv()")
del_items(0x8014B22C)
SetType(0x8014B22C, "void ControlInv__Fv()")
del_items(0x8014B50C)
SetType(0x8014B50C, "void InvGetItemWH__Fi(int Pos)")
del_items(0x8014B600)
SetType(0x8014B600, "void InvAlignObject__Fv()")
del_items(0x8014B7B4)
SetType(0x8014B7B4, "void InvSetItemCurs__Fv()")
del_items(0x8014B948)
SetType(0x8014B948, "void InvMoveCursLeft__Fv()")
del_items(0x8014BB34)
SetType(0x8014BB34, "void InvMoveCursRight__Fv()")
del_items(0x8014BE5C)
SetType(0x8014BE5C, "void InvMoveCursUp__Fv()")
del_items(0x8014C054)
SetType(0x8014C054, "void InvMoveCursDown__Fv()")
del_items(0x8014C37C)
SetType(0x8014C37C, "void DumpMonsters__7CBlocks(struct CBlocks *this)")
del_items(0x8014C3A4)
SetType(0x8014C3A4, "void Flush__4CPad(struct CPad *this)")
del_items(0x8014C3C8)
SetType(0x8014C3C8, "void SetRGB__6DialogUcUcUc(struct Dialog *this, unsigned char R, unsigned char G, unsigned char B)")
del_items(0x8014C3E8)
SetType(0x8014C3E8, "void SetBack__6Dialogi(struct Dialog *this, int Type)")
del_items(0x8014C3F0)
SetType(0x8014C3F0, "void SetBorder__6Dialogi(struct Dialog *this, int Type)")
del_items(0x8014C3F8)
SetType(0x8014C3F8, "int SetOTpos__6Dialogi(struct Dialog *this, int OT)")
del_items(0x8014C404)
SetType(0x8014C404, "void ___6Dialog(struct Dialog *this, int __in_chrg)")
del_items(0x8014C42C)
SetType(0x8014C42C, "struct Dialog *__6Dialog(struct Dialog *this)")
del_items(0x8014C488)
SetType(0x8014C488, "void StartAutomap__Fv()")
del_items(0x8014C4A0)
SetType(0x8014C4A0, "void AutomapUp__Fv()")
del_items(0x8014C4B8)
SetType(0x8014C4B8, "void AutomapDown__Fv()")
del_items(0x8014C4D0)
SetType(0x8014C4D0, "void AutomapLeft__Fv()")
del_items(0x8014C4E8)
SetType(0x8014C4E8, "void AutomapRight__Fv()")
del_items(0x8014C500)
SetType(0x8014C500, "struct LINE_F2 *AMGetLine__FUcUcUc(unsigned char R, unsigned char G, unsigned char B)")
del_items(0x8014C5AC)
SetType(0x8014C5AC, "void AmDrawLine__Fiiii(int x0, int y0, int x1, int y1)")
del_items(0x8014C614)
SetType(0x8014C614, "void AmDrawPlayer__Fiiii(int x0, int y0, int x1, int y1)")
del_items(0x8014C67C)
SetType(0x8014C67C, "void DrawAutomapPlr__Fv()")
del_items(0x8014CA00)
SetType(0x8014CA00, "void DrawAutoMapVertWall__Fiii(int X, int Y, int Length)")
del_items(0x8014CAD4)
SetType(0x8014CAD4, "void DrawAutoMapHorzWall__Fiii(int X, int Y, int Length)")
del_items(0x8014CBA8)
SetType(0x8014CBA8, "void DrawAutoMapVertDoor__Fii(int X, int Y)")
del_items(0x8014CD7C)
SetType(0x8014CD7C, "void DrawAutoMapHorzDoor__Fii(int X, int Y)")
del_items(0x8014CF54)
SetType(0x8014CF54, "void DrawAutoMapVertGrate__Fii(int X, int Y)")
del_items(0x8014D008)
SetType(0x8014D008, "void DrawAutoMapHorzGrate__Fii(int X, int Y)")
del_items(0x8014D0BC)
SetType(0x8014D0BC, "void DrawAutoMapSquare__Fii(int X, int Y)")
del_items(0x8014D204)
SetType(0x8014D204, "void DrawAutoMapStairs__Fii(int X, int Y)")
del_items(0x8014D404)
SetType(0x8014D404, "void DrawAutomap__Fv()")
del_items(0x8014D820)
SetType(0x8014D820, "void PRIM_GetPrim__FPP7LINE_F2(struct LINE_F2 **Prim)")
|
del_items(2148683532)
set_type(2148683532, 'void GameOnlyTestRoutine__Fv()')
del_items(2148683540)
set_type(2148683540, 'int vecleny__Fii(int a, int b)')
del_items(2148683576)
set_type(2148683576, 'int veclenx__Fii(int a, int b)')
del_items(2148683620)
set_type(2148683620, 'void GetDamageAmt__FiPiT1(int i, int *mind, int *maxd)')
del_items(2148685148)
set_type(2148685148, 'int CheckBlock__Fiiii(int fx, int fy, int tx, int ty)')
del_items(2148685380)
set_type(2148685380, 'int FindClosest__Fiii(int sx, int sy, int rad)')
del_items(2148685792)
set_type(2148685792, 'int GetSpellLevel__Fii(int id, int sn)')
del_items(2148685908)
set_type(2148685908, 'int GetDirection8__Fiiii(int x1, int y1, int x2, int y2)')
del_items(2148686448)
set_type(2148686448, 'void DeleteMissile__Fii(int mi, int i)')
del_items(2148686536)
set_type(2148686536, 'void GetMissileVel__Fiiiiii(int i, int sx, int sy, int dx, int dy, int v)')
del_items(2148686972)
set_type(2148686972, 'void PutMissile__Fi(int i)')
del_items(2148687232)
set_type(2148687232, 'void GetMissilePos__Fi(int i)')
del_items(2148687528)
set_type(2148687528, 'void MoveMissilePos__Fi(int i)')
del_items(2148687888)
set_type(2148687888, 'unsigned char MonsterTrapHit__FiiiiiUc(int m, int mindam, int maxdam, int dist, int t, int shift)')
del_items(2148688772)
set_type(2148688772, 'unsigned char MonsterMHit__FiiiiiiUc(int pnum, int m, int mindam, int maxdam, int dist, int t, int shift)')
del_items(2148690660)
set_type(2148690660, 'unsigned char PlayerMHit__FiiiiiiUcUc(int pnum, int m, int dist, int mind, int maxd, int mtype, int shift, int earflag)')
del_items(2148693328)
set_type(2148693328, 'unsigned char Plr2PlrMHit__FiiiiiiUc(int pnum, int p, int mindam, int maxdam, int dist, int mtype, int shift)')
del_items(2148695340)
set_type(2148695340, 'void CheckMissileCol__FiiiUciiUc(int i, int mindam, int maxdam, unsigned char shift, int mx, int my, int nodel)')
del_items(2148697196)
set_type(2148697196, 'unsigned char GetTableValue__FUci(unsigned char code, int dir)')
del_items(2148697344)
set_type(2148697344, 'void SetMissAnim__Fii(int mi, int animtype)')
del_items(2148697552)
set_type(2148697552, 'void SetMissDir__Fii(int mi, int dir)')
del_items(2148697620)
set_type(2148697620, 'void AddLArrow__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148698100)
set_type(2148698100, 'void AddArrow__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148698544)
set_type(2148698544, 'void GetVileMissPos__Fiii(int mi, int dx, int dy)')
del_items(2148698836)
set_type(2148698836, 'void AddRndTeleport__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148699716)
set_type(2148699716, 'void AddFirebolt__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int micaster, int id, int dam)')
del_items(2148700336)
set_type(2148700336, 'void AddMagmaball__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148700612)
set_type(2148700612, 'void AddTeleport__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148701116)
set_type(2148701116, 'void AddLightball__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148701456)
set_type(2148701456, 'void AddFirewall__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148701944)
set_type(2148701944, 'void AddFireball__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148702548)
set_type(2148702548, 'void AddLightctrl__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148702780)
set_type(2148702780, 'void AddLightning__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148703236)
set_type(2148703236, 'void AddMisexp__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148703760)
set_type(2148703760, 'unsigned char CheckIfTrig__Fii(int x, int y)')
del_items(2148703988)
set_type(2148703988, 'void AddTown__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148705048)
set_type(2148705048, 'void AddFlash__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148705576)
set_type(2148705576, 'void AddFlash2__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148706056)
set_type(2148706056, 'void AddManashield__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148706256)
set_type(2148706256, 'void AddFiremove__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148706604)
set_type(2148706604, 'void AddGuardian__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148707736)
set_type(2148707736, 'void AddChain__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148707828)
set_type(2148707828, 'void AddRhino__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148708272)
set_type(2148708272, 'void AddFlare__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148709032)
set_type(2148709032, 'void AddAcid__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148709292)
set_type(2148709292, 'void AddAcidpud__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148709508)
set_type(2148709508, 'void AddStone__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148710268)
set_type(2148710268, 'void AddGolem__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148710708)
set_type(2148710708, 'void AddBoom__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148710856)
set_type(2148710856, 'void AddHeal__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148711408)
set_type(2148711408, 'void AddHealOther__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148711512)
set_type(2148711512, 'void AddElement__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148712068)
set_type(2148712068, 'void AddIdentify__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148712244)
set_type(2148712244, 'void AddFirewallC__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148712932)
set_type(2148712932, 'void AddInfra__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148713184)
set_type(2148713184, 'void AddWave__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148713316)
set_type(2148713316, 'void AddNova__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148713852)
set_type(2148713852, 'void AddRepair__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148714028)
set_type(2148714028, 'void AddRecharge__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148714204)
set_type(2148714204, 'void AddDisarm__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148714308)
set_type(2148714308, 'void AddApoca__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148714880)
set_type(2148714880, 'void AddFlame__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int seqno)')
del_items(2148715420)
set_type(2148715420, 'void AddFlamec__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148715660)
set_type(2148715660, 'void AddCbolt__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int micaster, int id, int dam)')
del_items(2148716160)
set_type(2148716160, 'void AddHbolt__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int micaster, int id, int dam)')
del_items(2148716608)
set_type(2148716608, 'void AddResurrect__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148716724)
set_type(2148716724, 'void AddResurrectBeam__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148716860)
set_type(2148716860, 'void AddTelekinesis__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148716964)
set_type(2148716964, 'void AddBoneSpirit__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148717472)
set_type(2148717472, 'void AddRportal__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148717632)
set_type(2148717632, 'void AddDiabApoca__Fiiiiiicii(int mi, int sx, int sy, int dx, int dy, int midir, int mienemy, int id, int dam)')
del_items(2148717948)
set_type(2148717948, 'int AddMissile__Fiiiiiiciii(int sx, int sy, int v1, int v2, int midir, int mitype, int micaster, int id, int v3, int spllvl)')
del_items(2148718792)
set_type(2148718792, 'int Sentfire__Fiii(int i, int sx, int sy)')
del_items(2148719276)
set_type(2148719276, 'void MI_Dummy__Fi(int i)')
del_items(2148719284)
set_type(2148719284, 'void MI_Golem__Fi(int i)')
del_items(2148719888)
set_type(2148719888, 'void MI_SetManashield__Fi(int i)')
del_items(2148719948)
set_type(2148719948, 'void MI_LArrow__Fi(int i)')
del_items(2148721928)
set_type(2148721928, 'void MI_Arrow__Fi(int i)')
del_items(2148722468)
set_type(2148722468, 'void MI_Firebolt__Fi(int i)')
del_items(2148724208)
set_type(2148724208, 'void MI_Lightball__Fi(int i)')
del_items(2148724856)
set_type(2148724856, 'void MI_Acidpud__Fi(int i)')
del_items(2148725128)
set_type(2148725128, 'void MI_Firewall__Fi(int i)')
del_items(2148725836)
set_type(2148725836, 'void MI_Fireball__Fi(int i)')
del_items(2148728336)
set_type(2148728336, 'void MI_Lightctrl__Fi(int i)')
del_items(2148729724)
set_type(2148729724, 'void MI_Lightning__Fi(int i)')
del_items(2148730104)
set_type(2148730104, 'void MI_Town__Fi(int i)')
del_items(2148730688)
set_type(2148730688, 'void MI_Flash__Fi(int i)')
del_items(2148731768)
set_type(2148731768, 'void MI_Flash2__Fi(int i)')
del_items(2148732352)
set_type(2148732352, 'void MI_Manashield__Fi(int i)')
del_items(2148733896)
set_type(2148733896, 'void MI_Firemove__Fi(int i)')
del_items(2148734980)
set_type(2148734980, 'void MI_Guardian__Fi(int i)')
del_items(2148735952)
set_type(2148735952, 'void MI_Chain__Fi(int i)')
del_items(2148736716)
set_type(2148736716, 'void MI_Misexp__Fi(int i)')
del_items(2148737484)
set_type(2148737484, 'void MI_Acidsplat__Fi(int i)')
del_items(2148737896)
set_type(2148737896, 'void MI_Teleport__Fi(int i)')
del_items(2148738864)
set_type(2148738864, 'void MI_Stone__Fi(int i)')
del_items(2148739292)
set_type(2148739292, 'void MI_Boom__Fi(int i)')
del_items(2148739540)
set_type(2148739540, 'void MI_Rhino__Fi(int i)')
del_items(2148740480)
set_type(2148740480, 'void MI_FirewallC__Fi(int i)')
del_items(2148741352)
set_type(2148741352, 'void MI_Infra__Fi(int i)')
del_items(2148741536)
set_type(2148741536, 'void MI_Apoca__Fi(int i)')
del_items(2148742196)
set_type(2148742196, 'void MI_Wave__Fi(int i)')
del_items(2148743472)
set_type(2148743472, 'void MI_Nova__Fi(int i)')
del_items(2148744176)
set_type(2148744176, 'void MI_Flame__Fi(int i)')
del_items(2148744680)
set_type(2148744680, 'void MI_Flamec__Fi(int i)')
del_items(2148745328)
set_type(2148745328, 'void MI_Cbolt__Fi(int i)')
del_items(2148746100)
set_type(2148746100, 'void MI_Hbolt__Fi(int i)')
del_items(2148746880)
set_type(2148746880, 'void MI_Element__Fi(int i)')
del_items(2148748600)
set_type(2148748600, 'void MI_Bonespirit__Fi(int i)')
del_items(2148749632)
set_type(2148749632, 'void MI_ResurrectBeam__Fi(int i)')
del_items(2148749744)
set_type(2148749744, 'void MI_Rportal__Fi(int i)')
del_items(2148750292)
set_type(2148750292, 'void ProcessMissiles__Fv()')
del_items(2148751304)
set_type(2148751304, 'void ClearMissileSpot__Fi(int mi)')
del_items(2148751488)
set_type(2148751488, 'void MoveToScrollTarget__7CBlocks(struct CBlocks *this)')
del_items(2148751508)
set_type(2148751508, 'void MonstPartJump__Fi(int m)')
del_items(2148751912)
set_type(2148751912, 'void DeleteMonster__Fi(int i)')
del_items(2148751968)
set_type(2148751968, 'int M_GetDir__Fi(int i)')
del_items(2148752060)
set_type(2148752060, 'void M_StartDelay__Fii(int i, int len)')
del_items(2148752132)
set_type(2148752132, 'void M_StartRAttack__Fiii(int i, int missile_type, int dam)')
del_items(2148752412)
set_type(2148752412, 'void M_StartRSpAttack__Fiii(int i, int missile_type, int dam)')
del_items(2148752704)
set_type(2148752704, 'void M_StartSpAttack__Fi(int i)')
del_items(2148752936)
set_type(2148752936, 'void M_StartEat__Fi(int i)')
del_items(2148753144)
set_type(2148753144, 'void M_GetKnockback__Fi(int i)')
del_items(2148753616)
set_type(2148753616, 'void M_StartHit__Fiii(int i, int pnum, int dam)')
del_items(2148754376)
set_type(2148754376, 'void M_DiabloDeath__FiUc(int i, unsigned char sendmsg)')
del_items(2148755180)
set_type(2148755180, 'void M2MStartHit__Fiii(int mid, int i, int dam)')
del_items(2148755864)
set_type(2148755864, 'void MonstStartKill__FiiUc(int i, int pnum, unsigned char sendmsg)')
del_items(2148756588)
set_type(2148756588, 'void M2MStartKill__Fii(int i, int mid)')
del_items(2148757556)
set_type(2148757556, 'void M_StartKill__Fii(int i, int pnum)')
del_items(2148757796)
set_type(2148757796, 'void M_StartFadein__FiiUc(int i, int md, unsigned char backwards)')
del_items(2148758136)
set_type(2148758136, 'void M_StartFadeout__FiiUc(int i, int md, unsigned char backwards)')
del_items(2148758464)
set_type(2148758464, 'void M_StartHeal__Fi(int i)')
del_items(2148758592)
set_type(2148758592, 'void M_ChangeLightOffset__Fi(int monst)')
del_items(2148758752)
set_type(2148758752, 'int M_DoStand__Fi(int i)')
del_items(2148758856)
set_type(2148758856, 'int M_DoWalk__Fi(int i)')
del_items(2148759500)
set_type(2148759500, 'int M_DoWalk2__Fi(int i)')
del_items(2148759992)
set_type(2148759992, 'int M_DoWalk3__Fi(int i)')
del_items(2148760700)
set_type(2148760700, 'void M_TryM2MHit__Fiiiii(int i, int mid, int hper, int mind, int maxd)')
del_items(2148761156)
set_type(2148761156, 'void M_TryH2HHit__Fiiiii(int i, int pnum, int Hit, int MinDam, int MaxDam)')
del_items(2148762712)
set_type(2148762712, 'int M_DoAttack__Fi(int i)')
del_items(2148763132)
set_type(2148763132, 'int M_DoRAttack__Fi(int i)')
del_items(2148763508)
set_type(2148763508, 'int M_DoRSpAttack__Fi(int i)')
del_items(2148764004)
set_type(2148764004, 'int M_DoSAttack__Fi(int i)')
del_items(2148764216)
set_type(2148764216, 'int M_DoFadein__Fi(int i)')
del_items(2148764424)
set_type(2148764424, 'int M_DoFadeout__Fi(int i)')
del_items(2148764700)
set_type(2148764700, 'int M_DoHeal__Fi(int i)')
del_items(2148764872)
set_type(2148764872, 'int M_DoTalk__Fi(int i)')
del_items(2148766004)
set_type(2148766004, 'void M_Teleport__Fi(int i)')
del_items(2148766568)
set_type(2148766568, 'int M_DoGotHit__Fi(int i)')
del_items(2148766664)
set_type(2148766664, 'void DoEnding__Fv()')
del_items(2148766836)
set_type(2148766836, 'void PrepDoEnding__Fv()')
del_items(2148767128)
set_type(2148767128, 'int M_DoDeath__Fi(int i)')
del_items(2148767592)
set_type(2148767592, 'int M_DoSpStand__Fi(int i)')
del_items(2148767756)
set_type(2148767756, 'int M_DoDelay__Fi(int i)')
del_items(2148767996)
set_type(2148767996, 'int M_DoStone__Fi(int i)')
del_items(2148768128)
set_type(2148768128, 'void M_WalkDir__Fii(int i, int md)')
del_items(2148768680)
set_type(2148768680, 'void GroupUnity__Fi(int i)')
del_items(2148769684)
set_type(2148769684, 'unsigned char M_CallWalk__Fii(int i, int md)')
del_items(2148770176)
set_type(2148770176, 'unsigned char M_PathWalk__Fi(int i, char plr2monst[9], unsigned char (*Check)())')
del_items(2148770372)
set_type(2148770372, 'unsigned char M_CallWalk2__Fii(int i, int md)')
del_items(2148770648)
set_type(2148770648, 'unsigned char M_DumbWalk__Fii(int i, int md)')
del_items(2148770732)
set_type(2148770732, 'unsigned char M_RoundWalk__FiiRi(int i, int md, int *dir)')
del_items(2148771148)
set_type(2148771148, 'void MAI_Zombie__Fi(int i)')
del_items(2148771652)
set_type(2148771652, 'void MAI_SkelSd__Fi(int i)')
del_items(2148772060)
set_type(2148772060, 'void MAI_Snake__Fi(int i)')
del_items(2148773056)
set_type(2148773056, 'void MAI_Bat__Fi(int i)')
del_items(2148774008)
set_type(2148774008, 'void MAI_SkelBow__Fi(int i)')
del_items(2148774492)
set_type(2148774492, 'void MAI_Fat__Fi(int i)')
del_items(2148774924)
set_type(2148774924, 'void MAI_Sneak__Fi(int i)')
del_items(2148775928)
set_type(2148775928, 'void MAI_Fireman__Fi(int i)')
del_items(2148776688)
set_type(2148776688, 'void MAI_Fallen__Fi(int i)')
del_items(2148777484)
set_type(2148777484, 'void MAI_Cleaver__Fi(int i)')
del_items(2148777716)
set_type(2148777716, 'void MAI_Round__FiUc(int i, unsigned char special)')
del_items(2148778848)
set_type(2148778848, 'void MAI_GoatMc__Fi(int i)')
del_items(2148778880)
set_type(2148778880, 'void MAI_Ranged__FiiUc(int i, int missile_type, unsigned char special)')
del_items(2148779424)
set_type(2148779424, 'void MAI_GoatBow__Fi(int i)')
del_items(2148779460)
set_type(2148779460, 'void MAI_Succ__Fi(int i)')
del_items(2148779496)
set_type(2148779496, 'void MAI_AcidUniq__Fi(int i)')
del_items(2148779532)
set_type(2148779532, 'void MAI_Scav__Fi(int i)')
del_items(2148780580)
set_type(2148780580, 'void MAI_Garg__Fi(int i)')
del_items(2148781060)
set_type(2148781060, 'void MAI_RoundRanged__FiiUciUc(int i, int missile_type, unsigned char checkdoors, int dam, int lessmissiles)')
del_items(2148782360)
set_type(2148782360, 'void MAI_Magma__Fi(int i)')
del_items(2148782404)
set_type(2148782404, 'void MAI_Storm__Fi(int i)')
del_items(2148782448)
set_type(2148782448, 'void MAI_Acid__Fi(int i)')
del_items(2148782496)
set_type(2148782496, 'void MAI_Diablo__Fi(int i)')
del_items(2148782540)
set_type(2148782540, 'void MAI_RR2__Fiii(int i, int mistype, int dam)')
del_items(2148783820)
set_type(2148783820, 'void MAI_Mega__Fi(int i)')
del_items(2148783856)
set_type(2148783856, 'void MAI_SkelKing__Fi(int i)')
del_items(2148785196)
set_type(2148785196, 'void MAI_Rhino__Fi(int i)')
del_items(2148786388)
set_type(2148786388, 'void MAI_Counselor__Fi(int i, unsigned char counsmiss[4], int _mx, int _my)')
del_items(2148787616)
set_type(2148787616, 'void MAI_Garbud__Fi(int i)')
del_items(2148788048)
set_type(2148788048, 'void MAI_Zhar__Fi(int i)')
del_items(2148788552)
set_type(2148788552, 'void MAI_SnotSpil__Fi(int i)')
del_items(2148789116)
set_type(2148789116, 'void MAI_Lazurus__Fi(int i)')
del_items(2148789748)
set_type(2148789748, 'void MAI_Lazhelp__Fi(int i)')
del_items(2148790036)
set_type(2148790036, 'void MAI_Lachdanan__Fi(int i)')
del_items(2148790436)
set_type(2148790436, 'void MAI_Warlord__Fi(int i)')
del_items(2148790768)
set_type(2148790768, 'void DeleteMonsterList__Fv()')
del_items(2148791052)
set_type(2148791052, 'void ProcessMonsters__Fv()')
del_items(2148792468)
set_type(2148792468, 'unsigned char DirOK__Fii(int i, int mdir)')
del_items(2148793468)
set_type(2148793468, 'unsigned char PosOkMissile__Fii(int x, int y)')
del_items(2148793572)
set_type(2148793572, 'unsigned char CheckNoSolid__Fii(int x, int y)')
del_items(2148793640)
set_type(2148793640, 'unsigned char LineClearF__FPFii_Uciiii(unsigned char (*Clear)(), int x1, int y1, int x2, int y2)')
del_items(2148794288)
set_type(2148794288, 'unsigned char LineClear__Fiiii(int x1, int y1, int x2, int y2)')
del_items(2148794352)
set_type(2148794352, 'unsigned char LineClearF1__FPFiii_Uciiiii(unsigned char (*Clear)(), int monst, int x1, int y1, int x2, int y2)')
del_items(2148795012)
set_type(2148795012, 'void M_FallenFear__Fii(int x, int y)')
del_items(2148795476)
set_type(2148795476, 'void PrintMonstHistory__Fi(int mt)')
del_items(2148796028)
set_type(2148796028, 'void PrintUniqueHistory__Fv()')
del_items(2148796320)
set_type(2148796320, 'void MissToMonst__Fiii(int i, int x, int y)')
del_items(2148797444)
set_type(2148797444, 'unsigned char PosOkMonst2__Fiii(int i, int x, int y)')
del_items(2148797984)
set_type(2148797984, 'unsigned char PosOkMonst3__Fiii(int i, int x, int y)')
del_items(2148798740)
set_type(2148798740, 'int M_SpawnSkel__Fiii(int x, int y, int dir)')
del_items(2148799084)
set_type(2148799084, 'void TalktoMonster__Fi(int i)')
del_items(2148799372)
set_type(2148799372, 'void SpawnGolum__Fiiii(int i, int x, int y, int mi)')
del_items(2148799972)
set_type(2148799972, 'unsigned char CanTalkToMonst__Fi(int m)')
del_items(2148800028)
set_type(2148800028, 'unsigned char CheckMonsterHit__FiRUc(int m, unsigned char *ret)')
del_items(2148800232)
set_type(2148800232, 'void MAI_Golum__Fi(int i)')
del_items(2148801116)
set_type(2148801116, 'unsigned char MAI_Path__Fi(int i)')
del_items(2148801472)
set_type(2148801472, 'void M_StartAttack__Fi(int i)')
del_items(2148801704)
set_type(2148801704, 'void M_StartWalk__Fiiiiii(int i, int xvel, int yvel, int xadd, int yadd, int EndDir)')
del_items(2148802056)
set_type(2148802056, 'void FreeInvGFX__Fv()')
del_items(2148802064)
set_type(2148802064, 'void InvDrawSlot__Fiii(int X, int Y, int Frame)')
del_items(2148802196)
set_type(2148802196, 'void InvDrawSlotBack__FiiiiUc(int X, int Y, int W, int H, int Flag)')
del_items(2148802792)
set_type(2148802792, 'void InvDrawItem__FiiiUci(int ItemX, int ItemY, int ItemNo, unsigned char StatFlag, int TransFlag)')
del_items(2148803000)
set_type(2148803000, 'void InvDrawSlots__Fv()')
del_items(2148803728)
set_type(2148803728, 'void PrintStat__FiiPcUc(int Y, int Txt0, char *Txt1, unsigned char Col)')
del_items(2148803932)
set_type(2148803932, 'void DrawInvStats__Fv()')
del_items(2148806888)
set_type(2148806888, 'void DrawInvBack__Fv()')
del_items(2148807024)
set_type(2148807024, 'void DrawInvCursor__Fv()')
del_items(2148808268)
set_type(2148808268, 'void DrawInvMsg__Fv()')
del_items(2148808724)
set_type(2148808724, 'void DrawInvUnique__Fv()')
del_items(2148809016)
set_type(2148809016, 'void DrawInv__Fv()')
del_items(2148809080)
set_type(2148809080, 'void DrawInvTSK__FP4TASK(struct TASK *T)')
del_items(2148809896)
set_type(2148809896, 'void DoThatDrawInv__Fv()')
del_items(2148811888)
set_type(2148811888, 'unsigned char AutoPlace__FiiiiUc(int pnum, int ii, int sx, int sy, int saveflag)')
del_items(2148812688)
set_type(2148812688, 'unsigned char SpecialAutoPlace__FiiiiUc(int pnum, int ii, int sx, int sy, int saveflag)')
del_items(2148813612)
set_type(2148813612, 'unsigned char GoldAutoPlace__Fi(int pnum)')
del_items(2148814844)
set_type(2148814844, 'unsigned char WeaponAutoPlace__Fi(int pnum)')
del_items(2148815496)
set_type(2148815496, 'int SwapItem__FP10ItemStructT0(struct ItemStruct *a, struct ItemStruct *b)')
del_items(2148815748)
set_type(2148815748, 'void CheckInvPaste__Fiii(int pnum, int mx, int my)')
del_items(2148823152)
set_type(2148823152, 'void CheckInvCut__Fiii(int pnum, int mx, int my)')
del_items(2148825888)
set_type(2148825888, 'void RemoveInvItem__Fii(int pnum, int iv)')
del_items(2148826568)
set_type(2148826568, 'void RemoveSpdBarItem__Fii(int pnum, int iv)')
del_items(2148826824)
set_type(2148826824, 'void CheckInvScrn__Fv()')
del_items(2148826944)
set_type(2148826944, 'void CheckItemStats__Fi(int pnum)')
del_items(2148827076)
set_type(2148827076, 'void CheckBookLevel__Fi(int pnum)')
del_items(2148827384)
set_type(2148827384, 'void CheckQuestItem__Fi(int pnum)')
del_items(2148828448)
set_type(2148828448, 'void InvGetItem__Fii(int pnum, int ii)')
del_items(2148829212)
set_type(2148829212, 'void AutoGetItem__Fii(int pnum, int ii)')
del_items(2148831884)
set_type(2148831884, 'int FindGetItem__FiUsi(int idx, unsigned short ci, int iseed)')
del_items(2148832064)
set_type(2148832064, 'void SyncGetItem__FiiiUsi(int x, int y, int idx, unsigned short ci, int iseed)')
del_items(2148832460)
set_type(2148832460, 'unsigned char TryInvPut__Fv()')
del_items(2148832916)
set_type(2148832916, 'int InvPutItem__Fiii(int pnum, int x, int y)')
del_items(2148834108)
set_type(2148834108, 'int SyncPutItem__FiiiiUsiUciiiiiUl(int pnum, int x, int y, int idx, int icreateinfo, int iseed, int Id, int dur, int mdur, int ch, int mch, int ivalue, unsigned long ibuff)')
del_items(2148835480)
set_type(2148835480, 'char CheckInvHLight__Fv()')
del_items(2148836320)
set_type(2148836320, 'void RemoveScroll__Fi(int pnum)')
del_items(2148836804)
set_type(2148836804, 'unsigned char UseScroll__Fv()')
del_items(2148837420)
set_type(2148837420, 'void UseStaffCharge__FP12PlayerStruct(struct PlayerStruct *ptrplr)')
del_items(2148837524)
set_type(2148837524, 'unsigned char UseStaff__Fv()')
del_items(2148837716)
set_type(2148837716, 'void StartGoldDrop__Fv()')
del_items(2148837968)
set_type(2148837968, 'unsigned char UseInvItem__Fii(int pnum, int cii)')
del_items(2148839284)
set_type(2148839284, 'void DoTelekinesis__Fv()')
del_items(2148839580)
set_type(2148839580, 'long CalculateGold__Fi(int pnum)')
del_items(2148839892)
set_type(2148839892, 'unsigned char DropItemBeforeTrig__Fv()')
del_items(2148839980)
set_type(2148839980, 'void ControlInv__Fv()')
del_items(2148840716)
set_type(2148840716, 'void InvGetItemWH__Fi(int Pos)')
del_items(2148840960)
set_type(2148840960, 'void InvAlignObject__Fv()')
del_items(2148841396)
set_type(2148841396, 'void InvSetItemCurs__Fv()')
del_items(2148841800)
set_type(2148841800, 'void InvMoveCursLeft__Fv()')
del_items(2148842292)
set_type(2148842292, 'void InvMoveCursRight__Fv()')
del_items(2148843100)
set_type(2148843100, 'void InvMoveCursUp__Fv()')
del_items(2148843604)
set_type(2148843604, 'void InvMoveCursDown__Fv()')
del_items(2148844412)
set_type(2148844412, 'void DumpMonsters__7CBlocks(struct CBlocks *this)')
del_items(2148844452)
set_type(2148844452, 'void Flush__4CPad(struct CPad *this)')
del_items(2148844488)
set_type(2148844488, 'void SetRGB__6DialogUcUcUc(struct Dialog *this, unsigned char R, unsigned char G, unsigned char B)')
del_items(2148844520)
set_type(2148844520, 'void SetBack__6Dialogi(struct Dialog *this, int Type)')
del_items(2148844528)
set_type(2148844528, 'void SetBorder__6Dialogi(struct Dialog *this, int Type)')
del_items(2148844536)
set_type(2148844536, 'int SetOTpos__6Dialogi(struct Dialog *this, int OT)')
del_items(2148844548)
set_type(2148844548, 'void ___6Dialog(struct Dialog *this, int __in_chrg)')
del_items(2148844588)
set_type(2148844588, 'struct Dialog *__6Dialog(struct Dialog *this)')
del_items(2148844680)
set_type(2148844680, 'void StartAutomap__Fv()')
del_items(2148844704)
set_type(2148844704, 'void AutomapUp__Fv()')
del_items(2148844728)
set_type(2148844728, 'void AutomapDown__Fv()')
del_items(2148844752)
set_type(2148844752, 'void AutomapLeft__Fv()')
del_items(2148844776)
set_type(2148844776, 'void AutomapRight__Fv()')
del_items(2148844800)
set_type(2148844800, 'struct LINE_F2 *AMGetLine__FUcUcUc(unsigned char R, unsigned char G, unsigned char B)')
del_items(2148844972)
set_type(2148844972, 'void AmDrawLine__Fiiii(int x0, int y0, int x1, int y1)')
del_items(2148845076)
set_type(2148845076, 'void AmDrawPlayer__Fiiii(int x0, int y0, int x1, int y1)')
del_items(2148845180)
set_type(2148845180, 'void DrawAutomapPlr__Fv()')
del_items(2148846080)
set_type(2148846080, 'void DrawAutoMapVertWall__Fiii(int X, int Y, int Length)')
del_items(2148846292)
set_type(2148846292, 'void DrawAutoMapHorzWall__Fiii(int X, int Y, int Length)')
del_items(2148846504)
set_type(2148846504, 'void DrawAutoMapVertDoor__Fii(int X, int Y)')
del_items(2148846972)
set_type(2148846972, 'void DrawAutoMapHorzDoor__Fii(int X, int Y)')
del_items(2148847444)
set_type(2148847444, 'void DrawAutoMapVertGrate__Fii(int X, int Y)')
del_items(2148847624)
set_type(2148847624, 'void DrawAutoMapHorzGrate__Fii(int X, int Y)')
del_items(2148847804)
set_type(2148847804, 'void DrawAutoMapSquare__Fii(int X, int Y)')
del_items(2148848132)
set_type(2148848132, 'void DrawAutoMapStairs__Fii(int X, int Y)')
del_items(2148848644)
set_type(2148848644, 'void DrawAutomap__Fv()')
del_items(2148849696)
set_type(2148849696, 'void PRIM_GetPrim__FPP7LINE_F2(struct LINE_F2 **Prim)')
|
info = {
'driver_path' : "\\\\webdriver\\\\content\\\\geckodriver.exe",
'profile_path' : "\\\\webdriver\\\\content\\\\firefox_profile",
'primary_url' : "https://web.whatsapp.com",
'send_url' : "https://web.whatsapp.com/send?phone={}&text={}",
'send_button_class_name' : "_2Ujuu"
}
|
info = {'driver_path': '\\\\webdriver\\\\content\\\\geckodriver.exe', 'profile_path': '\\\\webdriver\\\\content\\\\firefox_profile', 'primary_url': 'https://web.whatsapp.com', 'send_url': 'https://web.whatsapp.com/send?phone={}&text={}', 'send_button_class_name': '_2Ujuu'}
|
class Group(object):
def __init__(self, _name):
self.name = _name
self.groups = []
self.users = []
def add_group(self, group):
self.groups.append(group)
def add_user(self, user):
self.users.append(user)
def get_groups(self):
return self.groups
def get_users(self):
return self.users
def get_name(self):
return self.name
def is_user_in_group(user=None, group=None):
"""
Return True if user is in the group, False otherwise.
Args:
user(str): user name/id
group(class:Group): group to check user membership against
"""
if user == None:
return "User input missing"
elif group == None:
return "Group input missing"
if not isinstance(group, Group):
return "Invalid group!"
users = group.get_users()
groups = group.get_groups()
for sub_user in users:
if sub_user == user:
return True
for sub_group in groups:
return is_user_in_group(user, sub_group)
return False
# all assert should be pass
parent = Group("parent")
assert(is_user_in_group("parent", parent) == False)
child = Group("child")
sub_child = Group("subchild")
sub_sub_child = Group("sub2child")
sub_sub_child.add_user("sub2child")
assert(is_user_in_group("sub2child", parent) == False)
sub_child_user = "sub_child_user"
sub_child.add_user(sub_child_user)
sub_child.add_user("youngqueenz")
sub_child.add_group(sub_sub_child)
assert(is_user_in_group("sub2child", sub_child) == True)
child.add_group(sub_child)
parent.add_group(child)
assert(is_user_in_group("youngqueenz", parent) == True)
assert(is_user_in_group('youngqueenz', 'group') == "Invalid group!")
assert(is_user_in_group('youngqueenz') == 'Group input missing')
assert(is_user_in_group(group=parent) == "User input missing")
|
class Group(object):
def __init__(self, _name):
self.name = _name
self.groups = []
self.users = []
def add_group(self, group):
self.groups.append(group)
def add_user(self, user):
self.users.append(user)
def get_groups(self):
return self.groups
def get_users(self):
return self.users
def get_name(self):
return self.name
def is_user_in_group(user=None, group=None):
"""
Return True if user is in the group, False otherwise.
Args:
user(str): user name/id
group(class:Group): group to check user membership against
"""
if user == None:
return 'User input missing'
elif group == None:
return 'Group input missing'
if not isinstance(group, Group):
return 'Invalid group!'
users = group.get_users()
groups = group.get_groups()
for sub_user in users:
if sub_user == user:
return True
for sub_group in groups:
return is_user_in_group(user, sub_group)
return False
parent = group('parent')
assert is_user_in_group('parent', parent) == False
child = group('child')
sub_child = group('subchild')
sub_sub_child = group('sub2child')
sub_sub_child.add_user('sub2child')
assert is_user_in_group('sub2child', parent) == False
sub_child_user = 'sub_child_user'
sub_child.add_user(sub_child_user)
sub_child.add_user('youngqueenz')
sub_child.add_group(sub_sub_child)
assert is_user_in_group('sub2child', sub_child) == True
child.add_group(sub_child)
parent.add_group(child)
assert is_user_in_group('youngqueenz', parent) == True
assert is_user_in_group('youngqueenz', 'group') == 'Invalid group!'
assert is_user_in_group('youngqueenz') == 'Group input missing'
assert is_user_in_group(group=parent) == 'User input missing'
|
config = {
"colors": {
"WHITE": (255, 255, 255),
"RED": (255, 0, 0),
"GREEN": (0, 255, 0),
"BLACK": (0, 0, 0)
},
"globals": {
"WIDTH": 600,
"HEIGHT": 400,
"BALL_RADIUS": 20,
"PAD_WIDTH": 8,
"PAD_HEIGHT": 80
}
}
|
config = {'colors': {'WHITE': (255, 255, 255), 'RED': (255, 0, 0), 'GREEN': (0, 255, 0), 'BLACK': (0, 0, 0)}, 'globals': {'WIDTH': 600, 'HEIGHT': 400, 'BALL_RADIUS': 20, 'PAD_WIDTH': 8, 'PAD_HEIGHT': 80}}
|
"""Mel cepstral distortion (MCD) computations in python."""
# Copyright 2014, 2015, 2016, 2017 Matt Shannon
# This file is part of mcd.
# See `License` for details of license and warranty.
__version__ = '0.5.dev1'
|
"""Mel cepstral distortion (MCD) computations in python."""
__version__ = '0.5.dev1'
|
#!/usr/bin/env python
# Income Share Agreement
min = 50000.0
max = 88235.3
max_pay = 30000.0
max_income = 2117647.06
monthly_increment = (max - min)/23
print('\n24 months maximum payment with a minimum of $50,000 annual income')
print('Maximum income for 24 month repayment is $88,235.30\n')
print('For incomes exceeding $88,235.30 see chart below,\nfor reduced payback period on $30,000 repayment cap')
print('\nmonth\tannual_income\tless_isa\tmonthly\t\tless_isa\tmonthly_payment\n')
for n in range(24):
print(
"%d\t%.2f\t%.2f\t%.2f\t\t%.2f\t\t%.2f" % (n+1, (min+(n*monthly_increment)), (min+(n*monthly_increment))*0.83, (min+(n*monthly_increment))/12, (min+(n*monthly_increment))*0.83/12, ((min+(n*monthly_increment))/12) - (min+(n*monthly_increment))*0.83/12
))
print('\n')
print('$30,000 Maximum Shared Income\n')
print('total\t\tannual\t\tmonthly\npayments\tincome\t\tpayment\n')
for n in range(24,0,-1):
print('%d\t\t%.2f\t%.2f' % (n, max/(max*n/max_income), max_pay/n))
print('\n')
|
min = 50000.0
max = 88235.3
max_pay = 30000.0
max_income = 2117647.06
monthly_increment = (max - min) / 23
print('\n24 months maximum payment with a minimum of $50,000 annual income')
print('Maximum income for 24 month repayment is $88,235.30\n')
print('For incomes exceeding $88,235.30 see chart below,\nfor reduced payback period on $30,000 repayment cap')
print('\nmonth\tannual_income\tless_isa\tmonthly\t\tless_isa\tmonthly_payment\n')
for n in range(24):
print('%d\t%.2f\t%.2f\t%.2f\t\t%.2f\t\t%.2f' % (n + 1, min + n * monthly_increment, (min + n * monthly_increment) * 0.83, (min + n * monthly_increment) / 12, (min + n * monthly_increment) * 0.83 / 12, (min + n * monthly_increment) / 12 - (min + n * monthly_increment) * 0.83 / 12))
print('\n')
print('$30,000 Maximum Shared Income\n')
print('total\t\tannual\t\tmonthly\npayments\tincome\t\tpayment\n')
for n in range(24, 0, -1):
print('%d\t\t%.2f\t%.2f' % (n, max / (max * n / max_income), max_pay / n))
print('\n')
|
#
# PySNMP MIB module IANA-IPPM-METRICS-REGISTRY-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/IANA-IPPM-METRICS-REGISTRY-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:38:44 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ConstraintsUnion")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
TimeTicks, mib_2, ObjectIdentity, NotificationType, IpAddress, Integer32, MibIdentifier, iso, Unsigned32, ModuleIdentity, Bits, Gauge32, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "TimeTicks", "mib-2", "ObjectIdentity", "NotificationType", "IpAddress", "Integer32", "MibIdentifier", "iso", "Unsigned32", "ModuleIdentity", "Bits", "Gauge32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "Counter64")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
ianaIppmMetricsRegistry = ModuleIdentity((1, 3, 6, 1, 2, 1, 128))
ianaIppmMetricsRegistry.setRevisions(('2015-08-14 00:00', '2014-05-22 00:00', '2010-09-07 00:00', '2009-09-02 00:00', '2009-04-20 00:00', '2006-12-04 00:00', '2005-04-12 00:00',))
if mibBuilder.loadTexts: ianaIppmMetricsRegistry.setLastUpdated('201508140000Z')
if mibBuilder.loadTexts: ianaIppmMetricsRegistry.setOrganization('IANA')
ianaIppmMetrics = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1))
if mibBuilder.loadTexts: ianaIppmMetrics.setStatus('current')
ietfInstantUnidirConnectivity = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 1))
if mibBuilder.loadTexts: ietfInstantUnidirConnectivity.setStatus('current')
ietfInstantBidirConnectivity = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 2))
if mibBuilder.loadTexts: ietfInstantBidirConnectivity.setStatus('current')
ietfIntervalUnidirConnectivity = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 3))
if mibBuilder.loadTexts: ietfIntervalUnidirConnectivity.setStatus('current')
ietfIntervalBidirConnectivity = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 4))
if mibBuilder.loadTexts: ietfIntervalBidirConnectivity.setStatus('current')
ietfIntervalTemporalConnectivity = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 5))
if mibBuilder.loadTexts: ietfIntervalTemporalConnectivity.setStatus('current')
ietfOneWayDelay = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 6))
if mibBuilder.loadTexts: ietfOneWayDelay.setStatus('current')
ietfOneWayDelayPoissonStream = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 7))
if mibBuilder.loadTexts: ietfOneWayDelayPoissonStream.setStatus('current')
ietfOneWayDelayPercentile = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 8))
if mibBuilder.loadTexts: ietfOneWayDelayPercentile.setStatus('current')
ietfOneWayDelayMedian = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 9))
if mibBuilder.loadTexts: ietfOneWayDelayMedian.setStatus('current')
ietfOneWayDelayMinimum = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 10))
if mibBuilder.loadTexts: ietfOneWayDelayMinimum.setStatus('current')
ietfOneWayDelayInversePercentile = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 11))
if mibBuilder.loadTexts: ietfOneWayDelayInversePercentile.setStatus('current')
ietfOneWayPktLoss = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 12))
if mibBuilder.loadTexts: ietfOneWayPktLoss.setStatus('current')
ietfOneWayPktLossPoissonStream = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 13))
if mibBuilder.loadTexts: ietfOneWayPktLossPoissonStream.setStatus('current')
ietfOneWayPktLossAverage = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 14))
if mibBuilder.loadTexts: ietfOneWayPktLossAverage.setStatus('current')
ietfRoundTripDelay = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 15))
if mibBuilder.loadTexts: ietfRoundTripDelay.setStatus('current')
ietfRoundTripDelayPoissonStream = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 16))
if mibBuilder.loadTexts: ietfRoundTripDelayPoissonStream.setStatus('current')
ietfRoundTripDelayPercentile = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 17))
if mibBuilder.loadTexts: ietfRoundTripDelayPercentile.setStatus('current')
ietfRoundTripDelayMedian = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 18))
if mibBuilder.loadTexts: ietfRoundTripDelayMedian.setStatus('current')
ietfRoundTripDelayMinimum = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 19))
if mibBuilder.loadTexts: ietfRoundTripDelayMinimum.setStatus('current')
ietfRoundTripDelayInvPercentile = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 20))
if mibBuilder.loadTexts: ietfRoundTripDelayInvPercentile.setStatus('current')
ietfOneWayLossDistanceStream = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 21))
if mibBuilder.loadTexts: ietfOneWayLossDistanceStream.setStatus('current')
ietfOneWayLossPeriodStream = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 22))
if mibBuilder.loadTexts: ietfOneWayLossPeriodStream.setStatus('current')
ietfOneWayLossNoticeableRate = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 23))
if mibBuilder.loadTexts: ietfOneWayLossNoticeableRate.setStatus('current')
ietfOneWayLossPeriodTotal = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 24))
if mibBuilder.loadTexts: ietfOneWayLossPeriodTotal.setStatus('current')
ietfOneWayLossPeriodLengths = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 25))
if mibBuilder.loadTexts: ietfOneWayLossPeriodLengths.setStatus('current')
ietfOneWayInterLossPeriodLengths = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 26))
if mibBuilder.loadTexts: ietfOneWayInterLossPeriodLengths.setStatus('current')
ietfOneWayIpdv = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 27))
if mibBuilder.loadTexts: ietfOneWayIpdv.setStatus('current')
ietfOneWayIpdvPoissonStream = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 28))
if mibBuilder.loadTexts: ietfOneWayIpdvPoissonStream.setStatus('current')
ietfOneWayIpdvPercentile = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 29))
if mibBuilder.loadTexts: ietfOneWayIpdvPercentile.setStatus('current')
ietfOneWayIpdvInversePercentile = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 30))
if mibBuilder.loadTexts: ietfOneWayIpdvInversePercentile.setStatus('current')
ietfOneWayIpdvJitter = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 31))
if mibBuilder.loadTexts: ietfOneWayIpdvJitter.setStatus('current')
ietfOneWayPeakToPeakIpdv = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 32))
if mibBuilder.loadTexts: ietfOneWayPeakToPeakIpdv.setStatus('current')
ietfOneWayDelayPeriodicStream = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 33))
if mibBuilder.loadTexts: ietfOneWayDelayPeriodicStream.setStatus('current')
ietfReorderedSingleton = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 34))
if mibBuilder.loadTexts: ietfReorderedSingleton.setStatus('current')
ietfReorderedPacketRatio = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 35))
if mibBuilder.loadTexts: ietfReorderedPacketRatio.setStatus('current')
ietfReorderingExtent = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 36))
if mibBuilder.loadTexts: ietfReorderingExtent.setStatus('current')
ietfReorderingLateTimeOffset = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 37))
if mibBuilder.loadTexts: ietfReorderingLateTimeOffset.setStatus('current')
ietfReorderingByteOffset = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 38))
if mibBuilder.loadTexts: ietfReorderingByteOffset.setStatus('current')
ietfReorderingGap = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 39))
if mibBuilder.loadTexts: ietfReorderingGap.setStatus('current')
ietfReorderingGapTime = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 40))
if mibBuilder.loadTexts: ietfReorderingGapTime.setStatus('current')
ietfReorderingFreeRunx = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 41))
if mibBuilder.loadTexts: ietfReorderingFreeRunx.setStatus('current')
ietfReorderingFreeRunq = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 42))
if mibBuilder.loadTexts: ietfReorderingFreeRunq.setStatus('current')
ietfReorderingFreeRunp = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 43))
if mibBuilder.loadTexts: ietfReorderingFreeRunp.setStatus('current')
ietfReorderingFreeRuna = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 44))
if mibBuilder.loadTexts: ietfReorderingFreeRuna.setStatus('current')
ietfnReordering = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 45))
if mibBuilder.loadTexts: ietfnReordering.setStatus('current')
ietfOneWayPacketArrivalCount = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 46))
if mibBuilder.loadTexts: ietfOneWayPacketArrivalCount.setStatus('current')
ietfOneWayPacketDuplication = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 47))
if mibBuilder.loadTexts: ietfOneWayPacketDuplication.setStatus('current')
ietfOneWayPacketDuplicationPoissonStream = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 48))
if mibBuilder.loadTexts: ietfOneWayPacketDuplicationPoissonStream.setStatus('current')
ietfOneWayPacketDuplicationPeriodicStream = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 49))
if mibBuilder.loadTexts: ietfOneWayPacketDuplicationPeriodicStream.setStatus('current')
ietfOneWayPacketDuplicationFraction = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 50))
if mibBuilder.loadTexts: ietfOneWayPacketDuplicationFraction.setStatus('current')
ietfOneWayReplicatedPacketRate = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 51))
if mibBuilder.loadTexts: ietfOneWayReplicatedPacketRate.setStatus('current')
ietfSpatialOneWayDelayVector = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 52))
if mibBuilder.loadTexts: ietfSpatialOneWayDelayVector.setStatus('current')
ietfSpatialPacketLossVector = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 53))
if mibBuilder.loadTexts: ietfSpatialPacketLossVector.setStatus('current')
ietfSpatialOneWayIpdvVector = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 54))
if mibBuilder.loadTexts: ietfSpatialOneWayIpdvVector.setStatus('current')
ietfSegmentOneWayDelayStream = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 55))
if mibBuilder.loadTexts: ietfSegmentOneWayDelayStream.setStatus('current')
ietfSegmentPacketLossStream = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 56))
if mibBuilder.loadTexts: ietfSegmentPacketLossStream.setStatus('current')
ietfSegmentIpdvPrevStream = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 57))
if mibBuilder.loadTexts: ietfSegmentIpdvPrevStream.setStatus('current')
ietfSegmentIpdvMinStream = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 58))
if mibBuilder.loadTexts: ietfSegmentIpdvMinStream.setStatus('current')
ietfOneToGroupDelayVector = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 59))
if mibBuilder.loadTexts: ietfOneToGroupDelayVector.setStatus('current')
ietfOneToGroupPacketLossVector = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 60))
if mibBuilder.loadTexts: ietfOneToGroupPacketLossVector.setStatus('current')
ietfOneToGroupIpdvVector = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 61))
if mibBuilder.loadTexts: ietfOneToGroupIpdvVector.setStatus('current')
ietfOnetoGroupReceiverNMeanDelay = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 62))
if mibBuilder.loadTexts: ietfOnetoGroupReceiverNMeanDelay.setStatus('current')
ietfOneToGroupMeanDelay = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 63))
if mibBuilder.loadTexts: ietfOneToGroupMeanDelay.setStatus('current')
ietfOneToGroupRangeMeanDelay = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 64))
if mibBuilder.loadTexts: ietfOneToGroupRangeMeanDelay.setStatus('current')
ietfOneToGroupMaxMeanDelay = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 65))
if mibBuilder.loadTexts: ietfOneToGroupMaxMeanDelay.setStatus('current')
ietfOneToGroupReceiverNLossRatio = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 66))
if mibBuilder.loadTexts: ietfOneToGroupReceiverNLossRatio.setStatus('current')
ietfOneToGroupReceiverNCompLossRatio = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 67))
if mibBuilder.loadTexts: ietfOneToGroupReceiverNCompLossRatio.setStatus('current')
ietfOneToGroupLossRatio = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 68))
if mibBuilder.loadTexts: ietfOneToGroupLossRatio.setStatus('current')
ietfOneToGroupRangeLossRatio = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 69))
if mibBuilder.loadTexts: ietfOneToGroupRangeLossRatio.setStatus('current')
ietfOneToGroupRangeDelayVariation = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 70))
if mibBuilder.loadTexts: ietfOneToGroupRangeDelayVariation.setStatus('current')
ietfFiniteOneWayDelayStream = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 71))
if mibBuilder.loadTexts: ietfFiniteOneWayDelayStream.setStatus('current')
ietfFiniteOneWayDelayMean = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 72))
if mibBuilder.loadTexts: ietfFiniteOneWayDelayMean.setStatus('current')
ietfCompositeOneWayDelayMean = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 73))
if mibBuilder.loadTexts: ietfCompositeOneWayDelayMean.setStatus('current')
ietfFiniteOneWayDelayMinimum = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 74))
if mibBuilder.loadTexts: ietfFiniteOneWayDelayMinimum.setStatus('current')
ietfCompositeOneWayDelayMinimum = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 75))
if mibBuilder.loadTexts: ietfCompositeOneWayDelayMinimum.setStatus('current')
ietfOneWayPktLossEmpiricProb = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 76))
if mibBuilder.loadTexts: ietfOneWayPktLossEmpiricProb.setStatus('current')
ietfCompositeOneWayPktLossEmpiricProb = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 77))
if mibBuilder.loadTexts: ietfCompositeOneWayPktLossEmpiricProb.setStatus('current')
ietfOneWayPdvRefminStream = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 78))
if mibBuilder.loadTexts: ietfOneWayPdvRefminStream.setStatus('current')
ietfOneWayPdvRefminMean = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 79))
if mibBuilder.loadTexts: ietfOneWayPdvRefminMean.setStatus('current')
ietfOneWayPdvRefminVariance = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 80))
if mibBuilder.loadTexts: ietfOneWayPdvRefminVariance.setStatus('current')
ietfOneWayPdvRefminSkewness = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 81))
if mibBuilder.loadTexts: ietfOneWayPdvRefminSkewness.setStatus('current')
ietfCompositeOneWayPdvRefminQtil = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 82))
if mibBuilder.loadTexts: ietfCompositeOneWayPdvRefminQtil.setStatus('current')
ietfCompositeOneWayPdvRefminNPA = ObjectIdentity((1, 3, 6, 1, 2, 1, 128, 1, 83))
if mibBuilder.loadTexts: ietfCompositeOneWayPdvRefminNPA.setStatus('current')
mibBuilder.exportSymbols("IANA-IPPM-METRICS-REGISTRY-MIB", ietfRoundTripDelayInvPercentile=ietfRoundTripDelayInvPercentile, ietfOneWayLossNoticeableRate=ietfOneWayLossNoticeableRate, ietfOneWayPktLoss=ietfOneWayPktLoss, ietfOneWayIpdv=ietfOneWayIpdv, ietfOneWayInterLossPeriodLengths=ietfOneWayInterLossPeriodLengths, ietfOnetoGroupReceiverNMeanDelay=ietfOnetoGroupReceiverNMeanDelay, ietfOneWayDelayPoissonStream=ietfOneWayDelayPoissonStream, ietfCompositeOneWayPktLossEmpiricProb=ietfCompositeOneWayPktLossEmpiricProb, ietfOneWayPdvRefminMean=ietfOneWayPdvRefminMean, ietfnReordering=ietfnReordering, ietfSpatialOneWayDelayVector=ietfSpatialOneWayDelayVector, ietfOneWayPacketDuplicationFraction=ietfOneWayPacketDuplicationFraction, ietfSegmentPacketLossStream=ietfSegmentPacketLossStream, ietfSegmentIpdvMinStream=ietfSegmentIpdvMinStream, ietfCompositeOneWayPdvRefminQtil=ietfCompositeOneWayPdvRefminQtil, ietfReorderingExtent=ietfReorderingExtent, ietfOneToGroupRangeDelayVariation=ietfOneToGroupRangeDelayVariation, ietfOneToGroupRangeLossRatio=ietfOneToGroupRangeLossRatio, ietfOneWayIpdvPercentile=ietfOneWayIpdvPercentile, ietfInstantBidirConnectivity=ietfInstantBidirConnectivity, ietfCompositeOneWayDelayMean=ietfCompositeOneWayDelayMean, ietfOneToGroupDelayVector=ietfOneToGroupDelayVector, ietfRoundTripDelayMinimum=ietfRoundTripDelayMinimum, ietfFiniteOneWayDelayStream=ietfFiniteOneWayDelayStream, ietfOneWayDelayMinimum=ietfOneWayDelayMinimum, ietfOneWayDelayPeriodicStream=ietfOneWayDelayPeriodicStream, ietfOneToGroupIpdvVector=ietfOneToGroupIpdvVector, ietfOneWayPacketDuplicationPeriodicStream=ietfOneWayPacketDuplicationPeriodicStream, ietfReorderingByteOffset=ietfReorderingByteOffset, ietfReorderingFreeRuna=ietfReorderingFreeRuna, ietfOneWayLossPeriodLengths=ietfOneWayLossPeriodLengths, ietfOneToGroupMeanDelay=ietfOneToGroupMeanDelay, ietfOneToGroupReceiverNLossRatio=ietfOneToGroupReceiverNLossRatio, ietfReorderingGapTime=ietfReorderingGapTime, PYSNMP_MODULE_ID=ianaIppmMetricsRegistry, ietfCompositeOneWayPdvRefminNPA=ietfCompositeOneWayPdvRefminNPA, ietfOneWayPktLossEmpiricProb=ietfOneWayPktLossEmpiricProb, ietfOneWayPdvRefminVariance=ietfOneWayPdvRefminVariance, ietfOneWayPdvRefminSkewness=ietfOneWayPdvRefminSkewness, ietfOneToGroupReceiverNCompLossRatio=ietfOneToGroupReceiverNCompLossRatio, ietfReorderedPacketRatio=ietfReorderedPacketRatio, ietfOneWayPktLossAverage=ietfOneWayPktLossAverage, ietfOneToGroupLossRatio=ietfOneToGroupLossRatio, ietfOneWayDelay=ietfOneWayDelay, ietfReorderingGap=ietfReorderingGap, ietfOneToGroupMaxMeanDelay=ietfOneToGroupMaxMeanDelay, ietfSpatialPacketLossVector=ietfSpatialPacketLossVector, ietfOneWayDelayMedian=ietfOneWayDelayMedian, ietfCompositeOneWayDelayMinimum=ietfCompositeOneWayDelayMinimum, ietfReorderingLateTimeOffset=ietfReorderingLateTimeOffset, ietfOneWayPktLossPoissonStream=ietfOneWayPktLossPoissonStream, ietfIntervalBidirConnectivity=ietfIntervalBidirConnectivity, ietfOneWayPacketDuplication=ietfOneWayPacketDuplication, ietfOneWayPacketArrivalCount=ietfOneWayPacketArrivalCount, ietfIntervalUnidirConnectivity=ietfIntervalUnidirConnectivity, ietfSegmentIpdvPrevStream=ietfSegmentIpdvPrevStream, ietfReorderedSingleton=ietfReorderedSingleton, ietfIntervalTemporalConnectivity=ietfIntervalTemporalConnectivity, ietfReorderingFreeRunp=ietfReorderingFreeRunp, ietfFiniteOneWayDelayMinimum=ietfFiniteOneWayDelayMinimum, ianaIppmMetricsRegistry=ianaIppmMetricsRegistry, ietfOneToGroupRangeMeanDelay=ietfOneToGroupRangeMeanDelay, ietfOneWayIpdvInversePercentile=ietfOneWayIpdvInversePercentile, ietfOneWayIpdvJitter=ietfOneWayIpdvJitter, ietfOneWayPdvRefminStream=ietfOneWayPdvRefminStream, ietfOneToGroupPacketLossVector=ietfOneToGroupPacketLossVector, ietfOneWayDelayInversePercentile=ietfOneWayDelayInversePercentile, ietfReorderingFreeRunq=ietfReorderingFreeRunq, ietfOneWayPeakToPeakIpdv=ietfOneWayPeakToPeakIpdv, ianaIppmMetrics=ianaIppmMetrics, ietfInstantUnidirConnectivity=ietfInstantUnidirConnectivity, ietfRoundTripDelay=ietfRoundTripDelay, ietfRoundTripDelayPoissonStream=ietfRoundTripDelayPoissonStream, ietfReorderingFreeRunx=ietfReorderingFreeRunx, ietfFiniteOneWayDelayMean=ietfFiniteOneWayDelayMean, ietfOneWayIpdvPoissonStream=ietfOneWayIpdvPoissonStream, ietfOneWayDelayPercentile=ietfOneWayDelayPercentile, ietfSegmentOneWayDelayStream=ietfSegmentOneWayDelayStream, ietfOneWayLossDistanceStream=ietfOneWayLossDistanceStream, ietfOneWayLossPeriodStream=ietfOneWayLossPeriodStream, ietfOneWayReplicatedPacketRate=ietfOneWayReplicatedPacketRate, ietfRoundTripDelayPercentile=ietfRoundTripDelayPercentile, ietfOneWayPacketDuplicationPoissonStream=ietfOneWayPacketDuplicationPoissonStream, ietfRoundTripDelayMedian=ietfRoundTripDelayMedian, ietfOneWayLossPeriodTotal=ietfOneWayLossPeriodTotal, ietfSpatialOneWayIpdvVector=ietfSpatialOneWayIpdvVector)
|
(octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, value_size_constraint, single_value_constraint, constraints_intersection, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection', 'ConstraintsUnion')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(time_ticks, mib_2, object_identity, notification_type, ip_address, integer32, mib_identifier, iso, unsigned32, module_identity, bits, gauge32, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32, counter64) = mibBuilder.importSymbols('SNMPv2-SMI', 'TimeTicks', 'mib-2', 'ObjectIdentity', 'NotificationType', 'IpAddress', 'Integer32', 'MibIdentifier', 'iso', 'Unsigned32', 'ModuleIdentity', 'Bits', 'Gauge32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32', 'Counter64')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
iana_ippm_metrics_registry = module_identity((1, 3, 6, 1, 2, 1, 128))
ianaIppmMetricsRegistry.setRevisions(('2015-08-14 00:00', '2014-05-22 00:00', '2010-09-07 00:00', '2009-09-02 00:00', '2009-04-20 00:00', '2006-12-04 00:00', '2005-04-12 00:00'))
if mibBuilder.loadTexts:
ianaIppmMetricsRegistry.setLastUpdated('201508140000Z')
if mibBuilder.loadTexts:
ianaIppmMetricsRegistry.setOrganization('IANA')
iana_ippm_metrics = object_identity((1, 3, 6, 1, 2, 1, 128, 1))
if mibBuilder.loadTexts:
ianaIppmMetrics.setStatus('current')
ietf_instant_unidir_connectivity = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 1))
if mibBuilder.loadTexts:
ietfInstantUnidirConnectivity.setStatus('current')
ietf_instant_bidir_connectivity = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 2))
if mibBuilder.loadTexts:
ietfInstantBidirConnectivity.setStatus('current')
ietf_interval_unidir_connectivity = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 3))
if mibBuilder.loadTexts:
ietfIntervalUnidirConnectivity.setStatus('current')
ietf_interval_bidir_connectivity = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 4))
if mibBuilder.loadTexts:
ietfIntervalBidirConnectivity.setStatus('current')
ietf_interval_temporal_connectivity = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 5))
if mibBuilder.loadTexts:
ietfIntervalTemporalConnectivity.setStatus('current')
ietf_one_way_delay = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 6))
if mibBuilder.loadTexts:
ietfOneWayDelay.setStatus('current')
ietf_one_way_delay_poisson_stream = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 7))
if mibBuilder.loadTexts:
ietfOneWayDelayPoissonStream.setStatus('current')
ietf_one_way_delay_percentile = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 8))
if mibBuilder.loadTexts:
ietfOneWayDelayPercentile.setStatus('current')
ietf_one_way_delay_median = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 9))
if mibBuilder.loadTexts:
ietfOneWayDelayMedian.setStatus('current')
ietf_one_way_delay_minimum = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 10))
if mibBuilder.loadTexts:
ietfOneWayDelayMinimum.setStatus('current')
ietf_one_way_delay_inverse_percentile = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 11))
if mibBuilder.loadTexts:
ietfOneWayDelayInversePercentile.setStatus('current')
ietf_one_way_pkt_loss = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 12))
if mibBuilder.loadTexts:
ietfOneWayPktLoss.setStatus('current')
ietf_one_way_pkt_loss_poisson_stream = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 13))
if mibBuilder.loadTexts:
ietfOneWayPktLossPoissonStream.setStatus('current')
ietf_one_way_pkt_loss_average = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 14))
if mibBuilder.loadTexts:
ietfOneWayPktLossAverage.setStatus('current')
ietf_round_trip_delay = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 15))
if mibBuilder.loadTexts:
ietfRoundTripDelay.setStatus('current')
ietf_round_trip_delay_poisson_stream = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 16))
if mibBuilder.loadTexts:
ietfRoundTripDelayPoissonStream.setStatus('current')
ietf_round_trip_delay_percentile = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 17))
if mibBuilder.loadTexts:
ietfRoundTripDelayPercentile.setStatus('current')
ietf_round_trip_delay_median = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 18))
if mibBuilder.loadTexts:
ietfRoundTripDelayMedian.setStatus('current')
ietf_round_trip_delay_minimum = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 19))
if mibBuilder.loadTexts:
ietfRoundTripDelayMinimum.setStatus('current')
ietf_round_trip_delay_inv_percentile = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 20))
if mibBuilder.loadTexts:
ietfRoundTripDelayInvPercentile.setStatus('current')
ietf_one_way_loss_distance_stream = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 21))
if mibBuilder.loadTexts:
ietfOneWayLossDistanceStream.setStatus('current')
ietf_one_way_loss_period_stream = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 22))
if mibBuilder.loadTexts:
ietfOneWayLossPeriodStream.setStatus('current')
ietf_one_way_loss_noticeable_rate = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 23))
if mibBuilder.loadTexts:
ietfOneWayLossNoticeableRate.setStatus('current')
ietf_one_way_loss_period_total = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 24))
if mibBuilder.loadTexts:
ietfOneWayLossPeriodTotal.setStatus('current')
ietf_one_way_loss_period_lengths = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 25))
if mibBuilder.loadTexts:
ietfOneWayLossPeriodLengths.setStatus('current')
ietf_one_way_inter_loss_period_lengths = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 26))
if mibBuilder.loadTexts:
ietfOneWayInterLossPeriodLengths.setStatus('current')
ietf_one_way_ipdv = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 27))
if mibBuilder.loadTexts:
ietfOneWayIpdv.setStatus('current')
ietf_one_way_ipdv_poisson_stream = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 28))
if mibBuilder.loadTexts:
ietfOneWayIpdvPoissonStream.setStatus('current')
ietf_one_way_ipdv_percentile = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 29))
if mibBuilder.loadTexts:
ietfOneWayIpdvPercentile.setStatus('current')
ietf_one_way_ipdv_inverse_percentile = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 30))
if mibBuilder.loadTexts:
ietfOneWayIpdvInversePercentile.setStatus('current')
ietf_one_way_ipdv_jitter = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 31))
if mibBuilder.loadTexts:
ietfOneWayIpdvJitter.setStatus('current')
ietf_one_way_peak_to_peak_ipdv = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 32))
if mibBuilder.loadTexts:
ietfOneWayPeakToPeakIpdv.setStatus('current')
ietf_one_way_delay_periodic_stream = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 33))
if mibBuilder.loadTexts:
ietfOneWayDelayPeriodicStream.setStatus('current')
ietf_reordered_singleton = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 34))
if mibBuilder.loadTexts:
ietfReorderedSingleton.setStatus('current')
ietf_reordered_packet_ratio = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 35))
if mibBuilder.loadTexts:
ietfReorderedPacketRatio.setStatus('current')
ietf_reordering_extent = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 36))
if mibBuilder.loadTexts:
ietfReorderingExtent.setStatus('current')
ietf_reordering_late_time_offset = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 37))
if mibBuilder.loadTexts:
ietfReorderingLateTimeOffset.setStatus('current')
ietf_reordering_byte_offset = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 38))
if mibBuilder.loadTexts:
ietfReorderingByteOffset.setStatus('current')
ietf_reordering_gap = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 39))
if mibBuilder.loadTexts:
ietfReorderingGap.setStatus('current')
ietf_reordering_gap_time = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 40))
if mibBuilder.loadTexts:
ietfReorderingGapTime.setStatus('current')
ietf_reordering_free_runx = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 41))
if mibBuilder.loadTexts:
ietfReorderingFreeRunx.setStatus('current')
ietf_reordering_free_runq = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 42))
if mibBuilder.loadTexts:
ietfReorderingFreeRunq.setStatus('current')
ietf_reordering_free_runp = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 43))
if mibBuilder.loadTexts:
ietfReorderingFreeRunp.setStatus('current')
ietf_reordering_free_runa = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 44))
if mibBuilder.loadTexts:
ietfReorderingFreeRuna.setStatus('current')
ietfn_reordering = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 45))
if mibBuilder.loadTexts:
ietfnReordering.setStatus('current')
ietf_one_way_packet_arrival_count = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 46))
if mibBuilder.loadTexts:
ietfOneWayPacketArrivalCount.setStatus('current')
ietf_one_way_packet_duplication = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 47))
if mibBuilder.loadTexts:
ietfOneWayPacketDuplication.setStatus('current')
ietf_one_way_packet_duplication_poisson_stream = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 48))
if mibBuilder.loadTexts:
ietfOneWayPacketDuplicationPoissonStream.setStatus('current')
ietf_one_way_packet_duplication_periodic_stream = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 49))
if mibBuilder.loadTexts:
ietfOneWayPacketDuplicationPeriodicStream.setStatus('current')
ietf_one_way_packet_duplication_fraction = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 50))
if mibBuilder.loadTexts:
ietfOneWayPacketDuplicationFraction.setStatus('current')
ietf_one_way_replicated_packet_rate = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 51))
if mibBuilder.loadTexts:
ietfOneWayReplicatedPacketRate.setStatus('current')
ietf_spatial_one_way_delay_vector = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 52))
if mibBuilder.loadTexts:
ietfSpatialOneWayDelayVector.setStatus('current')
ietf_spatial_packet_loss_vector = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 53))
if mibBuilder.loadTexts:
ietfSpatialPacketLossVector.setStatus('current')
ietf_spatial_one_way_ipdv_vector = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 54))
if mibBuilder.loadTexts:
ietfSpatialOneWayIpdvVector.setStatus('current')
ietf_segment_one_way_delay_stream = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 55))
if mibBuilder.loadTexts:
ietfSegmentOneWayDelayStream.setStatus('current')
ietf_segment_packet_loss_stream = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 56))
if mibBuilder.loadTexts:
ietfSegmentPacketLossStream.setStatus('current')
ietf_segment_ipdv_prev_stream = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 57))
if mibBuilder.loadTexts:
ietfSegmentIpdvPrevStream.setStatus('current')
ietf_segment_ipdv_min_stream = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 58))
if mibBuilder.loadTexts:
ietfSegmentIpdvMinStream.setStatus('current')
ietf_one_to_group_delay_vector = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 59))
if mibBuilder.loadTexts:
ietfOneToGroupDelayVector.setStatus('current')
ietf_one_to_group_packet_loss_vector = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 60))
if mibBuilder.loadTexts:
ietfOneToGroupPacketLossVector.setStatus('current')
ietf_one_to_group_ipdv_vector = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 61))
if mibBuilder.loadTexts:
ietfOneToGroupIpdvVector.setStatus('current')
ietf_oneto_group_receiver_n_mean_delay = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 62))
if mibBuilder.loadTexts:
ietfOnetoGroupReceiverNMeanDelay.setStatus('current')
ietf_one_to_group_mean_delay = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 63))
if mibBuilder.loadTexts:
ietfOneToGroupMeanDelay.setStatus('current')
ietf_one_to_group_range_mean_delay = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 64))
if mibBuilder.loadTexts:
ietfOneToGroupRangeMeanDelay.setStatus('current')
ietf_one_to_group_max_mean_delay = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 65))
if mibBuilder.loadTexts:
ietfOneToGroupMaxMeanDelay.setStatus('current')
ietf_one_to_group_receiver_n_loss_ratio = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 66))
if mibBuilder.loadTexts:
ietfOneToGroupReceiverNLossRatio.setStatus('current')
ietf_one_to_group_receiver_n_comp_loss_ratio = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 67))
if mibBuilder.loadTexts:
ietfOneToGroupReceiverNCompLossRatio.setStatus('current')
ietf_one_to_group_loss_ratio = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 68))
if mibBuilder.loadTexts:
ietfOneToGroupLossRatio.setStatus('current')
ietf_one_to_group_range_loss_ratio = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 69))
if mibBuilder.loadTexts:
ietfOneToGroupRangeLossRatio.setStatus('current')
ietf_one_to_group_range_delay_variation = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 70))
if mibBuilder.loadTexts:
ietfOneToGroupRangeDelayVariation.setStatus('current')
ietf_finite_one_way_delay_stream = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 71))
if mibBuilder.loadTexts:
ietfFiniteOneWayDelayStream.setStatus('current')
ietf_finite_one_way_delay_mean = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 72))
if mibBuilder.loadTexts:
ietfFiniteOneWayDelayMean.setStatus('current')
ietf_composite_one_way_delay_mean = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 73))
if mibBuilder.loadTexts:
ietfCompositeOneWayDelayMean.setStatus('current')
ietf_finite_one_way_delay_minimum = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 74))
if mibBuilder.loadTexts:
ietfFiniteOneWayDelayMinimum.setStatus('current')
ietf_composite_one_way_delay_minimum = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 75))
if mibBuilder.loadTexts:
ietfCompositeOneWayDelayMinimum.setStatus('current')
ietf_one_way_pkt_loss_empiric_prob = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 76))
if mibBuilder.loadTexts:
ietfOneWayPktLossEmpiricProb.setStatus('current')
ietf_composite_one_way_pkt_loss_empiric_prob = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 77))
if mibBuilder.loadTexts:
ietfCompositeOneWayPktLossEmpiricProb.setStatus('current')
ietf_one_way_pdv_refmin_stream = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 78))
if mibBuilder.loadTexts:
ietfOneWayPdvRefminStream.setStatus('current')
ietf_one_way_pdv_refmin_mean = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 79))
if mibBuilder.loadTexts:
ietfOneWayPdvRefminMean.setStatus('current')
ietf_one_way_pdv_refmin_variance = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 80))
if mibBuilder.loadTexts:
ietfOneWayPdvRefminVariance.setStatus('current')
ietf_one_way_pdv_refmin_skewness = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 81))
if mibBuilder.loadTexts:
ietfOneWayPdvRefminSkewness.setStatus('current')
ietf_composite_one_way_pdv_refmin_qtil = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 82))
if mibBuilder.loadTexts:
ietfCompositeOneWayPdvRefminQtil.setStatus('current')
ietf_composite_one_way_pdv_refmin_npa = object_identity((1, 3, 6, 1, 2, 1, 128, 1, 83))
if mibBuilder.loadTexts:
ietfCompositeOneWayPdvRefminNPA.setStatus('current')
mibBuilder.exportSymbols('IANA-IPPM-METRICS-REGISTRY-MIB', ietfRoundTripDelayInvPercentile=ietfRoundTripDelayInvPercentile, ietfOneWayLossNoticeableRate=ietfOneWayLossNoticeableRate, ietfOneWayPktLoss=ietfOneWayPktLoss, ietfOneWayIpdv=ietfOneWayIpdv, ietfOneWayInterLossPeriodLengths=ietfOneWayInterLossPeriodLengths, ietfOnetoGroupReceiverNMeanDelay=ietfOnetoGroupReceiverNMeanDelay, ietfOneWayDelayPoissonStream=ietfOneWayDelayPoissonStream, ietfCompositeOneWayPktLossEmpiricProb=ietfCompositeOneWayPktLossEmpiricProb, ietfOneWayPdvRefminMean=ietfOneWayPdvRefminMean, ietfnReordering=ietfnReordering, ietfSpatialOneWayDelayVector=ietfSpatialOneWayDelayVector, ietfOneWayPacketDuplicationFraction=ietfOneWayPacketDuplicationFraction, ietfSegmentPacketLossStream=ietfSegmentPacketLossStream, ietfSegmentIpdvMinStream=ietfSegmentIpdvMinStream, ietfCompositeOneWayPdvRefminQtil=ietfCompositeOneWayPdvRefminQtil, ietfReorderingExtent=ietfReorderingExtent, ietfOneToGroupRangeDelayVariation=ietfOneToGroupRangeDelayVariation, ietfOneToGroupRangeLossRatio=ietfOneToGroupRangeLossRatio, ietfOneWayIpdvPercentile=ietfOneWayIpdvPercentile, ietfInstantBidirConnectivity=ietfInstantBidirConnectivity, ietfCompositeOneWayDelayMean=ietfCompositeOneWayDelayMean, ietfOneToGroupDelayVector=ietfOneToGroupDelayVector, ietfRoundTripDelayMinimum=ietfRoundTripDelayMinimum, ietfFiniteOneWayDelayStream=ietfFiniteOneWayDelayStream, ietfOneWayDelayMinimum=ietfOneWayDelayMinimum, ietfOneWayDelayPeriodicStream=ietfOneWayDelayPeriodicStream, ietfOneToGroupIpdvVector=ietfOneToGroupIpdvVector, ietfOneWayPacketDuplicationPeriodicStream=ietfOneWayPacketDuplicationPeriodicStream, ietfReorderingByteOffset=ietfReorderingByteOffset, ietfReorderingFreeRuna=ietfReorderingFreeRuna, ietfOneWayLossPeriodLengths=ietfOneWayLossPeriodLengths, ietfOneToGroupMeanDelay=ietfOneToGroupMeanDelay, ietfOneToGroupReceiverNLossRatio=ietfOneToGroupReceiverNLossRatio, ietfReorderingGapTime=ietfReorderingGapTime, PYSNMP_MODULE_ID=ianaIppmMetricsRegistry, ietfCompositeOneWayPdvRefminNPA=ietfCompositeOneWayPdvRefminNPA, ietfOneWayPktLossEmpiricProb=ietfOneWayPktLossEmpiricProb, ietfOneWayPdvRefminVariance=ietfOneWayPdvRefminVariance, ietfOneWayPdvRefminSkewness=ietfOneWayPdvRefminSkewness, ietfOneToGroupReceiverNCompLossRatio=ietfOneToGroupReceiverNCompLossRatio, ietfReorderedPacketRatio=ietfReorderedPacketRatio, ietfOneWayPktLossAverage=ietfOneWayPktLossAverage, ietfOneToGroupLossRatio=ietfOneToGroupLossRatio, ietfOneWayDelay=ietfOneWayDelay, ietfReorderingGap=ietfReorderingGap, ietfOneToGroupMaxMeanDelay=ietfOneToGroupMaxMeanDelay, ietfSpatialPacketLossVector=ietfSpatialPacketLossVector, ietfOneWayDelayMedian=ietfOneWayDelayMedian, ietfCompositeOneWayDelayMinimum=ietfCompositeOneWayDelayMinimum, ietfReorderingLateTimeOffset=ietfReorderingLateTimeOffset, ietfOneWayPktLossPoissonStream=ietfOneWayPktLossPoissonStream, ietfIntervalBidirConnectivity=ietfIntervalBidirConnectivity, ietfOneWayPacketDuplication=ietfOneWayPacketDuplication, ietfOneWayPacketArrivalCount=ietfOneWayPacketArrivalCount, ietfIntervalUnidirConnectivity=ietfIntervalUnidirConnectivity, ietfSegmentIpdvPrevStream=ietfSegmentIpdvPrevStream, ietfReorderedSingleton=ietfReorderedSingleton, ietfIntervalTemporalConnectivity=ietfIntervalTemporalConnectivity, ietfReorderingFreeRunp=ietfReorderingFreeRunp, ietfFiniteOneWayDelayMinimum=ietfFiniteOneWayDelayMinimum, ianaIppmMetricsRegistry=ianaIppmMetricsRegistry, ietfOneToGroupRangeMeanDelay=ietfOneToGroupRangeMeanDelay, ietfOneWayIpdvInversePercentile=ietfOneWayIpdvInversePercentile, ietfOneWayIpdvJitter=ietfOneWayIpdvJitter, ietfOneWayPdvRefminStream=ietfOneWayPdvRefminStream, ietfOneToGroupPacketLossVector=ietfOneToGroupPacketLossVector, ietfOneWayDelayInversePercentile=ietfOneWayDelayInversePercentile, ietfReorderingFreeRunq=ietfReorderingFreeRunq, ietfOneWayPeakToPeakIpdv=ietfOneWayPeakToPeakIpdv, ianaIppmMetrics=ianaIppmMetrics, ietfInstantUnidirConnectivity=ietfInstantUnidirConnectivity, ietfRoundTripDelay=ietfRoundTripDelay, ietfRoundTripDelayPoissonStream=ietfRoundTripDelayPoissonStream, ietfReorderingFreeRunx=ietfReorderingFreeRunx, ietfFiniteOneWayDelayMean=ietfFiniteOneWayDelayMean, ietfOneWayIpdvPoissonStream=ietfOneWayIpdvPoissonStream, ietfOneWayDelayPercentile=ietfOneWayDelayPercentile, ietfSegmentOneWayDelayStream=ietfSegmentOneWayDelayStream, ietfOneWayLossDistanceStream=ietfOneWayLossDistanceStream, ietfOneWayLossPeriodStream=ietfOneWayLossPeriodStream, ietfOneWayReplicatedPacketRate=ietfOneWayReplicatedPacketRate, ietfRoundTripDelayPercentile=ietfRoundTripDelayPercentile, ietfOneWayPacketDuplicationPoissonStream=ietfOneWayPacketDuplicationPoissonStream, ietfRoundTripDelayMedian=ietfRoundTripDelayMedian, ietfOneWayLossPeriodTotal=ietfOneWayLossPeriodTotal, ietfSpatialOneWayIpdvVector=ietfSpatialOneWayIpdvVector)
|
'''
Created on 1.12.2016
@author: Darren
''''''
Given n, generate all structurally unique BST s (binary search trees) that store values 1...n.
For example,
Given n = 3, your program should return all 5 unique BST s shown below.
1 3 3 2 1
\ / / / \ \
3 2 1 1 3 2
/ / \ \
2 1 2 3
confused what "{1,#,2,3}" means? > read more on how binary tree is serialized on OJ.
OJ s Binary Tree Serialization:
The serialization of a binary tree follows a level order traversal, where # signifies a path terminator where no node exists below.
Here s an example:
1
/ \
2 3
/
4
\
5
The above binary tree is serialized as "{1,2,3,#,#,4,#,#,5}".
"
'''
# Definition for a binary tree node.
class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution(object):
def generateTrees(self, n):
"""
:type n: int
:rtype: List[TreeNode]
"""
if n<=0:
return []
return self.generateTreesUtil(1,n)
def generateTreesUtil(self, left,right):
if left==right:
return [TreeNode(left)]
if left>right:
return [None]
res=[]
for value in range(left,right+1):
for leftNode in self.generateTreesUtil(left,value-1):
for rightNode in self.generateTreesUtil(value+1,right):
root=TreeNode(value)
root.left=leftNode
root.right=rightNode
res.append(root)
return res
|
"""
Created on 1.12.2016
@author: Darren
Given n, generate all structurally unique BST s (binary search trees) that store values 1...n.
For example,
Given n = 3, your program should return all 5 unique BST s shown below.
1 3 3 2 1
\\ / / / \\
3 2 1 1 3 2
/ / \\
2 1 2 3
confused what "{1,#,2,3}" means? > read more on how binary tree is serialized on OJ.
OJ s Binary Tree Serialization:
The serialization of a binary tree follows a level order traversal, where # signifies a path terminator where no node exists below.
Here s an example:
1
/
2 3
/
4
5
The above binary tree is serialized as "{1,2,3,#,#,4,#,#,5}".
"
"""
class Treenode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution(object):
def generate_trees(self, n):
"""
:type n: int
:rtype: List[TreeNode]
"""
if n <= 0:
return []
return self.generateTreesUtil(1, n)
def generate_trees_util(self, left, right):
if left == right:
return [tree_node(left)]
if left > right:
return [None]
res = []
for value in range(left, right + 1):
for left_node in self.generateTreesUtil(left, value - 1):
for right_node in self.generateTreesUtil(value + 1, right):
root = tree_node(value)
root.left = leftNode
root.right = rightNode
res.append(root)
return res
|
# colorsystem.py is the full list of colors that can be used to easily create themes.
class Gray:
B0 = '#000000'
B10 = '#19232D'
B20 = '#293544'
B30 = '#37414F'
B40 = '#455364'
B50 = '#54687A'
B60 = '#60798B'
B70 = '#788D9C'
B80 = '#9DA9B5'
B90 = '#ACB1B6'
B100 = '#B9BDC1'
B110 = '#C9CDD0'
B120 = '#CED1D4'
B130 = '#E0E1E3'
B140 = '#FAFAFA'
B150 = '#FFFFFF'
class Blue:
B0 = '#000000'
B10 = '#062647'
B20 = '#26486B'
B30 = '#375A7F'
B40 = '#346792'
B50 = '#1A72BB'
B60 = '#057DCE'
B70 = '#259AE9'
B80 = '#37AEFE'
B90 = '#73C7FF'
B100 = '#9FCBFF'
B110 = '#C2DFFA'
B120 = '#CEE8FF'
B130 = '#DAEDFF'
B140 = '#F5FAFF'
B150 = '##FFFFFF'
class Green:
B0 = '#000000'
B10 = '#064738'
B20 = '#055C49'
B30 = '#007A5E'
B40 = '#008760'
B50 = '#019D70'
B60 = '#02BA85'
B70 = '#20C997'
B80 = '#44DEB0'
B90 = '#3BEBB7'
B100 = '#88F2D3'
B110 = '#B0F5E1'
B120 = '#D1FBEE'
B130 = '#E4FFF7'
B140 = '#F5FFFD'
B150 = '#FFFFFF'
class Red:
B0 = '#000000'
B10 = '#470606'
B20 = '#760B0B'
B30 = '#AF0F0F'
B40 = '#D4140B'
B50 = '#DE321F'
B60 = '#E24232'
B70 = '#E74C3C'
B80 = '#F66657'
B90 = '#F88478'
B100 = '#FFACA4'
B110 = '#FFC3BD'
B120 = '#FEDDDA'
B130 = '#FFEEEE'
B140 = '#FFF5F5'
B150 = '#FFFFFF'
class Orange:
B0 = '#000000'
B10 = '#471D06'
B20 = '#692907'
B30 = '#AB3E00'
B40 = '#CE4B01'
B50 = '#E05E15'
B60 = '#E57004'
B70 = '#F37E12'
B80 = '#FF993B'
B90 = '#FFB950'
B100 = '#FFCF84'
B110 = '#FFDDA7'
B120 = '#FFEACA'
B130 = '#FFF3E2'
B140 = '#FFFBF5'
B150 = '#FFFFFF'
class GroupDark:
B10 = '#E11C1C'
B20 = '#FF8A00'
B30 = '#88BA00'
B40 = '#2DB500'
B50 = '#3FC6F0'
B60 = '#107EEC'
B70 = '#5C47E0'
B80 = '#7F27C5'
B90 = '#C88AFA'
B100 = '#AF2294'
B110 = '#DB4D8E'
B120 = '#38D4A4'
class GroupLight:
B10 = '#FF6700'
B20 = '#FFB000'
B30 = '#FFE600'
B40 = '#7FDD05'
B50 = '#00A585'
B60 = '#22BCF2'
B70 = '#1256CC'
B80 = '#803AD0'
B90 = '#B568F2'
B100 = '#CC2782'
B110 = '#FF71BF'
B120 = '#7EE8C7'
|
class Gray:
b0 = '#000000'
b10 = '#19232D'
b20 = '#293544'
b30 = '#37414F'
b40 = '#455364'
b50 = '#54687A'
b60 = '#60798B'
b70 = '#788D9C'
b80 = '#9DA9B5'
b90 = '#ACB1B6'
b100 = '#B9BDC1'
b110 = '#C9CDD0'
b120 = '#CED1D4'
b130 = '#E0E1E3'
b140 = '#FAFAFA'
b150 = '#FFFFFF'
class Blue:
b0 = '#000000'
b10 = '#062647'
b20 = '#26486B'
b30 = '#375A7F'
b40 = '#346792'
b50 = '#1A72BB'
b60 = '#057DCE'
b70 = '#259AE9'
b80 = '#37AEFE'
b90 = '#73C7FF'
b100 = '#9FCBFF'
b110 = '#C2DFFA'
b120 = '#CEE8FF'
b130 = '#DAEDFF'
b140 = '#F5FAFF'
b150 = '##FFFFFF'
class Green:
b0 = '#000000'
b10 = '#064738'
b20 = '#055C49'
b30 = '#007A5E'
b40 = '#008760'
b50 = '#019D70'
b60 = '#02BA85'
b70 = '#20C997'
b80 = '#44DEB0'
b90 = '#3BEBB7'
b100 = '#88F2D3'
b110 = '#B0F5E1'
b120 = '#D1FBEE'
b130 = '#E4FFF7'
b140 = '#F5FFFD'
b150 = '#FFFFFF'
class Red:
b0 = '#000000'
b10 = '#470606'
b20 = '#760B0B'
b30 = '#AF0F0F'
b40 = '#D4140B'
b50 = '#DE321F'
b60 = '#E24232'
b70 = '#E74C3C'
b80 = '#F66657'
b90 = '#F88478'
b100 = '#FFACA4'
b110 = '#FFC3BD'
b120 = '#FEDDDA'
b130 = '#FFEEEE'
b140 = '#FFF5F5'
b150 = '#FFFFFF'
class Orange:
b0 = '#000000'
b10 = '#471D06'
b20 = '#692907'
b30 = '#AB3E00'
b40 = '#CE4B01'
b50 = '#E05E15'
b60 = '#E57004'
b70 = '#F37E12'
b80 = '#FF993B'
b90 = '#FFB950'
b100 = '#FFCF84'
b110 = '#FFDDA7'
b120 = '#FFEACA'
b130 = '#FFF3E2'
b140 = '#FFFBF5'
b150 = '#FFFFFF'
class Groupdark:
b10 = '#E11C1C'
b20 = '#FF8A00'
b30 = '#88BA00'
b40 = '#2DB500'
b50 = '#3FC6F0'
b60 = '#107EEC'
b70 = '#5C47E0'
b80 = '#7F27C5'
b90 = '#C88AFA'
b100 = '#AF2294'
b110 = '#DB4D8E'
b120 = '#38D4A4'
class Grouplight:
b10 = '#FF6700'
b20 = '#FFB000'
b30 = '#FFE600'
b40 = '#7FDD05'
b50 = '#00A585'
b60 = '#22BCF2'
b70 = '#1256CC'
b80 = '#803AD0'
b90 = '#B568F2'
b100 = '#CC2782'
b110 = '#FF71BF'
b120 = '#7EE8C7'
|
# Power Drive System
# Controlword common bits.
IL_MC_CW_SO = (1 << 0)
IL_MC_CW_EV = (1 << 1)
IL_MC_CW_QS = (1 << 2)
IL_MC_CW_EO = (1 << 3)
IL_MC_CW_FR = (1 << 7)
IL_MC_CW_H = (1 << 8)
# Statusword common bits.
IL_MC_SW_RTSO = (1 << 0)
IL_MC_SW_SO = (1 << 1)
IL_MC_SW_OE = (1 << 2)
IL_MC_SW_F = (1 << 3)
IL_MC_SW_VE = (1 << 4)
IL_MC_SW_QS = (1 << 5)
IL_MC_SW_SOD = (1 << 6)
IL_MC_SW_W = (1 << 7)
IL_MC_SW_RM = (1 << 9)
IL_MC_SW_TR = (1 << 10)
IL_MC_SW_ILA = (1 << 11)
IL_MC_SW_IANGLE = (1 << 14)
# PDS FSA states
# Masks for PDS FSA states
IL_MC_PDS_STA_NRTSO_MSK = (IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_OE | IL_MC_SW_F | IL_MC_SW_SOD)
IL_MC_PDS_STA_SOD_MSK = (IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_OE | IL_MC_SW_F | IL_MC_SW_SOD)
IL_MC_PDS_STA_RTSO_MSK = (IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_OE | IL_MC_SW_F | IL_MC_SW_QS | IL_MC_SW_SOD)
IL_MC_PDS_STA_SO_MSK = (IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_OE | IL_MC_SW_F | IL_MC_SW_QS | IL_MC_SW_SOD)
IL_MC_PDS_STA_OE_MSK = (IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_OE | IL_MC_SW_F | IL_MC_SW_QS | IL_MC_SW_SOD)
IL_MC_PDS_STA_QSA_MSK = (IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_OE | IL_MC_SW_F | IL_MC_SW_QS | IL_MC_SW_SOD)
IL_MC_PDS_STA_FRA_MSK = (IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_OE | IL_MC_SW_F | IL_MC_SW_SOD)
IL_MC_PDS_STA_F_MSK = (IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_OE | IL_MC_SW_F | IL_MC_SW_SOD)
# Not ready to switch on.
IL_MC_PDS_STA_NRTSO = 0x0000
# Switch on disabled.
IL_MC_PDS_STA_SOD = IL_MC_SW_SOD
# Ready to switch on.
IL_MC_PDS_STA_RTSO = (IL_MC_SW_RTSO | IL_MC_SW_QS)
# Switched on.
IL_MC_PDS_STA_SO = (IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_QS)
# Operation enabled.
IL_MC_PDS_STA_OE = (IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_OE | IL_MC_SW_QS)
# Quick stop active.
IL_MC_PDS_STA_QSA = (IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_OE)
# Fault reaction active.
IL_MC_PDS_STA_FRA = (IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_OE | IL_MC_SW_F)
# Fault.
IL_MC_PDS_STA_F = IL_MC_SW_F
# Unknown.
IL_MC_PDS_STA_UNKNOWN = 0xFFFF
# PDS FSA commands
# Shutdown.
IL_MC_PDS_CMD_SD = (IL_MC_CW_EV | IL_MC_CW_QS)
# Switch on.
IL_MC_PDS_CMD_SO = (IL_MC_CW_SO | IL_MC_CW_EV | IL_MC_CW_QS)
# Switch on + enable operation.
IL_MC_PDS_CMD_SOEO = (IL_MC_CW_SO | IL_MC_CW_EV | IL_MC_CW_QS | IL_MC_CW_EO)
# Disable voltage.
IL_MC_PDS_CMD_DV = 0x0000
# Quick stop.
IL_MC_PDS_CMD_QS = IL_MC_CW_EV
# Disable operation.
IL_MC_PDS_CMD_DO = (IL_MC_CW_SO | IL_MC_CW_EV | IL_MC_CW_QS)
# Enable operation.
IL_MC_PDS_CMD_EO = (IL_MC_CW_SO | IL_MC_CW_EV | IL_MC_CW_QS | IL_MC_CW_EO)
# Fault reset.
IL_MC_PDS_CMD_FR = IL_MC_CW_FR
# Unknown command.
IL_MC_PDS_CMD_UNKNOWN = 0xFFFF
# Homing controlword bits
# Homing operation start
IL_MC_HOMING_CW_START = (1 << 4)
# Halt
IL_MC_HOMING_CW_HALT = (1 << 8)
# Homing statusword bits
# Homing attained.
IL_MC_HOMING_SW_ATT = (1 << 12)
# Homing error.
IL_MC_HOMING_SW_ERR = (1 << 13)
# Homing states
# Homing state mask.
IL_MC_HOMING_STA_MSK= (IL_MC_SW_TR | IL_MC_HOMING_SW_ATT | IL_MC_HOMING_SW_ERR)
# Homing procedure is in progress.
IL_MC_HOMING_STA_INPROG = 0x0000
# Homing procedure is interrupted or not started.
IL_MC_HOMING_STA_INT= (IL_MC_SW_TR)
# Homing is attained, but target is not reached.
IL_MC_HOMING_STA_ATT= (IL_MC_HOMING_SW_ATT)
# Homing procedure is completed successfully.
IL_MC_HOMING_STA_SUCCESS = (IL_MC_SW_TR | IL_MC_HOMING_SW_ATT)
# Homing error occurred, velocity not zero.
IL_MC_HOMING_STA_ERR_VNZ = (IL_MC_HOMING_SW_ERR)
# Homing error ocurred, velocity is zero.
IL_MC_HOMING_STA_ERR_VZ= (IL_MC_SW_TR | IL_MC_HOMING_SW_ERR)
# Profile Position
# Profile position controlword bits
# New set-point.
IL_MC_PP_CW_NEWSP = (1 << 4)
# Change set immediately
IL_MC_PP_CW_IMMEDIATE = (1 << 5)
# Target position is relative.
IL_MC_PP_CW_REL= (1 << 6)
# Profile position specific statusword bits
# Set-point acknowledge.
IL_MC_PP_SW_SPACK = (1 << 12)
# Following error.
IL_MC_PP_SW_FOLLOWERR = (1 << 13)
# PDS
# PDS default timeout (ms).
PDS_TIMEOUT = 1000
# Flags position offset in statusword.
FLAGS_SW_POS = 10
# Number of retries to reset fault state
FAULT_RESET_RETRIES = 20
# General failure. */
IL_EFAIL = -1
# Invalid values. */
IL_EINVAL = -2
# Operation timed out. */
IL_ETIMEDOUT = -3
# Not enough memory. */
IL_ENOMEM = -4
# Already initialized. */
IL_EALREADY = -5
# Device disconnected. */
IL_EDISCONN = -6
# Access error. */
IL_EACCESS = -7
# State error. */
IL_ESTATE = -8
# I/O error. */
IL_EIO = -9
# Not supported. */
IL_ENOTSUP = -10
|
il_mc_cw_so = 1 << 0
il_mc_cw_ev = 1 << 1
il_mc_cw_qs = 1 << 2
il_mc_cw_eo = 1 << 3
il_mc_cw_fr = 1 << 7
il_mc_cw_h = 1 << 8
il_mc_sw_rtso = 1 << 0
il_mc_sw_so = 1 << 1
il_mc_sw_oe = 1 << 2
il_mc_sw_f = 1 << 3
il_mc_sw_ve = 1 << 4
il_mc_sw_qs = 1 << 5
il_mc_sw_sod = 1 << 6
il_mc_sw_w = 1 << 7
il_mc_sw_rm = 1 << 9
il_mc_sw_tr = 1 << 10
il_mc_sw_ila = 1 << 11
il_mc_sw_iangle = 1 << 14
il_mc_pds_sta_nrtso_msk = IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_OE | IL_MC_SW_F | IL_MC_SW_SOD
il_mc_pds_sta_sod_msk = IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_OE | IL_MC_SW_F | IL_MC_SW_SOD
il_mc_pds_sta_rtso_msk = IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_OE | IL_MC_SW_F | IL_MC_SW_QS | IL_MC_SW_SOD
il_mc_pds_sta_so_msk = IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_OE | IL_MC_SW_F | IL_MC_SW_QS | IL_MC_SW_SOD
il_mc_pds_sta_oe_msk = IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_OE | IL_MC_SW_F | IL_MC_SW_QS | IL_MC_SW_SOD
il_mc_pds_sta_qsa_msk = IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_OE | IL_MC_SW_F | IL_MC_SW_QS | IL_MC_SW_SOD
il_mc_pds_sta_fra_msk = IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_OE | IL_MC_SW_F | IL_MC_SW_SOD
il_mc_pds_sta_f_msk = IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_OE | IL_MC_SW_F | IL_MC_SW_SOD
il_mc_pds_sta_nrtso = 0
il_mc_pds_sta_sod = IL_MC_SW_SOD
il_mc_pds_sta_rtso = IL_MC_SW_RTSO | IL_MC_SW_QS
il_mc_pds_sta_so = IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_QS
il_mc_pds_sta_oe = IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_OE | IL_MC_SW_QS
il_mc_pds_sta_qsa = IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_OE
il_mc_pds_sta_fra = IL_MC_SW_RTSO | IL_MC_SW_SO | IL_MC_SW_OE | IL_MC_SW_F
il_mc_pds_sta_f = IL_MC_SW_F
il_mc_pds_sta_unknown = 65535
il_mc_pds_cmd_sd = IL_MC_CW_EV | IL_MC_CW_QS
il_mc_pds_cmd_so = IL_MC_CW_SO | IL_MC_CW_EV | IL_MC_CW_QS
il_mc_pds_cmd_soeo = IL_MC_CW_SO | IL_MC_CW_EV | IL_MC_CW_QS | IL_MC_CW_EO
il_mc_pds_cmd_dv = 0
il_mc_pds_cmd_qs = IL_MC_CW_EV
il_mc_pds_cmd_do = IL_MC_CW_SO | IL_MC_CW_EV | IL_MC_CW_QS
il_mc_pds_cmd_eo = IL_MC_CW_SO | IL_MC_CW_EV | IL_MC_CW_QS | IL_MC_CW_EO
il_mc_pds_cmd_fr = IL_MC_CW_FR
il_mc_pds_cmd_unknown = 65535
il_mc_homing_cw_start = 1 << 4
il_mc_homing_cw_halt = 1 << 8
il_mc_homing_sw_att = 1 << 12
il_mc_homing_sw_err = 1 << 13
il_mc_homing_sta_msk = IL_MC_SW_TR | IL_MC_HOMING_SW_ATT | IL_MC_HOMING_SW_ERR
il_mc_homing_sta_inprog = 0
il_mc_homing_sta_int = IL_MC_SW_TR
il_mc_homing_sta_att = IL_MC_HOMING_SW_ATT
il_mc_homing_sta_success = IL_MC_SW_TR | IL_MC_HOMING_SW_ATT
il_mc_homing_sta_err_vnz = IL_MC_HOMING_SW_ERR
il_mc_homing_sta_err_vz = IL_MC_SW_TR | IL_MC_HOMING_SW_ERR
il_mc_pp_cw_newsp = 1 << 4
il_mc_pp_cw_immediate = 1 << 5
il_mc_pp_cw_rel = 1 << 6
il_mc_pp_sw_spack = 1 << 12
il_mc_pp_sw_followerr = 1 << 13
pds_timeout = 1000
flags_sw_pos = 10
fault_reset_retries = 20
il_efail = -1
il_einval = -2
il_etimedout = -3
il_enomem = -4
il_ealready = -5
il_edisconn = -6
il_eaccess = -7
il_estate = -8
il_eio = -9
il_enotsup = -10
|
class base_graph_style():
NAME:str = ''
class default_graph_style(base_graph_style):
NAME:str = 'default'
# Task Nodes:
TASK_NODE_STYLE = 'filled'
TASK_NODE_SHAPE = 'box3d'
TASK_NODE_PENWIDTH = 1,
TASK_NODE_FONTCOLOR = 'black'
DISABLED_TASK_COLOR = 'dimgrey'
DISABLED_TASK_FONTCOLOR = TASK_NODE_FONTCOLOR
DISABLED_TASK_STYLE = 'dashed'
START_TASK_COLOR = '#3E8DCF'
END_TASK_COLOR = '#E95C3F'
MID_TASK_COLOR = '#F2A93B'
# File Nodes:
FILE_NODE_STYLE = 'filled'
FILE_FILE_SHAPE = 'note'
FILE_DIR_SHAPE = 'tab'
FILE_NODE_COLOR = '#bbd698'
FILE_NODE_PENWIDTH = 1
# Source Nodes:
SOURCE_STYLE = 'filled'
SOURCE_FONT_COLOR = 'black'
SOURCE_FILL_COLOR = '#9d6edb'
SOURCE_SHAPE = 'component'
SOURCE_PENWIDTH = 1
# Edges:
EDGE_COLOR = '#828282'
EDGE_PEN_WIDTH = 1.5
class greyscale_graph_style(base_graph_style):
NAME:str = 'greyscale'
# Task Nodes:
TASK_NODE_STYLE = 'filled'
TASK_NODE_SHAPE = 'box3d'
TASK_NODE_PENWIDTH = 1,
TASK_NODE_FONTCOLOR = 'black'
DISABLED_TASK_COLOR = 'black'
DISABLED_TASK_FONTCOLOR = 'black'
DISABLED_TASK_STYLE = 'dashed'
START_TASK_COLOR = '#c4c4c4'
MID_TASK_COLOR = '#b0b0b0'
END_TASK_COLOR = '#787878'
# File Nodes:
FILE_NODE_STYLE = 'filled'
FILE_FILE_SHAPE = 'note'
FILE_DIR_SHAPE = 'tab'
FILE_NODE_COLOR = '#f0f0f0'
FILE_NODE_PENWIDTH = 1
# Source Nodes:
SOURCE_STYLE = 'filled'
SOURCE_FONT_COLOR = 'black'
SOURCE_FILL_COLOR = 'white'
SOURCE_SHAPE = 'component'
SOURCE_PENWIDTH = 1
# Edges:
EDGE_COLOR = '#828282'
EDGE_PEN_WIDTH = 1.5
|
class Base_Graph_Style:
name: str = ''
class Default_Graph_Style(base_graph_style):
name: str = 'default'
task_node_style = 'filled'
task_node_shape = 'box3d'
task_node_penwidth = (1,)
task_node_fontcolor = 'black'
disabled_task_color = 'dimgrey'
disabled_task_fontcolor = TASK_NODE_FONTCOLOR
disabled_task_style = 'dashed'
start_task_color = '#3E8DCF'
end_task_color = '#E95C3F'
mid_task_color = '#F2A93B'
file_node_style = 'filled'
file_file_shape = 'note'
file_dir_shape = 'tab'
file_node_color = '#bbd698'
file_node_penwidth = 1
source_style = 'filled'
source_font_color = 'black'
source_fill_color = '#9d6edb'
source_shape = 'component'
source_penwidth = 1
edge_color = '#828282'
edge_pen_width = 1.5
class Greyscale_Graph_Style(base_graph_style):
name: str = 'greyscale'
task_node_style = 'filled'
task_node_shape = 'box3d'
task_node_penwidth = (1,)
task_node_fontcolor = 'black'
disabled_task_color = 'black'
disabled_task_fontcolor = 'black'
disabled_task_style = 'dashed'
start_task_color = '#c4c4c4'
mid_task_color = '#b0b0b0'
end_task_color = '#787878'
file_node_style = 'filled'
file_file_shape = 'note'
file_dir_shape = 'tab'
file_node_color = '#f0f0f0'
file_node_penwidth = 1
source_style = 'filled'
source_font_color = 'black'
source_fill_color = 'white'
source_shape = 'component'
source_penwidth = 1
edge_color = '#828282'
edge_pen_width = 1.5
|
num1 = int(input('Enter number 1: '))
num2 = int(input('Enter number 2: '))
num3 = int(input('Enter number 3: '))
if num1 > num2 and num1 > num3:
print(str(num1) + ' is the greatest!')
if num2 > num3 and num2 > num1:
print(str(num2) + ' is the greatest!')
if num3 > num1 and num3 > num2:
print(str(num3) + ' is the greatest!')
|
num1 = int(input('Enter number 1: '))
num2 = int(input('Enter number 2: '))
num3 = int(input('Enter number 3: '))
if num1 > num2 and num1 > num3:
print(str(num1) + ' is the greatest!')
if num2 > num3 and num2 > num1:
print(str(num2) + ' is the greatest!')
if num3 > num1 and num3 > num2:
print(str(num3) + ' is the greatest!')
|
MainWindow.clearData()
MainWindow.openPost3D()
PostProcess.script_openFile(-1,"Post3D","%examplesPath%/water.vtk")
PostProcess.script_openFile(-1,"Post3D","%examplesPath%/platform.vtk")
PostProcess.script_applyClicked(-1,"Post3D")
PostProcess.script_Properties_streamline_integration_direction(-1,"Post3D",3,2)
PostProcess.script_Properties_streamline_integration_type(-1,"Post3D",3,1)
PostProcess.script_Properties_streamline_integration_stepUnit(-1,"Post3D",3,2)
PostProcess.script_Properties_streamline_seeds_num_points(-1,"Post3D",3,100)
PostProcess.script_FilterStreamLine(-1,"Post3D",1)
PostProcess.script_applyClicked(-1,"Post3D")
|
MainWindow.clearData()
MainWindow.openPost3D()
PostProcess.script_openFile(-1, 'Post3D', '%examplesPath%/water.vtk')
PostProcess.script_openFile(-1, 'Post3D', '%examplesPath%/platform.vtk')
PostProcess.script_applyClicked(-1, 'Post3D')
PostProcess.script_Properties_streamline_integration_direction(-1, 'Post3D', 3, 2)
PostProcess.script_Properties_streamline_integration_type(-1, 'Post3D', 3, 1)
PostProcess.script_Properties_streamline_integration_stepUnit(-1, 'Post3D', 3, 2)
PostProcess.script_Properties_streamline_seeds_num_points(-1, 'Post3D', 3, 100)
PostProcess.script_FilterStreamLine(-1, 'Post3D', 1)
PostProcess.script_applyClicked(-1, 'Post3D')
|
class deques():
def __init__(self):
self.items = []
def addFront(self,item):
return self.items.append(item)
def addRear(self,item):
return self.items.insert(0,item)
def removeFront(self):
return self.items.pop()
def removeRear(self):
return self.items.pop(1)
def length(self):
return len(self.items)
def IsEmpty(self):
return self.items == []
d = deques()
d.IsEmpty()
d.addFront(10)
d.addFront(20)
d.addRear(30)
d.length()
d.removeRear()
d.removeRear()
d.IsEmpty()
d.removeFront()
d.IsEmpty()
|
class Deques:
def __init__(self):
self.items = []
def add_front(self, item):
return self.items.append(item)
def add_rear(self, item):
return self.items.insert(0, item)
def remove_front(self):
return self.items.pop()
def remove_rear(self):
return self.items.pop(1)
def length(self):
return len(self.items)
def is_empty(self):
return self.items == []
d = deques()
d.IsEmpty()
d.addFront(10)
d.addFront(20)
d.addRear(30)
d.length()
d.removeRear()
d.removeRear()
d.IsEmpty()
d.removeFront()
d.IsEmpty()
|
Despesas = float(input("Quanto foi gasto?"))
Gorjeta = Despesas / 100 * 10
Total = Despesas + Gorjeta
print("--------------------------------------- \n O total foi de R${:.2f} \n Com uma gorjeta de R${:.2f} \n --------------------------------------- ".format(Total, Gorjeta))
|
despesas = float(input('Quanto foi gasto?'))
gorjeta = Despesas / 100 * 10
total = Despesas + Gorjeta
print('--------------------------------------- \n O total foi de R${:.2f} \n Com uma gorjeta de R${:.2f} \n --------------------------------------- '.format(Total, Gorjeta))
|
"""
Entradas
Chelines-->int-->CA
Dracmas-->int-->DG
Pesetas-->int-->P
salidas
CA-->int-->P
DG-->int-->FrancoFrances
P-->int-->Dolares
P-->int-->LirasItalianas
"""
#entrada
CA=int(input("Ingrese la cantidad de Chelines Austriacos a cambiar: "))
DG=int(input("Ingrese la cantidad de Dracmas Griegos a cambiar: "))
P=int(input("Ingrese la cantidad de pesetas a cambiar: "))
#caja negra
Pesetas=(CA*956871)/100
FrancoFrances=((DG*88607)/100)*(1/20110)
Dolares=P/122499
LirasItalianas=(P*100)/9289
print("La cantidad de Chelines Austriacos a Pesetas es: ""{:.0F}".format(Pesetas))
print("La cantidad de Dracmas Griegos a Franco Frances es: ""{:.0F}".format(FrancoFrances))
print("La cantidad de Pesetas a Dolares es: ""{:.0F}".format(Dolares))
print("La cantidad de Pesetas a Liras Italianas es: ""{:.0F}".format(LirasItalianas))
|
"""
Entradas
Chelines-->int-->CA
Dracmas-->int-->DG
Pesetas-->int-->P
salidas
CA-->int-->P
DG-->int-->FrancoFrances
P-->int-->Dolares
P-->int-->LirasItalianas
"""
ca = int(input('Ingrese la cantidad de Chelines Austriacos a cambiar: '))
dg = int(input('Ingrese la cantidad de Dracmas Griegos a cambiar: '))
p = int(input('Ingrese la cantidad de pesetas a cambiar: '))
pesetas = CA * 956871 / 100
franco_frances = DG * 88607 / 100 * (1 / 20110)
dolares = P / 122499
liras_italianas = P * 100 / 9289
print('La cantidad de Chelines Austriacos a Pesetas es: {:.0F}'.format(Pesetas))
print('La cantidad de Dracmas Griegos a Franco Frances es: {:.0F}'.format(FrancoFrances))
print('La cantidad de Pesetas a Dolares es: {:.0F}'.format(Dolares))
print('La cantidad de Pesetas a Liras Italianas es: {:.0F}'.format(LirasItalianas))
|
def cc_lint_test_impl(ctx):
args = " ".join(
[ctx.expand_make_variables("cmd", arg, {})
for arg in ctx.attr.linter_args])
ctx.file_action(
content = "%s %s %s" % (
ctx.executable.linter.short_path,
args,
" ".join([src.short_path for src in ctx.files.srcs])),
output = ctx.outputs.executable,
executable = True)
return struct(
runfiles = ctx.runfiles(files = ctx.files.linter + ctx.files.srcs),
)
cc_lint_test = rule(
attrs = {
"srcs": attr.label_list(allow_files = True),
"linter": attr.label(
default = Label("@styleguide//:cpplint"),
executable = True,
cfg = "host"),
"linter_args": attr.string_list(
default=["--root=$$(pwd)"]),
},
test = True,
implementation = cc_lint_test_impl,
)
def cc_clang_format_test_impl(ctx):
cmds = []
cmds.append("for src in %s; do" % (
" ".join([src.short_path for src in ctx.files.srcs])))
cmds.append("clang-format -style=google $src > /tmp/formatted_src ;")
cmds.append("diff -u $src /tmp/formatted_src ;")
cmds.append("done")
ctx.file_action(
content = " ".join(cmds),
output = ctx.outputs.executable,
executable = True)
return struct(
runfiles = ctx.runfiles(files = ctx.files.srcs),
)
cc_clang_format_test = rule(
attrs = {
"srcs": attr.label_list(allow_files = True),
},
test = True,
implementation = cc_clang_format_test_impl,
)
|
def cc_lint_test_impl(ctx):
args = ' '.join([ctx.expand_make_variables('cmd', arg, {}) for arg in ctx.attr.linter_args])
ctx.file_action(content='%s %s %s' % (ctx.executable.linter.short_path, args, ' '.join([src.short_path for src in ctx.files.srcs])), output=ctx.outputs.executable, executable=True)
return struct(runfiles=ctx.runfiles(files=ctx.files.linter + ctx.files.srcs))
cc_lint_test = rule(attrs={'srcs': attr.label_list(allow_files=True), 'linter': attr.label(default=label('@styleguide//:cpplint'), executable=True, cfg='host'), 'linter_args': attr.string_list(default=['--root=$$(pwd)'])}, test=True, implementation=cc_lint_test_impl)
def cc_clang_format_test_impl(ctx):
cmds = []
cmds.append('for src in %s; do' % ' '.join([src.short_path for src in ctx.files.srcs]))
cmds.append('clang-format -style=google $src > /tmp/formatted_src ;')
cmds.append('diff -u $src /tmp/formatted_src ;')
cmds.append('done')
ctx.file_action(content=' '.join(cmds), output=ctx.outputs.executable, executable=True)
return struct(runfiles=ctx.runfiles(files=ctx.files.srcs))
cc_clang_format_test = rule(attrs={'srcs': attr.label_list(allow_files=True)}, test=True, implementation=cc_clang_format_test_impl)
|
# pycrc -- parameterisable CRC calculation utility and C source code generator
#
# Copyright (c) 2017 Thomas Pircher <tehpeh-web@tty1.net>
#
# 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.
"""
This modules simplifies an expression.
import pycrc.expr as exp
my_expr = exp.Xor('var', exp.Parenthesis(exp.And('0x700', 4)))
print('"{}" -> "{}"'.format(my_expr, my_expr.simplify()))
"""
def _classify(val):
"""
Creates a Terminal object if the parameter is a string or an integer.
"""
if type(val) is int:
return Terminal(val)
if type(val) is str:
if val.isdigit():
return Terminal(int(val), val)
if val[:2].lower() == '0x':
return Terminal(int(val, 16), val)
return Terminal(val)
return val
class Expression(object):
"""
Base class for all expressions.
"""
def is_int(self, val = None):
return False
class Terminal(Expression):
"""
A terminal object.
"""
def __init__(self, val, pretty = None):
"""
Construct a Terminal.
The val variable is usually a string or an integer. Integers may also
be passed as strings. The pretty-printer will use the string when
formatting the expression.
"""
self.val = val
self.pretty = pretty
def __str__(self):
"""
Return the string expression of this object.
"""
if self.pretty is None:
return str(self.val)
return self.pretty
def simplify(self):
"""
Return a simplified version of this sub-expression.
"""
return self
def is_int(self, val = None):
"""
Return True if the value of this Terminal is an integer.
"""
if type(self.val) is int:
return val is None or self.val == val
return False
class FunctionCall(Expression):
"""
Represent a function call
"""
def __init__(self, name, args):
"""
Construct a function call object.
"""
self.name = _classify(name)
self.args = [_classify(arg) for arg in args]
def __str__(self):
"""
Return the string expression of this object.
"""
return str(self.name) + '(' + ', '.join([str(arg) for arg in self.args]) + ')'
def simplify(self):
"""
Return a simplified version of this sub-expression.
"""
args = [arg.simplify() for arg in self.args]
return FunctionCall(self.name, args)
class Parenthesis(Expression):
"""
Represent a pair of round brackets.
"""
def __init__(self, val):
"""
Construct a parenthesis object.
"""
self.val = _classify(val)
def simplify(self):
"""
Return a simplified version of this sub-expression.
"""
val = self.val.simplify()
if type(val) is Terminal:
return val
return Parenthesis(val)
def __str__(self):
"""
Return the string expression of this object.
"""
return '(' + str(self.val) + ')'
class Add(Expression):
"""
Represent an addition of operands.
"""
def __init__(self, lhs, rhs):
"""
Construct an addition object.
"""
self.lhs = _classify(lhs)
self.rhs = _classify(rhs)
def simplify(self):
"""
Return a simplified version of this sub-expression.
"""
lhs = self.lhs.simplify()
rhs = self.rhs.simplify()
if lhs.is_int() and rhs.is_int():
return Terminal(lhs.val + rhs.val)
if lhs.is_int(0):
return rhs
if rhs.is_int(0):
return lhs
return Add(lhs, rhs)
def __str__(self):
"""
Return the string expression of this object.
"""
return str(self.lhs) + ' + ' + str(self.rhs)
class Sub(Expression):
"""
Represent a subtraction of operands.
"""
def __init__(self, lhs, rhs):
"""
Construct subtraction object.
"""
self.lhs = _classify(lhs)
self.rhs = _classify(rhs)
def simplify(self):
"""
Return a simplified version of this sub-expression.
"""
lhs = self.lhs.simplify()
rhs = self.rhs.simplify()
if lhs.is_int() and rhs.is_int():
return Terminal(lhs.val - rhs.val)
if lhs.is_int(0):
return rhs
if rhs.is_int(0):
return lhs
return Sub(lhs, rhs)
def __str__(self):
"""
Return the string expression of this object.
"""
return str(self.lhs) + ' - ' + str(self.rhs)
class Mul(Expression):
"""
Represent the multiplication of operands.
"""
def __init__(self, lhs, rhs):
"""
Construct a multiplication object.
"""
self.lhs = _classify(lhs)
self.rhs = _classify(rhs)
def simplify(self):
"""
Return a simplified version of this sub-expression.
"""
lhs = self.lhs.simplify()
rhs = self.rhs.simplify()
if lhs.is_int() and rhs.is_int():
return Terminal(lhs.val * rhs.val)
if lhs.is_int(0) or rhs.is_int(0):
return Terminal(0)
if lhs.is_int(1):
return rhs
if rhs.is_int(1):
return lhs
return Mul(lhs, rhs)
def __str__(self):
"""
Return the string expression of this object.
"""
return str(self.lhs) + ' * ' + str(self.rhs)
class Shl(Expression):
"""
Shift left operation.
"""
def __init__(self, lhs, rhs):
"""
Construct a shift left object.
"""
self.lhs = _classify(lhs)
self.rhs = _classify(rhs)
def simplify(self):
"""
Return a simplified version of this sub-expression.
"""
lhs = self.lhs.simplify()
rhs = self.rhs.simplify()
if lhs.is_int() and rhs.is_int():
return Terminal(lhs.val << rhs.val)
if lhs.is_int(0):
return Terminal(0)
if rhs.is_int(0):
return lhs
return Shl(lhs, rhs)
def __str__(self):
"""
Return the string expression of this object.
"""
return str(self.lhs) + ' << ' + str(self.rhs)
class Shr(Expression):
"""
Shift right operation.
"""
def __init__(self, lhs, rhs):
"""
Construct a shift right object.
"""
self.lhs = _classify(lhs)
self.rhs = _classify(rhs)
def simplify(self):
"""
Return a simplified version of this sub-expression.
"""
lhs = self.lhs.simplify()
rhs = self.rhs.simplify()
if lhs.is_int() and rhs.is_int():
return Terminal(lhs.val >> rhs.val)
if lhs.is_int(0):
return Terminal(0)
if rhs.is_int(0):
return lhs
return Shr(lhs, rhs)
def __str__(self):
"""
Return the string expression of this object.
"""
return str(self.lhs) + ' >> ' + str(self.rhs)
class Or(Expression):
"""
Logical or operation.
"""
def __init__(self, lhs, rhs):
"""
Construct a logical and object.
"""
self.lhs = _classify(lhs)
self.rhs = _classify(rhs)
def simplify(self):
"""
Return a simplified version of this sub-expression.
"""
lhs = self.lhs.simplify()
rhs = self.rhs.simplify()
if lhs.is_int() and rhs.is_int():
return Terminal(lhs.val | rhs.val)
if lhs.is_int(0):
return rhs
if rhs.is_int(0):
return lhs
return Or(lhs, rhs)
def __str__(self):
"""
Return the string expression of this object.
"""
return str(self.lhs) + ' | ' + str(self.rhs)
class And(Expression):
"""
Logical and operation.
"""
def __init__(self, lhs, rhs):
"""
Construct a logical and object.
"""
self.lhs = _classify(lhs)
self.rhs = _classify(rhs)
def simplify(self):
"""
Return a simplified version of this sub-expression.
"""
lhs = self.lhs.simplify()
rhs = self.rhs.simplify()
if lhs.is_int() and rhs.is_int():
return Terminal(lhs.val & rhs.val)
if lhs.is_int(0) or rhs.is_int(0):
return Terminal(0)
return And(lhs, rhs)
def __str__(self):
"""
Return the string expression of this object.
"""
return str(self.lhs) + ' & ' + str(self.rhs)
class Xor(Expression):
"""
Logical xor operation.
"""
def __init__(self, lhs, rhs):
"""
Construct a logical xor object.
"""
self.lhs = _classify(lhs)
self.rhs = _classify(rhs)
def simplify(self):
"""
Return a simplified version of this sub-expression.
"""
lhs = self.lhs.simplify()
rhs = self.rhs.simplify()
if lhs.is_int() and rhs.is_int():
return Terminal(lhs.val ^ rhs.val)
if lhs.is_int(0):
return rhs
if rhs.is_int(0):
return lhs
return Xor(lhs, rhs)
def __str__(self):
"""
Return the string expression of this object.
"""
return str(self.lhs) + ' ^ ' + str(self.rhs)
|
"""
This modules simplifies an expression.
import pycrc.expr as exp
my_expr = exp.Xor('var', exp.Parenthesis(exp.And('0x700', 4)))
print('"{}" -> "{}"'.format(my_expr, my_expr.simplify()))
"""
def _classify(val):
"""
Creates a Terminal object if the parameter is a string or an integer.
"""
if type(val) is int:
return terminal(val)
if type(val) is str:
if val.isdigit():
return terminal(int(val), val)
if val[:2].lower() == '0x':
return terminal(int(val, 16), val)
return terminal(val)
return val
class Expression(object):
"""
Base class for all expressions.
"""
def is_int(self, val=None):
return False
class Terminal(Expression):
"""
A terminal object.
"""
def __init__(self, val, pretty=None):
"""
Construct a Terminal.
The val variable is usually a string or an integer. Integers may also
be passed as strings. The pretty-printer will use the string when
formatting the expression.
"""
self.val = val
self.pretty = pretty
def __str__(self):
"""
Return the string expression of this object.
"""
if self.pretty is None:
return str(self.val)
return self.pretty
def simplify(self):
"""
Return a simplified version of this sub-expression.
"""
return self
def is_int(self, val=None):
"""
Return True if the value of this Terminal is an integer.
"""
if type(self.val) is int:
return val is None or self.val == val
return False
class Functioncall(Expression):
"""
Represent a function call
"""
def __init__(self, name, args):
"""
Construct a function call object.
"""
self.name = _classify(name)
self.args = [_classify(arg) for arg in args]
def __str__(self):
"""
Return the string expression of this object.
"""
return str(self.name) + '(' + ', '.join([str(arg) for arg in self.args]) + ')'
def simplify(self):
"""
Return a simplified version of this sub-expression.
"""
args = [arg.simplify() for arg in self.args]
return function_call(self.name, args)
class Parenthesis(Expression):
"""
Represent a pair of round brackets.
"""
def __init__(self, val):
"""
Construct a parenthesis object.
"""
self.val = _classify(val)
def simplify(self):
"""
Return a simplified version of this sub-expression.
"""
val = self.val.simplify()
if type(val) is Terminal:
return val
return parenthesis(val)
def __str__(self):
"""
Return the string expression of this object.
"""
return '(' + str(self.val) + ')'
class Add(Expression):
"""
Represent an addition of operands.
"""
def __init__(self, lhs, rhs):
"""
Construct an addition object.
"""
self.lhs = _classify(lhs)
self.rhs = _classify(rhs)
def simplify(self):
"""
Return a simplified version of this sub-expression.
"""
lhs = self.lhs.simplify()
rhs = self.rhs.simplify()
if lhs.is_int() and rhs.is_int():
return terminal(lhs.val + rhs.val)
if lhs.is_int(0):
return rhs
if rhs.is_int(0):
return lhs
return add(lhs, rhs)
def __str__(self):
"""
Return the string expression of this object.
"""
return str(self.lhs) + ' + ' + str(self.rhs)
class Sub(Expression):
"""
Represent a subtraction of operands.
"""
def __init__(self, lhs, rhs):
"""
Construct subtraction object.
"""
self.lhs = _classify(lhs)
self.rhs = _classify(rhs)
def simplify(self):
"""
Return a simplified version of this sub-expression.
"""
lhs = self.lhs.simplify()
rhs = self.rhs.simplify()
if lhs.is_int() and rhs.is_int():
return terminal(lhs.val - rhs.val)
if lhs.is_int(0):
return rhs
if rhs.is_int(0):
return lhs
return sub(lhs, rhs)
def __str__(self):
"""
Return the string expression of this object.
"""
return str(self.lhs) + ' - ' + str(self.rhs)
class Mul(Expression):
"""
Represent the multiplication of operands.
"""
def __init__(self, lhs, rhs):
"""
Construct a multiplication object.
"""
self.lhs = _classify(lhs)
self.rhs = _classify(rhs)
def simplify(self):
"""
Return a simplified version of this sub-expression.
"""
lhs = self.lhs.simplify()
rhs = self.rhs.simplify()
if lhs.is_int() and rhs.is_int():
return terminal(lhs.val * rhs.val)
if lhs.is_int(0) or rhs.is_int(0):
return terminal(0)
if lhs.is_int(1):
return rhs
if rhs.is_int(1):
return lhs
return mul(lhs, rhs)
def __str__(self):
"""
Return the string expression of this object.
"""
return str(self.lhs) + ' * ' + str(self.rhs)
class Shl(Expression):
"""
Shift left operation.
"""
def __init__(self, lhs, rhs):
"""
Construct a shift left object.
"""
self.lhs = _classify(lhs)
self.rhs = _classify(rhs)
def simplify(self):
"""
Return a simplified version of this sub-expression.
"""
lhs = self.lhs.simplify()
rhs = self.rhs.simplify()
if lhs.is_int() and rhs.is_int():
return terminal(lhs.val << rhs.val)
if lhs.is_int(0):
return terminal(0)
if rhs.is_int(0):
return lhs
return shl(lhs, rhs)
def __str__(self):
"""
Return the string expression of this object.
"""
return str(self.lhs) + ' << ' + str(self.rhs)
class Shr(Expression):
"""
Shift right operation.
"""
def __init__(self, lhs, rhs):
"""
Construct a shift right object.
"""
self.lhs = _classify(lhs)
self.rhs = _classify(rhs)
def simplify(self):
"""
Return a simplified version of this sub-expression.
"""
lhs = self.lhs.simplify()
rhs = self.rhs.simplify()
if lhs.is_int() and rhs.is_int():
return terminal(lhs.val >> rhs.val)
if lhs.is_int(0):
return terminal(0)
if rhs.is_int(0):
return lhs
return shr(lhs, rhs)
def __str__(self):
"""
Return the string expression of this object.
"""
return str(self.lhs) + ' >> ' + str(self.rhs)
class Or(Expression):
"""
Logical or operation.
"""
def __init__(self, lhs, rhs):
"""
Construct a logical and object.
"""
self.lhs = _classify(lhs)
self.rhs = _classify(rhs)
def simplify(self):
"""
Return a simplified version of this sub-expression.
"""
lhs = self.lhs.simplify()
rhs = self.rhs.simplify()
if lhs.is_int() and rhs.is_int():
return terminal(lhs.val | rhs.val)
if lhs.is_int(0):
return rhs
if rhs.is_int(0):
return lhs
return or(lhs, rhs)
def __str__(self):
"""
Return the string expression of this object.
"""
return str(self.lhs) + ' | ' + str(self.rhs)
class And(Expression):
"""
Logical and operation.
"""
def __init__(self, lhs, rhs):
"""
Construct a logical and object.
"""
self.lhs = _classify(lhs)
self.rhs = _classify(rhs)
def simplify(self):
"""
Return a simplified version of this sub-expression.
"""
lhs = self.lhs.simplify()
rhs = self.rhs.simplify()
if lhs.is_int() and rhs.is_int():
return terminal(lhs.val & rhs.val)
if lhs.is_int(0) or rhs.is_int(0):
return terminal(0)
return and(lhs, rhs)
def __str__(self):
"""
Return the string expression of this object.
"""
return str(self.lhs) + ' & ' + str(self.rhs)
class Xor(Expression):
"""
Logical xor operation.
"""
def __init__(self, lhs, rhs):
"""
Construct a logical xor object.
"""
self.lhs = _classify(lhs)
self.rhs = _classify(rhs)
def simplify(self):
"""
Return a simplified version of this sub-expression.
"""
lhs = self.lhs.simplify()
rhs = self.rhs.simplify()
if lhs.is_int() and rhs.is_int():
return terminal(lhs.val ^ rhs.val)
if lhs.is_int(0):
return rhs
if rhs.is_int(0):
return lhs
return xor(lhs, rhs)
def __str__(self):
"""
Return the string expression of this object.
"""
return str(self.lhs) + ' ^ ' + str(self.rhs)
|
# -*- coding: utf-8 -*-
"""
Created on Fri Oct 12 13:16:08 2018
@author: Kenneth Collins
"""
"""colRecoder2(dataFrame, colName, oldVal, newVal):
requires: pandas dataFrame, colName must be the columns name (e.g. df.colName), not a string
effects: returns a copy of the column. Does NOT mutate data.
Thus must be assigned to change data.
"""
def colRecoder2(dataFrame, colName, oldVal, newVal):
columnCopy = dataFrame.colName.copy()
columnCopy[oldVal] = newVal
return columnCopy
|
"""
Created on Fri Oct 12 13:16:08 2018
@author: Kenneth Collins
"""
'colRecoder2(dataFrame, colName, oldVal, newVal):\nrequires: pandas dataFrame, colName must be the columns name (e.g. df.colName), not a string \neffects: returns a copy of the column. Does NOT mutate data.\nThus must be assigned to change data.\n'
def col_recoder2(dataFrame, colName, oldVal, newVal):
column_copy = dataFrame.colName.copy()
columnCopy[oldVal] = newVal
return columnCopy
|
fname = input('Enter a file name:')
try :
fhand = open('ch07\\' + fname)
except :
print('File cannot be opened:',fname)
quit()
for str in fhand :
print(str.upper().rstrip())
try :
fhand.close()
except :
pass
|
fname = input('Enter a file name:')
try:
fhand = open('ch07\\' + fname)
except:
print('File cannot be opened:', fname)
quit()
for str in fhand:
print(str.upper().rstrip())
try:
fhand.close()
except:
pass
|
n = int(input())
total = 1
while n != 0:
total *= n
n -= 1
print(n)
print(total)
|
n = int(input())
total = 1
while n != 0:
total *= n
n -= 1
print(n)
print(total)
|
"""
# REMOVE NTH NODE FROM END OF LINKED LIST
Given the head of a linked list, remove the nth node from the end of the list and return its head.
Follow up: Could you do this in one pass?
Example 1:
Input: head = [1,2,3,4,5], n = 2
Output: [1,2,3,5]
Example 2:
Input: head = [1], n = 1
Output: []
Example 3:
Input: head = [1,2], n = 1
Output: [1]
Constraints:
The number of nodes in the list is sz.
1 <= sz <= 30
0 <= Node.val <= 100
1 <= n <= sz
"""
class ListNode:
def __init__(self, val=0, next=None):
self.val = val
self.next = next
class Solution:
def removeNthFromEnd(self, head, n):
front = head
parent = None
end = head
while n != 0:
end = end.next
n -= 1
while end != None:
end = end.next
parent = front
front = front.next
if parent == None:
return head.next
parent.next = front.next
return head
|
"""
# REMOVE NTH NODE FROM END OF LINKED LIST
Given the head of a linked list, remove the nth node from the end of the list and return its head.
Follow up: Could you do this in one pass?
Example 1:
Input: head = [1,2,3,4,5], n = 2
Output: [1,2,3,5]
Example 2:
Input: head = [1], n = 1
Output: []
Example 3:
Input: head = [1,2], n = 1
Output: [1]
Constraints:
The number of nodes in the list is sz.
1 <= sz <= 30
0 <= Node.val <= 100
1 <= n <= sz
"""
class Listnode:
def __init__(self, val=0, next=None):
self.val = val
self.next = next
class Solution:
def remove_nth_from_end(self, head, n):
front = head
parent = None
end = head
while n != 0:
end = end.next
n -= 1
while end != None:
end = end.next
parent = front
front = front.next
if parent == None:
return head.next
parent.next = front.next
return head
|
#!/usr/bin/env python3
# @AUTHUR: Kingsley Nnaji <kingsley.nnaji@gmail.com>
# @LICENCE: MIT
# Creation Date: 02.09.2019
def fib(n):
""" fib(number) -> number
fib takes a number as an Argurment and returns the fibonacci value of that number
>>> fib(8) -> 21
>>> fib(6) -> 8
>>> fib(0) -> 1
"""
y = {};
if n in y.keys():
return y[n]
if n <= 2:
f = 1
else:
f = fib(n-1) + fib(n-2)
y[n] = f
return f
if __name__ == "__main__":
print(" The 8th fibonaccifib number is : ", fib(8))
|
def fib(n):
""" fib(number) -> number
fib takes a number as an Argurment and returns the fibonacci value of that number
>>> fib(8) -> 21
>>> fib(6) -> 8
>>> fib(0) -> 1
"""
y = {}
if n in y.keys():
return y[n]
if n <= 2:
f = 1
else:
f = fib(n - 1) + fib(n - 2)
y[n] = f
return f
if __name__ == '__main__':
print(' The 8th fibonaccifib number is : ', fib(8))
|
def cool_string(s: str) -> bool:
"""
Let's call a string cool if it is formed only by Latin letters and no two lowercase and no two uppercase letters are in adjacent positions.
Given a string, check if it is cool.
"""
string_without_whitespace = ''.join(s.split())
if string_without_whitespace.isalpha():
for i, k in enumerate(range(len(string_without_whitespace)-1)):
if (string_without_whitespace[i].islower() and string_without_whitespace[i+1].islower()) or (string_without_whitespace[i].isupper() and string_without_whitespace[i+1].isupper()):
return False
return True
return False
|
def cool_string(s: str) -> bool:
"""
Let's call a string cool if it is formed only by Latin letters and no two lowercase and no two uppercase letters are in adjacent positions.
Given a string, check if it is cool.
"""
string_without_whitespace = ''.join(s.split())
if string_without_whitespace.isalpha():
for (i, k) in enumerate(range(len(string_without_whitespace) - 1)):
if string_without_whitespace[i].islower() and string_without_whitespace[i + 1].islower() or (string_without_whitespace[i].isupper() and string_without_whitespace[i + 1].isupper()):
return False
return True
return False
|
# https://leetcode.com/problems/matrix-diagonal-sum/
class Solution:
def diagonalSum(self, mat: List[List[int]]) -> int:
res = 0
i, j = 0, 0
while (j < len(mat)):
#print(i,j)
res += mat[i][j]
i += 1
j += 1
i, j = 0, len(mat)-1
while (j >= 0):
#print(i, j)
if i!=j:
res += mat[i][j]
i += 1
j -= 1
return res
|
class Solution:
def diagonal_sum(self, mat: List[List[int]]) -> int:
res = 0
(i, j) = (0, 0)
while j < len(mat):
res += mat[i][j]
i += 1
j += 1
(i, j) = (0, len(mat) - 1)
while j >= 0:
if i != j:
res += mat[i][j]
i += 1
j -= 1
return res
|
def test():
print('\nNON-NESTED BLOCK COMMENT EXAMPLE:')
sample = ''' /**
* Some comments
* longer comments here that we can parse.
*
* Rahoo
*/
function subroutine() {
a = /* inline comment */ b + c ;
}
/*/ <-- tricky comments */
/**
* Another comment.
*/
function something() {
}'''
print(commentstripper(sample))
print('\nNESTED BLOCK COMMENT EXAMPLE:')
sample = ''' /**
* Some comments
* longer comments here that we can parse.
*
* Rahoo
*//*
function subroutine() {
a = /* inline comment */ b + c ;
}
/*/ <-- tricky comments */
*/
/**
* Another comment.
*/
function something() {
}'''
print(commentstripper(sample))
if __name__ == '__main__':
test()
|
def test():
print('\nNON-NESTED BLOCK COMMENT EXAMPLE:')
sample = ' /**\n * Some comments\n * longer comments here that we can parse.\n *\n * Rahoo\n */\n function subroutine() {\n a = /* inline comment */ b + c ;\n }\n /*/ <-- tricky comments */\n\n /**\n * Another comment.\n */\n function something() {\n }'
print(commentstripper(sample))
print('\nNESTED BLOCK COMMENT EXAMPLE:')
sample = ' /**\n * Some comments\n * longer comments here that we can parse.\n *\n * Rahoo\n *//*\n function subroutine() {\n a = /* inline comment */ b + c ;\n }\n /*/ <-- tricky comments */\n */\n /**\n * Another comment.\n */\n function something() {\n }'
print(commentstripper(sample))
if __name__ == '__main__':
test()
|
# -*- coding: utf-8 -*-
{
'name': 'Slides',
'version': '1.0',
'sequence': 145,
'summary': 'Share and Publish Videos, Presentations and Documents',
'category': 'Website',
'description': """
Share and Publish Videos, Presentations and Documents'
======================================================
* Website Application
* Channel Management
* Filters and Tagging
* Statistics of Presentation
* Channel Subscription
* Supported document types : PDF, images, YouTube videos and Google Drive documents)
""",
'depends': ['website', 'website_mail'],
'data': [
'view/res_config.xml',
'view/website_slides.xml',
'view/website_slides_embed.xml',
'view/website_slides_backend.xml',
'data/website_slides_data.xml',
'security/ir.model.access.csv',
'security/website_slides_security.xml'
],
'demo': [
'data/website_slides_demo.xml'
],
'installable': True,
'application': True,
}
|
{'name': 'Slides', 'version': '1.0', 'sequence': 145, 'summary': 'Share and Publish Videos, Presentations and Documents', 'category': 'Website', 'description': "\nShare and Publish Videos, Presentations and Documents'\n======================================================\n\n * Website Application\n * Channel Management\n * Filters and Tagging\n * Statistics of Presentation\n * Channel Subscription\n * Supported document types : PDF, images, YouTube videos and Google Drive documents)\n", 'depends': ['website', 'website_mail'], 'data': ['view/res_config.xml', 'view/website_slides.xml', 'view/website_slides_embed.xml', 'view/website_slides_backend.xml', 'data/website_slides_data.xml', 'security/ir.model.access.csv', 'security/website_slides_security.xml'], 'demo': ['data/website_slides_demo.xml'], 'installable': True, 'application': True}
|
class Solution:
def maxSlidingWindow(self, nums: List[int], k: int) -> List[int]:
window = collections.deque()
ans = []
for i, num in enumerate(nums):
while window and num >= window[-1][0]:
window.pop()
window.append((num, i))
if i - window[0][-1] > k - 1:
window.popleft()
if i >= k - 1:
ans.append(window[0][0])
return ans
|
class Solution:
def max_sliding_window(self, nums: List[int], k: int) -> List[int]:
window = collections.deque()
ans = []
for (i, num) in enumerate(nums):
while window and num >= window[-1][0]:
window.pop()
window.append((num, i))
if i - window[0][-1] > k - 1:
window.popleft()
if i >= k - 1:
ans.append(window[0][0])
return ans
|
#Tuples - faster Lists you can't change
friends = ['John','Michael','Terry','Eric','Graham']
friends_tuple = ('John','Michael','Terry','Eric','Graham')
print(friends)
print(friends_tuple)
print(friends[2:4])
print(friends_tuple[2:4])
|
friends = ['John', 'Michael', 'Terry', 'Eric', 'Graham']
friends_tuple = ('John', 'Michael', 'Terry', 'Eric', 'Graham')
print(friends)
print(friends_tuple)
print(friends[2:4])
print(friends_tuple[2:4])
|
t1 = 0
t2 = 1
print(f'{t1} -> {t2} -> ', end='')
for c in range(1, 21):
t3 = t1 + t2
print(f'{t3} -> ', end='')
t1 = t2
t2 = t3
print('FIM', end='')
|
t1 = 0
t2 = 1
print(f'{t1} -> {t2} -> ', end='')
for c in range(1, 21):
t3 = t1 + t2
print(f'{t3} -> ', end='')
t1 = t2
t2 = t3
print('FIM', end='')
|
# COLORS = ['V', 'I', 'B', 'G', 'Y', 'O', 'R']
EMPTY = "-"
# DIRS = np.array([(1, 0), (0, -1), (-1, 0), (0, 1)])
RIGHTMOST = -1
def is_color(board, x, y, color):
if min(x, y) < 0:
return False
if x >= len(board):
return False
if y >= len(board[0]):
return False
if board[x][y] != color:
return False
return True
def get_group(board, x, y):
color = board[x][y]
group = []
if color == EMPTY:
return []
test = [(x, y)]
for i, j in test:
if is_color(board, i, j, color):
group.append((i, j))
board[i][j] = EMPTY
test.append((i + 1, j))
test.append((i, j - 1))
test.append((i - 1, j))
test.append((i, j + 1))
if len(group) > 1:
return (group, color)
return []
def get_groups(board):
copy = [row.copy() for row in board]
groups = []
x_max, y_max = len(copy), len(copy[0])
for x in range(x_max):
for y in range(y_max):
group = get_group(copy, x, y)
if group:
groups.append(group)
return groups
def get_color_count(board):
color_count = {}
for x in range(len(board)):
for y in range(len(board[x])):
if board[x][y] not in color_count:
color_count[board[x][y]] = 1
else:
color_count[board[x][y]] += 1
return color_count
def next_move(x, y, board):
groups = get_groups(board)
groups.sort(key=lambda x: len(x[0]))
return groups[0][0][0]
# print(groups)
# color_count = get_color_count(board)
# for group, color in groups:
# if color_count[color] - len(group) == 0:
# return group[0]
# for group, color in groups:
# if color_count[color] - len(group) != 1:
# return group[0]
# return groups[0][0][0]
|
empty = '-'
rightmost = -1
def is_color(board, x, y, color):
if min(x, y) < 0:
return False
if x >= len(board):
return False
if y >= len(board[0]):
return False
if board[x][y] != color:
return False
return True
def get_group(board, x, y):
color = board[x][y]
group = []
if color == EMPTY:
return []
test = [(x, y)]
for (i, j) in test:
if is_color(board, i, j, color):
group.append((i, j))
board[i][j] = EMPTY
test.append((i + 1, j))
test.append((i, j - 1))
test.append((i - 1, j))
test.append((i, j + 1))
if len(group) > 1:
return (group, color)
return []
def get_groups(board):
copy = [row.copy() for row in board]
groups = []
(x_max, y_max) = (len(copy), len(copy[0]))
for x in range(x_max):
for y in range(y_max):
group = get_group(copy, x, y)
if group:
groups.append(group)
return groups
def get_color_count(board):
color_count = {}
for x in range(len(board)):
for y in range(len(board[x])):
if board[x][y] not in color_count:
color_count[board[x][y]] = 1
else:
color_count[board[x][y]] += 1
return color_count
def next_move(x, y, board):
groups = get_groups(board)
groups.sort(key=lambda x: len(x[0]))
return groups[0][0][0]
|
def solveQuestion(inputPath, minValComp, maxValComp):
fileP = open(inputPath, 'r')
fileLines = fileP.readlines()
fileP.close()
botMoves = {}
botValues = {}
for line in fileLines:
line = line.strip('\n')
isLowOutput = False
isHighOutput = False
if line[:5] == 'value':
splitText = line.split(' ')
value = int(splitText[1])
botIndex = int(splitText[5])
if botIndex in botValues:
botValues[botIndex].append(value)
else:
botValues[botIndex] = [value]
else:
splitText = line.split(' ')
if splitText[5] == 'output':
isLowOutput = True
if splitText[10] == 'output':
isHighOutput = True
botIndexSource = int(splitText[1])
botIndexLow = int(splitText[6])
botIndexHigh = int(splitText[11])
botMoves[botIndexSource] = {}
if isLowOutput == True:
botMoves[botIndexSource]['low'] = -1 * botIndexLow - 1
else:
botMoves[botIndexSource]['low'] = botIndexLow
if isHighOutput == True:
botMoves[botIndexSource]['high'] = -1 * botIndexHigh - 1
else:
botMoves[botIndexSource]['high'] = botIndexHigh
while 1:
for bot in botValues:
values = list(botValues[bot])
if len(values) == 2:
moves = botMoves[bot]
botValues[bot] = []
lowBotIndex = moves['low']
highBotIndex = moves['high']
if values[0] > values[1]:
highValue = values[0]
lowValue = values[1]
else:
highValue = values[1]
lowValue = values[0]
if highValue == maxValComp and lowValue == minValComp:
return bot
if lowBotIndex in botValues:
botValues[lowBotIndex].append(lowValue)
else:
botValues[lowBotIndex] = [lowValue]
if highBotIndex in botValues:
botValues[highBotIndex].append(highValue)
else:
botValues[highBotIndex] = [highValue]
break
print(solveQuestion('InputD10Q1.txt', 17, 61))
|
def solve_question(inputPath, minValComp, maxValComp):
file_p = open(inputPath, 'r')
file_lines = fileP.readlines()
fileP.close()
bot_moves = {}
bot_values = {}
for line in fileLines:
line = line.strip('\n')
is_low_output = False
is_high_output = False
if line[:5] == 'value':
split_text = line.split(' ')
value = int(splitText[1])
bot_index = int(splitText[5])
if botIndex in botValues:
botValues[botIndex].append(value)
else:
botValues[botIndex] = [value]
else:
split_text = line.split(' ')
if splitText[5] == 'output':
is_low_output = True
if splitText[10] == 'output':
is_high_output = True
bot_index_source = int(splitText[1])
bot_index_low = int(splitText[6])
bot_index_high = int(splitText[11])
botMoves[botIndexSource] = {}
if isLowOutput == True:
botMoves[botIndexSource]['low'] = -1 * botIndexLow - 1
else:
botMoves[botIndexSource]['low'] = botIndexLow
if isHighOutput == True:
botMoves[botIndexSource]['high'] = -1 * botIndexHigh - 1
else:
botMoves[botIndexSource]['high'] = botIndexHigh
while 1:
for bot in botValues:
values = list(botValues[bot])
if len(values) == 2:
moves = botMoves[bot]
botValues[bot] = []
low_bot_index = moves['low']
high_bot_index = moves['high']
if values[0] > values[1]:
high_value = values[0]
low_value = values[1]
else:
high_value = values[1]
low_value = values[0]
if highValue == maxValComp and lowValue == minValComp:
return bot
if lowBotIndex in botValues:
botValues[lowBotIndex].append(lowValue)
else:
botValues[lowBotIndex] = [lowValue]
if highBotIndex in botValues:
botValues[highBotIndex].append(highValue)
else:
botValues[highBotIndex] = [highValue]
break
print(solve_question('InputD10Q1.txt', 17, 61))
|
def Mergesort(arr):
n= len(arr)
if n > 1:
mid = int(n/2)
left = arr[0:mid]
right = arr[mid:n]
Mergesort(left)
Mergesort(right)
Merge(left, right, arr)
def Merge(left, right, arr):
i = 0
j = 0
k = 0
while i < len(left) and j < len(right):
if left[i] <= right[j]:
arr[k] = left[i]
i += 1
else:
arr[k] = right[j]
j += 1
k =k + 1
while i < len(left):
arr[k] = left[i]
i += 1
k += 1
while j < len(right):
arr[k] = right[j]
j += 1
k += 1
if __name__ == "__main__":
merge = [8,4,23,42,16,15]
Mergesort(merge)
print(merge)
merge2 = [20,18,12,8,5,-2]
Mergesort(merge2)
print(merge2)
merge3 = [5,12,7,5,5,7]
Mergesort(merge3)
print(merge3)
merge4 =[2,3,5,7,13,11]
Mergesort(merge4)
print(merge4)
|
def mergesort(arr):
n = len(arr)
if n > 1:
mid = int(n / 2)
left = arr[0:mid]
right = arr[mid:n]
mergesort(left)
mergesort(right)
merge(left, right, arr)
def merge(left, right, arr):
i = 0
j = 0
k = 0
while i < len(left) and j < len(right):
if left[i] <= right[j]:
arr[k] = left[i]
i += 1
else:
arr[k] = right[j]
j += 1
k = k + 1
while i < len(left):
arr[k] = left[i]
i += 1
k += 1
while j < len(right):
arr[k] = right[j]
j += 1
k += 1
if __name__ == '__main__':
merge = [8, 4, 23, 42, 16, 15]
mergesort(merge)
print(merge)
merge2 = [20, 18, 12, 8, 5, -2]
mergesort(merge2)
print(merge2)
merge3 = [5, 12, 7, 5, 5, 7]
mergesort(merge3)
print(merge3)
merge4 = [2, 3, 5, 7, 13, 11]
mergesort(merge4)
print(merge4)
|
a = [5, 4, 8, 3, 4, 14, 90, 45, 9, 3, 2, 4]
for i in range(len(a), 0, -1):
for j in range(0, i - 1):
if a[j] > a[j + 1]:
a[j], a[j + 1] = a[j + 1], a[j]
print(a)
|
a = [5, 4, 8, 3, 4, 14, 90, 45, 9, 3, 2, 4]
for i in range(len(a), 0, -1):
for j in range(0, i - 1):
if a[j] > a[j + 1]:
(a[j], a[j + 1]) = (a[j + 1], a[j])
print(a)
|
# MEDIUM
# find smallest x, largest x, draw a line to split those two value
# store all points in to a set([])
# check if every point in set can be matched by mirroring the y axis
class Solution:
def isReflected(self, points: List[List[int]]) -> bool:
print(max(points),min(points))
check = set([(x,y) for x,y in points])
count = 0
minx,maxx = float("inf"), -float("inf")
for x,y in points:
minx = min(minx,x)
maxx = max(maxx,x)
line = (maxx+ minx) / 2
for x,y in check:
diff = abs(x-line)
if x > line:
if (x-diff*2,y) not in check:
return False
elif x< line:
if (x+diff*2,y) not in check :
return False
return True
|
class Solution:
def is_reflected(self, points: List[List[int]]) -> bool:
print(max(points), min(points))
check = set([(x, y) for (x, y) in points])
count = 0
(minx, maxx) = (float('inf'), -float('inf'))
for (x, y) in points:
minx = min(minx, x)
maxx = max(maxx, x)
line = (maxx + minx) / 2
for (x, y) in check:
diff = abs(x - line)
if x > line:
if (x - diff * 2, y) not in check:
return False
elif x < line:
if (x + diff * 2, y) not in check:
return False
return True
|
def is_prime(num):
if num <= 1:
return False
d = 2
while d * d <= num and num % d != 0:
d += 1
return d * d > num
|
def is_prime(num):
if num <= 1:
return False
d = 2
while d * d <= num and num % d != 0:
d += 1
return d * d > num
|
#encoding=utf8
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
def getClassStats(inputDict, className):
outStats = {}
for item in inputDict:
val = item[className]
if val not in outStats:
outStats[val] = 0
outStats[val] += 1
return outStats
def buildDictStats(inputDict, classList):
locStats = {"total": len(inputDict)}
for cat in classList:
locStats[cat] = getClassStats(inputDict, cat)
return locStats
def buildKeyOrder(shiftAttrib,
shiftAttribVal,
stats=None):
r"""
If the dataset is labelled, give the order in which the attributes are given
Args:
- shiftAttrib (dict): order of each category in the category vector
- shiftAttribVal (dict): list (ordered) of each possible labels for each
category of the category vector
- stats (dict): if not None, number of representant of each label for
each category. Will update the output dictionary with a
"weights" index telling how each labels should be
balanced in the classification loss.
Returns:
A dictionary output[key] = { "order" : int , "values" : list of string}
"""
MAX_VAL_EQUALIZATION = 10
output = {}
for key in shiftAttrib:
output[key] = {}
output[key]["order"] = shiftAttrib[key]
output[key]["values"] = [None for i in range(len(shiftAttribVal[key]))]
for cat, shift in shiftAttribVal[key].items():
output[key]["values"][shift] = cat
if stats is not None:
for key in output:
n = sum([x for key, x in stats[key].items()])
output[key]["weights"] = {}
for item, value in stats[key].items():
output[key]["weights"][item] = min(
MAX_VAL_EQUALIZATION, n / float(value + 1.0))
return output
|
def get_class_stats(inputDict, className):
out_stats = {}
for item in inputDict:
val = item[className]
if val not in outStats:
outStats[val] = 0
outStats[val] += 1
return outStats
def build_dict_stats(inputDict, classList):
loc_stats = {'total': len(inputDict)}
for cat in classList:
locStats[cat] = get_class_stats(inputDict, cat)
return locStats
def build_key_order(shiftAttrib, shiftAttribVal, stats=None):
"""
If the dataset is labelled, give the order in which the attributes are given
Args:
- shiftAttrib (dict): order of each category in the category vector
- shiftAttribVal (dict): list (ordered) of each possible labels for each
category of the category vector
- stats (dict): if not None, number of representant of each label for
each category. Will update the output dictionary with a
"weights" index telling how each labels should be
balanced in the classification loss.
Returns:
A dictionary output[key] = { "order" : int , "values" : list of string}
"""
max_val_equalization = 10
output = {}
for key in shiftAttrib:
output[key] = {}
output[key]['order'] = shiftAttrib[key]
output[key]['values'] = [None for i in range(len(shiftAttribVal[key]))]
for (cat, shift) in shiftAttribVal[key].items():
output[key]['values'][shift] = cat
if stats is not None:
for key in output:
n = sum([x for (key, x) in stats[key].items()])
output[key]['weights'] = {}
for (item, value) in stats[key].items():
output[key]['weights'][item] = min(MAX_VAL_EQUALIZATION, n / float(value + 1.0))
return output
|
c = 0
arr = [8,7,3,2,1,8,18,9,7,3,4]
for i in range(len(arr)):
if arr.count(i) == 1:
c += 1
print(c)
|
c = 0
arr = [8, 7, 3, 2, 1, 8, 18, 9, 7, 3, 4]
for i in range(len(arr)):
if arr.count(i) == 1:
c += 1
print(c)
|
# coding=UTF8
# Processamento
for num in range(100, 201):
if num % 2 > 0:
print(num)
|
for num in range(100, 201):
if num % 2 > 0:
print(num)
|
## https://leetcode.com/submissions/detail/230651834/
## problem is to find the numbers between 1 and length of the
## array that aren't in the array. simple way to do that is to
## do the set difference between range(1, len(ar)+1) and the
## input numbers
## hits 98th percentile in terms of runtime, though only
## 14th percentile in memory usage
class Solution:
def findDisappearedNumbers(self, nums: List[int]) -> List[int]:
return list(set(range(1, len(nums)+1)) - set(nums))
|
class Solution:
def find_disappeared_numbers(self, nums: List[int]) -> List[int]:
return list(set(range(1, len(nums) + 1)) - set(nums))
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Math.py: Just a sample file with a function.
This material is part of this post:
http://raccoon.ninja/pt/dev-pt/python-importando-todos-os-arquivos-de-um-diretorio/
"""
def calc_sum(a, b):
return a + b
|
"""
Math.py: Just a sample file with a function.
This material is part of this post:
http://raccoon.ninja/pt/dev-pt/python-importando-todos-os-arquivos-de-um-diretorio/
"""
def calc_sum(a, b):
return a + b
|
player_1_score = 0
player_2_score = 0
LOOP_UNTIL_USER_CHOOSES_TO_EXIT_AFTER_A_ROUND = True
while LOOP_UNTIL_USER_CHOOSES_TO_EXIT_AFTER_A_ROUND:
player_1_shape = input('[PLAYER 1]: Choose "rock", "paper", or "scissors": ')
player_2_shape = input('[PLAYER 2]: Choose "rock", "paper", or "scissors": ')
ROCK_SHAPE = 'rock'
PAPER_SHAPE = 'paper'
SCISSORS_SHAPE = 'scissors'
player_1_wins = (
(ROCK_SHAPE == player_1_shape and SCISSORS_SHAPE == player_2_shape) or
(PAPER_SHAPE == player_1_shape and ROCK_SHAPE == player_2_shape) or
(SCISSORS_SHAPE == player_1_shape and PAPER_SHAPE == player_2_shape))
player_2_wins = (
(ROCK_SHAPE == player_2_shape and SCISSORS_SHAPE == player_1_shape) or
(PAPER_SHAPE == player_2_shape and ROCK_SHAPE == player_1_shape) or
(SCISSORS_SHAPE == player_2_shape and PAPER_SHAPE == player_1_shape))
tie = (player_1_shape == player_2_shape)
if player_1_wins:
print('PLAYER 1 wins!')
player_1_score += 1
elif player_2_wins:
print('PLAYER 2 wins!')
player_2_score += 1
elif tie:
print('It is a tie!')
else:
print('Invalid choices!')
print("Player 1 Score: " + str(player_1_score))
print("Player 2 Score: " + str(player_2_score))
continue_playing_option = input("Continue playing? (enter YES or NO): ")
if "YES" == continue_playing_option:
continue
elif "NO" == continue_playing_option:
break
else:
print("Invalid choice. Exiting game...")
break
|
player_1_score = 0
player_2_score = 0
loop_until_user_chooses_to_exit_after_a_round = True
while LOOP_UNTIL_USER_CHOOSES_TO_EXIT_AFTER_A_ROUND:
player_1_shape = input('[PLAYER 1]: Choose "rock", "paper", or "scissors": ')
player_2_shape = input('[PLAYER 2]: Choose "rock", "paper", or "scissors": ')
rock_shape = 'rock'
paper_shape = 'paper'
scissors_shape = 'scissors'
player_1_wins = ROCK_SHAPE == player_1_shape and SCISSORS_SHAPE == player_2_shape or (PAPER_SHAPE == player_1_shape and ROCK_SHAPE == player_2_shape) or (SCISSORS_SHAPE == player_1_shape and PAPER_SHAPE == player_2_shape)
player_2_wins = ROCK_SHAPE == player_2_shape and SCISSORS_SHAPE == player_1_shape or (PAPER_SHAPE == player_2_shape and ROCK_SHAPE == player_1_shape) or (SCISSORS_SHAPE == player_2_shape and PAPER_SHAPE == player_1_shape)
tie = player_1_shape == player_2_shape
if player_1_wins:
print('PLAYER 1 wins!')
player_1_score += 1
elif player_2_wins:
print('PLAYER 2 wins!')
player_2_score += 1
elif tie:
print('It is a tie!')
else:
print('Invalid choices!')
print('Player 1 Score: ' + str(player_1_score))
print('Player 2 Score: ' + str(player_2_score))
continue_playing_option = input('Continue playing? (enter YES or NO): ')
if 'YES' == continue_playing_option:
continue
elif 'NO' == continue_playing_option:
break
else:
print('Invalid choice. Exiting game...')
break
|
#isdecimal
n1 = "947"
print(n1.isdecimal()) # -- D1
n2 = "947 2"
print(n2.isdecimal()) # -- D2
n3 = "abx123"
print(n3.isdecimal()) # -- D3
n4 = "\u0034"
print(n4.isdecimal()) # -- D4
n5 = "\u0038"
print(n5.isdecimal()) # -- D5
n6 = "\u0041"
print(n6.isdecimal()) # -- D6
n7 = "3.4"
print(n7.isdecimal()) # -- D7
n8 = "#$!@"
print(n8.isdecimal()) # -- D8
|
n1 = '947'
print(n1.isdecimal())
n2 = '947 2'
print(n2.isdecimal())
n3 = 'abx123'
print(n3.isdecimal())
n4 = '4'
print(n4.isdecimal())
n5 = '8'
print(n5.isdecimal())
n6 = 'A'
print(n6.isdecimal())
n7 = '3.4'
print(n7.isdecimal())
n8 = '#$!@'
print(n8.isdecimal())
|
"""
Package collecting modules defining discretized operators for different grids.
These operators can either be used directly or they are imported by the
respective methods defined on fields and grids.
.. autosummary::
:nosignatures:
cartesian
cylindrical
polar
spherical
"""
# Package-wide constant defining when to use parallel numba
PARALLELIZATION_THRESHOLD_2D = 256
""" int: threshold for determining when parallel code is created for
differential operators. The value gives the minimal number of support points in
each direction for a 2-dimensional grid """
PARALLELIZATION_THRESHOLD_3D = 64
""" int: threshold for determining when parallel code is created for
differential operators. The value gives the minimal number of support points in
each direction for a 3-dimensional grid """
|
"""
Package collecting modules defining discretized operators for different grids.
These operators can either be used directly or they are imported by the
respective methods defined on fields and grids.
.. autosummary::
:nosignatures:
cartesian
cylindrical
polar
spherical
"""
parallelization_threshold_2_d = 256
' int: threshold for determining when parallel code is created for\ndifferential operators. The value gives the minimal number of support points in\neach direction for a 2-dimensional grid '
parallelization_threshold_3_d = 64
' int: threshold for determining when parallel code is created for\ndifferential operators. The value gives the minimal number of support points in\neach direction for a 3-dimensional grid '
|
def memoize(f):
storage = {}
def wrapper(*args):
key = tuple(args)
if storage.has_key(key):
return storage[key]
else:
result = f(*args)
storage[key] = result
return result
return wrapper
def test_memoize():
@memoize
def silly(x):
if x==0:
return 0
else:
return silly(x-1) + 1
assert silly(100)==100
assert silly.func_closure[1].cell_contents[(100,)] == 100
|
def memoize(f):
storage = {}
def wrapper(*args):
key = tuple(args)
if storage.has_key(key):
return storage[key]
else:
result = f(*args)
storage[key] = result
return result
return wrapper
def test_memoize():
@memoize
def silly(x):
if x == 0:
return 0
else:
return silly(x - 1) + 1
assert silly(100) == 100
assert silly.func_closure[1].cell_contents[100,] == 100
|
# Fitur .append()
print(">>> Fitur .append()")
list_makanan = ['Gado-gado', 'Ayam Goreng', 'Rendang']
list_makanan.append('Ketoprak')
print(list_makanan)
# Fitur .clear()
print(">>> Fitur .clear()")
list_makanan = ['Gado-gado', 'Ayam Goreng', 'Rendang']
list_makanan.clear()
print(list_makanan)
# Fitur .copy()
print(">>> Fitur .copy()")
list_makanan1 = ['Gado-gado', 'Ayam Goreng', 'Rendang']
list_makanan2 = list_makanan1.copy()
list_makanan3 = list_makanan1
list_makanan2.append('Opor')
list_makanan3.append('Ketoprak')
print(list_makanan1)
print(list_makanan2)
# Fitur .count()
print(">>> Fitur .count()")
list_score = ['Budi', 'Sud', 'Budi', 'Budi', 'Budi', 'Sud', 'Sud']
score_budi = list_score.count('Budi')
score_sud = list_score.count('Sud')
print(score_budi) # akan menampilkan output 4
print(score_sud) # akan menampilkan output 3
# Fitur .extend()
print(">>> Fitur .extend()")
list_menu = ['Gado-gado', 'Ayam Goreng', 'Rendang']
list_minuman = ['Es Teh', 'Es Jeruk', 'Es Campur']
list_menu.extend(list_minuman)
print(list_menu)
|
print('>>> Fitur .append()')
list_makanan = ['Gado-gado', 'Ayam Goreng', 'Rendang']
list_makanan.append('Ketoprak')
print(list_makanan)
print('>>> Fitur .clear()')
list_makanan = ['Gado-gado', 'Ayam Goreng', 'Rendang']
list_makanan.clear()
print(list_makanan)
print('>>> Fitur .copy()')
list_makanan1 = ['Gado-gado', 'Ayam Goreng', 'Rendang']
list_makanan2 = list_makanan1.copy()
list_makanan3 = list_makanan1
list_makanan2.append('Opor')
list_makanan3.append('Ketoprak')
print(list_makanan1)
print(list_makanan2)
print('>>> Fitur .count()')
list_score = ['Budi', 'Sud', 'Budi', 'Budi', 'Budi', 'Sud', 'Sud']
score_budi = list_score.count('Budi')
score_sud = list_score.count('Sud')
print(score_budi)
print(score_sud)
print('>>> Fitur .extend()')
list_menu = ['Gado-gado', 'Ayam Goreng', 'Rendang']
list_minuman = ['Es Teh', 'Es Jeruk', 'Es Campur']
list_menu.extend(list_minuman)
print(list_menu)
|
#!/usr/bin/python
# coding=utf-8
class BasicGenerater(object):
def __init__(self):
self.first_name = 'Jack'
self.last_name = 'Freeman'
def my_name(self):
print('.'.join((self.first_name, self.last_name)))
def __del__(self):
print("call del")
class AdvaceGenerator(BasicGenerater):
def __init__(self):
BasicGenerater.__init__(self)
self.first_name = 'Bob'
class AdvaceGenerator2(BasicGenerater):
def __init__(self):
super(AdvaceGenerator2, self).__init__()
self.first_name = 'Alon'
if __name__ == "__main__":
basic = AdvaceGenerator2()
basic.my_name()
print("end")
|
class Basicgenerater(object):
def __init__(self):
self.first_name = 'Jack'
self.last_name = 'Freeman'
def my_name(self):
print('.'.join((self.first_name, self.last_name)))
def __del__(self):
print('call del')
class Advacegenerator(BasicGenerater):
def __init__(self):
BasicGenerater.__init__(self)
self.first_name = 'Bob'
class Advacegenerator2(BasicGenerater):
def __init__(self):
super(AdvaceGenerator2, self).__init__()
self.first_name = 'Alon'
if __name__ == '__main__':
basic = advace_generator2()
basic.my_name()
print('end')
|
# -*- coding: utf-8 -*-
"""
----------Phenix Labs----------
Created on Fri Jan 29 15:42:01 2021
@author: Gyan Krishna
Topic: reverse tuple
"""
tup =(10,20,30,40,50,60,)
rev = tup[::-1]
print("original tuple ::", tup)
print("reversed tuple ::", rev)
|
"""
----------Phenix Labs----------
Created on Fri Jan 29 15:42:01 2021
@author: Gyan Krishna
Topic: reverse tuple
"""
tup = (10, 20, 30, 40, 50, 60)
rev = tup[::-1]
print('original tuple ::', tup)
print('reversed tuple ::', rev)
|
class Solution:
def change(self, amount, coins):
dp = [0 for i in range(amount + 1)]
# for amount 0, you can have 1 combination, do not include any coin
dp[0] = 1
for coin in coins:
for i in range(coin, amount + 1):
# add i - coin dp value, the number of combinations excluding current coin, to current dp value
dp[i] += dp[i - coin]
return dp[amount]
def main():
mySol = Solution()
print("For the coins 1, 2, 3, 5, and amount 11, the number of combinations to make up the amount are ")
print(mySol.change(11, [1, 2, 3, 5]))
print("For the coins 1, 2, 5, and amount 5, the number of combinations to make up the amount are ")
print(mySol.change(5, [1, 2, 5]))
if __name__ == "__main__":
main()
|
class Solution:
def change(self, amount, coins):
dp = [0 for i in range(amount + 1)]
dp[0] = 1
for coin in coins:
for i in range(coin, amount + 1):
dp[i] += dp[i - coin]
return dp[amount]
def main():
my_sol = solution()
print('For the coins 1, 2, 3, 5, and amount 11, the number of combinations to make up the amount are ')
print(mySol.change(11, [1, 2, 3, 5]))
print('For the coins 1, 2, 5, and amount 5, the number of combinations to make up the amount are ')
print(mySol.change(5, [1, 2, 5]))
if __name__ == '__main__':
main()
|
class UI:
def __init__(self):
'''
'''
print('Welcome to calculator v1')
def start(self, controller):
'''
We ask the user for 2 numbers and add them.
'''
print('Please enter number1')
number1 = input()
print('Please enter number2')
number2 = input()
result = controller.add( int(number1), int(number2) )
print ('Result:', result)
print('Thank you for using the calculator!')
|
class Ui:
def __init__(self):
"""
"""
print('Welcome to calculator v1')
def start(self, controller):
"""
We ask the user for 2 numbers and add them.
"""
print('Please enter number1')
number1 = input()
print('Please enter number2')
number2 = input()
result = controller.add(int(number1), int(number2))
print('Result:', result)
print('Thank you for using the calculator!')
|
"""
ID: goundsada
LANG: PYTHON3
TASK: friday
"""
fin = open ('friday.in', 'r')
fout = open ('friday.out', 'w')
n = int(fin.readline().encode())
count = [0,0,0,0,0,0,0]
daysInMonth = (31,28,31,30,31,30,31,31,30,31,30,31)
day = 0
for i in range(n):
for j in daysInMonth:
count[day % 7] += 1
if (j == 28) and ((i+1900)%400==0 or ((i+1900)%100!=0 and (i+1900)%4==0)):
day +=29
else:
day += j
for x in count[:len(count)-1]:
fout.write(str(x) + " ")
fout.write(str(count[6]) + "\n")
fout.close()
|
"""
ID: goundsada
LANG: PYTHON3
TASK: friday
"""
fin = open('friday.in', 'r')
fout = open('friday.out', 'w')
n = int(fin.readline().encode())
count = [0, 0, 0, 0, 0, 0, 0]
days_in_month = (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
day = 0
for i in range(n):
for j in daysInMonth:
count[day % 7] += 1
if j == 28 and ((i + 1900) % 400 == 0 or ((i + 1900) % 100 != 0 and (i + 1900) % 4 == 0)):
day += 29
else:
day += j
for x in count[:len(count) - 1]:
fout.write(str(x) + ' ')
fout.write(str(count[6]) + '\n')
fout.close()
|
DEBUG = True
TESTING = False
MONGODB_SETTINGS = [{
'host':'localhost',
'port':27017,
'db':'REALTIME_APP'
}]
|
debug = True
testing = False
mongodb_settings = [{'host': 'localhost', 'port': 27017, 'db': 'REALTIME_APP'}]
|
class Measurement:
def __init__(self, x, result, elapsed, timeout_error, other_error):
"""
:type x: dict
:type result: object
:type elapsed: float
:type timeout_error: bool
"""
if not isinstance(x, dict):
raise TypeError('x should be a dictionary!')
self._x = x
self._result = result
self._elapsed_time = elapsed
self._timeout_error = timeout_error
self._other_error = other_error
self._weight = None
@property
def weight(self):
return self._weight
@property
def timeout_error(self):
return self._timeout_error
@property
def other_error(self):
return self._other_error
def __lt__(self, other):
return self.elapsed_time < other.elapsed_time
def __le__(self, other):
return self.elapsed_time <= other.elapsed_time
def __eq__(self, other):
return self.elapsed_time == other.elapsed_time
def __gt__(self, other):
return self.elapsed_time > other.elapsed_time
def __ge__(self, other):
return self.elapsed_time >= other.elapsed_time
def __ne__(self, other):
return self.elapsed_time != other.elapsed_time
@property
def x(self):
"""
:rtype: dict
"""
return self._x
@property
def elapsed_time(self):
return self._elapsed_time
@property
def dictionary(self):
if isinstance(self._result, dict) and 'elapsed' not in self._result and 'x' not in self._result:
return dict(
x=self._x, time=self.elapsed_time, timeout_error=self._timeout_error, other_error=self._other_error,
**self._result
)
else:
return {
**self._x, 'time': self.elapsed_time, 'result': self._result,
'timeout_error': self._timeout_error, 'other_error': self._other_error
}
|
class Measurement:
def __init__(self, x, result, elapsed, timeout_error, other_error):
"""
:type x: dict
:type result: object
:type elapsed: float
:type timeout_error: bool
"""
if not isinstance(x, dict):
raise type_error('x should be a dictionary!')
self._x = x
self._result = result
self._elapsed_time = elapsed
self._timeout_error = timeout_error
self._other_error = other_error
self._weight = None
@property
def weight(self):
return self._weight
@property
def timeout_error(self):
return self._timeout_error
@property
def other_error(self):
return self._other_error
def __lt__(self, other):
return self.elapsed_time < other.elapsed_time
def __le__(self, other):
return self.elapsed_time <= other.elapsed_time
def __eq__(self, other):
return self.elapsed_time == other.elapsed_time
def __gt__(self, other):
return self.elapsed_time > other.elapsed_time
def __ge__(self, other):
return self.elapsed_time >= other.elapsed_time
def __ne__(self, other):
return self.elapsed_time != other.elapsed_time
@property
def x(self):
"""
:rtype: dict
"""
return self._x
@property
def elapsed_time(self):
return self._elapsed_time
@property
def dictionary(self):
if isinstance(self._result, dict) and 'elapsed' not in self._result and ('x' not in self._result):
return dict(x=self._x, time=self.elapsed_time, timeout_error=self._timeout_error, other_error=self._other_error, **self._result)
else:
return {**self._x, 'time': self.elapsed_time, 'result': self._result, 'timeout_error': self._timeout_error, 'other_error': self._other_error}
|
# Week-11 Challenge 1 And Extra Challenge
x = open("Week-11/Week-11-Challenge.txt", "r")
print(x.read())
x.close()
print("\n-*-*-*-*-*-*")
print("-*-*-*-*-*-*")
print("-*-*-*-*-*-*\n")
y = open("Week-11/Week-11-Challenge.txt", "a")
y.write("\nThe best way we learn anything is by practice and exercise questions ")
y = open("Week-11/Week-11-Challenge.txt", "r")
print(y.read())
y.close()
print("\n-*-*-*-*-*-*")
print("-*-*-*-*-*-*")
print("-*-*-*-*-*-*\n")
f = open("Week-11/readline.txt", "r")
print(f.readlines())
f.close
|
x = open('Week-11/Week-11-Challenge.txt', 'r')
print(x.read())
x.close()
print('\n-*-*-*-*-*-*')
print('-*-*-*-*-*-*')
print('-*-*-*-*-*-*\n')
y = open('Week-11/Week-11-Challenge.txt', 'a')
y.write('\nThe best way we learn anything is by practice and exercise questions ')
y = open('Week-11/Week-11-Challenge.txt', 'r')
print(y.read())
y.close()
print('\n-*-*-*-*-*-*')
print('-*-*-*-*-*-*')
print('-*-*-*-*-*-*\n')
f = open('Week-11/readline.txt', 'r')
print(f.readlines())
f.close
|
""" TODO: Add model code for your resource here.
You'll want to change the file name to whatever your resource is called.
To add persistence to your models, use App Engine's Datastore if you anticipate
scaling to a high amount of data or traffic. The Python NDB module adds caching
and some other features to Datastore. Consider Google CloudSQL if you
need a relational database.
"""
class RESOURCE_NAME(object):
@classmethod
def find(cls, key):
""" Return a RESOURCE_NAME with key
Arg: key is a key used to fetch the resource object
TODO: replace with a query using Datastore or CloudSQL
"""
result = cls()
result.answer = '42'
return result
|
""" TODO: Add model code for your resource here.
You'll want to change the file name to whatever your resource is called.
To add persistence to your models, use App Engine's Datastore if you anticipate
scaling to a high amount of data or traffic. The Python NDB module adds caching
and some other features to Datastore. Consider Google CloudSQL if you
need a relational database.
"""
class Resource_Name(object):
@classmethod
def find(cls, key):
""" Return a RESOURCE_NAME with key
Arg: key is a key used to fetch the resource object
TODO: replace with a query using Datastore or CloudSQL
"""
result = cls()
result.answer = '42'
return result
|
#
# The MIT License (MIT)
#
# Copyright 2019 AT&T Intellectual Property. All other rights reserved.
#
# 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.
#
"""
.. module: openc2.version
:platform: Unix
.. version:: $$VERSION$$
.. moduleauthor:: Michael Stair <mstair@att.com>
"""
__version__ = "2.0.0"
|
"""
.. module: openc2.version
:platform: Unix
.. version:: $$VERSION$$
.. moduleauthor:: Michael Stair <mstair@att.com>
"""
__version__ = '2.0.0'
|
'''
Note: This kata is inspired by Convert a Number to a String!. Try that one too.
Description
We need a function that can transform a string into a number. What ways of achieving this do you know?
Note: Don't worry, all inputs will be strings, and every string is a perfectly valid representation of an integral number.
Examples
stringToNumber("1234") == 1234
stringToNumber("605" ) == 605
stringToNumber("1405") == 1405
stringToNumber("-7" ) == -7
'''
def string_to_number(num):
return int(num)
|
"""
Note: This kata is inspired by Convert a Number to a String!. Try that one too.
Description
We need a function that can transform a string into a number. What ways of achieving this do you know?
Note: Don't worry, all inputs will be strings, and every string is a perfectly valid representation of an integral number.
Examples
stringToNumber("1234") == 1234
stringToNumber("605" ) == 605
stringToNumber("1405") == 1405
stringToNumber("-7" ) == -7
"""
def string_to_number(num):
return int(num)
|
print(-1)
print(-0)
print(-(6))
print(-(12*2))
print(- -10)
|
print(-1)
print(-0)
print(-6)
print(-(12 * 2))
print(--10)
|
# Problem Statement: https://leetcode.com/problems/valid-anagram/
class Solution:
def isAnagram(self, s: str, t: str) -> bool:
if len(s) != len(t):
return False
else:
letter_cnt = {}
for letter in s:
if not letter in letter_cnt:
letter_cnt[letter] = 1
else:
letter_cnt[letter] = letter_cnt[letter] + 1
for letter in t:
if not letter in letter_cnt:
letter_cnt[letter] = 1
else:
letter_cnt[letter] = letter_cnt[letter] - 1
for letter in letter_cnt:
if letter_cnt[letter] > 0:
return False
return True
|
class Solution:
def is_anagram(self, s: str, t: str) -> bool:
if len(s) != len(t):
return False
else:
letter_cnt = {}
for letter in s:
if not letter in letter_cnt:
letter_cnt[letter] = 1
else:
letter_cnt[letter] = letter_cnt[letter] + 1
for letter in t:
if not letter in letter_cnt:
letter_cnt[letter] = 1
else:
letter_cnt[letter] = letter_cnt[letter] - 1
for letter in letter_cnt:
if letter_cnt[letter] > 0:
return False
return True
|
# -*- coding: utf-8 -*-
description = 'detectors'
group = 'lowlevel' # is included by panda.py
display_order = 70
excludes = ['qmesydaq']
tango_base = 'tango://phys.panda.frm2:10000/panda/'
devices = dict(
timer = device('nicos.devices.entangle.TimerChannel',
tangodevice = tango_base + 'frmctr2/timer',
visibility = (),
),
mon1 = device('nicos.devices.entangle.CounterChannel',
tangodevice = tango_base + 'frmctr2/mon1',
type = 'monitor',
fmtstr = '%d',
visibility = (),
),
mon2 = device('nicos.devices.entangle.CounterChannel',
tangodevice = tango_base + 'frmctr2/mon2',
type = 'monitor',
fmtstr = '%d',
visibility = (),
),
det1 = device('nicos.devices.entangle.CounterChannel',
tangodevice = tango_base + 'frmctr2/det1',
type = 'counter',
fmtstr = '%d',
visibility = (),
),
det2 = device('nicos.devices.entangle.CounterChannel',
tangodevice = tango_base + 'frmctr2/det2',
type = 'counter',
fmtstr = '%d',
visibility = (),
),
mon1_c = device('nicos.devices.tas.OrderCorrectedMonitor',
description = 'Monitor corrected for higher-order influence',
ki = 'ki',
mapping = {
1.2: 3.40088101,
1.3: 2.20258647,
1.4: 1.97398164,
1.5: 1.67008065,
1.6: 1.63189593,
1.7: 1.51506763,
1.8: 1.48594030,
1.9: 1.40500060,
2.0: 1.35613988,
2.1: 1.30626513,
2.2: 1.30626513,
2.3: 1.25470102,
2.4: 1.23979656,
2.5: 1.19249904,
2.6: 1.18458214,
2.7: 1.14345899,
2.8: 1.12199877,
2.9: 1.10924699,
3.0: 1.14791169,
3.1: 1.15693786,
3.2: 1.06977760,
3.3: 1.02518334,
3.4: 1.11537790,
3.5: 1.11127232,
3.6: 1.04328656,
3.7: 1.07179793,
3.8: 1.10400989,
3.9: 1.07342487,
4.0: 1.10219356,
4.1: 1.00121974,
},
),
det = device('nicos.devices.generic.Detector',
description = 'combined four channel single counter detector',
timers = ['timer'],
monitors = ['mon1', 'mon2', 'mon1_c'],
counters = ['det1', 'det2'],
# counters = ['det2'],
postprocess = [('mon1_c', 'mon1')],
maxage = 1,
pollinterval = 1,
),
)
startupcode = '''
SetDetectors(det)
'''
|
description = 'detectors'
group = 'lowlevel'
display_order = 70
excludes = ['qmesydaq']
tango_base = 'tango://phys.panda.frm2:10000/panda/'
devices = dict(timer=device('nicos.devices.entangle.TimerChannel', tangodevice=tango_base + 'frmctr2/timer', visibility=()), mon1=device('nicos.devices.entangle.CounterChannel', tangodevice=tango_base + 'frmctr2/mon1', type='monitor', fmtstr='%d', visibility=()), mon2=device('nicos.devices.entangle.CounterChannel', tangodevice=tango_base + 'frmctr2/mon2', type='monitor', fmtstr='%d', visibility=()), det1=device('nicos.devices.entangle.CounterChannel', tangodevice=tango_base + 'frmctr2/det1', type='counter', fmtstr='%d', visibility=()), det2=device('nicos.devices.entangle.CounterChannel', tangodevice=tango_base + 'frmctr2/det2', type='counter', fmtstr='%d', visibility=()), mon1_c=device('nicos.devices.tas.OrderCorrectedMonitor', description='Monitor corrected for higher-order influence', ki='ki', mapping={1.2: 3.40088101, 1.3: 2.20258647, 1.4: 1.97398164, 1.5: 1.67008065, 1.6: 1.63189593, 1.7: 1.51506763, 1.8: 1.4859403, 1.9: 1.4050006, 2.0: 1.35613988, 2.1: 1.30626513, 2.2: 1.30626513, 2.3: 1.25470102, 2.4: 1.23979656, 2.5: 1.19249904, 2.6: 1.18458214, 2.7: 1.14345899, 2.8: 1.12199877, 2.9: 1.10924699, 3.0: 1.14791169, 3.1: 1.15693786, 3.2: 1.0697776, 3.3: 1.02518334, 3.4: 1.1153779, 3.5: 1.11127232, 3.6: 1.04328656, 3.7: 1.07179793, 3.8: 1.10400989, 3.9: 1.07342487, 4.0: 1.10219356, 4.1: 1.00121974}), det=device('nicos.devices.generic.Detector', description='combined four channel single counter detector', timers=['timer'], monitors=['mon1', 'mon2', 'mon1_c'], counters=['det1', 'det2'], postprocess=[('mon1_c', 'mon1')], maxage=1, pollinterval=1))
startupcode = '\nSetDetectors(det)\n'
|
# -*- coding: utf-8 -*-
"""
Created on Mon Sep 2 17:52:35 2019
@author: Sarthak
"""
|
"""
Created on Mon Sep 2 17:52:35 2019
@author: Sarthak
"""
|
expected_output = {
"key_chains": {
"bla": {
"keys": {
1: {
"accept_lifetime": {
"end": "always valid",
"is_valid": True,
"start": "always valid",
},
"key_string": "cisco123",
"send_lifetime": {
"end": "always valid",
"is_valid": True,
"start": "always valid",
},
},
2: {
"accept_lifetime": {
"end": "06:01:00 UTC Jan 1 2010",
"is_valid": False,
"start": "10:10:10 UTC Jan 1 2002",
},
"key_string": "blabla",
"send_lifetime": {
"end": "06:01:00 UTC Jan 1 2010",
"is_valid": False,
"start": "10:10:10 UTC Jan 1 2002",
},
},
},
},
"cisco": {
"keys": {
1: {
"accept_lifetime": {
"end": "infinite",
"is_valid": True,
"start": "11:11:11 UTC Mar 1 2001",
},
"key_string": "cisco123",
"send_lifetime": {
"end": "infinite",
"is_valid": True,
"start": "11:11:11 UTC Mar 1 2001",
},
},
2: {
"accept_lifetime": {
"end": "22:11:11 UTC Dec 20 2030",
"is_valid": True,
"start": "11:22:11 UTC Jan 1 2001",
},
"key_string": "cisco234",
"send_lifetime": {
"end": "always valid",
"is_valid": True,
"start": "always valid",
},
},
3: {
"accept_lifetime": {
"end": "always valid",
"is_valid": True,
"start": "always valid",
},
"key_string": "cisco",
"send_lifetime": {
"end": "always valid",
"is_valid": True,
"start": "always valid",
},
},
},
},
},
}
|
expected_output = {'key_chains': {'bla': {'keys': {1: {'accept_lifetime': {'end': 'always valid', 'is_valid': True, 'start': 'always valid'}, 'key_string': 'cisco123', 'send_lifetime': {'end': 'always valid', 'is_valid': True, 'start': 'always valid'}}, 2: {'accept_lifetime': {'end': '06:01:00 UTC Jan 1 2010', 'is_valid': False, 'start': '10:10:10 UTC Jan 1 2002'}, 'key_string': 'blabla', 'send_lifetime': {'end': '06:01:00 UTC Jan 1 2010', 'is_valid': False, 'start': '10:10:10 UTC Jan 1 2002'}}}}, 'cisco': {'keys': {1: {'accept_lifetime': {'end': 'infinite', 'is_valid': True, 'start': '11:11:11 UTC Mar 1 2001'}, 'key_string': 'cisco123', 'send_lifetime': {'end': 'infinite', 'is_valid': True, 'start': '11:11:11 UTC Mar 1 2001'}}, 2: {'accept_lifetime': {'end': '22:11:11 UTC Dec 20 2030', 'is_valid': True, 'start': '11:22:11 UTC Jan 1 2001'}, 'key_string': 'cisco234', 'send_lifetime': {'end': 'always valid', 'is_valid': True, 'start': 'always valid'}}, 3: {'accept_lifetime': {'end': 'always valid', 'is_valid': True, 'start': 'always valid'}, 'key_string': 'cisco', 'send_lifetime': {'end': 'always valid', 'is_valid': True, 'start': 'always valid'}}}}}}
|
# Challenge 3 : Write a function called delete_starting_evens() that has a parameter named lst.
# The function should remove elements from the front of lst until the front of the list is not even.
# The function should then return lst.
# Date : Sun 07 Jun 2020 07:21:17 AM IST
def delete_starting_evens(lst):
while len(lst) != 0 and lst[0] % 2 == 0:
del lst[0]
return lst
print(delete_starting_evens([4, 8, 10, 11, 12, 15]))
print(delete_starting_evens([4, 8, 10]))
|
def delete_starting_evens(lst):
while len(lst) != 0 and lst[0] % 2 == 0:
del lst[0]
return lst
print(delete_starting_evens([4, 8, 10, 11, 12, 15]))
print(delete_starting_evens([4, 8, 10]))
|
def test(n):
i = 0
res = 0
while i < n:
i = i + 1
print(res)
test(100)
|
def test(n):
i = 0
res = 0
while i < n:
i = i + 1
print(res)
test(100)
|
# Online Python compiler (interpreter) to run Python online.
# Write Python 3 code in this online editor and run it.
vegetables = ["rucula", "tomate", "lechuga", "acelga"];
print(vegetables);
print(len(vegetables));
print(str(type(vegetables)));
print('-'*10);
print(vegetables[0]); # Elemento 0
print(vegetables[1:]) # Primer elemento en adelante
print(vegetables[2:]) # Segundo elemento en adelante
print(vegetables[0:10000]) # Python es magico y anda
print(vegetables[:]) # Copia todos los elementos en memoria ponele
print(vegetables[1:3][::-1]) # Invierte la lista
print('-'*10);
vegetables.append("berenjena") # Agrega a la lista
other_vegetables = ["brocoli", "coliflor", "lechuga"];
print(vegetables + other_vegetables);
vegetables.extend(other_vegetables);
print(vegetables);
print('-'*10);
a = [*vegetables, *other_vegetables];
print(a);
b = [vegetables, other_vegetables];
print(b);
c = ["d", *vegetables[1:3], "f", *other_vegetables]
print(c);
print('-'*10);
for vegetable in vegetables:
print(vegetable);
print('-'*10);
print(vegetables.pop());
print(vegetables.pop());
print(vegetables.pop());
print(vegetables.pop(0));
print(vegetables);
vegetables.remove("acelga");
print(vegetables);
print('-'*10);
new_list = vegetables; # Referencia
vegetables.append("acelga");
print(vegetables == new_list, vegetables, new_list)
print(id(vegetables), id(new_list));
new_list = vegetables[:]; # Copia
new_list.pop();
print(vegetables == new_list, vegetables, new_list)
print(id(vegetables), id(new_list));
# Otras formas copia lista
# new_list = vegetables.copy();
# new_list = list(vegetables);
# new_list = [+vegetables];
|
vegetables = ['rucula', 'tomate', 'lechuga', 'acelga']
print(vegetables)
print(len(vegetables))
print(str(type(vegetables)))
print('-' * 10)
print(vegetables[0])
print(vegetables[1:])
print(vegetables[2:])
print(vegetables[0:10000])
print(vegetables[:])
print(vegetables[1:3][::-1])
print('-' * 10)
vegetables.append('berenjena')
other_vegetables = ['brocoli', 'coliflor', 'lechuga']
print(vegetables + other_vegetables)
vegetables.extend(other_vegetables)
print(vegetables)
print('-' * 10)
a = [*vegetables, *other_vegetables]
print(a)
b = [vegetables, other_vegetables]
print(b)
c = ['d', *vegetables[1:3], 'f', *other_vegetables]
print(c)
print('-' * 10)
for vegetable in vegetables:
print(vegetable)
print('-' * 10)
print(vegetables.pop())
print(vegetables.pop())
print(vegetables.pop())
print(vegetables.pop(0))
print(vegetables)
vegetables.remove('acelga')
print(vegetables)
print('-' * 10)
new_list = vegetables
vegetables.append('acelga')
print(vegetables == new_list, vegetables, new_list)
print(id(vegetables), id(new_list))
new_list = vegetables[:]
new_list.pop()
print(vegetables == new_list, vegetables, new_list)
print(id(vegetables), id(new_list))
|
class DashboardMixin(object):
def getTitle(self):
raise NotImplementedError("You must override this method in a child class.")
def getContent(self):
raise NotImplementedError("You must override this method in a child class.")
|
class Dashboardmixin(object):
def get_title(self):
raise not_implemented_error('You must override this method in a child class.')
def get_content(self):
raise not_implemented_error('You must override this method in a child class.')
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.