content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
#PRIME OR NOT num=int(input('Enter a number')) if num<=1: print('Please enter a valid number') for i in range(2,num): if(num % i == 0): print("The number is not prime number") break else: print('The number is a prime number')
num = int(input('Enter a number')) if num <= 1: print('Please enter a valid number') for i in range(2, num): if num % i == 0: print('The number is not prime number') break else: print('The number is a prime number')
def serialize_suggestions_values_response(result): try: field_values = result["aggregations"]["values"]["buckets"] except KeyError: field_values = [] return field_values def serialize_mappings(mappings): result = [] for field in mappings: result.append({"name": field.name, "type": field.elastic_field_type}) return result
def serialize_suggestions_values_response(result): try: field_values = result['aggregations']['values']['buckets'] except KeyError: field_values = [] return field_values def serialize_mappings(mappings): result = [] for field in mappings: result.append({'name': field.name, 'type': field.elastic_field_type}) return result
with open('02.txt', 'r') as f: data = f.read() player_1_data, player_2_data = data.split('\n\n') player_1_cards = list(map(int, player_1_data.split(':')[1].split())) player_2_cards = list(map(int, player_2_data.split(':')[1].split())) while player_1_cards and player_2_cards: card_1 = player_1_cards.pop(0) card_2 = player_2_cards.pop(0) if card_1 > card_2: player_1_cards.extend([card_1, card_2]) elif card_2 > card_1: player_2_cards.extend([card_2, card_1]) if player_1_cards: winner = player_1_cards else: winner = player_2_cards total = 0 winner.reverse() for m, c in enumerate(winner): total += (m+1) * c print('Part 1:', total) player_1_cards = list(map(int, player_1_data.split(':')[1].split())) player_2_cards = list(map(int, player_2_data.split(':')[1].split())) def game(p1_cards, p2_cards): games = set() while p1_cards and p2_cards: if (game_state := tuple(p1_cards + ['+'] + p2_cards)) in games: return [1], [] else: games.add(game_state) c1 = p1_cards.pop(0) c2 = p2_cards.pop(0) if len(p1_cards) >= c1 and len(p2_cards) >= c2: sub1_cards, sub2_cards = game(p1_cards[:c1], p2_cards[:c2]) if sub1_cards: p1_cards.extend([c1, c2]) else: p2_cards.extend([c2, c1]) elif c1 > c2: p1_cards.extend([c1, c2]) elif c2 > c1: p2_cards.extend([c2, c1]) return p1_cards, p2_cards player_1_cards, player_2_cards = game(player_1_cards, player_2_cards) if player_1_cards: winner = player_1_cards else: winner = player_2_cards total = 0 winner.reverse() for m, c in enumerate(winner): total += (m+1) * c print('Part 2:', total)
with open('02.txt', 'r') as f: data = f.read() (player_1_data, player_2_data) = data.split('\n\n') player_1_cards = list(map(int, player_1_data.split(':')[1].split())) player_2_cards = list(map(int, player_2_data.split(':')[1].split())) while player_1_cards and player_2_cards: card_1 = player_1_cards.pop(0) card_2 = player_2_cards.pop(0) if card_1 > card_2: player_1_cards.extend([card_1, card_2]) elif card_2 > card_1: player_2_cards.extend([card_2, card_1]) if player_1_cards: winner = player_1_cards else: winner = player_2_cards total = 0 winner.reverse() for (m, c) in enumerate(winner): total += (m + 1) * c print('Part 1:', total) player_1_cards = list(map(int, player_1_data.split(':')[1].split())) player_2_cards = list(map(int, player_2_data.split(':')[1].split())) def game(p1_cards, p2_cards): games = set() while p1_cards and p2_cards: if (game_state := tuple(p1_cards + ['+'] + p2_cards)) in games: return ([1], []) else: games.add(game_state) c1 = p1_cards.pop(0) c2 = p2_cards.pop(0) if len(p1_cards) >= c1 and len(p2_cards) >= c2: (sub1_cards, sub2_cards) = game(p1_cards[:c1], p2_cards[:c2]) if sub1_cards: p1_cards.extend([c1, c2]) else: p2_cards.extend([c2, c1]) elif c1 > c2: p1_cards.extend([c1, c2]) elif c2 > c1: p2_cards.extend([c2, c1]) return (p1_cards, p2_cards) (player_1_cards, player_2_cards) = game(player_1_cards, player_2_cards) if player_1_cards: winner = player_1_cards else: winner = player_2_cards total = 0 winner.reverse() for (m, c) in enumerate(winner): total += (m + 1) * c print('Part 2:', total)
# -*- coding: utf-8 -*- # file: TextProcessor.py # date: 2022-03-08 class TextProcessor(object): def __init__(self): pass
class Textprocessor(object): def __init__(self): pass
class Solution: # @param s, a string # @param wordDict, a set<string> # @return a boolean def wordBreak(self, s, wordDict): dym = [True] for i in range(1, len(s)+1): dym.append(False) for word in wordDict: l = len(word) if l <= i and dym[i-l] and s.find(word, i-l, i) >= 0: dym[-1] = True break return dym[-1]
class Solution: def word_break(self, s, wordDict): dym = [True] for i in range(1, len(s) + 1): dym.append(False) for word in wordDict: l = len(word) if l <= i and dym[i - l] and (s.find(word, i - l, i) >= 0): dym[-1] = True break return dym[-1]
__author__ = "Alex Laird" __copyright__ = "Copyright 2020, Alex Laird" __version__ = "4.1.0" class PyngrokError(Exception): """ Raised when a general ``pyngrok`` error has occurred. """ pass class PyngrokSecurityError(PyngrokError): """ Raised when a ``pyngrok`` security error has occurred. """ pass class PyngrokNgrokInstallError(PyngrokError): """ Raised when an error has occurred while downloading and installing the ``ngrok`` binary. """ pass class PyngrokNgrokError(PyngrokError): """ Raised when an error occurs interacting directly with the ``ngrok`` binary. :var error: A description of the error being thrown. :vartype error: str :var ngrok_logs: The ``ngrok`` logs, which may be useful for debugging the error. :vartype ngrok_logs: list[NgrokLog] :var ngrok_error: The error that caused the ``ngrok`` process to fail. :vartype ngrok_error: str """ def __init__(self, error, ngrok_logs=None, ngrok_error=None): super(PyngrokNgrokError, self).__init__(error) if ngrok_logs is None: ngrok_logs = [] self.ngrok_logs = ngrok_logs self.ngrok_error = ngrok_error class PyngrokNgrokHTTPError(PyngrokNgrokError): """ Raised when an error occurs making a request to the ``ngrok`` web interface. The ``body`` contains the error response received from ``ngrok``. :var error: A description of the error being thrown. :vartype error: str :var url: The request URL that failed. :vartype url: str :var status_code: The response status code from ``ngrok``. :vartype status_code: int :var message: The response message from ``ngrok``. :vartype message: str :var headers: The request headers sent to ``ngrok``. :vartype headers: dict[str, str] :var body: The response body from ``ngrok``. :vartype body: str """ def __init__(self, error, url, status_code, message, headers, body): super(PyngrokNgrokHTTPError, self).__init__(error) self.url = url self.status_code = status_code self.message = message self.headers = headers self.body = body class PyngrokNgrokURLError(PyngrokNgrokError): """ Raised when an error occurs when trying to initiate an API request. :var error: A description of the error being thrown. :vartype error: str :var reason: The reason for the URL error. :vartype reason: str """ def __init__(self, error, reason): super(PyngrokNgrokURLError, self).__init__(error) self.reason = reason
__author__ = 'Alex Laird' __copyright__ = 'Copyright 2020, Alex Laird' __version__ = '4.1.0' class Pyngrokerror(Exception): """ Raised when a general ``pyngrok`` error has occurred. """ pass class Pyngroksecurityerror(PyngrokError): """ Raised when a ``pyngrok`` security error has occurred. """ pass class Pyngrokngrokinstallerror(PyngrokError): """ Raised when an error has occurred while downloading and installing the ``ngrok`` binary. """ pass class Pyngrokngrokerror(PyngrokError): """ Raised when an error occurs interacting directly with the ``ngrok`` binary. :var error: A description of the error being thrown. :vartype error: str :var ngrok_logs: The ``ngrok`` logs, which may be useful for debugging the error. :vartype ngrok_logs: list[NgrokLog] :var ngrok_error: The error that caused the ``ngrok`` process to fail. :vartype ngrok_error: str """ def __init__(self, error, ngrok_logs=None, ngrok_error=None): super(PyngrokNgrokError, self).__init__(error) if ngrok_logs is None: ngrok_logs = [] self.ngrok_logs = ngrok_logs self.ngrok_error = ngrok_error class Pyngrokngrokhttperror(PyngrokNgrokError): """ Raised when an error occurs making a request to the ``ngrok`` web interface. The ``body`` contains the error response received from ``ngrok``. :var error: A description of the error being thrown. :vartype error: str :var url: The request URL that failed. :vartype url: str :var status_code: The response status code from ``ngrok``. :vartype status_code: int :var message: The response message from ``ngrok``. :vartype message: str :var headers: The request headers sent to ``ngrok``. :vartype headers: dict[str, str] :var body: The response body from ``ngrok``. :vartype body: str """ def __init__(self, error, url, status_code, message, headers, body): super(PyngrokNgrokHTTPError, self).__init__(error) self.url = url self.status_code = status_code self.message = message self.headers = headers self.body = body class Pyngrokngrokurlerror(PyngrokNgrokError): """ Raised when an error occurs when trying to initiate an API request. :var error: A description of the error being thrown. :vartype error: str :var reason: The reason for the URL error. :vartype reason: str """ def __init__(self, error, reason): super(PyngrokNgrokURLError, self).__init__(error) self.reason = reason
# En este script hacemos operaciones basicas # 13 de sept 2021 suma = 5 + 2 resta = suma - 8.5 m1 = 32 m2 = 64 multiplicacion = m1 * m2 print("Este programa acaba de hacer algunas operaciones") print('la suma dio como resultado: ') print(suma) print('la resta dio como resultado: ', resta) # la resta dio como resultado: -1.5 print('la multiplicacion dio como resultado: ', multiplicacion) print(m2, "/", m1, " = ", m2/m1)
suma = 5 + 2 resta = suma - 8.5 m1 = 32 m2 = 64 multiplicacion = m1 * m2 print('Este programa acaba de hacer algunas operaciones') print('la suma dio como resultado: ') print(suma) print('la resta dio como resultado: ', resta) print('la multiplicacion dio como resultado: ', multiplicacion) print(m2, '/', m1, ' = ', m2 / m1)
''' This is the binary search tree implementation. ''' class BinSearchTree(): class Node(): def __init__(self, key, parent, data, left_child, right_child): self.key = key self.parent = parent self.data = data self.left = left_child self.right = right_child def __str__(self): return 'Key: {}, Parent: {}, Data: {}, Left: {}, Right: {}'.format( self.key, self.parent, self.data, self.left, self.right ) def min(self): pass def max(self): pass def inorder_tree_traversal(self, root): ''' Recursive implementation for inorder tree traversal. This just prints out the key and moves on. ''' inorder_tree_traversal(root.left) print(root.key) inorder_tree_traversal(root.right)
""" This is the binary search tree implementation. """ class Binsearchtree: class Node: def __init__(self, key, parent, data, left_child, right_child): self.key = key self.parent = parent self.data = data self.left = left_child self.right = right_child def __str__(self): return 'Key: {}, Parent: {}, Data: {}, Left: {}, Right: {}'.format(self.key, self.parent, self.data, self.left, self.right) def min(self): pass def max(self): pass def inorder_tree_traversal(self, root): """ Recursive implementation for inorder tree traversal. This just prints out the key and moves on. """ inorder_tree_traversal(root.left) print(root.key) inorder_tree_traversal(root.right)
#// AUTHOR: Guruprasanna #// Python3 Concept: sha384(hashing) #// GITHUB: https://github.com/Guruprasanna02 #// Add your python3 concept below #SHA384 hashing implementation manaually. def rightrotate_64(i, j): i &= 0xFFFFFFFFFFFFFFFF return ((i >> j) | (i << (64 - j))) & 0xFFFFFFFFFFFFFFFF def leftrotate_64(i, j): i &= 0xFFFFFFFFFFFFFFFF return ((i << j) | (i >> (64 - j))) & 0xFFFFFFFFFFFFFFFF def leftshift(i, j): return i << j def rightshift(i, j): return i >> j class SHA384(): def __init__(self): self.digest_size = 48 self.block_size = 96 h0 = 0xcbbb9d5dc1059ed8 h1 = 0x629a292a367cd507 h2 = 0x9159015a3070dd17 h3 = 0x152fecd8f70e5939 h4 = 0x67332667ffc00b31 h5 = 0x8eb44a8768581511 h6 = 0xdb0c2e0d64f98fa7 h7 = 0x47b5481dbefa4fa4 self.k = [ 0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc, 0x3956c25bf348b538, 0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118, 0xd807aa98a3030242, 0x12835b0145706fbe, 0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2, 0x72be5d74f27b896f, 0x80deb1fe3b1696b1, 0x9bdc06a725c71235, 0xc19bf174cf692694, 0xe49b69c19ef14ad2, 0xefbe4786384f25e3, 0x0fc19dc68b8cd5b5, 0x240ca1cc77ac9c65, 0x2de92c6f592b0275, 0x4a7484aa6ea6e483, 0x5cb0a9dcbd41fbd4, 0x76f988da831153b5, 0x983e5152ee66dfab, 0xa831c66d2db43210, 0xb00327c898fb213f, 0xbf597fc7beef0ee4, 0xc6e00bf33da88fc2, 0xd5a79147930aa725, 0x06ca6351e003826f, 0x142929670a0e6e70, 0x27b70a8546d22ffc, 0x2e1b21385c26c926, 0x4d2c6dfc5ac42aed, 0x53380d139d95b3df, 0x650a73548baf63de, 0x766a0abb3c77b2a8, 0x81c2c92e47edaee6, 0x92722c851482353b, 0xa2bfe8a14cf10364, 0xa81a664bbc423001, 0xc24b8b70d0f89791, 0xc76c51a30654be30, 0xd192e819d6ef5218, 0xd69906245565a910, 0xf40e35855771202a, 0x106aa07032bbd1b8, 0x19a4c116b8d2d0c8, 0x1e376c085141ab53, 0x2748774cdf8eeb99, 0x34b0bcb5e19b48a8, 0x391c0cb3c5c95a63, 0x4ed8aa4ae3418acb, 0x5b9cca4f7763e373, 0x682e6ff3d6b2b8a3, 0x748f82ee5defb2fc, 0x78a5636f43172f60, 0x84c87814a1f0ab72, 0x8cc702081a6439ec, 0x90befffa23631e28, 0xa4506cebde82bde9, 0xbef9a3f7b2c67915, 0xc67178f2e372532b, 0xca273eceea26619c, 0xd186b8c721c0c207, 0xeada7dd6cde0eb1e, 0xf57d4f7fee6ed178, 0x06f067aa72176fba, 0x0a637dc5a2c898a6, 0x113f9804bef90dae, 0x1b710b35131c471b, 0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc, 0x431d67c49c100d4c, 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817 ] self.hash_pieces = [h0, h1, h2, h3, h4, h5, h6, h7] def update(self, arg): h0, h1, h2, h3, h4, h5, h6, h7 = self.hash_pieces data = bytearray(arg) orig_len_in_bits = (8 * len(data)) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF data.append(0x80) while len(data) % 128 != 112: data.append(0) data += orig_len_in_bits.to_bytes(16, byteorder='big') for a in range(0, len(data), 128): group = data[a : a + 128] w = [0 for i in range(80)] for i in range(16): w[i] = int.from_bytes(group[8*i : 8*i + 8], byteorder='big') for j in range(16, 80): s0 = (rightrotate_64(w[j-15], 1) ^ rightrotate_64(w[j-15], 8) ^ rightshift(w[j-15], 7)) & 0xFFFFFFFFFFFFFFFF s1 = (rightrotate_64(w[j-2], 19) ^ rightrotate_64(w[j-2], 61) ^ rightshift(w[j-2], 6)) & 0xFFFFFFFFFFFFFFFF w[j] = (w[j-16] + s0 + w[j-7] + s1) & 0xFFFFFFFFFFFFFFFF a, b, c, d, e, f, g, h = h0, h1, h2, h3, h4, h5, h6, h7 for m in range(80): S1 = (rightrotate_64(e, 14) ^ rightrotate_64(e, 18) ^ rightrotate_64(e, 41)) & 0xFFFFFFFFFFFFFFFF ch = ((e & f) ^ ((~e) & g)) & 0xFFFFFFFFFFFFFFFF temp1 = (h + S1 + ch + self.k[m] + w[m]) & 0xFFFFFFFFFFFFFFFF S0 = (rightrotate_64(a, 28) ^ rightrotate_64(a, 34) ^ rightrotate_64(a, 39)) & 0xFFFFFFFFFFFFFFFF maj = ((a & b) ^ (a & c) ^ (b & c)) & 0xFFFFFFFFFFFFFFFF temp2 = (S0 + maj) & 0xFFFFFFFFFFFFFFFF a1 = (temp1 + temp2) & 0xFFFFFFFFFFFFFFFF e1 = (d + temp1) & 0xFFFFFFFFFFFFFFFF a, b, c, d, e, f, g, h = a1, a, b, c, e1, e, f, g h0 = (h0 + a) & 0xFFFFFFFFFFFFFFFF h1 = (h1 + b) & 0xFFFFFFFFFFFFFFFF h2 = (h2 + c) & 0xFFFFFFFFFFFFFFFF h3 = (h3 + d) & 0xFFFFFFFFFFFFFFFF h4 = (h4 + e) & 0xFFFFFFFFFFFFFFFF h5 = (h5 + f) & 0xFFFFFFFFFFFFFFFF h6 = (h6 + g) & 0xFFFFFFFFFFFFFFFF h7 = (h7 + h) & 0xFFFFFFFFFFFFFFFF self.hash_pieces = [h0, h1, h2, h3, h4, h5, h6, h7] def digest(self): mod_hashPieces = self.hash_pieces[:-2] return sum(leftshift(x, 64*i) for i, x in enumerate(mod_hashPieces[::-1])) def hexdigest(self): digest = self.digest() raw = digest.to_bytes(self.digest_size, byteorder='big') format_str = '{:0' + str(2 * self.digest_size) + 'x}' return format_str.format(int.from_bytes(raw, byteorder='big')) def main(): string = input("Input : ") h = SHA384() data = bytes(string, encoding='utf8') h.update(data) print(f"The hexadecimal equivalent of SHA384 is:\n {h.hexdigest()}") main()
def rightrotate_64(i, j): i &= 18446744073709551615 return (i >> j | i << 64 - j) & 18446744073709551615 def leftrotate_64(i, j): i &= 18446744073709551615 return (i << j | i >> 64 - j) & 18446744073709551615 def leftshift(i, j): return i << j def rightshift(i, j): return i >> j class Sha384: def __init__(self): self.digest_size = 48 self.block_size = 96 h0 = 14680500436340154072 h1 = 7105036623409894663 h2 = 10473403895298186519 h3 = 1526699215303891257 h4 = 7436329637833083697 h5 = 10282925794625328401 h6 = 15784041429090275239 h7 = 5167115440072839076 self.k = [4794697086780616226, 8158064640168781261, 13096744586834688815, 16840607885511220156, 4131703408338449720, 6480981068601479193, 10538285296894168987, 12329834152419229976, 15566598209576043074, 1334009975649890238, 2608012711638119052, 6128411473006802146, 8268148722764581231, 9286055187155687089, 11230858885718282805, 13951009754708518548, 16472876342353939154, 17275323862435702243, 1135362057144423861, 2597628984639134821, 3308224258029322869, 5365058923640841347, 6679025012923562964, 8573033837759648693, 10970295158949994411, 12119686244451234320, 12683024718118986047, 13788192230050041572, 14330467153632333762, 15395433587784984357, 489312712824947311, 1452737877330783856, 2861767655752347644, 3322285676063803686, 5560940570517711597, 5996557281743188959, 7280758554555802590, 8532644243296465576, 9350256976987008742, 10552545826968843579, 11727347734174303076, 12113106623233404929, 14000437183269869457, 14369950271660146224, 15101387698204529176, 15463397548674623760, 17586052441742319658, 1182934255886127544, 1847814050463011016, 2177327727835720531, 2830643537854262169, 3796741975233480872, 4115178125766777443, 5681478168544905931, 6601373596472566643, 7507060721942968483, 8399075790359081724, 8693463985226723168, 9568029438360202098, 10144078919501101548, 10430055236837252648, 11840083180663258601, 13761210420658862357, 14299343276471374635, 14566680578165727644, 15097957966210449927, 16922976911328602910, 17689382322260857208, 500013540394364858, 748580250866718886, 1242879168328830382, 1977374033974150939, 2944078676154940804, 3659926193048069267, 4368137639120453308, 4836135668995329356, 5532061633213252278, 6448918945643986474, 6902733635092675308, 7801388544844847127] self.hash_pieces = [h0, h1, h2, h3, h4, h5, h6, h7] def update(self, arg): (h0, h1, h2, h3, h4, h5, h6, h7) = self.hash_pieces data = bytearray(arg) orig_len_in_bits = 8 * len(data) & 340282366920938463463374607431768211455 data.append(128) while len(data) % 128 != 112: data.append(0) data += orig_len_in_bits.to_bytes(16, byteorder='big') for a in range(0, len(data), 128): group = data[a:a + 128] w = [0 for i in range(80)] for i in range(16): w[i] = int.from_bytes(group[8 * i:8 * i + 8], byteorder='big') for j in range(16, 80): s0 = (rightrotate_64(w[j - 15], 1) ^ rightrotate_64(w[j - 15], 8) ^ rightshift(w[j - 15], 7)) & 18446744073709551615 s1 = (rightrotate_64(w[j - 2], 19) ^ rightrotate_64(w[j - 2], 61) ^ rightshift(w[j - 2], 6)) & 18446744073709551615 w[j] = w[j - 16] + s0 + w[j - 7] + s1 & 18446744073709551615 (a, b, c, d, e, f, g, h) = (h0, h1, h2, h3, h4, h5, h6, h7) for m in range(80): s1 = (rightrotate_64(e, 14) ^ rightrotate_64(e, 18) ^ rightrotate_64(e, 41)) & 18446744073709551615 ch = (e & f ^ ~e & g) & 18446744073709551615 temp1 = h + S1 + ch + self.k[m] + w[m] & 18446744073709551615 s0 = (rightrotate_64(a, 28) ^ rightrotate_64(a, 34) ^ rightrotate_64(a, 39)) & 18446744073709551615 maj = (a & b ^ a & c ^ b & c) & 18446744073709551615 temp2 = S0 + maj & 18446744073709551615 a1 = temp1 + temp2 & 18446744073709551615 e1 = d + temp1 & 18446744073709551615 (a, b, c, d, e, f, g, h) = (a1, a, b, c, e1, e, f, g) h0 = h0 + a & 18446744073709551615 h1 = h1 + b & 18446744073709551615 h2 = h2 + c & 18446744073709551615 h3 = h3 + d & 18446744073709551615 h4 = h4 + e & 18446744073709551615 h5 = h5 + f & 18446744073709551615 h6 = h6 + g & 18446744073709551615 h7 = h7 + h & 18446744073709551615 self.hash_pieces = [h0, h1, h2, h3, h4, h5, h6, h7] def digest(self): mod_hash_pieces = self.hash_pieces[:-2] return sum((leftshift(x, 64 * i) for (i, x) in enumerate(mod_hashPieces[::-1]))) def hexdigest(self): digest = self.digest() raw = digest.to_bytes(self.digest_size, byteorder='big') format_str = '{:0' + str(2 * self.digest_size) + 'x}' return format_str.format(int.from_bytes(raw, byteorder='big')) def main(): string = input('Input : ') h = sha384() data = bytes(string, encoding='utf8') h.update(data) print(f'The hexadecimal equivalent of SHA384 is:\n {h.hexdigest()}') main()
# Start of Lesson 3 bubbles = [1,2,3,4,5,6] n = 9 def find(n,array): ''' This function looks for n in a list ''' for item in array: if item == n: return True return False print(find(n,bubbles)) ''' index = 0 isFound = False while isFound == False: item = bubbles[index] if item == n: print('Found number in list') isFound = True #break else: print('No number found') if index == len(bubbles): isFound = True #break index = index + 1 # index += 1 '''
bubbles = [1, 2, 3, 4, 5, 6] n = 9 def find(n, array): """ This function looks for n in a list """ for item in array: if item == n: return True return False print(find(n, bubbles)) "\nindex = 0\nisFound = False\n\nwhile isFound == False: \n item = bubbles[index]\n if item == n:\n print('Found number in list')\n isFound = True #break\n else:\n print('No number found')\n if index == len(bubbles):\n isFound = True #break\n index = index + 1 # index += 1\n"
class Deque: def __init__(self): self.items = [] def is_empty(self): return self.items == [] def add_front(self, item): self.items.insert(0, item) def add_rear(self, item): self.items.append(item) def remove_front(self): return self.items.pop(0) def remove_rear(self): return self.items.pop() def size(self): return len(self.items) d = Deque() d.add_front('hello') d.add_rear('world') print(d.size()) print(d.remove_front() + ' ' + d.remove_rear()) print(d.size())
class Deque: def __init__(self): self.items = [] def is_empty(self): return self.items == [] def add_front(self, item): self.items.insert(0, item) def add_rear(self, item): self.items.append(item) def remove_front(self): return self.items.pop(0) def remove_rear(self): return self.items.pop() def size(self): return len(self.items) d = deque() d.add_front('hello') d.add_rear('world') print(d.size()) print(d.remove_front() + ' ' + d.remove_rear()) print(d.size())
# # PySNMP MIB module ASCEND-MIBATMSIG-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ASCEND-MIBATMSIG-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:26:38 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) # configuration, = mibBuilder.importSymbols("ASCEND-MIB", "configuration") Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ConstraintsIntersection, ValueSizeConstraint, ConstraintsUnion, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion", "SingleValueConstraint") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") TimeTicks, Counter64, Gauge32, IpAddress, NotificationType, ObjectIdentity, Bits, MibIdentifier, Integer32, Unsigned32, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, iso, ModuleIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "TimeTicks", "Counter64", "Gauge32", "IpAddress", "NotificationType", "ObjectIdentity", "Bits", "MibIdentifier", "Integer32", "Unsigned32", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "ModuleIdentity") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") class DisplayString(OctetString): pass mibatmIntfSigParams = MibIdentifier((1, 3, 6, 1, 4, 1, 529, 23, 52)) mibatmIntfSigParamsTable = MibTable((1, 3, 6, 1, 4, 1, 529, 23, 52, 1), ) if mibBuilder.loadTexts: mibatmIntfSigParamsTable.setStatus('mandatory') if mibBuilder.loadTexts: mibatmIntfSigParamsTable.setDescription('A list of mibatmIntfSigParams profile entries.') mibatmIntfSigParamsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1), ).setIndexNames((0, "ASCEND-MIBATMSIG-MIB", "atmIntfSigParams-Shelf-o"), (0, "ASCEND-MIBATMSIG-MIB", "atmIntfSigParams-Slot-o"), (0, "ASCEND-MIBATMSIG-MIB", "atmIntfSigParams-Item-o"), (0, "ASCEND-MIBATMSIG-MIB", "atmIntfSigParams-LogicalItem-o")) if mibBuilder.loadTexts: mibatmIntfSigParamsEntry.setStatus('mandatory') if mibBuilder.loadTexts: mibatmIntfSigParamsEntry.setDescription('A mibatmIntfSigParams entry containing objects that maps to the parameters of mibatmIntfSigParams profile.') atmIntfSigParams_Shelf_o = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 1), Integer32()).setLabel("atmIntfSigParams-Shelf-o").setMaxAccess("readonly") if mibBuilder.loadTexts: atmIntfSigParams_Shelf_o.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Shelf_o.setDescription('') atmIntfSigParams_Slot_o = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 2), Integer32()).setLabel("atmIntfSigParams-Slot-o").setMaxAccess("readonly") if mibBuilder.loadTexts: atmIntfSigParams_Slot_o.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Slot_o.setDescription('') atmIntfSigParams_Item_o = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 3), Integer32()).setLabel("atmIntfSigParams-Item-o").setMaxAccess("readonly") if mibBuilder.loadTexts: atmIntfSigParams_Item_o.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Item_o.setDescription('') atmIntfSigParams_LogicalItem_o = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 4), Integer32()).setLabel("atmIntfSigParams-LogicalItem-o").setMaxAccess("readonly") if mibBuilder.loadTexts: atmIntfSigParams_LogicalItem_o.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_LogicalItem_o.setDescription('') atmIntfSigParams_Address_PhysicalAddress_Shelf = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=NamedValues(("anyShelf", 1), ("shelf1", 2), ("shelf2", 3), ("shelf3", 4), ("shelf4", 5), ("shelf5", 6), ("shelf6", 7), ("shelf7", 8), ("shelf8", 9), ("shelf9", 10)))).setLabel("atmIntfSigParams-Address-PhysicalAddress-Shelf").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Address_PhysicalAddress_Shelf.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Address_PhysicalAddress_Shelf.setDescription('The number of the shelf that the addressed physical device resides on.') atmIntfSigParams_Address_PhysicalAddress_Slot = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 55, 56, 57, 58, 49, 50, 42, 53, 54, 45, 46, 51, 59))).clone(namedValues=NamedValues(("anySlot", 1), ("slot1", 2), ("slot2", 3), ("slot3", 4), ("slot4", 5), ("slot5", 6), ("slot6", 7), ("slot7", 8), ("slot8", 9), ("slot9", 10), ("slot10", 11), ("slot11", 12), ("slot12", 13), ("slot13", 14), ("slot14", 15), ("slot15", 16), ("slot16", 17), ("slot17", 18), ("slot18", 19), ("slot19", 20), ("slot20", 21), ("slot21", 22), ("slot22", 23), ("slot23", 24), ("slot24", 25), ("slot25", 26), ("slot26", 27), ("slot27", 28), ("slot28", 29), ("slot29", 30), ("slot30", 31), ("slot31", 32), ("slot32", 33), ("slot33", 34), ("slot34", 35), ("slot35", 36), ("slot36", 37), ("slot37", 38), ("slot38", 39), ("slot39", 40), ("slot40", 41), ("aLim", 55), ("bLim", 56), ("cLim", 57), ("dLim", 58), ("leftController", 49), ("rightController", 50), ("controller", 42), ("firstControlModule", 53), ("secondControlModule", 54), ("trunkModule1", 45), ("trunkModule2", 46), ("controlModule", 51), ("slotPrimary", 59)))).setLabel("atmIntfSigParams-Address-PhysicalAddress-Slot").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Address_PhysicalAddress_Slot.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Address_PhysicalAddress_Slot.setDescription('The number of the slot that the addressed physical device resides on.') atmIntfSigParams_Address_PhysicalAddress_ItemNumber = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 7), Integer32()).setLabel("atmIntfSigParams-Address-PhysicalAddress-ItemNumber").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Address_PhysicalAddress_ItemNumber.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Address_PhysicalAddress_ItemNumber.setDescription('A number that specifies an addressable entity within the context of shelf and slot.') atmIntfSigParams_Address_LogicalItem = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 8), Integer32()).setLabel("atmIntfSigParams-Address-LogicalItem").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Address_LogicalItem.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Address_LogicalItem.setDescription('A number that specifies an addressable logical entity within the context of a physical address.') atmIntfSigParams_Q2931Options_MaxRestart = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 9), Integer32()).setLabel("atmIntfSigParams-Q2931Options-MaxRestart").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_MaxRestart.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_MaxRestart.setDescription('Maximum number of unacknowledged tx RESTART.') atmIntfSigParams_Q2931Options_MaxStatenq = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 10), Integer32()).setLabel("atmIntfSigParams-Q2931Options-MaxStatenq").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_MaxStatenq.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_MaxStatenq.setDescription('Maximum number of unacknowledged tx STATUS ENQ.') atmIntfSigParams_Q2931Options_T301Ms = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 11), Integer32()).setLabel("atmIntfSigParams-Q2931Options-T301Ms").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T301Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T301Ms.setDescription('Timer (in msec) for alerting supervision function. This timer is started on receipt of ALERT in Call received/delivered state and stopped when CONNECT is received.') atmIntfSigParams_Q2931Options_T303Ms = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 12), Integer32()).setLabel("atmIntfSigParams-Q2931Options-T303Ms").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T303Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T303Ms.setDescription('Timer (in msec) for a response after SETUP is sent. This timer is stopped when the CONNECT, CALL PROCEEDING, or RELEASE COMPLETE is received.') atmIntfSigParams_Q2931Options_T306Ms = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 13), Integer32()).setLabel("atmIntfSigParams-Q2931Options-T306Ms").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T306Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T306Ms.setDescription('Timer (in msec) for a RELEASE_COMPLETE to be received after a release has been sent.') atmIntfSigParams_Q2931Options_T308Ms = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 14), Integer32()).setLabel("atmIntfSigParams-Q2931Options-T308Ms").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T308Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T308Ms.setDescription('Timer (in msec) for a response after RELEASE is sent. This is a release indication timer. This timer is started when the RELEASE message is sent and normally is stopped when the RELEASE or RELEASE COMPLETE is received.') atmIntfSigParams_Q2931Options_T309Ms = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 15), Integer32()).setLabel("atmIntfSigParams-Q2931Options-T309Ms").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T309Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T309Ms.setDescription('Timer (in msec) for Q.SAAL to reconnect. After this time, calls are dropped. When set to 0, a default value based on an ATM signaling protocol will be used.') atmIntfSigParams_Q2931Options_T310Ms = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 16), Integer32()).setLabel("atmIntfSigParams-Q2931Options-T310Ms").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T310Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T310Ms.setDescription('Timer (in msec) for a response after SETUP is received. Also called the CALL PROCEEDING timer.') atmIntfSigParams_Q2931Options_T313Ms = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 17), Integer32()).setLabel("atmIntfSigParams-Q2931Options-T313Ms").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T313Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T313Ms.setDescription('Timer (in msec) for a response after CONNECT is sent. Also called the connect request timer. It is started when the CONNECT is sent and stopped when the CONNECT ACKNOWLEDGE is recieved.') atmIntfSigParams_Q2931Options_T316Ms = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 18), Integer32()).setLabel("atmIntfSigParams-Q2931Options-T316Ms").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T316Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T316Ms.setDescription('Timer (in msec) for a response after RESTART is sent. Also called the restart request timer. It is started when the RESTART is sent and stopped when the RESTART ACKNOWLEDGE is recieved.') atmIntfSigParams_Q2931Options_T317Ms = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 19), Integer32()).setLabel("atmIntfSigParams-Q2931Options-T317Ms").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T317Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T317Ms.setDescription('Timer (in msec) for internal clearing of call references. This timer is started as a result of a restart and cleared when all the internal call references are cleared. Should be less than the the likely value of T316 of the peer.') atmIntfSigParams_Q2931Options_T322Ms = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 20), Integer32()).setLabel("atmIntfSigParams-Q2931Options-T322Ms").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T322Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T322Ms.setDescription('Timer (in msec) for a response after STATUS ENQ is sent.') atmIntfSigParams_Q2931Options_T331Ms = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 21), Integer32()).setLabel("atmIntfSigParams-Q2931Options-T331Ms").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T331Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T331Ms.setDescription('Timer (in msec) for internal clearing of call references.') atmIntfSigParams_Q2931Options_T333Ms = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 22), Integer32()).setLabel("atmIntfSigParams-Q2931Options-T333Ms").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T333Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T333Ms.setDescription('Timer (in msec) for internal clearing of call references.') atmIntfSigParams_Q2931Options_T397Ms = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 23), Integer32()).setLabel("atmIntfSigParams-Q2931Options-T397Ms").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T397Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T397Ms.setDescription('Timer (in msec) for internal clearing of call references.') atmIntfSigParams_Q2931Options_T398Ms = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 24), Integer32()).setLabel("atmIntfSigParams-Q2931Options-T398Ms").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T398Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T398Ms.setDescription('Timer (in msec) for receipt of a response to a DROP PARTY that was sent.') atmIntfSigParams_Q2931Options_T399Ms = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 25), Integer32()).setLabel("atmIntfSigParams-Q2931Options-T399Ms").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T399Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T399Ms.setDescription('Timer (in msec) for receipt of a response to an ADD PARTY that was sent.') atmIntfSigParams_Q2931Options_SaalRetryMs = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 26), Integer32()).setLabel("atmIntfSigParams-Q2931Options-SaalRetryMs").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_SaalRetryMs.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_SaalRetryMs.setDescription('Timer value for retrying AAL_ESTABLISH messages.') atmIntfSigParams_Q2931Options_T303NumReties = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 27), Integer32()).setLabel("atmIntfSigParams-Q2931Options-T303NumReties").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T303NumReties.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T303NumReties.setDescription('Number of times SETUP could be resent in case of T303 timer expiry.') atmIntfSigParams_Q2931Options_T308NumRetries = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 28), Integer32()).setLabel("atmIntfSigParams-Q2931Options-T308NumRetries").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T308NumRetries.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T308NumRetries.setDescription('Number of times RELEASE could be sent in case of T308 timer expiry.') atmIntfSigParams_Q2931Options_T316NumRetries = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 29), Integer32()).setLabel("atmIntfSigParams-Q2931Options-T316NumRetries").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T316NumRetries.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T316NumRetries.setDescription('Number of times RESTART could be sent in case RESTART ACK is not received withinn T316 timer expiry.') atmIntfSigParams_Q2931Options_T322NumRetries = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 30), Integer32()).setLabel("atmIntfSigParams-Q2931Options-T322NumRetries").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T322NumRetries.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T322NumRetries.setDescription('Number of times STAT ENQ could be sent before a response is received within the T322 timer expiry.') atmIntfSigParams_Q2931Options_T331NumRetries = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 31), Integer32()).setLabel("atmIntfSigParams-Q2931Options-T331NumRetries").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T331NumRetries.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T331NumRetries.setDescription('') atmIntfSigParams_Q2931Options_AssignVpiVci = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 32), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("atmIntfSigParams-Q2931Options-AssignVpiVci").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_AssignVpiVci.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_AssignVpiVci.setDescription('In the case of UNI4.0 and PNNI this parameter specifies who assigns the VPI/VCI. TRUE will allow the local stack and FALSE will let the partner stack to assign.') atmIntfSigParams_QsaalOptions_WindowSize = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 33), Integer32()).setLabel("atmIntfSigParams-QsaalOptions-WindowSize").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_WindowSize.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_WindowSize.setDescription('Q.SAAL window size') atmIntfSigParams_QsaalOptions_MaxCc = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 34), Integer32()).setLabel("atmIntfSigParams-QsaalOptions-MaxCc").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_MaxCc.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_MaxCc.setDescription('Maximum number of control PDU (BGN, END, RESYNC) retransmissions.') atmIntfSigParams_QsaalOptions_MaxPd = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 35), Integer32()).setLabel("atmIntfSigParams-QsaalOptions-MaxPd").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_MaxPd.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_MaxPd.setDescription("Maximum number of Sequenced data PDU's between poll.") atmIntfSigParams_QsaalOptions_MaxStat = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 36), Integer32()).setLabel("atmIntfSigParams-QsaalOptions-MaxStat").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_MaxStat.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_MaxStat.setDescription('Maximum length of STAT PDU.') atmIntfSigParams_QsaalOptions_TccMs = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 37), Integer32()).setLabel("atmIntfSigParams-QsaalOptions-TccMs").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_TccMs.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_TccMs.setDescription("Retry time (in msec) for control PDU's(BGN, END, RESYNC).") atmIntfSigParams_QsaalOptions_TpollMs = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 38), Integer32()).setLabel("atmIntfSigParams-QsaalOptions-TpollMs").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_TpollMs.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_TpollMs.setDescription('Poll sent (in msec) when active. When set to 0, a default value based on an ATM signaling protocol will be used.') atmIntfSigParams_QsaalOptions_TkeepaliveMs = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 39), Integer32()).setLabel("atmIntfSigParams-QsaalOptions-TkeepaliveMs").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_TkeepaliveMs.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_TkeepaliveMs.setDescription('Poll sent (in msec) when in transient state. When set to 0, a default value based on an ATM signaling protocol will be used.') atmIntfSigParams_QsaalOptions_TnoresponseMs = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 40), Integer32()).setLabel("atmIntfSigParams-QsaalOptions-TnoresponseMs").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_TnoresponseMs.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_TnoresponseMs.setDescription('STAT received at least this period(in msec). When set to 0, a default value based on an ATM signaling protocol will be used.') atmIntfSigParams_QsaalOptions_TidleMs = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 41), Integer32()).setLabel("atmIntfSigParams-QsaalOptions-TidleMs").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_TidleMs.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_TidleMs.setDescription('Poll sent (in msec) when idle -- UNI 3.1, only.') atmIntfSigParams_QsaalOptions_PollAfterRetransmission = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 42), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("atmIntfSigParams-QsaalOptions-PollAfterRetransmission").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_PollAfterRetransmission.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_PollAfterRetransmission.setDescription('Specifies after retransmitting PDUs whether a POLL must be sent before sending any further PDUs.') atmIntfSigParams_QsaalOptions_RepeatUstat = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 43), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("atmIntfSigParams-QsaalOptions-RepeatUstat").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_RepeatUstat.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_RepeatUstat.setDescription('Specifies whether two USTAT messages should be sent each time it is required to be sent.') atmIntfSigParams_QsaalOptions_UstatRspToPoll = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 44), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("atmIntfSigParams-QsaalOptions-UstatRspToPoll").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_UstatRspToPoll.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_UstatRspToPoll.setDescription('Specifies whether a USTAT should be sent in response to a POLL indicating an out of sequence PDU.') atmIntfSigParams_Action_o = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 45), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("noAction", 1), ("createProfile", 2), ("deleteProfile", 3)))).setLabel("atmIntfSigParams-Action-o").setMaxAccess("readwrite") if mibBuilder.loadTexts: atmIntfSigParams_Action_o.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Action_o.setDescription('') mibBuilder.exportSymbols("ASCEND-MIBATMSIG-MIB", mibatmIntfSigParams=mibatmIntfSigParams, atmIntfSigParams_Q2931Options_T398Ms=atmIntfSigParams_Q2931Options_T398Ms, atmIntfSigParams_Q2931Options_T322NumRetries=atmIntfSigParams_Q2931Options_T322NumRetries, atmIntfSigParams_Address_PhysicalAddress_Slot=atmIntfSigParams_Address_PhysicalAddress_Slot, atmIntfSigParams_Q2931Options_T308Ms=atmIntfSigParams_Q2931Options_T308Ms, atmIntfSigParams_Q2931Options_T301Ms=atmIntfSigParams_Q2931Options_T301Ms, atmIntfSigParams_Item_o=atmIntfSigParams_Item_o, atmIntfSigParams_Address_PhysicalAddress_ItemNumber=atmIntfSigParams_Address_PhysicalAddress_ItemNumber, atmIntfSigParams_QsaalOptions_UstatRspToPoll=atmIntfSigParams_QsaalOptions_UstatRspToPoll, atmIntfSigParams_LogicalItem_o=atmIntfSigParams_LogicalItem_o, atmIntfSigParams_Q2931Options_T310Ms=atmIntfSigParams_Q2931Options_T310Ms, atmIntfSigParams_Q2931Options_T333Ms=atmIntfSigParams_Q2931Options_T333Ms, atmIntfSigParams_Q2931Options_T303NumReties=atmIntfSigParams_Q2931Options_T303NumReties, atmIntfSigParams_Q2931Options_T397Ms=atmIntfSigParams_Q2931Options_T397Ms, atmIntfSigParams_Q2931Options_AssignVpiVci=atmIntfSigParams_Q2931Options_AssignVpiVci, atmIntfSigParams_QsaalOptions_RepeatUstat=atmIntfSigParams_QsaalOptions_RepeatUstat, atmIntfSigParams_Q2931Options_T331NumRetries=atmIntfSigParams_Q2931Options_T331NumRetries, atmIntfSigParams_Q2931Options_T309Ms=atmIntfSigParams_Q2931Options_T309Ms, atmIntfSigParams_Slot_o=atmIntfSigParams_Slot_o, atmIntfSigParams_Q2931Options_T303Ms=atmIntfSigParams_Q2931Options_T303Ms, atmIntfSigParams_QsaalOptions_TkeepaliveMs=atmIntfSigParams_QsaalOptions_TkeepaliveMs, mibatmIntfSigParamsTable=mibatmIntfSigParamsTable, atmIntfSigParams_Q2931Options_MaxStatenq=atmIntfSigParams_Q2931Options_MaxStatenq, atmIntfSigParams_Q2931Options_T331Ms=atmIntfSigParams_Q2931Options_T331Ms, atmIntfSigParams_Q2931Options_T316Ms=atmIntfSigParams_Q2931Options_T316Ms, atmIntfSigParams_Q2931Options_T399Ms=atmIntfSigParams_Q2931Options_T399Ms, atmIntfSigParams_QsaalOptions_TnoresponseMs=atmIntfSigParams_QsaalOptions_TnoresponseMs, atmIntfSigParams_QsaalOptions_TpollMs=atmIntfSigParams_QsaalOptions_TpollMs, atmIntfSigParams_QsaalOptions_PollAfterRetransmission=atmIntfSigParams_QsaalOptions_PollAfterRetransmission, atmIntfSigParams_QsaalOptions_MaxPd=atmIntfSigParams_QsaalOptions_MaxPd, atmIntfSigParams_Shelf_o=atmIntfSigParams_Shelf_o, atmIntfSigParams_Q2931Options_T308NumRetries=atmIntfSigParams_Q2931Options_T308NumRetries, atmIntfSigParams_Q2931Options_T316NumRetries=atmIntfSigParams_Q2931Options_T316NumRetries, atmIntfSigParams_Q2931Options_MaxRestart=atmIntfSigParams_Q2931Options_MaxRestart, atmIntfSigParams_Q2931Options_T313Ms=atmIntfSigParams_Q2931Options_T313Ms, atmIntfSigParams_QsaalOptions_TidleMs=atmIntfSigParams_QsaalOptions_TidleMs, atmIntfSigParams_Address_LogicalItem=atmIntfSigParams_Address_LogicalItem, atmIntfSigParams_Q2931Options_T306Ms=atmIntfSigParams_Q2931Options_T306Ms, DisplayString=DisplayString, atmIntfSigParams_Q2931Options_T317Ms=atmIntfSigParams_Q2931Options_T317Ms, atmIntfSigParams_Address_PhysicalAddress_Shelf=atmIntfSigParams_Address_PhysicalAddress_Shelf, atmIntfSigParams_Q2931Options_T322Ms=atmIntfSigParams_Q2931Options_T322Ms, atmIntfSigParams_Action_o=atmIntfSigParams_Action_o, atmIntfSigParams_QsaalOptions_TccMs=atmIntfSigParams_QsaalOptions_TccMs, atmIntfSigParams_Q2931Options_SaalRetryMs=atmIntfSigParams_Q2931Options_SaalRetryMs, mibatmIntfSigParamsEntry=mibatmIntfSigParamsEntry, atmIntfSigParams_QsaalOptions_WindowSize=atmIntfSigParams_QsaalOptions_WindowSize, atmIntfSigParams_QsaalOptions_MaxCc=atmIntfSigParams_QsaalOptions_MaxCc, atmIntfSigParams_QsaalOptions_MaxStat=atmIntfSigParams_QsaalOptions_MaxStat)
(configuration,) = mibBuilder.importSymbols('ASCEND-MIB', 'configuration') (integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, constraints_intersection, value_size_constraint, constraints_union, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ConstraintsUnion', 'SingleValueConstraint') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (time_ticks, counter64, gauge32, ip_address, notification_type, object_identity, bits, mib_identifier, integer32, unsigned32, counter32, mib_scalar, mib_table, mib_table_row, mib_table_column, iso, module_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'TimeTicks', 'Counter64', 'Gauge32', 'IpAddress', 'NotificationType', 'ObjectIdentity', 'Bits', 'MibIdentifier', 'Integer32', 'Unsigned32', 'Counter32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'iso', 'ModuleIdentity') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') class Displaystring(OctetString): pass mibatm_intf_sig_params = mib_identifier((1, 3, 6, 1, 4, 1, 529, 23, 52)) mibatm_intf_sig_params_table = mib_table((1, 3, 6, 1, 4, 1, 529, 23, 52, 1)) if mibBuilder.loadTexts: mibatmIntfSigParamsTable.setStatus('mandatory') if mibBuilder.loadTexts: mibatmIntfSigParamsTable.setDescription('A list of mibatmIntfSigParams profile entries.') mibatm_intf_sig_params_entry = mib_table_row((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1)).setIndexNames((0, 'ASCEND-MIBATMSIG-MIB', 'atmIntfSigParams-Shelf-o'), (0, 'ASCEND-MIBATMSIG-MIB', 'atmIntfSigParams-Slot-o'), (0, 'ASCEND-MIBATMSIG-MIB', 'atmIntfSigParams-Item-o'), (0, 'ASCEND-MIBATMSIG-MIB', 'atmIntfSigParams-LogicalItem-o')) if mibBuilder.loadTexts: mibatmIntfSigParamsEntry.setStatus('mandatory') if mibBuilder.loadTexts: mibatmIntfSigParamsEntry.setDescription('A mibatmIntfSigParams entry containing objects that maps to the parameters of mibatmIntfSigParams profile.') atm_intf_sig_params__shelf_o = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 1), integer32()).setLabel('atmIntfSigParams-Shelf-o').setMaxAccess('readonly') if mibBuilder.loadTexts: atmIntfSigParams_Shelf_o.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Shelf_o.setDescription('') atm_intf_sig_params__slot_o = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 2), integer32()).setLabel('atmIntfSigParams-Slot-o').setMaxAccess('readonly') if mibBuilder.loadTexts: atmIntfSigParams_Slot_o.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Slot_o.setDescription('') atm_intf_sig_params__item_o = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 3), integer32()).setLabel('atmIntfSigParams-Item-o').setMaxAccess('readonly') if mibBuilder.loadTexts: atmIntfSigParams_Item_o.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Item_o.setDescription('') atm_intf_sig_params__logical_item_o = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 4), integer32()).setLabel('atmIntfSigParams-LogicalItem-o').setMaxAccess('readonly') if mibBuilder.loadTexts: atmIntfSigParams_LogicalItem_o.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_LogicalItem_o.setDescription('') atm_intf_sig_params__address__physical_address__shelf = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=named_values(('anyShelf', 1), ('shelf1', 2), ('shelf2', 3), ('shelf3', 4), ('shelf4', 5), ('shelf5', 6), ('shelf6', 7), ('shelf7', 8), ('shelf8', 9), ('shelf9', 10)))).setLabel('atmIntfSigParams-Address-PhysicalAddress-Shelf').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Address_PhysicalAddress_Shelf.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Address_PhysicalAddress_Shelf.setDescription('The number of the shelf that the addressed physical device resides on.') atm_intf_sig_params__address__physical_address__slot = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 55, 56, 57, 58, 49, 50, 42, 53, 54, 45, 46, 51, 59))).clone(namedValues=named_values(('anySlot', 1), ('slot1', 2), ('slot2', 3), ('slot3', 4), ('slot4', 5), ('slot5', 6), ('slot6', 7), ('slot7', 8), ('slot8', 9), ('slot9', 10), ('slot10', 11), ('slot11', 12), ('slot12', 13), ('slot13', 14), ('slot14', 15), ('slot15', 16), ('slot16', 17), ('slot17', 18), ('slot18', 19), ('slot19', 20), ('slot20', 21), ('slot21', 22), ('slot22', 23), ('slot23', 24), ('slot24', 25), ('slot25', 26), ('slot26', 27), ('slot27', 28), ('slot28', 29), ('slot29', 30), ('slot30', 31), ('slot31', 32), ('slot32', 33), ('slot33', 34), ('slot34', 35), ('slot35', 36), ('slot36', 37), ('slot37', 38), ('slot38', 39), ('slot39', 40), ('slot40', 41), ('aLim', 55), ('bLim', 56), ('cLim', 57), ('dLim', 58), ('leftController', 49), ('rightController', 50), ('controller', 42), ('firstControlModule', 53), ('secondControlModule', 54), ('trunkModule1', 45), ('trunkModule2', 46), ('controlModule', 51), ('slotPrimary', 59)))).setLabel('atmIntfSigParams-Address-PhysicalAddress-Slot').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Address_PhysicalAddress_Slot.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Address_PhysicalAddress_Slot.setDescription('The number of the slot that the addressed physical device resides on.') atm_intf_sig_params__address__physical_address__item_number = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 7), integer32()).setLabel('atmIntfSigParams-Address-PhysicalAddress-ItemNumber').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Address_PhysicalAddress_ItemNumber.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Address_PhysicalAddress_ItemNumber.setDescription('A number that specifies an addressable entity within the context of shelf and slot.') atm_intf_sig_params__address__logical_item = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 8), integer32()).setLabel('atmIntfSigParams-Address-LogicalItem').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Address_LogicalItem.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Address_LogicalItem.setDescription('A number that specifies an addressable logical entity within the context of a physical address.') atm_intf_sig_params_q2931_options__max_restart = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 9), integer32()).setLabel('atmIntfSigParams-Q2931Options-MaxRestart').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_MaxRestart.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_MaxRestart.setDescription('Maximum number of unacknowledged tx RESTART.') atm_intf_sig_params_q2931_options__max_statenq = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 10), integer32()).setLabel('atmIntfSigParams-Q2931Options-MaxStatenq').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_MaxStatenq.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_MaxStatenq.setDescription('Maximum number of unacknowledged tx STATUS ENQ.') atm_intf_sig_params_q2931_options_t301_ms = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 11), integer32()).setLabel('atmIntfSigParams-Q2931Options-T301Ms').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T301Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T301Ms.setDescription('Timer (in msec) for alerting supervision function. This timer is started on receipt of ALERT in Call received/delivered state and stopped when CONNECT is received.') atm_intf_sig_params_q2931_options_t303_ms = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 12), integer32()).setLabel('atmIntfSigParams-Q2931Options-T303Ms').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T303Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T303Ms.setDescription('Timer (in msec) for a response after SETUP is sent. This timer is stopped when the CONNECT, CALL PROCEEDING, or RELEASE COMPLETE is received.') atm_intf_sig_params_q2931_options_t306_ms = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 13), integer32()).setLabel('atmIntfSigParams-Q2931Options-T306Ms').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T306Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T306Ms.setDescription('Timer (in msec) for a RELEASE_COMPLETE to be received after a release has been sent.') atm_intf_sig_params_q2931_options_t308_ms = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 14), integer32()).setLabel('atmIntfSigParams-Q2931Options-T308Ms').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T308Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T308Ms.setDescription('Timer (in msec) for a response after RELEASE is sent. This is a release indication timer. This timer is started when the RELEASE message is sent and normally is stopped when the RELEASE or RELEASE COMPLETE is received.') atm_intf_sig_params_q2931_options_t309_ms = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 15), integer32()).setLabel('atmIntfSigParams-Q2931Options-T309Ms').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T309Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T309Ms.setDescription('Timer (in msec) for Q.SAAL to reconnect. After this time, calls are dropped. When set to 0, a default value based on an ATM signaling protocol will be used.') atm_intf_sig_params_q2931_options_t310_ms = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 16), integer32()).setLabel('atmIntfSigParams-Q2931Options-T310Ms').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T310Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T310Ms.setDescription('Timer (in msec) for a response after SETUP is received. Also called the CALL PROCEEDING timer.') atm_intf_sig_params_q2931_options_t313_ms = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 17), integer32()).setLabel('atmIntfSigParams-Q2931Options-T313Ms').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T313Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T313Ms.setDescription('Timer (in msec) for a response after CONNECT is sent. Also called the connect request timer. It is started when the CONNECT is sent and stopped when the CONNECT ACKNOWLEDGE is recieved.') atm_intf_sig_params_q2931_options_t316_ms = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 18), integer32()).setLabel('atmIntfSigParams-Q2931Options-T316Ms').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T316Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T316Ms.setDescription('Timer (in msec) for a response after RESTART is sent. Also called the restart request timer. It is started when the RESTART is sent and stopped when the RESTART ACKNOWLEDGE is recieved.') atm_intf_sig_params_q2931_options_t317_ms = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 19), integer32()).setLabel('atmIntfSigParams-Q2931Options-T317Ms').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T317Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T317Ms.setDescription('Timer (in msec) for internal clearing of call references. This timer is started as a result of a restart and cleared when all the internal call references are cleared. Should be less than the the likely value of T316 of the peer.') atm_intf_sig_params_q2931_options_t322_ms = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 20), integer32()).setLabel('atmIntfSigParams-Q2931Options-T322Ms').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T322Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T322Ms.setDescription('Timer (in msec) for a response after STATUS ENQ is sent.') atm_intf_sig_params_q2931_options_t331_ms = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 21), integer32()).setLabel('atmIntfSigParams-Q2931Options-T331Ms').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T331Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T331Ms.setDescription('Timer (in msec) for internal clearing of call references.') atm_intf_sig_params_q2931_options_t333_ms = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 22), integer32()).setLabel('atmIntfSigParams-Q2931Options-T333Ms').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T333Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T333Ms.setDescription('Timer (in msec) for internal clearing of call references.') atm_intf_sig_params_q2931_options_t397_ms = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 23), integer32()).setLabel('atmIntfSigParams-Q2931Options-T397Ms').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T397Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T397Ms.setDescription('Timer (in msec) for internal clearing of call references.') atm_intf_sig_params_q2931_options_t398_ms = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 24), integer32()).setLabel('atmIntfSigParams-Q2931Options-T398Ms').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T398Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T398Ms.setDescription('Timer (in msec) for receipt of a response to a DROP PARTY that was sent.') atm_intf_sig_params_q2931_options_t399_ms = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 25), integer32()).setLabel('atmIntfSigParams-Q2931Options-T399Ms').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T399Ms.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T399Ms.setDescription('Timer (in msec) for receipt of a response to an ADD PARTY that was sent.') atm_intf_sig_params_q2931_options__saal_retry_ms = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 26), integer32()).setLabel('atmIntfSigParams-Q2931Options-SaalRetryMs').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_SaalRetryMs.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_SaalRetryMs.setDescription('Timer value for retrying AAL_ESTABLISH messages.') atm_intf_sig_params_q2931_options_t303_num_reties = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 27), integer32()).setLabel('atmIntfSigParams-Q2931Options-T303NumReties').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T303NumReties.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T303NumReties.setDescription('Number of times SETUP could be resent in case of T303 timer expiry.') atm_intf_sig_params_q2931_options_t308_num_retries = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 28), integer32()).setLabel('atmIntfSigParams-Q2931Options-T308NumRetries').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T308NumRetries.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T308NumRetries.setDescription('Number of times RELEASE could be sent in case of T308 timer expiry.') atm_intf_sig_params_q2931_options_t316_num_retries = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 29), integer32()).setLabel('atmIntfSigParams-Q2931Options-T316NumRetries').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T316NumRetries.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T316NumRetries.setDescription('Number of times RESTART could be sent in case RESTART ACK is not received withinn T316 timer expiry.') atm_intf_sig_params_q2931_options_t322_num_retries = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 30), integer32()).setLabel('atmIntfSigParams-Q2931Options-T322NumRetries').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T322NumRetries.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T322NumRetries.setDescription('Number of times STAT ENQ could be sent before a response is received within the T322 timer expiry.') atm_intf_sig_params_q2931_options_t331_num_retries = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 31), integer32()).setLabel('atmIntfSigParams-Q2931Options-T331NumRetries').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T331NumRetries.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_T331NumRetries.setDescription('') atm_intf_sig_params_q2931_options__assign_vpi_vci = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 32), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('atmIntfSigParams-Q2931Options-AssignVpiVci').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_AssignVpiVci.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Q2931Options_AssignVpiVci.setDescription('In the case of UNI4.0 and PNNI this parameter specifies who assigns the VPI/VCI. TRUE will allow the local stack and FALSE will let the partner stack to assign.') atm_intf_sig_params__qsaal_options__window_size = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 33), integer32()).setLabel('atmIntfSigParams-QsaalOptions-WindowSize').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_WindowSize.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_WindowSize.setDescription('Q.SAAL window size') atm_intf_sig_params__qsaal_options__max_cc = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 34), integer32()).setLabel('atmIntfSigParams-QsaalOptions-MaxCc').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_MaxCc.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_MaxCc.setDescription('Maximum number of control PDU (BGN, END, RESYNC) retransmissions.') atm_intf_sig_params__qsaal_options__max_pd = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 35), integer32()).setLabel('atmIntfSigParams-QsaalOptions-MaxPd').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_MaxPd.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_MaxPd.setDescription("Maximum number of Sequenced data PDU's between poll.") atm_intf_sig_params__qsaal_options__max_stat = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 36), integer32()).setLabel('atmIntfSigParams-QsaalOptions-MaxStat').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_MaxStat.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_MaxStat.setDescription('Maximum length of STAT PDU.') atm_intf_sig_params__qsaal_options__tcc_ms = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 37), integer32()).setLabel('atmIntfSigParams-QsaalOptions-TccMs').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_TccMs.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_TccMs.setDescription("Retry time (in msec) for control PDU's(BGN, END, RESYNC).") atm_intf_sig_params__qsaal_options__tpoll_ms = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 38), integer32()).setLabel('atmIntfSigParams-QsaalOptions-TpollMs').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_TpollMs.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_TpollMs.setDescription('Poll sent (in msec) when active. When set to 0, a default value based on an ATM signaling protocol will be used.') atm_intf_sig_params__qsaal_options__tkeepalive_ms = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 39), integer32()).setLabel('atmIntfSigParams-QsaalOptions-TkeepaliveMs').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_TkeepaliveMs.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_TkeepaliveMs.setDescription('Poll sent (in msec) when in transient state. When set to 0, a default value based on an ATM signaling protocol will be used.') atm_intf_sig_params__qsaal_options__tnoresponse_ms = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 40), integer32()).setLabel('atmIntfSigParams-QsaalOptions-TnoresponseMs').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_TnoresponseMs.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_TnoresponseMs.setDescription('STAT received at least this period(in msec). When set to 0, a default value based on an ATM signaling protocol will be used.') atm_intf_sig_params__qsaal_options__tidle_ms = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 41), integer32()).setLabel('atmIntfSigParams-QsaalOptions-TidleMs').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_TidleMs.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_TidleMs.setDescription('Poll sent (in msec) when idle -- UNI 3.1, only.') atm_intf_sig_params__qsaal_options__poll_after_retransmission = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 42), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('atmIntfSigParams-QsaalOptions-PollAfterRetransmission').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_PollAfterRetransmission.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_PollAfterRetransmission.setDescription('Specifies after retransmitting PDUs whether a POLL must be sent before sending any further PDUs.') atm_intf_sig_params__qsaal_options__repeat_ustat = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 43), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('atmIntfSigParams-QsaalOptions-RepeatUstat').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_RepeatUstat.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_RepeatUstat.setDescription('Specifies whether two USTAT messages should be sent each time it is required to be sent.') atm_intf_sig_params__qsaal_options__ustat_rsp_to_poll = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 44), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('atmIntfSigParams-QsaalOptions-UstatRspToPoll').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_UstatRspToPoll.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_QsaalOptions_UstatRspToPoll.setDescription('Specifies whether a USTAT should be sent in response to a POLL indicating an out of sequence PDU.') atm_intf_sig_params__action_o = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 52, 1, 1, 45), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('noAction', 1), ('createProfile', 2), ('deleteProfile', 3)))).setLabel('atmIntfSigParams-Action-o').setMaxAccess('readwrite') if mibBuilder.loadTexts: atmIntfSigParams_Action_o.setStatus('mandatory') if mibBuilder.loadTexts: atmIntfSigParams_Action_o.setDescription('') mibBuilder.exportSymbols('ASCEND-MIBATMSIG-MIB', mibatmIntfSigParams=mibatmIntfSigParams, atmIntfSigParams_Q2931Options_T398Ms=atmIntfSigParams_Q2931Options_T398Ms, atmIntfSigParams_Q2931Options_T322NumRetries=atmIntfSigParams_Q2931Options_T322NumRetries, atmIntfSigParams_Address_PhysicalAddress_Slot=atmIntfSigParams_Address_PhysicalAddress_Slot, atmIntfSigParams_Q2931Options_T308Ms=atmIntfSigParams_Q2931Options_T308Ms, atmIntfSigParams_Q2931Options_T301Ms=atmIntfSigParams_Q2931Options_T301Ms, atmIntfSigParams_Item_o=atmIntfSigParams_Item_o, atmIntfSigParams_Address_PhysicalAddress_ItemNumber=atmIntfSigParams_Address_PhysicalAddress_ItemNumber, atmIntfSigParams_QsaalOptions_UstatRspToPoll=atmIntfSigParams_QsaalOptions_UstatRspToPoll, atmIntfSigParams_LogicalItem_o=atmIntfSigParams_LogicalItem_o, atmIntfSigParams_Q2931Options_T310Ms=atmIntfSigParams_Q2931Options_T310Ms, atmIntfSigParams_Q2931Options_T333Ms=atmIntfSigParams_Q2931Options_T333Ms, atmIntfSigParams_Q2931Options_T303NumReties=atmIntfSigParams_Q2931Options_T303NumReties, atmIntfSigParams_Q2931Options_T397Ms=atmIntfSigParams_Q2931Options_T397Ms, atmIntfSigParams_Q2931Options_AssignVpiVci=atmIntfSigParams_Q2931Options_AssignVpiVci, atmIntfSigParams_QsaalOptions_RepeatUstat=atmIntfSigParams_QsaalOptions_RepeatUstat, atmIntfSigParams_Q2931Options_T331NumRetries=atmIntfSigParams_Q2931Options_T331NumRetries, atmIntfSigParams_Q2931Options_T309Ms=atmIntfSigParams_Q2931Options_T309Ms, atmIntfSigParams_Slot_o=atmIntfSigParams_Slot_o, atmIntfSigParams_Q2931Options_T303Ms=atmIntfSigParams_Q2931Options_T303Ms, atmIntfSigParams_QsaalOptions_TkeepaliveMs=atmIntfSigParams_QsaalOptions_TkeepaliveMs, mibatmIntfSigParamsTable=mibatmIntfSigParamsTable, atmIntfSigParams_Q2931Options_MaxStatenq=atmIntfSigParams_Q2931Options_MaxStatenq, atmIntfSigParams_Q2931Options_T331Ms=atmIntfSigParams_Q2931Options_T331Ms, atmIntfSigParams_Q2931Options_T316Ms=atmIntfSigParams_Q2931Options_T316Ms, atmIntfSigParams_Q2931Options_T399Ms=atmIntfSigParams_Q2931Options_T399Ms, atmIntfSigParams_QsaalOptions_TnoresponseMs=atmIntfSigParams_QsaalOptions_TnoresponseMs, atmIntfSigParams_QsaalOptions_TpollMs=atmIntfSigParams_QsaalOptions_TpollMs, atmIntfSigParams_QsaalOptions_PollAfterRetransmission=atmIntfSigParams_QsaalOptions_PollAfterRetransmission, atmIntfSigParams_QsaalOptions_MaxPd=atmIntfSigParams_QsaalOptions_MaxPd, atmIntfSigParams_Shelf_o=atmIntfSigParams_Shelf_o, atmIntfSigParams_Q2931Options_T308NumRetries=atmIntfSigParams_Q2931Options_T308NumRetries, atmIntfSigParams_Q2931Options_T316NumRetries=atmIntfSigParams_Q2931Options_T316NumRetries, atmIntfSigParams_Q2931Options_MaxRestart=atmIntfSigParams_Q2931Options_MaxRestart, atmIntfSigParams_Q2931Options_T313Ms=atmIntfSigParams_Q2931Options_T313Ms, atmIntfSigParams_QsaalOptions_TidleMs=atmIntfSigParams_QsaalOptions_TidleMs, atmIntfSigParams_Address_LogicalItem=atmIntfSigParams_Address_LogicalItem, atmIntfSigParams_Q2931Options_T306Ms=atmIntfSigParams_Q2931Options_T306Ms, DisplayString=DisplayString, atmIntfSigParams_Q2931Options_T317Ms=atmIntfSigParams_Q2931Options_T317Ms, atmIntfSigParams_Address_PhysicalAddress_Shelf=atmIntfSigParams_Address_PhysicalAddress_Shelf, atmIntfSigParams_Q2931Options_T322Ms=atmIntfSigParams_Q2931Options_T322Ms, atmIntfSigParams_Action_o=atmIntfSigParams_Action_o, atmIntfSigParams_QsaalOptions_TccMs=atmIntfSigParams_QsaalOptions_TccMs, atmIntfSigParams_Q2931Options_SaalRetryMs=atmIntfSigParams_Q2931Options_SaalRetryMs, mibatmIntfSigParamsEntry=mibatmIntfSigParamsEntry, atmIntfSigParams_QsaalOptions_WindowSize=atmIntfSigParams_QsaalOptions_WindowSize, atmIntfSigParams_QsaalOptions_MaxCc=atmIntfSigParams_QsaalOptions_MaxCc, atmIntfSigParams_QsaalOptions_MaxStat=atmIntfSigParams_QsaalOptions_MaxStat)
# Copyright 2020 StreamSets Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # A module providing utils for working with XML data formats # If Preserve Root Element is set to true in the origin, this method # will navigate the root elements to find the expected data element def get_xml_output_field(origin, output_field, *root_elements): if getattr(origin, 'preserve_root_element', False): for element in root_elements: output_field = output_field[element] return output_field
def get_xml_output_field(origin, output_field, *root_elements): if getattr(origin, 'preserve_root_element', False): for element in root_elements: output_field = output_field[element] return output_field
def main(): pass # wip
def main(): pass
# Dictionary # : is used to specify the key data = {1: "pvd", 2: "vsd", 3: "rhd"} print(data) # fetching a particular value print(data[2]) # functions can be used print(data.get(3)) print(data.get(4, "Not found")) # dictionary with lists keys = ["pvd", "vsd", "rhd"] val = ["c", "php", "c++"] data = dict( zip(keys, val) ) # dict() function for converting the zipped file into a dictionary print(data) # adding an object as key and value data["avd"] = "js" print(data) del data["avd"] # deleting data print(data) # Nested Dictionary prog = { "js": "atom", "cs": "vs", "python": ["PyCharm", "Sublime", "VC"], "java": {"jse": "NetBeans", "jee": "eclipse"}, } print(prog) print(prog["js"]) print(prog["python"]) print(prog["python"][0]) print(prog["java"]) print(prog["java"]["jee"])
data = {1: 'pvd', 2: 'vsd', 3: 'rhd'} print(data) print(data[2]) print(data.get(3)) print(data.get(4, 'Not found')) keys = ['pvd', 'vsd', 'rhd'] val = ['c', 'php', 'c++'] data = dict(zip(keys, val)) print(data) data['avd'] = 'js' print(data) del data['avd'] print(data) prog = {'js': 'atom', 'cs': 'vs', 'python': ['PyCharm', 'Sublime', 'VC'], 'java': {'jse': 'NetBeans', 'jee': 'eclipse'}} print(prog) print(prog['js']) print(prog['python']) print(prog['python'][0]) print(prog['java']) print(prog['java']['jee'])
# 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 rob(self, root): """ :type root: TreeNode :rtype: int """ def iter(node): if node == None: return [0, 0] l = iter(node.left) r = iter(node.right) return [max(l[0], l[1]) + max(r[0], r[1]), # current node unavailable node.val + l[0] + r[0]] # current node available r = iter(root) return max(r[0], r[1]) # My first version, TLE class Solution(object): def rob(self, root): """ :type root: TreeNode :rtype: int """ def iter(node, avai): if node == None: return 0 if avai == 0: return iter(node.left, 1) + iter(node.right, 1) return max(iter(node.left, 1) + iter(node.right, 1), node.val + iter(node.left, 0) + iter(node.right, 0)) return iter(root, 1)
class Solution(object): def rob(self, root): """ :type root: TreeNode :rtype: int """ def iter(node): if node == None: return [0, 0] l = iter(node.left) r = iter(node.right) return [max(l[0], l[1]) + max(r[0], r[1]), node.val + l[0] + r[0]] r = iter(root) return max(r[0], r[1]) class Solution(object): def rob(self, root): """ :type root: TreeNode :rtype: int """ def iter(node, avai): if node == None: return 0 if avai == 0: return iter(node.left, 1) + iter(node.right, 1) return max(iter(node.left, 1) + iter(node.right, 1), node.val + iter(node.left, 0) + iter(node.right, 0)) return iter(root, 1)
"""Module contains utilities to improve the interface with benchling.""" def only_label_feature(part: "BasicPart") -> "BasicPart": """Return part with only the label feature. Useful for getting rid of ApEinfo features following Benchling exports. Args: part: object to simplify each feature in. Returns: part: with simplified qualifiers """ for feature in part.features: feature.qualifiers = {"label": feature.qualifiers["label"]} return part
"""Module contains utilities to improve the interface with benchling.""" def only_label_feature(part: 'BasicPart') -> 'BasicPart': """Return part with only the label feature. Useful for getting rid of ApEinfo features following Benchling exports. Args: part: object to simplify each feature in. Returns: part: with simplified qualifiers """ for feature in part.features: feature.qualifiers = {'label': feature.qualifiers['label']} return part
def toggle_batch_norm(config: dict, layer_id: int): batch_norm = config['model']['conv_layers'][layer_id].get('batch_norm', False) config['model']['conv_layers'][layer_id]['batch_norm'] = not batch_norm def add_conv_layer(config: dict, num_filters: int, kernel_size: int, batch_norm: bool = False): config['model']['conv_layers'].append({ 'num_filters': num_filters, 'kernel_size': kernel_size, 'padding': 'same', 'batch_norm': batch_norm, }) def delete_last_conv_layer(config: dict): config['model']['conv_layers'] = config['model']['conv_layers'][:-1] def change_conv_layer(config: dict, layer_id: int, num_filters: int = None, kernel_size: int = None, batch_norm: bool = None): if num_filters is not None: config['model']['conv_layers'][layer_id]['num_filters'] = num_filters if kernel_size is not None: config['model']['conv_layers'][layer_id]['kernel_size'] = kernel_size if batch_norm is not None: config['model']['conv_layers'][layer_id]['batch_norm'] = batch_norm def add_dense_layer(config: dict, num_units: int, dropout_rate: float = 0.0, l2_regularization: float = 0.0): config['model']['dense_layers'].append({ 'num_units': num_units, 'dropout_rate': dropout_rate, 'l2_regularization': l2_regularization, }) def change_dense_layer(config: dict, layer_id: int, num_units: int = None, dropout_rate: float = None, l2_regularization: float = None): if num_units is not None: config['model']['dense_layers'][layer_id]['num_units'] = num_units if dropout_rate is not None: config['model']['dense_layers'][layer_id]['dropout_rate'] = dropout_rate if l2_regularization is not None: config['model']['dense_layers'][layer_id]['l2_regularization'] = l2_regularization def change_logits_layer(config: dict, dropout_rate: float = None): if dropout_rate is not None: config['model']['logits_dropout_rate'] = dropout_rate
def toggle_batch_norm(config: dict, layer_id: int): batch_norm = config['model']['conv_layers'][layer_id].get('batch_norm', False) config['model']['conv_layers'][layer_id]['batch_norm'] = not batch_norm def add_conv_layer(config: dict, num_filters: int, kernel_size: int, batch_norm: bool=False): config['model']['conv_layers'].append({'num_filters': num_filters, 'kernel_size': kernel_size, 'padding': 'same', 'batch_norm': batch_norm}) def delete_last_conv_layer(config: dict): config['model']['conv_layers'] = config['model']['conv_layers'][:-1] def change_conv_layer(config: dict, layer_id: int, num_filters: int=None, kernel_size: int=None, batch_norm: bool=None): if num_filters is not None: config['model']['conv_layers'][layer_id]['num_filters'] = num_filters if kernel_size is not None: config['model']['conv_layers'][layer_id]['kernel_size'] = kernel_size if batch_norm is not None: config['model']['conv_layers'][layer_id]['batch_norm'] = batch_norm def add_dense_layer(config: dict, num_units: int, dropout_rate: float=0.0, l2_regularization: float=0.0): config['model']['dense_layers'].append({'num_units': num_units, 'dropout_rate': dropout_rate, 'l2_regularization': l2_regularization}) def change_dense_layer(config: dict, layer_id: int, num_units: int=None, dropout_rate: float=None, l2_regularization: float=None): if num_units is not None: config['model']['dense_layers'][layer_id]['num_units'] = num_units if dropout_rate is not None: config['model']['dense_layers'][layer_id]['dropout_rate'] = dropout_rate if l2_regularization is not None: config['model']['dense_layers'][layer_id]['l2_regularization'] = l2_regularization def change_logits_layer(config: dict, dropout_rate: float=None): if dropout_rate is not None: config['model']['logits_dropout_rate'] = dropout_rate
class CommissionScheme: def __init__(self, scheme: str): self.name = scheme self.commission = 0 def calculate_commission(self, quantity: float, price: float) -> float: # Avanza.se if self.name == 'avanza_mini': min_com = 1.0 trans_com = quantity * price * 0.0025 if quantity * price < 400.0: return min_com else: return trans_com elif self.name == 'avanza_small': min_com = 39.0 trans_com = quantity * price * 0.0015 if quantity * price < 26000.0: return min_com else: return trans_com elif self.name == 'avanza_medium': min_com = 69.0 trans_com = quantity * price * 0.00069 if quantity * price < 100000.0: return min_com else: return trans_com elif self.name == 'avanza_fast': return 99.0 # No commission else: return 0.0
class Commissionscheme: def __init__(self, scheme: str): self.name = scheme self.commission = 0 def calculate_commission(self, quantity: float, price: float) -> float: if self.name == 'avanza_mini': min_com = 1.0 trans_com = quantity * price * 0.0025 if quantity * price < 400.0: return min_com else: return trans_com elif self.name == 'avanza_small': min_com = 39.0 trans_com = quantity * price * 0.0015 if quantity * price < 26000.0: return min_com else: return trans_com elif self.name == 'avanza_medium': min_com = 69.0 trans_com = quantity * price * 0.00069 if quantity * price < 100000.0: return min_com else: return trans_com elif self.name == 'avanza_fast': return 99.0 else: return 0.0
f1 = 'psychoticism' f2 = 'neuroticism' f3 = 'extraversion' f4 = 'lie' factors_names = (f1,f2,f3,f4) factors = { 1:{ 22 :(f1,) , 26 :(f1,) , 30 :(f1,) , 33 :(f1,) , 43 :(f1,) , 46 :(f1,) , 50 :(f1,) , 65 :(f1,) , 67 :(f1,) , 74 :(f1,) , 76 :(f1,) , 79 :(f1,) , 83 :(f1,) , 87 :(f1,) , 3 :(f2,) , 7 :(f2,) , 12 :(f2,) , 15 :(f2,) , 19 :(f2,) , 23 :(f2,) , 27 :(f2,) , 31 :(f2,) , 34 :(f2,) , 38 :(f2,) , 41 :(f2,) , 47 :(f2,) , 54 :(f2,) , 58 :(f2,) , 62 :(f2,) , 66 :(f2,) , 68 :(f2,) , 72 :(f2,) , 75 :(f2,) , 77 :(f2,) , 80 :(f2,) , 84 :(f2,) , 88 :(f2,) , 1 :(f3,) , 5 :(f3,) , 10 :(f3,) , 14 :(f3,) , 17 :(f3,) , 25 :(f3,) , 32 :(f3,) , 36 :(f3,) , 40 :(f3,) , 45 :(f3,) , 49 :(f3,) , 52 :(f3,) , 56 :(f3,) , 60 :(f3,) , 64 :(f3,) , 70 :(f3,) , 82 :(f3,) , 86 :(f3,) , 13 :(f4,) , 20 :(f4,) , 35 :(f4,) , 55 :(f4,) , 78 :(f4,) , 89 :(f4,) } , 2:{ 2 :(f1,) , 6 :(f1,) , 9 :(f1,) , 11 :(f1,) , 18 :(f1,) , 37 :(f1,) , 53 :(f1,) , 57 :(f1,) , 61 :(f1,) , 71 :(f1,) , 90 :(f1,) , 21 :(f3,) , 29 :(f3,) , 42 :(f3,) , 4 :(f4,) , 8 :(f4,) , 16 :(f4,) , 24 :(f4,) , 28 :(f4,) , 39 :(f4,) , 44 :(f4,) , 48 :(f4,) , 51 :(f4,) , 59 :(f4,) , 63 :(f4,) , 69 :(f4,) , 73 :(f4,) , 81 :(f4,) , 85 :(f4,) } }
f1 = 'psychoticism' f2 = 'neuroticism' f3 = 'extraversion' f4 = 'lie' factors_names = (f1, f2, f3, f4) factors = {1: {22: (f1,), 26: (f1,), 30: (f1,), 33: (f1,), 43: (f1,), 46: (f1,), 50: (f1,), 65: (f1,), 67: (f1,), 74: (f1,), 76: (f1,), 79: (f1,), 83: (f1,), 87: (f1,), 3: (f2,), 7: (f2,), 12: (f2,), 15: (f2,), 19: (f2,), 23: (f2,), 27: (f2,), 31: (f2,), 34: (f2,), 38: (f2,), 41: (f2,), 47: (f2,), 54: (f2,), 58: (f2,), 62: (f2,), 66: (f2,), 68: (f2,), 72: (f2,), 75: (f2,), 77: (f2,), 80: (f2,), 84: (f2,), 88: (f2,), 1: (f3,), 5: (f3,), 10: (f3,), 14: (f3,), 17: (f3,), 25: (f3,), 32: (f3,), 36: (f3,), 40: (f3,), 45: (f3,), 49: (f3,), 52: (f3,), 56: (f3,), 60: (f3,), 64: (f3,), 70: (f3,), 82: (f3,), 86: (f3,), 13: (f4,), 20: (f4,), 35: (f4,), 55: (f4,), 78: (f4,), 89: (f4,)}, 2: {2: (f1,), 6: (f1,), 9: (f1,), 11: (f1,), 18: (f1,), 37: (f1,), 53: (f1,), 57: (f1,), 61: (f1,), 71: (f1,), 90: (f1,), 21: (f3,), 29: (f3,), 42: (f3,), 4: (f4,), 8: (f4,), 16: (f4,), 24: (f4,), 28: (f4,), 39: (f4,), 44: (f4,), 48: (f4,), 51: (f4,), 59: (f4,), 63: (f4,), 69: (f4,), 73: (f4,), 81: (f4,), 85: (f4,)}}
HARI = ( ("Senin","Senin"), ("Selasa","Selasa"), ("Rabu","Rabu"), ("Kamis","Kamis"), ("Jumat","Jumat"), )
hari = (('Senin', 'Senin'), ('Selasa', 'Selasa'), ('Rabu', 'Rabu'), ('Kamis', 'Kamis'), ('Jumat', 'Jumat'))
def hamming_dist(s1, s2): ''' returns: pass in: ''' if len(s1) != len(s2): raise ValueError("Hamming dist undefined for two strings of unequal length") return sum(ch1 != ch2 for ch1, ch2 in zip(s1, s2))
def hamming_dist(s1, s2): """ returns: pass in: """ if len(s1) != len(s2): raise value_error('Hamming dist undefined for two strings of unequal length') return sum((ch1 != ch2 for (ch1, ch2) in zip(s1, s2)))
#!/usr/bin/env python # # ---------------------------------------------------------------------- # # Brad T. Aagaard, U.S. Geological Survey # Charles A. Williams, GNS Science # Matthew G. Knepley, University of Chicago # # This code was developed as part of the Computational Infrastructure # for Geodynamics (http://geodynamics.org). # # Copyright (c) 2010-2017 University of California, Davis # # See COPYING for license information. # # ---------------------------------------------------------------------- # ## @file pylith/friction/__init__.py ## @brief Python PyLith Friction module initialization __all__ = ['FrictionModel', 'StaticFriction', 'SlipWeakening', 'SlipWeakeningTime', 'SlipWeakeningTimeStable', 'RateStateAgeing', 'TimeWeakening', ] # End of file
__all__ = ['FrictionModel', 'StaticFriction', 'SlipWeakening', 'SlipWeakeningTime', 'SlipWeakeningTimeStable', 'RateStateAgeing', 'TimeWeakening']
class ReverseProxied(object): """This middleware can be applied to add HTTP proxy support to an application which access the WSGI environment directly. It sets `REMOTE_ADDR`, `HTTP_HOST`, `wsgi.url_scheme` from `X-Forwarded` headers. Also front-end server can be configured to quietly bind this to a URL other than / and to an HTTP scheme that is different than what is used locally. In nginx: location /myprefix/ { proxy_set_header X-Script-Name /myprefix; proxy_set_header X-Scheme $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $server_name; } So app will be accessible locally at http://localhost:5001/myapp externally at https://example.com/myprefix/myapp """ def __init__(self, app): self.app = app def __call__(self, environ, start_response): script_name = environ.get('HTTP_X_SCRIPT_NAME', '') if script_name: environ['SCRIPT_NAME'] = script_name path_info = environ['PATH_INFO'] if path_info.startswith(script_name): environ['PATH_INFO'] = path_info[len(script_name):] scheme = environ.get('HTTP_X_SCHEME', '') if scheme: environ['wsgi.url_scheme'] = scheme remote_addr = environ.get('HTTP_X_FORWARDED_FOR', '') if remote_addr: environ['REMOTE_ADDR'] = remote_addr forwarded_host = environ.get('HTTP_X_FORWARDED_HOST', '') if forwarded_host: environ['HTTP_HOST'] = forwarded_host return self.app(environ, start_response)
class Reverseproxied(object): """This middleware can be applied to add HTTP proxy support to an application which access the WSGI environment directly. It sets `REMOTE_ADDR`, `HTTP_HOST`, `wsgi.url_scheme` from `X-Forwarded` headers. Also front-end server can be configured to quietly bind this to a URL other than / and to an HTTP scheme that is different than what is used locally. In nginx: location /myprefix/ { proxy_set_header X-Script-Name /myprefix; proxy_set_header X-Scheme $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $server_name; } So app will be accessible locally at http://localhost:5001/myapp externally at https://example.com/myprefix/myapp """ def __init__(self, app): self.app = app def __call__(self, environ, start_response): script_name = environ.get('HTTP_X_SCRIPT_NAME', '') if script_name: environ['SCRIPT_NAME'] = script_name path_info = environ['PATH_INFO'] if path_info.startswith(script_name): environ['PATH_INFO'] = path_info[len(script_name):] scheme = environ.get('HTTP_X_SCHEME', '') if scheme: environ['wsgi.url_scheme'] = scheme remote_addr = environ.get('HTTP_X_FORWARDED_FOR', '') if remote_addr: environ['REMOTE_ADDR'] = remote_addr forwarded_host = environ.get('HTTP_X_FORWARDED_HOST', '') if forwarded_host: environ['HTTP_HOST'] = forwarded_host return self.app(environ, start_response)
# -*- coding: utf-8 -*- '''Autor: Alessandra Souza Data: 05/05/2017 Objetivo: Calculo de salario liquido. ID Urionlinejudge: 1008.''' NUMBER=int(input()) horast=int(input()) valhr=float(input()) SALARY = (valhr*horast) print("NUMBER = %d" %NUMBER) print("SALARY = U$ %.2f" %SALARY)
"""Autor: Alessandra Souza Data: 05/05/2017 Objetivo: Calculo de salario liquido. ID Urionlinejudge: 1008.""" number = int(input()) horast = int(input()) valhr = float(input()) salary = valhr * horast print('NUMBER = %d' % NUMBER) print('SALARY = U$ %.2f' % SALARY)
"""Merge and sort two arrays into one.""" def sort_array_buf(a, b): if b == [] or a == []: return None i = len(a) - 1 j = len(b) - 1 k = i - j - 1 if k < 0: return None while i >= 0 and j >= 0 and k >= 0: if a[k] >= b[j]: a[i] = a[k] k -= 1 else: a[i] = b[j] j -= 1 i -= 1 if i >= 0: if j >= 0: a[0:i+1] = b[0:j+1] return a
"""Merge and sort two arrays into one.""" def sort_array_buf(a, b): if b == [] or a == []: return None i = len(a) - 1 j = len(b) - 1 k = i - j - 1 if k < 0: return None while i >= 0 and j >= 0 and (k >= 0): if a[k] >= b[j]: a[i] = a[k] k -= 1 else: a[i] = b[j] j -= 1 i -= 1 if i >= 0: if j >= 0: a[0:i + 1] = b[0:j + 1] return a
data = list(input().split()) counter = 0 for x in range(int(data[1])): word = sorted(list(input())) check = sorted(list(data[0])) if word == check: counter += 1 print(counter)
data = list(input().split()) counter = 0 for x in range(int(data[1])): word = sorted(list(input())) check = sorted(list(data[0])) if word == check: counter += 1 print(counter)
colors = [ 'purple', 'blue', 'red', ]
colors = ['purple', 'blue', 'red']
words = "Life is short" upper_word_list = ["LIFE", "IS", "SHORT", "USE", "PYTHON"] lower_word_list = [ lower_w for w in upper_word_list if (lower_w := w.lower()) in words.lower() ] print(" ".join(lower_word_list))
words = 'Life is short' upper_word_list = ['LIFE', 'IS', 'SHORT', 'USE', 'PYTHON'] lower_word_list = [lower_w for w in upper_word_list if (lower_w := w.lower()) in words.lower()] print(' '.join(lower_word_list))
def respuesta(cells, cell_data, phy_lin): """Extracts the nodes located at the physical line phy_line Parameters ---------- cell : dictionary Dictionary created by meshio with cells information. cell_data: dictionary Dictionary created by meshio with cells data information. phy_lin : int Physical line to print nodal histories. Returns ------- nodes_carga : int Array with the nodal data corresponding to the physical line phy_line. """ lines = cells["line"] phy_line = cell_data["line"]["physical"] id_carga = [cont for cont in range(len(phy_line)) if phy_line[cont] == phy_lin] nodes_carga = lines[id_carga] nodes_carga = nodes_carga.flatten() nodes_carga = list(set(nodes_carga)) nodes_carga.sort(reverse=False) return nodes_carga #
def respuesta(cells, cell_data, phy_lin): """Extracts the nodes located at the physical line phy_line Parameters ---------- cell : dictionary Dictionary created by meshio with cells information. cell_data: dictionary Dictionary created by meshio with cells data information. phy_lin : int Physical line to print nodal histories. Returns ------- nodes_carga : int Array with the nodal data corresponding to the physical line phy_line. """ lines = cells['line'] phy_line = cell_data['line']['physical'] id_carga = [cont for cont in range(len(phy_line)) if phy_line[cont] == phy_lin] nodes_carga = lines[id_carga] nodes_carga = nodes_carga.flatten() nodes_carga = list(set(nodes_carga)) nodes_carga.sort(reverse=False) return nodes_carga
class BibleVersionNotSupportedException(Exception): code = 600 def __init__(self, message='Bible version was not supported'): # Call the base class constructor with the parameters it needs super().__init__(message) # Now for your custom code... self.error = { 'code': self.code, 'message': message }
class Bibleversionnotsupportedexception(Exception): code = 600 def __init__(self, message='Bible version was not supported'): super().__init__(message) self.error = {'code': self.code, 'message': message}
""" import turtle as t for x in range(4): t.forward(100) t.right(90) """ """ import turtle # edit this line to control where window appears turtle.setup(width=500, height=500, startx=-1, starty=0) turtle.forward(100) """ """ from turtle import * turtle = Turtle() print(turtle.position()) turtle.forward(200) print(turtle.position()) """ """ import turtle new_turtle = turtle.Turtle() new_turtle.forward(100) new_turtle.left(90) new_turtle.forward(100) new_turtle.left(90) new_turtle.forward(100) new_turtle.left(90) new_turtle.forward(100) """ """ from turtle import Turtle turtle = Turtle() turtle.forward(100) turtle.left(90) turtle.forward(100) turtle.left(90) turtle.forward(100) turtle.left(90) turtle.forward(100) """ """ import turtle window = turtle.Screen() geoff = turtle.Turtle() # t = turtle.Pen() geoff.forward(100) geoff.left(90) geoff.forward(100) geoff.left(90) geoff.forward(100) geoff.left(90) geoff.forward(100) turtle.done() # window.exitonclick() """ # //* without t.done() the screen closes immediately after the program has ended
""" import turtle as t for x in range(4): t.forward(100) t.right(90) """ ' import turtle\n\n# edit this line to control where window appears\nturtle.setup(width=500, height=500, startx=-1, starty=0)\n\nturtle.forward(100) ' ' from turtle import *\n\nturtle = Turtle()\n\nprint(turtle.position())\nturtle.forward(200)\nprint(turtle.position()) ' ' import turtle\n\nnew_turtle = turtle.Turtle() \nnew_turtle.forward(100)\nnew_turtle.left(90)\nnew_turtle.forward(100)\nnew_turtle.left(90)\nnew_turtle.forward(100)\nnew_turtle.left(90)\nnew_turtle.forward(100) ' ' from turtle import Turtle\n\nturtle = Turtle()\n\nturtle.forward(100)\nturtle.left(90)\nturtle.forward(100)\nturtle.left(90)\nturtle.forward(100)\nturtle.left(90)\nturtle.forward(100)\n ' ' import turtle\nwindow = turtle.Screen()\ngeoff = turtle.Turtle()\n# t = turtle.Pen()\ngeoff.forward(100)\ngeoff.left(90)\ngeoff.forward(100)\ngeoff.left(90)\ngeoff.forward(100)\ngeoff.left(90)\ngeoff.forward(100)\n\nturtle.done()\n# window.exitonclick() '
def check(mark): if mark > 100: return None elif mark >= 80: return 4.00 elif mark >= 75: return 3.75 elif mark >= 70: return 3.50 elif mark >= 65: return 3.25 elif mark >= 60: return 3.00 elif mark >= 55: return 2.75 elif mark >= 50: return 2.50 elif mark >= 45: return 2.25 elif mark >= 40: return 2.00 elif mark < 40: return 0.00 else: return None
def check(mark): if mark > 100: return None elif mark >= 80: return 4.0 elif mark >= 75: return 3.75 elif mark >= 70: return 3.5 elif mark >= 65: return 3.25 elif mark >= 60: return 3.0 elif mark >= 55: return 2.75 elif mark >= 50: return 2.5 elif mark >= 45: return 2.25 elif mark >= 40: return 2.0 elif mark < 40: return 0.0 else: return None
# -*- coding: utf-8 -*- """ @ Author: Sandip Dutta -------------------------------------------------------------- Code for Modular Exponentiation Modular Exponentiation is an algorithm for calculating (a^b) % m fast. a^b is useful for us but it's value may be large and it might overflow. So we calculate (a^b) % m. The idea of modular exponentiation can be shown with the help of the following ideas 1. (a * b) % (m) = (a %(m) * b %(m)) %(m) 2. a ^ b = (a ^ (b/2) * a ^ (b/2)) when b is even = (a * a ^ (b-1)) when b is odd These two ideas gives us the recursive version of the algorithm we will implement. > Runtime - O(log (b)) --------------------------------------------------------------- NOTE : In python, pow() function implements this idea --------------------------------------------------------------- """ def modularExp(a, b, m): ''' Performs modular Exponentiation, that is a^b % m fast. @ Args: a - (int) mantissa / base b - (int) exponent m - (int) number with respect to which modulus is calculated @ Return: y - (int) the value of (a ^ b) % m ''' # Base Case - a == 0, return 0; b == 0, return 1 if a == 0: return 0 if b == 0: return 1 y = 0 # Final Value # If b is odd, then b & 1(bitwise AND) == 1, else 0 # We do not use b % 2 here as bitwise operations might be # faster for larger b value # b is odd if b & 1: y = a % m # Break as per step 1 above y = (y * modularExp(a, b - 1, m) % m) % m # Break as per step 2 above else: y = modularExp(a, b // 2, m) y = (y * y) % m # Break as per step 2 above # this is to ensure that y is not negative return ((y + m) % m) #------------------------------------------------------ if __name__ == "__main__": a, b, m = list(map(int, input("Enter a, b, m: ").split())) print(modularExp(a, b, m))
""" @ Author: Sandip Dutta -------------------------------------------------------------- Code for Modular Exponentiation Modular Exponentiation is an algorithm for calculating (a^b) % m fast. a^b is useful for us but it's value may be large and it might overflow. So we calculate (a^b) % m. The idea of modular exponentiation can be shown with the help of the following ideas 1. (a * b) % (m) = (a %(m) * b %(m)) %(m) 2. a ^ b = (a ^ (b/2) * a ^ (b/2)) when b is even = (a * a ^ (b-1)) when b is odd These two ideas gives us the recursive version of the algorithm we will implement. > Runtime - O(log (b)) --------------------------------------------------------------- NOTE : In python, pow() function implements this idea --------------------------------------------------------------- """ def modular_exp(a, b, m): """ Performs modular Exponentiation, that is a^b % m fast. @ Args: a - (int) mantissa / base b - (int) exponent m - (int) number with respect to which modulus is calculated @ Return: y - (int) the value of (a ^ b) % m """ if a == 0: return 0 if b == 0: return 1 y = 0 if b & 1: y = a % m y = y * modular_exp(a, b - 1, m) % m % m else: y = modular_exp(a, b // 2, m) y = y * y % m return (y + m) % m if __name__ == '__main__': (a, b, m) = list(map(int, input('Enter a, b, m: ').split())) print(modular_exp(a, b, m))
filenames = ['the-big-picture.md', 'inspecting.md', 'download-html.md', 'create-soup-and-search.md', 'scrape-data-from-tag.md', 'project1-basketball-data-from-nba.md', 'project2-game-data-from-steam.md', 'project3-movie-data-from-imdb.md', 'project4-product-data-from-amazon.md' ] with open('book.md', 'w') as outfile: for fname in filenames: with open(fname) as infile: for line in infile: if ('---' not in line) and ('layout: default' not in line): outfile.write(line)
filenames = ['the-big-picture.md', 'inspecting.md', 'download-html.md', 'create-soup-and-search.md', 'scrape-data-from-tag.md', 'project1-basketball-data-from-nba.md', 'project2-game-data-from-steam.md', 'project3-movie-data-from-imdb.md', 'project4-product-data-from-amazon.md'] with open('book.md', 'w') as outfile: for fname in filenames: with open(fname) as infile: for line in infile: if '---' not in line and 'layout: default' not in line: outfile.write(line)
def fbx_template_def_texture_file(scene, settings, override_defaults=None, nbr_users=0): # WIP... # XXX Not sure about all names! props = OrderedDict(( (b"TextureTypeUse", (0, "p_enum", False)), # Standard. (b"AlphaSource", (2, "p_enum", False)), # Black (i.e. texture's alpha), XXX name guessed!. (b"Texture alpha", (1.0, "p_double", False)), (b"PremultiplyAlpha", (True, "p_bool", False)), (b"CurrentTextureBlendMode", (1, "p_enum", False)), # Additive... (b"CurrentMappingType", (0, "p_enum", False)), # UV. (b"UVSet", ("default", "p_string", False)), # UVMap name. (b"WrapModeU", (0, "p_enum", False)), # Repeat. (b"WrapModeV", (0, "p_enum", False)), # Repeat. (b"UVSwap", (False, "p_bool", False)), (b"Translation", ((0.0, 0.0, 0.0), "p_vector_3d", False)), (b"Rotation", ((0.0, 0.0, 0.0), "p_vector_3d", False)), (b"Scaling", ((1.0, 1.0, 1.0), "p_vector_3d", False)), (b"TextureRotationPivot", ((0.0, 0.0, 0.0), "p_vector_3d", False)), (b"TextureScalingPivot", ((0.0, 0.0, 0.0), "p_vector_3d", False)), # Not sure about those two... (b"UseMaterial", (False, "p_bool", False)), (b"UseMipMap", (False, "p_bool", False)), )) if override_defaults is not None: props.update(override_defaults) return FBXTemplate(b"Texture", b"FbxFileTexture", props, nbr_users, [False])
def fbx_template_def_texture_file(scene, settings, override_defaults=None, nbr_users=0): props = ordered_dict(((b'TextureTypeUse', (0, 'p_enum', False)), (b'AlphaSource', (2, 'p_enum', False)), (b'Texture alpha', (1.0, 'p_double', False)), (b'PremultiplyAlpha', (True, 'p_bool', False)), (b'CurrentTextureBlendMode', (1, 'p_enum', False)), (b'CurrentMappingType', (0, 'p_enum', False)), (b'UVSet', ('default', 'p_string', False)), (b'WrapModeU', (0, 'p_enum', False)), (b'WrapModeV', (0, 'p_enum', False)), (b'UVSwap', (False, 'p_bool', False)), (b'Translation', ((0.0, 0.0, 0.0), 'p_vector_3d', False)), (b'Rotation', ((0.0, 0.0, 0.0), 'p_vector_3d', False)), (b'Scaling', ((1.0, 1.0, 1.0), 'p_vector_3d', False)), (b'TextureRotationPivot', ((0.0, 0.0, 0.0), 'p_vector_3d', False)), (b'TextureScalingPivot', ((0.0, 0.0, 0.0), 'p_vector_3d', False)), (b'UseMaterial', (False, 'p_bool', False)), (b'UseMipMap', (False, 'p_bool', False)))) if override_defaults is not None: props.update(override_defaults) return fbx_template(b'Texture', b'FbxFileTexture', props, nbr_users, [False])
#!/usr/bin/python3.6 ##### Sieve of Eratosthenes ##### """ Calculates prime numbers, Enter the upper range of Primes.""" def seiveoferatosthenes(num): primes = [i for i in range(2, num+1)] i = 0 while i < len(primes): p = primes[i] j = i + 1 while j < len(primes): if primes[j]%p == 0: primes.remove(primes[j]) else: j = j + 1 i = i + 1 print(primes) num = int(input("Enter a upper range of primes: ")) seiveoferatosthenes(num)
""" Calculates prime numbers, Enter the upper range of Primes.""" def seiveoferatosthenes(num): primes = [i for i in range(2, num + 1)] i = 0 while i < len(primes): p = primes[i] j = i + 1 while j < len(primes): if primes[j] % p == 0: primes.remove(primes[j]) else: j = j + 1 i = i + 1 print(primes) num = int(input('Enter a upper range of primes: ')) seiveoferatosthenes(num)
expected_output = { 'status': 'enabled', 'ssh_port': '830', 'candidate_datastore_status': 'enabled' }
expected_output = {'status': 'enabled', 'ssh_port': '830', 'candidate_datastore_status': 'enabled'}
#!/usr/bin/env python # -*- coding: utf-8 -*- # The MIT License (MIT) # # Copyright (c) 2016 Richard Hull # # 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 common(object): DISPLAYOFF = 0xAE DISPLAYON = 0xAF DISPLAYALLON = 0xA5 DISPLAYALLON_RESUME = 0xA4 NORMALDISPLAY = 0xA6 INVERTDISPLAY = 0xA7 SETREMAP = 0xA0 SETMULTIPLEX = 0xA8 class ssd1306(common): CHARGEPUMP = 0x8D COLUMNADDR = 0x21 COMSCANDEC = 0xC8 COMSCANINC = 0xC0 EXTERNALVCC = 0x1 MEMORYMODE = 0x20 PAGEADDR = 0x22 SETCOMPINS = 0xDA SETCONTRAST = 0x81 SETDISPLAYCLOCKDIV = 0xD5 SETDISPLAYOFFSET = 0xD3 SETHIGHCOLUMN = 0x10 SETLOWCOLUMN = 0x00 SETPRECHARGE = 0xD9 SETSEGMENTREMAP = 0xA1 SETSTARTLINE = 0x40 SETVCOMDETECT = 0xDB SWITCHCAPVCC = 0x2 sh1106 = ssd1306 class ssd1331(common): ACTIVESCROLLING = 0x2F CLOCKDIVIDER = 0xB3 CONTINUOUSSCROLLINGSETUP = 0x27 DEACTIVESCROLLING = 0x2E DISPLAYONDIM = 0xAC LOCKMODE = 0xFD MASTERCURRENTCONTROL = 0x87 NORMALDISPLAY = 0xA4 PHASE12PERIOD = 0xB1 POWERSAVEMODE = 0xB0 SETCOLUMNADDR = 0x15 SETCONTRASTA = 0x81 SETCONTRASTB = 0x82 SETCONTRASTC = 0x83 SETDISPLAYOFFSET = 0xA2 SETDISPLAYSTARTLINE = 0xA1 SETMASTERCONFIGURE = 0xAD SETPRECHARGESPEEDA = 0x8A SETPRECHARGESPEEDB = 0x8B SETPRECHARGESPEEDC = 0x8C SETPRECHARGEVOLTAGE = 0xBB SETROWADDR = 0x75 SETVVOLTAGE = 0xBE
class Common(object): displayoff = 174 displayon = 175 displayallon = 165 displayallon_resume = 164 normaldisplay = 166 invertdisplay = 167 setremap = 160 setmultiplex = 168 class Ssd1306(common): chargepump = 141 columnaddr = 33 comscandec = 200 comscaninc = 192 externalvcc = 1 memorymode = 32 pageaddr = 34 setcompins = 218 setcontrast = 129 setdisplayclockdiv = 213 setdisplayoffset = 211 sethighcolumn = 16 setlowcolumn = 0 setprecharge = 217 setsegmentremap = 161 setstartline = 64 setvcomdetect = 219 switchcapvcc = 2 sh1106 = ssd1306 class Ssd1331(common): activescrolling = 47 clockdivider = 179 continuousscrollingsetup = 39 deactivescrolling = 46 displayondim = 172 lockmode = 253 mastercurrentcontrol = 135 normaldisplay = 164 phase12_period = 177 powersavemode = 176 setcolumnaddr = 21 setcontrasta = 129 setcontrastb = 130 setcontrastc = 131 setdisplayoffset = 162 setdisplaystartline = 161 setmasterconfigure = 173 setprechargespeeda = 138 setprechargespeedb = 139 setprechargespeedc = 140 setprechargevoltage = 187 setrowaddr = 117 setvvoltage = 190
# -*- coding: utf-8 -*- class ModuleDocFragment(object): # Git doc fragment DOCUMENTATION = ''' options: git_token: description: - Git token used for authentication - Required if I(git_username=None) - If not set, the value of the C(GIT_TOKEN) environment variable is used. type: str required: no git_username: description: - Username used for Github authorization - Required if I(git_token=None) - If not set, the value of the C(GIT_USERNAME) environment variable is used. type: str required: no git_password: description: - Password used for Github authorization - Required if I(git_token=None) - If not set, the value of the C(GIT_PASSWORD) environment variable is used. type: str required: no repo: description: - Name of the GitHub repository - If not set, the value of the C(GIT_REPO) environment variable is used. type: str required: yes org: description: - Name of the GitHub organization (or user account) - If not set, the value of the C(GIT_ORG) environment variable is used. type: str required: yes branch: description: - Name of the GitHub repository branch type: str default: master required: yes working_dir: description: Path to the working directory for git clone required: true type: str '''
class Moduledocfragment(object): documentation = '\noptions:\n git_token:\n description:\n - Git token used for authentication\n - Required if I(git_username=None)\n - If not set, the value of the C(GIT_TOKEN) environment variable is used.\n type: str\n required: no\n git_username:\n description:\n - Username used for Github authorization\n - Required if I(git_token=None)\n - If not set, the value of the C(GIT_USERNAME) environment variable is used.\n type: str\n required: no\n git_password:\n description:\n - Password used for Github authorization\n - Required if I(git_token=None)\n - If not set, the value of the C(GIT_PASSWORD) environment variable is used.\n type: str\n required: no\n repo:\n description:\n - Name of the GitHub repository\n - If not set, the value of the C(GIT_REPO) environment variable is used.\n type: str\n required: yes\n org:\n description:\n - Name of the GitHub organization (or user account)\n - If not set, the value of the C(GIT_ORG) environment variable is used.\n type: str\n required: yes\n branch:\n description:\n - Name of the GitHub repository branch\n type: str\n default: master\n required: yes\n working_dir:\n description: Path to the working directory for git clone\n required: true\n type: str\n'
"""A collection of functions for doing my project.""" def string_concatenator(string1, string2): """Combines strings together by adding them and returning the combination as an output. Parameters ---------- string1 : string String that will be added to another string. string2 : string String that will be added to another string. Returns ------- output : string String that combines both input strings, string1 and string2 with "+" operation. """ # Saves sum of string1 and string2 to output variable output = string1 + string2 # Output variable is returned by function return output def DNA_to_mRNA_List(DNA_string): """Takes in DNA sequence string and converts it to an mRNA list. Parameters ---------- DNA_string : string String that contains letters/characters of a DNA string, e.g., 'a,' t,' 'c,' and 'g.' Returns ------- mRNA_List : list List that converts each and every value in input to corresponding mRNA values. """ # Creates an empty list to which values will be appended mRNA_List = []; # Loops through each character of DNA string input for char in DNA_string: if char == 'a' or char == 'A': # Characters are appended to mRNA_List mRNA_List.append('U') elif char == 't' or char == 'T': mRNA_List.append('A') elif char == 'c' or char == 'C': mRNA_List.append('G') elif char == 'g' or char == 'G': mRNA_List.append('C') # Output mRNA_List is returned by function return mRNA_List def DNA_to_mRNA(DNA_string, separator): """Takes in DNA sequence string and converts it to an mRNA string, with separation character in between every three characters of the string. Parameters ---------- DNA_string : string String that contains letters/characters of a DNA string, e.g., 'a,' t,' 'c,' and 'g.' separator : string/character Character that will be inserted in between every three elements of mRNA string, e.g., '-', ',', etc. Returns ------- mRNA : string String that is formed by combining each element of the mRNA list of elements, along with a separator chosen (input by the user) between every three elements of the sequence. """ # Previous function, DNA_to_mRNA_List() is called on to get values for mRNA_List in this # function mRNA_List = DNA_to_mRNA_List(DNA_string) # String is initialized under variable mRNA_initial mRNA_initial = mRNA_List[0] # Each element of mRNA list is looped through for sequence_element in mRNA_List[1:]: # Previous function, string_concatenator(), is used as each element is looped through mRNA_initial = string_concatenator(mRNA_initial, sequence_element) # The final output is produced by inserting the chosen separator using separator.join() mRNA = separator.join([mRNA_initial[i:i+3] for i in range(0, len(mRNA_initial), 3)]) # Output mRNA is returned by function return mRNA def DNA_to_tRNA_List(DNA_string): """Takes in DNA sequence string and converts it to a tRNA list. Parameters ---------- DNA_string : string String that contains letters/characters of a DNA string, e.g., 'a,' t,' 'c,' and 'g.' Returns ------- tRNAList : string List that converts each and every value in input to corresponding tRNA values. """ # Previous function, DNA_to_mRNAList() is called on to get mRNA_List for conversion to tRNA mRNA_List = DNA_to_mRNA_List(DNA_string) # Creates an empty list to which values will be appended tRNA_List = [] # Each element of mRNA_List is looped through for char in mRNA_List: if char == 'a' or char == 'A': # Characters are appended to tRNA_List tRNA_List.append('U') elif char == 'u' or char == 'U': tRNA_List.append('A') elif char == 'c' or char == 'C': tRNA_List.append('G') elif char == 'g' or char == 'G': tRNA_List.append('C') # Output tRNA_List is returned by function return tRNA_List def DNA_to_tRNA(DNA_string, separator): """Takes in DNA sequence string and converts it to an mRNA string, with separation character in between every three characters of the string. Parameters ---------- DNA_string : string String that contains letters/characters of a DNA string, e.g., 'a,' t,' 'c,' and 'g.' separator : string/character Character that will be inserted in between every three elements of mRNA string, e.g., '-', ',', etc. Returns ------- tRNA : string String that is formed by combining each element of the tRNA list of elements, along with a separator chosen (input by the user) between every three elements of the sequence. """ # Previous function, DNA_to_tRNA_List is called on tRNA_List = DNA_to_tRNA_List(DNA_string) # String is initialized under tRNA_initial variable tRNA_initial = tRNA_List[0] # each element of tRNA_List is looped through for sequence_element in tRNA_List[1:]: # Previous function, string_concatenator, is used as each element is looped through tRNA_initial = string_concatenator(tRNA_initial, sequence_element) # The final output is produced by inserting the chosen separator using separator.join() tRNA = separator.join([tRNA_initial[i:i+3] for i in range(0, len(tRNA_initial), 3)]) # Output tRNA is returned by function return tRNA
"""A collection of functions for doing my project.""" def string_concatenator(string1, string2): """Combines strings together by adding them and returning the combination as an output. Parameters ---------- string1 : string String that will be added to another string. string2 : string String that will be added to another string. Returns ------- output : string String that combines both input strings, string1 and string2 with "+" operation. """ output = string1 + string2 return output def dna_to_m_rna__list(DNA_string): """Takes in DNA sequence string and converts it to an mRNA list. Parameters ---------- DNA_string : string String that contains letters/characters of a DNA string, e.g., 'a,' t,' 'c,' and 'g.' Returns ------- mRNA_List : list List that converts each and every value in input to corresponding mRNA values. """ m_rna__list = [] for char in DNA_string: if char == 'a' or char == 'A': mRNA_List.append('U') elif char == 't' or char == 'T': mRNA_List.append('A') elif char == 'c' or char == 'C': mRNA_List.append('G') elif char == 'g' or char == 'G': mRNA_List.append('C') return mRNA_List def dna_to_m_rna(DNA_string, separator): """Takes in DNA sequence string and converts it to an mRNA string, with separation character in between every three characters of the string. Parameters ---------- DNA_string : string String that contains letters/characters of a DNA string, e.g., 'a,' t,' 'c,' and 'g.' separator : string/character Character that will be inserted in between every three elements of mRNA string, e.g., '-', ',', etc. Returns ------- mRNA : string String that is formed by combining each element of the mRNA list of elements, along with a separator chosen (input by the user) between every three elements of the sequence. """ m_rna__list = dna_to_m_rna__list(DNA_string) m_rna_initial = mRNA_List[0] for sequence_element in mRNA_List[1:]: m_rna_initial = string_concatenator(mRNA_initial, sequence_element) m_rna = separator.join([mRNA_initial[i:i + 3] for i in range(0, len(mRNA_initial), 3)]) return mRNA def dna_to_t_rna__list(DNA_string): """Takes in DNA sequence string and converts it to a tRNA list. Parameters ---------- DNA_string : string String that contains letters/characters of a DNA string, e.g., 'a,' t,' 'c,' and 'g.' Returns ------- tRNAList : string List that converts each and every value in input to corresponding tRNA values. """ m_rna__list = dna_to_m_rna__list(DNA_string) t_rna__list = [] for char in mRNA_List: if char == 'a' or char == 'A': tRNA_List.append('U') elif char == 'u' or char == 'U': tRNA_List.append('A') elif char == 'c' or char == 'C': tRNA_List.append('G') elif char == 'g' or char == 'G': tRNA_List.append('C') return tRNA_List def dna_to_t_rna(DNA_string, separator): """Takes in DNA sequence string and converts it to an mRNA string, with separation character in between every three characters of the string. Parameters ---------- DNA_string : string String that contains letters/characters of a DNA string, e.g., 'a,' t,' 'c,' and 'g.' separator : string/character Character that will be inserted in between every three elements of mRNA string, e.g., '-', ',', etc. Returns ------- tRNA : string String that is formed by combining each element of the tRNA list of elements, along with a separator chosen (input by the user) between every three elements of the sequence. """ t_rna__list = dna_to_t_rna__list(DNA_string) t_rna_initial = tRNA_List[0] for sequence_element in tRNA_List[1:]: t_rna_initial = string_concatenator(tRNA_initial, sequence_element) t_rna = separator.join([tRNA_initial[i:i + 3] for i in range(0, len(tRNA_initial), 3)]) return tRNA
#!/usr/bin/env python3 def unit_fraction(d): n = 10 while True: yield n//d, n%d n = 10*(n%d) def longest_chain(d): encountered = [] for pair in unit_fraction(d): if pair in encountered: return len(encountered[encountered.index(pair):]) else: encountered.append(pair) length2d = { longest_chain(d): d for d in range(1, 1000) } print(length2d[max(length2d.keys())])
def unit_fraction(d): n = 10 while True: yield (n // d, n % d) n = 10 * (n % d) def longest_chain(d): encountered = [] for pair in unit_fraction(d): if pair in encountered: return len(encountered[encountered.index(pair):]) else: encountered.append(pair) length2d = {longest_chain(d): d for d in range(1, 1000)} print(length2d[max(length2d.keys())])
""" Power digit sum 2**15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 2**1000? Answer: 1366 """ def power_digit_sum(base, power): """Return the sum of the digtis in base**power""" return sum([int(x) for x in list(str(base**power))]) print(power_digit_sum(2, 1000))
""" Power digit sum 2**15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 2**1000? Answer: 1366 """ def power_digit_sum(base, power): """Return the sum of the digtis in base**power""" return sum([int(x) for x in list(str(base ** power))]) print(power_digit_sum(2, 1000))
class Decision(object): def __init__(self, action=None): self.action = action def get_action(self): return self.action def decision(self): action = self.get_action() if action == 4: return "open" elif action == 6: return "fold" elif action == 0: # A way to stop getting more hands without an IDE return "stop" else: print("Invalid choice.") def __str__(self): return str(self.action)
class Decision(object): def __init__(self, action=None): self.action = action def get_action(self): return self.action def decision(self): action = self.get_action() if action == 4: return 'open' elif action == 6: return 'fold' elif action == 0: return 'stop' else: print('Invalid choice.') def __str__(self): return str(self.action)
class Solution: def permute(self, nums: [int]) -> [[int]]: if len(nums) <= 1: return [nums] ans = [] perms = self.permute(nums[1:]) for perm in perms: for i in range(0, len(perm) + 1): p = perm[:i] + [nums[0]] + perm[i:] ans.append(p) return ans
class Solution: def permute(self, nums: [int]) -> [[int]]: if len(nums) <= 1: return [nums] ans = [] perms = self.permute(nums[1:]) for perm in perms: for i in range(0, len(perm) + 1): p = perm[:i] + [nums[0]] + perm[i:] ans.append(p) return ans
def get_summary(name = "Daisi user"): text = ''' This Daisi is a simple endpoint to a *Hello World* function, with a straightforward Streamlit app. Call the `hello()` endpoint in Python with `pydaisi`: ```python import pydaisi as pyd print_hello_app = pyd.Daisi("Print Hello App") greetings = print_hello_app.hello("''' text += name + '''").value print(greetings) ``` ''' return text
def get_summary(name='Daisi user'): text = '\n\n This Daisi is a simple endpoint to a *Hello World* function, with a straightforward\n Streamlit app.\n\n Call the `hello()` endpoint in Python with `pydaisi`:\n\n ```python\n import pydaisi as pyd\n\n print_hello_app = pyd.Daisi("Print Hello App")\n greetings = print_hello_app.hello("' text += name + '").value\n\n print(greetings)\n ```\n ' return text
def image(request, id): return HttpResponse(open(directory.settings.DIRNAME + "/static/images/profile/" + id, "rb").read(), mimetype = directory.models.Entity.objects.filter(id = int(id))[0].image_mimetype)
def image(request, id): return http_response(open(directory.settings.DIRNAME + '/static/images/profile/' + id, 'rb').read(), mimetype=directory.models.Entity.objects.filter(id=int(id))[0].image_mimetype)
#!/usr/bin/python3 """defines a class Square""" class Square: """Represents a square Attributes: __size (int): size of a side of the square """ def __init__(self, size=0): """initializes the square Args: size (int): size of a side of the square Returns: None """ if type(size) is not int: raise TypeError("size must be an integer") else: if size < 0: raise ValueError("size must be >= 0") else: self.__size = size
"""defines a class Square""" class Square: """Represents a square Attributes: __size (int): size of a side of the square """ def __init__(self, size=0): """initializes the square Args: size (int): size of a side of the square Returns: None """ if type(size) is not int: raise type_error('size must be an integer') elif size < 0: raise value_error('size must be >= 0') else: self.__size = size
def user_id_validator(source_function): """Function which can be used as a decorator to validate the user id""" def function_wrapper(*args, **kwargs): exe_res = source_function(*args, **kwargs) return exe_res return function_wrapper @user_id_validator def sample_function(arg1, arg2): """Basic doc string format of reStructuredText :param int arg1: Description of the argument 1 :param str arg2: Description of the argument 2 :return int: Addition of two number """ pass
def user_id_validator(source_function): """Function which can be used as a decorator to validate the user id""" def function_wrapper(*args, **kwargs): exe_res = source_function(*args, **kwargs) return exe_res return function_wrapper @user_id_validator def sample_function(arg1, arg2): """Basic doc string format of reStructuredText :param int arg1: Description of the argument 1 :param str arg2: Description of the argument 2 :return int: Addition of two number """ pass
def score_game(frames): total = 0 for index, frame in enumerate(frames): # frame => (10, 0) # 14, frame+1 => (2, 2) # 4 frame_total = sum(frame) if frame[0] == 10: total += sum(frames[index + 1]) # if frames[index + 2][0] == 10: # total += frames[index + 2][0] elif frame_total == 10: total += frames[index + 1][0] total += frame_total return total
def score_game(frames): total = 0 for (index, frame) in enumerate(frames): frame_total = sum(frame) if frame[0] == 10: total += sum(frames[index + 1]) elif frame_total == 10: total += frames[index + 1][0] total += frame_total return total
class LocalCommunicationService: __hotword_file = "/home/pi/teddy-vision/hotword.txt" __instance = None @staticmethod def getInstance(): if LocalCommunicationService.__instance == None: LocalCommunicationService() return LocalCommunicationService.__instance def __init__(self): LocalCommunicationService.__instance = self def write_hotword(self, hotword): with open(self.__hotword_file, "w") as f: f.write(hotword) def read_hotword(self): ret = None with open(self.__hotword_file, "r") as f: ret = f.readline() return ret
class Localcommunicationservice: __hotword_file = '/home/pi/teddy-vision/hotword.txt' __instance = None @staticmethod def get_instance(): if LocalCommunicationService.__instance == None: local_communication_service() return LocalCommunicationService.__instance def __init__(self): LocalCommunicationService.__instance = self def write_hotword(self, hotword): with open(self.__hotword_file, 'w') as f: f.write(hotword) def read_hotword(self): ret = None with open(self.__hotword_file, 'r') as f: ret = f.readline() return ret
# Three stones are on a number line at positions a, b, and c. # Each turn, you pick up a stone at an endpoint (ie., either the lowest or highest position stone), and move it to an unoccupied position between those endpoints. Formally, let's say the stones are currently at positions x, y, z with x < y < z. You pick up the stone at either position x or position z, and move that stone to an integer position k, with x < k < z and k != y. # The game ends when you cannot make any more moves, ie. the stones are in consecutive positions. # When the game ends, what is the minimum and maximum number of moves that you could have made? Return the answer as an length 2 array: answer = [minimum_moves, maximum_moves] # Example 1: # Input: a = 1, b = 2, c = 5 # Output: [1,2] # Explanation: Move the stone from 5 to 3, or move the stone from 5 to 4 to 3. # Example 2: # Input: a = 4, b = 3, c = 2 # Output: [0,0] # Explanation: We cannot make any moves. # Example 3: # Input: a = 3, b = 5, c = 1 # Output: [1,2] # Explanation: Move the stone from 1 to 4; or move the stone from 1 to 2 to 4. # Note: # 1 <= a <= 100 # 1 <= b <= 100 # 1 <= c <= 100 # a != b, b != c, c != a def sum(a, b, c): count = (b-a - 1) + (c-b - 1) return count def numMove(a, b, c): """ :type a: int :type b: int :type c: int :rtype: List[int] """ list = [a,b,c] list.sort() max_num = sum(list[0],list[1],list[2]) min_num = 0 print(list) if (max_num != 0): if (list[2] - list[1] == 2) or (list[2] - list[1] == 1) or (list[1] - list[0] == 1) or (list[1] - list[0] == 2): min_num = 1 else: min_num = 2 return [min_num,max_num] print(numMoves(1,2,5)) class Solution(object): def numMovesStones(self, a, b, c): """ :type a: int :type b: int :type c: int :rtype: List[int] """ return numMove(a,b,c)
def sum(a, b, c): count = b - a - 1 + (c - b - 1) return count def num_move(a, b, c): """ :type a: int :type b: int :type c: int :rtype: List[int] """ list = [a, b, c] list.sort() max_num = sum(list[0], list[1], list[2]) min_num = 0 print(list) if max_num != 0: if list[2] - list[1] == 2 or list[2] - list[1] == 1 or list[1] - list[0] == 1 or (list[1] - list[0] == 2): min_num = 1 else: min_num = 2 return [min_num, max_num] print(num_moves(1, 2, 5)) class Solution(object): def num_moves_stones(self, a, b, c): """ :type a: int :type b: int :type c: int :rtype: List[int] """ return num_move(a, b, c)
def ha_muito_tempo_atras(): n = int(input()) for i in range(n): anos = int(input()) if anos > 2014: print(f'{anos-2014} A.C.') else: print(f'{2015-anos} D.C.') ha_muito_tempo_atras()
def ha_muito_tempo_atras(): n = int(input()) for i in range(n): anos = int(input()) if anos > 2014: print(f'{anos - 2014} A.C.') else: print(f'{2015 - anos} D.C.') ha_muito_tempo_atras()
# Problem Set 5 - Problem 3 - CiphertextMessage # # Released 2021-07-07 14:00 UTC+00 # Started 2021-07-08 04:25 UTC+00 # Finished 2021-07-08 04:28 UTC+00 # https://github.com/lcsm29/edx-mit-6.00.1x # # oooo w r i t t e n b y .oooo. .ooooo. # `888 .dP""Y88b 888' `Y88. # 888 .ooooo. .oooo.o ooo. .oo. .oo. ]8P' 888 888 # 888 d88' `"Y8 d88( "8 `888P"Y88bP"Y88b .d8P' `Vbood888 # 888 888 `"Y88b. 888 888 888 .dP' 888' # 888 888 .o8 o. )88b 888 888 888 .oP .o .88P' # o888o `Y8bod8P' 8""888P' o888o o888o o888o 8888888888 .oP' class CiphertextMessage(Message): def __init__(self, text): ''' Initializes a CiphertextMessage object text (string): the message's text a CiphertextMessage object has two attributes: self.message_text (string, determined by input text) self.valid_words (list, determined using helper function load_words) ''' Message.__init__(self, text) def decrypt_message(self): ''' Decrypt self.message_text by trying every possible shift value and find the "best" one. We will define "best" as the shift that creates the maximum number of real words when we use apply_shift(shift) on the message text. If s is the original shift value used to encrypt the message, then we would expect 26 - s to be the best shift value for decrypting it. Note: if multiple shifts are equally good such that they all create the maximum number of you may choose any of those shifts (and their corresponding decrypted messages) to return Returns: a tuple of the best shift value used to decrypt the message and the decrypted message text using that shift value ''' candidates ={(i, self.apply_shift(i)): 0 for i in range(26)} for candidate in candidates.keys(): for word in candidate[1].split(): if is_word(self.valid_words, word): candidates[candidate] += 1 return max(candidates, key=candidates.get)
class Ciphertextmessage(Message): def __init__(self, text): """ Initializes a CiphertextMessage object text (string): the message's text a CiphertextMessage object has two attributes: self.message_text (string, determined by input text) self.valid_words (list, determined using helper function load_words) """ Message.__init__(self, text) def decrypt_message(self): """ Decrypt self.message_text by trying every possible shift value and find the "best" one. We will define "best" as the shift that creates the maximum number of real words when we use apply_shift(shift) on the message text. If s is the original shift value used to encrypt the message, then we would expect 26 - s to be the best shift value for decrypting it. Note: if multiple shifts are equally good such that they all create the maximum number of you may choose any of those shifts (and their corresponding decrypted messages) to return Returns: a tuple of the best shift value used to decrypt the message and the decrypted message text using that shift value """ candidates = {(i, self.apply_shift(i)): 0 for i in range(26)} for candidate in candidates.keys(): for word in candidate[1].split(): if is_word(self.valid_words, word): candidates[candidate] += 1 return max(candidates, key=candidates.get)
# set representation to bit representation and then return answer # to read input form file a,arr= [],[] start,end = 3,4 with open('Naive Algo\Input\Toycontext(bit)') as file: for line in file: line = line.strip() for c in line: if c != ' ': # print(int(c)) a.append(int(c)) # print(a) arr.append(a) a = [] # print(arr) # extract the size of the matrix of which binary representation had to be made rows= arr[-1][0] cols=0 #print(arr[-1][0]) for i in range(len(arr)): #print(arr[i][1:]) cols = max(arr[i][-1],cols) arr[i] = arr[i][1:] # print(arr) # print(rows,cols) # store the binary representation of matrix in brr brr = [[0 for i in range(cols)] for j in range(rows)] # print(brr) for i in range(len(arr)): for j in range(len(arr[i])): # t = arr[i][j] # print(t) # print(i,arr[i][j]-1) brr[i][arr[i][j] - 1] = 1 # print(brr[i]) #print(brr) # bit representation now their # find and store Gr in a set s s = set() for st in range(start, end+1): for i in range(len(brr)): for j in range(len(brr[i])): if j == st - 1 and brr[i][j] == 1: s.add(i + 1) #if j == end - 1 and arr[i][j] == 1: #s.add(i + 1) print('Gr is',s) # Gr s1 = set() coun = 0 k = 0 ans = 0 # store the final list of attributes in a set s1 for r in range(start): for i in range(len(brr)): for j in range(len(brr[i])): if j == r - 1 and brr[i][j] == 1: #print(r,i+1) # k = 0 coun += 1 if i+1 in s: k+=1 ans = j+1 # print(coun,k) if coun == k and k!=0 and coun !=0: s1.add(ans) coun = 0 k = 0 print('Attributes are',s1) #attributes
(a, arr) = ([], []) (start, end) = (3, 4) with open('Naive Algo\\Input\\Toycontext(bit)') as file: for line in file: line = line.strip() for c in line: if c != ' ': a.append(int(c)) arr.append(a) a = [] rows = arr[-1][0] cols = 0 for i in range(len(arr)): cols = max(arr[i][-1], cols) arr[i] = arr[i][1:] brr = [[0 for i in range(cols)] for j in range(rows)] for i in range(len(arr)): for j in range(len(arr[i])): brr[i][arr[i][j] - 1] = 1 s = set() for st in range(start, end + 1): for i in range(len(brr)): for j in range(len(brr[i])): if j == st - 1 and brr[i][j] == 1: s.add(i + 1) print('Gr is', s) s1 = set() coun = 0 k = 0 ans = 0 for r in range(start): for i in range(len(brr)): for j in range(len(brr[i])): if j == r - 1 and brr[i][j] == 1: coun += 1 if i + 1 in s: k += 1 ans = j + 1 if coun == k and k != 0 and (coun != 0): s1.add(ans) coun = 0 k = 0 print('Attributes are', s1)
# # PySNMP MIB module PANDATEL-FHFL-MODEM-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/PANDATEL-FHFL-MODEM-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:28:09 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) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection") mdmSpecifics, device_id = mibBuilder.importSymbols("PANDATEL-MODEM-MIB", "mdmSpecifics", "device-id") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") iso, TimeTicks, Bits, NotificationType, Gauge32, enterprises, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, ObjectIdentity, ModuleIdentity, Counter64, IpAddress, Counter32, Unsigned32, Integer32 = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "TimeTicks", "Bits", "NotificationType", "Gauge32", "enterprises", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "ObjectIdentity", "ModuleIdentity", "Counter64", "IpAddress", "Counter32", "Unsigned32", "Integer32") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") fhfl_modem = MibIdentifier((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 10000, 2, 101)).setLabel("fhfl-modem") fhfl = MibIdentifier((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101)) fhflModemTable = MibTable((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1), ) if mibBuilder.loadTexts: fhflModemTable.setStatus('mandatory') fhflTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1, 1), ).setIndexNames((0, "PANDATEL-FHFL-MODEM-MIB", "mdmRack"), (0, "PANDATEL-FHFL-MODEM-MIB", "mdmModem"), (0, "PANDATEL-FHFL-MODEM-MIB", "mdmPosition")) if mibBuilder.loadTexts: fhflTableEntry.setStatus('mandatory') mdmRack = MibTableColumn((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mdmRack.setStatus('mandatory') mdmModem = MibTableColumn((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mdmModem.setStatus('mandatory') mdmPosition = MibTableColumn((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("local", 1), ("remote", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mdmPosition.setStatus('mandatory') mdmModemName = MibTableColumn((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mdmModemName.setStatus('mandatory') mdmInterfaceEmulationMode = MibTableColumn((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 99))).clone(namedValues=NamedValues(("other", 1), ("dte", 2), ("dce", 3), ("te", 4), ("nt", 5), ("unknown", 99)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mdmInterfaceEmulationMode.setStatus('mandatory') mdmModemProperty = MibTableColumn((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 99))).clone(namedValues=NamedValues(("other", 1), ("e1", 2), ("t1", 3), ("e2", 4), ("t2", 5), ("e1-t1", 6), ("e2-t2", 7), ("e3", 8), ("t3", 9), ("hssi", 10), ("atm", 11), ("eth10base-t-fullduplex", 12), ("eth10base-t-halfduplex", 13), ("unknown", 99)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mdmModemProperty.setStatus('mandatory') mdmClockSystem = MibTableColumn((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1, 1, 23), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("dual", 2), ("single", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mdmClockSystem.setStatus('mandatory') mdmClockSource = MibTableColumn((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1, 1, 24), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("internal", 2), ("remote", 3), ("external", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mdmClockSource.setStatus('mandatory') mdmDataRate = MibTableColumn((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1, 1, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("other", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mdmDataRate.setStatus('mandatory') mdmLocalCarrierDetect = MibTableColumn((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1, 1, 60), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("fo-link-and-remote-handshake", 2), ("fo-link", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mdmLocalCarrierDetect.setStatus('mandatory') mibBuilder.exportSymbols("PANDATEL-FHFL-MODEM-MIB", fhfl=fhfl, mdmClockSource=mdmClockSource, mdmPosition=mdmPosition, fhflModemTable=fhflModemTable, mdmClockSystem=mdmClockSystem, mdmModemName=mdmModemName, fhflTableEntry=fhflTableEntry, mdmLocalCarrierDetect=mdmLocalCarrierDetect, fhfl_modem=fhfl_modem, mdmModem=mdmModem, mdmDataRate=mdmDataRate, mdmRack=mdmRack, mdmModemProperty=mdmModemProperty, mdmInterfaceEmulationMode=mdmInterfaceEmulationMode)
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_size_constraint, single_value_constraint, value_range_constraint, constraints_union, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection') (mdm_specifics, device_id) = mibBuilder.importSymbols('PANDATEL-MODEM-MIB', 'mdmSpecifics', 'device-id') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (iso, time_ticks, bits, notification_type, gauge32, enterprises, mib_scalar, mib_table, mib_table_row, mib_table_column, mib_identifier, object_identity, module_identity, counter64, ip_address, counter32, unsigned32, integer32) = mibBuilder.importSymbols('SNMPv2-SMI', 'iso', 'TimeTicks', 'Bits', 'NotificationType', 'Gauge32', 'enterprises', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'MibIdentifier', 'ObjectIdentity', 'ModuleIdentity', 'Counter64', 'IpAddress', 'Counter32', 'Unsigned32', 'Integer32') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') fhfl_modem = mib_identifier((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 10000, 2, 101)).setLabel('fhfl-modem') fhfl = mib_identifier((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101)) fhfl_modem_table = mib_table((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1)) if mibBuilder.loadTexts: fhflModemTable.setStatus('mandatory') fhfl_table_entry = mib_table_row((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1, 1)).setIndexNames((0, 'PANDATEL-FHFL-MODEM-MIB', 'mdmRack'), (0, 'PANDATEL-FHFL-MODEM-MIB', 'mdmModem'), (0, 'PANDATEL-FHFL-MODEM-MIB', 'mdmPosition')) if mibBuilder.loadTexts: fhflTableEntry.setStatus('mandatory') mdm_rack = mib_table_column((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mdmRack.setStatus('mandatory') mdm_modem = mib_table_column((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mdmModem.setStatus('mandatory') mdm_position = mib_table_column((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('local', 1), ('remote', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: mdmPosition.setStatus('mandatory') mdm_modem_name = mib_table_column((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1, 1, 5), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: mdmModemName.setStatus('mandatory') mdm_interface_emulation_mode = mib_table_column((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 99))).clone(namedValues=named_values(('other', 1), ('dte', 2), ('dce', 3), ('te', 4), ('nt', 5), ('unknown', 99)))).setMaxAccess('readonly') if mibBuilder.loadTexts: mdmInterfaceEmulationMode.setStatus('mandatory') mdm_modem_property = mib_table_column((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 99))).clone(namedValues=named_values(('other', 1), ('e1', 2), ('t1', 3), ('e2', 4), ('t2', 5), ('e1-t1', 6), ('e2-t2', 7), ('e3', 8), ('t3', 9), ('hssi', 10), ('atm', 11), ('eth10base-t-fullduplex', 12), ('eth10base-t-halfduplex', 13), ('unknown', 99)))).setMaxAccess('readonly') if mibBuilder.loadTexts: mdmModemProperty.setStatus('mandatory') mdm_clock_system = mib_table_column((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1, 1, 23), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('other', 1), ('dual', 2), ('single', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: mdmClockSystem.setStatus('mandatory') mdm_clock_source = mib_table_column((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1, 1, 24), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('other', 1), ('internal', 2), ('remote', 3), ('external', 4)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: mdmClockSource.setStatus('mandatory') mdm_data_rate = mib_table_column((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1, 1, 25), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1))).clone(namedValues=named_values(('other', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: mdmDataRate.setStatus('mandatory') mdm_local_carrier_detect = mib_table_column((1, 3, 6, 1, 4, 1, 760, 1, 1, 2, 1, 10, 101, 1, 1, 60), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('other', 1), ('fo-link-and-remote-handshake', 2), ('fo-link', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: mdmLocalCarrierDetect.setStatus('mandatory') mibBuilder.exportSymbols('PANDATEL-FHFL-MODEM-MIB', fhfl=fhfl, mdmClockSource=mdmClockSource, mdmPosition=mdmPosition, fhflModemTable=fhflModemTable, mdmClockSystem=mdmClockSystem, mdmModemName=mdmModemName, fhflTableEntry=fhflTableEntry, mdmLocalCarrierDetect=mdmLocalCarrierDetect, fhfl_modem=fhfl_modem, mdmModem=mdmModem, mdmDataRate=mdmDataRate, mdmRack=mdmRack, mdmModemProperty=mdmModemProperty, mdmInterfaceEmulationMode=mdmInterfaceEmulationMode)
# A function to check whether all salaries are equal def areAllEqual(array): s = set(array) if(len(s)==1): return True else: return False # Main code starts here testCases = int(input()) for x in range(testCases): moveCount=0 salArray = [] n = int(input()) for j in range(n): element = int(input()) salArray.append(element) print(salArray) #As long as the salries aren't equal, we'll reduce the max salary by 1 while(areAllEqual(salArray)==False): maxElement=max(salArray) for x in range(len(salArray)): if(salArray[x]==maxElement): salArray[x]=salArray[x]-1 moveCount+=1 print(salArray) print(moveCount)
def are_all_equal(array): s = set(array) if len(s) == 1: return True else: return False test_cases = int(input()) for x in range(testCases): move_count = 0 sal_array = [] n = int(input()) for j in range(n): element = int(input()) salArray.append(element) print(salArray) while are_all_equal(salArray) == False: max_element = max(salArray) for x in range(len(salArray)): if salArray[x] == maxElement: salArray[x] = salArray[x] - 1 move_count += 1 print(salArray) print(moveCount)
""" Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example, Given n = 3, there are a total of 5 unique BST's. 1 3 3 2 1 \ / / / \ \ 3 2 1 1 3 2 / / \ \ 2 1 2 3 """ class Solution(object): def numTrees(self, n): """ :type n: int :rtype: int """ count = [0] * (n + 1) count[0] = 1 count[1] = 1 for i in range(2, n + 1): for j in range(i): count[i] += count[j] * count[i - j - 1] return count[-1] a = Solution() print(a.numTrees(3))
""" Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example, Given n = 3, there are a total of 5 unique BST's. 1 3 3 2 1 \\ / / / \\ 3 2 1 1 3 2 / / \\ 2 1 2 3 """ class Solution(object): def num_trees(self, n): """ :type n: int :rtype: int """ count = [0] * (n + 1) count[0] = 1 count[1] = 1 for i in range(2, n + 1): for j in range(i): count[i] += count[j] * count[i - j - 1] return count[-1] a = solution() print(a.numTrees(3))
#!/usr/bin/env python3 st = "I am a string."; #intializes string variable print(type(st)); #prints the data type of st y = True; #initializes true boolean variable print(type(y)); #prints the data type of y n = False; #initializes false boolean variable print(type(n)); #prints the data type of n alpha_list = ["a", "b", "c"]; #initializes list print(type(alpha_list)); #prints the data type of alpha_list print(type(alpha_list[0])); #prints the data type of the first element of alpha_list alpha_list.append("d"); #appends "d" to the end of alpha_list print(alpha_list); #prints the contents of alpha_list alpha_tuple = ("a", "b", "c"); #initializes tuple print(type(alpha_tuple)); #prints the data type of alpha_tuple try: #attempts the following line alpha_tuple[2] = "d"; #checks end of alpha_tuple for "d" except TypeError: #when a TypeError is received print("We can'd add elements to tuples!"); #prints error message print(alpha_tuple); #prints the contents of alpha_tuple
st = 'I am a string.' print(type(st)) y = True print(type(y)) n = False print(type(n)) alpha_list = ['a', 'b', 'c'] print(type(alpha_list)) print(type(alpha_list[0])) alpha_list.append('d') print(alpha_list) alpha_tuple = ('a', 'b', 'c') print(type(alpha_tuple)) try: alpha_tuple[2] = 'd' except TypeError: print("We can'd add elements to tuples!") print(alpha_tuple)
""" Q509 Fibonacci number Easy The Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starting from 0 and 1. That is, F(0) = 0, F(1) = 1 F(n) = F(n - 1) + F(n - 2), for n > 1. Given n, calculate F(n). """ class Solution: def fib(self, n: int) -> int: if n == 0: return 0 if n == 1: return 1 a1 = 0 a2 = 1 i = 2 while i <= n: a1, a2 = a2, a1+a2 i += 1 return a2 sol = Solution() print(sol.fib(4))
""" Q509 Fibonacci number Easy The Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starting from 0 and 1. That is, F(0) = 0, F(1) = 1 F(n) = F(n - 1) + F(n - 2), for n > 1. Given n, calculate F(n). """ class Solution: def fib(self, n: int) -> int: if n == 0: return 0 if n == 1: return 1 a1 = 0 a2 = 1 i = 2 while i <= n: (a1, a2) = (a2, a1 + a2) i += 1 return a2 sol = solution() print(sol.fib(4))
class Foldable: """ A foldable is a data structure that can be collapsed into a single value. """ def fold(self, f, z): """ Apply a two-parameter function `f` to each element of the foldable structure `t a`, passing the result onto the next element. An initial value `z` is required for the first element (or returned for an empty structure). (t a, ((a, b) -> b), b) -> b """ pass def length(self): """ Count the number of elements in the structure `t a`. t a -> int """ return self.fold(lambda a, z: z + 1, 0) def isEmpty(self): """ Check if the structure is empty. t a -> bool """ return self.fold(lambda a, b: False, True) def contains(self, a): """ Check if the structure contains a supplied value. (t a, a) -> bool """ return self.fold(lambda av, z: z or av == a, False)
class Foldable: """ A foldable is a data structure that can be collapsed into a single value. """ def fold(self, f, z): """ Apply a two-parameter function `f` to each element of the foldable structure `t a`, passing the result onto the next element. An initial value `z` is required for the first element (or returned for an empty structure). (t a, ((a, b) -> b), b) -> b """ pass def length(self): """ Count the number of elements in the structure `t a`. t a -> int """ return self.fold(lambda a, z: z + 1, 0) def is_empty(self): """ Check if the structure is empty. t a -> bool """ return self.fold(lambda a, b: False, True) def contains(self, a): """ Check if the structure contains a supplied value. (t a, a) -> bool """ return self.fold(lambda av, z: z or av == a, False)
"""workflow_common - common lib for workflow plugins""" __version__ = '0.0.1' __author__ = 'misdirectedpuffin <misdirectedpuffin@gmail.com>' __all__ = []
"""workflow_common - common lib for workflow plugins""" __version__ = '0.0.1' __author__ = 'misdirectedpuffin <misdirectedpuffin@gmail.com>' __all__ = []
lst1 = input("First input: ") lst2 = input("Second input: ") lst1 = lst1.split() lst2 = lst2.split() lst2 = sorted(lst2) templst = [] count = 0 while count < int(lst1[1]): #running the loop for k times for elm in lst2: elm = int(elm) if elm <5: #checking if the player is acceptable elm += 1 templst.append(elm) lst2 = templst.copy() templst = [] count += 1 #print(lst2) final = len(lst2)//3 print(final)
lst1 = input('First input: ') lst2 = input('Second input: ') lst1 = lst1.split() lst2 = lst2.split() lst2 = sorted(lst2) templst = [] count = 0 while count < int(lst1[1]): for elm in lst2: elm = int(elm) if elm < 5: elm += 1 templst.append(elm) lst2 = templst.copy() templst = [] count += 1 final = len(lst2) // 3 print(final)
class BinarySearchTree: def __init__(self, value): self.value = value self.left = None self.right = None def insert(self, to_add): if self.value > to_add: if self.left: self.left.insert(to_add) else: self.left = BinarySearchTree(to_add) else: if self.right: self.right.insert(to_add) else: self.right = BinarySearchTree(to_add) def all_values_less_than(self, value): if self.value >= value: return False left_less_than = True if self.left: left_less_than = self.left.all_values_less_than(value) right_less_than = True if self.right: right_less_than = self.right.all_values_less_than(value) return left_less_than and right_less_than def all_values_geq_than(self, value): if self.value <= value: return False left_geq_than = True if self.left: left_geq_than = self.left.all_values_geq_than(value) right_geq_than = True if self.right: right_geq_than = self.right.all_values_geq_than(value) return left_geq_than and right_geq_than def is_bst(self): left_ok = True if self.left: left_ok = self.left.all_values_less_than(self.value) and self.left.is_bst() right_ok = True if self.right: right_ok = self.right.all_values_geq_than(self.value) and self.right.is_bst() return right_ok and left_ok def __repr__(self): return "({} L{} R{})".format(self.value, self.left, self.right)
class Binarysearchtree: def __init__(self, value): self.value = value self.left = None self.right = None def insert(self, to_add): if self.value > to_add: if self.left: self.left.insert(to_add) else: self.left = binary_search_tree(to_add) elif self.right: self.right.insert(to_add) else: self.right = binary_search_tree(to_add) def all_values_less_than(self, value): if self.value >= value: return False left_less_than = True if self.left: left_less_than = self.left.all_values_less_than(value) right_less_than = True if self.right: right_less_than = self.right.all_values_less_than(value) return left_less_than and right_less_than def all_values_geq_than(self, value): if self.value <= value: return False left_geq_than = True if self.left: left_geq_than = self.left.all_values_geq_than(value) right_geq_than = True if self.right: right_geq_than = self.right.all_values_geq_than(value) return left_geq_than and right_geq_than def is_bst(self): left_ok = True if self.left: left_ok = self.left.all_values_less_than(self.value) and self.left.is_bst() right_ok = True if self.right: right_ok = self.right.all_values_geq_than(self.value) and self.right.is_bst() return right_ok and left_ok def __repr__(self): return '({} L{} R{})'.format(self.value, self.left, self.right)
class Continuous: def __init__(self, cont): self.cont = cont self.string = "ing" vowels = "aeiou" # Get vowels res = set([each for each in cont if each in vowels]) #Convert to string res = ''.join(res) #The exceptions in English if cont[-1] == "t" and cont[-2] == res: print(cont + cont[-1] + self.string) elif cont[-2:] == "ie": print(cont.replace(cont[-2:], "y") + self.string) elif cont[-1] == "c": print(cont + "k" + self.string) elif cont[-1] and cont[-2] == "e": print(cont + self.string) elif cont[-1] == "e": print(cont.replace(cont[-1], '') + self.string) elif cont[-1] == "m": print(cont + cont[-1] + self.string) else: print(cont + self.string) class Past: def __init__(self, past): self.past = past def f(v): T,x,m='aeiou',"ed",v[-1];return[[[v+x,v+m+x][v[-2]in T and m and v[-3]not in T],[v+x,v[:-1]+"ied"][v[-2]not in T]][m=='y'],v+"d"][m=='e'] if past == "go": print("went") elif past == "get": print("got") elif past == "eat": print("ate") else: print(f(past))
class Continuous: def __init__(self, cont): self.cont = cont self.string = 'ing' vowels = 'aeiou' res = set([each for each in cont if each in vowels]) res = ''.join(res) if cont[-1] == 't' and cont[-2] == res: print(cont + cont[-1] + self.string) elif cont[-2:] == 'ie': print(cont.replace(cont[-2:], 'y') + self.string) elif cont[-1] == 'c': print(cont + 'k' + self.string) elif cont[-1] and cont[-2] == 'e': print(cont + self.string) elif cont[-1] == 'e': print(cont.replace(cont[-1], '') + self.string) elif cont[-1] == 'm': print(cont + cont[-1] + self.string) else: print(cont + self.string) class Past: def __init__(self, past): self.past = past def f(v): (t, x, m) = ('aeiou', 'ed', v[-1]) return [[[v + x, v + m + x][v[-2] in T and m and (v[-3] not in T)], [v + x, v[:-1] + 'ied'][v[-2] not in T]][m == 'y'], v + 'd'][m == 'e'] if past == 'go': print('went') elif past == 'get': print('got') elif past == 'eat': print('ate') else: print(f(past))
class Solution: def search(self, nums: 'List[int]', target: 'int') -> 'int': rotateindex = 0 n = len(nums) for i in range(n - 1): if nums[i] > nums[i + 1]: rotateindex = i + 1 break left = 0 right = n - 1 while left <= right: middle = left + (right - left) // 2 realindex = middle + rotateindex if realindex >= n: realindex -= n if nums[realindex] == target: return realindex elif nums[realindex] < target: left = middle + 1 else: right = middle - 1 return -1 if __name__ == "__main__": solution = Solution() print(solution.search(nums = [4,5,6,7,0,1,2], target = 0)) print(solution.search(nums = [4,5,6,7,0,1,2], target = 3))
class Solution: def search(self, nums: 'List[int]', target: 'int') -> 'int': rotateindex = 0 n = len(nums) for i in range(n - 1): if nums[i] > nums[i + 1]: rotateindex = i + 1 break left = 0 right = n - 1 while left <= right: middle = left + (right - left) // 2 realindex = middle + rotateindex if realindex >= n: realindex -= n if nums[realindex] == target: return realindex elif nums[realindex] < target: left = middle + 1 else: right = middle - 1 return -1 if __name__ == '__main__': solution = solution() print(solution.search(nums=[4, 5, 6, 7, 0, 1, 2], target=0)) print(solution.search(nums=[4, 5, 6, 7, 0, 1, 2], target=3))
class ZBException(Exception): pass class ZBApiException(ZBException): pass class ZBMissingApiKeyException(ZBException): pass
class Zbexception(Exception): pass class Zbapiexception(ZBException): pass class Zbmissingapikeyexception(ZBException): pass
#!/usr/bin/env python3 def has_cycle(head): curr = head seen = set() while curr: if curr in seen: return True seen.add(curr) curr = curr.next return False # Much better to understand def has_cycle(head): fast = head; while (fast != None and fast.next != None): fast = fast.next.next; head = head.next; if(head == fast): return True; return False;
def has_cycle(head): curr = head seen = set() while curr: if curr in seen: return True seen.add(curr) curr = curr.next return False def has_cycle(head): fast = head while fast != None and fast.next != None: fast = fast.next.next head = head.next if head == fast: return True return False
__author__ = 'pavelkosicin' def test_validation_check_invalid_email_short_password(app): app.validation.enter_wrong_data(username="p", password="a") app.validation.check_invalid_email_short_password_error_message()
__author__ = 'pavelkosicin' def test_validation_check_invalid_email_short_password(app): app.validation.enter_wrong_data(username='p', password='a') app.validation.check_invalid_email_short_password_error_message()
#!/usr/bin/env python __version__ = '0.9.4'
__version__ = '0.9.4'
X, Y = map(int, input().split()) flag = False for i in range(100): for j in range(100): if i+j == X and 2*i+4*j == Y: flag = True if flag: print("Yes") else: print("No")
(x, y) = map(int, input().split()) flag = False for i in range(100): for j in range(100): if i + j == X and 2 * i + 4 * j == Y: flag = True if flag: print('Yes') else: print('No')
class Solution: """ @param nums: A list of integers @return: A integer indicate the sum of max subarray """ def maxSubArray(self, nums): if len(nums) > 0: maxSum = nums[0] previousSum = nums[0] # maxSumSubArray=[] # currentArray=[nums[0]] for i in range(1, len(nums)): if previousSum + nums[i] > nums[i]: # currentArray.append(nums[i]) previousSum += nums[i] elif previousSum + nums[i] <= nums[i]: # currentArray=[nums[i]] previousSum = nums[i] if previousSum > maxSum: # maxSumSubArray=list(currentArray) maxSum = previousSum return maxSum
class Solution: """ @param nums: A list of integers @return: A integer indicate the sum of max subarray """ def max_sub_array(self, nums): if len(nums) > 0: max_sum = nums[0] previous_sum = nums[0] for i in range(1, len(nums)): if previousSum + nums[i] > nums[i]: previous_sum += nums[i] elif previousSum + nums[i] <= nums[i]: previous_sum = nums[i] if previousSum > maxSum: max_sum = previousSum return maxSum
def forceAspect(ax, aspect): """ Forces the aspect ratio of an axis onto which an image what plotted with imshow. From: https://www.science-emergence.com/Articles/How-to-change-imshow-aspect-ratio-in-matplotlib-/ """ im = ax.get_images() extent = im[0].get_extent() ax.set_aspect( abs((extent[1] - extent[0]) / (extent[3] - extent[2])) / aspect ) def make_axes_at_center(ax): """ Moves the axes splines to the center instead of the bottom left of the ax from https://stackoverflow.com/questions/31556446/how-to-draw-axis-in-the-middle-of-the-figure """ # Move left y-axis and bottim x-axis to centre, passing through (0,0) ax.spines["left"].set_position("center") ax.spines["bottom"].set_position("center") # Eliminate upper and right axes ax.spines["right"].set_color("none") ax.spines["top"].set_color("none") # Show ticks in the left and lower axes only ax.xaxis.set_ticks_position("bottom") ax.yaxis.set_ticks_position("left")
def force_aspect(ax, aspect): """ Forces the aspect ratio of an axis onto which an image what plotted with imshow. From: https://www.science-emergence.com/Articles/How-to-change-imshow-aspect-ratio-in-matplotlib-/ """ im = ax.get_images() extent = im[0].get_extent() ax.set_aspect(abs((extent[1] - extent[0]) / (extent[3] - extent[2])) / aspect) def make_axes_at_center(ax): """ Moves the axes splines to the center instead of the bottom left of the ax from https://stackoverflow.com/questions/31556446/how-to-draw-axis-in-the-middle-of-the-figure """ ax.spines['left'].set_position('center') ax.spines['bottom'].set_position('center') ax.spines['right'].set_color('none') ax.spines['top'].set_color('none') ax.xaxis.set_ticks_position('bottom') ax.yaxis.set_ticks_position('left')
# Problem Statement : Given a number A, find the smallest number that has same set of digits as A and is greater than A. # Time Complexity : O(N) def SmallestNumberSameSetOfDigitsAsA(A): A_list = list(map(int, A)) l = len(A_list) i = 0 # First we loop in the reverse order to find if there is an element greater # than any previously traversed element # If we do find one we break and continue to find the smallest number to the right of the # found number but if we don' it means the number is already in descending order # So there is no new combination to be found since it is already greater for i in range(l-1, 0, -1): if A_list[i] > A_list[i-1]: break if i == 1 and A_list[i] <= A_list[i-1]: return -1 if i == 0: return -1 # from the executed for loop we have found the index of the number #smaller to the previously traversed number to be i-1 #Now we are to find numbers on right side of i-1 and find the smallest number # to swap with the (i-1)th number pos = i # The start index for rightmost part of the string after i-1 x = A_list[i-1] for j in range(i+1, l): if A_list[j] > x and A_list[j]<A_list[pos]: pos = j # After finding the smallest element we swap it with the (i-1)th element A_list[i-1],A_list[pos] = A_list[pos], A_list[i-1] # final_A = [str(int) for int in A_list] # super_final_A = "".join(final_A) super_final_A = 0 for j in range(i): super_final_A = super_final_A* 10 + A_list[j] A_list = sorted(A_list[i:]) for j in range(l-i): super_final_A = super_final_A * 10 + A_list[j] return super_final_A A = "1234" print(SmallestNumberSameSetOfDigitsAsA(A)) # Output : 1243
def smallest_number_same_set_of_digits_as_a(A): a_list = list(map(int, A)) l = len(A_list) i = 0 for i in range(l - 1, 0, -1): if A_list[i] > A_list[i - 1]: break if i == 1 and A_list[i] <= A_list[i - 1]: return -1 if i == 0: return -1 pos = i x = A_list[i - 1] for j in range(i + 1, l): if A_list[j] > x and A_list[j] < A_list[pos]: pos = j (A_list[i - 1], A_list[pos]) = (A_list[pos], A_list[i - 1]) super_final_a = 0 for j in range(i): super_final_a = super_final_A * 10 + A_list[j] a_list = sorted(A_list[i:]) for j in range(l - i): super_final_a = super_final_A * 10 + A_list[j] return super_final_A a = '1234' print(smallest_number_same_set_of_digits_as_a(A))
def imposto_de_renda(salario): if 0 <= salario <= 2000.0: return print('Isento') elif 2000.01 <= salario <= 3000.0: imposto_sobre_salario = imposto_de_8(salario) elif 3000.01 <= salario <= 4500.0: imposto_sobre_salario = imposto_de_18(salario) elif salario > 4500.00: imposto_sobre_salario = imposto_de_28(salario) return print(f'R$ {imposto_sobre_salario:.2f}') def imposto_de_8(salario): imposto8 = (salario - 2000.0) * 0.08 return imposto8 def imposto_de_18(salario): imposto18 = (salario - 3000.0) * 0.18 + (3000.0 - 2000.0) * 0.08 return imposto18 def imposto_de_28(salario): imposto28 = (salario - 4500) * 0.28 + (4500.0 - 3000.0) * 0.18 + (3000.0 - 2000.0) * 0.08 return imposto28 renda = float(input()) imposto_de_renda(renda)
def imposto_de_renda(salario): if 0 <= salario <= 2000.0: return print('Isento') elif 2000.01 <= salario <= 3000.0: imposto_sobre_salario = imposto_de_8(salario) elif 3000.01 <= salario <= 4500.0: imposto_sobre_salario = imposto_de_18(salario) elif salario > 4500.0: imposto_sobre_salario = imposto_de_28(salario) return print(f'R$ {imposto_sobre_salario:.2f}') def imposto_de_8(salario): imposto8 = (salario - 2000.0) * 0.08 return imposto8 def imposto_de_18(salario): imposto18 = (salario - 3000.0) * 0.18 + (3000.0 - 2000.0) * 0.08 return imposto18 def imposto_de_28(salario): imposto28 = (salario - 4500) * 0.28 + (4500.0 - 3000.0) * 0.18 + (3000.0 - 2000.0) * 0.08 return imposto28 renda = float(input()) imposto_de_renda(renda)
x=[] for i in range(10): x.append(int(input())) if x[i]<=0:x[i]=1 for i in range(10):print(f"X[{i}] = {x[i]}")
x = [] for i in range(10): x.append(int(input())) if x[i] <= 0: x[i] = 1 for i in range(10): print(f'X[{i}] = {x[i]}')
class BFC: order_id = 80 menu = {} def __init__(self) -> None: self.menu = {} def addChicken(self,*args): for elm in range(0,len(args),2): BFC.menu[args[elm]] = args[elm+1] def placeOrderof(self,obj): sum1 = 0 BFC.order_id += 1 print(f"Order ID: {BFC.order_id}") print(f"Customer name:{obj.name}") print("Order:") lst = obj.order.split(",") for elm in lst: count = elm[0] count = int(count) sum1 += count*BFC.menu[elm[2::]] print(f"Burger:{elm[2::]} , Quantity:{elm[0]}") obj.money = sum1 class Customer: def __init__(self,name): self.name = name self.order = None self.money = None def setOrder(self,gg): self.order = gg def __str__(self) -> str: return(f"Bill of {self.name} is {self.money} taka") print(f"It's been a wonderful day! \nToday, we have already served {BFC.order_id} customers. Few more to go before we close for today.") print("**************************************************") outlet1 = BFC() print("1.==========================================") print("Chicken Menu:") print(BFC.menu) print("2.==========================================") outlet1.addChicken('Regular',95,'Spicy',125) print("3.==========================================") print("Chicken Menu:") print(BFC.menu) print("4.==========================================") c1 = Customer("Ariyan") c1.order = "2xRegular" outlet1.placeOrderof(c1) print("5.==========================================") c2 = Customer("Ayan") c2.setOrder("2xRegular,3xSpicy") print("6.==========================================") outlet1.placeOrderof(c2) print("7.==========================================") print(c1) print("8.==========================================") print(c2)
class Bfc: order_id = 80 menu = {} def __init__(self) -> None: self.menu = {} def add_chicken(self, *args): for elm in range(0, len(args), 2): BFC.menu[args[elm]] = args[elm + 1] def place_orderof(self, obj): sum1 = 0 BFC.order_id += 1 print(f'Order ID: {BFC.order_id}') print(f'Customer name:{obj.name}') print('Order:') lst = obj.order.split(',') for elm in lst: count = elm[0] count = int(count) sum1 += count * BFC.menu[elm[2:]] print(f'Burger:{elm[2:]} , Quantity:{elm[0]}') obj.money = sum1 class Customer: def __init__(self, name): self.name = name self.order = None self.money = None def set_order(self, gg): self.order = gg def __str__(self) -> str: return f'Bill of {self.name} is {self.money} taka' print(f"It's been a wonderful day! \nToday, we have already served {BFC.order_id} customers. Few more to go before we close for today.") print('**************************************************') outlet1 = bfc() print('1.==========================================') print('Chicken Menu:') print(BFC.menu) print('2.==========================================') outlet1.addChicken('Regular', 95, 'Spicy', 125) print('3.==========================================') print('Chicken Menu:') print(BFC.menu) print('4.==========================================') c1 = customer('Ariyan') c1.order = '2xRegular' outlet1.placeOrderof(c1) print('5.==========================================') c2 = customer('Ayan') c2.setOrder('2xRegular,3xSpicy') print('6.==========================================') outlet1.placeOrderof(c2) print('7.==========================================') print(c1) print('8.==========================================') print(c2)
# -*- coding: utf8 -*- """ Test module to be called from C++""" # from __future__ import print_function def add(a, b): """ Returns the sum of two numbers.""" a, b = int(a), int(b) c = str(a + b) print("a = {} and b = {} and a + b = {}".format(a, b, c)) return c
""" Test module to be called from C++""" def add(a, b): """ Returns the sum of two numbers.""" (a, b) = (int(a), int(b)) c = str(a + b) print('a = {} and b = {} and a + b = {}'.format(a, b, c)) return c
""" Chapter Two - Linked Lists """ # Creating a simple node class. class Node: def __init__(self, data): self.data = data self.next = None self.prev = None # Build a linked list from a list for testing. def llist_from_list(lst): if len(lst) == 0: return None n = Node(lst.pop(0)) head = n for item in lst: new_node = Node(item) n.next = new_node new_node.prev = n n = new_node return head # 2.1 # Remove duplicates from an unsorted linked list. # I'm assuming this is a singly linked list whose node data includes a single integer. # # This method has O(N) runtime when using a hash table, where N=num_nodes. # This method has a little less than O(N^2) runtime when not using an additional data structure, where N=num_nodes. def two_one(head): ''' # This version uses a hash table (dict) to store seen values. n = head found_data = {n.data:True} while n.next is not None: # O(N) loop through all nodes. # Look ahead until we find a new data value. temp_node = n.next while temp_node.data in found_data: temp_node = temp_node.next if temp_node is None: break n.next = temp_node # Leapfrog sequential duplicate node(s). found_data[n.next.data] = True # Move to next node. n = n.next if n is None: break return head''' # This version does not use an additional data structure. n_1 = head while n_1 is not None: # O(N) loop. n_2 = n_1 while n_2 is not None: # O(N) loop. if n_2.next is None: break while n_2.next.data == n_1.data: # Leapfrog duplicate nodes. n_2.next = n_2.next.next n_2 = n_2.next n_1 = n_1.next return head # 2.2 # Find the kth to last element in a linked list. # I'm assuming this is for a singly linked list, else it wouldn't be as hard. # # This method has O(N) runtime, where N=num_nodes. def two_two(head, k): if k == 0: return None n = head return_node = head counter = 0 while n is not None: # O(N) loop. if counter == k: return_node = return_node.next else: counter += 1 n = n.next return return_node # 2.3 # Delete a node in the middle of a singly linked list, given access to only that node. # # This method has O(1) runtime. def two_three(node): node.data = node.next.data node.next = node.next.next # 2.4 # Partition a linked list around a value X such that all nodes # less than X come before nodes greater than or equal to X. # Neither partition needs to be sorted, and nodes equaling X # do not need to be between the partitions. # # This method has O(N) runtime, where N=num_nodes. def two_four(head, X): n = head less_head = None less_n = None greater_head = None greater_n = None while n is not None: # O(N) loop. if n.data < X: if less_head is None: less_head = n less_n = n else: less_n.next = n less_n = n else: if greater_head is None: greater_head = n greater_n = n else: greater_n.next = n greater_n = n if n.next is None: break n = n.next less_n.next = greater_head # Connect the two lists. greater_n.next = None # Set last node to None. return less_head # 2.5 # Given two linked lists, suppose the data in each represents a number with the nodes # representing the number in reverse order. Return a new linked list that has the # sum of these numbers, also in reverse order. # # This method has O(N) runtime, where N=num_nodes in the larger linked list. def two_five(ll_1, ll_2): # To implement in the opposite order (the book's follow up), we would # get the lengths of the lists, then pad the shorter list with zeros in the front. # Other logic would be the same, except for the carryover digit, which would need # to go to the previous node instead of the next node. # This would also have O(N) runtime. n_1 = ll_1 n_2 = ll_2 return_ll = Node(0) n_return = return_ll while not (n_1 is None and n_2 is None): # O(N) loop, where N is the number of nodes in the larger list. # Sum the data. digit_sum = 0 if n_1 is not None: digit_sum += n_1.data n_1 = n_1.next if n_2 is not None: digit_sum += n_2.data n_2 = n_2.next # Add the new node. if n_return.next is not None: digit_sum += n_return.next.data n_return.next = Node(digit_sum % 10) # If value is more than one digit, create next node. if digit_sum > 9: n_return.next.next = Node(digit_sum // 10) n_return = n_return.next return return_ll.next # 2.6 # Check if a linked list is a palindrome. # I'm assuming this is for a singly linked list, else it wouldn't be as hard. # # This method has O(N) runtime, where N=num_nodes. def two_six(head): n_1 = head stack = [] while n_1 is not None: # O(N) loop. stack.append(n_1.data) n_1 = n_1.next n_2 = Node(stack.pop()) # O(1) operation. n_2_head = n_2 while len(stack) != 0: # O(N) loop. n_2.next = Node(stack.pop()) # O(1) operation. n_2 = n_2.next n_2.next = None n_1 = head n_2 = n_2_head while n_1 is not None: # O(N) loop. if n_1.data != n_2.data: return False n_1 = n_1.next n_2 = n_2.next return True # 2.7 # Determine if two singly linked lists intersect, and if so return the intersection node. # Intersection is defined by entire node, not value. # # This method has O(N+M) runtime, where N=num nodes in ll_1 and M=num nodes in ll_2. def two_seven(ll_1, ll_2): n_1 = ll_1 n_1_length = 0 while n_1 is not None: # O(N) loop, where N=num nodes in ll_1. if n_1.next is not None: n_1 = n_1.next n_1_length += 1 else: break n_2 = ll_2 n_2_length = 0 while n_2 is not None: # O(M) loop, where M=num nodes in ll_2. if n_2.next is not None: n_2 = n_2.next n_2_length += 1 else: break # Check if the lists are linked by last node. if n_1 is not n_2: return None # Get len_diff = abs(n_1_length - n_2_length) if n_1_length >= n_2_length: n_1 = ll_1 n_2 = ll_2 else: n_1 = ll_2 n_2 = ll_1 # Advance the larger list by len_diff. for i in range(len_diff): n_1 = n_1.next # Check node by node until we find the match. while n_1 is not None: if n_1 == n_2: return n_1 else: n_1 = n_1.next n_2 = n_2.next # 2.8 # Determine if a linked list has a loop, and if so return the node at the start of the loop. # # This method has O(N) runtime, where N=num nodes in ll. def two_eight(ll): n_1 = ll n_2 = ll while n_1 is not None and n_2 is not None: # O(N) loop. n_1 = n_1.next.next n_2 = n_2.next if n_1 == n_2: break if n_1 is None: return None n_1 = ll while n_1 is not n_2: # O(N) loop (max). n_1 = n_1.next n_2 = n_2.next return n_1
""" Chapter Two - Linked Lists """ class Node: def __init__(self, data): self.data = data self.next = None self.prev = None def llist_from_list(lst): if len(lst) == 0: return None n = node(lst.pop(0)) head = n for item in lst: new_node = node(item) n.next = new_node new_node.prev = n n = new_node return head def two_one(head): """ # This version uses a hash table (dict) to store seen values. n = head found_data = {n.data:True} while n.next is not None: # O(N) loop through all nodes. # Look ahead until we find a new data value. temp_node = n.next while temp_node.data in found_data: temp_node = temp_node.next if temp_node is None: break n.next = temp_node # Leapfrog sequential duplicate node(s). found_data[n.next.data] = True # Move to next node. n = n.next if n is None: break return head""" n_1 = head while n_1 is not None: n_2 = n_1 while n_2 is not None: if n_2.next is None: break while n_2.next.data == n_1.data: n_2.next = n_2.next.next n_2 = n_2.next n_1 = n_1.next return head def two_two(head, k): if k == 0: return None n = head return_node = head counter = 0 while n is not None: if counter == k: return_node = return_node.next else: counter += 1 n = n.next return return_node def two_three(node): node.data = node.next.data node.next = node.next.next def two_four(head, X): n = head less_head = None less_n = None greater_head = None greater_n = None while n is not None: if n.data < X: if less_head is None: less_head = n less_n = n else: less_n.next = n less_n = n elif greater_head is None: greater_head = n greater_n = n else: greater_n.next = n greater_n = n if n.next is None: break n = n.next less_n.next = greater_head greater_n.next = None return less_head def two_five(ll_1, ll_2): n_1 = ll_1 n_2 = ll_2 return_ll = node(0) n_return = return_ll while not (n_1 is None and n_2 is None): digit_sum = 0 if n_1 is not None: digit_sum += n_1.data n_1 = n_1.next if n_2 is not None: digit_sum += n_2.data n_2 = n_2.next if n_return.next is not None: digit_sum += n_return.next.data n_return.next = node(digit_sum % 10) if digit_sum > 9: n_return.next.next = node(digit_sum // 10) n_return = n_return.next return return_ll.next def two_six(head): n_1 = head stack = [] while n_1 is not None: stack.append(n_1.data) n_1 = n_1.next n_2 = node(stack.pop()) n_2_head = n_2 while len(stack) != 0: n_2.next = node(stack.pop()) n_2 = n_2.next n_2.next = None n_1 = head n_2 = n_2_head while n_1 is not None: if n_1.data != n_2.data: return False n_1 = n_1.next n_2 = n_2.next return True def two_seven(ll_1, ll_2): n_1 = ll_1 n_1_length = 0 while n_1 is not None: if n_1.next is not None: n_1 = n_1.next n_1_length += 1 else: break n_2 = ll_2 n_2_length = 0 while n_2 is not None: if n_2.next is not None: n_2 = n_2.next n_2_length += 1 else: break if n_1 is not n_2: return None len_diff = abs(n_1_length - n_2_length) if n_1_length >= n_2_length: n_1 = ll_1 n_2 = ll_2 else: n_1 = ll_2 n_2 = ll_1 for i in range(len_diff): n_1 = n_1.next while n_1 is not None: if n_1 == n_2: return n_1 else: n_1 = n_1.next n_2 = n_2.next def two_eight(ll): n_1 = ll n_2 = ll while n_1 is not None and n_2 is not None: n_1 = n_1.next.next n_2 = n_2.next if n_1 == n_2: break if n_1 is None: return None n_1 = ll while n_1 is not n_2: n_1 = n_1.next n_2 = n_2.next return n_1
# Time O(n) # Space O(n) # More time efficient and applicable for both Sorted and Unsorted Linked List def removeDuplicates(ListNode): if ListNode.head is None: return None current = ListNode.head visited_nodes = set([current.value]) while current.next: if current.next.value in visited_nodes: current.next = current.next.next else: visited_nodes.add(current.value) current = current.next return ListNode.head # Time O(n^2) # Space O(1) # More space efficient and only for Sorted Linked List def removeDuplicates2(ListNode): if ListNode.head is None: return None current = ListNode.head while current: runner = current while runner.next: if current.value == runner.next.value: runner.next = runner.next.next else: runner = runner.next current = current.next return ListNode.head
def remove_duplicates(ListNode): if ListNode.head is None: return None current = ListNode.head visited_nodes = set([current.value]) while current.next: if current.next.value in visited_nodes: current.next = current.next.next else: visited_nodes.add(current.value) current = current.next return ListNode.head def remove_duplicates2(ListNode): if ListNode.head is None: return None current = ListNode.head while current: runner = current while runner.next: if current.value == runner.next.value: runner.next = runner.next.next else: runner = runner.next current = current.next return ListNode.head
dest = [0x21, 0x58, 0x33, 0x57, 0x24, 0x2c, 0x66, 0x25, 0x45, 0x53, 0x34, 0x28, 0x08, 0x61, 0x11, 0x07, 0x14, 0x3d, 0x07, 0x62, 0x13, 0x72, 0x02, 0x4c] flag = "" random = 2019 for i in range(24): random = (random * 23333 + 19260817) % 127 flag += chr(random ^ dest[i]) print(flag)
dest = [33, 88, 51, 87, 36, 44, 102, 37, 69, 83, 52, 40, 8, 97, 17, 7, 20, 61, 7, 98, 19, 114, 2, 76] flag = '' random = 2019 for i in range(24): random = (random * 23333 + 19260817) % 127 flag += chr(random ^ dest[i]) print(flag)
""" Sedan type with 2 sub-types: -Luxury sedan -Sport sedan """ class SedanCar: w_type = 'car' w_meaning = '4+1 doors and a separate trunk' def __init__(self, traction, gen, color, custom): self._traction = traction self._gen = gen self._color = color self._custom = custom def body_type(self): if self._traction == 'Rear traction': print('Your car is a sport oriented one!') if self._color == 'Custom': print('Option not available for Street package!') else: print('Option is available!') elif self._traction == '4x4 traction': print('Your engine will be upgraded to 400 HP!') if self._color == 'Custom': print('Option is available and it will cost 1500$ extra-charge!') else: print('Option is available!') else: print('You didn\'t chose a traction type!') def generation(self): if self._gen == 'Last gen' and self._custom == 'Custom body-kit': print('Your option is available and you have to chose your custom kit!') elif self._gen == '2021' and self._custom == 'Custom body-kit': print('You have to wait extra months for the car to be made!') else: print('Older generation are not available at this moment!') self.body_type() print(f'Your {SedanCar.w_type} is a {SedanCar.w_meaning} with extra options!') class LuxurySedan(SedanCar): def auto_park(self): if self._gen == 'Last gen': print('You have the free option to upgrade to Auto-Parking!') pass def vip_package(self): if self._traction == '4x4 traction': print('Your car has been upgraded to free pair of wheels!') else: print('Your car has Michellin wheels') self.auto_park() class SportSedan(SedanCar): def self_driving(self): if self._gen == 'Last gen': print('Your car will be upgraded to Self Autonomus driving!') pass def sport_plus(self): if self._traction == '4x4 traction': print('Your car will have a front engine!') else: print('Your car will have a rear positioned engine!') sedan_car = SedanCar('4x4 traction', 'Last gen', 'Custom', 'Custom body-kit') sedan_car.generation() lux_car = LuxurySedan('4x4 traction', '2021', 'Black', 'Custom body-kit') lux_car.vip_package() sport_car = SportSedan('Rear traction', '2021', 'Custom', 'Custom body-kit') sport_car.generation() sport_car.sport_plus()
""" Sedan type with 2 sub-types: -Luxury sedan -Sport sedan """ class Sedancar: w_type = 'car' w_meaning = '4+1 doors and a separate trunk' def __init__(self, traction, gen, color, custom): self._traction = traction self._gen = gen self._color = color self._custom = custom def body_type(self): if self._traction == 'Rear traction': print('Your car is a sport oriented one!') if self._color == 'Custom': print('Option not available for Street package!') else: print('Option is available!') elif self._traction == '4x4 traction': print('Your engine will be upgraded to 400 HP!') if self._color == 'Custom': print('Option is available and it will cost 1500$ extra-charge!') else: print('Option is available!') else: print("You didn't chose a traction type!") def generation(self): if self._gen == 'Last gen' and self._custom == 'Custom body-kit': print('Your option is available and you have to chose your custom kit!') elif self._gen == '2021' and self._custom == 'Custom body-kit': print('You have to wait extra months for the car to be made!') else: print('Older generation are not available at this moment!') self.body_type() print(f'Your {SedanCar.w_type} is a {SedanCar.w_meaning} with extra options!') class Luxurysedan(SedanCar): def auto_park(self): if self._gen == 'Last gen': print('You have the free option to upgrade to Auto-Parking!') pass def vip_package(self): if self._traction == '4x4 traction': print('Your car has been upgraded to free pair of wheels!') else: print('Your car has Michellin wheels') self.auto_park() class Sportsedan(SedanCar): def self_driving(self): if self._gen == 'Last gen': print('Your car will be upgraded to Self Autonomus driving!') pass def sport_plus(self): if self._traction == '4x4 traction': print('Your car will have a front engine!') else: print('Your car will have a rear positioned engine!') sedan_car = sedan_car('4x4 traction', 'Last gen', 'Custom', 'Custom body-kit') sedan_car.generation() lux_car = luxury_sedan('4x4 traction', '2021', 'Black', 'Custom body-kit') lux_car.vip_package() sport_car = sport_sedan('Rear traction', '2021', 'Custom', 'Custom body-kit') sport_car.generation() sport_car.sport_plus()
""" Doctests: >>> 1 == 1 True """
""" Doctests: >>> 1 == 1 True """
# File Not Found Error try: file = open("a_text.txt") # a_dictionary = { # "key" : "value" # } # print(a_dictionary["aehdg"]) except FileNotFoundError: file = open("a_text.txt", "w") file.write("Write Something") except KeyError as error_message: print(f"The key {error_message} does not exist.") else: content = file.read() print(content) finally: raise TypeError("This is an error I made up!") # Your custom exceptions height = float(input("Height: ")) weight = float(input("Weight: ")) if height > 3: raise ValueError("Human heights should not be over 3 meters") bmi = weight / height ** 2 print(bmi)
try: file = open('a_text.txt') except FileNotFoundError: file = open('a_text.txt', 'w') file.write('Write Something') except KeyError as error_message: print(f'The key {error_message} does not exist.') else: content = file.read() print(content) finally: raise type_error('This is an error I made up!') height = float(input('Height: ')) weight = float(input('Weight: ')) if height > 3: raise value_error('Human heights should not be over 3 meters') bmi = weight / height ** 2 print(bmi)
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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. # # Const Class # this is a auto generated file generated by Cheetah # Libre Office Version: 7.3 # Namespace: com.sun.star.ui.dialogs class TemplateDescription(object): """ Const Class The implementation of a FilePicker service may support the usage of different templates. The following constants define the currently specified templates. **since** LibreOffice 5.3 See Also: `API TemplateDescription <https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star_1_1ui_1_1dialogs_1_1TemplateDescription.html>`_ """ __ooo_ns__: str = 'com.sun.star.ui.dialogs' __ooo_full_ns__: str = 'com.sun.star.ui.dialogs.TemplateDescription' __ooo_type_name__: str = 'const' FILEOPEN_SIMPLE = 0 """ A FileOpen dialog without any additional controls. """ FILESAVE_SIMPLE = 1 """ A FileSave dialog without any additional controls. """ FILESAVE_AUTOEXTENSION_PASSWORD = 2 """ A FileSave dialog with additional controls. """ FILESAVE_AUTOEXTENSION_PASSWORD_FILTEROPTIONS = 3 """ A FileSave dialog with additional controls. """ FILESAVE_AUTOEXTENSION_SELECTION = 4 """ A FileSave dialog with additional controls. """ FILESAVE_AUTOEXTENSION_TEMPLATE = 5 """ A FileSave dialog with additional controls. """ FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE = 6 """ A FileOpen dialog with additional controls. """ FILEOPEN_PLAY = 7 """ A FileOpen dialog with additional controls. """ FILEOPEN_READONLY_VERSION = 8 """ A FileOpen dialog with additional controls. """ FILEOPEN_LINK_PREVIEW = 9 """ A FileOpen dialog with additional controls. """ FILESAVE_AUTOEXTENSION = 10 """ A FileSave dialog with additional controls. """ FILEOPEN_PREVIEW = 11 """ A FileOpen dialog with additional controls. **since** LibreOffice 5.3 """ FILEOPEN_LINK_PLAY = 12 """ A FileOpen dialog with additional controls. **since** LibreOffice 5.3 """ FILEOPEN_LINK_PREVIEW_IMAGE_ANCHOR = 13 """ A FileOpen dialog with additional controls. **since** LibreOffice 6.1 """ __all__ = ['TemplateDescription']
class Templatedescription(object): """ Const Class The implementation of a FilePicker service may support the usage of different templates. The following constants define the currently specified templates. **since** LibreOffice 5.3 See Also: `API TemplateDescription <https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star_1_1ui_1_1dialogs_1_1TemplateDescription.html>`_ """ __ooo_ns__: str = 'com.sun.star.ui.dialogs' __ooo_full_ns__: str = 'com.sun.star.ui.dialogs.TemplateDescription' __ooo_type_name__: str = 'const' fileopen_simple = 0 '\n A FileOpen dialog without any additional controls.\n ' filesave_simple = 1 '\n A FileSave dialog without any additional controls.\n ' filesave_autoextension_password = 2 '\n A FileSave dialog with additional controls.\n ' filesave_autoextension_password_filteroptions = 3 '\n A FileSave dialog with additional controls.\n ' filesave_autoextension_selection = 4 '\n A FileSave dialog with additional controls.\n ' filesave_autoextension_template = 5 '\n A FileSave dialog with additional controls.\n ' fileopen_link_preview_image_template = 6 '\n A FileOpen dialog with additional controls.\n ' fileopen_play = 7 '\n A FileOpen dialog with additional controls.\n ' fileopen_readonly_version = 8 '\n A FileOpen dialog with additional controls.\n ' fileopen_link_preview = 9 '\n A FileOpen dialog with additional controls.\n ' filesave_autoextension = 10 '\n A FileSave dialog with additional controls.\n ' fileopen_preview = 11 '\n A FileOpen dialog with additional controls.\n \n **since**\n \n LibreOffice 5.3\n ' fileopen_link_play = 12 '\n A FileOpen dialog with additional controls.\n \n **since**\n \n LibreOffice 5.3\n ' fileopen_link_preview_image_anchor = 13 '\n A FileOpen dialog with additional controls.\n \n **since**\n \n LibreOffice 6.1\n ' __all__ = ['TemplateDescription']
# __ __ __ __ __ __ __ __ __ __ __ __ ___ # |_ / \|\/|/ \ | \|__)|\ /|_ |\ | | \|_ \ /|_ | / \|__)|\/||_ |\ | | # | \__/| |\__/ |__/| \ | \/ |__| \| |__/|__ \/ |__|__\__/| | ||__| \| | # VERSION = (0, 0, 1) __version__ = '.'.join(map(str, VERSION)) #print(__version__)
version = (0, 0, 1) __version__ = '.'.join(map(str, VERSION))
def fib(n): if n==1 or n == 2: return 1 else: return fib(n-1)+fib(n-2)
def fib(n): if n == 1 or n == 2: return 1 else: return fib(n - 1) + fib(n - 2)
n= int(input("Enter the number : ")) sum = 0 temp = n while (n): i = 1 fact = 1 rem = int(n % 10) while(i <= rem): fact = fact * i i = i + 1 sum = sum + fact n = int(n / 10) if(sum == temp): print(temp,end = "") print(" is a strong number") else: print(temp,end = "") print(" is not a strong number")
n = int(input('Enter the number : ')) sum = 0 temp = n while n: i = 1 fact = 1 rem = int(n % 10) while i <= rem: fact = fact * i i = i + 1 sum = sum + fact n = int(n / 10) if sum == temp: print(temp, end='') print(' is a strong number') else: print(temp, end='') print(' is not a strong number')
def InsertionSubSort(L, k): n = len(L) for i in range(k, n): current = L[i] position = i-k while position >= 0 and current < L[position]: print("omar") L[position + k] = L[position] position -= k L[position + k] = current def ShellSort(L,k): m = len(k) for i in range(m): InsertionSubSort(L,k[i])
def insertion_sub_sort(L, k): n = len(L) for i in range(k, n): current = L[i] position = i - k while position >= 0 and current < L[position]: print('omar') L[position + k] = L[position] position -= k L[position + k] = current def shell_sort(L, k): m = len(k) for i in range(m): insertion_sub_sort(L, k[i])
n = int(input()) a = [int(i) for i in input().split()] a.sort() res = 10001 for i in range(1, n): tmp = a[i] - a[i-1] if tmp < res: res = tmp print(res)
n = int(input()) a = [int(i) for i in input().split()] a.sort() res = 10001 for i in range(1, n): tmp = a[i] - a[i - 1] if tmp < res: res = tmp print(res)
# collatz conjecture revision # the number we perform the collatz operations on n = 25 # keep looping until we reach 1 while n != 1: print(n) # print the current value of n if n % 2 == 0: # checks if n is even n = n / 2 # if so divide by 2, single / gives decimals, double // gives a whole number or integer else: # if n is odd multiply by 3 and add 1 n = (3 * n) + 1 # finally print the final value of n whch is always 1 print (n)
n = 25 while n != 1: print(n) if n % 2 == 0: n = n / 2 else: n = 3 * n + 1 print(n)
# Copyright (c) 2019-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # def f_gold ( arr , n , k ) : count = 0 arr.sort ( ) l = 0 r = 0 while r < n : if arr [ r ] - arr [ l ] == k : count += 1 l += 1 r += 1 elif arr [ r ] - arr [ l ] > k : l += 1 else : r += 1 return count #TOFILL if __name__ == '__main__': param = [ ([5, 5, 10, 19, 29, 32, 40, 60, 65, 70, 72, 89, 92],7,12,), ([-38, 40, 8, 64, -38, 56, 4, 8, 84, 60, -48, -78, -82, -88, -30, 58, -58, 62, -52, -98, 24, 22, 14, 68, -74, 48, -56, -72, -90, 26, -10, 58, 40, 36, -80, 68, 58, -74, -46, -62, -12, 74, -58],24,36,), ([0, 0, 1],1,1,), ([16, 80, 59, 29, 14, 44, 13, 76, 7, 65, 62, 1, 34, 49, 70, 96, 73, 71, 42, 73, 66, 96],12,16,), ([-98, -88, -58, -56, -48, -34, -22, -18, -14, -14, -8, -4, -2, 2, 18, 38, 42, 46, 54, 68, 70, 90, 94, 96, 98],23,22,), ([0, 1, 1],2,1,), ([11, 43, 50, 58, 60, 68, 75],4,4,), ([86, 94, -80, 0, 52, -56, 42, 88, -10, 24, 6, 8],11,9,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],29,30,), ([54, 99, 4, 14, 9, 34, 81, 36, 80, 50, 34, 9, 7],9,8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
def f_gold(arr, n, k): count = 0 arr.sort() l = 0 r = 0 while r < n: if arr[r] - arr[l] == k: count += 1 l += 1 r += 1 elif arr[r] - arr[l] > k: l += 1 else: r += 1 return count if __name__ == '__main__': param = [([5, 5, 10, 19, 29, 32, 40, 60, 65, 70, 72, 89, 92], 7, 12), ([-38, 40, 8, 64, -38, 56, 4, 8, 84, 60, -48, -78, -82, -88, -30, 58, -58, 62, -52, -98, 24, 22, 14, 68, -74, 48, -56, -72, -90, 26, -10, 58, 40, 36, -80, 68, 58, -74, -46, -62, -12, 74, -58], 24, 36), ([0, 0, 1], 1, 1), ([16, 80, 59, 29, 14, 44, 13, 76, 7, 65, 62, 1, 34, 49, 70, 96, 73, 71, 42, 73, 66, 96], 12, 16), ([-98, -88, -58, -56, -48, -34, -22, -18, -14, -14, -8, -4, -2, 2, 18, 38, 42, 46, 54, 68, 70, 90, 94, 96, 98], 23, 22), ([0, 1, 1], 2, 1), ([11, 43, 50, 58, 60, 68, 75], 4, 4), ([86, 94, -80, 0, 52, -56, 42, 88, -10, 24, 6, 8], 11, 9), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 29, 30), ([54, 99, 4, 14, 9, 34, 81, 36, 80, 50, 34, 9, 7], 9, 8)] n_success = 0 for (i, parameters_set) in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print('#Results: %i, %i' % (n_success, len(param)))
# Copyright (c) 2020 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 read_txt_lines(file_list): """ return [(file_path, line_no)...] """ line_no = -1 ret = [] with open(file_list, "r") as f: for line in f: line = line.strip() if len(line) <= 0: continue line_no += 1 ret.append((line, line_no)) return ret
def read_txt_lines(file_list): """ return [(file_path, line_no)...] """ line_no = -1 ret = [] with open(file_list, 'r') as f: for line in f: line = line.strip() if len(line) <= 0: continue line_no += 1 ret.append((line, line_no)) return ret
# encoding: utf-8 # module Rhino.FileIO calls itself FileIO # from Rhino3dmIO,Version=5.1.30000.14,Culture=neutral,PublicKeyToken=null # by generator 1.145 # no doc # no imports # no functions # classes class BinaryArchiveException(IOException,ISerializable,_Exception): """ BinaryArchiveException(message: str) """ def add_SerializeObjectState(self,*args): """ add_SerializeObjectState(self: Exception,value: EventHandler[SafeSerializationEventArgs]) """ pass def remove_SerializeObjectState(self,*args): """ remove_SerializeObjectState(self: Exception,value: EventHandler[SafeSerializationEventArgs]) """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass @staticmethod def __new__(self,message): """ __new__(cls: type,message: str) """ pass def __str__(self,*args): pass class BinaryArchiveFile(object,IDisposable): """ BinaryArchiveFile(filename: str,mode: BinaryArchiveMode) """ def Close(self): """ Close(self: BinaryArchiveFile) """ pass def Dispose(self): """ Dispose(self: BinaryArchiveFile) """ pass def Open(self): """ Open(self: BinaryArchiveFile) -> bool """ pass def __enter__(self,*args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self,*args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass @staticmethod def __new__(self,filename,mode): """ __new__(cls: type,filename: str,mode: BinaryArchiveMode) """ pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass Reader=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Reader(self: BinaryArchiveFile) -> BinaryArchiveReader """ Writer=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Writer(self: BinaryArchiveFile) -> BinaryArchiveWriter """ class BinaryArchiveMode(Enum,IComparable,IFormattable,IConvertible): """ enum BinaryArchiveMode,values: Read (1),Read3dm (5),ReadWrite (3),Unknown (0),Write (2),Write3dm (6) """ def __eq__(self,*args): """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self,*args): """ __format__(formattable: IFormattable,format: str) -> str """ pass def __ge__(self,*args): pass def __gt__(self,*args): pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self,*args): pass def __lt__(self,*args): pass def __ne__(self,*args): pass def __reduce_ex__(self,*args): pass def __str__(self,*args): pass Read=None Read3dm=None ReadWrite=None Unknown=None value__=None Write=None Write3dm=None class BinaryArchiveReader(object): # no doc def AtEnd(self): """ AtEnd(self: BinaryArchiveReader) -> bool """ pass def Dump3dmChunk(self,log): """ Dump3dmChunk(self: BinaryArchiveReader,log: TextLog) -> UInt32 """ pass def Read3dmChunkVersion(self,major,minor): """ Read3dmChunkVersion(self: BinaryArchiveReader) -> (int,int) """ pass def Read3dmStartSection(self,version,comment): """ Read3dmStartSection(self: BinaryArchiveReader) -> (bool,int,str) """ pass def ReadBool(self): """ ReadBool(self: BinaryArchiveReader) -> bool """ pass def ReadBoolArray(self): """ ReadBoolArray(self: BinaryArchiveReader) -> Array[bool] """ pass def ReadBoundingBox(self): """ ReadBoundingBox(self: BinaryArchiveReader) -> BoundingBox """ pass def ReadByte(self): """ ReadByte(self: BinaryArchiveReader) -> Byte """ pass def ReadByteArray(self): """ ReadByteArray(self: BinaryArchiveReader) -> Array[Byte] """ pass def ReadColor(self): """ ReadColor(self: BinaryArchiveReader) -> Color """ pass def ReadCompressedBuffer(self): """ ReadCompressedBuffer(self: BinaryArchiveReader) -> Array[Byte] """ pass def ReadDictionary(self): """ ReadDictionary(self: BinaryArchiveReader) -> ArchivableDictionary """ pass def ReadDouble(self): """ ReadDouble(self: BinaryArchiveReader) -> float """ pass def ReadDoubleArray(self): """ ReadDoubleArray(self: BinaryArchiveReader) -> Array[float] """ pass def ReadFont(self): """ ReadFont(self: BinaryArchiveReader) -> Font """ pass def ReadGeometry(self): """ ReadGeometry(self: BinaryArchiveReader) -> GeometryBase """ pass def ReadGuid(self): """ ReadGuid(self: BinaryArchiveReader) -> Guid """ pass def ReadGuidArray(self): """ ReadGuidArray(self: BinaryArchiveReader) -> Array[Guid] """ pass def ReadInt(self): """ ReadInt(self: BinaryArchiveReader) -> int """ pass def ReadInt64(self): """ ReadInt64(self: BinaryArchiveReader) -> Int64 """ pass def ReadIntArray(self): """ ReadIntArray(self: BinaryArchiveReader) -> Array[int] """ pass def ReadInterval(self): """ ReadInterval(self: BinaryArchiveReader) -> Interval """ pass def ReadLine(self): """ ReadLine(self: BinaryArchiveReader) -> Line """ pass def ReadMeshingParameters(self): """ ReadMeshingParameters(self: BinaryArchiveReader) -> MeshingParameters """ pass def ReadPlane(self): """ ReadPlane(self: BinaryArchiveReader) -> Plane """ pass def ReadPoint(self): """ ReadPoint(self: BinaryArchiveReader) -> Point """ pass def ReadPoint2d(self): """ ReadPoint2d(self: BinaryArchiveReader) -> Point2d """ pass def ReadPoint3d(self): """ ReadPoint3d(self: BinaryArchiveReader) -> Point3d """ pass def ReadPoint3f(self): """ ReadPoint3f(self: BinaryArchiveReader) -> Point3f """ pass def ReadPoint4d(self): """ ReadPoint4d(self: BinaryArchiveReader) -> Point4d """ pass def ReadPointF(self): """ ReadPointF(self: BinaryArchiveReader) -> PointF """ pass def ReadRay3d(self): """ ReadRay3d(self: BinaryArchiveReader) -> Ray3d """ pass def ReadRectangle(self): """ ReadRectangle(self: BinaryArchiveReader) -> Rectangle """ pass def ReadRectangleF(self): """ ReadRectangleF(self: BinaryArchiveReader) -> RectangleF """ pass def ReadSByte(self): """ ReadSByte(self: BinaryArchiveReader) -> SByte """ pass def ReadSByteArray(self): """ ReadSByteArray(self: BinaryArchiveReader) -> Array[SByte] """ pass def ReadShort(self): """ ReadShort(self: BinaryArchiveReader) -> Int16 """ pass def ReadShortArray(self): """ ReadShortArray(self: BinaryArchiveReader) -> Array[Int16] """ pass def ReadSingle(self): """ ReadSingle(self: BinaryArchiveReader) -> Single """ pass def ReadSingleArray(self): """ ReadSingleArray(self: BinaryArchiveReader) -> Array[Single] """ pass def ReadSize(self): """ ReadSize(self: BinaryArchiveReader) -> Size """ pass def ReadSizeF(self): """ ReadSizeF(self: BinaryArchiveReader) -> SizeF """ pass def ReadString(self): """ ReadString(self: BinaryArchiveReader) -> str """ pass def ReadStringArray(self): """ ReadStringArray(self: BinaryArchiveReader) -> Array[str] """ pass def ReadTransform(self): """ ReadTransform(self: BinaryArchiveReader) -> Transform """ pass def ReadUInt(self): """ ReadUInt(self: BinaryArchiveReader) -> UInt32 """ pass def ReadUShort(self): """ ReadUShort(self: BinaryArchiveReader) -> UInt16 """ pass def ReadVector2d(self): """ ReadVector2d(self: BinaryArchiveReader) -> Vector2d """ pass def ReadVector3d(self): """ ReadVector3d(self: BinaryArchiveReader) -> Vector3d """ pass def ReadVector3f(self): """ ReadVector3f(self: BinaryArchiveReader) -> Vector3f """ pass Archive3dmVersion=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Archive3dmVersion(self: BinaryArchiveReader) -> int """ ReadErrorOccured=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: ReadErrorOccured(self: BinaryArchiveReader) -> bool Set: ReadErrorOccured(self: BinaryArchiveReader)=value """ class BinaryArchiveWriter(object): # no doc def Write3dmChunkVersion(self,major,minor): """ Write3dmChunkVersion(self: BinaryArchiveWriter,major: int,minor: int) """ pass def WriteBool(self,value): """ WriteBool(self: BinaryArchiveWriter,value: bool) """ pass def WriteBoolArray(self,value): """ WriteBoolArray(self: BinaryArchiveWriter,value: IEnumerable[bool]) """ pass def WriteBoundingBox(self,value): """ WriteBoundingBox(self: BinaryArchiveWriter,value: BoundingBox) """ pass def WriteByte(self,value): """ WriteByte(self: BinaryArchiveWriter,value: Byte) """ pass def WriteByteArray(self,value): """ WriteByteArray(self: BinaryArchiveWriter,value: IEnumerable[Byte]) """ pass def WriteColor(self,value): """ WriteColor(self: BinaryArchiveWriter,value: Color) """ pass def WriteCompressedBuffer(self,value): """ WriteCompressedBuffer(self: BinaryArchiveWriter,value: IEnumerable[Byte]) """ pass def WriteDictionary(self,dictionary): """ WriteDictionary(self: BinaryArchiveWriter,dictionary: ArchivableDictionary) """ pass def WriteDouble(self,value): """ WriteDouble(self: BinaryArchiveWriter,value: float) """ pass def WriteDoubleArray(self,value): """ WriteDoubleArray(self: BinaryArchiveWriter,value: IEnumerable[float]) """ pass def WriteFont(self,value): """ WriteFont(self: BinaryArchiveWriter,value: Font) """ pass def WriteGeometry(self,value): """ WriteGeometry(self: BinaryArchiveWriter,value: GeometryBase) """ pass def WriteGuid(self,value): """ WriteGuid(self: BinaryArchiveWriter,value: Guid) """ pass def WriteGuidArray(self,value): """ WriteGuidArray(self: BinaryArchiveWriter,value: IEnumerable[Guid]) """ pass def WriteInt(self,value): """ WriteInt(self: BinaryArchiveWriter,value: int) """ pass def WriteInt64(self,value): """ WriteInt64(self: BinaryArchiveWriter,value: Int64) """ pass def WriteIntArray(self,value): """ WriteIntArray(self: BinaryArchiveWriter,value: IEnumerable[int]) """ pass def WriteInterval(self,value): """ WriteInterval(self: BinaryArchiveWriter,value: Interval) """ pass def WriteLine(self,value): """ WriteLine(self: BinaryArchiveWriter,value: Line) """ pass def WriteMeshingParameters(self,value): """ WriteMeshingParameters(self: BinaryArchiveWriter,value: MeshingParameters) """ pass def WritePlane(self,value): """ WritePlane(self: BinaryArchiveWriter,value: Plane) """ pass def WritePoint(self,value): """ WritePoint(self: BinaryArchiveWriter,value: Point) """ pass def WritePoint2d(self,value): """ WritePoint2d(self: BinaryArchiveWriter,value: Point2d) """ pass def WritePoint3d(self,value): """ WritePoint3d(self: BinaryArchiveWriter,value: Point3d) """ pass def WritePoint3f(self,value): """ WritePoint3f(self: BinaryArchiveWriter,value: Point3f) """ pass def WritePoint4d(self,value): """ WritePoint4d(self: BinaryArchiveWriter,value: Point4d) """ pass def WritePointF(self,value): """ WritePointF(self: BinaryArchiveWriter,value: PointF) """ pass def WriteRay3d(self,value): """ WriteRay3d(self: BinaryArchiveWriter,value: Ray3d) """ pass def WriteRectangle(self,value): """ WriteRectangle(self: BinaryArchiveWriter,value: Rectangle) """ pass def WriteRectangleF(self,value): """ WriteRectangleF(self: BinaryArchiveWriter,value: RectangleF) """ pass def WriteSByte(self,value): """ WriteSByte(self: BinaryArchiveWriter,value: SByte) """ pass def WriteSByteArray(self,value): """ WriteSByteArray(self: BinaryArchiveWriter,value: IEnumerable[SByte]) """ pass def WriteShort(self,value): """ WriteShort(self: BinaryArchiveWriter,value: Int16) """ pass def WriteShortArray(self,value): """ WriteShortArray(self: BinaryArchiveWriter,value: IEnumerable[Int16]) """ pass def WriteSingle(self,value): """ WriteSingle(self: BinaryArchiveWriter,value: Single) """ pass def WriteSingleArray(self,value): """ WriteSingleArray(self: BinaryArchiveWriter,value: IEnumerable[Single]) """ pass def WriteSize(self,value): """ WriteSize(self: BinaryArchiveWriter,value: Size) """ pass def WriteSizeF(self,value): """ WriteSizeF(self: BinaryArchiveWriter,value: SizeF) """ pass def WriteString(self,value): """ WriteString(self: BinaryArchiveWriter,value: str) """ pass def WriteStringArray(self,value): """ WriteStringArray(self: BinaryArchiveWriter,value: IEnumerable[str]) """ pass def WriteTransform(self,value): """ WriteTransform(self: BinaryArchiveWriter,value: Transform) """ pass def WriteUInt(self,value): """ WriteUInt(self: BinaryArchiveWriter,value: UInt32) """ pass def WriteUShort(self,value): """ WriteUShort(self: BinaryArchiveWriter,value: UInt16) """ pass def WriteVector2d(self,value): """ WriteVector2d(self: BinaryArchiveWriter,value: Vector2d) """ pass def WriteVector3d(self,value): """ WriteVector3d(self: BinaryArchiveWriter,value: Vector3d) """ pass def WriteVector3f(self,value): """ WriteVector3f(self: BinaryArchiveWriter,value: Vector3f) """ pass Archive3dmVersion=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Archive3dmVersion(self: BinaryArchiveWriter) -> int """ WriteErrorOccured=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: WriteErrorOccured(self: BinaryArchiveWriter) -> bool Set: WriteErrorOccured(self: BinaryArchiveWriter)=value """ class File3dm(object,IDisposable): """ File3dm() """ def Audit(self,attemptRepair,repairCount,errors,warnings): """ Audit(self: File3dm,attemptRepair: bool) -> (int,int,str,Array[int]) """ pass def Dispose(self): """ Dispose(self: File3dm) """ pass def Dump(self): """ Dump(self: File3dm) -> str """ pass def DumpSummary(self): """ DumpSummary(self: File3dm) -> str """ pass def DumpToTextLog(self,log): """ DumpToTextLog(self: File3dm,log: TextLog) """ pass def IsValid(self,errors): """ IsValid(self: File3dm,errors: TextLog) -> bool IsValid(self: File3dm) -> (bool,str) """ pass def Polish(self): """ Polish(self: File3dm) """ pass @staticmethod def Read(path,tableTypeFilterFilter=None,objectTypeFilter=None,objectReadCallback=None): """ Read(path: str,tableTypeFilterFilter: TableTypeFilter,objectTypeFilter: ObjectTypeFilter,objectReadCallback: Func[GeometryBase,ObjectAttributes,bool]) -> File3dm Read(path: str,tableTypeFilterFilter: TableTypeFilter,objectTypeFilter: ObjectTypeFilter) -> File3dm Read(path: str) -> File3dm """ pass @staticmethod def ReadApplicationData(path,applicationName,applicationUrl,applicationDetails): """ ReadApplicationData(path: str) -> (str,str,str) """ pass @staticmethod def ReadArchiveVersion(path): """ ReadArchiveVersion(path: str) -> int """ pass @staticmethod def ReadNotes(path): """ ReadNotes(path: str) -> str """ pass @staticmethod def ReadRevisionHistory(path,createdBy,lastEditedBy,revision,createdOn,lastEditedOn): """ ReadRevisionHistory(path: str) -> (bool,str,str,int,DateTime,DateTime) """ pass @staticmethod def ReadWithLog(path,*__args): """ ReadWithLog(path: str) -> (File3dm,str) ReadWithLog(path: str,tableTypeFilterFilter: TableTypeFilter,objectTypeFilter: ObjectTypeFilter) -> (File3dm,str) """ pass def Write(self,path,*__args): """ Write(self: File3dm,path: str,options: File3dmWriteOptions) -> bool Write(self: File3dm,path: str,version: int) -> bool """ pass def WriteWithLog(self,path,version,errorLog): """ WriteWithLog(self: File3dm,path: str,version: int) -> (bool,str) """ pass def __enter__(self,*args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self,*args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass ApplicationDetails=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: ApplicationDetails(self: File3dm) -> str Set: ApplicationDetails(self: File3dm)=value """ ApplicationName=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: ApplicationName(self: File3dm) -> str Set: ApplicationName(self: File3dm)=value """ ApplicationUrl=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: ApplicationUrl(self: File3dm) -> str Set: ApplicationUrl(self: File3dm)=value """ Created=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Created(self: File3dm) -> DateTime """ CreatedBy=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: CreatedBy(self: File3dm) -> str """ DimStyles=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: DimStyles(self: File3dm) -> IList[DimensionStyle] """ HatchPatterns=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: HatchPatterns(self: File3dm) -> IList[HatchPattern] """ HistoryRecords=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: HistoryRecords(self: File3dm) -> File3dmHistoryRecordTable """ InstanceDefinitions=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: InstanceDefinitions(self: File3dm) -> IList[InstanceDefinitionGeometry] """ LastEdited=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: LastEdited(self: File3dm) -> DateTime """ LastEditedBy=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: LastEditedBy(self: File3dm) -> str """ Layers=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Layers(self: File3dm) -> IList[Layer] """ Linetypes=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Linetypes(self: File3dm) -> IList[Linetype] """ Materials=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Materials(self: File3dm) -> IList[Material] """ NamedViews=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: NamedViews(self: File3dm) -> IList[ViewInfo] """ Notes=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Notes(self: File3dm) -> File3dmNotes Set: Notes(self: File3dm)=value """ Objects=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Objects(self: File3dm) -> File3dmObjectTable """ PlugInData=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: PlugInData(self: File3dm) -> File3dmPlugInDataTable """ Revision=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Revision(self: File3dm) -> int Set: Revision(self: File3dm)=value """ Settings=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Settings(self: File3dm) -> File3dmSettings """ StartSectionComments=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: StartSectionComments(self: File3dm) -> str Set: StartSectionComments(self: File3dm)=value """ Views=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Views(self: File3dm) -> IList[ViewInfo] """ ObjectTypeFilter=None TableTypeFilter=None class File3dmHistoryRecordTable(object): # no doc def Clear(self): """ Clear(self: File3dmHistoryRecordTable) """ pass def Dump(self): """ Dump(self: File3dmHistoryRecordTable) -> str """ pass Count=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Count(self: File3dmHistoryRecordTable) -> int """ class File3dmNotes(object): """ File3dmNotes() """ IsHtml=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: IsHtml(self: File3dmNotes) -> bool Set: IsHtml(self: File3dmNotes)=value """ IsVisible=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: IsVisible(self: File3dmNotes) -> bool Set: IsVisible(self: File3dmNotes)=value """ Notes=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Notes(self: File3dmNotes) -> str Set: Notes(self: File3dmNotes)=value """ WindowRectangle=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: WindowRectangle(self: File3dmNotes) -> Rectangle Set: WindowRectangle(self: File3dmNotes)=value """ class File3dmObject(object): # no doc Attributes=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Attributes(self: File3dmObject) -> ObjectAttributes """ Geometry=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Geometry(self: File3dmObject) -> GeometryBase """ Name=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Name(self: File3dmObject) -> str Set: Name(self: File3dmObject)=value """ class File3dmObjectTable(object,IEnumerable[File3dmObject],IEnumerable,IRhinoTable[File3dmObject]): # no doc def AddArc(self,arc,attributes=None): """ AddArc(self: File3dmObjectTable,arc: Arc,attributes: ObjectAttributes) -> Guid AddArc(self: File3dmObjectTable,arc: Arc) -> Guid """ pass def AddBrep(self,brep,attributes=None): """ AddBrep(self: File3dmObjectTable,brep: Brep,attributes: ObjectAttributes) -> Guid AddBrep(self: File3dmObjectTable,brep: Brep) -> Guid """ pass def AddCircle(self,circle,attributes=None): """ AddCircle(self: File3dmObjectTable,circle: Circle,attributes: ObjectAttributes) -> Guid AddCircle(self: File3dmObjectTable,circle: Circle) -> Guid """ pass def AddClippingPlane(self,plane,uMagnitude,vMagnitude,*__args): """ AddClippingPlane(self: File3dmObjectTable,plane: Plane,uMagnitude: float,vMagnitude: float,clippedViewportIds: IEnumerable[Guid],attributes: ObjectAttributes) -> Guid AddClippingPlane(self: File3dmObjectTable,plane: Plane,uMagnitude: float,vMagnitude: float,clippedViewportIds: IEnumerable[Guid]) -> Guid AddClippingPlane(self: File3dmObjectTable,plane: Plane,uMagnitude: float,vMagnitude: float,clippedViewportId: Guid) -> Guid """ pass def AddCurve(self,curve,attributes=None): """ AddCurve(self: File3dmObjectTable,curve: Curve,attributes: ObjectAttributes) -> Guid AddCurve(self: File3dmObjectTable,curve: Curve) -> Guid """ pass def AddEllipse(self,ellipse,attributes=None): """ AddEllipse(self: File3dmObjectTable,ellipse: Ellipse,attributes: ObjectAttributes) -> Guid AddEllipse(self: File3dmObjectTable,ellipse: Ellipse) -> Guid """ pass def AddExtrusion(self,extrusion,attributes=None): """ AddExtrusion(self: File3dmObjectTable,extrusion: Extrusion,attributes: ObjectAttributes) -> Guid AddExtrusion(self: File3dmObjectTable,extrusion: Extrusion) -> Guid """ pass def AddHatch(self,hatch,attributes=None): """ AddHatch(self: File3dmObjectTable,hatch: Hatch,attributes: ObjectAttributes) -> Guid AddHatch(self: File3dmObjectTable,hatch: Hatch) -> Guid """ pass def AddLeader(self,*__args): """ AddLeader(self: File3dmObjectTable,text: str,plane: Plane,points: IEnumerable[Point2d],attributes: ObjectAttributes) -> Guid AddLeader(self: File3dmObjectTable,text: str,plane: Plane,points: IEnumerable[Point2d]) -> Guid AddLeader(self: File3dmObjectTable,plane: Plane,points: IEnumerable[Point2d]) -> Guid AddLeader(self: File3dmObjectTable,plane: Plane,points: IEnumerable[Point2d],attributes: ObjectAttributes) -> Guid """ pass def AddLine(self,*__args): """ AddLine(self: File3dmObjectTable,line: Line) -> Guid AddLine(self: File3dmObjectTable,line: Line,attributes: ObjectAttributes) -> Guid AddLine(self: File3dmObjectTable,from: Point3d,to: Point3d) -> Guid AddLine(self: File3dmObjectTable,from: Point3d,to: Point3d,attributes: ObjectAttributes) -> Guid """ pass def AddLinearDimension(self,dimension,attributes=None): """ AddLinearDimension(self: File3dmObjectTable,dimension: LinearDimension,attributes: ObjectAttributes) -> Guid AddLinearDimension(self: File3dmObjectTable,dimension: LinearDimension) -> Guid """ pass def AddMesh(self,mesh,attributes=None): """ AddMesh(self: File3dmObjectTable,mesh: Mesh,attributes: ObjectAttributes) -> Guid AddMesh(self: File3dmObjectTable,mesh: Mesh) -> Guid """ pass def AddPoint(self,*__args): """ AddPoint(self: File3dmObjectTable,point: Point3f) -> Guid AddPoint(self: File3dmObjectTable,point: Point3f,attributes: ObjectAttributes) -> Guid AddPoint(self: File3dmObjectTable,point: Point3d,attributes: ObjectAttributes) -> Guid AddPoint(self: File3dmObjectTable,x: float,y: float,z: float) -> Guid AddPoint(self: File3dmObjectTable,point: Point3d) -> Guid """ pass def AddPointCloud(self,*__args): """ AddPointCloud(self: File3dmObjectTable,points: IEnumerable[Point3d]) -> Guid AddPointCloud(self: File3dmObjectTable,points: IEnumerable[Point3d],attributes: ObjectAttributes) -> Guid AddPointCloud(self: File3dmObjectTable,cloud: PointCloud) -> Guid AddPointCloud(self: File3dmObjectTable,cloud: PointCloud,attributes: ObjectAttributes) -> Guid """ pass def AddPoints(self,points,attributes=None): """ AddPoints(self: File3dmObjectTable,points: IEnumerable[Point3f]) -> Array[Guid] AddPoints(self: File3dmObjectTable,points: IEnumerable[Point3f],attributes: ObjectAttributes) -> Array[Guid] AddPoints(self: File3dmObjectTable,points: IEnumerable[Point3d]) -> Array[Guid] AddPoints(self: File3dmObjectTable,points: IEnumerable[Point3d],attributes: ObjectAttributes) -> Array[Guid] """ pass def AddPolyline(self,points,attributes=None): """ AddPolyline(self: File3dmObjectTable,points: IEnumerable[Point3d],attributes: ObjectAttributes) -> Guid AddPolyline(self: File3dmObjectTable,points: IEnumerable[Point3d]) -> Guid """ pass def AddSphere(self,sphere,attributes=None): """ AddSphere(self: File3dmObjectTable,sphere: Sphere,attributes: ObjectAttributes) -> Guid AddSphere(self: File3dmObjectTable,sphere: Sphere) -> Guid """ pass def AddSurface(self,surface,attributes=None): """ AddSurface(self: File3dmObjectTable,surface: Surface,attributes: ObjectAttributes) -> Guid AddSurface(self: File3dmObjectTable,surface: Surface) -> Guid """ pass def AddText(self,text,plane,height,fontName,bold,italic,*__args): """ AddText(self: File3dmObjectTable,text: str,plane: Plane,height: float,fontName: str,bold: bool,italic: bool,justification: TextJustification,attributes: ObjectAttributes) -> Guid AddText(self: File3dmObjectTable,text: str,plane: Plane,height: float,fontName: str,bold: bool,italic: bool,attributes: ObjectAttributes) -> Guid AddText(self: File3dmObjectTable,text: str,plane: Plane,height: float,fontName: str,bold: bool,italic: bool) -> Guid AddText(self: File3dmObjectTable,text: str,plane: Plane,height: float,fontName: str,bold: bool,italic: bool,justification: TextJustification) -> Guid """ pass def AddTextDot(self,*__args): """ AddTextDot(self: File3dmObjectTable,dot: TextDot) -> Guid AddTextDot(self: File3dmObjectTable,dot: TextDot,attributes: ObjectAttributes) -> Guid AddTextDot(self: File3dmObjectTable,text: str,location: Point3d) -> Guid AddTextDot(self: File3dmObjectTable,text: str,location: Point3d,attributes: ObjectAttributes) -> Guid """ pass def Delete(self,*__args): """ Delete(self: File3dmObjectTable,objectIds: IEnumerable[Guid]) -> int Delete(self: File3dmObjectTable,objectId: Guid) -> bool Delete(self: File3dmObjectTable,obj: File3dmObject) -> bool """ pass def Dump(self): """ Dump(self: File3dmObjectTable) -> str """ pass def FindByLayer(self,layer): """ FindByLayer(self: File3dmObjectTable,layer: str) -> Array[File3dmObject] """ pass def GetBoundingBox(self): """ GetBoundingBox(self: File3dmObjectTable) -> BoundingBox """ pass def GetEnumerator(self): """ GetEnumerator(self: File3dmObjectTable) -> IEnumerator[File3dmObject] """ pass def __contains__(self,*args): """ __contains__[File3dmObject](enumerable: IEnumerable[File3dmObject],value: File3dmObject) -> bool """ pass def __getitem__(self,*args): """ x.__getitem__(y) <==> x[y] """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __iter__(self,*args): """ __iter__(self: IEnumerable) -> object """ pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass Count=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Count(self: File3dmObjectTable) -> int """ class File3dmPlugInData(object): # no doc PlugInId=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: PlugInId(self: File3dmPlugInData) -> Guid """ class File3dmPlugInDataTable(object,IEnumerable[File3dmPlugInData],IEnumerable,IRhinoTable[File3dmPlugInData]): # no doc def Clear(self): """ Clear(self: File3dmPlugInDataTable) """ pass def Dump(self): """ Dump(self: File3dmPlugInDataTable) -> str """ pass def GetEnumerator(self): """ GetEnumerator(self: File3dmPlugInDataTable) -> IEnumerator[File3dmPlugInData] """ pass def __contains__(self,*args): """ __contains__[File3dmPlugInData](enumerable: IEnumerable[File3dmPlugInData],value: File3dmPlugInData) -> bool """ pass def __getitem__(self,*args): """ x.__getitem__(y) <==> x[y] """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __iter__(self,*args): """ __iter__(self: IEnumerable) -> object """ pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass Count=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Count(self: File3dmPlugInDataTable) -> int """ class File3dmSettings(object): # no doc ModelAbsoluteTolerance=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: ModelAbsoluteTolerance(self: File3dmSettings) -> float Set: ModelAbsoluteTolerance(self: File3dmSettings)=value """ ModelAngleToleranceDegrees=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: ModelAngleToleranceDegrees(self: File3dmSettings) -> float Set: ModelAngleToleranceDegrees(self: File3dmSettings)=value """ ModelAngleToleranceRadians=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: ModelAngleToleranceRadians(self: File3dmSettings) -> float Set: ModelAngleToleranceRadians(self: File3dmSettings)=value """ ModelBasepoint=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: ModelBasepoint(self: File3dmSettings) -> Point3d Set: ModelBasepoint(self: File3dmSettings)=value """ ModelRelativeTolerance=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: ModelRelativeTolerance(self: File3dmSettings) -> float Set: ModelRelativeTolerance(self: File3dmSettings)=value """ ModelUnitSystem=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: ModelUnitSystem(self: File3dmSettings) -> UnitSystem Set: ModelUnitSystem(self: File3dmSettings)=value """ ModelUrl=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: ModelUrl(self: File3dmSettings) -> str Set: ModelUrl(self: File3dmSettings)=value """ PageAbsoluteTolerance=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: PageAbsoluteTolerance(self: File3dmSettings) -> float Set: PageAbsoluteTolerance(self: File3dmSettings)=value """ PageAngleToleranceDegrees=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: PageAngleToleranceDegrees(self: File3dmSettings) -> float Set: PageAngleToleranceDegrees(self: File3dmSettings)=value """ PageAngleToleranceRadians=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: PageAngleToleranceRadians(self: File3dmSettings) -> float Set: PageAngleToleranceRadians(self: File3dmSettings)=value """ PageRelativeTolerance=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: PageRelativeTolerance(self: File3dmSettings) -> float Set: PageRelativeTolerance(self: File3dmSettings)=value """ PageUnitSystem=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: PageUnitSystem(self: File3dmSettings) -> UnitSystem Set: PageUnitSystem(self: File3dmSettings)=value """ class File3dmTypeCodes(object): # no doc TCODE_ANALYSIS_MESH=None TCODE_ANGULAR_DIMENSION=None TCODE_ANNOTATION=None TCODE_ANNOTATION_LEADER=None TCODE_ANNOTATION_SETTINGS=None TCODE_ANONYMOUS_CHUNK=None TCODE_BITMAPPREVIEW=None TCODE_BITMAP_RECORD=None TCODE_BITMAP_TABLE=None TCODE_BUMPMAP=None TCODE_COMMENTBLOCK=None TCODE_COMPRESSED_MESH_GEOMETRY=None TCODE_CPLANE=None TCODE_CRC=None TCODE_CURRENTLAYER=None TCODE_DICTIONARY=None TCODE_DICTIONARY_END=None TCODE_DICTIONARY_ENTRY=None TCODE_DICTIONARY_ID=None TCODE_DIMSTYLE_RECORD=None TCODE_DIMSTYLE_TABLE=None TCODE_DISPLAY=None TCODE_DISP_AM_RESOLUTION=None TCODE_DISP_CPLINES=None TCODE_DISP_MAXLENGTH=None TCODE_ENDOFFILE=None TCODE_ENDOFFILE_GOO=None TCODE_ENDOFTABLE=None TCODE_FONT_RECORD=None TCODE_FONT_TABLE=None TCODE_GEOMETRY=None TCODE_GROUP_RECORD=None TCODE_GROUP_TABLE=None TCODE_HATCHPATTERN_RECORD=None TCODE_HATCHPATTERN_TABLE=None TCODE_HIDE_TRACE=None TCODE_HISTORYRECORD_RECORD=None TCODE_HISTORYRECORD_TABLE=None TCODE_INSTANCE_DEFINITION_RECORD=None TCODE_INSTANCE_DEFINITION_TABLE=None TCODE_INTERFACE=None TCODE_LAYER=None TCODE_LAYERINDEX=None TCODE_LAYERLOCKED=None TCODE_LAYERMATERIALINDEX=None TCODE_LAYERNAME=None TCODE_LAYERON=None TCODE_LAYERPICKABLE=None TCODE_LAYERREF=None TCODE_LAYERRENDERABLE=None TCODE_LAYERSNAPABLE=None TCODE_LAYERSTATE=None TCODE_LAYERTABLE=None TCODE_LAYERTHAWED=None TCODE_LAYERVISIBLE=None TCODE_LAYER_OBSELETE_1=None TCODE_LAYER_OBSELETE_2=None TCODE_LAYER_OBSELETE_3=None TCODE_LAYER_RECORD=None TCODE_LAYER_TABLE=None TCODE_LEGACY_ASM=None TCODE_LEGACY_ASMSTUFF=None TCODE_LEGACY_BND=None TCODE_LEGACY_BNDSTUFF=None TCODE_LEGACY_CRV=None TCODE_LEGACY_CRVSTUFF=None TCODE_LEGACY_FAC=None TCODE_LEGACY_FACSTUFF=None TCODE_LEGACY_GEOMETRY=None TCODE_LEGACY_PNT=None TCODE_LEGACY_PNTSTUFF=None TCODE_LEGACY_PRT=None TCODE_LEGACY_PRTSTUFF=None TCODE_LEGACY_SHL=None TCODE_LEGACY_SHLSTUFF=None TCODE_LEGACY_SPL=None TCODE_LEGACY_SPLSTUFF=None TCODE_LEGACY_SRF=None TCODE_LEGACY_SRFSTUFF=None TCODE_LEGACY_TOL_ANGLE=None TCODE_LEGACY_TOL_FIT=None TCODE_LEGACY_TRM=None TCODE_LEGACY_TRMSTUFF=None TCODE_LIGHT_RECORD=None TCODE_LIGHT_RECORD_ATTRIBUTES=None TCODE_LIGHT_RECORD_ATTRIBUTES_USERDATA=None TCODE_LIGHT_RECORD_END=None TCODE_LIGHT_TABLE=None TCODE_LINEAR_DIMENSION=None TCODE_LINETYPE_RECORD=None TCODE_LINETYPE_TABLE=None TCODE_MATERIAL_RECORD=None TCODE_MATERIAL_TABLE=None TCODE_MAXIMIZED_VIEWPORT=None TCODE_MESH_OBJECT=None TCODE_NAME=None TCODE_NAMED_CPLANE=None TCODE_NAMED_VIEW=None TCODE_NEAR_CLIP_PLANE=None TCODE_NOTES=None TCODE_OBJECT_RECORD=None TCODE_OBJECT_RECORD_ATTRIBUTES=None TCODE_OBJECT_RECORD_ATTRIBUTES_USERDATA=None TCODE_OBJECT_RECORD_END=None TCODE_OBJECT_RECORD_HISTORY=None TCODE_OBJECT_RECORD_HISTORY_DATA=None TCODE_OBJECT_RECORD_HISTORY_HEADER=None TCODE_OBJECT_RECORD_TYPE=None TCODE_OBJECT_TABLE=None TCODE_OBSOLETE_LAYERSET_RECORD=None TCODE_OBSOLETE_LAYERSET_TABLE=None TCODE_OLD_FULLMESH=None TCODE_OLD_MESH_UV=None TCODE_OLD_MESH_VERTEX_NORMALS=None TCODE_OLD_RH_TRIMESH=None TCODE_OPENNURBS_CLASS=None TCODE_OPENNURBS_CLASS_DATA=None TCODE_OPENNURBS_CLASS_END=None TCODE_OPENNURBS_CLASS_USERDATA=None TCODE_OPENNURBS_CLASS_USERDATA_HEADER=None TCODE_OPENNURBS_CLASS_UUID=None TCODE_OPENNURBS_OBJECT=None TCODE_PROPERTIES_APPLICATION=None TCODE_PROPERTIES_COMPRESSED_PREVIEWIMAGE=None TCODE_PROPERTIES_NOTES=None TCODE_PROPERTIES_OPENNURBS_VERSION=None TCODE_PROPERTIES_PREVIEWIMAGE=None TCODE_PROPERTIES_REVISIONHISTORY=None TCODE_PROPERTIES_TABLE=None TCODE_RADIAL_DIMENSION=None TCODE_RENDER=None TCODE_RENDERMESHPARAMS=None TCODE_RENDER_MATERIAL_ID=None TCODE_RGB=None TCODE_RGBDISPLAY=None TCODE_RHINOIO_OBJECT_BREP=None TCODE_RHINOIO_OBJECT_DATA=None TCODE_RHINOIO_OBJECT_END=None TCODE_RHINOIO_OBJECT_NURBS_CURVE=None TCODE_RHINOIO_OBJECT_NURBS_SURFACE=None TCODE_RH_POINT=None TCODE_RH_SPOTLIGHT=None TCODE_SETTINGS_ANALYSISMESH=None TCODE_SETTINGS_ANNOTATION=None TCODE_SETTINGS_ATTRIBUTES=None TCODE_SETTINGS_CURRENT_COLOR=None TCODE_SETTINGS_CURRENT_DIMSTYLE_INDEX=None TCODE_SETTINGS_CURRENT_FONT_INDEX=None TCODE_SETTINGS_CURRENT_LAYER_INDEX=None TCODE_SETTINGS_CURRENT_MATERIAL_INDEX=None TCODE_SETTINGS_CURRENT_WIRE_DENSITY=None TCODE_SETTINGS_GRID_DEFAULTS=None TCODE_SETTINGS_MODEL_URL=None TCODE_SETTINGS_NAMED_CPLANE_LIST=None TCODE_SETTINGS_NAMED_VIEW_LIST=None TCODE_SETTINGS_PLUGINLIST=None TCODE_SETTINGS_RENDER=None TCODE_SETTINGS_RENDERMESH=None TCODE_SETTINGS_TABLE=None TCODE_SETTINGS_UNITSANDTOLS=None TCODE_SETTINGS_VIEW_LIST=None TCODE_SETTINGS__NEVER__USE__THIS=None TCODE_SHORT=None TCODE_SHOWGRID=None TCODE_SHOWGRIDAXES=None TCODE_SHOWWORLDAXES=None TCODE_SNAPSIZE=None TCODE_STUFF=None TCODE_SUMMARY=None TCODE_TABLE=None TCODE_TABLEREC=None TCODE_TEXTUREMAP=None TCODE_TEXTURE_MAPPING_RECORD=None TCODE_TEXTURE_MAPPING_TABLE=None TCODE_TEXT_BLOCK=None TCODE_TOLERANCE=None TCODE_TRANSPARENCY=None TCODE_UNIT_AND_TOLERANCES=None TCODE_USER=None TCODE_USER_RECORD=None TCODE_USER_TABLE=None TCODE_USER_TABLE_UUID=None TCODE_VIEW=None TCODE_VIEWPORT=None TCODE_VIEWPORT_DISPLAY_MODE=None TCODE_VIEWPORT_POSITION=None TCODE_VIEWPORT_TRACEINFO=None TCODE_VIEWPORT_WALLPAPER=None TCODE_VIEW_ATTRIBUTES=None TCODE_VIEW_CPLANE=None TCODE_VIEW_DISPLAYMODE=None TCODE_VIEW_NAME=None TCODE_VIEW_POSITION=None TCODE_VIEW_RECORD=None TCODE_VIEW_SHOWCONAXES=None TCODE_VIEW_SHOWCONGRID=None TCODE_VIEW_SHOWWORLDAXES=None TCODE_VIEW_TARGET=None TCODE_VIEW_TRACEIMAGE=None TCODE_VIEW_VIEWPORT=None TCODE_VIEW_VIEWPORT_USERDATA=None TCODE_VIEW_WALLPAPER=None TCODE_VIEW_WALLPAPER_V3=None TCODE_XDATA=None __all__=[ 'TCODE_ANALYSIS_MESH', 'TCODE_ANGULAR_DIMENSION', 'TCODE_ANNOTATION', 'TCODE_ANNOTATION_LEADER', 'TCODE_ANNOTATION_SETTINGS', 'TCODE_ANONYMOUS_CHUNK', 'TCODE_BITMAP_RECORD', 'TCODE_BITMAP_TABLE', 'TCODE_BITMAPPREVIEW', 'TCODE_BUMPMAP', 'TCODE_COMMENTBLOCK', 'TCODE_COMPRESSED_MESH_GEOMETRY', 'TCODE_CPLANE', 'TCODE_CRC', 'TCODE_CURRENTLAYER', 'TCODE_DICTIONARY', 'TCODE_DICTIONARY_END', 'TCODE_DICTIONARY_ENTRY', 'TCODE_DICTIONARY_ID', 'TCODE_DIMSTYLE_RECORD', 'TCODE_DIMSTYLE_TABLE', 'TCODE_DISP_AM_RESOLUTION', 'TCODE_DISP_CPLINES', 'TCODE_DISP_MAXLENGTH', 'TCODE_DISPLAY', 'TCODE_ENDOFFILE', 'TCODE_ENDOFFILE_GOO', 'TCODE_ENDOFTABLE', 'TCODE_FONT_RECORD', 'TCODE_FONT_TABLE', 'TCODE_GEOMETRY', 'TCODE_GROUP_RECORD', 'TCODE_GROUP_TABLE', 'TCODE_HATCHPATTERN_RECORD', 'TCODE_HATCHPATTERN_TABLE', 'TCODE_HIDE_TRACE', 'TCODE_HISTORYRECORD_RECORD', 'TCODE_HISTORYRECORD_TABLE', 'TCODE_INSTANCE_DEFINITION_RECORD', 'TCODE_INSTANCE_DEFINITION_TABLE', 'TCODE_INTERFACE', 'TCODE_LAYER', 'TCODE_LAYER_OBSELETE_1', 'TCODE_LAYER_OBSELETE_2', 'TCODE_LAYER_OBSELETE_3', 'TCODE_LAYER_RECORD', 'TCODE_LAYER_TABLE', 'TCODE_LAYERINDEX', 'TCODE_LAYERLOCKED', 'TCODE_LAYERMATERIALINDEX', 'TCODE_LAYERNAME', 'TCODE_LAYERON', 'TCODE_LAYERPICKABLE', 'TCODE_LAYERREF', 'TCODE_LAYERRENDERABLE', 'TCODE_LAYERSNAPABLE', 'TCODE_LAYERSTATE', 'TCODE_LAYERTABLE', 'TCODE_LAYERTHAWED', 'TCODE_LAYERVISIBLE', 'TCODE_LEGACY_ASM', 'TCODE_LEGACY_ASMSTUFF', 'TCODE_LEGACY_BND', 'TCODE_LEGACY_BNDSTUFF', 'TCODE_LEGACY_CRV', 'TCODE_LEGACY_CRVSTUFF', 'TCODE_LEGACY_FAC', 'TCODE_LEGACY_FACSTUFF', 'TCODE_LEGACY_GEOMETRY', 'TCODE_LEGACY_PNT', 'TCODE_LEGACY_PNTSTUFF', 'TCODE_LEGACY_PRT', 'TCODE_LEGACY_PRTSTUFF', 'TCODE_LEGACY_SHL', 'TCODE_LEGACY_SHLSTUFF', 'TCODE_LEGACY_SPL', 'TCODE_LEGACY_SPLSTUFF', 'TCODE_LEGACY_SRF', 'TCODE_LEGACY_SRFSTUFF', 'TCODE_LEGACY_TOL_ANGLE', 'TCODE_LEGACY_TOL_FIT', 'TCODE_LEGACY_TRM', 'TCODE_LEGACY_TRMSTUFF', 'TCODE_LIGHT_RECORD', 'TCODE_LIGHT_RECORD_ATTRIBUTES', 'TCODE_LIGHT_RECORD_ATTRIBUTES_USERDATA', 'TCODE_LIGHT_RECORD_END', 'TCODE_LIGHT_TABLE', 'TCODE_LINEAR_DIMENSION', 'TCODE_LINETYPE_RECORD', 'TCODE_LINETYPE_TABLE', 'TCODE_MATERIAL_RECORD', 'TCODE_MATERIAL_TABLE', 'TCODE_MAXIMIZED_VIEWPORT', 'TCODE_MESH_OBJECT', 'TCODE_NAME', 'TCODE_NAMED_CPLANE', 'TCODE_NAMED_VIEW', 'TCODE_NEAR_CLIP_PLANE', 'TCODE_NOTES', 'TCODE_OBJECT_RECORD', 'TCODE_OBJECT_RECORD_ATTRIBUTES', 'TCODE_OBJECT_RECORD_ATTRIBUTES_USERDATA', 'TCODE_OBJECT_RECORD_END', 'TCODE_OBJECT_RECORD_HISTORY', 'TCODE_OBJECT_RECORD_HISTORY_DATA', 'TCODE_OBJECT_RECORD_HISTORY_HEADER', 'TCODE_OBJECT_RECORD_TYPE', 'TCODE_OBJECT_TABLE', 'TCODE_OBSOLETE_LAYERSET_RECORD', 'TCODE_OBSOLETE_LAYERSET_TABLE', 'TCODE_OLD_FULLMESH', 'TCODE_OLD_MESH_UV', 'TCODE_OLD_MESH_VERTEX_NORMALS', 'TCODE_OLD_RH_TRIMESH', 'TCODE_OPENNURBS_CLASS', 'TCODE_OPENNURBS_CLASS_DATA', 'TCODE_OPENNURBS_CLASS_END', 'TCODE_OPENNURBS_CLASS_USERDATA', 'TCODE_OPENNURBS_CLASS_USERDATA_HEADER', 'TCODE_OPENNURBS_CLASS_UUID', 'TCODE_OPENNURBS_OBJECT', 'TCODE_PROPERTIES_APPLICATION', 'TCODE_PROPERTIES_COMPRESSED_PREVIEWIMAGE', 'TCODE_PROPERTIES_NOTES', 'TCODE_PROPERTIES_OPENNURBS_VERSION', 'TCODE_PROPERTIES_PREVIEWIMAGE', 'TCODE_PROPERTIES_REVISIONHISTORY', 'TCODE_PROPERTIES_TABLE', 'TCODE_RADIAL_DIMENSION', 'TCODE_RENDER', 'TCODE_RENDER_MATERIAL_ID', 'TCODE_RENDERMESHPARAMS', 'TCODE_RGB', 'TCODE_RGBDISPLAY', 'TCODE_RH_POINT', 'TCODE_RH_SPOTLIGHT', 'TCODE_RHINOIO_OBJECT_BREP', 'TCODE_RHINOIO_OBJECT_DATA', 'TCODE_RHINOIO_OBJECT_END', 'TCODE_RHINOIO_OBJECT_NURBS_CURVE', 'TCODE_RHINOIO_OBJECT_NURBS_SURFACE', 'TCODE_SETTINGS__NEVER__USE__THIS', 'TCODE_SETTINGS_ANALYSISMESH', 'TCODE_SETTINGS_ANNOTATION', 'TCODE_SETTINGS_ATTRIBUTES', 'TCODE_SETTINGS_CURRENT_COLOR', 'TCODE_SETTINGS_CURRENT_DIMSTYLE_INDEX', 'TCODE_SETTINGS_CURRENT_FONT_INDEX', 'TCODE_SETTINGS_CURRENT_LAYER_INDEX', 'TCODE_SETTINGS_CURRENT_MATERIAL_INDEX', 'TCODE_SETTINGS_CURRENT_WIRE_DENSITY', 'TCODE_SETTINGS_GRID_DEFAULTS', 'TCODE_SETTINGS_MODEL_URL', 'TCODE_SETTINGS_NAMED_CPLANE_LIST', 'TCODE_SETTINGS_NAMED_VIEW_LIST', 'TCODE_SETTINGS_PLUGINLIST', 'TCODE_SETTINGS_RENDER', 'TCODE_SETTINGS_RENDERMESH', 'TCODE_SETTINGS_TABLE', 'TCODE_SETTINGS_UNITSANDTOLS', 'TCODE_SETTINGS_VIEW_LIST', 'TCODE_SHORT', 'TCODE_SHOWGRID', 'TCODE_SHOWGRIDAXES', 'TCODE_SHOWWORLDAXES', 'TCODE_SNAPSIZE', 'TCODE_STUFF', 'TCODE_SUMMARY', 'TCODE_TABLE', 'TCODE_TABLEREC', 'TCODE_TEXT_BLOCK', 'TCODE_TEXTURE_MAPPING_RECORD', 'TCODE_TEXTURE_MAPPING_TABLE', 'TCODE_TEXTUREMAP', 'TCODE_TOLERANCE', 'TCODE_TRANSPARENCY', 'TCODE_UNIT_AND_TOLERANCES', 'TCODE_USER', 'TCODE_USER_RECORD', 'TCODE_USER_TABLE', 'TCODE_USER_TABLE_UUID', 'TCODE_VIEW', 'TCODE_VIEW_ATTRIBUTES', 'TCODE_VIEW_CPLANE', 'TCODE_VIEW_DISPLAYMODE', 'TCODE_VIEW_NAME', 'TCODE_VIEW_POSITION', 'TCODE_VIEW_RECORD', 'TCODE_VIEW_SHOWCONAXES', 'TCODE_VIEW_SHOWCONGRID', 'TCODE_VIEW_SHOWWORLDAXES', 'TCODE_VIEW_TARGET', 'TCODE_VIEW_TRACEIMAGE', 'TCODE_VIEW_VIEWPORT', 'TCODE_VIEW_VIEWPORT_USERDATA', 'TCODE_VIEW_WALLPAPER', 'TCODE_VIEW_WALLPAPER_V3', 'TCODE_VIEWPORT', 'TCODE_VIEWPORT_DISPLAY_MODE', 'TCODE_VIEWPORT_POSITION', 'TCODE_VIEWPORT_TRACEINFO', 'TCODE_VIEWPORT_WALLPAPER', 'TCODE_XDATA', ] class File3dmWriteOptions(object): """ File3dmWriteOptions() """ SaveAnalysisMeshes=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: SaveAnalysisMeshes(self: File3dmWriteOptions) -> bool Set: SaveAnalysisMeshes(self: File3dmWriteOptions)=value """ SaveRenderMeshes=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: SaveRenderMeshes(self: File3dmWriteOptions) -> bool Set: SaveRenderMeshes(self: File3dmWriteOptions)=value """ SaveUserData=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: SaveUserData(self: File3dmWriteOptions) -> bool Set: SaveUserData(self: File3dmWriteOptions)=value """ Version=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Version(self: File3dmWriteOptions) -> int Set: Version(self: File3dmWriteOptions)=value """ class FileType(object): """ FileType(extension: str,description: str) """ @staticmethod def __new__(self,extension,description): """ __new__(cls: type,extension: str,description: str) """ pass Description=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Description(self: FileType) -> str """ Extension=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Extension(self: FileType) -> str """ class SerializationOptions(object): """ SerializationOptions() """ RhinoVersion=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: RhinoVersion(self: SerializationOptions) -> int Set: RhinoVersion(self: SerializationOptions)=value """ WriteUserData=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: WriteUserData(self: SerializationOptions) -> bool Set: WriteUserData(self: SerializationOptions)=value """ class TextLog(object,IDisposable): """ TextLog() TextLog(filename: str) """ def Dispose(self): """ Dispose(self: TextLog) """ pass def PopIndent(self): """ PopIndent(self: TextLog) """ pass def Print(self,*__args): """ Print(self: TextLog,format: str,arg0: object,arg1: object)Print(self: TextLog,format: str,arg0: object)Print(self: TextLog,text: str) """ pass def PrintWrappedText(self,text,lineLength): """ PrintWrappedText(self: TextLog,text: str,lineLength: int) """ pass def PushIndent(self): """ PushIndent(self: TextLog) """ pass def ToString(self): """ ToString(self: TextLog) -> str """ pass def __enter__(self,*args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self,*args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass @staticmethod def __new__(self,filename=None): """ __new__(cls: type) __new__(cls: type,filename: str) """ pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass def __str__(self,*args): pass IndentSize=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: IndentSize(self: TextLog) -> int Set: IndentSize(self: TextLog)=value """
class Binaryarchiveexception(IOException, ISerializable, _Exception): """ BinaryArchiveException(message: str) """ def add__serialize_object_state(self, *args): """ add_SerializeObjectState(self: Exception,value: EventHandler[SafeSerializationEventArgs]) """ pass def remove__serialize_object_state(self, *args): """ remove_SerializeObjectState(self: Exception,value: EventHandler[SafeSerializationEventArgs]) """ pass def __init__(self, *args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass @staticmethod def __new__(self, message): """ __new__(cls: type,message: str) """ pass def __str__(self, *args): pass class Binaryarchivefile(object, IDisposable): """ BinaryArchiveFile(filename: str,mode: BinaryArchiveMode) """ def close(self): """ Close(self: BinaryArchiveFile) """ pass def dispose(self): """ Dispose(self: BinaryArchiveFile) """ pass def open(self): """ Open(self: BinaryArchiveFile) -> bool """ pass def __enter__(self, *args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self, *args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self, *args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass @staticmethod def __new__(self, filename, mode): """ __new__(cls: type,filename: str,mode: BinaryArchiveMode) """ pass def __repr__(self, *args): """ __repr__(self: object) -> str """ pass reader = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Reader(self: BinaryArchiveFile) -> BinaryArchiveReader\n\n\n\n' writer = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Writer(self: BinaryArchiveFile) -> BinaryArchiveWriter\n\n\n\n' class Binaryarchivemode(Enum, IComparable, IFormattable, IConvertible): """ enum BinaryArchiveMode,values: Read (1),Read3dm (5),ReadWrite (3),Unknown (0),Write (2),Write3dm (6) """ def __eq__(self, *args): """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): """ __format__(formattable: IFormattable,format: str) -> str """ pass def __ge__(self, *args): pass def __gt__(self, *args): pass def __init__(self, *args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): pass def __lt__(self, *args): pass def __ne__(self, *args): pass def __reduce_ex__(self, *args): pass def __str__(self, *args): pass read = None read3dm = None read_write = None unknown = None value__ = None write = None write3dm = None class Binaryarchivereader(object): def at_end(self): """ AtEnd(self: BinaryArchiveReader) -> bool """ pass def dump3dm_chunk(self, log): """ Dump3dmChunk(self: BinaryArchiveReader,log: TextLog) -> UInt32 """ pass def read3dm_chunk_version(self, major, minor): """ Read3dmChunkVersion(self: BinaryArchiveReader) -> (int,int) """ pass def read3dm_start_section(self, version, comment): """ Read3dmStartSection(self: BinaryArchiveReader) -> (bool,int,str) """ pass def read_bool(self): """ ReadBool(self: BinaryArchiveReader) -> bool """ pass def read_bool_array(self): """ ReadBoolArray(self: BinaryArchiveReader) -> Array[bool] """ pass def read_bounding_box(self): """ ReadBoundingBox(self: BinaryArchiveReader) -> BoundingBox """ pass def read_byte(self): """ ReadByte(self: BinaryArchiveReader) -> Byte """ pass def read_byte_array(self): """ ReadByteArray(self: BinaryArchiveReader) -> Array[Byte] """ pass def read_color(self): """ ReadColor(self: BinaryArchiveReader) -> Color """ pass def read_compressed_buffer(self): """ ReadCompressedBuffer(self: BinaryArchiveReader) -> Array[Byte] """ pass def read_dictionary(self): """ ReadDictionary(self: BinaryArchiveReader) -> ArchivableDictionary """ pass def read_double(self): """ ReadDouble(self: BinaryArchiveReader) -> float """ pass def read_double_array(self): """ ReadDoubleArray(self: BinaryArchiveReader) -> Array[float] """ pass def read_font(self): """ ReadFont(self: BinaryArchiveReader) -> Font """ pass def read_geometry(self): """ ReadGeometry(self: BinaryArchiveReader) -> GeometryBase """ pass def read_guid(self): """ ReadGuid(self: BinaryArchiveReader) -> Guid """ pass def read_guid_array(self): """ ReadGuidArray(self: BinaryArchiveReader) -> Array[Guid] """ pass def read_int(self): """ ReadInt(self: BinaryArchiveReader) -> int """ pass def read_int64(self): """ ReadInt64(self: BinaryArchiveReader) -> Int64 """ pass def read_int_array(self): """ ReadIntArray(self: BinaryArchiveReader) -> Array[int] """ pass def read_interval(self): """ ReadInterval(self: BinaryArchiveReader) -> Interval """ pass def read_line(self): """ ReadLine(self: BinaryArchiveReader) -> Line """ pass def read_meshing_parameters(self): """ ReadMeshingParameters(self: BinaryArchiveReader) -> MeshingParameters """ pass def read_plane(self): """ ReadPlane(self: BinaryArchiveReader) -> Plane """ pass def read_point(self): """ ReadPoint(self: BinaryArchiveReader) -> Point """ pass def read_point2d(self): """ ReadPoint2d(self: BinaryArchiveReader) -> Point2d """ pass def read_point3d(self): """ ReadPoint3d(self: BinaryArchiveReader) -> Point3d """ pass def read_point3f(self): """ ReadPoint3f(self: BinaryArchiveReader) -> Point3f """ pass def read_point4d(self): """ ReadPoint4d(self: BinaryArchiveReader) -> Point4d """ pass def read_point_f(self): """ ReadPointF(self: BinaryArchiveReader) -> PointF """ pass def read_ray3d(self): """ ReadRay3d(self: BinaryArchiveReader) -> Ray3d """ pass def read_rectangle(self): """ ReadRectangle(self: BinaryArchiveReader) -> Rectangle """ pass def read_rectangle_f(self): """ ReadRectangleF(self: BinaryArchiveReader) -> RectangleF """ pass def read_s_byte(self): """ ReadSByte(self: BinaryArchiveReader) -> SByte """ pass def read_s_byte_array(self): """ ReadSByteArray(self: BinaryArchiveReader) -> Array[SByte] """ pass def read_short(self): """ ReadShort(self: BinaryArchiveReader) -> Int16 """ pass def read_short_array(self): """ ReadShortArray(self: BinaryArchiveReader) -> Array[Int16] """ pass def read_single(self): """ ReadSingle(self: BinaryArchiveReader) -> Single """ pass def read_single_array(self): """ ReadSingleArray(self: BinaryArchiveReader) -> Array[Single] """ pass def read_size(self): """ ReadSize(self: BinaryArchiveReader) -> Size """ pass def read_size_f(self): """ ReadSizeF(self: BinaryArchiveReader) -> SizeF """ pass def read_string(self): """ ReadString(self: BinaryArchiveReader) -> str """ pass def read_string_array(self): """ ReadStringArray(self: BinaryArchiveReader) -> Array[str] """ pass def read_transform(self): """ ReadTransform(self: BinaryArchiveReader) -> Transform """ pass def read_u_int(self): """ ReadUInt(self: BinaryArchiveReader) -> UInt32 """ pass def read_u_short(self): """ ReadUShort(self: BinaryArchiveReader) -> UInt16 """ pass def read_vector2d(self): """ ReadVector2d(self: BinaryArchiveReader) -> Vector2d """ pass def read_vector3d(self): """ ReadVector3d(self: BinaryArchiveReader) -> Vector3d """ pass def read_vector3f(self): """ ReadVector3f(self: BinaryArchiveReader) -> Vector3f """ pass archive3dm_version = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Archive3dmVersion(self: BinaryArchiveReader) -> int\n\n\n\n' read_error_occured = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: ReadErrorOccured(self: BinaryArchiveReader) -> bool\n\n\n\nSet: ReadErrorOccured(self: BinaryArchiveReader)=value\n\n' class Binaryarchivewriter(object): def write3dm_chunk_version(self, major, minor): """ Write3dmChunkVersion(self: BinaryArchiveWriter,major: int,minor: int) """ pass def write_bool(self, value): """ WriteBool(self: BinaryArchiveWriter,value: bool) """ pass def write_bool_array(self, value): """ WriteBoolArray(self: BinaryArchiveWriter,value: IEnumerable[bool]) """ pass def write_bounding_box(self, value): """ WriteBoundingBox(self: BinaryArchiveWriter,value: BoundingBox) """ pass def write_byte(self, value): """ WriteByte(self: BinaryArchiveWriter,value: Byte) """ pass def write_byte_array(self, value): """ WriteByteArray(self: BinaryArchiveWriter,value: IEnumerable[Byte]) """ pass def write_color(self, value): """ WriteColor(self: BinaryArchiveWriter,value: Color) """ pass def write_compressed_buffer(self, value): """ WriteCompressedBuffer(self: BinaryArchiveWriter,value: IEnumerable[Byte]) """ pass def write_dictionary(self, dictionary): """ WriteDictionary(self: BinaryArchiveWriter,dictionary: ArchivableDictionary) """ pass def write_double(self, value): """ WriteDouble(self: BinaryArchiveWriter,value: float) """ pass def write_double_array(self, value): """ WriteDoubleArray(self: BinaryArchiveWriter,value: IEnumerable[float]) """ pass def write_font(self, value): """ WriteFont(self: BinaryArchiveWriter,value: Font) """ pass def write_geometry(self, value): """ WriteGeometry(self: BinaryArchiveWriter,value: GeometryBase) """ pass def write_guid(self, value): """ WriteGuid(self: BinaryArchiveWriter,value: Guid) """ pass def write_guid_array(self, value): """ WriteGuidArray(self: BinaryArchiveWriter,value: IEnumerable[Guid]) """ pass def write_int(self, value): """ WriteInt(self: BinaryArchiveWriter,value: int) """ pass def write_int64(self, value): """ WriteInt64(self: BinaryArchiveWriter,value: Int64) """ pass def write_int_array(self, value): """ WriteIntArray(self: BinaryArchiveWriter,value: IEnumerable[int]) """ pass def write_interval(self, value): """ WriteInterval(self: BinaryArchiveWriter,value: Interval) """ pass def write_line(self, value): """ WriteLine(self: BinaryArchiveWriter,value: Line) """ pass def write_meshing_parameters(self, value): """ WriteMeshingParameters(self: BinaryArchiveWriter,value: MeshingParameters) """ pass def write_plane(self, value): """ WritePlane(self: BinaryArchiveWriter,value: Plane) """ pass def write_point(self, value): """ WritePoint(self: BinaryArchiveWriter,value: Point) """ pass def write_point2d(self, value): """ WritePoint2d(self: BinaryArchiveWriter,value: Point2d) """ pass def write_point3d(self, value): """ WritePoint3d(self: BinaryArchiveWriter,value: Point3d) """ pass def write_point3f(self, value): """ WritePoint3f(self: BinaryArchiveWriter,value: Point3f) """ pass def write_point4d(self, value): """ WritePoint4d(self: BinaryArchiveWriter,value: Point4d) """ pass def write_point_f(self, value): """ WritePointF(self: BinaryArchiveWriter,value: PointF) """ pass def write_ray3d(self, value): """ WriteRay3d(self: BinaryArchiveWriter,value: Ray3d) """ pass def write_rectangle(self, value): """ WriteRectangle(self: BinaryArchiveWriter,value: Rectangle) """ pass def write_rectangle_f(self, value): """ WriteRectangleF(self: BinaryArchiveWriter,value: RectangleF) """ pass def write_s_byte(self, value): """ WriteSByte(self: BinaryArchiveWriter,value: SByte) """ pass def write_s_byte_array(self, value): """ WriteSByteArray(self: BinaryArchiveWriter,value: IEnumerable[SByte]) """ pass def write_short(self, value): """ WriteShort(self: BinaryArchiveWriter,value: Int16) """ pass def write_short_array(self, value): """ WriteShortArray(self: BinaryArchiveWriter,value: IEnumerable[Int16]) """ pass def write_single(self, value): """ WriteSingle(self: BinaryArchiveWriter,value: Single) """ pass def write_single_array(self, value): """ WriteSingleArray(self: BinaryArchiveWriter,value: IEnumerable[Single]) """ pass def write_size(self, value): """ WriteSize(self: BinaryArchiveWriter,value: Size) """ pass def write_size_f(self, value): """ WriteSizeF(self: BinaryArchiveWriter,value: SizeF) """ pass def write_string(self, value): """ WriteString(self: BinaryArchiveWriter,value: str) """ pass def write_string_array(self, value): """ WriteStringArray(self: BinaryArchiveWriter,value: IEnumerable[str]) """ pass def write_transform(self, value): """ WriteTransform(self: BinaryArchiveWriter,value: Transform) """ pass def write_u_int(self, value): """ WriteUInt(self: BinaryArchiveWriter,value: UInt32) """ pass def write_u_short(self, value): """ WriteUShort(self: BinaryArchiveWriter,value: UInt16) """ pass def write_vector2d(self, value): """ WriteVector2d(self: BinaryArchiveWriter,value: Vector2d) """ pass def write_vector3d(self, value): """ WriteVector3d(self: BinaryArchiveWriter,value: Vector3d) """ pass def write_vector3f(self, value): """ WriteVector3f(self: BinaryArchiveWriter,value: Vector3f) """ pass archive3dm_version = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Archive3dmVersion(self: BinaryArchiveWriter) -> int\n\n\n\n' write_error_occured = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: WriteErrorOccured(self: BinaryArchiveWriter) -> bool\n\n\n\nSet: WriteErrorOccured(self: BinaryArchiveWriter)=value\n\n' class File3Dm(object, IDisposable): """ File3dm() """ def audit(self, attemptRepair, repairCount, errors, warnings): """ Audit(self: File3dm,attemptRepair: bool) -> (int,int,str,Array[int]) """ pass def dispose(self): """ Dispose(self: File3dm) """ pass def dump(self): """ Dump(self: File3dm) -> str """ pass def dump_summary(self): """ DumpSummary(self: File3dm) -> str """ pass def dump_to_text_log(self, log): """ DumpToTextLog(self: File3dm,log: TextLog) """ pass def is_valid(self, errors): """ IsValid(self: File3dm,errors: TextLog) -> bool IsValid(self: File3dm) -> (bool,str) """ pass def polish(self): """ Polish(self: File3dm) """ pass @staticmethod def read(path, tableTypeFilterFilter=None, objectTypeFilter=None, objectReadCallback=None): """ Read(path: str,tableTypeFilterFilter: TableTypeFilter,objectTypeFilter: ObjectTypeFilter,objectReadCallback: Func[GeometryBase,ObjectAttributes,bool]) -> File3dm Read(path: str,tableTypeFilterFilter: TableTypeFilter,objectTypeFilter: ObjectTypeFilter) -> File3dm Read(path: str) -> File3dm """ pass @staticmethod def read_application_data(path, applicationName, applicationUrl, applicationDetails): """ ReadApplicationData(path: str) -> (str,str,str) """ pass @staticmethod def read_archive_version(path): """ ReadArchiveVersion(path: str) -> int """ pass @staticmethod def read_notes(path): """ ReadNotes(path: str) -> str """ pass @staticmethod def read_revision_history(path, createdBy, lastEditedBy, revision, createdOn, lastEditedOn): """ ReadRevisionHistory(path: str) -> (bool,str,str,int,DateTime,DateTime) """ pass @staticmethod def read_with_log(path, *__args): """ ReadWithLog(path: str) -> (File3dm,str) ReadWithLog(path: str,tableTypeFilterFilter: TableTypeFilter,objectTypeFilter: ObjectTypeFilter) -> (File3dm,str) """ pass def write(self, path, *__args): """ Write(self: File3dm,path: str,options: File3dmWriteOptions) -> bool Write(self: File3dm,path: str,version: int) -> bool """ pass def write_with_log(self, path, version, errorLog): """ WriteWithLog(self: File3dm,path: str,version: int) -> (bool,str) """ pass def __enter__(self, *args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self, *args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self, *args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __repr__(self, *args): """ __repr__(self: object) -> str """ pass application_details = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: ApplicationDetails(self: File3dm) -> str\n\n\n\nSet: ApplicationDetails(self: File3dm)=value\n\n' application_name = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: ApplicationName(self: File3dm) -> str\n\n\n\nSet: ApplicationName(self: File3dm)=value\n\n' application_url = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: ApplicationUrl(self: File3dm) -> str\n\n\n\nSet: ApplicationUrl(self: File3dm)=value\n\n' created = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Created(self: File3dm) -> DateTime\n\n\n\n' created_by = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: CreatedBy(self: File3dm) -> str\n\n\n\n' dim_styles = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: DimStyles(self: File3dm) -> IList[DimensionStyle]\n\n\n\n' hatch_patterns = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: HatchPatterns(self: File3dm) -> IList[HatchPattern]\n\n\n\n' history_records = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: HistoryRecords(self: File3dm) -> File3dmHistoryRecordTable\n\n\n\n' instance_definitions = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: InstanceDefinitions(self: File3dm) -> IList[InstanceDefinitionGeometry]\n\n\n\n' last_edited = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: LastEdited(self: File3dm) -> DateTime\n\n\n\n' last_edited_by = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: LastEditedBy(self: File3dm) -> str\n\n\n\n' layers = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Layers(self: File3dm) -> IList[Layer]\n\n\n\n' linetypes = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Linetypes(self: File3dm) -> IList[Linetype]\n\n\n\n' materials = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Materials(self: File3dm) -> IList[Material]\n\n\n\n' named_views = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: NamedViews(self: File3dm) -> IList[ViewInfo]\n\n\n\n' notes = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Notes(self: File3dm) -> File3dmNotes\n\n\n\nSet: Notes(self: File3dm)=value\n\n' objects = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Objects(self: File3dm) -> File3dmObjectTable\n\n\n\n' plug_in_data = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: PlugInData(self: File3dm) -> File3dmPlugInDataTable\n\n\n\n' revision = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Revision(self: File3dm) -> int\n\n\n\nSet: Revision(self: File3dm)=value\n\n' settings = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Settings(self: File3dm) -> File3dmSettings\n\n\n\n' start_section_comments = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: StartSectionComments(self: File3dm) -> str\n\n\n\nSet: StartSectionComments(self: File3dm)=value\n\n' views = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Views(self: File3dm) -> IList[ViewInfo]\n\n\n\n' object_type_filter = None table_type_filter = None class File3Dmhistoryrecordtable(object): def clear(self): """ Clear(self: File3dmHistoryRecordTable) """ pass def dump(self): """ Dump(self: File3dmHistoryRecordTable) -> str """ pass count = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Count(self: File3dmHistoryRecordTable) -> int\n\n\n\n' class File3Dmnotes(object): """ File3dmNotes() """ is_html = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: IsHtml(self: File3dmNotes) -> bool\n\n\n\nSet: IsHtml(self: File3dmNotes)=value\n\n' is_visible = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: IsVisible(self: File3dmNotes) -> bool\n\n\n\nSet: IsVisible(self: File3dmNotes)=value\n\n' notes = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Notes(self: File3dmNotes) -> str\n\n\n\nSet: Notes(self: File3dmNotes)=value\n\n' window_rectangle = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: WindowRectangle(self: File3dmNotes) -> Rectangle\n\n\n\nSet: WindowRectangle(self: File3dmNotes)=value\n\n' class File3Dmobject(object): attributes = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Attributes(self: File3dmObject) -> ObjectAttributes\n\n\n\n' geometry = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Geometry(self: File3dmObject) -> GeometryBase\n\n\n\n' name = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Name(self: File3dmObject) -> str\n\n\n\nSet: Name(self: File3dmObject)=value\n\n' class File3Dmobjecttable(object, IEnumerable[File3dmObject], IEnumerable, IRhinoTable[File3dmObject]): def add_arc(self, arc, attributes=None): """ AddArc(self: File3dmObjectTable,arc: Arc,attributes: ObjectAttributes) -> Guid AddArc(self: File3dmObjectTable,arc: Arc) -> Guid """ pass def add_brep(self, brep, attributes=None): """ AddBrep(self: File3dmObjectTable,brep: Brep,attributes: ObjectAttributes) -> Guid AddBrep(self: File3dmObjectTable,brep: Brep) -> Guid """ pass def add_circle(self, circle, attributes=None): """ AddCircle(self: File3dmObjectTable,circle: Circle,attributes: ObjectAttributes) -> Guid AddCircle(self: File3dmObjectTable,circle: Circle) -> Guid """ pass def add_clipping_plane(self, plane, uMagnitude, vMagnitude, *__args): """ AddClippingPlane(self: File3dmObjectTable,plane: Plane,uMagnitude: float,vMagnitude: float,clippedViewportIds: IEnumerable[Guid],attributes: ObjectAttributes) -> Guid AddClippingPlane(self: File3dmObjectTable,plane: Plane,uMagnitude: float,vMagnitude: float,clippedViewportIds: IEnumerable[Guid]) -> Guid AddClippingPlane(self: File3dmObjectTable,plane: Plane,uMagnitude: float,vMagnitude: float,clippedViewportId: Guid) -> Guid """ pass def add_curve(self, curve, attributes=None): """ AddCurve(self: File3dmObjectTable,curve: Curve,attributes: ObjectAttributes) -> Guid AddCurve(self: File3dmObjectTable,curve: Curve) -> Guid """ pass def add_ellipse(self, ellipse, attributes=None): """ AddEllipse(self: File3dmObjectTable,ellipse: Ellipse,attributes: ObjectAttributes) -> Guid AddEllipse(self: File3dmObjectTable,ellipse: Ellipse) -> Guid """ pass def add_extrusion(self, extrusion, attributes=None): """ AddExtrusion(self: File3dmObjectTable,extrusion: Extrusion,attributes: ObjectAttributes) -> Guid AddExtrusion(self: File3dmObjectTable,extrusion: Extrusion) -> Guid """ pass def add_hatch(self, hatch, attributes=None): """ AddHatch(self: File3dmObjectTable,hatch: Hatch,attributes: ObjectAttributes) -> Guid AddHatch(self: File3dmObjectTable,hatch: Hatch) -> Guid """ pass def add_leader(self, *__args): """ AddLeader(self: File3dmObjectTable,text: str,plane: Plane,points: IEnumerable[Point2d],attributes: ObjectAttributes) -> Guid AddLeader(self: File3dmObjectTable,text: str,plane: Plane,points: IEnumerable[Point2d]) -> Guid AddLeader(self: File3dmObjectTable,plane: Plane,points: IEnumerable[Point2d]) -> Guid AddLeader(self: File3dmObjectTable,plane: Plane,points: IEnumerable[Point2d],attributes: ObjectAttributes) -> Guid """ pass def add_line(self, *__args): """ AddLine(self: File3dmObjectTable,line: Line) -> Guid AddLine(self: File3dmObjectTable,line: Line,attributes: ObjectAttributes) -> Guid AddLine(self: File3dmObjectTable,from: Point3d,to: Point3d) -> Guid AddLine(self: File3dmObjectTable,from: Point3d,to: Point3d,attributes: ObjectAttributes) -> Guid """ pass def add_linear_dimension(self, dimension, attributes=None): """ AddLinearDimension(self: File3dmObjectTable,dimension: LinearDimension,attributes: ObjectAttributes) -> Guid AddLinearDimension(self: File3dmObjectTable,dimension: LinearDimension) -> Guid """ pass def add_mesh(self, mesh, attributes=None): """ AddMesh(self: File3dmObjectTable,mesh: Mesh,attributes: ObjectAttributes) -> Guid AddMesh(self: File3dmObjectTable,mesh: Mesh) -> Guid """ pass def add_point(self, *__args): """ AddPoint(self: File3dmObjectTable,point: Point3f) -> Guid AddPoint(self: File3dmObjectTable,point: Point3f,attributes: ObjectAttributes) -> Guid AddPoint(self: File3dmObjectTable,point: Point3d,attributes: ObjectAttributes) -> Guid AddPoint(self: File3dmObjectTable,x: float,y: float,z: float) -> Guid AddPoint(self: File3dmObjectTable,point: Point3d) -> Guid """ pass def add_point_cloud(self, *__args): """ AddPointCloud(self: File3dmObjectTable,points: IEnumerable[Point3d]) -> Guid AddPointCloud(self: File3dmObjectTable,points: IEnumerable[Point3d],attributes: ObjectAttributes) -> Guid AddPointCloud(self: File3dmObjectTable,cloud: PointCloud) -> Guid AddPointCloud(self: File3dmObjectTable,cloud: PointCloud,attributes: ObjectAttributes) -> Guid """ pass def add_points(self, points, attributes=None): """ AddPoints(self: File3dmObjectTable,points: IEnumerable[Point3f]) -> Array[Guid] AddPoints(self: File3dmObjectTable,points: IEnumerable[Point3f],attributes: ObjectAttributes) -> Array[Guid] AddPoints(self: File3dmObjectTable,points: IEnumerable[Point3d]) -> Array[Guid] AddPoints(self: File3dmObjectTable,points: IEnumerable[Point3d],attributes: ObjectAttributes) -> Array[Guid] """ pass def add_polyline(self, points, attributes=None): """ AddPolyline(self: File3dmObjectTable,points: IEnumerable[Point3d],attributes: ObjectAttributes) -> Guid AddPolyline(self: File3dmObjectTable,points: IEnumerable[Point3d]) -> Guid """ pass def add_sphere(self, sphere, attributes=None): """ AddSphere(self: File3dmObjectTable,sphere: Sphere,attributes: ObjectAttributes) -> Guid AddSphere(self: File3dmObjectTable,sphere: Sphere) -> Guid """ pass def add_surface(self, surface, attributes=None): """ AddSurface(self: File3dmObjectTable,surface: Surface,attributes: ObjectAttributes) -> Guid AddSurface(self: File3dmObjectTable,surface: Surface) -> Guid """ pass def add_text(self, text, plane, height, fontName, bold, italic, *__args): """ AddText(self: File3dmObjectTable,text: str,plane: Plane,height: float,fontName: str,bold: bool,italic: bool,justification: TextJustification,attributes: ObjectAttributes) -> Guid AddText(self: File3dmObjectTable,text: str,plane: Plane,height: float,fontName: str,bold: bool,italic: bool,attributes: ObjectAttributes) -> Guid AddText(self: File3dmObjectTable,text: str,plane: Plane,height: float,fontName: str,bold: bool,italic: bool) -> Guid AddText(self: File3dmObjectTable,text: str,plane: Plane,height: float,fontName: str,bold: bool,italic: bool,justification: TextJustification) -> Guid """ pass def add_text_dot(self, *__args): """ AddTextDot(self: File3dmObjectTable,dot: TextDot) -> Guid AddTextDot(self: File3dmObjectTable,dot: TextDot,attributes: ObjectAttributes) -> Guid AddTextDot(self: File3dmObjectTable,text: str,location: Point3d) -> Guid AddTextDot(self: File3dmObjectTable,text: str,location: Point3d,attributes: ObjectAttributes) -> Guid """ pass def delete(self, *__args): """ Delete(self: File3dmObjectTable,objectIds: IEnumerable[Guid]) -> int Delete(self: File3dmObjectTable,objectId: Guid) -> bool Delete(self: File3dmObjectTable,obj: File3dmObject) -> bool """ pass def dump(self): """ Dump(self: File3dmObjectTable) -> str """ pass def find_by_layer(self, layer): """ FindByLayer(self: File3dmObjectTable,layer: str) -> Array[File3dmObject] """ pass def get_bounding_box(self): """ GetBoundingBox(self: File3dmObjectTable) -> BoundingBox """ pass def get_enumerator(self): """ GetEnumerator(self: File3dmObjectTable) -> IEnumerator[File3dmObject] """ pass def __contains__(self, *args): """ __contains__[File3dmObject](enumerable: IEnumerable[File3dmObject],value: File3dmObject) -> bool """ pass def __getitem__(self, *args): """ x.__getitem__(y) <==> x[y] """ pass def __init__(self, *args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __iter__(self, *args): """ __iter__(self: IEnumerable) -> object """ pass def __repr__(self, *args): """ __repr__(self: object) -> str """ pass count = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Count(self: File3dmObjectTable) -> int\n\n\n\n' class File3Dmplugindata(object): plug_in_id = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: PlugInId(self: File3dmPlugInData) -> Guid\n\n\n\n' class File3Dmplugindatatable(object, IEnumerable[File3dmPlugInData], IEnumerable, IRhinoTable[File3dmPlugInData]): def clear(self): """ Clear(self: File3dmPlugInDataTable) """ pass def dump(self): """ Dump(self: File3dmPlugInDataTable) -> str """ pass def get_enumerator(self): """ GetEnumerator(self: File3dmPlugInDataTable) -> IEnumerator[File3dmPlugInData] """ pass def __contains__(self, *args): """ __contains__[File3dmPlugInData](enumerable: IEnumerable[File3dmPlugInData],value: File3dmPlugInData) -> bool """ pass def __getitem__(self, *args): """ x.__getitem__(y) <==> x[y] """ pass def __init__(self, *args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __iter__(self, *args): """ __iter__(self: IEnumerable) -> object """ pass def __repr__(self, *args): """ __repr__(self: object) -> str """ pass count = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Count(self: File3dmPlugInDataTable) -> int\n\n\n\n' class File3Dmsettings(object): model_absolute_tolerance = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: ModelAbsoluteTolerance(self: File3dmSettings) -> float\n\n\n\nSet: ModelAbsoluteTolerance(self: File3dmSettings)=value\n\n' model_angle_tolerance_degrees = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: ModelAngleToleranceDegrees(self: File3dmSettings) -> float\n\n\n\nSet: ModelAngleToleranceDegrees(self: File3dmSettings)=value\n\n' model_angle_tolerance_radians = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: ModelAngleToleranceRadians(self: File3dmSettings) -> float\n\n\n\nSet: ModelAngleToleranceRadians(self: File3dmSettings)=value\n\n' model_basepoint = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: ModelBasepoint(self: File3dmSettings) -> Point3d\n\n\n\nSet: ModelBasepoint(self: File3dmSettings)=value\n\n' model_relative_tolerance = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: ModelRelativeTolerance(self: File3dmSettings) -> float\n\n\n\nSet: ModelRelativeTolerance(self: File3dmSettings)=value\n\n' model_unit_system = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: ModelUnitSystem(self: File3dmSettings) -> UnitSystem\n\n\n\nSet: ModelUnitSystem(self: File3dmSettings)=value\n\n' model_url = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: ModelUrl(self: File3dmSettings) -> str\n\n\n\nSet: ModelUrl(self: File3dmSettings)=value\n\n' page_absolute_tolerance = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: PageAbsoluteTolerance(self: File3dmSettings) -> float\n\n\n\nSet: PageAbsoluteTolerance(self: File3dmSettings)=value\n\n' page_angle_tolerance_degrees = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: PageAngleToleranceDegrees(self: File3dmSettings) -> float\n\n\n\nSet: PageAngleToleranceDegrees(self: File3dmSettings)=value\n\n' page_angle_tolerance_radians = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: PageAngleToleranceRadians(self: File3dmSettings) -> float\n\n\n\nSet: PageAngleToleranceRadians(self: File3dmSettings)=value\n\n' page_relative_tolerance = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: PageRelativeTolerance(self: File3dmSettings) -> float\n\n\n\nSet: PageRelativeTolerance(self: File3dmSettings)=value\n\n' page_unit_system = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: PageUnitSystem(self: File3dmSettings) -> UnitSystem\n\n\n\nSet: PageUnitSystem(self: File3dmSettings)=value\n\n' class File3Dmtypecodes(object): tcode_analysis_mesh = None tcode_angular_dimension = None tcode_annotation = None tcode_annotation_leader = None tcode_annotation_settings = None tcode_anonymous_chunk = None tcode_bitmappreview = None tcode_bitmap_record = None tcode_bitmap_table = None tcode_bumpmap = None tcode_commentblock = None tcode_compressed_mesh_geometry = None tcode_cplane = None tcode_crc = None tcode_currentlayer = None tcode_dictionary = None tcode_dictionary_end = None tcode_dictionary_entry = None tcode_dictionary_id = None tcode_dimstyle_record = None tcode_dimstyle_table = None tcode_display = None tcode_disp_am_resolution = None tcode_disp_cplines = None tcode_disp_maxlength = None tcode_endoffile = None tcode_endoffile_goo = None tcode_endoftable = None tcode_font_record = None tcode_font_table = None tcode_geometry = None tcode_group_record = None tcode_group_table = None tcode_hatchpattern_record = None tcode_hatchpattern_table = None tcode_hide_trace = None tcode_historyrecord_record = None tcode_historyrecord_table = None tcode_instance_definition_record = None tcode_instance_definition_table = None tcode_interface = None tcode_layer = None tcode_layerindex = None tcode_layerlocked = None tcode_layermaterialindex = None tcode_layername = None tcode_layeron = None tcode_layerpickable = None tcode_layerref = None tcode_layerrenderable = None tcode_layersnapable = None tcode_layerstate = None tcode_layertable = None tcode_layerthawed = None tcode_layervisible = None tcode_layer_obselete_1 = None tcode_layer_obselete_2 = None tcode_layer_obselete_3 = None tcode_layer_record = None tcode_layer_table = None tcode_legacy_asm = None tcode_legacy_asmstuff = None tcode_legacy_bnd = None tcode_legacy_bndstuff = None tcode_legacy_crv = None tcode_legacy_crvstuff = None tcode_legacy_fac = None tcode_legacy_facstuff = None tcode_legacy_geometry = None tcode_legacy_pnt = None tcode_legacy_pntstuff = None tcode_legacy_prt = None tcode_legacy_prtstuff = None tcode_legacy_shl = None tcode_legacy_shlstuff = None tcode_legacy_spl = None tcode_legacy_splstuff = None tcode_legacy_srf = None tcode_legacy_srfstuff = None tcode_legacy_tol_angle = None tcode_legacy_tol_fit = None tcode_legacy_trm = None tcode_legacy_trmstuff = None tcode_light_record = None tcode_light_record_attributes = None tcode_light_record_attributes_userdata = None tcode_light_record_end = None tcode_light_table = None tcode_linear_dimension = None tcode_linetype_record = None tcode_linetype_table = None tcode_material_record = None tcode_material_table = None tcode_maximized_viewport = None tcode_mesh_object = None tcode_name = None tcode_named_cplane = None tcode_named_view = None tcode_near_clip_plane = None tcode_notes = None tcode_object_record = None tcode_object_record_attributes = None tcode_object_record_attributes_userdata = None tcode_object_record_end = None tcode_object_record_history = None tcode_object_record_history_data = None tcode_object_record_history_header = None tcode_object_record_type = None tcode_object_table = None tcode_obsolete_layerset_record = None tcode_obsolete_layerset_table = None tcode_old_fullmesh = None tcode_old_mesh_uv = None tcode_old_mesh_vertex_normals = None tcode_old_rh_trimesh = None tcode_opennurbs_class = None tcode_opennurbs_class_data = None tcode_opennurbs_class_end = None tcode_opennurbs_class_userdata = None tcode_opennurbs_class_userdata_header = None tcode_opennurbs_class_uuid = None tcode_opennurbs_object = None tcode_properties_application = None tcode_properties_compressed_previewimage = None tcode_properties_notes = None tcode_properties_opennurbs_version = None tcode_properties_previewimage = None tcode_properties_revisionhistory = None tcode_properties_table = None tcode_radial_dimension = None tcode_render = None tcode_rendermeshparams = None tcode_render_material_id = None tcode_rgb = None tcode_rgbdisplay = None tcode_rhinoio_object_brep = None tcode_rhinoio_object_data = None tcode_rhinoio_object_end = None tcode_rhinoio_object_nurbs_curve = None tcode_rhinoio_object_nurbs_surface = None tcode_rh_point = None tcode_rh_spotlight = None tcode_settings_analysismesh = None tcode_settings_annotation = None tcode_settings_attributes = None tcode_settings_current_color = None tcode_settings_current_dimstyle_index = None tcode_settings_current_font_index = None tcode_settings_current_layer_index = None tcode_settings_current_material_index = None tcode_settings_current_wire_density = None tcode_settings_grid_defaults = None tcode_settings_model_url = None tcode_settings_named_cplane_list = None tcode_settings_named_view_list = None tcode_settings_pluginlist = None tcode_settings_render = None tcode_settings_rendermesh = None tcode_settings_table = None tcode_settings_unitsandtols = None tcode_settings_view_list = None tcode_settings__never__use__this = None tcode_short = None tcode_showgrid = None tcode_showgridaxes = None tcode_showworldaxes = None tcode_snapsize = None tcode_stuff = None tcode_summary = None tcode_table = None tcode_tablerec = None tcode_texturemap = None tcode_texture_mapping_record = None tcode_texture_mapping_table = None tcode_text_block = None tcode_tolerance = None tcode_transparency = None tcode_unit_and_tolerances = None tcode_user = None tcode_user_record = None tcode_user_table = None tcode_user_table_uuid = None tcode_view = None tcode_viewport = None tcode_viewport_display_mode = None tcode_viewport_position = None tcode_viewport_traceinfo = None tcode_viewport_wallpaper = None tcode_view_attributes = None tcode_view_cplane = None tcode_view_displaymode = None tcode_view_name = None tcode_view_position = None tcode_view_record = None tcode_view_showconaxes = None tcode_view_showcongrid = None tcode_view_showworldaxes = None tcode_view_target = None tcode_view_traceimage = None tcode_view_viewport = None tcode_view_viewport_userdata = None tcode_view_wallpaper = None tcode_view_wallpaper_v3 = None tcode_xdata = None __all__ = ['TCODE_ANALYSIS_MESH', 'TCODE_ANGULAR_DIMENSION', 'TCODE_ANNOTATION', 'TCODE_ANNOTATION_LEADER', 'TCODE_ANNOTATION_SETTINGS', 'TCODE_ANONYMOUS_CHUNK', 'TCODE_BITMAP_RECORD', 'TCODE_BITMAP_TABLE', 'TCODE_BITMAPPREVIEW', 'TCODE_BUMPMAP', 'TCODE_COMMENTBLOCK', 'TCODE_COMPRESSED_MESH_GEOMETRY', 'TCODE_CPLANE', 'TCODE_CRC', 'TCODE_CURRENTLAYER', 'TCODE_DICTIONARY', 'TCODE_DICTIONARY_END', 'TCODE_DICTIONARY_ENTRY', 'TCODE_DICTIONARY_ID', 'TCODE_DIMSTYLE_RECORD', 'TCODE_DIMSTYLE_TABLE', 'TCODE_DISP_AM_RESOLUTION', 'TCODE_DISP_CPLINES', 'TCODE_DISP_MAXLENGTH', 'TCODE_DISPLAY', 'TCODE_ENDOFFILE', 'TCODE_ENDOFFILE_GOO', 'TCODE_ENDOFTABLE', 'TCODE_FONT_RECORD', 'TCODE_FONT_TABLE', 'TCODE_GEOMETRY', 'TCODE_GROUP_RECORD', 'TCODE_GROUP_TABLE', 'TCODE_HATCHPATTERN_RECORD', 'TCODE_HATCHPATTERN_TABLE', 'TCODE_HIDE_TRACE', 'TCODE_HISTORYRECORD_RECORD', 'TCODE_HISTORYRECORD_TABLE', 'TCODE_INSTANCE_DEFINITION_RECORD', 'TCODE_INSTANCE_DEFINITION_TABLE', 'TCODE_INTERFACE', 'TCODE_LAYER', 'TCODE_LAYER_OBSELETE_1', 'TCODE_LAYER_OBSELETE_2', 'TCODE_LAYER_OBSELETE_3', 'TCODE_LAYER_RECORD', 'TCODE_LAYER_TABLE', 'TCODE_LAYERINDEX', 'TCODE_LAYERLOCKED', 'TCODE_LAYERMATERIALINDEX', 'TCODE_LAYERNAME', 'TCODE_LAYERON', 'TCODE_LAYERPICKABLE', 'TCODE_LAYERREF', 'TCODE_LAYERRENDERABLE', 'TCODE_LAYERSNAPABLE', 'TCODE_LAYERSTATE', 'TCODE_LAYERTABLE', 'TCODE_LAYERTHAWED', 'TCODE_LAYERVISIBLE', 'TCODE_LEGACY_ASM', 'TCODE_LEGACY_ASMSTUFF', 'TCODE_LEGACY_BND', 'TCODE_LEGACY_BNDSTUFF', 'TCODE_LEGACY_CRV', 'TCODE_LEGACY_CRVSTUFF', 'TCODE_LEGACY_FAC', 'TCODE_LEGACY_FACSTUFF', 'TCODE_LEGACY_GEOMETRY', 'TCODE_LEGACY_PNT', 'TCODE_LEGACY_PNTSTUFF', 'TCODE_LEGACY_PRT', 'TCODE_LEGACY_PRTSTUFF', 'TCODE_LEGACY_SHL', 'TCODE_LEGACY_SHLSTUFF', 'TCODE_LEGACY_SPL', 'TCODE_LEGACY_SPLSTUFF', 'TCODE_LEGACY_SRF', 'TCODE_LEGACY_SRFSTUFF', 'TCODE_LEGACY_TOL_ANGLE', 'TCODE_LEGACY_TOL_FIT', 'TCODE_LEGACY_TRM', 'TCODE_LEGACY_TRMSTUFF', 'TCODE_LIGHT_RECORD', 'TCODE_LIGHT_RECORD_ATTRIBUTES', 'TCODE_LIGHT_RECORD_ATTRIBUTES_USERDATA', 'TCODE_LIGHT_RECORD_END', 'TCODE_LIGHT_TABLE', 'TCODE_LINEAR_DIMENSION', 'TCODE_LINETYPE_RECORD', 'TCODE_LINETYPE_TABLE', 'TCODE_MATERIAL_RECORD', 'TCODE_MATERIAL_TABLE', 'TCODE_MAXIMIZED_VIEWPORT', 'TCODE_MESH_OBJECT', 'TCODE_NAME', 'TCODE_NAMED_CPLANE', 'TCODE_NAMED_VIEW', 'TCODE_NEAR_CLIP_PLANE', 'TCODE_NOTES', 'TCODE_OBJECT_RECORD', 'TCODE_OBJECT_RECORD_ATTRIBUTES', 'TCODE_OBJECT_RECORD_ATTRIBUTES_USERDATA', 'TCODE_OBJECT_RECORD_END', 'TCODE_OBJECT_RECORD_HISTORY', 'TCODE_OBJECT_RECORD_HISTORY_DATA', 'TCODE_OBJECT_RECORD_HISTORY_HEADER', 'TCODE_OBJECT_RECORD_TYPE', 'TCODE_OBJECT_TABLE', 'TCODE_OBSOLETE_LAYERSET_RECORD', 'TCODE_OBSOLETE_LAYERSET_TABLE', 'TCODE_OLD_FULLMESH', 'TCODE_OLD_MESH_UV', 'TCODE_OLD_MESH_VERTEX_NORMALS', 'TCODE_OLD_RH_TRIMESH', 'TCODE_OPENNURBS_CLASS', 'TCODE_OPENNURBS_CLASS_DATA', 'TCODE_OPENNURBS_CLASS_END', 'TCODE_OPENNURBS_CLASS_USERDATA', 'TCODE_OPENNURBS_CLASS_USERDATA_HEADER', 'TCODE_OPENNURBS_CLASS_UUID', 'TCODE_OPENNURBS_OBJECT', 'TCODE_PROPERTIES_APPLICATION', 'TCODE_PROPERTIES_COMPRESSED_PREVIEWIMAGE', 'TCODE_PROPERTIES_NOTES', 'TCODE_PROPERTIES_OPENNURBS_VERSION', 'TCODE_PROPERTIES_PREVIEWIMAGE', 'TCODE_PROPERTIES_REVISIONHISTORY', 'TCODE_PROPERTIES_TABLE', 'TCODE_RADIAL_DIMENSION', 'TCODE_RENDER', 'TCODE_RENDER_MATERIAL_ID', 'TCODE_RENDERMESHPARAMS', 'TCODE_RGB', 'TCODE_RGBDISPLAY', 'TCODE_RH_POINT', 'TCODE_RH_SPOTLIGHT', 'TCODE_RHINOIO_OBJECT_BREP', 'TCODE_RHINOIO_OBJECT_DATA', 'TCODE_RHINOIO_OBJECT_END', 'TCODE_RHINOIO_OBJECT_NURBS_CURVE', 'TCODE_RHINOIO_OBJECT_NURBS_SURFACE', 'TCODE_SETTINGS__NEVER__USE__THIS', 'TCODE_SETTINGS_ANALYSISMESH', 'TCODE_SETTINGS_ANNOTATION', 'TCODE_SETTINGS_ATTRIBUTES', 'TCODE_SETTINGS_CURRENT_COLOR', 'TCODE_SETTINGS_CURRENT_DIMSTYLE_INDEX', 'TCODE_SETTINGS_CURRENT_FONT_INDEX', 'TCODE_SETTINGS_CURRENT_LAYER_INDEX', 'TCODE_SETTINGS_CURRENT_MATERIAL_INDEX', 'TCODE_SETTINGS_CURRENT_WIRE_DENSITY', 'TCODE_SETTINGS_GRID_DEFAULTS', 'TCODE_SETTINGS_MODEL_URL', 'TCODE_SETTINGS_NAMED_CPLANE_LIST', 'TCODE_SETTINGS_NAMED_VIEW_LIST', 'TCODE_SETTINGS_PLUGINLIST', 'TCODE_SETTINGS_RENDER', 'TCODE_SETTINGS_RENDERMESH', 'TCODE_SETTINGS_TABLE', 'TCODE_SETTINGS_UNITSANDTOLS', 'TCODE_SETTINGS_VIEW_LIST', 'TCODE_SHORT', 'TCODE_SHOWGRID', 'TCODE_SHOWGRIDAXES', 'TCODE_SHOWWORLDAXES', 'TCODE_SNAPSIZE', 'TCODE_STUFF', 'TCODE_SUMMARY', 'TCODE_TABLE', 'TCODE_TABLEREC', 'TCODE_TEXT_BLOCK', 'TCODE_TEXTURE_MAPPING_RECORD', 'TCODE_TEXTURE_MAPPING_TABLE', 'TCODE_TEXTUREMAP', 'TCODE_TOLERANCE', 'TCODE_TRANSPARENCY', 'TCODE_UNIT_AND_TOLERANCES', 'TCODE_USER', 'TCODE_USER_RECORD', 'TCODE_USER_TABLE', 'TCODE_USER_TABLE_UUID', 'TCODE_VIEW', 'TCODE_VIEW_ATTRIBUTES', 'TCODE_VIEW_CPLANE', 'TCODE_VIEW_DISPLAYMODE', 'TCODE_VIEW_NAME', 'TCODE_VIEW_POSITION', 'TCODE_VIEW_RECORD', 'TCODE_VIEW_SHOWCONAXES', 'TCODE_VIEW_SHOWCONGRID', 'TCODE_VIEW_SHOWWORLDAXES', 'TCODE_VIEW_TARGET', 'TCODE_VIEW_TRACEIMAGE', 'TCODE_VIEW_VIEWPORT', 'TCODE_VIEW_VIEWPORT_USERDATA', 'TCODE_VIEW_WALLPAPER', 'TCODE_VIEW_WALLPAPER_V3', 'TCODE_VIEWPORT', 'TCODE_VIEWPORT_DISPLAY_MODE', 'TCODE_VIEWPORT_POSITION', 'TCODE_VIEWPORT_TRACEINFO', 'TCODE_VIEWPORT_WALLPAPER', 'TCODE_XDATA'] class File3Dmwriteoptions(object): """ File3dmWriteOptions() """ save_analysis_meshes = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: SaveAnalysisMeshes(self: File3dmWriteOptions) -> bool\n\n\n\nSet: SaveAnalysisMeshes(self: File3dmWriteOptions)=value\n\n' save_render_meshes = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: SaveRenderMeshes(self: File3dmWriteOptions) -> bool\n\n\n\nSet: SaveRenderMeshes(self: File3dmWriteOptions)=value\n\n' save_user_data = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: SaveUserData(self: File3dmWriteOptions) -> bool\n\n\n\nSet: SaveUserData(self: File3dmWriteOptions)=value\n\n' version = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Version(self: File3dmWriteOptions) -> int\n\n\n\nSet: Version(self: File3dmWriteOptions)=value\n\n' class Filetype(object): """ FileType(extension: str,description: str) """ @staticmethod def __new__(self, extension, description): """ __new__(cls: type,extension: str,description: str) """ pass description = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Description(self: FileType) -> str\n\n\n\n' extension = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: Extension(self: FileType) -> str\n\n\n\n' class Serializationoptions(object): """ SerializationOptions() """ rhino_version = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: RhinoVersion(self: SerializationOptions) -> int\n\n\n\nSet: RhinoVersion(self: SerializationOptions)=value\n\n' write_user_data = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: WriteUserData(self: SerializationOptions) -> bool\n\n\n\nSet: WriteUserData(self: SerializationOptions)=value\n\n' class Textlog(object, IDisposable): """ TextLog() TextLog(filename: str) """ def dispose(self): """ Dispose(self: TextLog) """ pass def pop_indent(self): """ PopIndent(self: TextLog) """ pass def print(self, *__args): """ Print(self: TextLog,format: str,arg0: object,arg1: object)Print(self: TextLog,format: str,arg0: object)Print(self: TextLog,text: str) """ pass def print_wrapped_text(self, text, lineLength): """ PrintWrappedText(self: TextLog,text: str,lineLength: int) """ pass def push_indent(self): """ PushIndent(self: TextLog) """ pass def to_string(self): """ ToString(self: TextLog) -> str """ pass def __enter__(self, *args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self, *args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self, *args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass @staticmethod def __new__(self, filename=None): """ __new__(cls: type) __new__(cls: type,filename: str) """ pass def __repr__(self, *args): """ __repr__(self: object) -> str """ pass def __str__(self, *args): pass indent_size = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get: IndentSize(self: TextLog) -> int\n\n\n\nSet: IndentSize(self: TextLog)=value\n\n'
# Long lines of method , extracing methods is impossible # from class Order: # ... def price(self): primaryBasePrice = 0 secondaryBasePrice = 0 tertiaryBasePrice = 0 # long computation. # ... pass # to class Order: # ... def price(self): return PriceCalculator(self).compute() class PriceCalculator: def __init__(self, order): self._primaryBasePrice = 0 self._secondaryBasePrice = 0 self._tertiaryBasePrice = 0 # copy relevant information from order object. # ... def compute(self): # long computation. # ... pass
class Order: def price(self): primary_base_price = 0 secondary_base_price = 0 tertiary_base_price = 0 pass class Order: def price(self): return price_calculator(self).compute() class Pricecalculator: def __init__(self, order): self._primaryBasePrice = 0 self._secondaryBasePrice = 0 self._tertiaryBasePrice = 0 def compute(self): pass
def _shader_db(var_type, DB): [FLAG, MATERIAL, STR, TEXTURE, INT, FLOAT, BOOL, COLOR, VEC2, VEC3, VEC4, MATRIX, MATRIX_4X2, FOUR_CC] = var_type DB['%compile2dsky'] = FLAG DB['%compileblocklos'] = FLAG DB['%compileclip'] = FLAG DB['%compiledetail'] = FLAG DB['%compilefog'] = FLAG DB['%compilegrenadeclip'] = FLAG DB['%compilehint'] = FLAG DB['%compileladder'] = FLAG DB['%compilenochop'] = FLAG DB['%compilenodraw'] = FLAG DB['%compilenolight'] = FLAG DB['%compilenonsolid'] = FLAG DB['%compilenpcclip'] = FLAG DB['%compileorigin'] = FLAG DB['%compilepassbullets'] = FLAG DB['%compileskip'] = FLAG DB['%compilesky'] = FLAG DB['%compileslime'] = FLAG DB['%compileteam'] = FLAG DB['%compiletrigger'] = FLAG DB['%compilewater'] = FLAG DB['%nopaint'] = FLAG DB['%noportal'] = FLAG DB['%notooltexture'] = FLAG DB['%playerclip'] = FLAG DB['additive'] = FLAG DB['allowalphatocoverage'] = FLAG DB['alphamodifiedbyproxy_do_not_set_in_vmt'] = FLAG DB['alphatest'] = FLAG DB['basealphaenvmapmask'] = FLAG DB['debug'] = FLAG DB['decal'] = FLAG DB['envmapcameraspace'] = FLAG DB['envmapmode'] = FLAG DB['envmapsphere'] = FLAG DB['flat'] = FLAG DB['halflambert'] = FLAG DB['ignorez'] = FLAG DB['model'] = FLAG DB['multipass'] = FLAG DB['multiply'] = FLAG DB['no_draw'] = FLAG DB['no_fullbright'] = FLAG DB['noalphamod'] = FLAG DB['nocull'] = FLAG DB['nodecal'] = FLAG DB['nofog'] = FLAG DB['normalmapalphaenvmapmask'] = FLAG DB['notint'] = FLAG DB['opaquetexture'] = FLAG DB['pseudotranslucent'] = FLAG DB['selfillum'] = FLAG DB['softwareskin'] = FLAG DB['translucent'] = FLAG DB['use_in_fillrate_mode'] = FLAG DB['vertexalpha'] = FLAG DB['vertexfog'] = FLAG DB['wireframe'] = FLAG DB['xxxxxxunusedxxxxx'] = FLAG DB['znearer'] = FLAG DB['bottommaterial'] = MATERIAL DB['crackmaterial'] = MATERIAL DB['translucent_material'] = MATERIAL DB['%detailtype'] = STR DB['%keywords'] = STR DB['fallback'] = STR DB['pixshader'] = STR DB['surfaceprop'] = STR DB['surfaceprop2'] = STR DB['vertexshader'] = STR DB['%tooltexture'] = TEXTURE DB['albedo'] = TEXTURE DB['alphamasktexture'] = TEXTURE DB['ambientoccltexture'] = TEXTURE DB['anisodirtexture'] = TEXTURE DB['ao'] = TEXTURE DB['aomap'] = TEXTURE DB['aoscreenbuffer'] = TEXTURE DB['aotexture'] = TEXTURE DB['backingtexture'] = TEXTURE DB['basetexture'] = TEXTURE DB['basetexture2'] = TEXTURE DB['basetexture3'] = TEXTURE DB['basetexture4'] = TEXTURE DB['blendmodulatetexture'] = TEXTURE DB['bloomtexture'] = TEXTURE DB['blurredtexture'] = TEXTURE DB['blurtexture'] = TEXTURE DB['bumpcompress'] = TEXTURE DB['bumpmap'] = TEXTURE DB['bumpmap2'] = TEXTURE DB['bumpmask'] = TEXTURE DB['bumpstretch'] = TEXTURE DB['canvas'] = TEXTURE DB['cbtexture'] = TEXTURE DB['cloudalphatexture'] = TEXTURE DB['colorbar'] = TEXTURE DB['colorwarptexture'] = TEXTURE DB['compress'] = TEXTURE DB['cookietexture'] = TEXTURE DB['corecolortexture'] = TEXTURE DB['corneatexture'] = TEXTURE DB['crtexture'] = TEXTURE DB['decaltexture'] = TEXTURE DB['delta'] = TEXTURE DB['depthtexture'] = TEXTURE DB['detail'] = TEXTURE DB['detail1'] = TEXTURE DB['detail2'] = TEXTURE DB['detailnormal'] = TEXTURE DB['displacementmap'] = TEXTURE DB['distortmap'] = TEXTURE DB['dudvmap'] = TEXTURE DB['dust_texture'] = TEXTURE DB['effectmaskstexture'] = TEXTURE DB['emissiveblendbasetexture'] = TEXTURE DB['emissiveblendflowtexture'] = TEXTURE DB['emissiveblendtexture'] = TEXTURE DB['envmap'] = TEXTURE DB['envmapmask'] = TEXTURE DB['envmapmask2'] = TEXTURE DB['exposure_texture'] = TEXTURE DB['exptexture'] = TEXTURE DB['fb_texture'] = TEXTURE DB['fbtexture'] = TEXTURE DB['fleshbordertexture1d'] = TEXTURE DB['fleshcubetexture'] = TEXTURE DB['fleshinteriornoisetexture'] = TEXTURE DB['fleshinteriortexture'] = TEXTURE DB['fleshnormaltexture'] = TEXTURE DB['fleshsubsurfacetexture'] = TEXTURE DB['flow_noise_texture'] = TEXTURE DB['flowbounds'] = TEXTURE DB['flowmap'] = TEXTURE DB['fow'] = TEXTURE DB['frame_texture'] = TEXTURE DB['frametexture'] = TEXTURE DB['fresnelcolorwarptexture'] = TEXTURE DB['fresnelrangestexture'] = TEXTURE DB['fresnelwarptexture'] = TEXTURE DB['frontndtexture'] = TEXTURE DB['glassenvmap'] = TEXTURE DB['glint'] = TEXTURE DB['gradienttexture'] = TEXTURE DB['grain'] = TEXTURE DB['grain_texture'] = TEXTURE DB['grime'] = TEXTURE DB['grunge'] = TEXTURE DB['grungetexture'] = TEXTURE DB['hdrbasetexture'] = TEXTURE DB['hdrcompressedtexture'] = TEXTURE DB['hdrcompressedtexture0'] = TEXTURE DB['hdrcompressedtexture1'] = TEXTURE DB['hdrcompressedtexture2'] = TEXTURE DB['holomask'] = TEXTURE DB['holospectrum'] = TEXTURE DB['input'] = TEXTURE DB['input_texture'] = TEXTURE DB['internal_vignettetexture'] = TEXTURE DB['iridescentwarp'] = TEXTURE DB['iris'] = TEXTURE DB['lightmap'] = TEXTURE DB['lightwarptexture'] = TEXTURE DB['logomap'] = TEXTURE DB['maskmap'] = TEXTURE DB['maps1'] = TEXTURE DB['maps2'] = TEXTURE DB['maps3'] = TEXTURE DB['masks1'] = TEXTURE DB['masks2'] = TEXTURE DB['maskstexture'] = TEXTURE DB['materialmask'] = TEXTURE DB['noise'] = TEXTURE DB['noisemap'] = TEXTURE DB['noisetexture'] = TEXTURE DB['normalmap'] = TEXTURE DB['normalmap2'] = TEXTURE DB['offsetmap'] = TEXTURE DB['opacitytexture'] = TEXTURE DB['originaltexture'] = TEXTURE DB['paintsplatenvmap'] = TEXTURE DB['paintsplatnormalmap'] = TEXTURE DB['painttexture'] = TEXTURE DB['pattern'] = TEXTURE DB['pattern1'] = TEXTURE DB['pattern2'] = TEXTURE DB['phongexponenttexture'] = TEXTURE DB['phongwarptexture'] = TEXTURE DB['portalcolortexture'] = TEXTURE DB['portalmasktexture'] = TEXTURE DB['postexture'] = TEXTURE DB['ramptexture'] = TEXTURE DB['reflecttexture'] = TEXTURE DB['refracttexture'] = TEXTURE DB['refracttinttexture'] = TEXTURE DB['sampleoffsettexture'] = TEXTURE DB['scenedepth'] = TEXTURE DB['screeneffecttexture'] = TEXTURE DB['selfillummap'] = TEXTURE DB['selfillummask'] = TEXTURE DB['selfillumtexture'] = TEXTURE DB['shadowdepthtexture'] = TEXTURE DB['sheenmap'] = TEXTURE DB['sheenmapmask'] = TEXTURE DB['sidespeed'] = TEXTURE DB['simpleoverlay'] = TEXTURE DB['smallfb'] = TEXTURE DB['sourcemrtrendertarget'] = TEXTURE DB['specmasktexture'] = TEXTURE DB['spectexture'] = TEXTURE DB['spectexture2'] = TEXTURE DB['spectexture3'] = TEXTURE DB['spectexture4'] = TEXTURE DB['spherenormal'] = TEXTURE DB['srctexture0'] = TEXTURE DB['srctexture1'] = TEXTURE DB['srctexture2'] = TEXTURE DB['srctexture3'] = TEXTURE DB['staticblendtexture'] = TEXTURE DB['stitchtexture'] = TEXTURE DB['stretch'] = TEXTURE DB['stripetexture'] = TEXTURE DB['surfacetexture'] = TEXTURE DB['test_texture'] = TEXTURE DB['texture0'] = TEXTURE DB['texture1'] = TEXTURE DB['texture2'] = TEXTURE DB['texture3'] = TEXTURE DB['texture4'] = TEXTURE DB['tintmasktexture'] = TEXTURE DB['transmatmaskstexture'] = TEXTURE DB['underwateroverlay'] = TEXTURE DB['velocity_texture'] = TEXTURE DB['vignette_texture'] = TEXTURE DB['vignette_tile'] = TEXTURE DB['warptexture'] = TEXTURE DB['weartexture'] = TEXTURE DB['ytexture'] = TEXTURE DB['addoverblend'] = INT DB['alpha_blend'] = INT DB['alpha_blend_color_overlay'] = INT DB['alphablend'] = INT DB['alphadepth'] = INT DB['alphamask'] = INT DB['alphamasktextureframe'] = INT DB['ambientboostmaskmode'] = INT DB['ambientonly'] = INT DB['aomode'] = INT DB['basediffuseoverride'] = INT DB['basemapalphaphongmask'] = INT DB['basemapluminancephongmask'] = INT DB['bloomtintenable'] = INT DB['bloomtype'] = INT DB['bumpframe'] = INT DB['bumpframe2'] = INT DB['clearalpha'] = INT DB['cleardepth'] = INT DB['combine_mode'] = INT DB['compositemode'] = INT DB['cookieframenum'] = INT DB['copyalpha'] = INT DB['corecolortextureframe'] = INT DB['cstrike'] = INT DB['cull'] = INT DB['decalblendmode'] = INT DB['decalstyle'] = INT DB['depth_feather'] = INT DB['depthtest'] = INT DB['desaturateenable'] = INT DB['detail1blendmode'] = INT DB['detail1frame'] = INT DB['detail2blendmode'] = INT DB['detail2frame'] = INT DB['detailblendmode'] = INT DB['detailframe'] = INT DB['detailframe2'] = INT DB['disable_color_writes'] = INT DB['dualsequence'] = INT DB['dudvframe'] = INT DB['effect'] = INT DB['enableshadows'] = INT DB['envmapframe'] = INT DB['envmapmaskframe'] = INT DB['envmapmaskframe2'] = INT DB['envmapoptional'] = INT DB['exponentmode'] = INT DB['extractgreenalpha'] = INT DB['fade'] = INT DB['flowmapframe'] = INT DB['frame'] = INT DB['frame2'] = INT DB['frame3'] = INT DB['frame4'] = INT DB['fullbright'] = INT DB['gammacolorread'] = INT DB['ghostoverlay'] = INT DB['hudtranslucent'] = INT DB['hudundistort'] = INT DB['invertphongmask'] = INT DB['irisframe'] = INT DB['isfloat'] = INT DB['kernel'] = INT DB['linearread_basetexture'] = INT DB['linearread_texture1'] = INT DB['linearread_texture2'] = INT DB['linearread_texture3'] = INT DB['linearwrite'] = INT DB['maskedblending'] = INT DB['maxlumframeblend1'] = INT DB['maxlumframeblend2'] = INT DB['mirroraboutviewportedges'] = INT DB['mode'] = INT DB['mrtindex'] = INT DB['multiplycolor'] = INT DB['ncolors'] = INT DB['nocolorwrite'] = INT DB['nodiffusebumplighting'] = INT DB['notint'] = INT DB['noviewportfixup'] = INT DB['nowritez'] = INT DB['num_lookups'] = INT DB['orientation'] = INT DB['paintstyle'] = INT DB['parallaxmap'] = INT DB['passcount'] = INT DB['patternreplaceindex'] = INT DB['phongintensity'] = INT DB['pointsample_basetexture'] = INT DB['pointsample_texture1'] = INT DB['pointsample_texture2'] = INT DB['pointsample_texture3'] = INT DB['quality'] = INT DB['receiveflashlight'] = INT DB['refracttinttextureframe'] = INT DB['reloadzcull'] = INT DB['renderfixz'] = INT DB['selector0'] = INT DB['selector1'] = INT DB['selector2'] = INT DB['selector3'] = INT DB['selector4'] = INT DB['selector5'] = INT DB['selector6'] = INT DB['selector7'] = INT DB['selector8'] = INT DB['selector9'] = INT DB['selector10'] = INT DB['selector11'] = INT DB['selector12'] = INT DB['selector13'] = INT DB['selector14'] = INT DB['selector15'] = INT DB['selfillumtextureframe'] = INT DB['sequence_blend_mode'] = INT DB['shadowdepth'] = INT DB['sheenindex'] = INT DB['sheenmapmaskdirection'] = INT DB['sheenmapmaskframe'] = INT DB['singlepassflashlight'] = INT DB['splinetype'] = INT DB['spriteorientation'] = INT DB['spriterendermode'] = INT DB['ssbump'] = INT DB['stage'] = INT DB['staticblendtextureframe'] = INT DB['tcsize0'] = INT DB['tcsize1'] = INT DB['tcsize2'] = INT DB['tcsize3'] = INT DB['tcsize4'] = INT DB['tcsize5'] = INT DB['tcsize6'] = INT DB['tcsize7'] = INT DB['texture3_blendmode'] = INT DB['texture4_blendmode'] = INT DB['textureinputcount'] = INT DB['texturemode'] = INT DB['treesway'] = INT DB['tv_gamma'] = INT DB['uberlight'] = INT DB['usealternateviewmatrix'] = INT DB['userendertarget'] = INT DB['vertex_lit'] = INT DB['vertexalphatest'] = INT DB['vertexcolor'] = INT DB['vertextransform'] = INT DB['writealpha'] = INT DB['writedepth'] = INT DB['x360appchooser'] = INT DB['addbasetexture2'] = FLOAT DB['addself'] = FLOAT DB['alpha'] = FLOAT DB['alpha2'] = FLOAT DB['alphasharpenfactor'] = FLOAT DB['alphatested'] = FLOAT DB['alphatestreference'] = FLOAT DB['alphatrailfade'] = FLOAT DB['ambientboost'] = FLOAT DB['ambientocclusion'] = FLOAT DB['ambientreflectionboost'] = FLOAT DB['anisotropyamount'] = FLOAT DB['armwidthbias'] = FLOAT DB['armwidthexp'] = FLOAT DB['armwidthscale'] = FLOAT DB['autoexpose_max'] = FLOAT DB['autoexpose_min'] = FLOAT DB['backscatter'] = FLOAT DB['bias'] = FLOAT DB['blendsoftness'] = FLOAT DB['blendtintcoloroverbase'] = FLOAT DB['bloomexp'] = FLOAT DB['bloomexponent'] = FLOAT DB['bloomsaturation'] = FLOAT DB['bloomwidth'] = FLOAT DB['bluramount'] = FLOAT DB['blurredvignettescale'] = FLOAT DB['bumpdetailscale1'] = FLOAT DB['bumpdetailscale2'] = FLOAT DB['bumpstrength'] = FLOAT DB['c0_w'] = FLOAT DB['c0_x'] = FLOAT DB['c0_y'] = FLOAT DB['c0_z'] = FLOAT DB['c1_w'] = FLOAT DB['c1_x'] = FLOAT DB['c1_y'] = FLOAT DB['c1_z'] = FLOAT DB['c2_w'] = FLOAT DB['c2_x'] = FLOAT DB['c2_y'] = FLOAT DB['c2_z'] = FLOAT DB['c3_w'] = FLOAT DB['c3_x'] = FLOAT DB['c3_y'] = FLOAT DB['c3_z'] = FLOAT DB['c4_w'] = FLOAT DB['c4_x'] = FLOAT DB['c4_y'] = FLOAT DB['c4_z'] = FLOAT DB['cavitycontrast'] = FLOAT DB['cheapwaterenddistance'] = FLOAT DB['cheapwaterstartdistance'] = FLOAT DB['cloakfactor'] = FLOAT DB['color_flow_displacebynormalstrength'] = FLOAT DB['color_flow_lerpexp'] = FLOAT DB['color_flow_timeintervalinseconds'] = FLOAT DB['color_flow_timescale'] = FLOAT DB['color_flow_uvscale'] = FLOAT DB['color_flow_uvscrolldistance'] = FLOAT DB['colorgamma'] = FLOAT DB['contrast'] = FLOAT DB['contrast_correction'] = FLOAT DB['corneabumpstrength'] = FLOAT DB['crosshaircoloradapt'] = FLOAT DB['decalfadeduration'] = FLOAT DB['decalfadetime'] = FLOAT DB['decalscale'] = FLOAT DB['deltascale'] = FLOAT DB['depthblendscale'] = FLOAT DB['depthblurfocaldistance'] = FLOAT DB['depthblurstrength'] = FLOAT DB['desatbasetint'] = FLOAT DB['desaturatewithbasealpha'] = FLOAT DB['desaturation'] = FLOAT DB['detail1blendfactor'] = FLOAT DB['detail1scale'] = FLOAT DB['detail2blendfactor'] = FLOAT DB['detail2scale'] = FLOAT DB['detailblendfactor'] = FLOAT DB['detailblendfactor2'] = FLOAT DB['detailblendfactor3'] = FLOAT DB['detailblendfactor4'] = FLOAT DB['detailscale'] = FLOAT DB['detailscale2'] = FLOAT DB['diffuse_base'] = FLOAT DB['diffuse_white'] = FLOAT DB['diffuseboost'] = FLOAT DB['diffuseexponent'] = FLOAT DB['diffusescale'] = FLOAT DB['diffusesoftnormal'] = FLOAT DB['dilation'] = FLOAT DB['dof_max'] = FLOAT DB['dof_power'] = FLOAT DB['dof_start_distance'] = FLOAT DB['dropshadowdepthexaggeration'] = FLOAT DB['dropshadowhighlightscale'] = FLOAT DB['dropshadowopacity'] = FLOAT DB['dropshadowscale'] = FLOAT DB['edge_softness'] = FLOAT DB['edgesoftnessend'] = FLOAT DB['edgesoftnessstart'] = FLOAT DB['emissiveblendstrength'] = FLOAT DB['endfadesize'] = FLOAT DB['envmapanisotropyscale'] = FLOAT DB['envmapcontrast'] = FLOAT DB['envmapfresnel'] = FLOAT DB['envmaplightscale'] = FLOAT DB['envmapmaskscale'] = FLOAT DB['envmapsaturation'] = FLOAT DB['eyeballradius'] = FLOAT DB['fadetoblackscale'] = FLOAT DB['fakerimboost'] = FLOAT DB['falloffamount'] = FLOAT DB['falloffdistance'] = FLOAT DB['falloffoffset'] = FLOAT DB['farblurdepth'] = FLOAT DB['farblurradius'] = FLOAT DB['farfadeinterval'] = FLOAT DB['farfocusdepth'] = FLOAT DB['farplane'] = FLOAT DB['farz'] = FLOAT DB['flashlighttime'] = FLOAT DB['flashlighttint'] = FLOAT DB['fleshbordernoisescale'] = FLOAT DB['fleshbordersoftness'] = FLOAT DB['fleshborderwidth'] = FLOAT DB['fleshglobalopacity'] = FLOAT DB['fleshglossbrightness'] = FLOAT DB['fleshscrollspeed'] = FLOAT DB['flipfixup'] = FLOAT DB['flow_bumpstrength'] = FLOAT DB['flow_color_intensity'] = FLOAT DB['flow_lerpexp'] = FLOAT DB['flow_noise_scale'] = FLOAT DB['flow_normaluvscale'] = FLOAT DB['flow_timeintervalinseconds'] = FLOAT DB['flow_timescale'] = FLOAT DB['flow_uvscrolldistance'] = FLOAT DB['flow_vortex_size'] = FLOAT DB['flow_worlduvscale'] = FLOAT DB['flowmaptexcoordoffset'] = FLOAT DB['fogend'] = FLOAT DB['fogexponent'] = FLOAT DB['fogfadeend'] = FLOAT DB['fogfadestart'] = FLOAT DB['fogscale'] = FLOAT DB['fogstart'] = FLOAT DB['forcefresnel'] = FLOAT DB['forwardscatter'] = FLOAT DB['fresnelbumpstrength'] = FLOAT DB['fresnelpower'] = FLOAT DB['fresnelreflection'] = FLOAT DB['glossiness'] = FLOAT DB['glowalpha'] = FLOAT DB['glowend'] = FLOAT DB['glowscale'] = FLOAT DB['glowstart'] = FLOAT DB['glowx'] = FLOAT DB['glowy'] = FLOAT DB['gray_power'] = FLOAT DB['groundmax'] = FLOAT DB['groundmin'] = FLOAT DB['grungescale'] = FLOAT DB['hdrcolorscale'] = FLOAT DB['heat_haze_scale'] = FLOAT DB['height_scale'] = FLOAT DB['highlight'] = FLOAT DB['highlightcycle'] = FLOAT DB['hueshiftfresnelexponent'] = FLOAT DB['hueshiftintensity'] = FLOAT DB['illumfactor'] = FLOAT DB['intensity'] = FLOAT DB['interiorambientscale'] = FLOAT DB['interiorbackgroundboost'] = FLOAT DB['interiorbacklightscale'] = FLOAT DB['interiorfoglimit'] = FLOAT DB['interiorfognormalboost'] = FLOAT DB['interiorfogstrength'] = FLOAT DB['interiorrefractblur'] = FLOAT DB['interiorrefractstrength'] = FLOAT DB['iridescenceboost'] = FLOAT DB['iridescenceexponent'] = FLOAT DB['layerborderoffset'] = FLOAT DB['layerbordersoftness'] = FLOAT DB['layerborderstrength'] = FLOAT DB['layeredgeoffset'] = FLOAT DB['layeredgesoftness'] = FLOAT DB['layeredgestrength'] = FLOAT DB['lightmap_gradients'] = FLOAT DB['lightmaptint'] = FLOAT DB['localcontrastedgescale'] = FLOAT DB['localcontrastmidtonemask'] = FLOAT DB['localcontrastscale'] = FLOAT DB['localcontrastvignetteend'] = FLOAT DB['localrefractdepth'] = FLOAT DB['logo2rotate'] = FLOAT DB['logo2scale'] = FLOAT DB['logo2x'] = FLOAT DB['logo2y'] = FLOAT DB['logomaskcrisp'] = FLOAT DB['logorotate'] = FLOAT DB['logoscale'] = FLOAT DB['logowear'] = FLOAT DB['logox'] = FLOAT DB['logoy'] = FLOAT DB['lumblendfactor2'] = FLOAT DB['lumblendfactor3'] = FLOAT DB['lumblendfactor4'] = FLOAT DB['magnifyscale'] = FLOAT DB['mappingheight'] = FLOAT DB['mappingwidth'] = FLOAT DB['maps1alpha'] = FLOAT DB['maxdistance'] = FLOAT DB['maxfalloffamount'] = FLOAT DB['maxlight'] = FLOAT DB['maxreflectivity'] = FLOAT DB['maxsize'] = FLOAT DB['metalness'] = FLOAT DB['minlight'] = FLOAT DB['minreflectivity'] = FLOAT DB['minsize'] = FLOAT DB['nearblurdepth'] = FLOAT DB['nearblurradius'] = FLOAT DB['nearfocusdepth'] = FLOAT DB['nearplane'] = FLOAT DB['noise_scale'] = FLOAT DB['noisestrength'] = FLOAT DB['normal2softness'] = FLOAT DB['numplanes'] = FLOAT DB['offsetamount'] = FLOAT DB['outlinealpha'] = FLOAT DB['outlineend0'] = FLOAT DB['outlineend1'] = FLOAT DB['outlinestart0'] = FLOAT DB['outlinestart1'] = FLOAT DB['outputintensity'] = FLOAT DB['overbrightfactor'] = FLOAT DB['paintphongalbedoboost'] = FLOAT DB['parallaxstrength'] = FLOAT DB['pattern1scale'] = FLOAT DB['pattern2scale'] = FLOAT DB['patterndetailinfluence'] = FLOAT DB['patternpaintthickness'] = FLOAT DB['patternphongfactor'] = FLOAT DB['patternrotation'] = FLOAT DB['patternscale'] = FLOAT DB['peel'] = FLOAT DB['phong2softness'] = FLOAT DB['phongalbedoboost'] = FLOAT DB['phongalbedofactor'] = FLOAT DB['phongbasetint'] = FLOAT DB['phongbasetint2'] = FLOAT DB['phongboost'] = FLOAT DB['phongboost2'] = FLOAT DB['phongexponent'] = FLOAT DB['phongexponent2'] = FLOAT DB['phongexponentfactor'] = FLOAT DB['phongscale'] = FLOAT DB['phongscale2'] = FLOAT DB['portalcolorscale'] = FLOAT DB['portalopenamount'] = FLOAT DB['portalstatic'] = FLOAT DB['powerup'] = FLOAT DB['previewweaponobjscale'] = FLOAT DB['previewweaponuvscale'] = FLOAT DB['pulserate'] = FLOAT DB['radius'] = FLOAT DB['radiustrailfade'] = FLOAT DB['reflectamount'] = FLOAT DB['reflectance'] = FLOAT DB['reflectblendfactor'] = FLOAT DB['refractamount'] = FLOAT DB['rimhaloboost'] = FLOAT DB['rimlightalbedo'] = FLOAT DB['rimlightboost'] = FLOAT DB['rimlightexponent'] = FLOAT DB['rimlightscale'] = FLOAT DB['rotation'] = FLOAT DB['rotation2'] = FLOAT DB['rotation3'] = FLOAT DB['rotation4'] = FLOAT DB['saturation'] = FLOAT DB['scale'] = FLOAT DB['scale2'] = FLOAT DB['scale3'] = FLOAT DB['scale4'] = FLOAT DB['screenblurstrength'] = FLOAT DB['seamless_scale'] = FLOAT DB['selfillum_envmapmask_alpha'] = FLOAT DB['selfillumboost'] = FLOAT DB['selfillummaskscale'] = FLOAT DB['shadowatten'] = FLOAT DB['shadowcontrast'] = FLOAT DB['shadowfiltersize'] = FLOAT DB['shadowjitterseed'] = FLOAT DB['shadowrimboost'] = FLOAT DB['shadowsaturation'] = FLOAT DB['sharpness'] = FLOAT DB['sheenmapmaskoffsetx'] = FLOAT DB['sheenmapmaskoffsety'] = FLOAT DB['sheenmapmaskscalex'] = FLOAT DB['sheenmapmaskscaley'] = FLOAT DB['silhouettethickness'] = FLOAT DB['ssbentnormalintensity'] = FLOAT DB['ssdepth'] = FLOAT DB['sstintbyalbedo'] = FLOAT DB['startfadesize'] = FLOAT DB['staticamount'] = FLOAT DB['strength'] = FLOAT DB['stripe_lm_scale'] = FLOAT DB['texture1_lumend'] = FLOAT DB['texture1_lumstart'] = FLOAT DB['texture2_blendend'] = FLOAT DB['texture2_blendstart'] = FLOAT DB['texture2_bumpblendfactor'] = FLOAT DB['texture2_lumend'] = FLOAT DB['texture2_lumstart'] = FLOAT DB['texture2_uvscale'] = FLOAT DB['texture3_blendend'] = FLOAT DB['texture3_blendstart'] = FLOAT DB['texture3_bumpblendfactor'] = FLOAT DB['texture3_lumend'] = FLOAT DB['texture3_lumstart'] = FLOAT DB['texture3_uvscale'] = FLOAT DB['texture4_blendend'] = FLOAT DB['texture4_blendstart'] = FLOAT DB['texture4_bumpblendfactor'] = FLOAT DB['texture4_lumend'] = FLOAT DB['texture4_lumstart'] = FLOAT DB['texture4_uvscale'] = FLOAT DB['tiling'] = FLOAT DB['time'] = FLOAT DB['time_scale'] = FLOAT DB['toolcolorcorrection'] = FLOAT DB['tooltime'] = FLOAT DB['treeswayfalloffexp'] = FLOAT DB['treeswayheight'] = FLOAT DB['treeswayradius'] = FLOAT DB['treeswayscrumblefalloffexp'] = FLOAT DB['treeswayscrumblefrequency'] = FLOAT DB['treeswayscrumblespeed'] = FLOAT DB['treeswayscrumblestrength'] = FLOAT DB['treeswayspeed'] = FLOAT DB['treeswayspeedhighwindmultiplier'] = FLOAT DB['treeswayspeedlerpend'] = FLOAT DB['treeswayspeedlerpstart'] = FLOAT DB['treeswaystartheight'] = FLOAT DB['treeswaystartradius'] = FLOAT DB['treeswaystrength'] = FLOAT DB['uberroundness'] = FLOAT DB['unlitfactor'] = FLOAT DB['unwearstrength'] = FLOAT DB['uvscale'] = FLOAT DB['vertexfogamount'] = FLOAT DB['vignette_min_bright'] = FLOAT DB['vignette_power'] = FLOAT DB['volumetricintensity'] = FLOAT DB['vomitrefractscale'] = FLOAT DB['warpindex'] = FLOAT DB['warpparam'] = FLOAT DB['waterblendfactor'] = FLOAT DB['waterdepth'] = FLOAT DB['wave'] = FLOAT DB['wearbias'] = FLOAT DB['wearexponent'] = FLOAT DB['wearprogress'] = FLOAT DB['wearremapmax'] = FLOAT DB['wearremapmid'] = FLOAT DB['wearremapmin'] = FLOAT DB['wearwidthmax'] = FLOAT DB['wearwidthmin'] = FLOAT DB['weight0'] = FLOAT DB['weight1'] = FLOAT DB['weight2'] = FLOAT DB['weight3'] = FLOAT DB['weight_default'] = FLOAT DB['woodcut'] = FLOAT DB['zoomanimateseq2'] = FLOAT DB['aaenable'] = BOOL DB['abovewater'] = BOOL DB['addbumpmaps'] = BOOL DB['aimatcamera'] = BOOL DB['alloverpaintjob'] = BOOL DB['allowdiffusemodulation'] = BOOL DB['allowfencerenderstatehack'] = BOOL DB['allowlocalcontrast'] = BOOL DB['allownoise'] = BOOL DB['allowvignette'] = BOOL DB['alphaenvmapmask'] = BOOL DB['alphatesttocoverage'] = BOOL DB['aomaskusesuv2'] = BOOL DB['aousesuv2'] = BOOL DB['animatearmpulses'] = BOOL DB['aopass'] = BOOL DB['armature'] = BOOL DB['armwiden'] = BOOL DB['backsurface'] = BOOL DB['basealphaenvmask'] = BOOL DB['basemapalphaenvmapmask'] = BOOL DB['basealphaphongmask'] = BOOL DB['basealphaselfillummask'] = BOOL DB['basetexture2noenvmap'] = BOOL DB['basetexturenoenvmap'] = BOOL DB['blendframes'] = BOOL DB['blendtintbybasealpha'] = BOOL DB['blendwithsmokegrenade'] = BOOL DB['blobbyshadows'] = BOOL DB['bloomenable'] = BOOL DB['blurredvignetteenable'] = BOOL DB['blurrefract'] = BOOL DB['bump_force_on'] = BOOL DB['bumpalphaenvmask'] = BOOL DB['bumpbasetexture2withbumpmap'] = BOOL DB['cheapmode'] = BOOL DB['cloakpassenabled'] = BOOL DB['color_depth'] = BOOL DB['contactshadows'] = BOOL DB['crosshairmode'] = BOOL DB['custompaintjob'] = BOOL DB['debug_mode'] = BOOL DB['deferredshadows'] = BOOL DB['depthblend'] = BOOL DB['depthblurenable'] = BOOL DB['detail_alpha_mask_base_texture'] = BOOL DB['disablecsmlookup'] = BOOL DB['displacementwrinkle'] = BOOL DB['distancealpha'] = BOOL DB['distancealphafromdetail'] = BOOL DB['emissiveblendenabled'] = BOOL DB['enableclearcolor'] = BOOL DB['enablesrgb'] = BOOL DB['envmapanisotropy'] = BOOL DB['envmapmaskintintmasktexture'] = BOOL DB['fadeoutonsilhouette'] = BOOL DB['flashlightnolambert'] = BOOL DB['fleshdebugforcefleshon'] = BOOL DB['fleshinteriorenabled'] = BOOL DB['flow_cheap'] = BOOL DB['flow_debug'] = BOOL DB['fogenable'] = BOOL DB['flow_vortex1'] = BOOL DB['flow_vortex2'] = BOOL DB['forcealphawrite'] = BOOL DB['forcebump'] = BOOL DB['forcecheap'] = BOOL DB['forceenvmap'] = BOOL DB['forceexpensive'] = BOOL DB['forcephong'] = BOOL DB['forcerefract'] = BOOL DB['glow'] = BOOL DB['ignorevertexcolors'] = BOOL DB['interior'] = BOOL DB['intro'] = BOOL DB['inversedepthblend'] = BOOL DB['layeredgenormal'] = BOOL DB['layeredgepunchin'] = BOOL DB['lightmapwaterfog'] = BOOL DB['localcontrastenable'] = BOOL DB['localcontrastvignettestart'] = BOOL DB['localrefract'] = BOOL DB['logo2enabled'] = BOOL DB['lowqualityflashlightshadows'] = BOOL DB['magnifyenable'] = BOOL DB['masked'] = BOOL DB['mirrorhorizontal'] = BOOL DB['mod2x'] = BOOL DB['modeldecalignorez'] = BOOL DB['modelformat'] = BOOL DB['muloutputbyalpha'] = BOOL DB['needsnormals'] = BOOL DB['needstangents'] = BOOL DB['needstangentt'] = BOOL DB['newlayerblending'] = BOOL DB['nodiffusebumplighting'] = BOOL DB['noenvmapmip'] = BOOL DB['nofresnel'] = BOOL DB['noiseenable'] = BOOL DB['nolowendlightmap'] = BOOL DB['noscale'] = BOOL DB['nosrgb'] = BOOL DB['opaque'] = BOOL DB['outline'] = BOOL DB['perparticleoutline'] = BOOL DB['phong'] = BOOL DB['phongalbedotint'] = BOOL DB['phongdisablehalflambert'] = BOOL DB['pseudotranslucent'] = BOOL DB['preview'] = BOOL DB['previewignoreweaponscale'] = BOOL DB['pulse'] = BOOL DB['raytracesphere'] = BOOL DB['reflect2dskybox'] = BOOL DB['reflectentities'] = BOOL DB['reflectonlymarkedentities'] = BOOL DB['reflectskyboxonly'] = BOOL DB['rimlight'] = BOOL DB['rimmask'] = BOOL DB['scaleedgesoftnessbasedonscreenres'] = BOOL DB['scaleoutlinesoftnessbasedonscreenres'] = BOOL DB['seamless_base'] = BOOL DB['seamless_detail'] = BOOL DB['selfillumfresnel'] = BOOL DB['selfillumfresnelenabledthisframe'] = BOOL DB['separatedetailuvs'] = BOOL DB['shadersrgbread360'] = BOOL DB['sheenpassenabled'] = BOOL DB['showalpha'] = BOOL DB['softedges'] = BOOL DB['spheretexkillcombo'] = BOOL DB['swappatternmasks'] = BOOL DB['thirdperson'] = BOOL DB['toolmode'] = BOOL DB['translucentgoo'] = BOOL DB['treeswaystatic'] = BOOL DB['unlit'] = BOOL DB['use_fb_texture'] = BOOL DB['useinstancing'] = BOOL DB['useonstaticprop'] = BOOL DB['usingpixelshader'] = BOOL DB['vertexcolorlerp'] = BOOL DB['vertexcolormodulate'] = BOOL DB['vignetteenable'] = BOOL DB['volumetexturetest'] = BOOL DB['vomitenable'] = BOOL DB['writez'] = BOOL DB['zfailenable'] = BOOL DB['ambientreflectionbouncecolor'] = COLOR DB['cloakcolortint'] = COLOR DB['color'] = COLOR DB['color2'] = COLOR DB['colortint'] = COLOR DB['crosshaircolortint'] = COLOR DB['detailtint'] = COLOR DB['detailtint2'] = COLOR DB['emissiveblendtint'] = COLOR DB['envmaptint'] = COLOR DB['fakerimtint'] = COLOR DB['fleshbordertint'] = COLOR DB['fleshsubsurfacetint'] = COLOR DB['flow_color'] = COLOR DB['flow_vortex_color'] = COLOR DB['fogcolor'] = COLOR DB['glassenvmaptint'] = COLOR DB['glowcolor'] = COLOR DB['layerbordertint'] = COLOR DB['layertint1'] = COLOR DB['layertint2'] = COLOR DB['outlinecolor'] = COLOR DB['palettecolor1'] = COLOR DB['palettecolor2'] = COLOR DB['palettecolor3'] = COLOR DB['palettecolor4'] = COLOR DB['palettecolor5'] = COLOR DB['palettecolor6'] = COLOR DB['palettecolor7'] = COLOR DB['palettecolor8'] = COLOR DB['phongtint'] = COLOR DB['portalcolorgradientdark'] = COLOR DB['portalcolorgradientlight'] = COLOR DB['portalcoopcolorplayeroneportalone'] = COLOR DB['portalcoopcolorplayeroneportaltwo'] = COLOR DB['portalcoopcolorplayertwoportalone'] = COLOR DB['portalcoopcolorplayertwoportaltwo'] = COLOR DB['phongcolortint'] = COLOR DB['reflectivity'] = COLOR DB['reflecttint'] = COLOR DB['refracttint'] = COLOR DB['rimlighttint'] = COLOR DB['scroll1'] = COLOR DB['scroll2'] = COLOR DB['selfillumtint'] = COLOR DB['sheenmaptint'] = COLOR DB['silhouettecolor'] = COLOR DB['tint'] = COLOR DB['base_step_range'] = VEC2 DB['basetextureoffset'] = VEC2 DB['basetexturescale'] = VEC2 DB['bumpoffset'] = VEC2 DB['canvas_step_range'] = VEC2 DB['cloudscale'] = VEC2 DB['cropfactor'] = VEC2 DB['damagelevels1'] = VEC2 DB['damagelevels2'] = VEC2 DB['damagelevels3'] = VEC2 DB['damagelevels4'] = VEC2 DB['emissiveblendscrollvector'] = VEC2 DB['envmaplightscaleminmax'] = VEC2 DB['flowmapscrollrate'] = VEC2 DB['gray_step'] = VEC2 DB['lightmap_step_range'] = VEC2 DB['magnifycenter'] = VEC2 DB['maskscale'] = VEC2 DB['phongmaskcontrastbrightness'] = VEC2 DB['phongmaskcontrastbrightness2'] = VEC2 DB['refractionamount'] = VEC2 DB['scale'] = VEC2 DB['ambientocclcolor'] = VEC3 DB['ambientreflectionbouncecenter'] = VEC3 DB['armcolor'] = VEC3 DB['basealphaenvmapmaskminmaxexp'] = VEC3 DB['basecolortint'] = VEC3 DB['bbmax'] = VEC3 DB['bbmin'] = VEC3 DB['blendwithsmokegrenadeposentity'] = VEC3 DB['blendwithsmokegrenadepossmoke'] = VEC3 DB['camocolor0'] = VEC3 DB['camocolor1'] = VEC3 DB['camocolor2'] = VEC3 DB['camocolor3'] = VEC3 DB['canvas_color_end'] = VEC3 DB['canvas_color_start'] = VEC3 DB['canvas_scale'] = VEC3 DB['clearcolor'] = VEC3 DB['colortint2'] = VEC3 DB['colortint3'] = VEC3 DB['colortint4'] = VEC3 DB['dimensions'] = VEC3 DB['entcenter'] = VEC3 DB['entityorigin'] = VEC3 DB['envmapfresnelminmaxexp'] = VEC3 DB['eyeorigin'] = VEC3 DB['eyeup'] = VEC3 DB['flow_vortex_pos1'] = VEC3 DB['flow_vortex_pos2'] = VEC3 DB['forward'] = VEC3 DB['fresnelranges'] = VEC3 DB['hsv_correction'] = VEC3 DB['interiorcolor'] = VEC3 DB['leafcenter'] = VEC3 DB['lerpcolor1'] = VEC3 DB['lerpcolor2'] = VEC3 DB['light_color'] = VEC3 DB['light_position'] = VEC3 DB['pattern1color1'] = VEC3 DB['pattern1color2'] = VEC3 DB['pattern1color3'] = VEC3 DB['pattern1color4'] = VEC3 DB['pattern2color1'] = VEC3 DB['pattern2color2'] = VEC3 DB['pattern2color3'] = VEC3 DB['pattern2color4'] = VEC3 DB['phongcolortint'] = VEC3 DB['phongfresnel'] = VEC3 DB['phongfresnel2'] = VEC3 DB['phongfresnelranges'] = VEC3 DB['spriteorigin'] = VEC3 DB['sscolortint'] = VEC3 DB['stripe_color'] = VEC3 DB['stripe_fade_normal1'] = VEC3 DB['stripe_fade_normal2'] = VEC3 DB['stripe_scale'] = VEC3 DB['texadjustlevels0'] = VEC3 DB['texadjustlevels1'] = VEC3 DB['texadjustlevels2'] = VEC3 DB['texadjustlevels3'] = VEC3 DB['translucentfresnelminmaxexp'] = VEC3 DB['uvprojoffset'] = VEC3 DB['vomitcolor1'] = VEC3 DB['vomitcolor2'] = VEC3 DB['aainternal1'] = VEC4 DB['aainternal2'] = VEC4 DB['aainternal3'] = VEC4 DB['attenfactors'] = VEC4 DB['bloomamount'] = VEC4 DB['channel_select'] = VEC4 DB['curvaturewearboost'] = VEC4 DB['curvaturewearpower'] = VEC4 DB['damagedetailbrightnessadjustment'] = VEC4 DB['damagedetailenvboost'] = VEC4 DB['damagedetailphongboost'] = VEC4 DB['damagedetailsaturation'] = VEC4 DB['damageedgeenvboost'] = VEC4 DB['damageedgephongboost'] = VEC4 DB['damagegrunge'] = VEC4 DB['damagenormaledgedepth'] = VEC4 DB['detailenvboost'] = VEC4 DB['detailgrunge'] = VEC4 DB['detailmetalness'] = VEC4 DB['detailnormaldepth'] = VEC4 DB['detailphongalbedotint'] = VEC4 DB['detailphongboost'] = VEC4 DB['detailscale'] = VEC4 DB['detailwarpindex'] = VEC4 DB['distortbounds'] = VEC4 DB['eyedir'] = VEC4 DB['eyeposznear'] = VEC4 DB['fadecolor'] = VEC4 DB['flashlightcolor'] = VEC4 DB['flesheffectcenterradius1'] = VEC4 DB['flesheffectcenterradius2'] = VEC4 DB['flesheffectcenterradius3'] = VEC4 DB['flesheffectcenterradius4'] = VEC4 DB['fresnelopacityranges'] = VEC4 DB['fxaainternalc'] = VEC4 DB['fxaainternalq'] = VEC4 DB['glintu'] = VEC4 DB['glintv'] = VEC4 DB['grimebrightnessadjustment'] = VEC4 DB['grimesaturation'] = VEC4 DB['grungemax'] = VEC4 DB['hslnoisescale'] = VEC4 DB['irisu'] = VEC4 DB['irisv'] = VEC4 DB['jitterseed'] = VEC4 DB['motionblurinternal'] = VEC4 DB['motionblurviewportinternal'] = VEC4 DB['noisescale'] = VEC4 DB['originfarz'] = VEC4 DB['patterncolorindices'] = VEC4 DB['phongamount'] = VEC4 DB['phongamount2'] = VEC4 DB['quatorientation'] = VEC4 DB['rimhalobounds'] = VEC4 DB['scalebias'] = VEC4 DB['selfillumfresnelminmaxexp'] = VEC4 DB['shadowsaturationbounds'] = VEC4 DB['shadowtint'] = VEC4 DB['tangentsopacityranges'] = VEC4 DB['tangenttopacityranges'] = VEC4 DB['uberheightwidth'] = VEC4 DB['ubernearfar'] = VEC4 DB['weardetailenvboost'] = VEC4 DB['weardetailphongboost'] = VEC4 DB['weights'] = VEC4 DB['alternateviewmatrix'] = MATRIX DB['basetexturetransform'] = MATRIX DB['basetexturetransform2'] = MATRIX DB['blendmasktransform'] = MATRIX DB['blendmodulatetransform'] = MATRIX DB['bumptransform'] = MATRIX DB['bumptransform2'] = MATRIX DB['detail1transform'] = MATRIX DB['detail2transform'] = MATRIX DB['detail1texturetransform'] = MATRIX DB['detail2texturetransform'] = MATRIX DB['detailtexturetransform'] = MATRIX DB['detailtransform'] = MATRIX DB['envmapmasktransform'] = MATRIX DB['envmapmasktransform2'] = MATRIX DB['grungetexturerotation'] = MATRIX DB['grungetexturetransform'] = MATRIX DB['orientationmatrix'] = MATRIX DB['patterntexturerotation'] = MATRIX DB['patterntexturetransform'] = MATRIX DB['texture2transform'] = MATRIX DB['texturetransform'] = MATRIX DB['viewproj'] = MATRIX DB['weartexturetransform'] = MATRIX DB['worldtotexture'] = MATRIX DB['textransform0'] = MATRIX_4X2 DB['textransform1'] = MATRIX_4X2 DB['textransform2'] = MATRIX_4X2 DB['textransform3'] = MATRIX_4X2 DB['lights'] = FOUR_CC
def _shader_db(var_type, DB): [flag, material, str, texture, int, float, bool, color, vec2, vec3, vec4, matrix, matrix_4_x2, four_cc] = var_type DB['%compile2dsky'] = FLAG DB['%compileblocklos'] = FLAG DB['%compileclip'] = FLAG DB['%compiledetail'] = FLAG DB['%compilefog'] = FLAG DB['%compilegrenadeclip'] = FLAG DB['%compilehint'] = FLAG DB['%compileladder'] = FLAG DB['%compilenochop'] = FLAG DB['%compilenodraw'] = FLAG DB['%compilenolight'] = FLAG DB['%compilenonsolid'] = FLAG DB['%compilenpcclip'] = FLAG DB['%compileorigin'] = FLAG DB['%compilepassbullets'] = FLAG DB['%compileskip'] = FLAG DB['%compilesky'] = FLAG DB['%compileslime'] = FLAG DB['%compileteam'] = FLAG DB['%compiletrigger'] = FLAG DB['%compilewater'] = FLAG DB['%nopaint'] = FLAG DB['%noportal'] = FLAG DB['%notooltexture'] = FLAG DB['%playerclip'] = FLAG DB['additive'] = FLAG DB['allowalphatocoverage'] = FLAG DB['alphamodifiedbyproxy_do_not_set_in_vmt'] = FLAG DB['alphatest'] = FLAG DB['basealphaenvmapmask'] = FLAG DB['debug'] = FLAG DB['decal'] = FLAG DB['envmapcameraspace'] = FLAG DB['envmapmode'] = FLAG DB['envmapsphere'] = FLAG DB['flat'] = FLAG DB['halflambert'] = FLAG DB['ignorez'] = FLAG DB['model'] = FLAG DB['multipass'] = FLAG DB['multiply'] = FLAG DB['no_draw'] = FLAG DB['no_fullbright'] = FLAG DB['noalphamod'] = FLAG DB['nocull'] = FLAG DB['nodecal'] = FLAG DB['nofog'] = FLAG DB['normalmapalphaenvmapmask'] = FLAG DB['notint'] = FLAG DB['opaquetexture'] = FLAG DB['pseudotranslucent'] = FLAG DB['selfillum'] = FLAG DB['softwareskin'] = FLAG DB['translucent'] = FLAG DB['use_in_fillrate_mode'] = FLAG DB['vertexalpha'] = FLAG DB['vertexfog'] = FLAG DB['wireframe'] = FLAG DB['xxxxxxunusedxxxxx'] = FLAG DB['znearer'] = FLAG DB['bottommaterial'] = MATERIAL DB['crackmaterial'] = MATERIAL DB['translucent_material'] = MATERIAL DB['%detailtype'] = STR DB['%keywords'] = STR DB['fallback'] = STR DB['pixshader'] = STR DB['surfaceprop'] = STR DB['surfaceprop2'] = STR DB['vertexshader'] = STR DB['%tooltexture'] = TEXTURE DB['albedo'] = TEXTURE DB['alphamasktexture'] = TEXTURE DB['ambientoccltexture'] = TEXTURE DB['anisodirtexture'] = TEXTURE DB['ao'] = TEXTURE DB['aomap'] = TEXTURE DB['aoscreenbuffer'] = TEXTURE DB['aotexture'] = TEXTURE DB['backingtexture'] = TEXTURE DB['basetexture'] = TEXTURE DB['basetexture2'] = TEXTURE DB['basetexture3'] = TEXTURE DB['basetexture4'] = TEXTURE DB['blendmodulatetexture'] = TEXTURE DB['bloomtexture'] = TEXTURE DB['blurredtexture'] = TEXTURE DB['blurtexture'] = TEXTURE DB['bumpcompress'] = TEXTURE DB['bumpmap'] = TEXTURE DB['bumpmap2'] = TEXTURE DB['bumpmask'] = TEXTURE DB['bumpstretch'] = TEXTURE DB['canvas'] = TEXTURE DB['cbtexture'] = TEXTURE DB['cloudalphatexture'] = TEXTURE DB['colorbar'] = TEXTURE DB['colorwarptexture'] = TEXTURE DB['compress'] = TEXTURE DB['cookietexture'] = TEXTURE DB['corecolortexture'] = TEXTURE DB['corneatexture'] = TEXTURE DB['crtexture'] = TEXTURE DB['decaltexture'] = TEXTURE DB['delta'] = TEXTURE DB['depthtexture'] = TEXTURE DB['detail'] = TEXTURE DB['detail1'] = TEXTURE DB['detail2'] = TEXTURE DB['detailnormal'] = TEXTURE DB['displacementmap'] = TEXTURE DB['distortmap'] = TEXTURE DB['dudvmap'] = TEXTURE DB['dust_texture'] = TEXTURE DB['effectmaskstexture'] = TEXTURE DB['emissiveblendbasetexture'] = TEXTURE DB['emissiveblendflowtexture'] = TEXTURE DB['emissiveblendtexture'] = TEXTURE DB['envmap'] = TEXTURE DB['envmapmask'] = TEXTURE DB['envmapmask2'] = TEXTURE DB['exposure_texture'] = TEXTURE DB['exptexture'] = TEXTURE DB['fb_texture'] = TEXTURE DB['fbtexture'] = TEXTURE DB['fleshbordertexture1d'] = TEXTURE DB['fleshcubetexture'] = TEXTURE DB['fleshinteriornoisetexture'] = TEXTURE DB['fleshinteriortexture'] = TEXTURE DB['fleshnormaltexture'] = TEXTURE DB['fleshsubsurfacetexture'] = TEXTURE DB['flow_noise_texture'] = TEXTURE DB['flowbounds'] = TEXTURE DB['flowmap'] = TEXTURE DB['fow'] = TEXTURE DB['frame_texture'] = TEXTURE DB['frametexture'] = TEXTURE DB['fresnelcolorwarptexture'] = TEXTURE DB['fresnelrangestexture'] = TEXTURE DB['fresnelwarptexture'] = TEXTURE DB['frontndtexture'] = TEXTURE DB['glassenvmap'] = TEXTURE DB['glint'] = TEXTURE DB['gradienttexture'] = TEXTURE DB['grain'] = TEXTURE DB['grain_texture'] = TEXTURE DB['grime'] = TEXTURE DB['grunge'] = TEXTURE DB['grungetexture'] = TEXTURE DB['hdrbasetexture'] = TEXTURE DB['hdrcompressedtexture'] = TEXTURE DB['hdrcompressedtexture0'] = TEXTURE DB['hdrcompressedtexture1'] = TEXTURE DB['hdrcompressedtexture2'] = TEXTURE DB['holomask'] = TEXTURE DB['holospectrum'] = TEXTURE DB['input'] = TEXTURE DB['input_texture'] = TEXTURE DB['internal_vignettetexture'] = TEXTURE DB['iridescentwarp'] = TEXTURE DB['iris'] = TEXTURE DB['lightmap'] = TEXTURE DB['lightwarptexture'] = TEXTURE DB['logomap'] = TEXTURE DB['maskmap'] = TEXTURE DB['maps1'] = TEXTURE DB['maps2'] = TEXTURE DB['maps3'] = TEXTURE DB['masks1'] = TEXTURE DB['masks2'] = TEXTURE DB['maskstexture'] = TEXTURE DB['materialmask'] = TEXTURE DB['noise'] = TEXTURE DB['noisemap'] = TEXTURE DB['noisetexture'] = TEXTURE DB['normalmap'] = TEXTURE DB['normalmap2'] = TEXTURE DB['offsetmap'] = TEXTURE DB['opacitytexture'] = TEXTURE DB['originaltexture'] = TEXTURE DB['paintsplatenvmap'] = TEXTURE DB['paintsplatnormalmap'] = TEXTURE DB['painttexture'] = TEXTURE DB['pattern'] = TEXTURE DB['pattern1'] = TEXTURE DB['pattern2'] = TEXTURE DB['phongexponenttexture'] = TEXTURE DB['phongwarptexture'] = TEXTURE DB['portalcolortexture'] = TEXTURE DB['portalmasktexture'] = TEXTURE DB['postexture'] = TEXTURE DB['ramptexture'] = TEXTURE DB['reflecttexture'] = TEXTURE DB['refracttexture'] = TEXTURE DB['refracttinttexture'] = TEXTURE DB['sampleoffsettexture'] = TEXTURE DB['scenedepth'] = TEXTURE DB['screeneffecttexture'] = TEXTURE DB['selfillummap'] = TEXTURE DB['selfillummask'] = TEXTURE DB['selfillumtexture'] = TEXTURE DB['shadowdepthtexture'] = TEXTURE DB['sheenmap'] = TEXTURE DB['sheenmapmask'] = TEXTURE DB['sidespeed'] = TEXTURE DB['simpleoverlay'] = TEXTURE DB['smallfb'] = TEXTURE DB['sourcemrtrendertarget'] = TEXTURE DB['specmasktexture'] = TEXTURE DB['spectexture'] = TEXTURE DB['spectexture2'] = TEXTURE DB['spectexture3'] = TEXTURE DB['spectexture4'] = TEXTURE DB['spherenormal'] = TEXTURE DB['srctexture0'] = TEXTURE DB['srctexture1'] = TEXTURE DB['srctexture2'] = TEXTURE DB['srctexture3'] = TEXTURE DB['staticblendtexture'] = TEXTURE DB['stitchtexture'] = TEXTURE DB['stretch'] = TEXTURE DB['stripetexture'] = TEXTURE DB['surfacetexture'] = TEXTURE DB['test_texture'] = TEXTURE DB['texture0'] = TEXTURE DB['texture1'] = TEXTURE DB['texture2'] = TEXTURE DB['texture3'] = TEXTURE DB['texture4'] = TEXTURE DB['tintmasktexture'] = TEXTURE DB['transmatmaskstexture'] = TEXTURE DB['underwateroverlay'] = TEXTURE DB['velocity_texture'] = TEXTURE DB['vignette_texture'] = TEXTURE DB['vignette_tile'] = TEXTURE DB['warptexture'] = TEXTURE DB['weartexture'] = TEXTURE DB['ytexture'] = TEXTURE DB['addoverblend'] = INT DB['alpha_blend'] = INT DB['alpha_blend_color_overlay'] = INT DB['alphablend'] = INT DB['alphadepth'] = INT DB['alphamask'] = INT DB['alphamasktextureframe'] = INT DB['ambientboostmaskmode'] = INT DB['ambientonly'] = INT DB['aomode'] = INT DB['basediffuseoverride'] = INT DB['basemapalphaphongmask'] = INT DB['basemapluminancephongmask'] = INT DB['bloomtintenable'] = INT DB['bloomtype'] = INT DB['bumpframe'] = INT DB['bumpframe2'] = INT DB['clearalpha'] = INT DB['cleardepth'] = INT DB['combine_mode'] = INT DB['compositemode'] = INT DB['cookieframenum'] = INT DB['copyalpha'] = INT DB['corecolortextureframe'] = INT DB['cstrike'] = INT DB['cull'] = INT DB['decalblendmode'] = INT DB['decalstyle'] = INT DB['depth_feather'] = INT DB['depthtest'] = INT DB['desaturateenable'] = INT DB['detail1blendmode'] = INT DB['detail1frame'] = INT DB['detail2blendmode'] = INT DB['detail2frame'] = INT DB['detailblendmode'] = INT DB['detailframe'] = INT DB['detailframe2'] = INT DB['disable_color_writes'] = INT DB['dualsequence'] = INT DB['dudvframe'] = INT DB['effect'] = INT DB['enableshadows'] = INT DB['envmapframe'] = INT DB['envmapmaskframe'] = INT DB['envmapmaskframe2'] = INT DB['envmapoptional'] = INT DB['exponentmode'] = INT DB['extractgreenalpha'] = INT DB['fade'] = INT DB['flowmapframe'] = INT DB['frame'] = INT DB['frame2'] = INT DB['frame3'] = INT DB['frame4'] = INT DB['fullbright'] = INT DB['gammacolorread'] = INT DB['ghostoverlay'] = INT DB['hudtranslucent'] = INT DB['hudundistort'] = INT DB['invertphongmask'] = INT DB['irisframe'] = INT DB['isfloat'] = INT DB['kernel'] = INT DB['linearread_basetexture'] = INT DB['linearread_texture1'] = INT DB['linearread_texture2'] = INT DB['linearread_texture3'] = INT DB['linearwrite'] = INT DB['maskedblending'] = INT DB['maxlumframeblend1'] = INT DB['maxlumframeblend2'] = INT DB['mirroraboutviewportedges'] = INT DB['mode'] = INT DB['mrtindex'] = INT DB['multiplycolor'] = INT DB['ncolors'] = INT DB['nocolorwrite'] = INT DB['nodiffusebumplighting'] = INT DB['notint'] = INT DB['noviewportfixup'] = INT DB['nowritez'] = INT DB['num_lookups'] = INT DB['orientation'] = INT DB['paintstyle'] = INT DB['parallaxmap'] = INT DB['passcount'] = INT DB['patternreplaceindex'] = INT DB['phongintensity'] = INT DB['pointsample_basetexture'] = INT DB['pointsample_texture1'] = INT DB['pointsample_texture2'] = INT DB['pointsample_texture3'] = INT DB['quality'] = INT DB['receiveflashlight'] = INT DB['refracttinttextureframe'] = INT DB['reloadzcull'] = INT DB['renderfixz'] = INT DB['selector0'] = INT DB['selector1'] = INT DB['selector2'] = INT DB['selector3'] = INT DB['selector4'] = INT DB['selector5'] = INT DB['selector6'] = INT DB['selector7'] = INT DB['selector8'] = INT DB['selector9'] = INT DB['selector10'] = INT DB['selector11'] = INT DB['selector12'] = INT DB['selector13'] = INT DB['selector14'] = INT DB['selector15'] = INT DB['selfillumtextureframe'] = INT DB['sequence_blend_mode'] = INT DB['shadowdepth'] = INT DB['sheenindex'] = INT DB['sheenmapmaskdirection'] = INT DB['sheenmapmaskframe'] = INT DB['singlepassflashlight'] = INT DB['splinetype'] = INT DB['spriteorientation'] = INT DB['spriterendermode'] = INT DB['ssbump'] = INT DB['stage'] = INT DB['staticblendtextureframe'] = INT DB['tcsize0'] = INT DB['tcsize1'] = INT DB['tcsize2'] = INT DB['tcsize3'] = INT DB['tcsize4'] = INT DB['tcsize5'] = INT DB['tcsize6'] = INT DB['tcsize7'] = INT DB['texture3_blendmode'] = INT DB['texture4_blendmode'] = INT DB['textureinputcount'] = INT DB['texturemode'] = INT DB['treesway'] = INT DB['tv_gamma'] = INT DB['uberlight'] = INT DB['usealternateviewmatrix'] = INT DB['userendertarget'] = INT DB['vertex_lit'] = INT DB['vertexalphatest'] = INT DB['vertexcolor'] = INT DB['vertextransform'] = INT DB['writealpha'] = INT DB['writedepth'] = INT DB['x360appchooser'] = INT DB['addbasetexture2'] = FLOAT DB['addself'] = FLOAT DB['alpha'] = FLOAT DB['alpha2'] = FLOAT DB['alphasharpenfactor'] = FLOAT DB['alphatested'] = FLOAT DB['alphatestreference'] = FLOAT DB['alphatrailfade'] = FLOAT DB['ambientboost'] = FLOAT DB['ambientocclusion'] = FLOAT DB['ambientreflectionboost'] = FLOAT DB['anisotropyamount'] = FLOAT DB['armwidthbias'] = FLOAT DB['armwidthexp'] = FLOAT DB['armwidthscale'] = FLOAT DB['autoexpose_max'] = FLOAT DB['autoexpose_min'] = FLOAT DB['backscatter'] = FLOAT DB['bias'] = FLOAT DB['blendsoftness'] = FLOAT DB['blendtintcoloroverbase'] = FLOAT DB['bloomexp'] = FLOAT DB['bloomexponent'] = FLOAT DB['bloomsaturation'] = FLOAT DB['bloomwidth'] = FLOAT DB['bluramount'] = FLOAT DB['blurredvignettescale'] = FLOAT DB['bumpdetailscale1'] = FLOAT DB['bumpdetailscale2'] = FLOAT DB['bumpstrength'] = FLOAT DB['c0_w'] = FLOAT DB['c0_x'] = FLOAT DB['c0_y'] = FLOAT DB['c0_z'] = FLOAT DB['c1_w'] = FLOAT DB['c1_x'] = FLOAT DB['c1_y'] = FLOAT DB['c1_z'] = FLOAT DB['c2_w'] = FLOAT DB['c2_x'] = FLOAT DB['c2_y'] = FLOAT DB['c2_z'] = FLOAT DB['c3_w'] = FLOAT DB['c3_x'] = FLOAT DB['c3_y'] = FLOAT DB['c3_z'] = FLOAT DB['c4_w'] = FLOAT DB['c4_x'] = FLOAT DB['c4_y'] = FLOAT DB['c4_z'] = FLOAT DB['cavitycontrast'] = FLOAT DB['cheapwaterenddistance'] = FLOAT DB['cheapwaterstartdistance'] = FLOAT DB['cloakfactor'] = FLOAT DB['color_flow_displacebynormalstrength'] = FLOAT DB['color_flow_lerpexp'] = FLOAT DB['color_flow_timeintervalinseconds'] = FLOAT DB['color_flow_timescale'] = FLOAT DB['color_flow_uvscale'] = FLOAT DB['color_flow_uvscrolldistance'] = FLOAT DB['colorgamma'] = FLOAT DB['contrast'] = FLOAT DB['contrast_correction'] = FLOAT DB['corneabumpstrength'] = FLOAT DB['crosshaircoloradapt'] = FLOAT DB['decalfadeduration'] = FLOAT DB['decalfadetime'] = FLOAT DB['decalscale'] = FLOAT DB['deltascale'] = FLOAT DB['depthblendscale'] = FLOAT DB['depthblurfocaldistance'] = FLOAT DB['depthblurstrength'] = FLOAT DB['desatbasetint'] = FLOAT DB['desaturatewithbasealpha'] = FLOAT DB['desaturation'] = FLOAT DB['detail1blendfactor'] = FLOAT DB['detail1scale'] = FLOAT DB['detail2blendfactor'] = FLOAT DB['detail2scale'] = FLOAT DB['detailblendfactor'] = FLOAT DB['detailblendfactor2'] = FLOAT DB['detailblendfactor3'] = FLOAT DB['detailblendfactor4'] = FLOAT DB['detailscale'] = FLOAT DB['detailscale2'] = FLOAT DB['diffuse_base'] = FLOAT DB['diffuse_white'] = FLOAT DB['diffuseboost'] = FLOAT DB['diffuseexponent'] = FLOAT DB['diffusescale'] = FLOAT DB['diffusesoftnormal'] = FLOAT DB['dilation'] = FLOAT DB['dof_max'] = FLOAT DB['dof_power'] = FLOAT DB['dof_start_distance'] = FLOAT DB['dropshadowdepthexaggeration'] = FLOAT DB['dropshadowhighlightscale'] = FLOAT DB['dropshadowopacity'] = FLOAT DB['dropshadowscale'] = FLOAT DB['edge_softness'] = FLOAT DB['edgesoftnessend'] = FLOAT DB['edgesoftnessstart'] = FLOAT DB['emissiveblendstrength'] = FLOAT DB['endfadesize'] = FLOAT DB['envmapanisotropyscale'] = FLOAT DB['envmapcontrast'] = FLOAT DB['envmapfresnel'] = FLOAT DB['envmaplightscale'] = FLOAT DB['envmapmaskscale'] = FLOAT DB['envmapsaturation'] = FLOAT DB['eyeballradius'] = FLOAT DB['fadetoblackscale'] = FLOAT DB['fakerimboost'] = FLOAT DB['falloffamount'] = FLOAT DB['falloffdistance'] = FLOAT DB['falloffoffset'] = FLOAT DB['farblurdepth'] = FLOAT DB['farblurradius'] = FLOAT DB['farfadeinterval'] = FLOAT DB['farfocusdepth'] = FLOAT DB['farplane'] = FLOAT DB['farz'] = FLOAT DB['flashlighttime'] = FLOAT DB['flashlighttint'] = FLOAT DB['fleshbordernoisescale'] = FLOAT DB['fleshbordersoftness'] = FLOAT DB['fleshborderwidth'] = FLOAT DB['fleshglobalopacity'] = FLOAT DB['fleshglossbrightness'] = FLOAT DB['fleshscrollspeed'] = FLOAT DB['flipfixup'] = FLOAT DB['flow_bumpstrength'] = FLOAT DB['flow_color_intensity'] = FLOAT DB['flow_lerpexp'] = FLOAT DB['flow_noise_scale'] = FLOAT DB['flow_normaluvscale'] = FLOAT DB['flow_timeintervalinseconds'] = FLOAT DB['flow_timescale'] = FLOAT DB['flow_uvscrolldistance'] = FLOAT DB['flow_vortex_size'] = FLOAT DB['flow_worlduvscale'] = FLOAT DB['flowmaptexcoordoffset'] = FLOAT DB['fogend'] = FLOAT DB['fogexponent'] = FLOAT DB['fogfadeend'] = FLOAT DB['fogfadestart'] = FLOAT DB['fogscale'] = FLOAT DB['fogstart'] = FLOAT DB['forcefresnel'] = FLOAT DB['forwardscatter'] = FLOAT DB['fresnelbumpstrength'] = FLOAT DB['fresnelpower'] = FLOAT DB['fresnelreflection'] = FLOAT DB['glossiness'] = FLOAT DB['glowalpha'] = FLOAT DB['glowend'] = FLOAT DB['glowscale'] = FLOAT DB['glowstart'] = FLOAT DB['glowx'] = FLOAT DB['glowy'] = FLOAT DB['gray_power'] = FLOAT DB['groundmax'] = FLOAT DB['groundmin'] = FLOAT DB['grungescale'] = FLOAT DB['hdrcolorscale'] = FLOAT DB['heat_haze_scale'] = FLOAT DB['height_scale'] = FLOAT DB['highlight'] = FLOAT DB['highlightcycle'] = FLOAT DB['hueshiftfresnelexponent'] = FLOAT DB['hueshiftintensity'] = FLOAT DB['illumfactor'] = FLOAT DB['intensity'] = FLOAT DB['interiorambientscale'] = FLOAT DB['interiorbackgroundboost'] = FLOAT DB['interiorbacklightscale'] = FLOAT DB['interiorfoglimit'] = FLOAT DB['interiorfognormalboost'] = FLOAT DB['interiorfogstrength'] = FLOAT DB['interiorrefractblur'] = FLOAT DB['interiorrefractstrength'] = FLOAT DB['iridescenceboost'] = FLOAT DB['iridescenceexponent'] = FLOAT DB['layerborderoffset'] = FLOAT DB['layerbordersoftness'] = FLOAT DB['layerborderstrength'] = FLOAT DB['layeredgeoffset'] = FLOAT DB['layeredgesoftness'] = FLOAT DB['layeredgestrength'] = FLOAT DB['lightmap_gradients'] = FLOAT DB['lightmaptint'] = FLOAT DB['localcontrastedgescale'] = FLOAT DB['localcontrastmidtonemask'] = FLOAT DB['localcontrastscale'] = FLOAT DB['localcontrastvignetteend'] = FLOAT DB['localrefractdepth'] = FLOAT DB['logo2rotate'] = FLOAT DB['logo2scale'] = FLOAT DB['logo2x'] = FLOAT DB['logo2y'] = FLOAT DB['logomaskcrisp'] = FLOAT DB['logorotate'] = FLOAT DB['logoscale'] = FLOAT DB['logowear'] = FLOAT DB['logox'] = FLOAT DB['logoy'] = FLOAT DB['lumblendfactor2'] = FLOAT DB['lumblendfactor3'] = FLOAT DB['lumblendfactor4'] = FLOAT DB['magnifyscale'] = FLOAT DB['mappingheight'] = FLOAT DB['mappingwidth'] = FLOAT DB['maps1alpha'] = FLOAT DB['maxdistance'] = FLOAT DB['maxfalloffamount'] = FLOAT DB['maxlight'] = FLOAT DB['maxreflectivity'] = FLOAT DB['maxsize'] = FLOAT DB['metalness'] = FLOAT DB['minlight'] = FLOAT DB['minreflectivity'] = FLOAT DB['minsize'] = FLOAT DB['nearblurdepth'] = FLOAT DB['nearblurradius'] = FLOAT DB['nearfocusdepth'] = FLOAT DB['nearplane'] = FLOAT DB['noise_scale'] = FLOAT DB['noisestrength'] = FLOAT DB['normal2softness'] = FLOAT DB['numplanes'] = FLOAT DB['offsetamount'] = FLOAT DB['outlinealpha'] = FLOAT DB['outlineend0'] = FLOAT DB['outlineend1'] = FLOAT DB['outlinestart0'] = FLOAT DB['outlinestart1'] = FLOAT DB['outputintensity'] = FLOAT DB['overbrightfactor'] = FLOAT DB['paintphongalbedoboost'] = FLOAT DB['parallaxstrength'] = FLOAT DB['pattern1scale'] = FLOAT DB['pattern2scale'] = FLOAT DB['patterndetailinfluence'] = FLOAT DB['patternpaintthickness'] = FLOAT DB['patternphongfactor'] = FLOAT DB['patternrotation'] = FLOAT DB['patternscale'] = FLOAT DB['peel'] = FLOAT DB['phong2softness'] = FLOAT DB['phongalbedoboost'] = FLOAT DB['phongalbedofactor'] = FLOAT DB['phongbasetint'] = FLOAT DB['phongbasetint2'] = FLOAT DB['phongboost'] = FLOAT DB['phongboost2'] = FLOAT DB['phongexponent'] = FLOAT DB['phongexponent2'] = FLOAT DB['phongexponentfactor'] = FLOAT DB['phongscale'] = FLOAT DB['phongscale2'] = FLOAT DB['portalcolorscale'] = FLOAT DB['portalopenamount'] = FLOAT DB['portalstatic'] = FLOAT DB['powerup'] = FLOAT DB['previewweaponobjscale'] = FLOAT DB['previewweaponuvscale'] = FLOAT DB['pulserate'] = FLOAT DB['radius'] = FLOAT DB['radiustrailfade'] = FLOAT DB['reflectamount'] = FLOAT DB['reflectance'] = FLOAT DB['reflectblendfactor'] = FLOAT DB['refractamount'] = FLOAT DB['rimhaloboost'] = FLOAT DB['rimlightalbedo'] = FLOAT DB['rimlightboost'] = FLOAT DB['rimlightexponent'] = FLOAT DB['rimlightscale'] = FLOAT DB['rotation'] = FLOAT DB['rotation2'] = FLOAT DB['rotation3'] = FLOAT DB['rotation4'] = FLOAT DB['saturation'] = FLOAT DB['scale'] = FLOAT DB['scale2'] = FLOAT DB['scale3'] = FLOAT DB['scale4'] = FLOAT DB['screenblurstrength'] = FLOAT DB['seamless_scale'] = FLOAT DB['selfillum_envmapmask_alpha'] = FLOAT DB['selfillumboost'] = FLOAT DB['selfillummaskscale'] = FLOAT DB['shadowatten'] = FLOAT DB['shadowcontrast'] = FLOAT DB['shadowfiltersize'] = FLOAT DB['shadowjitterseed'] = FLOAT DB['shadowrimboost'] = FLOAT DB['shadowsaturation'] = FLOAT DB['sharpness'] = FLOAT DB['sheenmapmaskoffsetx'] = FLOAT DB['sheenmapmaskoffsety'] = FLOAT DB['sheenmapmaskscalex'] = FLOAT DB['sheenmapmaskscaley'] = FLOAT DB['silhouettethickness'] = FLOAT DB['ssbentnormalintensity'] = FLOAT DB['ssdepth'] = FLOAT DB['sstintbyalbedo'] = FLOAT DB['startfadesize'] = FLOAT DB['staticamount'] = FLOAT DB['strength'] = FLOAT DB['stripe_lm_scale'] = FLOAT DB['texture1_lumend'] = FLOAT DB['texture1_lumstart'] = FLOAT DB['texture2_blendend'] = FLOAT DB['texture2_blendstart'] = FLOAT DB['texture2_bumpblendfactor'] = FLOAT DB['texture2_lumend'] = FLOAT DB['texture2_lumstart'] = FLOAT DB['texture2_uvscale'] = FLOAT DB['texture3_blendend'] = FLOAT DB['texture3_blendstart'] = FLOAT DB['texture3_bumpblendfactor'] = FLOAT DB['texture3_lumend'] = FLOAT DB['texture3_lumstart'] = FLOAT DB['texture3_uvscale'] = FLOAT DB['texture4_blendend'] = FLOAT DB['texture4_blendstart'] = FLOAT DB['texture4_bumpblendfactor'] = FLOAT DB['texture4_lumend'] = FLOAT DB['texture4_lumstart'] = FLOAT DB['texture4_uvscale'] = FLOAT DB['tiling'] = FLOAT DB['time'] = FLOAT DB['time_scale'] = FLOAT DB['toolcolorcorrection'] = FLOAT DB['tooltime'] = FLOAT DB['treeswayfalloffexp'] = FLOAT DB['treeswayheight'] = FLOAT DB['treeswayradius'] = FLOAT DB['treeswayscrumblefalloffexp'] = FLOAT DB['treeswayscrumblefrequency'] = FLOAT DB['treeswayscrumblespeed'] = FLOAT DB['treeswayscrumblestrength'] = FLOAT DB['treeswayspeed'] = FLOAT DB['treeswayspeedhighwindmultiplier'] = FLOAT DB['treeswayspeedlerpend'] = FLOAT DB['treeswayspeedlerpstart'] = FLOAT DB['treeswaystartheight'] = FLOAT DB['treeswaystartradius'] = FLOAT DB['treeswaystrength'] = FLOAT DB['uberroundness'] = FLOAT DB['unlitfactor'] = FLOAT DB['unwearstrength'] = FLOAT DB['uvscale'] = FLOAT DB['vertexfogamount'] = FLOAT DB['vignette_min_bright'] = FLOAT DB['vignette_power'] = FLOAT DB['volumetricintensity'] = FLOAT DB['vomitrefractscale'] = FLOAT DB['warpindex'] = FLOAT DB['warpparam'] = FLOAT DB['waterblendfactor'] = FLOAT DB['waterdepth'] = FLOAT DB['wave'] = FLOAT DB['wearbias'] = FLOAT DB['wearexponent'] = FLOAT DB['wearprogress'] = FLOAT DB['wearremapmax'] = FLOAT DB['wearremapmid'] = FLOAT DB['wearremapmin'] = FLOAT DB['wearwidthmax'] = FLOAT DB['wearwidthmin'] = FLOAT DB['weight0'] = FLOAT DB['weight1'] = FLOAT DB['weight2'] = FLOAT DB['weight3'] = FLOAT DB['weight_default'] = FLOAT DB['woodcut'] = FLOAT DB['zoomanimateseq2'] = FLOAT DB['aaenable'] = BOOL DB['abovewater'] = BOOL DB['addbumpmaps'] = BOOL DB['aimatcamera'] = BOOL DB['alloverpaintjob'] = BOOL DB['allowdiffusemodulation'] = BOOL DB['allowfencerenderstatehack'] = BOOL DB['allowlocalcontrast'] = BOOL DB['allownoise'] = BOOL DB['allowvignette'] = BOOL DB['alphaenvmapmask'] = BOOL DB['alphatesttocoverage'] = BOOL DB['aomaskusesuv2'] = BOOL DB['aousesuv2'] = BOOL DB['animatearmpulses'] = BOOL DB['aopass'] = BOOL DB['armature'] = BOOL DB['armwiden'] = BOOL DB['backsurface'] = BOOL DB['basealphaenvmask'] = BOOL DB['basemapalphaenvmapmask'] = BOOL DB['basealphaphongmask'] = BOOL DB['basealphaselfillummask'] = BOOL DB['basetexture2noenvmap'] = BOOL DB['basetexturenoenvmap'] = BOOL DB['blendframes'] = BOOL DB['blendtintbybasealpha'] = BOOL DB['blendwithsmokegrenade'] = BOOL DB['blobbyshadows'] = BOOL DB['bloomenable'] = BOOL DB['blurredvignetteenable'] = BOOL DB['blurrefract'] = BOOL DB['bump_force_on'] = BOOL DB['bumpalphaenvmask'] = BOOL DB['bumpbasetexture2withbumpmap'] = BOOL DB['cheapmode'] = BOOL DB['cloakpassenabled'] = BOOL DB['color_depth'] = BOOL DB['contactshadows'] = BOOL DB['crosshairmode'] = BOOL DB['custompaintjob'] = BOOL DB['debug_mode'] = BOOL DB['deferredshadows'] = BOOL DB['depthblend'] = BOOL DB['depthblurenable'] = BOOL DB['detail_alpha_mask_base_texture'] = BOOL DB['disablecsmlookup'] = BOOL DB['displacementwrinkle'] = BOOL DB['distancealpha'] = BOOL DB['distancealphafromdetail'] = BOOL DB['emissiveblendenabled'] = BOOL DB['enableclearcolor'] = BOOL DB['enablesrgb'] = BOOL DB['envmapanisotropy'] = BOOL DB['envmapmaskintintmasktexture'] = BOOL DB['fadeoutonsilhouette'] = BOOL DB['flashlightnolambert'] = BOOL DB['fleshdebugforcefleshon'] = BOOL DB['fleshinteriorenabled'] = BOOL DB['flow_cheap'] = BOOL DB['flow_debug'] = BOOL DB['fogenable'] = BOOL DB['flow_vortex1'] = BOOL DB['flow_vortex2'] = BOOL DB['forcealphawrite'] = BOOL DB['forcebump'] = BOOL DB['forcecheap'] = BOOL DB['forceenvmap'] = BOOL DB['forceexpensive'] = BOOL DB['forcephong'] = BOOL DB['forcerefract'] = BOOL DB['glow'] = BOOL DB['ignorevertexcolors'] = BOOL DB['interior'] = BOOL DB['intro'] = BOOL DB['inversedepthblend'] = BOOL DB['layeredgenormal'] = BOOL DB['layeredgepunchin'] = BOOL DB['lightmapwaterfog'] = BOOL DB['localcontrastenable'] = BOOL DB['localcontrastvignettestart'] = BOOL DB['localrefract'] = BOOL DB['logo2enabled'] = BOOL DB['lowqualityflashlightshadows'] = BOOL DB['magnifyenable'] = BOOL DB['masked'] = BOOL DB['mirrorhorizontal'] = BOOL DB['mod2x'] = BOOL DB['modeldecalignorez'] = BOOL DB['modelformat'] = BOOL DB['muloutputbyalpha'] = BOOL DB['needsnormals'] = BOOL DB['needstangents'] = BOOL DB['needstangentt'] = BOOL DB['newlayerblending'] = BOOL DB['nodiffusebumplighting'] = BOOL DB['noenvmapmip'] = BOOL DB['nofresnel'] = BOOL DB['noiseenable'] = BOOL DB['nolowendlightmap'] = BOOL DB['noscale'] = BOOL DB['nosrgb'] = BOOL DB['opaque'] = BOOL DB['outline'] = BOOL DB['perparticleoutline'] = BOOL DB['phong'] = BOOL DB['phongalbedotint'] = BOOL DB['phongdisablehalflambert'] = BOOL DB['pseudotranslucent'] = BOOL DB['preview'] = BOOL DB['previewignoreweaponscale'] = BOOL DB['pulse'] = BOOL DB['raytracesphere'] = BOOL DB['reflect2dskybox'] = BOOL DB['reflectentities'] = BOOL DB['reflectonlymarkedentities'] = BOOL DB['reflectskyboxonly'] = BOOL DB['rimlight'] = BOOL DB['rimmask'] = BOOL DB['scaleedgesoftnessbasedonscreenres'] = BOOL DB['scaleoutlinesoftnessbasedonscreenres'] = BOOL DB['seamless_base'] = BOOL DB['seamless_detail'] = BOOL DB['selfillumfresnel'] = BOOL DB['selfillumfresnelenabledthisframe'] = BOOL DB['separatedetailuvs'] = BOOL DB['shadersrgbread360'] = BOOL DB['sheenpassenabled'] = BOOL DB['showalpha'] = BOOL DB['softedges'] = BOOL DB['spheretexkillcombo'] = BOOL DB['swappatternmasks'] = BOOL DB['thirdperson'] = BOOL DB['toolmode'] = BOOL DB['translucentgoo'] = BOOL DB['treeswaystatic'] = BOOL DB['unlit'] = BOOL DB['use_fb_texture'] = BOOL DB['useinstancing'] = BOOL DB['useonstaticprop'] = BOOL DB['usingpixelshader'] = BOOL DB['vertexcolorlerp'] = BOOL DB['vertexcolormodulate'] = BOOL DB['vignetteenable'] = BOOL DB['volumetexturetest'] = BOOL DB['vomitenable'] = BOOL DB['writez'] = BOOL DB['zfailenable'] = BOOL DB['ambientreflectionbouncecolor'] = COLOR DB['cloakcolortint'] = COLOR DB['color'] = COLOR DB['color2'] = COLOR DB['colortint'] = COLOR DB['crosshaircolortint'] = COLOR DB['detailtint'] = COLOR DB['detailtint2'] = COLOR DB['emissiveblendtint'] = COLOR DB['envmaptint'] = COLOR DB['fakerimtint'] = COLOR DB['fleshbordertint'] = COLOR DB['fleshsubsurfacetint'] = COLOR DB['flow_color'] = COLOR DB['flow_vortex_color'] = COLOR DB['fogcolor'] = COLOR DB['glassenvmaptint'] = COLOR DB['glowcolor'] = COLOR DB['layerbordertint'] = COLOR DB['layertint1'] = COLOR DB['layertint2'] = COLOR DB['outlinecolor'] = COLOR DB['palettecolor1'] = COLOR DB['palettecolor2'] = COLOR DB['palettecolor3'] = COLOR DB['palettecolor4'] = COLOR DB['palettecolor5'] = COLOR DB['palettecolor6'] = COLOR DB['palettecolor7'] = COLOR DB['palettecolor8'] = COLOR DB['phongtint'] = COLOR DB['portalcolorgradientdark'] = COLOR DB['portalcolorgradientlight'] = COLOR DB['portalcoopcolorplayeroneportalone'] = COLOR DB['portalcoopcolorplayeroneportaltwo'] = COLOR DB['portalcoopcolorplayertwoportalone'] = COLOR DB['portalcoopcolorplayertwoportaltwo'] = COLOR DB['phongcolortint'] = COLOR DB['reflectivity'] = COLOR DB['reflecttint'] = COLOR DB['refracttint'] = COLOR DB['rimlighttint'] = COLOR DB['scroll1'] = COLOR DB['scroll2'] = COLOR DB['selfillumtint'] = COLOR DB['sheenmaptint'] = COLOR DB['silhouettecolor'] = COLOR DB['tint'] = COLOR DB['base_step_range'] = VEC2 DB['basetextureoffset'] = VEC2 DB['basetexturescale'] = VEC2 DB['bumpoffset'] = VEC2 DB['canvas_step_range'] = VEC2 DB['cloudscale'] = VEC2 DB['cropfactor'] = VEC2 DB['damagelevels1'] = VEC2 DB['damagelevels2'] = VEC2 DB['damagelevels3'] = VEC2 DB['damagelevels4'] = VEC2 DB['emissiveblendscrollvector'] = VEC2 DB['envmaplightscaleminmax'] = VEC2 DB['flowmapscrollrate'] = VEC2 DB['gray_step'] = VEC2 DB['lightmap_step_range'] = VEC2 DB['magnifycenter'] = VEC2 DB['maskscale'] = VEC2 DB['phongmaskcontrastbrightness'] = VEC2 DB['phongmaskcontrastbrightness2'] = VEC2 DB['refractionamount'] = VEC2 DB['scale'] = VEC2 DB['ambientocclcolor'] = VEC3 DB['ambientreflectionbouncecenter'] = VEC3 DB['armcolor'] = VEC3 DB['basealphaenvmapmaskminmaxexp'] = VEC3 DB['basecolortint'] = VEC3 DB['bbmax'] = VEC3 DB['bbmin'] = VEC3 DB['blendwithsmokegrenadeposentity'] = VEC3 DB['blendwithsmokegrenadepossmoke'] = VEC3 DB['camocolor0'] = VEC3 DB['camocolor1'] = VEC3 DB['camocolor2'] = VEC3 DB['camocolor3'] = VEC3 DB['canvas_color_end'] = VEC3 DB['canvas_color_start'] = VEC3 DB['canvas_scale'] = VEC3 DB['clearcolor'] = VEC3 DB['colortint2'] = VEC3 DB['colortint3'] = VEC3 DB['colortint4'] = VEC3 DB['dimensions'] = VEC3 DB['entcenter'] = VEC3 DB['entityorigin'] = VEC3 DB['envmapfresnelminmaxexp'] = VEC3 DB['eyeorigin'] = VEC3 DB['eyeup'] = VEC3 DB['flow_vortex_pos1'] = VEC3 DB['flow_vortex_pos2'] = VEC3 DB['forward'] = VEC3 DB['fresnelranges'] = VEC3 DB['hsv_correction'] = VEC3 DB['interiorcolor'] = VEC3 DB['leafcenter'] = VEC3 DB['lerpcolor1'] = VEC3 DB['lerpcolor2'] = VEC3 DB['light_color'] = VEC3 DB['light_position'] = VEC3 DB['pattern1color1'] = VEC3 DB['pattern1color2'] = VEC3 DB['pattern1color3'] = VEC3 DB['pattern1color4'] = VEC3 DB['pattern2color1'] = VEC3 DB['pattern2color2'] = VEC3 DB['pattern2color3'] = VEC3 DB['pattern2color4'] = VEC3 DB['phongcolortint'] = VEC3 DB['phongfresnel'] = VEC3 DB['phongfresnel2'] = VEC3 DB['phongfresnelranges'] = VEC3 DB['spriteorigin'] = VEC3 DB['sscolortint'] = VEC3 DB['stripe_color'] = VEC3 DB['stripe_fade_normal1'] = VEC3 DB['stripe_fade_normal2'] = VEC3 DB['stripe_scale'] = VEC3 DB['texadjustlevels0'] = VEC3 DB['texadjustlevels1'] = VEC3 DB['texadjustlevels2'] = VEC3 DB['texadjustlevels3'] = VEC3 DB['translucentfresnelminmaxexp'] = VEC3 DB['uvprojoffset'] = VEC3 DB['vomitcolor1'] = VEC3 DB['vomitcolor2'] = VEC3 DB['aainternal1'] = VEC4 DB['aainternal2'] = VEC4 DB['aainternal3'] = VEC4 DB['attenfactors'] = VEC4 DB['bloomamount'] = VEC4 DB['channel_select'] = VEC4 DB['curvaturewearboost'] = VEC4 DB['curvaturewearpower'] = VEC4 DB['damagedetailbrightnessadjustment'] = VEC4 DB['damagedetailenvboost'] = VEC4 DB['damagedetailphongboost'] = VEC4 DB['damagedetailsaturation'] = VEC4 DB['damageedgeenvboost'] = VEC4 DB['damageedgephongboost'] = VEC4 DB['damagegrunge'] = VEC4 DB['damagenormaledgedepth'] = VEC4 DB['detailenvboost'] = VEC4 DB['detailgrunge'] = VEC4 DB['detailmetalness'] = VEC4 DB['detailnormaldepth'] = VEC4 DB['detailphongalbedotint'] = VEC4 DB['detailphongboost'] = VEC4 DB['detailscale'] = VEC4 DB['detailwarpindex'] = VEC4 DB['distortbounds'] = VEC4 DB['eyedir'] = VEC4 DB['eyeposznear'] = VEC4 DB['fadecolor'] = VEC4 DB['flashlightcolor'] = VEC4 DB['flesheffectcenterradius1'] = VEC4 DB['flesheffectcenterradius2'] = VEC4 DB['flesheffectcenterradius3'] = VEC4 DB['flesheffectcenterradius4'] = VEC4 DB['fresnelopacityranges'] = VEC4 DB['fxaainternalc'] = VEC4 DB['fxaainternalq'] = VEC4 DB['glintu'] = VEC4 DB['glintv'] = VEC4 DB['grimebrightnessadjustment'] = VEC4 DB['grimesaturation'] = VEC4 DB['grungemax'] = VEC4 DB['hslnoisescale'] = VEC4 DB['irisu'] = VEC4 DB['irisv'] = VEC4 DB['jitterseed'] = VEC4 DB['motionblurinternal'] = VEC4 DB['motionblurviewportinternal'] = VEC4 DB['noisescale'] = VEC4 DB['originfarz'] = VEC4 DB['patterncolorindices'] = VEC4 DB['phongamount'] = VEC4 DB['phongamount2'] = VEC4 DB['quatorientation'] = VEC4 DB['rimhalobounds'] = VEC4 DB['scalebias'] = VEC4 DB['selfillumfresnelminmaxexp'] = VEC4 DB['shadowsaturationbounds'] = VEC4 DB['shadowtint'] = VEC4 DB['tangentsopacityranges'] = VEC4 DB['tangenttopacityranges'] = VEC4 DB['uberheightwidth'] = VEC4 DB['ubernearfar'] = VEC4 DB['weardetailenvboost'] = VEC4 DB['weardetailphongboost'] = VEC4 DB['weights'] = VEC4 DB['alternateviewmatrix'] = MATRIX DB['basetexturetransform'] = MATRIX DB['basetexturetransform2'] = MATRIX DB['blendmasktransform'] = MATRIX DB['blendmodulatetransform'] = MATRIX DB['bumptransform'] = MATRIX DB['bumptransform2'] = MATRIX DB['detail1transform'] = MATRIX DB['detail2transform'] = MATRIX DB['detail1texturetransform'] = MATRIX DB['detail2texturetransform'] = MATRIX DB['detailtexturetransform'] = MATRIX DB['detailtransform'] = MATRIX DB['envmapmasktransform'] = MATRIX DB['envmapmasktransform2'] = MATRIX DB['grungetexturerotation'] = MATRIX DB['grungetexturetransform'] = MATRIX DB['orientationmatrix'] = MATRIX DB['patterntexturerotation'] = MATRIX DB['patterntexturetransform'] = MATRIX DB['texture2transform'] = MATRIX DB['texturetransform'] = MATRIX DB['viewproj'] = MATRIX DB['weartexturetransform'] = MATRIX DB['worldtotexture'] = MATRIX DB['textransform0'] = MATRIX_4X2 DB['textransform1'] = MATRIX_4X2 DB['textransform2'] = MATRIX_4X2 DB['textransform3'] = MATRIX_4X2 DB['lights'] = FOUR_CC
class Album: def __init__(self, id, title, file): self.id = id self.title = title self.file = file
class Album: def __init__(self, id, title, file): self.id = id self.title = title self.file = file
for astTuple in Query.input.tuples('ast'): assignment = astTuple.ast leftType = assignment.left.type() rightType = assignment.right.type() if type(leftType) is ArrayType and type(rightType) is ArrayType: if not leftType.elementType().equals(rightType.elementType()): Query.result.add(astTuple)
for ast_tuple in Query.input.tuples('ast'): assignment = astTuple.ast left_type = assignment.left.type() right_type = assignment.right.type() if type(leftType) is ArrayType and type(rightType) is ArrayType: if not leftType.elementType().equals(rightType.elementType()): Query.result.add(astTuple)
def add_time(start, duration, requested_day=""): # List for weekdays week_days = ("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday") # Convert start string in start list clock = start.split() time = clock[0].split(":") am_pm = clock[1] # Calculate 24hr format if am_pm == "PM": hour = int(time[0]) + 12 time[0] = str(hour) # Convert duration string in duration list duration_time = duration.split(":") # Calculate new hours and minutes n_hour = int(time[0]) + int(duration_time[0]) n_minutes = int(time[1]) + int(duration_time[1]) # Calculate extra hours and minutes if n_minutes >= 60: extra_hour = n_minutes // 60 n_minutes -= extra_hour * 60 n_hour += extra_hour # Calculate extra day/s extra_day = 0 if n_hour > 24: extra_day = n_hour // 24 n_hour -= extra_day * 24 # Calculate 12hr format if 12 > n_hour > 0: am_pm = "AM" elif n_hour == 12: am_pm = "PM" elif n_hour > 12: am_pm = "PM" n_hour -= 12 else: am_pm = "AM" n_hour += 12 # Calculate extra day/s if extra_day > 0: if extra_day == 1: next_day = " (next day)" else: next_day = " (" + str(extra_day) + " days later)" else: next_day = "" # Calculate day on requested_day if requested_day: week_index = extra_day // 7 i = week_days.index(requested_day.lower().capitalize()) + (extra_day - 7 * week_index) if i > 6: i -= 7 day = ", " + week_days[i] else: day = "" # Prepare solution new_time = str(n_hour) + ":" + \ (str(n_minutes) if n_minutes > 9 else ("0" + str(n_minutes))) + \ " " + am_pm + day + next_day return new_time
def add_time(start, duration, requested_day=''): week_days = ('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday') clock = start.split() time = clock[0].split(':') am_pm = clock[1] if am_pm == 'PM': hour = int(time[0]) + 12 time[0] = str(hour) duration_time = duration.split(':') n_hour = int(time[0]) + int(duration_time[0]) n_minutes = int(time[1]) + int(duration_time[1]) if n_minutes >= 60: extra_hour = n_minutes // 60 n_minutes -= extra_hour * 60 n_hour += extra_hour extra_day = 0 if n_hour > 24: extra_day = n_hour // 24 n_hour -= extra_day * 24 if 12 > n_hour > 0: am_pm = 'AM' elif n_hour == 12: am_pm = 'PM' elif n_hour > 12: am_pm = 'PM' n_hour -= 12 else: am_pm = 'AM' n_hour += 12 if extra_day > 0: if extra_day == 1: next_day = ' (next day)' else: next_day = ' (' + str(extra_day) + ' days later)' else: next_day = '' if requested_day: week_index = extra_day // 7 i = week_days.index(requested_day.lower().capitalize()) + (extra_day - 7 * week_index) if i > 6: i -= 7 day = ', ' + week_days[i] else: day = '' new_time = str(n_hour) + ':' + (str(n_minutes) if n_minutes > 9 else '0' + str(n_minutes)) + ' ' + am_pm + day + next_day return new_time
# Link --> https://www.hackerrank.com/challenges/tree-level-order-traversal/problem # Code: def levelOrder(root): if root: queue = [] queue.append(root) while queue: temp_node = queue[0] queue.pop(0) print(temp_node.info, end = " ") if temp_node.left: queue.append(temp_node.left) if temp_node.right: queue.append(temp_node.right)
def level_order(root): if root: queue = [] queue.append(root) while queue: temp_node = queue[0] queue.pop(0) print(temp_node.info, end=' ') if temp_node.left: queue.append(temp_node.left) if temp_node.right: queue.append(temp_node.right)