content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
# -*- coding: utf-8 -*- # Scrapy settings for douban project # # For simplicity, this file contains only the most important settings by # default. All the other settings are documented here: # # http://doc.scrapy.org/en/latest/topics/settings.html # BOT_NAME = 'douban' SPIDER_MODULES = ['douban.spiders'] NEWSPIDER_MODULE = 'douban.spiders' DOWNLOAD_DELAY = 0.1 RANDOMIZE_DOWNLOAD_DELAY = True USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.54 Safari/536.5' COOKIES_ENABLED = True LOG_LEVEL = 'WARNING' # pipelines ITEM_PIPELINES = { 'douban.pipelines.DoubanPipeline': 300 } # set as BFS DEPTH_PRIORITY = 1 SCHEDULER_DISK_QUEUE = 'scrapy.squeue.PickleFifoDiskQueue' SCHEDULER_MEMORY_QUEUE = 'scrapy.squeue.FifoMemoryQueue' # Crawl responsibly by identifying yourself (and your website) on the user-agent # USER_AGENT = 'douban (+http://www.yourdomain.com)'
bot_name = 'douban' spider_modules = ['douban.spiders'] newspider_module = 'douban.spiders' download_delay = 0.1 randomize_download_delay = True user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.54 Safari/536.5' cookies_enabled = True log_level = 'WARNING' item_pipelines = {'douban.pipelines.DoubanPipeline': 300} depth_priority = 1 scheduler_disk_queue = 'scrapy.squeue.PickleFifoDiskQueue' scheduler_memory_queue = 'scrapy.squeue.FifoMemoryQueue'
12 + 5 + 1 x=12 x y=20 print("Use print") print(y)
12 + 5 + 1 x = 12 x y = 20 print('Use print') print(y)
# -*- coding: UTF-8 -*- def add_numbers(x, y): return x + y print(type('This is a string')) # <type 'str'> print(type(None)) # <type 'NoneType'> print(type(1)) # <type 'int'> print(type(1.0)) # <type 'float'> print(type(add_numbers)) # <type 'function'> print('----------------------------------------') x = (1, 'a', 2, 'b') print(type(x)) # <type 'tuple'> x = [1, 'a', 2, 'b'] print(type(x)) # <type 'list'> x.append(3.3) print(x) # [1, 'a', 2, 'b', 3.3] print('----------------------------------------') for item in x: print(item) i = 0 while i != len(x): print(x[i]) i += 1 print([1, 2] + [3, 4]) # [1, 2, 3, 4] print([1] * 3) # [1, 1, 1] print(1 in [1, 2, 3]) # True print('----------------------------------------') x = 'This is a string' print(x[0]) # first character # T print(x[0:1]) # first character, but we have explicitly set the end character # T print(x[0:2]) # first two characters # Th print(x[-1]) # g print(x[-4:-2]) # ri print(x[:3]) # Thi print(x[3:]) # s is a string print('----------------------------------------') firstname = 'Christopher' lastname = 'Brooks' print(firstname + ' ' + lastname) # Christopher Brooks print(firstname * 3) # ChristopherChristopherChristopher print('Chris' in firstname) # True firstname = 'Christopher Arthur Hansen Brooks'.split(' ')[0] # [0] selects the first element of the list lastname = 'Christopher Arthur Hansen Brooks'.split(' ')[-1] # [-1] selects the last element of the list print(firstname) # Christopher print(lastname) # Brooks print('Chris' + str(2)) # Chris2 print('----------------------------------------') x = {'Christopher Brooks': 'brooksch@umich.edu', 'Bill Gates': 'billg@microsoft.com'} print(x['Christopher Brooks']) # Retrieve a value by using the indexing operator # brooksch@umich.edu x['Kevyn Collins-Thompson'] = None print(x['Kevyn Collins-Thompson']) # None for name in x: print(x[name]) for email in x.values(): print(email) for name, email in x.items(): print(name) print(email) print('----------------------------------------') # x = ('Christopher', 'Brooks', 'brooksch@umich.edu', 'Ann Arbor') # Error is x has 4 elements x = ('Christopher', 'Brooks', 'brooksch@umich.edu') fname, lname, email = x print(fname) # Christopher print(lname) # Brooks
def add_numbers(x, y): return x + y print(type('This is a string')) print(type(None)) print(type(1)) print(type(1.0)) print(type(add_numbers)) print('----------------------------------------') x = (1, 'a', 2, 'b') print(type(x)) x = [1, 'a', 2, 'b'] print(type(x)) x.append(3.3) print(x) print('----------------------------------------') for item in x: print(item) i = 0 while i != len(x): print(x[i]) i += 1 print([1, 2] + [3, 4]) print([1] * 3) print(1 in [1, 2, 3]) print('----------------------------------------') x = 'This is a string' print(x[0]) print(x[0:1]) print(x[0:2]) print(x[-1]) print(x[-4:-2]) print(x[:3]) print(x[3:]) print('----------------------------------------') firstname = 'Christopher' lastname = 'Brooks' print(firstname + ' ' + lastname) print(firstname * 3) print('Chris' in firstname) firstname = 'Christopher Arthur Hansen Brooks'.split(' ')[0] lastname = 'Christopher Arthur Hansen Brooks'.split(' ')[-1] print(firstname) print(lastname) print('Chris' + str(2)) print('----------------------------------------') x = {'Christopher Brooks': 'brooksch@umich.edu', 'Bill Gates': 'billg@microsoft.com'} print(x['Christopher Brooks']) x['Kevyn Collins-Thompson'] = None print(x['Kevyn Collins-Thompson']) for name in x: print(x[name]) for email in x.values(): print(email) for (name, email) in x.items(): print(name) print(email) print('----------------------------------------') x = ('Christopher', 'Brooks', 'brooksch@umich.edu') (fname, lname, email) = x print(fname) print(lname)
__all__ = ( "SetOptConfError", "NamingError", "DataTypeError", "MissingRequiredError", "ReadOnlyError", ) class SetOptConfError(Exception): pass class NamingError(SetOptConfError): pass class DataTypeError(SetOptConfError): pass class MissingRequiredError(SetOptConfError): pass class ReadOnlyError(SetOptConfError): pass
__all__ = ('SetOptConfError', 'NamingError', 'DataTypeError', 'MissingRequiredError', 'ReadOnlyError') class Setoptconferror(Exception): pass class Namingerror(SetOptConfError): pass class Datatypeerror(SetOptConfError): pass class Missingrequirederror(SetOptConfError): pass class Readonlyerror(SetOptConfError): pass
# https://codeforces.com/problemset/problem/467/A n = int(input()) rooms = [list(map(int, input().split())) for _ in range(n)] ans = 0 for room in rooms: if room[1] - room[0] >= 2: ans += 1 print(ans)
n = int(input()) rooms = [list(map(int, input().split())) for _ in range(n)] ans = 0 for room in rooms: if room[1] - room[0] >= 2: ans += 1 print(ans)
# # PySNMP MIB module A3COM-HUAWEI-VRRP-EXT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/A3COM-HUAWEI-VRRP-EXT-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 16:53:06 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # h3cCommon, = mibBuilder.importSymbols("A3COM-HUAWEI-OID-MIB", "h3cCommon") ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ConstraintsIntersection, ValueRangeConstraint, ValueSizeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsIntersection", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsUnion") ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") NotificationType, ModuleIdentity, Counter32, TimeTicks, Unsigned32, ObjectIdentity, Bits, IpAddress, Counter64, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, iso, Gauge32, Integer32 = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "ModuleIdentity", "Counter32", "TimeTicks", "Unsigned32", "ObjectIdentity", "Bits", "IpAddress", "Counter64", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "Gauge32", "Integer32") DisplayString, RowStatus, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "RowStatus", "TextualConvention") vrrpOperVrId, = mibBuilder.importSymbols("VRRP-MIB", "vrrpOperVrId") h3cVrrpExt = ModuleIdentity((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 24)) if mibBuilder.loadTexts: h3cVrrpExt.setLastUpdated('200412090000Z') if mibBuilder.loadTexts: h3cVrrpExt.setOrganization('Huawei-3Com Technologies Co.,Ltd.') h3cVrrpExtMibObject = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 24, 1)) h3cVrrpExtTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 24, 1, 1), ) if mibBuilder.loadTexts: h3cVrrpExtTable.setStatus('current') h3cVrrpExtEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 24, 1, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "VRRP-MIB", "vrrpOperVrId"), (0, "A3COM-HUAWEI-VRRP-EXT-MIB", "h3cVrrpExtTrackInterface")) if mibBuilder.loadTexts: h3cVrrpExtEntry.setStatus('current') h3cVrrpExtTrackInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 24, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))) if mibBuilder.loadTexts: h3cVrrpExtTrackInterface.setStatus('current') h3cVrrpExtPriorityReduce = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 24, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255)).clone(10)).setMaxAccess("readcreate") if mibBuilder.loadTexts: h3cVrrpExtPriorityReduce.setStatus('current') h3cVrrpExtRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 24, 1, 1, 1, 3), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: h3cVrrpExtRowStatus.setStatus('current') mibBuilder.exportSymbols("A3COM-HUAWEI-VRRP-EXT-MIB", h3cVrrpExtMibObject=h3cVrrpExtMibObject, h3cVrrpExtPriorityReduce=h3cVrrpExtPriorityReduce, PYSNMP_MODULE_ID=h3cVrrpExt, h3cVrrpExtTrackInterface=h3cVrrpExtTrackInterface, h3cVrrpExtRowStatus=h3cVrrpExtRowStatus, h3cVrrpExtEntry=h3cVrrpExtEntry, h3cVrrpExtTable=h3cVrrpExtTable, h3cVrrpExt=h3cVrrpExt)
(h3c_common,) = mibBuilder.importSymbols('A3COM-HUAWEI-OID-MIB', 'h3cCommon') (object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, constraints_intersection, value_range_constraint, value_size_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ConstraintsIntersection', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsUnion') (if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (notification_type, module_identity, counter32, time_ticks, unsigned32, object_identity, bits, ip_address, counter64, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, iso, gauge32, integer32) = mibBuilder.importSymbols('SNMPv2-SMI', 'NotificationType', 'ModuleIdentity', 'Counter32', 'TimeTicks', 'Unsigned32', 'ObjectIdentity', 'Bits', 'IpAddress', 'Counter64', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'iso', 'Gauge32', 'Integer32') (display_string, row_status, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'RowStatus', 'TextualConvention') (vrrp_oper_vr_id,) = mibBuilder.importSymbols('VRRP-MIB', 'vrrpOperVrId') h3c_vrrp_ext = module_identity((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 24)) if mibBuilder.loadTexts: h3cVrrpExt.setLastUpdated('200412090000Z') if mibBuilder.loadTexts: h3cVrrpExt.setOrganization('Huawei-3Com Technologies Co.,Ltd.') h3c_vrrp_ext_mib_object = mib_identifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 24, 1)) h3c_vrrp_ext_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 24, 1, 1)) if mibBuilder.loadTexts: h3cVrrpExtTable.setStatus('current') h3c_vrrp_ext_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 24, 1, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'VRRP-MIB', 'vrrpOperVrId'), (0, 'A3COM-HUAWEI-VRRP-EXT-MIB', 'h3cVrrpExtTrackInterface')) if mibBuilder.loadTexts: h3cVrrpExtEntry.setStatus('current') h3c_vrrp_ext_track_interface = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 24, 1, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))) if mibBuilder.loadTexts: h3cVrrpExtTrackInterface.setStatus('current') h3c_vrrp_ext_priority_reduce = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 24, 1, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 255)).clone(10)).setMaxAccess('readcreate') if mibBuilder.loadTexts: h3cVrrpExtPriorityReduce.setStatus('current') h3c_vrrp_ext_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 24, 1, 1, 1, 3), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: h3cVrrpExtRowStatus.setStatus('current') mibBuilder.exportSymbols('A3COM-HUAWEI-VRRP-EXT-MIB', h3cVrrpExtMibObject=h3cVrrpExtMibObject, h3cVrrpExtPriorityReduce=h3cVrrpExtPriorityReduce, PYSNMP_MODULE_ID=h3cVrrpExt, h3cVrrpExtTrackInterface=h3cVrrpExtTrackInterface, h3cVrrpExtRowStatus=h3cVrrpExtRowStatus, h3cVrrpExtEntry=h3cVrrpExtEntry, h3cVrrpExtTable=h3cVrrpExtTable, h3cVrrpExt=h3cVrrpExt)
age = float(input()) gender = input() if gender == 'm': if 0 < age < 16: print('Master') elif age >= 16: print ('Mr.') elif gender == 'f': if 0 < age < 16: print('Miss') elif age >= 16: print ('Ms.')
age = float(input()) gender = input() if gender == 'm': if 0 < age < 16: print('Master') elif age >= 16: print('Mr.') elif gender == 'f': if 0 < age < 16: print('Miss') elif age >= 16: print('Ms.')
# Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. # Input: [-2,1,-3,4,-1,2,1,-5,4], # Output: 6 # Explanation: [4,-1,2,1] has the largest sum = 6. #https://www.geeksforgeeks.org/print-the-maximum-subarray-sum/ def naive(a): b = [] index = [] for i in range(len(a)): for j in range(i,len(a)): b.append(sum(a[i:j+1])) index.append([i,j]) return b, index def main(a): curr_sum = max_sum = a[0] end_index = 0 for i in range(1,len(a)): curr_sum=max(a[i], curr_sum+a[i]) if max_sum < curr_sum: end_index = i max_sum = max(max_sum, curr_sum) _max_sum = max_sum start_index = end_index while start_index >= 0: _max_sum -=a[start_index] if _max_sum ==0: break start_index -= 1 # print(start_index, end_index) for i in range(start_index, end_index+1): print(a[i], end=" ") return max_sum if __name__ == "__main__": a=[-2,1,-3,4,-1,5,1,-5,4] # b, index=naive(a) # print(max(b),index[b.index(max(b))]) # print(b) # print(index[27], b[27]) print(main(a))
def naive(a): b = [] index = [] for i in range(len(a)): for j in range(i, len(a)): b.append(sum(a[i:j + 1])) index.append([i, j]) return (b, index) def main(a): curr_sum = max_sum = a[0] end_index = 0 for i in range(1, len(a)): curr_sum = max(a[i], curr_sum + a[i]) if max_sum < curr_sum: end_index = i max_sum = max(max_sum, curr_sum) _max_sum = max_sum start_index = end_index while start_index >= 0: _max_sum -= a[start_index] if _max_sum == 0: break start_index -= 1 for i in range(start_index, end_index + 1): print(a[i], end=' ') return max_sum if __name__ == '__main__': a = [-2, 1, -3, 4, -1, 5, 1, -5, 4] print(main(a))
# cook your dish here #input n=int(input("")) resp=[] for i in range(0,n): resp.append(input("")) #print(n,resp) def validlang(req): newreq=[] for i in req: if i!=" ": newreq.append(i) needed=[newreq[0],newreq[1]] lang1=[newreq[2],newreq[3]] lang2=[newreq[4],newreq[5]] final=[] for i in needed: if i in lang1: final.append("A") else: final.append("B") if final[0]!=final[1]: return 0 elif final[0]==final[1] and final[0]=="A": return 1 elif final[0]==final[1] and final[0]=="B": return 2 for i in resp: print(validlang(i))
n = int(input('')) resp = [] for i in range(0, n): resp.append(input('')) def validlang(req): newreq = [] for i in req: if i != ' ': newreq.append(i) needed = [newreq[0], newreq[1]] lang1 = [newreq[2], newreq[3]] lang2 = [newreq[4], newreq[5]] final = [] for i in needed: if i in lang1: final.append('A') else: final.append('B') if final[0] != final[1]: return 0 elif final[0] == final[1] and final[0] == 'A': return 1 elif final[0] == final[1] and final[0] == 'B': return 2 for i in resp: print(validlang(i))
nombre = "Fulanito Fulanovsky" usa_lentes = True tiene_mascota = False edad = 25 pasatiempos = ["Correr", "Cocinar", "Leer", "Bailar"] celulares = { "xiaomi redmi": { "RAM": 3, "ROM": 32, "Procesador": 2.1 }, "iphone xs": { "RAM": 4, "ROM": 64, "Procesador": 2.6 }, } print("Nombre: {}".format(nombre)) print("Usa lentes?: {}".format(usa_lentes)) print("Tiene mascotas?: {}".format(usa_lentes)) print("Edad: {}".format(edad)) print("Pasatiempos: {}".format(pasatiempos)) print("Celulares: {}".format(celulares)) #and = "Palabrita" #print(and)
nombre = 'Fulanito Fulanovsky' usa_lentes = True tiene_mascota = False edad = 25 pasatiempos = ['Correr', 'Cocinar', 'Leer', 'Bailar'] celulares = {'xiaomi redmi': {'RAM': 3, 'ROM': 32, 'Procesador': 2.1}, 'iphone xs': {'RAM': 4, 'ROM': 64, 'Procesador': 2.6}} print('Nombre: {}'.format(nombre)) print('Usa lentes?: {}'.format(usa_lentes)) print('Tiene mascotas?: {}'.format(usa_lentes)) print('Edad: {}'.format(edad)) print('Pasatiempos: {}'.format(pasatiempos)) print('Celulares: {}'.format(celulares))
alerts = [ { "uuid": "d916cb34-6ee3-48c0-bca5-3f3cc08db5d3", "type": "v1/insights/droplet/cpu", "description": "CPU is running high", "compare": "GreaterThan", "value": 70, "window": "5m", "entities": [], "tags": [], "alerts": {"slack": [], "email": ["alerts@example.com"]}, "enabled": True, } ]
alerts = [{'uuid': 'd916cb34-6ee3-48c0-bca5-3f3cc08db5d3', 'type': 'v1/insights/droplet/cpu', 'description': 'CPU is running high', 'compare': 'GreaterThan', 'value': 70, 'window': '5m', 'entities': [], 'tags': [], 'alerts': {'slack': [], 'email': ['alerts@example.com']}, 'enabled': True}]
# Uses Python3 n = int(input('Enter the number for which you want fibonnaci: ')) def fibonnaci_last_digit(num): second_last = 0 last = 1 if num < 0: return 'Incorrect input' elif num == 0: return second_last elif num == 1: return last for i in range(1, num): next = ((last % 10) + (second_last % 10)) % 10 second_last = last last = next return last print(fibonnaci_last_digit(n))
n = int(input('Enter the number for which you want fibonnaci: ')) def fibonnaci_last_digit(num): second_last = 0 last = 1 if num < 0: return 'Incorrect input' elif num == 0: return second_last elif num == 1: return last for i in range(1, num): next = (last % 10 + second_last % 10) % 10 second_last = last last = next return last print(fibonnaci_last_digit(n))
class User: def __init__(self, name): self.name = name class SubscribedUser(User): def __init__(self, name): super(SubscribedUser, self).__init__(name) self.subscribed = True class Account: def __init__(self, user, email_broadcaster): self.user = user self.email_broadcaster = email_broadcaster def on_account_created(self, event): return self.email_broadcaster.broadcast(event, self.user) class Rectangle: def __init__(self, width, height): self._height = height self._width = width @property def area(self): return self._width * self._height def __str__(self): return f"Width: {self.width}, height: {self.height}" @property def width(self): return self._width @width.setter def width(self, value): self._width = value @property def height(self): return self._height @height.setter def height(self, value): self._height = value
class User: def __init__(self, name): self.name = name class Subscribeduser(User): def __init__(self, name): super(SubscribedUser, self).__init__(name) self.subscribed = True class Account: def __init__(self, user, email_broadcaster): self.user = user self.email_broadcaster = email_broadcaster def on_account_created(self, event): return self.email_broadcaster.broadcast(event, self.user) class Rectangle: def __init__(self, width, height): self._height = height self._width = width @property def area(self): return self._width * self._height def __str__(self): return f'Width: {self.width}, height: {self.height}' @property def width(self): return self._width @width.setter def width(self, value): self._width = value @property def height(self): return self._height @height.setter def height(self, value): self._height = value
def count_elem(array, query): def first_occurance(array, query): lo, hi = 0, len(array) -1 while lo <= hi: mid = lo + (hi - lo) // 2 if (array[mid] == query and mid == 0) or \ (array[mid] == query and array[mid-1] < query): return mid elif (array[mid] <= query): lo = mid + 1 else: hi = mid - 1 def last_occurance(array, query): lo, hi = 0, len(array) -1 while lo <= hi: mid = lo + (hi - lo) // 2 if (array[mid] == query and mid == len(array) - 1) or \ (array[mid] == query and array[mid+1] > query): return mid elif (array[mid] <= query): lo = mid + 1 else: hi = mid - 1 first = first_occurance(array, query) last = last_occurance(array, query) if first is None or last is None: return None return last - first + 1 array = [1,2,3,3,3,3,4,4,4,4,5,6,6,6] print(array) print("-----COUNT-----") query = 3 print("count: ", query, " :" , count_elem(array, query)) print("-----COUNT-----") query = 5 print("count: ", query, " :" , count_elem(array, query)) print("-----COUNT-----") query = 7 print("count: ", query, " :" , count_elem(array, query)) print("-----COUNT-----") query = 1 print("count: ", query, " :" , count_elem(array, query)) print("-----COUNT-----") query = -1 print("count: ", query, " :" , count_elem(array, query)) print("-----COUNT-----") query = 9 print("count: ", query, " :" , count_elem(array, query))
def count_elem(array, query): def first_occurance(array, query): (lo, hi) = (0, len(array) - 1) while lo <= hi: mid = lo + (hi - lo) // 2 if array[mid] == query and mid == 0 or (array[mid] == query and array[mid - 1] < query): return mid elif array[mid] <= query: lo = mid + 1 else: hi = mid - 1 def last_occurance(array, query): (lo, hi) = (0, len(array) - 1) while lo <= hi: mid = lo + (hi - lo) // 2 if array[mid] == query and mid == len(array) - 1 or (array[mid] == query and array[mid + 1] > query): return mid elif array[mid] <= query: lo = mid + 1 else: hi = mid - 1 first = first_occurance(array, query) last = last_occurance(array, query) if first is None or last is None: return None return last - first + 1 array = [1, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 6, 6, 6] print(array) print('-----COUNT-----') query = 3 print('count: ', query, ' :', count_elem(array, query)) print('-----COUNT-----') query = 5 print('count: ', query, ' :', count_elem(array, query)) print('-----COUNT-----') query = 7 print('count: ', query, ' :', count_elem(array, query)) print('-----COUNT-----') query = 1 print('count: ', query, ' :', count_elem(array, query)) print('-----COUNT-----') query = -1 print('count: ', query, ' :', count_elem(array, query)) print('-----COUNT-----') query = 9 print('count: ', query, ' :', count_elem(array, query))
#!/usr/bin/env python main = units.configure.cli.prompt if __name__ == '__main__': main()
main = units.configure.cli.prompt if __name__ == '__main__': main()
class Command: ADVANCE = 1 REVERSE = 2 ADVANCE_LEFT = 3 ADVANCE_RIGHT = 4 REVERSE_LEFT = 5 REVERSE_RIGHT = 6 OBSTACLE_FRONT = 7 OBSTACLE_BOTTOM = 8 NONE_OBSTACLE_FRONT = 9 NONE_OBSTACLE_BOTTOM = 10 BRAKE = 11 DISABLE_MOTER = 12
class Command: advance = 1 reverse = 2 advance_left = 3 advance_right = 4 reverse_left = 5 reverse_right = 6 obstacle_front = 7 obstacle_bottom = 8 none_obstacle_front = 9 none_obstacle_bottom = 10 brake = 11 disable_moter = 12
print('this is test3') print('add=====') print('add=====2')
print('this is test3') print('add=====') print('add=====2')
def setup(): size(500,500) smooth() background(255) noStroke() colorMode(HSB) flug = True def draw(): global flug if(flug): for i in range(0,10): for j in range(0,5): fill (10, random (0, 255) , random (10, 250)) rect(j*40+50 , i*40+50 , 35, 35) rect ((10 -j)*40+10 , i*40+50 , 35, 35) def mouseClicked(): global flug flug=not flug
def setup(): size(500, 500) smooth() background(255) no_stroke() color_mode(HSB) flug = True def draw(): global flug if flug: for i in range(0, 10): for j in range(0, 5): fill(10, random(0, 255), random(10, 250)) rect(j * 40 + 50, i * 40 + 50, 35, 35) rect((10 - j) * 40 + 10, i * 40 + 50, 35, 35) def mouse_clicked(): global flug flug = not flug
# # Copyright 2019-2020 VMware, Inc. # # SPDX-License-Identifier: BSD-2-Clause # # Flask configurations DEBUG = True # Application configurations OBJECT_STORE_HTTPS_ENABLED = False
debug = True object_store_https_enabled = False
class FlockAIController: def __init__(self): pass def run(self): pass
class Flockaicontroller: def __init__(self): pass def run(self): pass
#!/usr/bin/python3 # --- 001 > U5W2P1_Task11_w1 def solution( a, b ): input = [a, b] larger = -float('inf') for x in input: if(larger < x): larger = x return larger if __name__ == "__main__": print('----------start------------') a = 1510 b = 7043 print(solution( a, b)) print('------------end------------')
def solution(a, b): input = [a, b] larger = -float('inf') for x in input: if larger < x: larger = x return larger if __name__ == '__main__': print('----------start------------') a = 1510 b = 7043 print(solution(a, b)) print('------------end------------')
# on test start def enbale(instance): return False def action(instance): pass
def enbale(instance): return False def action(instance): pass
TUNSETIFF = 0x400454ca IFF_TUN = 0x0001 IFACE_IP = "10.1.2.1/24" MTU = 65000 ServerIP = "199.230.109.242" debug = True updateSeqno = 105 Runloc = "/home/icmp/"
tunsetiff = 1074025674 iff_tun = 1 iface_ip = '10.1.2.1/24' mtu = 65000 server_ip = '199.230.109.242' debug = True update_seqno = 105 runloc = '/home/icmp/'
class Slides_Menu(): def Slides_Menu_Active(self,paths,subdir): cgipaths=self.Slides_CGI_Paths() rpaths=list(paths) rpaths.append(subdir) res=False if ( len(cgipaths)>len(paths) ): res=True for i in range( len(rpaths) ): if ( rpaths[i]!=cgipaths[i]): res=False return res def Slides_Menu_Path(self,paths): return "/".join([self.DocRoot]+paths) def Slides_Menu_Pre(self,paths): paths=self.Slides_CGI_Paths() paths.pop() html=[] rpaths=[] for path in paths: html=html+[ self.Slide_Menu_Entry_Title_A(rpaths), ] rpaths.append(path) return self.HTML_List(html)+[self.BR()] def Slides_Menu(self,paths): url="/".join(paths) cssclass="leftmenu" htmllist=[] path="/".join([self.DocRoot]+paths) subdirs=self.Path_Dirs( self.Slides_Menu_Path(paths), "Name.html" ) for subdir in subdirs: htmlitem=[] if (self.Slides_Menu_Active(paths,subdir)): rpaths=list(paths) rpaths.append(subdir) htmlitem=self.Slides_Menu(rpaths) else: htmlitem=self.Slide_SubMenu_Entry(subdir,paths,cssclass) htmllist.append(htmlitem) html=[] html=html+[ self.Slide_Menu_Entry(paths,cssclass) ] html=html+[ self.HTML_List( htmllist, "UL", { "style": 'list-style-type:square', } ) ] return html def Slide_Menu_Entry(self,paths,cssclass): cpath=self.CGI_POST("Path") path="/".join(paths) name=self.Slide_Name_Get(paths) if (path==cpath): return self.B( name+"*", { "title": self.Slide_Title_Get(paths), } ) return [ #Moved to Slide_Menu_Pre self.Slide_Menu_Entry_Title_A(paths,name,cssclass) ] def Slide_Menu_Entry_Title_A(self,paths,name=None,cssclass=None): if (name==None): name=self.Slide_Name_Get(paths) if (cssclass==None): cssclass="leftmenu" return self.A( "?Path="+"/".join(paths), name, { "class": cssclass, "title": self.Slide_Title_Get(paths), } )
class Slides_Menu: def slides__menu__active(self, paths, subdir): cgipaths = self.Slides_CGI_Paths() rpaths = list(paths) rpaths.append(subdir) res = False if len(cgipaths) > len(paths): res = True for i in range(len(rpaths)): if rpaths[i] != cgipaths[i]: res = False return res def slides__menu__path(self, paths): return '/'.join([self.DocRoot] + paths) def slides__menu__pre(self, paths): paths = self.Slides_CGI_Paths() paths.pop() html = [] rpaths = [] for path in paths: html = html + [self.Slide_Menu_Entry_Title_A(rpaths)] rpaths.append(path) return self.HTML_List(html) + [self.BR()] def slides__menu(self, paths): url = '/'.join(paths) cssclass = 'leftmenu' htmllist = [] path = '/'.join([self.DocRoot] + paths) subdirs = self.Path_Dirs(self.Slides_Menu_Path(paths), 'Name.html') for subdir in subdirs: htmlitem = [] if self.Slides_Menu_Active(paths, subdir): rpaths = list(paths) rpaths.append(subdir) htmlitem = self.Slides_Menu(rpaths) else: htmlitem = self.Slide_SubMenu_Entry(subdir, paths, cssclass) htmllist.append(htmlitem) html = [] html = html + [self.Slide_Menu_Entry(paths, cssclass)] html = html + [self.HTML_List(htmllist, 'UL', {'style': 'list-style-type:square'})] return html def slide__menu__entry(self, paths, cssclass): cpath = self.CGI_POST('Path') path = '/'.join(paths) name = self.Slide_Name_Get(paths) if path == cpath: return self.B(name + '*', {'title': self.Slide_Title_Get(paths)}) return [self.Slide_Menu_Entry_Title_A(paths, name, cssclass)] def slide__menu__entry__title_a(self, paths, name=None, cssclass=None): if name == None: name = self.Slide_Name_Get(paths) if cssclass == None: cssclass = 'leftmenu' return self.A('?Path=' + '/'.join(paths), name, {'class': cssclass, 'title': self.Slide_Title_Get(paths)})
class Solution: def reorderSpaces(self, text: str) -> str: spaces = text.count(" ") words = [w for w in text.split(" ") if w] l = len(words) if l == 1: return words[0] + " " * spaces each, remaining = divmod(spaces, l - 1) return (" " * each).join(words) + (" " * remaining)
class Solution: def reorder_spaces(self, text: str) -> str: spaces = text.count(' ') words = [w for w in text.split(' ') if w] l = len(words) if l == 1: return words[0] + ' ' * spaces (each, remaining) = divmod(spaces, l - 1) return (' ' * each).join(words) + ' ' * remaining
{ 'targets': [ { 'target_name': 'freetype2', 'dependencies': [ 'gyp/libfreetype.gyp:libfreetype' ], 'sources': [ 'src/freetype2.cc', 'src/fontface.cc' ], "include_dirs" : [ "<!(node -e \"require('nan')\")" ], } ] }
{'targets': [{'target_name': 'freetype2', 'dependencies': ['gyp/libfreetype.gyp:libfreetype'], 'sources': ['src/freetype2.cc', 'src/fontface.cc'], 'include_dirs': ['<!(node -e "require(\'nan\')")']}]}
class Solution: def findRestaurant(self, list1: List[str], list2: List[str]) -> List[str]: d = {} matches = {} for i, name in enumerate(list1): d[name] = i for i, name in enumerate(list2): if name in d: matches[name] = i + d[name] l = sorted(matches.items(), key = lambda x:x[1]) ans = [] for (res, sm) in l: if sm == l[0][1]: ans.append(res) return ans
class Solution: def find_restaurant(self, list1: List[str], list2: List[str]) -> List[str]: d = {} matches = {} for (i, name) in enumerate(list1): d[name] = i for (i, name) in enumerate(list2): if name in d: matches[name] = i + d[name] l = sorted(matches.items(), key=lambda x: x[1]) ans = [] for (res, sm) in l: if sm == l[0][1]: ans.append(res) return ans
bakeQty = int(input()) bakeCapacity = int(input()) CurniEatOnHour = int(input()) GanioEatOnHour = int(input()) hours = int(input()) productivityOnHour = bakeCapacity-CurniEatOnHour-GanioEatOnHour if productivityOnHour*hours>=bakeQty: print('YES') else: print('NO-',"{:.0f}".format(bakeQty-productivityOnHour*hours))
bake_qty = int(input()) bake_capacity = int(input()) curni_eat_on_hour = int(input()) ganio_eat_on_hour = int(input()) hours = int(input()) productivity_on_hour = bakeCapacity - CurniEatOnHour - GanioEatOnHour if productivityOnHour * hours >= bakeQty: print('YES') else: print('NO-', '{:.0f}'.format(bakeQty - productivityOnHour * hours))
weight_list=[] price_list=[] def knapsack(capacity,weight_list,price_list): x=list(range(len(price_list))) ratio=[v/w for v,w in zip(price_list,weight_list)] x.sort(key=lambda i:ratio[i],reverse=True) Maximum_profit=0 for i in x: if(weight_list[i]<=capacity): Maximum_profit+=price_list[i] capacity-=weight_list[i] else: Maximum_profit+=(price_list[i]*capacity)/weight_list[i] break return Maximum_profit n=int(input("Enter how many number of object available in market:")) print("Enter weight of object:") for i in range(0,n): item1=int(input()) weight_list.append(item1) print("Enter price:") for i in range(0,n): item2=int(input()) price_list.append(item2) print("Entered profit:",weight_list) print("Entered price list of objects:",price_list) capacity=int(input("Enter capacity of the bag:")) Maximum_profit=knapsack(capacity,weight_list,price_list) print("Maximum profit obtaind:",Maximum_profit)
weight_list = [] price_list = [] def knapsack(capacity, weight_list, price_list): x = list(range(len(price_list))) ratio = [v / w for (v, w) in zip(price_list, weight_list)] x.sort(key=lambda i: ratio[i], reverse=True) maximum_profit = 0 for i in x: if weight_list[i] <= capacity: maximum_profit += price_list[i] capacity -= weight_list[i] else: maximum_profit += price_list[i] * capacity / weight_list[i] break return Maximum_profit n = int(input('Enter how many number of object available in market:')) print('Enter weight of object:') for i in range(0, n): item1 = int(input()) weight_list.append(item1) print('Enter price:') for i in range(0, n): item2 = int(input()) price_list.append(item2) print('Entered profit:', weight_list) print('Entered price list of objects:', price_list) capacity = int(input('Enter capacity of the bag:')) maximum_profit = knapsack(capacity, weight_list, price_list) print('Maximum profit obtaind:', Maximum_profit)
############################################################################### # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. ############################################################################### def get_permutation_config(n_dims): input_perm_axes = [0, n_dims + 1] + list(range(1, n_dims + 1)) output_perm_axes = [0] + list(range(2, n_dims + 2)) + [1] return input_perm_axes, output_perm_axes
def get_permutation_config(n_dims): input_perm_axes = [0, n_dims + 1] + list(range(1, n_dims + 1)) output_perm_axes = [0] + list(range(2, n_dims + 2)) + [1] return (input_perm_axes, output_perm_axes)
testcases = int(input()) for t in range(testcases): rounds = int(input()) chef_points = 0 morty_points = 0 for round in range(rounds): chef, morty = list(map(int, input().split())) chef_sum = 0 morty_sum = 0 while(chef != 0): r = int(chef % 10) chef = int(chef / 10) chef_sum += r while(morty != 0): r = int(morty % 10) morty = int(morty / 10) morty_sum += r if(chef_sum > morty_sum): chef_points += 1 #print(str(0) + " " + str(chef_sum)) elif(chef_sum < morty_sum): morty_points += 1 #print(str(1) + " " + str(morty_sum)) else: chef_points += 1 morty_points += 1 #print(str(2) + " " + str(morty_sum)) print('0 ' + str(chef_points) if chef_points > morty_points else '1 ' + str(morty_points) if chef_points < morty_points else '2 ' + str(morty_points))
testcases = int(input()) for t in range(testcases): rounds = int(input()) chef_points = 0 morty_points = 0 for round in range(rounds): (chef, morty) = list(map(int, input().split())) chef_sum = 0 morty_sum = 0 while chef != 0: r = int(chef % 10) chef = int(chef / 10) chef_sum += r while morty != 0: r = int(morty % 10) morty = int(morty / 10) morty_sum += r if chef_sum > morty_sum: chef_points += 1 elif chef_sum < morty_sum: morty_points += 1 else: chef_points += 1 morty_points += 1 print('0 ' + str(chef_points) if chef_points > morty_points else '1 ' + str(morty_points) if chef_points < morty_points else '2 ' + str(morty_points))
class Solution: def fizzBuzz(self, n: int) -> List[str]: d = {3: 'Fizz', 5: 'Buzz'} return [''.join([d[k] for k in d if i % k == 0]) or str(i) for i in range(1, n + 1)]
class Solution: def fizz_buzz(self, n: int) -> List[str]: d = {3: 'Fizz', 5: 'Buzz'} return [''.join([d[k] for k in d if i % k == 0]) or str(i) for i in range(1, n + 1)]
print(0) # 0 print(-0) # 0 print(0 == -0) # True print(0 is -0) # True print(0.0) # 0.0 print(-0.0) # -0.0 print(0.0 == -0.0) # True print(0.0 is -0.0) # False
print(0) print(-0) print(0 == -0) print(0 is -0) print(0.0) print(-0.0) print(0.0 == -0.0) print(0.0 is -0.0)
#!/usr/bin/env python # encoding: utf-8 # @author: Zhipeng Ye # @contact: Zhipeng.ye19@xjtlu.edu.cn # @file: permutation.py # @time: 2020-03-18 22:46 # @desc: def permute(nums): paths = [] def record_path(path,nums_copy): if len(nums_copy) ==1: path.append(nums_copy[0]) paths.append(path) return for i in range(len(nums_copy)): path = path[:] path.append(nums_copy[i]) nums_copy_copy = nums_copy[:] del(nums_copy_copy[i]) record_path(path,nums_copy_copy) record_path([],nums) print(paths) permute([1,2,3])
def permute(nums): paths = [] def record_path(path, nums_copy): if len(nums_copy) == 1: path.append(nums_copy[0]) paths.append(path) return for i in range(len(nums_copy)): path = path[:] path.append(nums_copy[i]) nums_copy_copy = nums_copy[:] del nums_copy_copy[i] record_path(path, nums_copy_copy) record_path([], nums) print(paths) permute([1, 2, 3])
def spread_bunnies(lair, rows, columns): b_ees = [] for i in range(rows): for j in range(columns): if lair[i][j] == 'B': b_ees.append([i, j]) for b in b_ees: i = b[0] j = b[1] if i - 1 >= 0: lair[i - 1][j] = 'B' if i + 1 < rows: lair[i + 1][j] = 'B' if j - 1 >= 0: lair[i][j - 1] = 'B' if j + 1 < columns: lair[i][j + 1] = 'B' return lair rows, columns = map(int, input().split(' ')) lair = [] for _ in range(rows): lair.append([]) [lair[-1].append(x) for x in input()] directions = [x for x in input()] position = [] for i in range(rows): for j in range(columns): if lair[i][j] == 'P': position.append(i) position.append(j) break initial_row = position[0] initial_column = position[1] row = initial_row column = initial_column for move in directions: spread_bunnies(lair, rows, columns) if move == 'L': if column - 1 >= 0: if lair[row][column] != 'B': lair[row][column] = '.' row = row column = column - 1 if lair[row][column] == 'B': [print(''.join(row)) for row in lair] print(f"dead: {row} {column}") break else: lair[row][column] = 'P' else: if lair[row][column] != 'B': lair[row][column] = '.' [print(''.join(row)) for row in lair] print(f'won: {row} {column}') break if move == 'R': if column + 1 < columns: if lair[row][column] != 'B': lair[row][column] = '.' row = row column = column + 1 if lair[row][column] == 'B': [print(''.join(row)) for row in lair] print(f"dead: {row} {column}") break else: lair[row][column] = 'P' else: if lair[row][column] != 'B': lair[row][column] = '.' [print(''.join(row)) for row in lair] print(f'won: {row} {column}') break if move == 'U': if row - 1 >= 0: if lair[row][column] != 'B': lair[row][column] = '.' row = row - 1 column = column if lair[row][column] == 'B': [print(''.join(row)) for row in lair] print(f"dead: {row} {column}") break else: lair[row][column] = 'P' else: if lair[row][column] != 'B': lair[row][column] = '.' [print(''.join(row)) for row in lair] print(f'won: {row} {column}') break if move == 'D': if row + 1 < rows: if lair[row][column] != 'B': lair[row][column] = '.' row = row + 1 column = column if lair[row][column] == 'B': [print(''.join(row)) for row in lair] print(f"dead: {row} {column}") break else: lair[row][column] = 'P' else: if lair[row][column] != 'B': lair[row][column] = '.' [print(''.join(row)) for row in lair] print(f'won: {row} {column}') break
def spread_bunnies(lair, rows, columns): b_ees = [] for i in range(rows): for j in range(columns): if lair[i][j] == 'B': b_ees.append([i, j]) for b in b_ees: i = b[0] j = b[1] if i - 1 >= 0: lair[i - 1][j] = 'B' if i + 1 < rows: lair[i + 1][j] = 'B' if j - 1 >= 0: lair[i][j - 1] = 'B' if j + 1 < columns: lair[i][j + 1] = 'B' return lair (rows, columns) = map(int, input().split(' ')) lair = [] for _ in range(rows): lair.append([]) [lair[-1].append(x) for x in input()] directions = [x for x in input()] position = [] for i in range(rows): for j in range(columns): if lair[i][j] == 'P': position.append(i) position.append(j) break initial_row = position[0] initial_column = position[1] row = initial_row column = initial_column for move in directions: spread_bunnies(lair, rows, columns) if move == 'L': if column - 1 >= 0: if lair[row][column] != 'B': lair[row][column] = '.' row = row column = column - 1 if lair[row][column] == 'B': [print(''.join(row)) for row in lair] print(f'dead: {row} {column}') break else: lair[row][column] = 'P' else: if lair[row][column] != 'B': lair[row][column] = '.' [print(''.join(row)) for row in lair] print(f'won: {row} {column}') break if move == 'R': if column + 1 < columns: if lair[row][column] != 'B': lair[row][column] = '.' row = row column = column + 1 if lair[row][column] == 'B': [print(''.join(row)) for row in lair] print(f'dead: {row} {column}') break else: lair[row][column] = 'P' else: if lair[row][column] != 'B': lair[row][column] = '.' [print(''.join(row)) for row in lair] print(f'won: {row} {column}') break if move == 'U': if row - 1 >= 0: if lair[row][column] != 'B': lair[row][column] = '.' row = row - 1 column = column if lair[row][column] == 'B': [print(''.join(row)) for row in lair] print(f'dead: {row} {column}') break else: lair[row][column] = 'P' else: if lair[row][column] != 'B': lair[row][column] = '.' [print(''.join(row)) for row in lair] print(f'won: {row} {column}') break if move == 'D': if row + 1 < rows: if lair[row][column] != 'B': lair[row][column] = '.' row = row + 1 column = column if lair[row][column] == 'B': [print(''.join(row)) for row in lair] print(f'dead: {row} {column}') break else: lair[row][column] = 'P' else: if lair[row][column] != 'B': lair[row][column] = '.' [print(''.join(row)) for row in lair] print(f'won: {row} {column}') break
# ... client initialization left out data_client = client.data file_path = "experiments/data.xrdml" dataset_id = 1 ingester_list = data_client.list_ingesters() xrdml_ingester = ingester_list.find_by_id("citrine/ingest xrdml_xrd_converter") # Printing the ingester's arguments, we can see it requires an argument with the # name `sample_id`, and another with the name `chemical_formula`, both of which # should be strings. print(ingester.arguments) # [{ 'name': 'sample_id', # 'desc': 'An ID to uniquely identify the material referenced in the file.', # 'type': 'String', # 'required': True }, # { 'name': 'chemical_formula', # 'desc': 'The chemical formula of the material referenced in the file.', # 'type': 'String', # 'required': True }] ingester_arguments = [ { "name": "sample_id", "value": "1212" }, { "name": "chemical_formula", "value": "NaCl" }, ] # To ingest the file using the file_path as the destination path data_client.upload_with_ingester( dataset_id, file_path, xrdml_ingester, ingester_arguments ) # To ingest the file using a different destination path data_client.upload_with_ingester( dataset_id, file_path, xrdml_ingester, ingester_arguments, 'data.xrdml' )
data_client = client.data file_path = 'experiments/data.xrdml' dataset_id = 1 ingester_list = data_client.list_ingesters() xrdml_ingester = ingester_list.find_by_id('citrine/ingest xrdml_xrd_converter') print(ingester.arguments) ingester_arguments = [{'name': 'sample_id', 'value': '1212'}, {'name': 'chemical_formula', 'value': 'NaCl'}] data_client.upload_with_ingester(dataset_id, file_path, xrdml_ingester, ingester_arguments) data_client.upload_with_ingester(dataset_id, file_path, xrdml_ingester, ingester_arguments, 'data.xrdml')
class Action: def __init__(self, target, full, title, short): self.target = target self.full = full self.title = title self.short = short def __repr__(self): return '{"destructive":0, "full":"%s", "title":"%s", "short":"%s","identifier":"%s"}'%(self.title, self.full, self.short, self.target)
class Action: def __init__(self, target, full, title, short): self.target = target self.full = full self.title = title self.short = short def __repr__(self): return '{"destructive":0, "full":"%s", "title":"%s", "short":"%s","identifier":"%s"}' % (self.title, self.full, self.short, self.target)
### SELF-ORGANIZING MAPS (SOM) CLUSTERING ON TIME-HORIZON ### # INITIALIZE TRANSFORMED DATA & SELECTED SERIES/CHANNELS df = data.copy() list_channel = ['CBS', 'NBC', 'ABC', 'FOX', 'MSNBC', 'ESPN' ,'CNN', 'UNI', 'DISNEY CHANNEL', 'MTV'] list_target = ['18+', 'F18-34'] list_day_part = ['Morning', 'Daytime', 'Early Fringe', 'Prime Time', 'Late Fringe'] end_date = '2019-09-28' def split_dataframe(df, chunk_size=7): chunks = list() num_chunks = len(df) // chunk_size + 1 for i in range(num_chunks): chunks.append(df[i*chunk_size:(i+1)*chunk_size]) return chunks df_output_final = pd.DataFrame() for channel in tqdm(list_channel): for target in list_target: for day_part in list_day_part: random_seed = 1234 df_all = data.copy() df_all = df_all[(df_all['daypart'] == day_part) & (df_all['target'] == target)] df_all['Week'] = df_all['date'].apply(lambda x: x.strftime('%V')) df = data[(data['date'] < end_date) & (data['daypart'] == day_part) & (data['target'] == target)][['date', 'target', 'daypart', channel]].reset_index(drop=True) if channel == 'MTV': impute = df[df['MTV'] == 0] impute = df.loc[df['date'].isin(impute['date'] - dt.timedelta(days=364*2)), 'MTV'] df.loc[df['MTV'] == 0, 'MTV'] = impute.values df['Week'] = df['date'].apply(lambda x: x.strftime('%V')) df['Trend'] = sm.tsa.seasonal_decompose(df[channel], model='additive', freq=7, extrapolate_trend='freq').trend df['Seasonal_weekly'] = sm.tsa.seasonal_decompose(df[channel], model='additive', freq=7, extrapolate_trend='freq').seasonal df['Fourier'] = data[(data['date'] < end_date) & (data['daypart'] == day_part) & (data['target'] == target)]['fourier_' + channel].reset_index(drop=True) df = df[df['date'] != '2016-02-29'].reset_index(drop=True) for week in df['Week'].unique(): for df_split in split_dataframe(df.loc[df['Week'] == week, :], 7): if df_split.empty: continue # TREND & SEASONALITY Yt = df.loc[df_split.index, channel] - df.loc[df_split.index, 'Trend'] - df.loc[df_split.index, 'Seasonal_weekly'] Zt = df.loc[df_split.index, channel] - df.loc[df_split.index, 'Seasonal_weekly'] Xt = df.loc[df_split.index, channel] - df.loc[df_split.index, 'Trend'] df.loc[df_split.index, 'Trend_aggr'] = 1 - np.var(Yt) / np.var(Zt) df.loc[df_split.index, 'Seasonal_aggr'] = 1 - np.var(Yt) / np.var(Xt) # FOURIER TERMS AS PERIODICITY df.loc[df_split.index, 'Fourier_aggr'] = df.loc[df_split.index, 'Fourier'].mean() # KURTOSIS & SKEWNESS df.loc[df_split.index, 'Kurtosis'] = kurtosis(df_split[channel]) df.loc[df_split.index, 'Skewness'] = skew(df_split[channel]) # SERIAL CORRELATION --- USING LJONBOX TEST res = sm.tsa.SARIMAX(df.loc[df_split.index, channel], order=(1,0,1), random_seed=random_seed).fit(disp=-1) df.loc[df_split.index, 'Serial_correlation'] = sm.stats.acorr_ljungbox(res.resid, boxpierce=True, lags=1)[3][0] # NON-LINEARITY --- USING BDS TEST df.loc[df_split.index, 'NON_LINEARITY'] = sm.tsa.stattools.bds(df.loc[df_split.index, channel])[0] # SELF-SIMILARITY --- USING HURST EXPONENT df.loc[df_split.index, 'Self_similarity'] = nolds.hurst_rs(df.loc[df_split.index, channel]) # CHAOS --- USING LYAPUNOV EXPONENT df.loc[df_split.index, 'Chaos'] = nolds.lyap_r(df.loc[df_split.index, channel], emb_dim=1, min_neighbors=1, trajectory_len=2) df_cluster = df[-365:].reset_index(drop=True).merge(df.iloc[-365*2:-365, 8:].reset_index(drop=True), left_index=True, right_index=True, how='left', suffixes=('', '_YEAR2')) df_cluster = df_cluster.merge(df.iloc[-365*3:-365*2, 8:].reset_index(drop=True), left_index=True, right_index=True, how='left', suffixes=('', '_YEAR3')) df_cluster = df_cluster.drop(columns=['date', channel, 'Trend', 'Seasonal_weekly', 'Fourier']).groupby('Week').mean().reset_index() df_cluster.iloc[:, 1:] = MinMaxScaler().fit_transform(df_cluster.iloc[:, 1:]) def SOM_evaluate(som1, som2, sigma, learning_rate): som_shape = (int(som1), int(som2)) som = MiniSom(som_shape[0], som_shape[1], df_cluster.iloc[:, 1:].values.shape[1], sigma=sigma, learning_rate=learning_rate, neighborhood_function='gaussian', random_seed=random_seed) som.train_batch(df_cluster.iloc[:, 1:].values, 10000, verbose=False) return -som.quantization_error(df_cluster.iloc[:, 1:].values) SOM_BO = BayesianOptimization(SOM_evaluate, {'sigma': (1, 0.01), 'som1': (1, 10), 'som2': (5, 15), 'learning_rate': (0.1, 0.001)}, random_state=random_seed, verbose=0) SOM_BO.maximize(init_points=20, n_iter=20) som_shape = (int(SOM_BO.max['params']['som1']), int(SOM_BO.max['params']['som2'])) som = MiniSom(som_shape[0], som_shape[1], df_cluster.iloc[:, 1:].values.shape[1], sigma=SOM_BO.max['params']['sigma'], learning_rate=SOM_BO.max['params']['learning_rate'], neighborhood_function='gaussian', random_seed=random_seed) winner_coordinates = np.array([som.winner(x) for x in df_cluster.iloc[:, 1:].values]).T cluster_index = np.ravel_multi_index(winner_coordinates, som_shape) df_cluster['cluster'] = cluster_index df = df_all.merge(df_cluster[['Week', 'cluster']], on='Week', how='left') df_final = pd.concat([df[['date', 'daypart', 'target', channel]], pd.get_dummies(df['cluster'], prefix='Cluster', drop_first=True)], axis=1) df_final = df_final.rename(columns={channel: 'value'}) df_final.insert(0, column='channel', value=[channel]*len(df_final)) df_output_final = df_output_final.append(df_final, ignore_index=True) df_output_final
df = data.copy() list_channel = ['CBS', 'NBC', 'ABC', 'FOX', 'MSNBC', 'ESPN', 'CNN', 'UNI', 'DISNEY CHANNEL', 'MTV'] list_target = ['18+', 'F18-34'] list_day_part = ['Morning', 'Daytime', 'Early Fringe', 'Prime Time', 'Late Fringe'] end_date = '2019-09-28' def split_dataframe(df, chunk_size=7): chunks = list() num_chunks = len(df) // chunk_size + 1 for i in range(num_chunks): chunks.append(df[i * chunk_size:(i + 1) * chunk_size]) return chunks df_output_final = pd.DataFrame() for channel in tqdm(list_channel): for target in list_target: for day_part in list_day_part: random_seed = 1234 df_all = data.copy() df_all = df_all[(df_all['daypart'] == day_part) & (df_all['target'] == target)] df_all['Week'] = df_all['date'].apply(lambda x: x.strftime('%V')) df = data[(data['date'] < end_date) & (data['daypart'] == day_part) & (data['target'] == target)][['date', 'target', 'daypart', channel]].reset_index(drop=True) if channel == 'MTV': impute = df[df['MTV'] == 0] impute = df.loc[df['date'].isin(impute['date'] - dt.timedelta(days=364 * 2)), 'MTV'] df.loc[df['MTV'] == 0, 'MTV'] = impute.values df['Week'] = df['date'].apply(lambda x: x.strftime('%V')) df['Trend'] = sm.tsa.seasonal_decompose(df[channel], model='additive', freq=7, extrapolate_trend='freq').trend df['Seasonal_weekly'] = sm.tsa.seasonal_decompose(df[channel], model='additive', freq=7, extrapolate_trend='freq').seasonal df['Fourier'] = data[(data['date'] < end_date) & (data['daypart'] == day_part) & (data['target'] == target)]['fourier_' + channel].reset_index(drop=True) df = df[df['date'] != '2016-02-29'].reset_index(drop=True) for week in df['Week'].unique(): for df_split in split_dataframe(df.loc[df['Week'] == week, :], 7): if df_split.empty: continue yt = df.loc[df_split.index, channel] - df.loc[df_split.index, 'Trend'] - df.loc[df_split.index, 'Seasonal_weekly'] zt = df.loc[df_split.index, channel] - df.loc[df_split.index, 'Seasonal_weekly'] xt = df.loc[df_split.index, channel] - df.loc[df_split.index, 'Trend'] df.loc[df_split.index, 'Trend_aggr'] = 1 - np.var(Yt) / np.var(Zt) df.loc[df_split.index, 'Seasonal_aggr'] = 1 - np.var(Yt) / np.var(Xt) df.loc[df_split.index, 'Fourier_aggr'] = df.loc[df_split.index, 'Fourier'].mean() df.loc[df_split.index, 'Kurtosis'] = kurtosis(df_split[channel]) df.loc[df_split.index, 'Skewness'] = skew(df_split[channel]) res = sm.tsa.SARIMAX(df.loc[df_split.index, channel], order=(1, 0, 1), random_seed=random_seed).fit(disp=-1) df.loc[df_split.index, 'Serial_correlation'] = sm.stats.acorr_ljungbox(res.resid, boxpierce=True, lags=1)[3][0] df.loc[df_split.index, 'NON_LINEARITY'] = sm.tsa.stattools.bds(df.loc[df_split.index, channel])[0] df.loc[df_split.index, 'Self_similarity'] = nolds.hurst_rs(df.loc[df_split.index, channel]) df.loc[df_split.index, 'Chaos'] = nolds.lyap_r(df.loc[df_split.index, channel], emb_dim=1, min_neighbors=1, trajectory_len=2) df_cluster = df[-365:].reset_index(drop=True).merge(df.iloc[-365 * 2:-365, 8:].reset_index(drop=True), left_index=True, right_index=True, how='left', suffixes=('', '_YEAR2')) df_cluster = df_cluster.merge(df.iloc[-365 * 3:-365 * 2, 8:].reset_index(drop=True), left_index=True, right_index=True, how='left', suffixes=('', '_YEAR3')) df_cluster = df_cluster.drop(columns=['date', channel, 'Trend', 'Seasonal_weekly', 'Fourier']).groupby('Week').mean().reset_index() df_cluster.iloc[:, 1:] = min_max_scaler().fit_transform(df_cluster.iloc[:, 1:]) def som_evaluate(som1, som2, sigma, learning_rate): som_shape = (int(som1), int(som2)) som = mini_som(som_shape[0], som_shape[1], df_cluster.iloc[:, 1:].values.shape[1], sigma=sigma, learning_rate=learning_rate, neighborhood_function='gaussian', random_seed=random_seed) som.train_batch(df_cluster.iloc[:, 1:].values, 10000, verbose=False) return -som.quantization_error(df_cluster.iloc[:, 1:].values) som_bo = bayesian_optimization(SOM_evaluate, {'sigma': (1, 0.01), 'som1': (1, 10), 'som2': (5, 15), 'learning_rate': (0.1, 0.001)}, random_state=random_seed, verbose=0) SOM_BO.maximize(init_points=20, n_iter=20) som_shape = (int(SOM_BO.max['params']['som1']), int(SOM_BO.max['params']['som2'])) som = mini_som(som_shape[0], som_shape[1], df_cluster.iloc[:, 1:].values.shape[1], sigma=SOM_BO.max['params']['sigma'], learning_rate=SOM_BO.max['params']['learning_rate'], neighborhood_function='gaussian', random_seed=random_seed) winner_coordinates = np.array([som.winner(x) for x in df_cluster.iloc[:, 1:].values]).T cluster_index = np.ravel_multi_index(winner_coordinates, som_shape) df_cluster['cluster'] = cluster_index df = df_all.merge(df_cluster[['Week', 'cluster']], on='Week', how='left') df_final = pd.concat([df[['date', 'daypart', 'target', channel]], pd.get_dummies(df['cluster'], prefix='Cluster', drop_first=True)], axis=1) df_final = df_final.rename(columns={channel: 'value'}) df_final.insert(0, column='channel', value=[channel] * len(df_final)) df_output_final = df_output_final.append(df_final, ignore_index=True) df_output_final
# FUNCTION decimal range step value def drange(start, stop, step): r = start while r < stop: yield r r += step
def drange(start, stop, step): r = start while r < stop: yield r r += step
del_items(0x8012EA14) SetType(0x8012EA14, "void PreGameOnlyTestRoutine__Fv()") del_items(0x80130AEC) SetType(0x80130AEC, "void DRLG_PlaceDoor__Fii(int x, int y)") del_items(0x80130FC0) SetType(0x80130FC0, "void DRLG_L1Shadows__Fv()") del_items(0x801313D8) SetType(0x801313D8, "int DRLG_PlaceMiniSet__FPCUciiiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int noquad, int ldir)") del_items(0x80131844) SetType(0x80131844, "void DRLG_L1Floor__Fv()") del_items(0x80131930) SetType(0x80131930, "void StoreBlock__FPiii(int *Bl, int xx, int yy)") del_items(0x801319DC) SetType(0x801319DC, "void DRLG_L1Pass3__Fv()") del_items(0x80131C08) SetType(0x80131C08, "void DRLG_LoadL1SP__Fv()") del_items(0x80131CE4) SetType(0x80131CE4, "void DRLG_FreeL1SP__Fv()") del_items(0x80131D14) SetType(0x80131D14, "void DRLG_Init_Globals__Fv()") del_items(0x80131DB8) SetType(0x80131DB8, "void set_restore_lighting__Fv()") del_items(0x80131E48) SetType(0x80131E48, "void DRLG_InitL1Vals__Fv()") del_items(0x80131E50) SetType(0x80131E50, "void LoadL1Dungeon__FPcii(char *sFileName, int vx, int vy)") del_items(0x8013201C) SetType(0x8013201C, "void LoadPreL1Dungeon__FPcii(char *sFileName, int vx, int vy)") del_items(0x801321D4) SetType(0x801321D4, "void InitL5Dungeon__Fv()") del_items(0x80132234) SetType(0x80132234, "void L5ClearFlags__Fv()") del_items(0x80132280) SetType(0x80132280, "void L5drawRoom__Fiiii(int x, int y, int w, int h)") del_items(0x801322EC) SetType(0x801322EC, "unsigned char L5checkRoom__Fiiii(int x, int y, int width, int height)") del_items(0x80132380) SetType(0x80132380, "void L5roomGen__Fiiiii(int x, int y, int w, int h, int dir)") del_items(0x8013267C) SetType(0x8013267C, "void L5firstRoom__Fv()") del_items(0x80132A38) SetType(0x80132A38, "long L5GetArea__Fv()") del_items(0x80132A98) SetType(0x80132A98, "void L5makeDungeon__Fv()") del_items(0x80132B24) SetType(0x80132B24, "void L5makeDmt__Fv()") del_items(0x80132C0C) SetType(0x80132C0C, "int L5HWallOk__Fii(int i, int j)") del_items(0x80132D48) SetType(0x80132D48, "int L5VWallOk__Fii(int i, int j)") del_items(0x80132E94) SetType(0x80132E94, "void L5HorizWall__Fiici(int i, int j, char p, int dx)") del_items(0x801330D4) SetType(0x801330D4, "void L5VertWall__Fiici(int i, int j, char p, int dy)") del_items(0x80133308) SetType(0x80133308, "void L5AddWall__Fv()") del_items(0x80133578) SetType(0x80133578, "void DRLG_L5GChamber__Fiiiiii(int sx, int sy, int topflag, int bottomflag, int leftflag, int rightflag)") del_items(0x80133838) SetType(0x80133838, "void DRLG_L5GHall__Fiiii(int x1, int y1, int x2, int y2)") del_items(0x801338EC) SetType(0x801338EC, "void L5tileFix__Fv()") del_items(0x801341B0) SetType(0x801341B0, "void DRLG_L5Subs__Fv()") del_items(0x801343A8) SetType(0x801343A8, "void DRLG_L5SetRoom__Fii(int rx1, int ry1)") del_items(0x801344A8) SetType(0x801344A8, "void L5FillChambers__Fv()") del_items(0x80134B94) SetType(0x80134B94, "void DRLG_L5FTVR__Fiiiii(int i, int j, int x, int y, int d)") del_items(0x801350E4) SetType(0x801350E4, "void DRLG_L5FloodTVal__Fv()") del_items(0x801351E8) SetType(0x801351E8, "void DRLG_L5TransFix__Fv()") del_items(0x801353F8) SetType(0x801353F8, "void DRLG_L5DirtFix__Fv()") del_items(0x80135554) SetType(0x80135554, "void DRLG_L5CornerFix__Fv()") del_items(0x80135664) SetType(0x80135664, "void DRLG_L5__Fi(int entry)") del_items(0x80135B84) SetType(0x80135B84, "void CreateL5Dungeon__FUii(unsigned int rseed, int entry)") del_items(0x80138128) SetType(0x80138128, "unsigned char DRLG_L2PlaceMiniSet__FPUciiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir)") del_items(0x8013851C) SetType(0x8013851C, "void DRLG_L2PlaceRndSet__FPUci(unsigned char *miniset, int rndper)") del_items(0x8013881C) SetType(0x8013881C, "void DRLG_L2Subs__Fv()") del_items(0x80138A10) SetType(0x80138A10, "void DRLG_L2Shadows__Fv()") del_items(0x80138BD4) SetType(0x80138BD4, "void InitDungeon__Fv()") del_items(0x80138C34) SetType(0x80138C34, "void DRLG_LoadL2SP__Fv()") del_items(0x80138CD4) SetType(0x80138CD4, "void DRLG_FreeL2SP__Fv()") del_items(0x80138D04) SetType(0x80138D04, "void DRLG_L2SetRoom__Fii(int rx1, int ry1)") del_items(0x80138E04) SetType(0x80138E04, "void DefineRoom__Fiiiii(int nX1, int nY1, int nX2, int nY2, int ForceHW)") del_items(0x80139010) SetType(0x80139010, "void CreateDoorType__Fii(int nX, int nY)") del_items(0x801390F4) SetType(0x801390F4, "void PlaceHallExt__Fii(int nX, int nY)") del_items(0x8013912C) SetType(0x8013912C, "void AddHall__Fiiiii(int nX1, int nY1, int nX2, int nY2, int nHd)") del_items(0x80139204) SetType(0x80139204, "void CreateRoom__Fiiiiiiiii(int nX1, int nY1, int nX2, int nY2, int nRDest, int nHDir, int ForceHW, int nH, int nW)") del_items(0x8013988C) SetType(0x8013988C, "void GetHall__FPiN40(int *nX1, int *nY1, int *nX2, int *nY2, int *nHd)") del_items(0x80139924) SetType(0x80139924, "void ConnectHall__Fiiiii(int nX1, int nY1, int nX2, int nY2, int nHd)") del_items(0x80139F8C) SetType(0x80139F8C, "void DoPatternCheck__Fii(int i, int j)") del_items(0x8013A240) SetType(0x8013A240, "void L2TileFix__Fv()") del_items(0x8013A364) SetType(0x8013A364, "unsigned char DL2_Cont__FUcUcUcUc(unsigned char x1f, unsigned char y1f, unsigned char x2f, unsigned char y2f)") del_items(0x8013A3E4) SetType(0x8013A3E4, "int DL2_NumNoChar__Fv()") del_items(0x8013A440) SetType(0x8013A440, "void DL2_DrawRoom__Fiiii(int x1, int y1, int x2, int y2)") del_items(0x8013A544) SetType(0x8013A544, "void DL2_KnockWalls__Fiiii(int x1, int y1, int x2, int y2)") del_items(0x8013A714) SetType(0x8013A714, "unsigned char DL2_FillVoids__Fv()") del_items(0x8013B098) SetType(0x8013B098, "unsigned char CreateDungeon__Fv()") del_items(0x8013B3A4) SetType(0x8013B3A4, "void DRLG_L2Pass3__Fv()") del_items(0x8013B53C) SetType(0x8013B53C, "void DRLG_L2FTVR__Fiiiii(int i, int j, int x, int y, int d)") del_items(0x8013BA84) SetType(0x8013BA84, "void DRLG_L2FloodTVal__Fv()") del_items(0x8013BB88) SetType(0x8013BB88, "void DRLG_L2TransFix__Fv()") del_items(0x8013BD98) SetType(0x8013BD98, "void L2DirtFix__Fv()") del_items(0x8013BEF8) SetType(0x8013BEF8, "void L2LockoutFix__Fv()") del_items(0x8013C284) SetType(0x8013C284, "void L2DoorFix__Fv()") del_items(0x8013C334) SetType(0x8013C334, "void DRLG_L2__Fi(int entry)") del_items(0x8013CD80) SetType(0x8013CD80, "void DRLG_InitL2Vals__Fv()") del_items(0x8013CD88) SetType(0x8013CD88, "void LoadL2Dungeon__FPcii(char *sFileName, int vx, int vy)") del_items(0x8013CF78) SetType(0x8013CF78, "void LoadPreL2Dungeon__FPcii(char *sFileName, int vx, int vy)") del_items(0x8013D164) SetType(0x8013D164, "void CreateL2Dungeon__FUii(unsigned int rseed, int entry)") del_items(0x8013DB1C) SetType(0x8013DB1C, "void InitL3Dungeon__Fv()") del_items(0x8013DBA4) SetType(0x8013DBA4, "int DRLG_L3FillRoom__Fiiii(int x1, int y1, int x2, int y2)") del_items(0x8013DE00) SetType(0x8013DE00, "void DRLG_L3CreateBlock__Fiiii(int x, int y, int obs, int dir)") del_items(0x8013E09C) SetType(0x8013E09C, "void DRLG_L3FloorArea__Fiiii(int x1, int y1, int x2, int y2)") del_items(0x8013E104) SetType(0x8013E104, "void DRLG_L3FillDiags__Fv()") del_items(0x8013E234) SetType(0x8013E234, "void DRLG_L3FillSingles__Fv()") del_items(0x8013E300) SetType(0x8013E300, "void DRLG_L3FillStraights__Fv()") del_items(0x8013E6C4) SetType(0x8013E6C4, "void DRLG_L3Edges__Fv()") del_items(0x8013E704) SetType(0x8013E704, "int DRLG_L3GetFloorArea__Fv()") del_items(0x8013E754) SetType(0x8013E754, "void DRLG_L3MakeMegas__Fv()") del_items(0x8013E898) SetType(0x8013E898, "void DRLG_L3River__Fv()") del_items(0x8013F2D8) SetType(0x8013F2D8, "int DRLG_L3SpawnEdge__FiiPi(int x, int y, int *totarea)") del_items(0x8013F564) SetType(0x8013F564, "int DRLG_L3Spawn__FiiPi(int x, int y, int *totarea)") del_items(0x8013F778) SetType(0x8013F778, "void DRLG_L3Pool__Fv()") del_items(0x8013F9CC) SetType(0x8013F9CC, "void DRLG_L3PoolFix__Fv()") del_items(0x8013FB00) SetType(0x8013FB00, "int DRLG_L3PlaceMiniSet__FPCUciiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir)") del_items(0x8013FE80) SetType(0x8013FE80, "void DRLG_L3PlaceRndSet__FPCUci(unsigned char *miniset, int rndper)") del_items(0x801401C8) SetType(0x801401C8, "unsigned char WoodVertU__Fii(int i, int y)") del_items(0x80140274) SetType(0x80140274, "unsigned char WoodVertD__Fii(int i, int y)") del_items(0x80140310) SetType(0x80140310, "unsigned char WoodHorizL__Fii(int x, int j)") del_items(0x801403A4) SetType(0x801403A4, "unsigned char WoodHorizR__Fii(int x, int j)") del_items(0x80140428) SetType(0x80140428, "void AddFenceDoors__Fv()") del_items(0x8014050C) SetType(0x8014050C, "void FenceDoorFix__Fv()") del_items(0x80140700) SetType(0x80140700, "void DRLG_L3Wood__Fv()") del_items(0x80140EF0) SetType(0x80140EF0, "int DRLG_L3Anvil__Fv()") del_items(0x8014114C) SetType(0x8014114C, "void FixL3Warp__Fv()") del_items(0x80141234) SetType(0x80141234, "void FixL3HallofHeroes__Fv()") del_items(0x80141388) SetType(0x80141388, "void DRLG_L3LockRec__Fii(int x, int y)") del_items(0x80141424) SetType(0x80141424, "unsigned char DRLG_L3Lockout__Fv()") del_items(0x801414E4) SetType(0x801414E4, "void DRLG_L3__Fi(int entry)") del_items(0x80141C04) SetType(0x80141C04, "void DRLG_L3Pass3__Fv()") del_items(0x80141DA8) SetType(0x80141DA8, "void CreateL3Dungeon__FUii(unsigned int rseed, int entry)") del_items(0x80141EBC) SetType(0x80141EBC, "void LoadL3Dungeon__FPcii(char *sFileName, int vx, int vy)") del_items(0x801420E0) SetType(0x801420E0, "void LoadPreL3Dungeon__FPcii(char *sFileName, int vx, int vy)") del_items(0x80143F40) SetType(0x80143F40, "void DRLG_L4Shadows__Fv()") del_items(0x80144004) SetType(0x80144004, "void InitL4Dungeon__Fv()") del_items(0x801440A0) SetType(0x801440A0, "void DRLG_LoadL4SP__Fv()") del_items(0x80144168) SetType(0x80144168, "void DRLG_FreeL4SP__Fv()") del_items(0x80144190) SetType(0x80144190, "void DRLG_L4SetSPRoom__Fii(int rx1, int ry1)") del_items(0x80144290) SetType(0x80144290, "void L4makeDmt__Fv()") del_items(0x80144334) SetType(0x80144334, "int L4HWallOk__Fii(int i, int j)") del_items(0x80144484) SetType(0x80144484, "int L4VWallOk__Fii(int i, int j)") del_items(0x80144600) SetType(0x80144600, "void L4HorizWall__Fiii(int i, int j, int dx)") del_items(0x801447D0) SetType(0x801447D0, "void L4VertWall__Fiii(int i, int j, int dy)") del_items(0x80144998) SetType(0x80144998, "void L4AddWall__Fv()") del_items(0x80144E78) SetType(0x80144E78, "void L4tileFix__Fv()") del_items(0x80147060) SetType(0x80147060, "void DRLG_L4Subs__Fv()") del_items(0x80147238) SetType(0x80147238, "void L4makeDungeon__Fv()") del_items(0x80147470) SetType(0x80147470, "void uShape__Fv()") del_items(0x80147714) SetType(0x80147714, "long GetArea__Fv()") del_items(0x80147770) SetType(0x80147770, "void L4drawRoom__Fiiii(int x, int y, int width, int height)") del_items(0x801477D8) SetType(0x801477D8, "unsigned char L4checkRoom__Fiiii(int x, int y, int width, int height)") del_items(0x80147874) SetType(0x80147874, "void L4roomGen__Fiiiii(int x, int y, int w, int h, int dir)") del_items(0x80147B70) SetType(0x80147B70, "void L4firstRoom__Fv()") del_items(0x80147DBC) SetType(0x80147DBC, "void L4SaveQuads__Fv()") del_items(0x80147E5C) SetType(0x80147E5C, "void DRLG_L4SetRoom__FPUcii(unsigned char *pSetPiece, int rx1, int ry1)") del_items(0x80147F30) SetType(0x80147F30, "void DRLG_LoadDiabQuads__FUc(unsigned char preflag)") del_items(0x80148094) SetType(0x80148094, "unsigned char DRLG_L4PlaceMiniSet__FPCUciiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir)") del_items(0x801484AC) SetType(0x801484AC, "void DRLG_L4FTVR__Fiiiii(int i, int j, int x, int y, int d)") del_items(0x801489F4) SetType(0x801489F4, "void DRLG_L4FloodTVal__Fv()") del_items(0x80148AF8) SetType(0x80148AF8, "unsigned char IsDURWall__Fc(char d)") del_items(0x80148B28) SetType(0x80148B28, "unsigned char IsDLLWall__Fc(char dd)") del_items(0x80148B58) SetType(0x80148B58, "void DRLG_L4TransFix__Fv()") del_items(0x80148EB0) SetType(0x80148EB0, "void DRLG_L4Corners__Fv()") del_items(0x80148F44) SetType(0x80148F44, "void L4FixRim__Fv()") del_items(0x80148F80) SetType(0x80148F80, "void DRLG_L4GeneralFix__Fv()") del_items(0x80149024) SetType(0x80149024, "void DRLG_L4__Fi(int entry)") del_items(0x80149920) SetType(0x80149920, "void DRLG_L4Pass3__Fv()") del_items(0x80149AC4) SetType(0x80149AC4, "void CreateL4Dungeon__FUii(unsigned int rseed, int entry)") del_items(0x80149B54) SetType(0x80149B54, "int ObjIndex__Fii(int x, int y)") del_items(0x80149C08) SetType(0x80149C08, "void AddSKingObjs__Fv()") del_items(0x80149D38) SetType(0x80149D38, "void AddSChamObjs__Fv()") del_items(0x80149DB4) SetType(0x80149DB4, "void AddVileObjs__Fv()") del_items(0x80149E60) SetType(0x80149E60, "void DRLG_SetMapTrans__FPc(char *sFileName)") del_items(0x80149F24) SetType(0x80149F24, "void LoadSetMap__Fv()") del_items(0x8014A22C) SetType(0x8014A22C, "unsigned long CM_QuestToBitPattern__Fi(int QuestNum)") del_items(0x8014A2FC) SetType(0x8014A2FC, "void CM_ShowMonsterList__Fii(int Level, int List)") del_items(0x8014A374) SetType(0x8014A374, "int CM_ChooseMonsterList__FiUl(int Level, unsigned long QuestsNeededMask)") del_items(0x8014A414) SetType(0x8014A414, "int NoUiListChoose__FiUl(int Level, unsigned long QuestsNeededMask)") del_items(0x8014A41C) SetType(0x8014A41C, "void ChooseTask__FP4TASK(struct TASK *T)") del_items(0x8014A930) SetType(0x8014A930, "void ShowTask__FP4TASK(struct TASK *T)") del_items(0x8014AB4C) SetType(0x8014AB4C, "int GetListsAvailable__FiUlPUc(int Level, unsigned long QuestsNeededMask, unsigned char *ListofLists)") del_items(0x8014AC70) SetType(0x8014AC70, "unsigned short GetDown__C4CPad(struct CPad *this)") del_items(0x8014AC98) SetType(0x8014AC98, "void AddL1Door__Fiiii(int i, int x, int y, int ot)") del_items(0x8014AE28) SetType(0x8014AE28, "void AddSCambBook__Fi(int i)") del_items(0x8014AF00) SetType(0x8014AF00, "void AddChest__Fii(int i, int t)") del_items(0x8014B100) SetType(0x8014B100, "void AddL2Door__Fiiii(int i, int x, int y, int ot)") del_items(0x8014B270) SetType(0x8014B270, "void AddL3Door__Fiiii(int i, int x, int y, int ot)") del_items(0x8014B34C) SetType(0x8014B34C, "void AddSarc__Fi(int i)") del_items(0x8014B450) SetType(0x8014B450, "void AddFlameTrap__Fi(int i)") del_items(0x8014B4E4) SetType(0x8014B4E4, "void AddTrap__Fii(int i, int ot)") del_items(0x8014B600) SetType(0x8014B600, "void AddObjLight__Fii(int i, int r)") del_items(0x8014B6DC) SetType(0x8014B6DC, "void AddBarrel__Fii(int i, int ot)") del_items(0x8014B7AC) SetType(0x8014B7AC, "void AddShrine__Fi(int i)") del_items(0x8014B918) SetType(0x8014B918, "void AddBookcase__Fi(int i)") del_items(0x8014B990) SetType(0x8014B990, "void AddBookstand__Fi(int i)") del_items(0x8014B9F8) SetType(0x8014B9F8, "void AddBloodFtn__Fi(int i)") del_items(0x8014BA60) SetType(0x8014BA60, "void AddPurifyingFountain__Fi(int i)") del_items(0x8014BB64) SetType(0x8014BB64, "void AddArmorStand__Fi(int i)") del_items(0x8014BC0C) SetType(0x8014BC0C, "void AddGoatShrine__Fi(int i)") del_items(0x8014BC74) SetType(0x8014BC74, "void AddCauldron__Fi(int i)") del_items(0x8014BCDC) SetType(0x8014BCDC, "void AddMurkyFountain__Fi(int i)") del_items(0x8014BDE0) SetType(0x8014BDE0, "void AddTearFountain__Fi(int i)") del_items(0x8014BE48) SetType(0x8014BE48, "void AddDecap__Fi(int i)") del_items(0x8014BEE0) SetType(0x8014BEE0, "void AddVilebook__Fi(int i)") del_items(0x8014BF64) SetType(0x8014BF64, "void AddMagicCircle__Fi(int i)") del_items(0x8014BFF8) SetType(0x8014BFF8, "void AddBrnCross__Fi(int i)") del_items(0x8014C060) SetType(0x8014C060, "void AddPedistal__Fi(int i)") del_items(0x8014C10C) SetType(0x8014C10C, "void AddStoryBook__Fi(int i)") del_items(0x8014C2C8) SetType(0x8014C2C8, "void AddWeaponRack__Fi(int i)") del_items(0x8014C370) SetType(0x8014C370, "void AddTorturedBody__Fi(int i)") del_items(0x8014C408) SetType(0x8014C408, "void AddFlameLvr__Fi(int i)") del_items(0x8014C480) SetType(0x8014C480, "void GetRndObjLoc__FiRiT1(int randarea, int *xx, int *yy)") del_items(0x8014C58C) SetType(0x8014C58C, "void AddMushPatch__Fv()") del_items(0x8014C6B0) SetType(0x8014C6B0, "void AddSlainHero__Fv()") del_items(0x8014C6F0) SetType(0x8014C6F0, "unsigned char RndLocOk__Fii(int xp, int yp)") del_items(0x8014C7D4) SetType(0x8014C7D4, "unsigned char TrapLocOk__Fii(int xp, int yp)") del_items(0x8014C83C) SetType(0x8014C83C, "unsigned char RoomLocOk__Fii(int xp, int yp)") del_items(0x8014C8D4) SetType(0x8014C8D4, "void InitRndLocObj__Fiii(int min, int max, int objtype)") del_items(0x8014CA80) SetType(0x8014CA80, "void InitRndLocBigObj__Fiii(int min, int max, int objtype)") del_items(0x8014CC78) SetType(0x8014CC78, "void InitRndLocObj5x5__Fiii(int min, int max, int objtype)") del_items(0x8014CDA0) SetType(0x8014CDA0, "void SetMapObjects__FPUcii(unsigned char *pMap, int startx, int starty)") del_items(0x8014D064) SetType(0x8014D064, "void ClrAllObjects__Fv()") del_items(0x8014D154) SetType(0x8014D154, "void AddTortures__Fv()") del_items(0x8014D2E0) SetType(0x8014D2E0, "void AddCandles__Fv()") del_items(0x8014D368) SetType(0x8014D368, "void AddTrapLine__Fiiii(int min, int max, int tobjtype, int lobjtype)") del_items(0x8014D704) SetType(0x8014D704, "void AddLeverObj__Fiiiiiiii(int lx1, int ly1, int lx2, int ly2, int x1, int y1, int x2, int y2)") del_items(0x8014D70C) SetType(0x8014D70C, "void AddBookLever__Fiiiiiiiii(int lx1, int ly1, int lx2, int ly2, int x1, int y1, int x2, int y2, int msg)") del_items(0x8014D980) SetType(0x8014D980, "void InitRndBarrels__Fv()") del_items(0x8014DB1C) SetType(0x8014DB1C, "void AddL1Objs__Fiiii(int x1, int y1, int x2, int y2)") del_items(0x8014DC54) SetType(0x8014DC54, "void AddL2Objs__Fiiii(int x1, int y1, int x2, int y2)") del_items(0x8014DD68) SetType(0x8014DD68, "void AddL3Objs__Fiiii(int x1, int y1, int x2, int y2)") del_items(0x8014DE68) SetType(0x8014DE68, "unsigned char TorchLocOK__Fii(int xp, int yp)") del_items(0x8014DEA8) SetType(0x8014DEA8, "void AddL2Torches__Fv()") del_items(0x8014E05C) SetType(0x8014E05C, "unsigned char WallTrapLocOk__Fii(int xp, int yp)") del_items(0x8014E0C4) SetType(0x8014E0C4, "void AddObjTraps__Fv()") del_items(0x8014E43C) SetType(0x8014E43C, "void AddChestTraps__Fv()") del_items(0x8014E58C) SetType(0x8014E58C, "void LoadMapObjects__FPUciiiiiii(unsigned char *pMap, int startx, int starty, int x1, int y1, int w, int h, int leveridx)") del_items(0x8014E6F8) SetType(0x8014E6F8, "void AddDiabObjs__Fv()") del_items(0x8014E84C) SetType(0x8014E84C, "void AddStoryBooks__Fv()") del_items(0x8014E99C) SetType(0x8014E99C, "void AddHookedBodies__Fi(int freq)") del_items(0x8014EB94) SetType(0x8014EB94, "void AddL4Goodies__Fv()") del_items(0x8014EC44) SetType(0x8014EC44, "void AddLazStand__Fv()") del_items(0x8014EDD8) SetType(0x8014EDD8, "void InitObjects__Fv()") del_items(0x8014F43C) SetType(0x8014F43C, "void PreObjObjAddSwitch__Fiiii(int ot, int ox, int oy, int oi)") del_items(0x8014F784) SetType(0x8014F784, "void FillSolidBlockTbls__Fv()") del_items(0x8014F954) SetType(0x8014F954, "void SetDungeonMicros__Fv()") del_items(0x8014F95C) SetType(0x8014F95C, "void DRLG_InitTrans__Fv()") del_items(0x8014F9D0) SetType(0x8014F9D0, "void DRLG_MRectTrans__Fiiii(int x1, int y1, int x2, int y2)") del_items(0x8014FA70) SetType(0x8014FA70, "void DRLG_RectTrans__Fiiii(int x1, int y1, int x2, int y2)") del_items(0x8014FAF0) SetType(0x8014FAF0, "void DRLG_CopyTrans__Fiiii(int sx, int sy, int dx, int dy)") del_items(0x8014FB58) SetType(0x8014FB58, "void DRLG_ListTrans__FiPUc(int num, unsigned char *List)") del_items(0x8014FBCC) SetType(0x8014FBCC, "void DRLG_AreaTrans__FiPUc(int num, unsigned char *List)") del_items(0x8014FC5C) SetType(0x8014FC5C, "void DRLG_InitSetPC__Fv()") del_items(0x8014FC74) SetType(0x8014FC74, "void DRLG_SetPC__Fv()") del_items(0x8014FD24) SetType(0x8014FD24, "void Make_SetPC__Fiiii(int x, int y, int w, int h)") del_items(0x8014FDC4) SetType(0x8014FDC4, "unsigned char DRLG_WillThemeRoomFit__FiiiiiPiT5(int floor, int x, int y, int minSize, int maxSize, int *width, int *height)") del_items(0x8015008C) SetType(0x8015008C, "void DRLG_CreateThemeRoom__Fi(int themeIndex)") del_items(0x80151094) SetType(0x80151094, "void DRLG_PlaceThemeRooms__FiiiiUc(int minSize, int maxSize, int floor, int freq, int rndSize)") del_items(0x8015133C) SetType(0x8015133C, "void DRLG_HoldThemeRooms__Fv()") del_items(0x801514F0) SetType(0x801514F0, "unsigned char SkipThemeRoom__Fii(int x, int y)") del_items(0x801515BC) SetType(0x801515BC, "void InitLevels__Fv()") del_items(0x801516C0) SetType(0x801516C0, "unsigned char TFit_Shrine__Fi(int i)") del_items(0x80151968) SetType(0x80151968, "unsigned char TFit_Obj5__Fi(int t)") del_items(0x80151B58) SetType(0x80151B58, "unsigned char TFit_SkelRoom__Fi(int t)") del_items(0x80151C08) SetType(0x80151C08, "unsigned char TFit_GoatShrine__Fi(int t)") del_items(0x80151CA0) SetType(0x80151CA0, "unsigned char CheckThemeObj3__Fiiii(int xp, int yp, int t, int f)") del_items(0x80151E0C) SetType(0x80151E0C, "unsigned char TFit_Obj3__Fi(int t)") del_items(0x80151ECC) SetType(0x80151ECC, "unsigned char CheckThemeReqs__Fi(int t)") del_items(0x80151F98) SetType(0x80151F98, "unsigned char SpecialThemeFit__Fii(int i, int t)") del_items(0x80152174) SetType(0x80152174, "unsigned char CheckThemeRoom__Fi(int tv)") del_items(0x80152420) SetType(0x80152420, "void InitThemes__Fv()") del_items(0x80152794) SetType(0x80152794, "void HoldThemeRooms__Fv()") del_items(0x801528A0) SetType(0x801528A0, "void PlaceThemeMonsts__Fii(int t, int f)") del_items(0x80152A6C) SetType(0x80152A6C, "void Theme_Barrel__Fi(int t)") del_items(0x80152C04) SetType(0x80152C04, "void Theme_Shrine__Fi(int t)") del_items(0x80152CEC) SetType(0x80152CEC, "void Theme_MonstPit__Fi(int t)") del_items(0x80152E38) SetType(0x80152E38, "void Theme_SkelRoom__Fi(int t)") del_items(0x8015313C) SetType(0x8015313C, "void Theme_Treasure__Fi(int t)") del_items(0x801533BC) SetType(0x801533BC, "void Theme_Library__Fi(int t)") del_items(0x8015362C) SetType(0x8015362C, "void Theme_Torture__Fi(int t)") del_items(0x801537BC) SetType(0x801537BC, "void Theme_BloodFountain__Fi(int t)") del_items(0x80153830) SetType(0x80153830, "void Theme_Decap__Fi(int t)") del_items(0x801539C0) SetType(0x801539C0, "void Theme_PurifyingFountain__Fi(int t)") del_items(0x80153A34) SetType(0x80153A34, "void Theme_ArmorStand__Fi(int t)") del_items(0x80153BEC) SetType(0x80153BEC, "void Theme_GoatShrine__Fi(int t)") del_items(0x80153D5C) SetType(0x80153D5C, "void Theme_Cauldron__Fi(int t)") del_items(0x80153DD0) SetType(0x80153DD0, "void Theme_MurkyFountain__Fi(int t)") del_items(0x80153E44) SetType(0x80153E44, "void Theme_TearFountain__Fi(int t)") del_items(0x80153EB8) SetType(0x80153EB8, "void Theme_BrnCross__Fi(int t)") del_items(0x80154050) SetType(0x80154050, "void Theme_WeaponRack__Fi(int t)") del_items(0x80154208) SetType(0x80154208, "void UpdateL4Trans__Fv()") del_items(0x80154268) SetType(0x80154268, "void CreateThemeRooms__Fv()") del_items(0x80154470) SetType(0x80154470, "void InitPortals__Fv()") del_items(0x801544D0) SetType(0x801544D0, "void InitQuests__Fv()") del_items(0x801548D4) SetType(0x801548D4, "void DrawButcher__Fv()") del_items(0x80154918) SetType(0x80154918, "void DrawSkelKing__Fiii(int q, int x, int y)") del_items(0x801549A4) SetType(0x801549A4, "void DrawWarLord__Fii(int x, int y)") del_items(0x80154B10) SetType(0x80154B10, "void DrawSChamber__Fiii(int q, int x, int y)") del_items(0x80154CE0) SetType(0x80154CE0, "void DrawLTBanner__Fii(int x, int y)") del_items(0x80154E24) SetType(0x80154E24, "void DrawBlind__Fii(int x, int y)") del_items(0x80154F68) SetType(0x80154F68, "void DrawBlood__Fii(int x, int y)") del_items(0x801550B0) SetType(0x801550B0, "void DRLG_CheckQuests__Fii(int x, int y)") del_items(0x801551EC) SetType(0x801551EC, "void InitInv__Fv()") del_items(0x8015524C) SetType(0x8015524C, "void InitAutomap__Fv()") del_items(0x80155410) SetType(0x80155410, "void InitAutomapOnce__Fv()") del_items(0x80155420) SetType(0x80155420, "unsigned char MonstPlace__Fii(int xp, int yp)") del_items(0x801554DC) SetType(0x801554DC, "void InitMonsterGFX__Fi(int monst)") del_items(0x801555E4) SetType(0x801555E4, "void PlaceMonster__Fiiii(int i, int mtype, int x, int y)") del_items(0x80155684) SetType(0x80155684, "int AddMonsterType__Fii(int type, int placeflag)") del_items(0x801557B8) SetType(0x801557B8, "void GetMonsterTypes__FUl(unsigned long QuestMask)") del_items(0x80155868) SetType(0x80155868, "void ClrAllMonsters__Fv()") del_items(0x801559A8) SetType(0x801559A8, "void InitLevelMonsters__Fv()") del_items(0x80155A2C) SetType(0x80155A2C, "void GetLevelMTypes__Fv()") del_items(0x80155E74) SetType(0x80155E74, "void PlaceQuestMonsters__Fv()") del_items(0x8015628C) SetType(0x8015628C, "void LoadDiabMonsts__Fv()") del_items(0x8015639C) SetType(0x8015639C, "void PlaceGroup__FiiUci(int mtype, int num, unsigned char leaderf, int leader)") del_items(0x801569AC) SetType(0x801569AC, "void SetMapMonsters__FPUcii(unsigned char *pMap, int startx, int starty)") del_items(0x80156BD0) SetType(0x80156BD0, "void InitMonsters__Fv()") del_items(0x80156FAC) SetType(0x80156FAC, "void PlaceUniqueMonst__Fiii(int uniqindex, int miniontype, int unpackfilesize)") del_items(0x801577CC) SetType(0x801577CC, "void PlaceUniques__Fv()") del_items(0x80157990) SetType(0x80157990, "int PreSpawnSkeleton__Fv()") del_items(0x80157AF8) SetType(0x80157AF8, "int encode_enemy__Fi(int m)") del_items(0x80157B50) SetType(0x80157B50, "void decode_enemy__Fii(int m, int enemy)") del_items(0x80157C68) SetType(0x80157C68, "unsigned char IsGoat__Fi(int mt)") del_items(0x80157C94) SetType(0x80157C94, "void InitMissiles__Fv()") del_items(0x80157EB0) SetType(0x80157EB0, "void InitNoTriggers__Fv()") del_items(0x80157ED4) SetType(0x80157ED4, "void InitTownTriggers__Fv()") del_items(0x80158234) SetType(0x80158234, "void InitL1Triggers__Fv()") del_items(0x80158348) SetType(0x80158348, "void InitL2Triggers__Fv()") del_items(0x801584D8) SetType(0x801584D8, "void InitL3Triggers__Fv()") del_items(0x80158634) SetType(0x80158634, "void InitL4Triggers__Fv()") del_items(0x80158848) SetType(0x80158848, "void InitSKingTriggers__Fv()") del_items(0x80158894) SetType(0x80158894, "void InitSChambTriggers__Fv()") del_items(0x801588E0) SetType(0x801588E0, "void InitPWaterTriggers__Fv()") del_items(0x8015892C) SetType(0x8015892C, "void InitVPTriggers__Fv()") del_items(0x80158978) SetType(0x80158978, "void InitStores__Fv()") del_items(0x801589F8) SetType(0x801589F8, "void SetupTownStores__Fv()") del_items(0x80158BA8) SetType(0x80158BA8, "void DeltaLoadLevel__Fv()") del_items(0x80159828) SetType(0x80159828, "unsigned char SmithItemOk__Fi(int i)") del_items(0x8015988C) SetType(0x8015988C, "int RndSmithItem__Fi(int lvl)") del_items(0x80159998) SetType(0x80159998, "unsigned char WitchItemOk__Fi(int i)") del_items(0x80159AD8) SetType(0x80159AD8, "int RndWitchItem__Fi(int lvl)") del_items(0x80159BD8) SetType(0x80159BD8, "void BubbleSwapItem__FP10ItemStructT0(struct ItemStruct *a, struct ItemStruct *b)") del_items(0x80159CBC) SetType(0x80159CBC, "void SortWitch__Fv()") del_items(0x80159DDC) SetType(0x80159DDC, "int RndBoyItem__Fi(int lvl)") del_items(0x80159F00) SetType(0x80159F00, "unsigned char HealerItemOk__Fi(int i)") del_items(0x8015A0B4) SetType(0x8015A0B4, "int RndHealerItem__Fi(int lvl)") del_items(0x8015A1B4) SetType(0x8015A1B4, "void RecreatePremiumItem__Fiiii(int ii, int idx, int plvl, int iseed)") del_items(0x8015A27C) SetType(0x8015A27C, "void RecreateWitchItem__Fiiii(int ii, int idx, int lvl, int iseed)") del_items(0x8015A3D4) SetType(0x8015A3D4, "void RecreateSmithItem__Fiiii(int ii, int idx, int lvl, int iseed)") del_items(0x8015A470) SetType(0x8015A470, "void RecreateHealerItem__Fiiii(int ii, int idx, int lvl, int iseed)") del_items(0x8015A530) SetType(0x8015A530, "void RecreateBoyItem__Fiiii(int ii, int idx, int lvl, int iseed)") del_items(0x8015A5F4) SetType(0x8015A5F4, "void RecreateTownItem__FiiUsii(int ii, int idx, unsigned short icreateinfo, int iseed, int ivalue)") del_items(0x8015A680) SetType(0x8015A680, "void SpawnSmith__Fi(int lvl)") del_items(0x8015A81C) SetType(0x8015A81C, "void SpawnWitch__Fi(int lvl)") del_items(0x8015AB88) SetType(0x8015AB88, "void SpawnHealer__Fi(int lvl)") del_items(0x8015AEA4) SetType(0x8015AEA4, "void SpawnBoy__Fi(int lvl)") del_items(0x8015AFF8) SetType(0x8015AFF8, "void SortSmith__Fv()") del_items(0x8015B10C) SetType(0x8015B10C, "void SortHealer__Fv()") del_items(0x8015B22C) SetType(0x8015B22C, "void RecreateItem__FiiUsii(int ii, int idx, unsigned short icreateinfo, int iseed, int ivalue)")
del_items(2148723220) set_type(2148723220, 'void PreGameOnlyTestRoutine__Fv()') del_items(2148731628) set_type(2148731628, 'void DRLG_PlaceDoor__Fii(int x, int y)') del_items(2148732864) set_type(2148732864, 'void DRLG_L1Shadows__Fv()') del_items(2148733912) set_type(2148733912, 'int DRLG_PlaceMiniSet__FPCUciiiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int noquad, int ldir)') del_items(2148735044) set_type(2148735044, 'void DRLG_L1Floor__Fv()') del_items(2148735280) set_type(2148735280, 'void StoreBlock__FPiii(int *Bl, int xx, int yy)') del_items(2148735452) set_type(2148735452, 'void DRLG_L1Pass3__Fv()') del_items(2148736008) set_type(2148736008, 'void DRLG_LoadL1SP__Fv()') del_items(2148736228) set_type(2148736228, 'void DRLG_FreeL1SP__Fv()') del_items(2148736276) set_type(2148736276, 'void DRLG_Init_Globals__Fv()') del_items(2148736440) set_type(2148736440, 'void set_restore_lighting__Fv()') del_items(2148736584) set_type(2148736584, 'void DRLG_InitL1Vals__Fv()') del_items(2148736592) set_type(2148736592, 'void LoadL1Dungeon__FPcii(char *sFileName, int vx, int vy)') del_items(2148737052) set_type(2148737052, 'void LoadPreL1Dungeon__FPcii(char *sFileName, int vx, int vy)') del_items(2148737492) set_type(2148737492, 'void InitL5Dungeon__Fv()') del_items(2148737588) set_type(2148737588, 'void L5ClearFlags__Fv()') del_items(2148737664) set_type(2148737664, 'void L5drawRoom__Fiiii(int x, int y, int w, int h)') del_items(2148737772) set_type(2148737772, 'unsigned char L5checkRoom__Fiiii(int x, int y, int width, int height)') del_items(2148737920) set_type(2148737920, 'void L5roomGen__Fiiiii(int x, int y, int w, int h, int dir)') del_items(2148738684) set_type(2148738684, 'void L5firstRoom__Fv()') del_items(2148739640) set_type(2148739640, 'long L5GetArea__Fv()') del_items(2148739736) set_type(2148739736, 'void L5makeDungeon__Fv()') del_items(2148739876) set_type(2148739876, 'void L5makeDmt__Fv()') del_items(2148740108) set_type(2148740108, 'int L5HWallOk__Fii(int i, int j)') del_items(2148740424) set_type(2148740424, 'int L5VWallOk__Fii(int i, int j)') del_items(2148740756) set_type(2148740756, 'void L5HorizWall__Fiici(int i, int j, char p, int dx)') del_items(2148741332) set_type(2148741332, 'void L5VertWall__Fiici(int i, int j, char p, int dy)') del_items(2148741896) set_type(2148741896, 'void L5AddWall__Fv()') del_items(2148742520) set_type(2148742520, 'void DRLG_L5GChamber__Fiiiiii(int sx, int sy, int topflag, int bottomflag, int leftflag, int rightflag)') del_items(2148743224) set_type(2148743224, 'void DRLG_L5GHall__Fiiii(int x1, int y1, int x2, int y2)') del_items(2148743404) set_type(2148743404, 'void L5tileFix__Fv()') del_items(2148745648) set_type(2148745648, 'void DRLG_L5Subs__Fv()') del_items(2148746152) set_type(2148746152, 'void DRLG_L5SetRoom__Fii(int rx1, int ry1)') del_items(2148746408) set_type(2148746408, 'void L5FillChambers__Fv()') del_items(2148748180) set_type(2148748180, 'void DRLG_L5FTVR__Fiiiii(int i, int j, int x, int y, int d)') del_items(2148749540) set_type(2148749540, 'void DRLG_L5FloodTVal__Fv()') del_items(2148749800) set_type(2148749800, 'void DRLG_L5TransFix__Fv()') del_items(2148750328) set_type(2148750328, 'void DRLG_L5DirtFix__Fv()') del_items(2148750676) set_type(2148750676, 'void DRLG_L5CornerFix__Fv()') del_items(2148750948) set_type(2148750948, 'void DRLG_L5__Fi(int entry)') del_items(2148752260) set_type(2148752260, 'void CreateL5Dungeon__FUii(unsigned int rseed, int entry)') del_items(2148761896) set_type(2148761896, 'unsigned char DRLG_L2PlaceMiniSet__FPUciiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir)') del_items(2148762908) set_type(2148762908, 'void DRLG_L2PlaceRndSet__FPUci(unsigned char *miniset, int rndper)') del_items(2148763676) set_type(2148763676, 'void DRLG_L2Subs__Fv()') del_items(2148764176) set_type(2148764176, 'void DRLG_L2Shadows__Fv()') del_items(2148764628) set_type(2148764628, 'void InitDungeon__Fv()') del_items(2148764724) set_type(2148764724, 'void DRLG_LoadL2SP__Fv()') del_items(2148764884) set_type(2148764884, 'void DRLG_FreeL2SP__Fv()') del_items(2148764932) set_type(2148764932, 'void DRLG_L2SetRoom__Fii(int rx1, int ry1)') del_items(2148765188) set_type(2148765188, 'void DefineRoom__Fiiiii(int nX1, int nY1, int nX2, int nY2, int ForceHW)') del_items(2148765712) set_type(2148765712, 'void CreateDoorType__Fii(int nX, int nY)') del_items(2148765940) set_type(2148765940, 'void PlaceHallExt__Fii(int nX, int nY)') del_items(2148765996) set_type(2148765996, 'void AddHall__Fiiiii(int nX1, int nY1, int nX2, int nY2, int nHd)') del_items(2148766212) set_type(2148766212, 'void CreateRoom__Fiiiiiiiii(int nX1, int nY1, int nX2, int nY2, int nRDest, int nHDir, int ForceHW, int nH, int nW)') del_items(2148767884) set_type(2148767884, 'void GetHall__FPiN40(int *nX1, int *nY1, int *nX2, int *nY2, int *nHd)') del_items(2148768036) set_type(2148768036, 'void ConnectHall__Fiiiii(int nX1, int nY1, int nX2, int nY2, int nHd)') del_items(2148769676) set_type(2148769676, 'void DoPatternCheck__Fii(int i, int j)') del_items(2148770368) set_type(2148770368, 'void L2TileFix__Fv()') del_items(2148770660) set_type(2148770660, 'unsigned char DL2_Cont__FUcUcUcUc(unsigned char x1f, unsigned char y1f, unsigned char x2f, unsigned char y2f)') del_items(2148770788) set_type(2148770788, 'int DL2_NumNoChar__Fv()') del_items(2148770880) set_type(2148770880, 'void DL2_DrawRoom__Fiiii(int x1, int y1, int x2, int y2)') del_items(2148771140) set_type(2148771140, 'void DL2_KnockWalls__Fiiii(int x1, int y1, int x2, int y2)') del_items(2148771604) set_type(2148771604, 'unsigned char DL2_FillVoids__Fv()') del_items(2148774040) set_type(2148774040, 'unsigned char CreateDungeon__Fv()') del_items(2148774820) set_type(2148774820, 'void DRLG_L2Pass3__Fv()') del_items(2148775228) set_type(2148775228, 'void DRLG_L2FTVR__Fiiiii(int i, int j, int x, int y, int d)') del_items(2148776580) set_type(2148776580, 'void DRLG_L2FloodTVal__Fv()') del_items(2148776840) set_type(2148776840, 'void DRLG_L2TransFix__Fv()') del_items(2148777368) set_type(2148777368, 'void L2DirtFix__Fv()') del_items(2148777720) set_type(2148777720, 'void L2LockoutFix__Fv()') del_items(2148778628) set_type(2148778628, 'void L2DoorFix__Fv()') del_items(2148778804) set_type(2148778804, 'void DRLG_L2__Fi(int entry)') del_items(2148781440) set_type(2148781440, 'void DRLG_InitL2Vals__Fv()') del_items(2148781448) set_type(2148781448, 'void LoadL2Dungeon__FPcii(char *sFileName, int vx, int vy)') del_items(2148781944) set_type(2148781944, 'void LoadPreL2Dungeon__FPcii(char *sFileName, int vx, int vy)') del_items(2148782436) set_type(2148782436, 'void CreateL2Dungeon__FUii(unsigned int rseed, int entry)') del_items(2148784924) set_type(2148784924, 'void InitL3Dungeon__Fv()') del_items(2148785060) set_type(2148785060, 'int DRLG_L3FillRoom__Fiiii(int x1, int y1, int x2, int y2)') del_items(2148785664) set_type(2148785664, 'void DRLG_L3CreateBlock__Fiiii(int x, int y, int obs, int dir)') del_items(2148786332) set_type(2148786332, 'void DRLG_L3FloorArea__Fiiii(int x1, int y1, int x2, int y2)') del_items(2148786436) set_type(2148786436, 'void DRLG_L3FillDiags__Fv()') del_items(2148786740) set_type(2148786740, 'void DRLG_L3FillSingles__Fv()') del_items(2148786944) set_type(2148786944, 'void DRLG_L3FillStraights__Fv()') del_items(2148787908) set_type(2148787908, 'void DRLG_L3Edges__Fv()') del_items(2148787972) set_type(2148787972, 'int DRLG_L3GetFloorArea__Fv()') del_items(2148788052) set_type(2148788052, 'void DRLG_L3MakeMegas__Fv()') del_items(2148788376) set_type(2148788376, 'void DRLG_L3River__Fv()') del_items(2148791000) set_type(2148791000, 'int DRLG_L3SpawnEdge__FiiPi(int x, int y, int *totarea)') del_items(2148791652) set_type(2148791652, 'int DRLG_L3Spawn__FiiPi(int x, int y, int *totarea)') del_items(2148792184) set_type(2148792184, 'void DRLG_L3Pool__Fv()') del_items(2148792780) set_type(2148792780, 'void DRLG_L3PoolFix__Fv()') del_items(2148793088) set_type(2148793088, 'int DRLG_L3PlaceMiniSet__FPCUciiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir)') del_items(2148793984) set_type(2148793984, 'void DRLG_L3PlaceRndSet__FPCUci(unsigned char *miniset, int rndper)') del_items(2148794824) set_type(2148794824, 'unsigned char WoodVertU__Fii(int i, int y)') del_items(2148794996) set_type(2148794996, 'unsigned char WoodVertD__Fii(int i, int y)') del_items(2148795152) set_type(2148795152, 'unsigned char WoodHorizL__Fii(int x, int j)') del_items(2148795300) set_type(2148795300, 'unsigned char WoodHorizR__Fii(int x, int j)') del_items(2148795432) set_type(2148795432, 'void AddFenceDoors__Fv()') del_items(2148795660) set_type(2148795660, 'void FenceDoorFix__Fv()') del_items(2148796160) set_type(2148796160, 'void DRLG_L3Wood__Fv()') del_items(2148798192) set_type(2148798192, 'int DRLG_L3Anvil__Fv()') del_items(2148798796) set_type(2148798796, 'void FixL3Warp__Fv()') del_items(2148799028) set_type(2148799028, 'void FixL3HallofHeroes__Fv()') del_items(2148799368) set_type(2148799368, 'void DRLG_L3LockRec__Fii(int x, int y)') del_items(2148799524) set_type(2148799524, 'unsigned char DRLG_L3Lockout__Fv()') del_items(2148799716) set_type(2148799716, 'void DRLG_L3__Fi(int entry)') del_items(2148801540) set_type(2148801540, 'void DRLG_L3Pass3__Fv()') del_items(2148801960) set_type(2148801960, 'void CreateL3Dungeon__FUii(unsigned int rseed, int entry)') del_items(2148802236) set_type(2148802236, 'void LoadL3Dungeon__FPcii(char *sFileName, int vx, int vy)') del_items(2148802784) set_type(2148802784, 'void LoadPreL3Dungeon__FPcii(char *sFileName, int vx, int vy)') del_items(2148810560) set_type(2148810560, 'void DRLG_L4Shadows__Fv()') del_items(2148810756) set_type(2148810756, 'void InitL4Dungeon__Fv()') del_items(2148810912) set_type(2148810912, 'void DRLG_LoadL4SP__Fv()') del_items(2148811112) set_type(2148811112, 'void DRLG_FreeL4SP__Fv()') del_items(2148811152) set_type(2148811152, 'void DRLG_L4SetSPRoom__Fii(int rx1, int ry1)') del_items(2148811408) set_type(2148811408, 'void L4makeDmt__Fv()') del_items(2148811572) set_type(2148811572, 'int L4HWallOk__Fii(int i, int j)') del_items(2148811908) set_type(2148811908, 'int L4VWallOk__Fii(int i, int j)') del_items(2148812288) set_type(2148812288, 'void L4HorizWall__Fiii(int i, int j, int dx)') del_items(2148812752) set_type(2148812752, 'void L4VertWall__Fiii(int i, int j, int dy)') del_items(2148813208) set_type(2148813208, 'void L4AddWall__Fv()') del_items(2148814456) set_type(2148814456, 'void L4tileFix__Fv()') del_items(2148823136) set_type(2148823136, 'void DRLG_L4Subs__Fv()') del_items(2148823608) set_type(2148823608, 'void L4makeDungeon__Fv()') del_items(2148824176) set_type(2148824176, 'void uShape__Fv()') del_items(2148824852) set_type(2148824852, 'long GetArea__Fv()') del_items(2148824944) set_type(2148824944, 'void L4drawRoom__Fiiii(int x, int y, int width, int height)') del_items(2148825048) set_type(2148825048, 'unsigned char L4checkRoom__Fiiii(int x, int y, int width, int height)') del_items(2148825204) set_type(2148825204, 'void L4roomGen__Fiiiii(int x, int y, int w, int h, int dir)') del_items(2148825968) set_type(2148825968, 'void L4firstRoom__Fv()') del_items(2148826556) set_type(2148826556, 'void L4SaveQuads__Fv()') del_items(2148826716) set_type(2148826716, 'void DRLG_L4SetRoom__FPUcii(unsigned char *pSetPiece, int rx1, int ry1)') del_items(2148826928) set_type(2148826928, 'void DRLG_LoadDiabQuads__FUc(unsigned char preflag)') del_items(2148827284) set_type(2148827284, 'unsigned char DRLG_L4PlaceMiniSet__FPCUciiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir)') del_items(2148828332) set_type(2148828332, 'void DRLG_L4FTVR__Fiiiii(int i, int j, int x, int y, int d)') del_items(2148829684) set_type(2148829684, 'void DRLG_L4FloodTVal__Fv()') del_items(2148829944) set_type(2148829944, 'unsigned char IsDURWall__Fc(char d)') del_items(2148829992) set_type(2148829992, 'unsigned char IsDLLWall__Fc(char dd)') del_items(2148830040) set_type(2148830040, 'void DRLG_L4TransFix__Fv()') del_items(2148830896) set_type(2148830896, 'void DRLG_L4Corners__Fv()') del_items(2148831044) set_type(2148831044, 'void L4FixRim__Fv()') del_items(2148831104) set_type(2148831104, 'void DRLG_L4GeneralFix__Fv()') del_items(2148831268) set_type(2148831268, 'void DRLG_L4__Fi(int entry)') del_items(2148833568) set_type(2148833568, 'void DRLG_L4Pass3__Fv()') del_items(2148833988) set_type(2148833988, 'void CreateL4Dungeon__FUii(unsigned int rseed, int entry)') del_items(2148834132) set_type(2148834132, 'int ObjIndex__Fii(int x, int y)') del_items(2148834312) set_type(2148834312, 'void AddSKingObjs__Fv()') del_items(2148834616) set_type(2148834616, 'void AddSChamObjs__Fv()') del_items(2148834740) set_type(2148834740, 'void AddVileObjs__Fv()') del_items(2148834912) set_type(2148834912, 'void DRLG_SetMapTrans__FPc(char *sFileName)') del_items(2148835108) set_type(2148835108, 'void LoadSetMap__Fv()') del_items(2148835884) set_type(2148835884, 'unsigned long CM_QuestToBitPattern__Fi(int QuestNum)') del_items(2148836092) set_type(2148836092, 'void CM_ShowMonsterList__Fii(int Level, int List)') del_items(2148836212) set_type(2148836212, 'int CM_ChooseMonsterList__FiUl(int Level, unsigned long QuestsNeededMask)') del_items(2148836372) set_type(2148836372, 'int NoUiListChoose__FiUl(int Level, unsigned long QuestsNeededMask)') del_items(2148836380) set_type(2148836380, 'void ChooseTask__FP4TASK(struct TASK *T)') del_items(2148837680) set_type(2148837680, 'void ShowTask__FP4TASK(struct TASK *T)') del_items(2148838220) set_type(2148838220, 'int GetListsAvailable__FiUlPUc(int Level, unsigned long QuestsNeededMask, unsigned char *ListofLists)') del_items(2148838512) set_type(2148838512, 'unsigned short GetDown__C4CPad(struct CPad *this)') del_items(2148838552) set_type(2148838552, 'void AddL1Door__Fiiii(int i, int x, int y, int ot)') del_items(2148838952) set_type(2148838952, 'void AddSCambBook__Fi(int i)') del_items(2148839168) set_type(2148839168, 'void AddChest__Fii(int i, int t)') del_items(2148839680) set_type(2148839680, 'void AddL2Door__Fiiii(int i, int x, int y, int ot)') del_items(2148840048) set_type(2148840048, 'void AddL3Door__Fiiii(int i, int x, int y, int ot)') del_items(2148840268) set_type(2148840268, 'void AddSarc__Fi(int i)') del_items(2148840528) set_type(2148840528, 'void AddFlameTrap__Fi(int i)') del_items(2148840676) set_type(2148840676, 'void AddTrap__Fii(int i, int ot)') del_items(2148840960) set_type(2148840960, 'void AddObjLight__Fii(int i, int r)') del_items(2148841180) set_type(2148841180, 'void AddBarrel__Fii(int i, int ot)') del_items(2148841388) set_type(2148841388, 'void AddShrine__Fi(int i)') del_items(2148841752) set_type(2148841752, 'void AddBookcase__Fi(int i)') del_items(2148841872) set_type(2148841872, 'void AddBookstand__Fi(int i)') del_items(2148841976) set_type(2148841976, 'void AddBloodFtn__Fi(int i)') del_items(2148842080) set_type(2148842080, 'void AddPurifyingFountain__Fi(int i)') del_items(2148842340) set_type(2148842340, 'void AddArmorStand__Fi(int i)') del_items(2148842508) set_type(2148842508, 'void AddGoatShrine__Fi(int i)') del_items(2148842612) set_type(2148842612, 'void AddCauldron__Fi(int i)') del_items(2148842716) set_type(2148842716, 'void AddMurkyFountain__Fi(int i)') del_items(2148842976) set_type(2148842976, 'void AddTearFountain__Fi(int i)') del_items(2148843080) set_type(2148843080, 'void AddDecap__Fi(int i)') del_items(2148843232) set_type(2148843232, 'void AddVilebook__Fi(int i)') del_items(2148843364) set_type(2148843364, 'void AddMagicCircle__Fi(int i)') del_items(2148843512) set_type(2148843512, 'void AddBrnCross__Fi(int i)') del_items(2148843616) set_type(2148843616, 'void AddPedistal__Fi(int i)') del_items(2148843788) set_type(2148843788, 'void AddStoryBook__Fi(int i)') del_items(2148844232) set_type(2148844232, 'void AddWeaponRack__Fi(int i)') del_items(2148844400) set_type(2148844400, 'void AddTorturedBody__Fi(int i)') del_items(2148844552) set_type(2148844552, 'void AddFlameLvr__Fi(int i)') del_items(2148844672) set_type(2148844672, 'void GetRndObjLoc__FiRiT1(int randarea, int *xx, int *yy)') del_items(2148844940) set_type(2148844940, 'void AddMushPatch__Fv()') del_items(2148845232) set_type(2148845232, 'void AddSlainHero__Fv()') del_items(2148845296) set_type(2148845296, 'unsigned char RndLocOk__Fii(int xp, int yp)') del_items(2148845524) set_type(2148845524, 'unsigned char TrapLocOk__Fii(int xp, int yp)') del_items(2148845628) set_type(2148845628, 'unsigned char RoomLocOk__Fii(int xp, int yp)') del_items(2148845780) set_type(2148845780, 'void InitRndLocObj__Fiii(int min, int max, int objtype)') del_items(2148846208) set_type(2148846208, 'void InitRndLocBigObj__Fiii(int min, int max, int objtype)') del_items(2148846712) set_type(2148846712, 'void InitRndLocObj5x5__Fiii(int min, int max, int objtype)') del_items(2148847008) set_type(2148847008, 'void SetMapObjects__FPUcii(unsigned char *pMap, int startx, int starty)') del_items(2148847716) set_type(2148847716, 'void ClrAllObjects__Fv()') del_items(2148847956) set_type(2148847956, 'void AddTortures__Fv()') del_items(2148848352) set_type(2148848352, 'void AddCandles__Fv()') del_items(2148848488) set_type(2148848488, 'void AddTrapLine__Fiiii(int min, int max, int tobjtype, int lobjtype)') del_items(2148849412) set_type(2148849412, 'void AddLeverObj__Fiiiiiiii(int lx1, int ly1, int lx2, int ly2, int x1, int y1, int x2, int y2)') del_items(2148849420) set_type(2148849420, 'void AddBookLever__Fiiiiiiiii(int lx1, int ly1, int lx2, int ly2, int x1, int y1, int x2, int y2, int msg)') del_items(2148850048) set_type(2148850048, 'void InitRndBarrels__Fv()') del_items(2148850460) set_type(2148850460, 'void AddL1Objs__Fiiii(int x1, int y1, int x2, int y2)') del_items(2148850772) set_type(2148850772, 'void AddL2Objs__Fiiii(int x1, int y1, int x2, int y2)') del_items(2148851048) set_type(2148851048, 'void AddL3Objs__Fiiii(int x1, int y1, int x2, int y2)') del_items(2148851304) set_type(2148851304, 'unsigned char TorchLocOK__Fii(int xp, int yp)') del_items(2148851368) set_type(2148851368, 'void AddL2Torches__Fv()') del_items(2148851804) set_type(2148851804, 'unsigned char WallTrapLocOk__Fii(int xp, int yp)') del_items(2148851908) set_type(2148851908, 'void AddObjTraps__Fv()') del_items(2148852796) set_type(2148852796, 'void AddChestTraps__Fv()') del_items(2148853132) set_type(2148853132, 'void LoadMapObjects__FPUciiiiiii(unsigned char *pMap, int startx, int starty, int x1, int y1, int w, int h, int leveridx)') del_items(2148853496) set_type(2148853496, 'void AddDiabObjs__Fv()') del_items(2148853836) set_type(2148853836, 'void AddStoryBooks__Fv()') del_items(2148854172) set_type(2148854172, 'void AddHookedBodies__Fi(int freq)') del_items(2148854676) set_type(2148854676, 'void AddL4Goodies__Fv()') del_items(2148854852) set_type(2148854852, 'void AddLazStand__Fv()') del_items(2148855256) set_type(2148855256, 'void InitObjects__Fv()') del_items(2148856892) set_type(2148856892, 'void PreObjObjAddSwitch__Fiiii(int ot, int ox, int oy, int oi)') del_items(2148857732) set_type(2148857732, 'void FillSolidBlockTbls__Fv()') del_items(2148858196) set_type(2148858196, 'void SetDungeonMicros__Fv()') del_items(2148858204) set_type(2148858204, 'void DRLG_InitTrans__Fv()') del_items(2148858320) set_type(2148858320, 'void DRLG_MRectTrans__Fiiii(int x1, int y1, int x2, int y2)') del_items(2148858480) set_type(2148858480, 'void DRLG_RectTrans__Fiiii(int x1, int y1, int x2, int y2)') del_items(2148858608) set_type(2148858608, 'void DRLG_CopyTrans__Fiiii(int sx, int sy, int dx, int dy)') del_items(2148858712) set_type(2148858712, 'void DRLG_ListTrans__FiPUc(int num, unsigned char *List)') del_items(2148858828) set_type(2148858828, 'void DRLG_AreaTrans__FiPUc(int num, unsigned char *List)') del_items(2148858972) set_type(2148858972, 'void DRLG_InitSetPC__Fv()') del_items(2148858996) set_type(2148858996, 'void DRLG_SetPC__Fv()') del_items(2148859172) set_type(2148859172, 'void Make_SetPC__Fiiii(int x, int y, int w, int h)') del_items(2148859332) set_type(2148859332, 'unsigned char DRLG_WillThemeRoomFit__FiiiiiPiT5(int floor, int x, int y, int minSize, int maxSize, int *width, int *height)') del_items(2148860044) set_type(2148860044, 'void DRLG_CreateThemeRoom__Fi(int themeIndex)') del_items(2148864148) set_type(2148864148, 'void DRLG_PlaceThemeRooms__FiiiiUc(int minSize, int maxSize, int floor, int freq, int rndSize)') del_items(2148864828) set_type(2148864828, 'void DRLG_HoldThemeRooms__Fv()') del_items(2148865264) set_type(2148865264, 'unsigned char SkipThemeRoom__Fii(int x, int y)') del_items(2148865468) set_type(2148865468, 'void InitLevels__Fv()') del_items(2148865728) set_type(2148865728, 'unsigned char TFit_Shrine__Fi(int i)') del_items(2148866408) set_type(2148866408, 'unsigned char TFit_Obj5__Fi(int t)') del_items(2148866904) set_type(2148866904, 'unsigned char TFit_SkelRoom__Fi(int t)') del_items(2148867080) set_type(2148867080, 'unsigned char TFit_GoatShrine__Fi(int t)') del_items(2148867232) set_type(2148867232, 'unsigned char CheckThemeObj3__Fiiii(int xp, int yp, int t, int f)') del_items(2148867596) set_type(2148867596, 'unsigned char TFit_Obj3__Fi(int t)') del_items(2148867788) set_type(2148867788, 'unsigned char CheckThemeReqs__Fi(int t)') del_items(2148867992) set_type(2148867992, 'unsigned char SpecialThemeFit__Fii(int i, int t)') del_items(2148868468) set_type(2148868468, 'unsigned char CheckThemeRoom__Fi(int tv)') del_items(2148869152) set_type(2148869152, 'void InitThemes__Fv()') del_items(2148870036) set_type(2148870036, 'void HoldThemeRooms__Fv()') del_items(2148870304) set_type(2148870304, 'void PlaceThemeMonsts__Fii(int t, int f)') del_items(2148870764) set_type(2148870764, 'void Theme_Barrel__Fi(int t)') del_items(2148871172) set_type(2148871172, 'void Theme_Shrine__Fi(int t)') del_items(2148871404) set_type(2148871404, 'void Theme_MonstPit__Fi(int t)') del_items(2148871736) set_type(2148871736, 'void Theme_SkelRoom__Fi(int t)') del_items(2148872508) set_type(2148872508, 'void Theme_Treasure__Fi(int t)') del_items(2148873148) set_type(2148873148, 'void Theme_Library__Fi(int t)') del_items(2148873772) set_type(2148873772, 'void Theme_Torture__Fi(int t)') del_items(2148874172) set_type(2148874172, 'void Theme_BloodFountain__Fi(int t)') del_items(2148874288) set_type(2148874288, 'void Theme_Decap__Fi(int t)') del_items(2148874688) set_type(2148874688, 'void Theme_PurifyingFountain__Fi(int t)') del_items(2148874804) set_type(2148874804, 'void Theme_ArmorStand__Fi(int t)') del_items(2148875244) set_type(2148875244, 'void Theme_GoatShrine__Fi(int t)') del_items(2148875612) set_type(2148875612, 'void Theme_Cauldron__Fi(int t)') del_items(2148875728) set_type(2148875728, 'void Theme_MurkyFountain__Fi(int t)') del_items(2148875844) set_type(2148875844, 'void Theme_TearFountain__Fi(int t)') del_items(2148875960) set_type(2148875960, 'void Theme_BrnCross__Fi(int t)') del_items(2148876368) set_type(2148876368, 'void Theme_WeaponRack__Fi(int t)') del_items(2148876808) set_type(2148876808, 'void UpdateL4Trans__Fv()') del_items(2148876904) set_type(2148876904, 'void CreateThemeRooms__Fv()') del_items(2148877424) set_type(2148877424, 'void InitPortals__Fv()') del_items(2148877520) set_type(2148877520, 'void InitQuests__Fv()') del_items(2148878548) set_type(2148878548, 'void DrawButcher__Fv()') del_items(2148878616) set_type(2148878616, 'void DrawSkelKing__Fiii(int q, int x, int y)') del_items(2148878756) set_type(2148878756, 'void DrawWarLord__Fii(int x, int y)') del_items(2148879120) set_type(2148879120, 'void DrawSChamber__Fiii(int q, int x, int y)') del_items(2148879584) set_type(2148879584, 'void DrawLTBanner__Fii(int x, int y)') del_items(2148879908) set_type(2148879908, 'void DrawBlind__Fii(int x, int y)') del_items(2148880232) set_type(2148880232, 'void DrawBlood__Fii(int x, int y)') del_items(2148880560) set_type(2148880560, 'void DRLG_CheckQuests__Fii(int x, int y)') del_items(2148880876) set_type(2148880876, 'void InitInv__Fv()') del_items(2148880972) set_type(2148880972, 'void InitAutomap__Fv()') del_items(2148881424) set_type(2148881424, 'void InitAutomapOnce__Fv()') del_items(2148881440) set_type(2148881440, 'unsigned char MonstPlace__Fii(int xp, int yp)') del_items(2148881628) set_type(2148881628, 'void InitMonsterGFX__Fi(int monst)') del_items(2148881892) set_type(2148881892, 'void PlaceMonster__Fiiii(int i, int mtype, int x, int y)') del_items(2148882052) set_type(2148882052, 'int AddMonsterType__Fii(int type, int placeflag)') del_items(2148882360) set_type(2148882360, 'void GetMonsterTypes__FUl(unsigned long QuestMask)') del_items(2148882536) set_type(2148882536, 'void ClrAllMonsters__Fv()') del_items(2148882856) set_type(2148882856, 'void InitLevelMonsters__Fv()') del_items(2148882988) set_type(2148882988, 'void GetLevelMTypes__Fv()') del_items(2148884084) set_type(2148884084, 'void PlaceQuestMonsters__Fv()') del_items(2148885132) set_type(2148885132, 'void LoadDiabMonsts__Fv()') del_items(2148885404) set_type(2148885404, 'void PlaceGroup__FiiUci(int mtype, int num, unsigned char leaderf, int leader)') del_items(2148886956) set_type(2148886956, 'void SetMapMonsters__FPUcii(unsigned char *pMap, int startx, int starty)') del_items(2148887504) set_type(2148887504, 'void InitMonsters__Fv()') del_items(2148888492) set_type(2148888492, 'void PlaceUniqueMonst__Fiii(int uniqindex, int miniontype, int unpackfilesize)') del_items(2148890572) set_type(2148890572, 'void PlaceUniques__Fv()') del_items(2148891024) set_type(2148891024, 'int PreSpawnSkeleton__Fv()') del_items(2148891384) set_type(2148891384, 'int encode_enemy__Fi(int m)') del_items(2148891472) set_type(2148891472, 'void decode_enemy__Fii(int m, int enemy)') del_items(2148891752) set_type(2148891752, 'unsigned char IsGoat__Fi(int mt)') del_items(2148891796) set_type(2148891796, 'void InitMissiles__Fv()') del_items(2148892336) set_type(2148892336, 'void InitNoTriggers__Fv()') del_items(2148892372) set_type(2148892372, 'void InitTownTriggers__Fv()') del_items(2148893236) set_type(2148893236, 'void InitL1Triggers__Fv()') del_items(2148893512) set_type(2148893512, 'void InitL2Triggers__Fv()') del_items(2148893912) set_type(2148893912, 'void InitL3Triggers__Fv()') del_items(2148894260) set_type(2148894260, 'void InitL4Triggers__Fv()') del_items(2148894792) set_type(2148894792, 'void InitSKingTriggers__Fv()') del_items(2148894868) set_type(2148894868, 'void InitSChambTriggers__Fv()') del_items(2148894944) set_type(2148894944, 'void InitPWaterTriggers__Fv()') del_items(2148895020) set_type(2148895020, 'void InitVPTriggers__Fv()') del_items(2148895096) set_type(2148895096, 'void InitStores__Fv()') del_items(2148895224) set_type(2148895224, 'void SetupTownStores__Fv()') del_items(2148895656) set_type(2148895656, 'void DeltaLoadLevel__Fv()') del_items(2148898856) set_type(2148898856, 'unsigned char SmithItemOk__Fi(int i)') del_items(2148898956) set_type(2148898956, 'int RndSmithItem__Fi(int lvl)') del_items(2148899224) set_type(2148899224, 'unsigned char WitchItemOk__Fi(int i)') del_items(2148899544) set_type(2148899544, 'int RndWitchItem__Fi(int lvl)') del_items(2148899800) set_type(2148899800, 'void BubbleSwapItem__FP10ItemStructT0(struct ItemStruct *a, struct ItemStruct *b)') del_items(2148900028) set_type(2148900028, 'void SortWitch__Fv()') del_items(2148900316) set_type(2148900316, 'int RndBoyItem__Fi(int lvl)') del_items(2148900608) set_type(2148900608, 'unsigned char HealerItemOk__Fi(int i)') del_items(2148901044) set_type(2148901044, 'int RndHealerItem__Fi(int lvl)') del_items(2148901300) set_type(2148901300, 'void RecreatePremiumItem__Fiiii(int ii, int idx, int plvl, int iseed)') del_items(2148901500) set_type(2148901500, 'void RecreateWitchItem__Fiiii(int ii, int idx, int lvl, int iseed)') del_items(2148901844) set_type(2148901844, 'void RecreateSmithItem__Fiiii(int ii, int idx, int lvl, int iseed)') del_items(2148902000) set_type(2148902000, 'void RecreateHealerItem__Fiiii(int ii, int idx, int lvl, int iseed)') del_items(2148902192) set_type(2148902192, 'void RecreateBoyItem__Fiiii(int ii, int idx, int lvl, int iseed)') del_items(2148902388) set_type(2148902388, 'void RecreateTownItem__FiiUsii(int ii, int idx, unsigned short icreateinfo, int iseed, int ivalue)') del_items(2148902528) set_type(2148902528, 'void SpawnSmith__Fi(int lvl)') del_items(2148902940) set_type(2148902940, 'void SpawnWitch__Fi(int lvl)') del_items(2148903816) set_type(2148903816, 'void SpawnHealer__Fi(int lvl)') del_items(2148904612) set_type(2148904612, 'void SpawnBoy__Fi(int lvl)') del_items(2148904952) set_type(2148904952, 'void SortSmith__Fv()') del_items(2148905228) set_type(2148905228, 'void SortHealer__Fv()') del_items(2148905516) set_type(2148905516, 'void RecreateItem__FiiUsii(int ii, int idx, unsigned short icreateinfo, int iseed, int ivalue)')
# -*- coding: utf-8 -*- description = "Gauss meter setup" group = "optional" tango_base = "tango://phys.maria.frm2:10000/maria" devices = dict( field = device("nicos.devices.entangle.AnalogInput", description = "Lakeshore LS455, DSP Gauss Meter", tangodevice = tango_base + "/ls455/field", ), )
description = 'Gauss meter setup' group = 'optional' tango_base = 'tango://phys.maria.frm2:10000/maria' devices = dict(field=device('nicos.devices.entangle.AnalogInput', description='Lakeshore LS455, DSP Gauss Meter', tangodevice=tango_base + '/ls455/field'))
#x+x^2/2!+x^3/3!+x^4/4!...... x=int(input("Enter a number ")) n=int(input("Enter number of terms in the series ")) sum=0 fact=1 for y in range(1,n+1): fact=fact*y sum=sum+pow(x,y)/fact print(sum)
x = int(input('Enter a number ')) n = int(input('Enter number of terms in the series ')) sum = 0 fact = 1 for y in range(1, n + 1): fact = fact * y sum = sum + pow(x, y) / fact print(sum)
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def minDiffInBST(self, root: TreeNode) -> int: def inorder(node): if node: inorder(node.left) vals.append(node.val) inorder(node.right) vals = [] inorder(root) return min(b - a for a, b in zip(vals, vals[1:]))
class Solution: def min_diff_in_bst(self, root: TreeNode) -> int: def inorder(node): if node: inorder(node.left) vals.append(node.val) inorder(node.right) vals = [] inorder(root) return min((b - a for (a, b) in zip(vals, vals[1:])))
# -*- coding: utf-8 -*- ''' torstack.config.builder config builder definition. :copyright: (c) 2018 by longniao <longniao@gmail.com> :license: MIT, see LICENSE for more details. '''
""" torstack.config.builder config builder definition. :copyright: (c) 2018 by longniao <longniao@gmail.com> :license: MIT, see LICENSE for more details. """
class StaticPoliceBaseError(Exception): pass class StaticPoliceBaseNotice(Exception): pass # # Generic errors # class FunctionNotFoundError(StaticPoliceBaseError): pass class StaticPoliceTypeError(StaticPoliceBaseError): pass class StaticPoliceKeyNotFoundError(StaticPoliceBaseError): pass # # Policy notices # class PolicySkipFunctionNotice(StaticPoliceBaseNotice): pass
class Staticpolicebaseerror(Exception): pass class Staticpolicebasenotice(Exception): pass class Functionnotfounderror(StaticPoliceBaseError): pass class Staticpolicetypeerror(StaticPoliceBaseError): pass class Staticpolicekeynotfounderror(StaticPoliceBaseError): pass class Policyskipfunctionnotice(StaticPoliceBaseNotice): pass
class Config(object): '''parent configuration file''' DEBUG = True SECRET_KEY = 'hardtoguess' ENV = 'development' TESTING = False class DevelopmentConfig(Config): DEBUG = True url = "dbname = 'stackoverflow_db' user = 'postgres' host = 'localhost' port = '5432' password = 'admin'" class TestingConfig(Config): DEBUG = True TESTING = True url = "dbname = 'test_db' user = 'postgres' host = 'localhost' port = '5432' password = 'admin'" class StaginConfig(Config): DEBUG = True class ProductionConfig(Config): DEBUG = False TESTING = False app_config = { 'development': DevelopmentConfig, 'testing': TestingConfig, 'staging': StaginConfig, 'production': ProductionConfig } db_url = DevelopmentConfig.url test_url = TestingConfig.url secret_key = Config.SECRET_KEY
class Config(object): """parent configuration file""" debug = True secret_key = 'hardtoguess' env = 'development' testing = False class Developmentconfig(Config): debug = True url = "dbname = 'stackoverflow_db' user = 'postgres' host = 'localhost' port = '5432' password = 'admin'" class Testingconfig(Config): debug = True testing = True url = "dbname = 'test_db' user = 'postgres' host = 'localhost' port = '5432' password = 'admin'" class Staginconfig(Config): debug = True class Productionconfig(Config): debug = False testing = False app_config = {'development': DevelopmentConfig, 'testing': TestingConfig, 'staging': StaginConfig, 'production': ProductionConfig} db_url = DevelopmentConfig.url test_url = TestingConfig.url secret_key = Config.SECRET_KEY
{ 'targets': [ { 'target_name': 'sophia', 'product_prefix': 'lib', 'type': 'static_library', 'include_dirs': ['db'], 'link_settings': { 'libraries': ['-lpthread'], }, 'direct_dependent_settings': { 'include_dirs': ['db'], }, 'sources': [ 'db/cat.c', 'db/crc.c', 'db/cursor.c', 'db/e.c', 'db/file.c', 'db/gc.c', 'db/i.c', 'db/merge.c', 'db/recover.c', 'db/rep.c', 'db/sp.c', 'db/util.c', ], }, ], }
{'targets': [{'target_name': 'sophia', 'product_prefix': 'lib', 'type': 'static_library', 'include_dirs': ['db'], 'link_settings': {'libraries': ['-lpthread']}, 'direct_dependent_settings': {'include_dirs': ['db']}, 'sources': ['db/cat.c', 'db/crc.c', 'db/cursor.c', 'db/e.c', 'db/file.c', 'db/gc.c', 'db/i.c', 'db/merge.c', 'db/recover.c', 'db/rep.c', 'db/sp.c', 'db/util.c']}]}
''' Leetcode problem No 416 Parition Equal Subset Sum Solution written by Xuqiang Fang on 4 April ''' class Solution(object): def canPartition(self, nums): s = 0; for i in nums: s += i if((s & 1) == 1): return False s >>= 1 dp = [0]*(s+1) dp[0] = 1 for i in range(len(nums)): for j in range(s,nums[i]-1,-1): dp[j] += dp[j-nums[i]] if(dp[s] == 0): return False else: return True def main(): nums = [1,5,11,5] s = Solution() print(s.canPartition(nums)) print(s.canPartition([1,2,3,5])) main()
""" Leetcode problem No 416 Parition Equal Subset Sum Solution written by Xuqiang Fang on 4 April """ class Solution(object): def can_partition(self, nums): s = 0 for i in nums: s += i if s & 1 == 1: return False s >>= 1 dp = [0] * (s + 1) dp[0] = 1 for i in range(len(nums)): for j in range(s, nums[i] - 1, -1): dp[j] += dp[j - nums[i]] if dp[s] == 0: return False else: return True def main(): nums = [1, 5, 11, 5] s = solution() print(s.canPartition(nums)) print(s.canPartition([1, 2, 3, 5])) main()
print('b') for i in range(2): print(i)
print('b') for i in range(2): print(i)
string = 'hehhhEhehehehehHHHHeeeeHHHehHHHeh' # string = string.replace('h', 'H', string.count('h') - 1).replace('H', 'h',1) # print(string) string1 = string[:string.find('h') + 1] string2 = string[string.rfind('h'):] string3 = string[string.find('h') + 1:string.rfind('h')] string3 = string3.replace('h', 'H') print(string1) print(string2) print(string3) print(string1 + string3 + string2)
string = 'hehhhEhehehehehHHHHeeeeHHHehHHHeh' string1 = string[:string.find('h') + 1] string2 = string[string.rfind('h'):] string3 = string[string.find('h') + 1:string.rfind('h')] string3 = string3.replace('h', 'H') print(string1) print(string2) print(string3) print(string1 + string3 + string2)
while True: cont=int(input(" ")) if(cont==2002): print("Acceso Permitido") break else: print("Acceso Denegado")
while True: cont = int(input(' ')) if cont == 2002: print('Acceso Permitido') break else: print('Acceso Denegado')
class HondaInputOutputController: def __init__(self, send_func): self.send = send_func def left_turn_signal(self, on): if on: msg = b"\x30\x0a\x0f\x00\x00\x00\x00\x00" else: msg = b"\x20" self.send(0x16f118f0, msg) def right_turn_signal(self, on): if on: msg = b"\x30\x0b\x0f\x00\x00\x00\x00\x00" else: msg = b"\x20" self.send(0x16f118f0, msg) def hazard_lights(self, on): if on: msg = b"\x30\x08\x0f\x00\x00\x00\x00\x00" else: msg = b"\x20" self.send(0x16f118f0, msg) def parking_lights(self, on): if on: msg = b"\x30\x25\x0f\x00\x00\x00\x00\x00" else: msg = b"\x20" self.send(0x16f118f0, msg) def headlight_low_beams(self, on): if on: msg = b"\x30\x1c\x0f\x00\x00\x00\x00\x00" else: msg = b"\x20" self.send(0x16f118f0, msg) def headlight_high_beams(self, on): if on: msg = b"\x30\x1d\x0f\x00\x00\x00\x00\x00" else: msg = b"\x20" self.send(0x16f118f0, msg) def front_fog_lights(self, on): if on: msg = b"\x30\x20\x0f\x00\x00\x00\x00\x00" else: msg = b"\x20" self.send(0x16f118f0, msg) def daytime_running_lights(self, on): if on: msg = b"\x30\x36\x0f\x00\x00\x00\x00\x00" else: msg = b"\x20" self.send(0x16f118f0, msg) def lock_all_doors(self): self.send(0x16f118f0, b"\x30\x04\x01\x00\x00\x00\x00\x00") def unlock_all_doors(self): self.send(0x16f118f0, b"\x30\x05\x01\x00\x00\x00\x00\x00") def unlock_all_doors_alt(self): self.send(0x16f118f0, b"\x30\x06\x01\x00\x00\x00\x00\x00") def trunk_release(self): self.send(0x16f118f0, b"\x30\x09\x01\x00\x00\x00\x00\x00") def front_wipers_slow(self, on): if on: msg = b"\x30\x19\x05\x00\x00\x00\x00\x00" else: msg = b"\x20" self.send(0x16f118f0, msg) def front_wipers_fast(self, on): if on: msg = b"\x30\x1a\x05\x00\x00\x00\x00\x00" else: msg = b"\x20" self.send(0x16f118f0, msg) def front_washer_pump(self, on): if on: msg = b"\x30\x1b\x05\x00\x00\x00\x00\x00" else: msg = b"\x20" self.send(0x16f118f0, msg) def rear_wiper(self, on): if on: msg = b"\x30\x0d\x05\x00\x00\x00\x00\x00" else: msg = b"\x20" self.send(0x16f118f0, msg) def rear_washer_pump(self, on): if on: msg = b"\x30\x0e\x05\x00\x00\x00\x00\x00" else: msg = b"\x20" self.send(0x16f118f0, msg) def left_blindspot_flash(self, on): if on: msg = b"\x30\x01\x08\x00\x00\x00\x00\x00" else: msg = b"\x20" self.send(0x16f19ff0, msg) def right_blindspot_flash(self, on): if on: msg = b"\x30\x01\x08\x00\x00\x00\x00\x00" else: msg = b"\x20" self.send(0x16f1a7f0, msg)
class Hondainputoutputcontroller: def __init__(self, send_func): self.send = send_func def left_turn_signal(self, on): if on: msg = b'0\n\x0f\x00\x00\x00\x00\x00' else: msg = b' ' self.send(384899312, msg) def right_turn_signal(self, on): if on: msg = b'0\x0b\x0f\x00\x00\x00\x00\x00' else: msg = b' ' self.send(384899312, msg) def hazard_lights(self, on): if on: msg = b'0\x08\x0f\x00\x00\x00\x00\x00' else: msg = b' ' self.send(384899312, msg) def parking_lights(self, on): if on: msg = b'0%\x0f\x00\x00\x00\x00\x00' else: msg = b' ' self.send(384899312, msg) def headlight_low_beams(self, on): if on: msg = b'0\x1c\x0f\x00\x00\x00\x00\x00' else: msg = b' ' self.send(384899312, msg) def headlight_high_beams(self, on): if on: msg = b'0\x1d\x0f\x00\x00\x00\x00\x00' else: msg = b' ' self.send(384899312, msg) def front_fog_lights(self, on): if on: msg = b'0 \x0f\x00\x00\x00\x00\x00' else: msg = b' ' self.send(384899312, msg) def daytime_running_lights(self, on): if on: msg = b'06\x0f\x00\x00\x00\x00\x00' else: msg = b' ' self.send(384899312, msg) def lock_all_doors(self): self.send(384899312, b'0\x04\x01\x00\x00\x00\x00\x00') def unlock_all_doors(self): self.send(384899312, b'0\x05\x01\x00\x00\x00\x00\x00') def unlock_all_doors_alt(self): self.send(384899312, b'0\x06\x01\x00\x00\x00\x00\x00') def trunk_release(self): self.send(384899312, b'0\t\x01\x00\x00\x00\x00\x00') def front_wipers_slow(self, on): if on: msg = b'0\x19\x05\x00\x00\x00\x00\x00' else: msg = b' ' self.send(384899312, msg) def front_wipers_fast(self, on): if on: msg = b'0\x1a\x05\x00\x00\x00\x00\x00' else: msg = b' ' self.send(384899312, msg) def front_washer_pump(self, on): if on: msg = b'0\x1b\x05\x00\x00\x00\x00\x00' else: msg = b' ' self.send(384899312, msg) def rear_wiper(self, on): if on: msg = b'0\r\x05\x00\x00\x00\x00\x00' else: msg = b' ' self.send(384899312, msg) def rear_washer_pump(self, on): if on: msg = b'0\x0e\x05\x00\x00\x00\x00\x00' else: msg = b' ' self.send(384899312, msg) def left_blindspot_flash(self, on): if on: msg = b'0\x01\x08\x00\x00\x00\x00\x00' else: msg = b' ' self.send(384933872, msg) def right_blindspot_flash(self, on): if on: msg = b'0\x01\x08\x00\x00\x00\x00\x00' else: msg = b' ' self.send(384935920, msg)
#!/usr/bin/env python # ############################################################################### # Author: Greg Zynda # Last Modified: 12/09/2019 ############################################################################### # BSD 3-Clause License # # Copyright (c) 2019, Greg Zynda # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. # # * Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # * Neither the name of the copyright holder nor the names of its # contributors may be used to endorse or promote products derived from # this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ############################################################################### FORMAT = "[%(levelname)s - %(filename)s:%(lineno)s - %(funcName)15s] %(message)s" BaseIndex = {'A':0, 'T':1, 'G':2, 'C':3, \ 0:'A', 1:'T', 2:'G', 3:'C'} def main(): pass if __name__ == "__main__": main()
format = '[%(levelname)s - %(filename)s:%(lineno)s - %(funcName)15s] %(message)s' base_index = {'A': 0, 'T': 1, 'G': 2, 'C': 3, 0: 'A', 1: 'T', 2: 'G', 3: 'C'} def main(): pass if __name__ == '__main__': main()
def average(array): array = set(array) sumN = 0 for x in array: sumN = sumN + x return(sumN/len(array))
def average(array): array = set(array) sum_n = 0 for x in array: sum_n = sumN + x return sumN / len(array)
# Using Sorting # Overall complexity: O(n log n ) as sorted() has that complexity def unique2(S): temp = sorted(S) for j in range(1, len(S)): # O(n) if temp[j-1] == temp[j]: # O(1) return False return True if __name__ == "__main__": a1 = [1, 2, 3, 5, 7, 9, 4] print("The elements of {} are {}".format(a1, 'unique' if unique2(a1) else 'not unique')) a2 = [1, 2, 3, 5, 7, 9, 1] print("The elements of {} are {}".format(a2, 'unique' if unique2(a2) else 'not unique'))
def unique2(S): temp = sorted(S) for j in range(1, len(S)): if temp[j - 1] == temp[j]: return False return True if __name__ == '__main__': a1 = [1, 2, 3, 5, 7, 9, 4] print('The elements of {} are {}'.format(a1, 'unique' if unique2(a1) else 'not unique')) a2 = [1, 2, 3, 5, 7, 9, 1] print('The elements of {} are {}'.format(a2, 'unique' if unique2(a2) else 'not unique'))
def get_city_year(p0,perc,delta,target): years = 0 if p0 * (perc/100) + delta <= 0: return -1 while p0 < target: p0 = p0 + p0 * (perc/100) + delta years += 1 return years # a = int(input("Input current population:")) # b = float(input("Input percentage increase:")) # c = int(input("Input delta:")) # d = int(input("Input future population:")) # print(get_city_year(a,b,c,d)) print(get_city_year(1000, 2, -50, 5000)) print(get_city_year(1500, 5, 100, 5000)) print(get_city_year(1500000, 2.5, 10000, 2000000))
def get_city_year(p0, perc, delta, target): years = 0 if p0 * (perc / 100) + delta <= 0: return -1 while p0 < target: p0 = p0 + p0 * (perc / 100) + delta years += 1 return years print(get_city_year(1000, 2, -50, 5000)) print(get_city_year(1500, 5, 100, 5000)) print(get_city_year(1500000, 2.5, 10000, 2000000))
class Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: map = { } for i in range(len(nums)): if target - nums[i] in map: return [map[target - nums[i]] , i] else: map[nums[i]] = i
class Solution: def two_sum(self, nums: List[int], target: int) -> List[int]: map = {} for i in range(len(nums)): if target - nums[i] in map: return [map[target - nums[i]], i] else: map[nums[i]] = i
def rectangle(width, height): answer = width * height answer = int(answer) return answer print(rectangle(int(input()), int(input())))
def rectangle(width, height): answer = width * height answer = int(answer) return answer print(rectangle(int(input()), int(input())))
a=int(input("Enter the number:")) if a %2 == 0: print('Number is Even') else: print("Number is Odd")
a = int(input('Enter the number:')) if a % 2 == 0: print('Number is Even') else: print('Number is Odd')
expected_output = { "src":{ "31.1.1.2":{ "dest":{ "31.1.1.1":{ "interface":"GigabitEthernet0/0/0/0", "location":"0/0/CPU0", "session":{ "state":"UP", "duration":"0d:0h:5m:50s", "num_of_times_up":1, "type":"PR/V4/SH", "owner_info":{ "ipv4_static":{ "desired_interval_ms":500, "desired_multiplier":6, "adjusted_interval_ms":500, "adjusted_multiplier":6 } } }, "received_parameters":{ "version":1, "desired_tx_interval_ms":500, "required_rx_interval_ms":500, "required_echo_rx_interval_ms":0, "multiplier":6, "diag":"None", "demand_bit":0, "final_bit":0, "poll_bit":0, "control_bit":1, "authentication_bit":0, "my_discr":18, "your_discr":2148532226, "state":"UP" }, "transmitted_parameters":{ "version":1, "desired_tx_interval_ms":500, "required_rx_interval_ms":500, "required_echo_rx_interval_ms":1, "multiplier":6, "diag":"None", "demand_bit":0, "final_bit":0, "poll_bit":0, "control_bit":1, "authentication_bit":0, "my_discr":2148532226, "your_discr":18, "state":"UP" }, "timer_vals":{ "local_async_tx_interval_ms":500, "remote_async_tx_interval_ms":500, "desired_echo_tx_interval_ms":500, "local_echo_tax_interval_ms":0, "echo_detection_time_ms":0, "async_detection_time_ms":3000 }, "local_stats":{ "interval_async_packets":{ "Tx":{ "num_intervals":100, "min_ms":1, "max_ms":500, "avg_ms":229, "last_packet_transmitted_ms_ago":48 }, "Rx":{ "num_intervals":100, "min_ms":490, "max_ms":513, "avg_ms":500, "last_packet_received_ms_ago":304 } }, "interval_echo_packets":{ "Tx":{ "num_intervals":0, "min_ms":0, "max_ms":0, "avg_ms":0, "last_packet_transmitted_ms_ago":0 }, "Rx":{ "num_intervals":0, "min_ms":0, "max_ms":0, "avg_ms":0, "last_packet_received_ms_ago":0 } }, "latency_of_echo_packets":{ "num_of_packets":0, "min_ms":0, "max_ms":0, "avg_ms":0 } } } } } } }
expected_output = {'src': {'31.1.1.2': {'dest': {'31.1.1.1': {'interface': 'GigabitEthernet0/0/0/0', 'location': '0/0/CPU0', 'session': {'state': 'UP', 'duration': '0d:0h:5m:50s', 'num_of_times_up': 1, 'type': 'PR/V4/SH', 'owner_info': {'ipv4_static': {'desired_interval_ms': 500, 'desired_multiplier': 6, 'adjusted_interval_ms': 500, 'adjusted_multiplier': 6}}}, 'received_parameters': {'version': 1, 'desired_tx_interval_ms': 500, 'required_rx_interval_ms': 500, 'required_echo_rx_interval_ms': 0, 'multiplier': 6, 'diag': 'None', 'demand_bit': 0, 'final_bit': 0, 'poll_bit': 0, 'control_bit': 1, 'authentication_bit': 0, 'my_discr': 18, 'your_discr': 2148532226, 'state': 'UP'}, 'transmitted_parameters': {'version': 1, 'desired_tx_interval_ms': 500, 'required_rx_interval_ms': 500, 'required_echo_rx_interval_ms': 1, 'multiplier': 6, 'diag': 'None', 'demand_bit': 0, 'final_bit': 0, 'poll_bit': 0, 'control_bit': 1, 'authentication_bit': 0, 'my_discr': 2148532226, 'your_discr': 18, 'state': 'UP'}, 'timer_vals': {'local_async_tx_interval_ms': 500, 'remote_async_tx_interval_ms': 500, 'desired_echo_tx_interval_ms': 500, 'local_echo_tax_interval_ms': 0, 'echo_detection_time_ms': 0, 'async_detection_time_ms': 3000}, 'local_stats': {'interval_async_packets': {'Tx': {'num_intervals': 100, 'min_ms': 1, 'max_ms': 500, 'avg_ms': 229, 'last_packet_transmitted_ms_ago': 48}, 'Rx': {'num_intervals': 100, 'min_ms': 490, 'max_ms': 513, 'avg_ms': 500, 'last_packet_received_ms_ago': 304}}, 'interval_echo_packets': {'Tx': {'num_intervals': 0, 'min_ms': 0, 'max_ms': 0, 'avg_ms': 0, 'last_packet_transmitted_ms_ago': 0}, 'Rx': {'num_intervals': 0, 'min_ms': 0, 'max_ms': 0, 'avg_ms': 0, 'last_packet_received_ms_ago': 0}}, 'latency_of_echo_packets': {'num_of_packets': 0, 'min_ms': 0, 'max_ms': 0, 'avg_ms': 0}}}}}}}
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, 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. __all__ = [ 'TIMER_ENABLED_LOG_LINE', 'TIMER_DISABLED_LOG_LINE' ] # Integration tests look for these loglines to validate timer enable/disable TIMER_ENABLED_LOG_LINE = 'Timer is enabled.' TIMER_DISABLED_LOG_LINE = 'Timer is disabled.'
__all__ = ['TIMER_ENABLED_LOG_LINE', 'TIMER_DISABLED_LOG_LINE'] timer_enabled_log_line = 'Timer is enabled.' timer_disabled_log_line = 'Timer is disabled.'
REDIS_OPTIONS = {'db': 0} TEST_REDIS_OPTIONS = {'db': 0} DEBUG = False LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'default': { 'level': 'INFO', 'class': 'logging.StreamHandler', }, }, 'loggers': { 'aiohttp.access': { 'handlers': ['default'], 'level': 'INFO', }, 'aiohttp.server': { 'handlers': ['default'], 'level': 'INFO', }, } }
redis_options = {'db': 0} test_redis_options = {'db': 0} debug = False logging = {'version': 1, 'disable_existing_loggers': False, 'handlers': {'default': {'level': 'INFO', 'class': 'logging.StreamHandler'}}, 'loggers': {'aiohttp.access': {'handlers': ['default'], 'level': 'INFO'}, 'aiohttp.server': {'handlers': ['default'], 'level': 'INFO'}}}
# p41.py def find_n(n): if n == 1: return 1 elif n/2 == int(n/2): return find_n(n/2) else: return find_n(n-1) + 1 num1 = int(input()) print(find_n(num1))
def find_n(n): if n == 1: return 1 elif n / 2 == int(n / 2): return find_n(n / 2) else: return find_n(n - 1) + 1 num1 = int(input()) print(find_n(num1))
nome = str(input('Digite o seu nome: ')) dividido = nome.split() print('='*25) print(nome.upper()) print(nome.lower()) print('O seu nome tem {} letras.'.format(len(''.join(dividido)))) print('O seu primeiro nome tem {} letras.'.format(len(dividido[0]))) print('='*25)
nome = str(input('Digite o seu nome: ')) dividido = nome.split() print('=' * 25) print(nome.upper()) print(nome.lower()) print('O seu nome tem {} letras.'.format(len(''.join(dividido)))) print('O seu primeiro nome tem {} letras.'.format(len(dividido[0]))) print('=' * 25)
height_map = ["".join(["9", line.rstrip(), "9"]) for line in open("input.txt", "r")] height_map.insert(0, len(height_map[0])*"9") height_map.append( len(height_map[0])*"9") len_x, len_y = len(height_map), len(height_map[0]) risk_level_sum = 0 for x in range(1, len_x-1): for y in range(1, len_y-1): height = height_map[x][y] if height_map[x-1][y ] > height and \ height_map[x ][y+1] > height and \ height_map[x+1][y ] > height and \ height_map[x ][y-1] > height: risk_level_sum += (int(height) + 1) print(risk_level_sum)
height_map = [''.join(['9', line.rstrip(), '9']) for line in open('input.txt', 'r')] height_map.insert(0, len(height_map[0]) * '9') height_map.append(len(height_map[0]) * '9') (len_x, len_y) = (len(height_map), len(height_map[0])) risk_level_sum = 0 for x in range(1, len_x - 1): for y in range(1, len_y - 1): height = height_map[x][y] if height_map[x - 1][y] > height and height_map[x][y + 1] > height and (height_map[x + 1][y] > height) and (height_map[x][y - 1] > height): risk_level_sum += int(height) + 1 print(risk_level_sum)
def encode(message): a = [message[0]] b = [] count = 0 message+="1" for x in message[1:]: if a[-1] == x: count+=1 else: count+=1 b.append((a[-1],count)) count = 0 a.append(x) encoded_message = "" for x,y in b: encoded_message += str(y)+str(x) return encoded_message #Provide different values for message and test your program encoded_message=encode("ABBBBCCCCCCCCAB") print(encoded_message)
def encode(message): a = [message[0]] b = [] count = 0 message += '1' for x in message[1:]: if a[-1] == x: count += 1 else: count += 1 b.append((a[-1], count)) count = 0 a.append(x) encoded_message = '' for (x, y) in b: encoded_message += str(y) + str(x) return encoded_message encoded_message = encode('ABBBBCCCCCCCCAB') print(encoded_message)
class Student(object): def __init__(self, user_email): self.user_email = user_email def some_action(self): return "A student with " + self.user_email + " is attending a seminar" class Teacher(object): def __init__(self, user_email): self.user_email = user_email def some_action(self): return "A teacher with " + self.user_email + " is taking a seminar" class Administrator(object): def __init__(self, user_email): self.user_email = user_email def some_action(self): return "An administrator with " + self.user_email + \ " is arranging a seminar" class User(object): def __init__(self, user_email, user_type): self.user_email = user_email self.user_type = user_type.lower() def factory(self): if self.user_type == "student": return Student(user_email=self.user_email) elif self.user_type == "teacher": return Teacher(user_email=self.user_email) elif self.user_type == "administrator": return Administrator(user_email=self.user_email) raise ValueError("User type is not valid") if __name__ == '__main__': try: user1 = User("dummy1@example.com", "Student").factory() print(user1.some_action()) user2 = User("dummy2@example.com", "Teacher").factory() print(user2.some_action()) user3 = User("dummy3@example.com", "Administrator").factory() print(user3.some_action()) user4 = User("dummy4@example.com", "Guest").factory() print(user4.some_action()) except Exception as e: print(str(e))
class Student(object): def __init__(self, user_email): self.user_email = user_email def some_action(self): return 'A student with ' + self.user_email + ' is attending a seminar' class Teacher(object): def __init__(self, user_email): self.user_email = user_email def some_action(self): return 'A teacher with ' + self.user_email + ' is taking a seminar' class Administrator(object): def __init__(self, user_email): self.user_email = user_email def some_action(self): return 'An administrator with ' + self.user_email + ' is arranging a seminar' class User(object): def __init__(self, user_email, user_type): self.user_email = user_email self.user_type = user_type.lower() def factory(self): if self.user_type == 'student': return student(user_email=self.user_email) elif self.user_type == 'teacher': return teacher(user_email=self.user_email) elif self.user_type == 'administrator': return administrator(user_email=self.user_email) raise value_error('User type is not valid') if __name__ == '__main__': try: user1 = user('dummy1@example.com', 'Student').factory() print(user1.some_action()) user2 = user('dummy2@example.com', 'Teacher').factory() print(user2.some_action()) user3 = user('dummy3@example.com', 'Administrator').factory() print(user3.some_action()) user4 = user('dummy4@example.com', 'Guest').factory() print(user4.some_action()) except Exception as e: print(str(e))
def gcd(a,b): if a==0: return b elif b==0: return a elif b>a: return gcd(b,a) else: return gcd(b,a%b) t = int(input()) for i in range(t): n = int(input()) for j in range(n): l = list(map(int, input().split())) print(l)
def gcd(a, b): if a == 0: return b elif b == 0: return a elif b > a: return gcd(b, a) else: return gcd(b, a % b) t = int(input()) for i in range(t): n = int(input()) for j in range(n): l = list(map(int, input().split())) print(l)
# # @lc app=leetcode id=22 lang=python3 # # [22] Generate Parentheses # # @lc code=start class Solution: def generateParenthesis(self, n: int) -> List[str]: if n == 1: return ['()'] last_parenthesis = self.generateParenthesis(n - 1) stack = [] for parenthesis in last_parenthesis: for i in range(len(parenthesis)): if parenthesis[i] == ')': new_str = self.insertString(parenthesis, i, ')(') if not new_str in stack: stack.append(new_str) new_str = self.insertString(parenthesis, i, '()') if new_str not in stack: stack.append(new_str) new_str = self.insertString(parenthesis, i + 1, '()') if new_str not in stack: stack.append(new_str) return stack def insertString(self, s: str, index: int, c: str) -> str: if index >= len(s): return s + c return s[:index] + c + s[index:] # @lc code=end
class Solution: def generate_parenthesis(self, n: int) -> List[str]: if n == 1: return ['()'] last_parenthesis = self.generateParenthesis(n - 1) stack = [] for parenthesis in last_parenthesis: for i in range(len(parenthesis)): if parenthesis[i] == ')': new_str = self.insertString(parenthesis, i, ')(') if not new_str in stack: stack.append(new_str) new_str = self.insertString(parenthesis, i, '()') if new_str not in stack: stack.append(new_str) new_str = self.insertString(parenthesis, i + 1, '()') if new_str not in stack: stack.append(new_str) return stack def insert_string(self, s: str, index: int, c: str) -> str: if index >= len(s): return s + c return s[:index] + c + s[index:]
def bifurcate(lst, filter): return [ [x for i,x in enumerate(lst) if filter[i] == True], [x for i,x in enumerate(lst) if filter[i] == False] ] print(bifurcate(['beep', 'boop', 'foo', 'bar',], [True, True, False, True]))
def bifurcate(lst, filter): return [[x for (i, x) in enumerate(lst) if filter[i] == True], [x for (i, x) in enumerate(lst) if filter[i] == False]] print(bifurcate(['beep', 'boop', 'foo', 'bar'], [True, True, False, True]))
class SearchException(Exception): pass class SearchSyntaxError(SearchException): def __init__(self, msg, reason='Syntax error'): super(SearchSyntaxError, self).__init__(msg) self.reason = reason class UnknownField(SearchSyntaxError): pass class UnknownOperator(SearchSyntaxError): pass
class Searchexception(Exception): pass class Searchsyntaxerror(SearchException): def __init__(self, msg, reason='Syntax error'): super(SearchSyntaxError, self).__init__(msg) self.reason = reason class Unknownfield(SearchSyntaxError): pass class Unknownoperator(SearchSyntaxError): pass
counter = 0 def even_customers(): return counter%2==0 def incoming(): global counter counter+=1 def outgoing(): global counter if(counter > 0): counter-=1
counter = 0 def even_customers(): return counter % 2 == 0 def incoming(): global counter counter += 1 def outgoing(): global counter if counter > 0: counter -= 1
class NoDataException(Exception): pass class BadAuthorization(Exception): pass
class Nodataexception(Exception): pass class Badauthorization(Exception): pass
def generate_matrix(n): results = [[0 for i in range(n)] for i in range(n)] left = 0 right = n - 1 up = 0 down = n - 1 current_num = 1 while left < right and up < down: for i in range(left, right + 1): results[up][i] = current_num current_num += 1 for i in range(up + 1, down + 1): results[i][right] = current_num current_num += 1 for i in reversed(range(left, right)): results[down][i] = current_num current_num += 1 for i in reversed(range(up + 1, down)): results[i][left] = current_num current_num += 1 left += 1 right -= 1 up += 1 down -= 1 if up == down: for i in range(left, right + 1): results[up][i] = current_num current_num += 1 elif left == right: for i in range(up, down + 1): results[i][left] = current_num current_num += 1 return results if __name__ == '__main__': n_ = 4 results_ = generate_matrix(n_) for row in results_: print(row)
def generate_matrix(n): results = [[0 for i in range(n)] for i in range(n)] left = 0 right = n - 1 up = 0 down = n - 1 current_num = 1 while left < right and up < down: for i in range(left, right + 1): results[up][i] = current_num current_num += 1 for i in range(up + 1, down + 1): results[i][right] = current_num current_num += 1 for i in reversed(range(left, right)): results[down][i] = current_num current_num += 1 for i in reversed(range(up + 1, down)): results[i][left] = current_num current_num += 1 left += 1 right -= 1 up += 1 down -= 1 if up == down: for i in range(left, right + 1): results[up][i] = current_num current_num += 1 elif left == right: for i in range(up, down + 1): results[i][left] = current_num current_num += 1 return results if __name__ == '__main__': n_ = 4 results_ = generate_matrix(n_) for row in results_: print(row)
# Copyright 2017-2022 Lawrence Livermore National Security, LLC and other # Hatchet Project Developers. See the top-level LICENSE file for details. # # SPDX-License-Identifier: MIT dot_keywords = ["graph", "subgraph", "digraph", "node", "edge", "strict"]
dot_keywords = ['graph', 'subgraph', 'digraph', 'node', 'edge', 'strict']
price_of_one_shovel, denomination_of_special_coin = map(int, input().split()) number_of_coins = 0 while True: number_of_shovels1 = (10 * number_of_coins + denomination_of_special_coin) / price_of_one_shovel number_of_shovels2 = 10 * (number_of_coins + 1) / price_of_one_shovel if number_of_shovels1 % 1 == 0: print(int(number_of_shovels1)) break elif number_of_shovels2 % 1 == 0: print(int(number_of_shovels2)) break else: number_of_coins += 1
(price_of_one_shovel, denomination_of_special_coin) = map(int, input().split()) number_of_coins = 0 while True: number_of_shovels1 = (10 * number_of_coins + denomination_of_special_coin) / price_of_one_shovel number_of_shovels2 = 10 * (number_of_coins + 1) / price_of_one_shovel if number_of_shovels1 % 1 == 0: print(int(number_of_shovels1)) break elif number_of_shovels2 % 1 == 0: print(int(number_of_shovels2)) break else: number_of_coins += 1
# BSD 3-Clause License # # Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. # # * Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # * Neither the name of the psutil authors nor the names of its contributors # may be used to endorse or promote products derived from this software without # specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. def get_patrickstar_config( args, lr=0.001, betas=(0.9, 0.999), eps=1e-6, weight_decay=0 ): config = { # The same format as optimizer config of DeepSpeed # https://www.deepspeed.ai/docs/config-json/#optimizer-parameters "optimizer": { "type": "Adam", "params": { "lr": lr, "betas": betas, "eps": eps, "weight_decay": weight_decay, "use_hybrid_adam": args.use_hybrid_adam, }, }, "fp16": { "enabled": True, # Set "loss_scale" to 0 to use DynamicLossScaler. "loss_scale": 0, "initial_scale_power": args.init_loss_scale_power, "loss_scale_window": 1000, "hysteresis": 2, "min_loss_scale": 1, }, "default_chunk_size": args.default_chunk_size, "release_after_init": args.release_after_init, "use_fake_dist": args.use_fake_dist, "use_cpu_embedding": args.use_cpu_embedding, "client": { "mem_tracer": { "use_async_mem_monitor": args.with_async_mem_monitor, "warmup_gpu_chunk_mem_ratio": 0.1, "overall_gpu_mem_ratio": 0.9, "overall_cpu_mem_ratio": 0.9, "margin_use_ratio": 0.8, "use_fake_dist": False, "with_static_partition": args.with_static_partition, }, "opts": { "with_mem_saving_comm": args.with_mem_saving_comm, "with_mem_cache": args.with_mem_cache, "with_async_move": args.with_async_move, }, }, } return config
def get_patrickstar_config(args, lr=0.001, betas=(0.9, 0.999), eps=1e-06, weight_decay=0): config = {'optimizer': {'type': 'Adam', 'params': {'lr': lr, 'betas': betas, 'eps': eps, 'weight_decay': weight_decay, 'use_hybrid_adam': args.use_hybrid_adam}}, 'fp16': {'enabled': True, 'loss_scale': 0, 'initial_scale_power': args.init_loss_scale_power, 'loss_scale_window': 1000, 'hysteresis': 2, 'min_loss_scale': 1}, 'default_chunk_size': args.default_chunk_size, 'release_after_init': args.release_after_init, 'use_fake_dist': args.use_fake_dist, 'use_cpu_embedding': args.use_cpu_embedding, 'client': {'mem_tracer': {'use_async_mem_monitor': args.with_async_mem_monitor, 'warmup_gpu_chunk_mem_ratio': 0.1, 'overall_gpu_mem_ratio': 0.9, 'overall_cpu_mem_ratio': 0.9, 'margin_use_ratio': 0.8, 'use_fake_dist': False, 'with_static_partition': args.with_static_partition}, 'opts': {'with_mem_saving_comm': args.with_mem_saving_comm, 'with_mem_cache': args.with_mem_cache, 'with_async_move': args.with_async_move}}} return config
# https://leetcode.com/problems/defanging-an-ip-address/ ''' "1.1.1.1" "1[.]1[.]1[.]1" "255.100.50.0" "255[.]100[.]50[.]0" ''' def defang_ip_address(address): address_chars_list = [] for char in address: if char == '.': address_chars_list.append('[.]') else: address_chars_list.append(char) return ''.join(address_chars_list) data_tests = [ ("1.1.1.1", "1[.]1[.]1[.]1"), ("255.100.50.0", "255[.]100[.]50[.]0") ] for address, expected in data_tests: result = defang_ip_address(address) print(result, result == expected)
""" "1.1.1.1" "1[.]1[.]1[.]1" "255.100.50.0" "255[.]100[.]50[.]0" """ def defang_ip_address(address): address_chars_list = [] for char in address: if char == '.': address_chars_list.append('[.]') else: address_chars_list.append(char) return ''.join(address_chars_list) data_tests = [('1.1.1.1', '1[.]1[.]1[.]1'), ('255.100.50.0', '255[.]100[.]50[.]0')] for (address, expected) in data_tests: result = defang_ip_address(address) print(result, result == expected)
print("How old are you?",end=' ') age =input() print("How tell are you?",end=' ') height =input() print("How much do you weight?",end=' ') weight =input() print("So, you're %r old, %r tall and %r heavy."%(age, height, weight))
print('How old are you?', end=' ') age = input() print('How tell are you?', end=' ') height = input() print('How much do you weight?', end=' ') weight = input() print("So, you're %r old, %r tall and %r heavy." % (age, height, weight))
iterable = [1,2,3] iterator = iter(iterable) print( next(iterator) ) print( next(iterator) ) print( next(iterator) )
iterable = [1, 2, 3] iterator = iter(iterable) print(next(iterator)) print(next(iterator)) print(next(iterator))
fname = input('Enter the file name: ') try: fhand = open(fname) except: print('File cannot be opened:', fname) exit() lineslist=[] emaildict={} for line in fhand: lineslist = line.split() if line.startswith('From '): email=lineslist[1] if email not in emaildict: emaildict[email] = 1 else: emaildict[email] += 1 print (emaildict)
fname = input('Enter the file name: ') try: fhand = open(fname) except: print('File cannot be opened:', fname) exit() lineslist = [] emaildict = {} for line in fhand: lineslist = line.split() if line.startswith('From '): email = lineslist[1] if email not in emaildict: emaildict[email] = 1 else: emaildict[email] += 1 print(emaildict)
print("Kinjal Raykarmakar\nSec: CSE2H\tRoll: 29\n") base = int(input("Enter the length of the base: ")) height = int(input("Enter the length of the height: ")) print("The area of the triangle is:", 0.5 * base * height)
print('Kinjal Raykarmakar\nSec: CSE2H\tRoll: 29\n') base = int(input('Enter the length of the base: ')) height = int(input('Enter the length of the height: ')) print('The area of the triangle is:', 0.5 * base * height)
def determineTime(arr): totalSec = 0 for a in arr: (h, m, s) = a.split(':') totalSec += (int(h) * 3600 + int(m) * 60 + int(s)) return (24 * 60 * 60) > totalSec
def determine_time(arr): total_sec = 0 for a in arr: (h, m, s) = a.split(':') total_sec += int(h) * 3600 + int(m) * 60 + int(s) return 24 * 60 * 60 > totalSec
# average of elements: def average(): list_numbers = [25, 45, 12, 45, 85, 25] print("This is the given list of numbers: ") print(list_numbers) total = 0 for i in list_numbers: total += i total /= len(list_numbers) print(f"The average of the numbers are: {total}") average()
def average(): list_numbers = [25, 45, 12, 45, 85, 25] print('This is the given list of numbers: ') print(list_numbers) total = 0 for i in list_numbers: total += i total /= len(list_numbers) print(f'The average of the numbers are: {total}') average()
load("//:import_external.bzl", import_external = "safe_wix_scala_maven_import_external") def dependencies(): import_external( name = "org_codehaus_plexus_plexus_archiver", artifact = "org.codehaus.plexus:plexus-archiver:3.4", artifact_sha256 = "3c6611c98547dbf3f5125848c273ba719bc10df44e3f492fa2e302d6135a6ea5", srcjar_sha256 = "1887e8269928079236c9e1a75af5b5e256f4bfafaaed18da5c9c84faf5b26a91", deps = [ "@commons_io_commons_io", "@org_apache_commons_commons_compress", "@org_codehaus_plexus_plexus_io", "@org_codehaus_plexus_plexus_utils", "@org_iq80_snappy_snappy" ], runtime_deps = [ "@org_tukaani_xz" ], ) import_external( name = "org_codehaus_plexus_plexus_classworlds", artifact = "org.codehaus.plexus:plexus-classworlds:2.5.2", artifact_sha256 = "b2931d41740490a8d931cbe0cfe9ac20deb66cca606e679f52522f7f534c9fd7", srcjar_sha256 = "d087c4c0ff02b035111bb72c72603b2851d126c43da39cc3c73ff45139125bec", ) import_external( name = "org_codehaus_plexus_plexus_component_annotations", artifact = "org.codehaus.plexus:plexus-component-annotations:1.7.1", artifact_sha256 = "a7fee9435db716bff593e9fb5622bcf9f25e527196485929b0cd4065c43e61df", srcjar_sha256 = "18999359e8c1c5eb1f17a06093ceffc21f84b62b4ee0d9ab82f2e10d11049a78", excludes = [ "junit:junit", ], ) import_external( name = "org_codehaus_plexus_plexus_container_default", artifact = "org.codehaus.plexus:plexus-container-default:1.7.1", artifact_sha256 = "f3f61952d63675ef61b42fa4256c1635749a5bc17668b4529fccde0a29d8ee19", srcjar_sha256 = "4464c902148ed19381336e6fcf17e914dc895416953888bb049bdd4f7ef86b80", deps = [ "@com_google_collections_google_collections", "@org_apache_xbean_xbean_reflect", "@org_codehaus_plexus_plexus_classworlds", "@org_codehaus_plexus_plexus_utils" ], ) import_external( name = "org_codehaus_plexus_plexus_interpolation", artifact = "org.codehaus.plexus:plexus-interpolation:1.24", artifact_sha256 = "8fe2be04b067a75d02fb8a1a9caf6c1c8615f0d5577cced02e90b520763d2f77", srcjar_sha256 = "0b372b91236c4a2c63dc0d6b2010e10c98b993fc8491f6a02b73052a218b6644", ) import_external( name = "org_codehaus_plexus_plexus_io", artifact = "org.codehaus.plexus:plexus-io:2.7.1", artifact_sha256 = "20aa9dd74536ad9ce65d1253b5c4386747483a7a65c48008c9affb51854539cf", deps = [ "@commons_io_commons_io", "@org_codehaus_plexus_plexus_utils" ], ) import_external( name = "org_codehaus_plexus_plexus_utils", artifact = "org.codehaus.plexus:plexus-utils:3.1.0", artifact_sha256 = "0ffa0ad084ebff5712540a7b7ea0abda487c53d3a18f78c98d1a3675dab9bf61", srcjar_sha256 = "06eb127e188a940ebbcf340c43c95537c3052298acdc943a9b2ec2146c7238d9", ) import_external( name = "org_codehaus_plexus_plexus_velocity", artifact = "org.codehaus.plexus:plexus-velocity:1.1.8", artifact_sha256 = "36b3ea3d0cef03f36bd2c4e0f34729c3de80fd375059bdccbf52b10a42c6ec2c", srcjar_sha256 = "906065102c989b1a82ab0871de1489381835af84cdb32c668c8af59d8a7767fe", deps = [ "@commons_collections_commons_collections", "@org_codehaus_plexus_plexus_container_default", "@velocity_velocity" ], )
load('//:import_external.bzl', import_external='safe_wix_scala_maven_import_external') def dependencies(): import_external(name='org_codehaus_plexus_plexus_archiver', artifact='org.codehaus.plexus:plexus-archiver:3.4', artifact_sha256='3c6611c98547dbf3f5125848c273ba719bc10df44e3f492fa2e302d6135a6ea5', srcjar_sha256='1887e8269928079236c9e1a75af5b5e256f4bfafaaed18da5c9c84faf5b26a91', deps=['@commons_io_commons_io', '@org_apache_commons_commons_compress', '@org_codehaus_plexus_plexus_io', '@org_codehaus_plexus_plexus_utils', '@org_iq80_snappy_snappy'], runtime_deps=['@org_tukaani_xz']) import_external(name='org_codehaus_plexus_plexus_classworlds', artifact='org.codehaus.plexus:plexus-classworlds:2.5.2', artifact_sha256='b2931d41740490a8d931cbe0cfe9ac20deb66cca606e679f52522f7f534c9fd7', srcjar_sha256='d087c4c0ff02b035111bb72c72603b2851d126c43da39cc3c73ff45139125bec') import_external(name='org_codehaus_plexus_plexus_component_annotations', artifact='org.codehaus.plexus:plexus-component-annotations:1.7.1', artifact_sha256='a7fee9435db716bff593e9fb5622bcf9f25e527196485929b0cd4065c43e61df', srcjar_sha256='18999359e8c1c5eb1f17a06093ceffc21f84b62b4ee0d9ab82f2e10d11049a78', excludes=['junit:junit']) import_external(name='org_codehaus_plexus_plexus_container_default', artifact='org.codehaus.plexus:plexus-container-default:1.7.1', artifact_sha256='f3f61952d63675ef61b42fa4256c1635749a5bc17668b4529fccde0a29d8ee19', srcjar_sha256='4464c902148ed19381336e6fcf17e914dc895416953888bb049bdd4f7ef86b80', deps=['@com_google_collections_google_collections', '@org_apache_xbean_xbean_reflect', '@org_codehaus_plexus_plexus_classworlds', '@org_codehaus_plexus_plexus_utils']) import_external(name='org_codehaus_plexus_plexus_interpolation', artifact='org.codehaus.plexus:plexus-interpolation:1.24', artifact_sha256='8fe2be04b067a75d02fb8a1a9caf6c1c8615f0d5577cced02e90b520763d2f77', srcjar_sha256='0b372b91236c4a2c63dc0d6b2010e10c98b993fc8491f6a02b73052a218b6644') import_external(name='org_codehaus_plexus_plexus_io', artifact='org.codehaus.plexus:plexus-io:2.7.1', artifact_sha256='20aa9dd74536ad9ce65d1253b5c4386747483a7a65c48008c9affb51854539cf', deps=['@commons_io_commons_io', '@org_codehaus_plexus_plexus_utils']) import_external(name='org_codehaus_plexus_plexus_utils', artifact='org.codehaus.plexus:plexus-utils:3.1.0', artifact_sha256='0ffa0ad084ebff5712540a7b7ea0abda487c53d3a18f78c98d1a3675dab9bf61', srcjar_sha256='06eb127e188a940ebbcf340c43c95537c3052298acdc943a9b2ec2146c7238d9') import_external(name='org_codehaus_plexus_plexus_velocity', artifact='org.codehaus.plexus:plexus-velocity:1.1.8', artifact_sha256='36b3ea3d0cef03f36bd2c4e0f34729c3de80fd375059bdccbf52b10a42c6ec2c', srcjar_sha256='906065102c989b1a82ab0871de1489381835af84cdb32c668c8af59d8a7767fe', deps=['@commons_collections_commons_collections', '@org_codehaus_plexus_plexus_container_default', '@velocity_velocity'])
# Solution 1 # O(n) time / O(1) space def indexEqualsValue(array): for index in range(len(array)): value = array[index] if index == value: return index return -1 # Solution 2 - recursion # O(log(n)) time / O(log(n)) space def indexEqualsValue(array): return indexEqualsValueHelper(array, 0, len(array) -1) def indexEqualsValueHelper(array, leftIndex, rightIndex): if leftIndex > rightIndex: return -1 middleIndex = leftIndex + (rightIndex - leftIndex) // 2 middleValue = array[middleIndex] if middleValue < middleIndex: return indexEqualsValueHelper(array, middleIndex + 1, rightIndex) elif middleValue == middleIndex and middleIndex == 0: return middleIndex elif middleValue == middleIndex and array[middleIndex - 1] < middleIndex - 1: return middleIndex else: return indexEqualsValueHelper(array, leftIndex, middleIndex - 1) # Solution 3 - iteration # O(log(n)) time / O(1) space def indexEqualsValue(array): leftIndex = 0 rightIndex = len(array) - 1 while leftIndex <= rightIndex: middleIndex = leftIndex + (rightIndex - leftIndex) // 2 middleValue = array[middleIndex] if middleValue < middleIndex: leftIndex = middleIndex + 1 elif middleValue == middleIndex and middleIndex == 0: return middleIndex elif middleValue == middleIndex and array[middleIndex - 1] < middleIndex - 1: return middleIndex else: rightIndex = middleIndex - 1 return -1
def index_equals_value(array): for index in range(len(array)): value = array[index] if index == value: return index return -1 def index_equals_value(array): return index_equals_value_helper(array, 0, len(array) - 1) def index_equals_value_helper(array, leftIndex, rightIndex): if leftIndex > rightIndex: return -1 middle_index = leftIndex + (rightIndex - leftIndex) // 2 middle_value = array[middleIndex] if middleValue < middleIndex: return index_equals_value_helper(array, middleIndex + 1, rightIndex) elif middleValue == middleIndex and middleIndex == 0: return middleIndex elif middleValue == middleIndex and array[middleIndex - 1] < middleIndex - 1: return middleIndex else: return index_equals_value_helper(array, leftIndex, middleIndex - 1) def index_equals_value(array): left_index = 0 right_index = len(array) - 1 while leftIndex <= rightIndex: middle_index = leftIndex + (rightIndex - leftIndex) // 2 middle_value = array[middleIndex] if middleValue < middleIndex: left_index = middleIndex + 1 elif middleValue == middleIndex and middleIndex == 0: return middleIndex elif middleValue == middleIndex and array[middleIndex - 1] < middleIndex - 1: return middleIndex else: right_index = middleIndex - 1 return -1
def near_hundred(n): if 90 <= n <=110 or 190 <= n <= 210: return True else: return False result = near_hundred(93) print(result) result = near_hundred(90) print(result) result = near_hundred(89) print(result) result = near_hundred(190) print(result) result = near_hundred(210) print(result) result = near_hundred(211) print(result)
def near_hundred(n): if 90 <= n <= 110 or 190 <= n <= 210: return True else: return False result = near_hundred(93) print(result) result = near_hundred(90) print(result) result = near_hundred(89) print(result) result = near_hundred(190) print(result) result = near_hundred(210) print(result) result = near_hundred(211) print(result)
#!/usr/bin/python __author__ = "Bassim Aly" __EMAIL__ = "basim.alyy@gmail.com" # sudo scapy # send(IP(dst="10.10.10.1")/ICMP()/"Welcome to Enterprise Automation Course")
__author__ = 'Bassim Aly' __email__ = 'basim.alyy@gmail.com'
# coding: utf-8 __all__ = [ "__package_name__", "__module_name__", "__copyright__", "__version__", "__license__", "__author__", "__author_twitter__", "__author_email__", "__documentation__", "__url__", ] __package_name__ = "PyVideoEditor" __module_name__ = "veditor" __copyright__ = "Copyright (C) 2021 iwasakishuto" __version__ = "0.1.0" __license__ = "MIT" __author__ = "iwasakishuto" __author_twitter__ = "https://twitter.com/iwasakishuto" __author_email__ = "cabernet.rock@gmail.com" __documentation__ = "https://iwasakishuto.github.io/PyVideoEditor" __url__ = "https://github.com/iwasakishuto/PyVideoEditor"
__all__ = ['__package_name__', '__module_name__', '__copyright__', '__version__', '__license__', '__author__', '__author_twitter__', '__author_email__', '__documentation__', '__url__'] __package_name__ = 'PyVideoEditor' __module_name__ = 'veditor' __copyright__ = 'Copyright (C) 2021 iwasakishuto' __version__ = '0.1.0' __license__ = 'MIT' __author__ = 'iwasakishuto' __author_twitter__ = 'https://twitter.com/iwasakishuto' __author_email__ = 'cabernet.rock@gmail.com' __documentation__ = 'https://iwasakishuto.github.io/PyVideoEditor' __url__ = 'https://github.com/iwasakishuto/PyVideoEditor'
def main(): project() # extracredit() # Create a task list. # A user is presented with the text below. # Let them select an option to list all of their tasks, # add a task to their list, # delete a task, # or quit the program. # Make each option a different function in your program. # Do NOT use Google. Do NOT use other students. Try to do this on your own. # # Congratulations! You're running [YOUR NAME]'s Task List program. # # What would you like to do next? # 1. List all tasks. # 2. Add a task to the list. # 3. Delete a task. # 0. To quit the program outsidefile = open("tasklist1","a") # the most dangerous thing i learned today, # you can COMPLETELY CHANGE EVERYTHING IN THE FILE # HOW DO YOU ADD WITHOUT REPLACING? def project(): userlist =["Thomas"] tasklist = [{"name":"Thomas","taskList": "tasklist1"}] print("are you a new user?\n Y/n") for user in userlist: print(user) newUser = input("") # if(newUser == ) if(newUser.upper() == "Y"): userInputName = input("please enter name\n") userlist.append(userInputName) tasklist.append({"name":userInputName,"taskList":(f"tasklist{len(userlist)}")}) for person in userlist: if(userInputName.lower() == person.lower()): user = person entry = True break if(newUser.lower() == "n"): userInputName = input("please enter name") if userInputName.capitalize() not in userlist: print('user not in list') entry = False else: for person in userlist: if(userInputName.lower() == person.lower()): user = person entry = True break # for adding new user if(entry == True): print(f" welcome {user} what would you like to do?") while(True): command = input("View\tAdd\tRemove\tquit\n") if(command.lower() == "quit"): print("have a good day") break elif(command.lower() == "view"): for person in tasklist: if person["name"] == user: print("taskList") file = open(person["taskList"],"r") print(file.read()) file.close() elif(person["taskList"] == []): print("no tasks") elif(command.lower() == "add"): newTask = input("What new task do you want to add?\n") for person in tasklist: file = open(person["taskList"],"a") file.write(f"{newTask}\n") elif(command.lower() == "remove"): taskToRemove = input("What task do you want to remove?\n") for person in tasklist: if person["name"] == user: readfile = open(person["taskList"],"r") lines = readfile.readlines() print(lines) readfile.close() editfiles = open(person["taskList"],"w") for task in lines: if(task != taskToRemove + "\n"): editfiles.write(task) editfiles.close() else: print("Invalid command please reinput command\nView\tAdd\tRemove\tquit\n") else: print("goodbye") def extracredit(): Input = input("what do i put in there?") outsidefile.write(f"\n{Input}") if __name__ == '__main__': main()
def main(): project() outsidefile = open('tasklist1', 'a') def project(): userlist = ['Thomas'] tasklist = [{'name': 'Thomas', 'taskList': 'tasklist1'}] print('are you a new user?\n Y/n') for user in userlist: print(user) new_user = input('') if newUser.upper() == 'Y': user_input_name = input('please enter name\n') userlist.append(userInputName) tasklist.append({'name': userInputName, 'taskList': f'tasklist{len(userlist)}'}) for person in userlist: if userInputName.lower() == person.lower(): user = person entry = True break if newUser.lower() == 'n': user_input_name = input('please enter name') if userInputName.capitalize() not in userlist: print('user not in list') entry = False else: for person in userlist: if userInputName.lower() == person.lower(): user = person entry = True break if entry == True: print(f' welcome {user} what would you like to do?') while True: command = input('View\tAdd\tRemove\tquit\n') if command.lower() == 'quit': print('have a good day') break elif command.lower() == 'view': for person in tasklist: if person['name'] == user: print('taskList') file = open(person['taskList'], 'r') print(file.read()) file.close() elif person['taskList'] == []: print('no tasks') elif command.lower() == 'add': new_task = input('What new task do you want to add?\n') for person in tasklist: file = open(person['taskList'], 'a') file.write(f'{newTask}\n') elif command.lower() == 'remove': task_to_remove = input('What task do you want to remove?\n') for person in tasklist: if person['name'] == user: readfile = open(person['taskList'], 'r') lines = readfile.readlines() print(lines) readfile.close() editfiles = open(person['taskList'], 'w') for task in lines: if task != taskToRemove + '\n': editfiles.write(task) editfiles.close() else: print('Invalid command please reinput command\nView\tAdd\tRemove\tquit\n') else: print('goodbye') def extracredit(): input = input('what do i put in there?') outsidefile.write(f'\n{Input}') if __name__ == '__main__': main()
calculation_to_units = 24 # global vars name_of_unit = "hours" # global vars def days_to_units(num_of_days, custom_message): # num_of_days and custom_message are local vars inside function print(f"{num_of_days} days are {num_of_days * calculation_to_units} {name_of_unit}") print(custom_message) def scope_check(num_of_days): # num_of_days is another local vars and is different than the one used in function days_to_units my_var = "var inside function" print(name_of_unit) print(num_of_days) print(my_var) scope_check(20)
calculation_to_units = 24 name_of_unit = 'hours' def days_to_units(num_of_days, custom_message): print(f'{num_of_days} days are {num_of_days * calculation_to_units} {name_of_unit}') print(custom_message) def scope_check(num_of_days): my_var = 'var inside function' print(name_of_unit) print(num_of_days) print(my_var) scope_check(20)
class Problem: MULTI_LABEL = 'MULTI_LABEL' MULTI_CLASS = 'MULTI_CLASS' GENERIC = 'GENERIC' class AssignmentType: CRISP = 'CRISP' CONTINUOUS = 'CONTINUOUS' GENERIC = 'GENERIC' class CoverageType: REDUNDANT = 'REDUNDANT' COMPLEMENTARY = 'COMPLEMENTARY' COMPLEMENTARY_REDUNDANT = 'COMPLEMENTARY_REDUNDANT' GENERIC = 'GENERIC' class EvidenceType: CONFUSION_MATRIX = 'CONFUSION_MATRIX' ACCURACY = 'ACCURACY' GENERIC = 'GENERIC' class PAC: GENERIC = (Problem.GENERIC, AssignmentType.GENERIC, CoverageType.GENERIC)
class Problem: multi_label = 'MULTI_LABEL' multi_class = 'MULTI_CLASS' generic = 'GENERIC' class Assignmenttype: crisp = 'CRISP' continuous = 'CONTINUOUS' generic = 'GENERIC' class Coveragetype: redundant = 'REDUNDANT' complementary = 'COMPLEMENTARY' complementary_redundant = 'COMPLEMENTARY_REDUNDANT' generic = 'GENERIC' class Evidencetype: confusion_matrix = 'CONFUSION_MATRIX' accuracy = 'ACCURACY' generic = 'GENERIC' class Pac: generic = (Problem.GENERIC, AssignmentType.GENERIC, CoverageType.GENERIC)
N,M = map(int,input().split()) ab_lst = [list(map(int,input().split())) for i in range(M)] K = int(input()) cd_lst = [list(map(int,input().split())) for i in range(K)]
(n, m) = map(int, input().split()) ab_lst = [list(map(int, input().split())) for i in range(M)] k = int(input()) cd_lst = [list(map(int, input().split())) for i in range(K)]
# hello.py print('Hello World') # python hello.py # Hello World
print('Hello World')
'one\n' 'two\n' 'threefourfive\n' 'six\n' 'seven\n' 'last'
"""one """ 'two\n' 'threefourfive\n' 'six\n' 'seven\n' 'last'
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- class AzureTestError(Exception): def __init__(self, error_message): message = 'An error caused by the Azure test harness failed the test: {}' super(AzureTestError, self).__init__(message.format(error_message)) class NameInUseError(Exception): def __init__(self, error_message): super(NameInUseError, self).__init__(error_message)
class Azuretesterror(Exception): def __init__(self, error_message): message = 'An error caused by the Azure test harness failed the test: {}' super(AzureTestError, self).__init__(message.format(error_message)) class Nameinuseerror(Exception): def __init__(self, error_message): super(NameInUseError, self).__init__(error_message)
# Copyright (C) 2019 Akamai Technologies, Inc. # Copyright (C) 2011-2014,2016 Nominum, 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. def reply_to(request, request_type=None): _ctrl = {} _data = {} response = {'_ctrl': _ctrl, '_data': _data} if request_type is not None: t = request_type else: t = request['_data'].get('type') if t is not None: _data['type'] = t _ctrl['_rpl'] = b'1' _ctrl['_rseq'] = request['_ctrl']['_sseq'] s = request['_ctrl'].get('_seq') if s is not None: _ctrl['_seq'] = s return response def error(request, detail, request_type=None): response = reply_to(request, request_type) response['_data']['err'] = detail return response def request(content): message = {'_ctrl': {}, '_data': content} return message def event(content): message = {'_ctrl': {'_evt': b'1'}, '_data': content} return message def is_reply(message): return '_rpl' in message['_ctrl'] def is_event(message): return '_evt' in message['_ctrl'] def is_request(message): _ctrl = message['_ctrl'] return not ('_rpl' in _ctrl or '_evt' in _ctrl) def kind(message): _ctrl = message['_ctrl'] if '_rpl' in _ctrl: return 'response' elif '_evt' in _ctrl: return 'event' else: return 'request' kinds = frozenset(('request', 'response', 'event'))
def reply_to(request, request_type=None): _ctrl = {} _data = {} response = {'_ctrl': _ctrl, '_data': _data} if request_type is not None: t = request_type else: t = request['_data'].get('type') if t is not None: _data['type'] = t _ctrl['_rpl'] = b'1' _ctrl['_rseq'] = request['_ctrl']['_sseq'] s = request['_ctrl'].get('_seq') if s is not None: _ctrl['_seq'] = s return response def error(request, detail, request_type=None): response = reply_to(request, request_type) response['_data']['err'] = detail return response def request(content): message = {'_ctrl': {}, '_data': content} return message def event(content): message = {'_ctrl': {'_evt': b'1'}, '_data': content} return message def is_reply(message): return '_rpl' in message['_ctrl'] def is_event(message): return '_evt' in message['_ctrl'] def is_request(message): _ctrl = message['_ctrl'] return not ('_rpl' in _ctrl or '_evt' in _ctrl) def kind(message): _ctrl = message['_ctrl'] if '_rpl' in _ctrl: return 'response' elif '_evt' in _ctrl: return 'event' else: return 'request' kinds = frozenset(('request', 'response', 'event'))
KAGGLE_SERVER_ID = 862766322550702081 SPAM_TIME = 5 # number of seconds between messages in the same channel SPAM_AMOUNT = 5 # number of messages sent in or less :SPAM_TIME: # seconds to be considered spam SPAM_PUNISH_TIME = 10 MUTE_ROLE_ID = 12345 # ID of the role to use to mute members. DATABASE_NAME = 'kaggle_30dML' DATABASE_URL = "" TOKEN = 'DISCORD BOT TOKEN' # Generated from discord's developer's portal
kaggle_server_id = 862766322550702081 spam_time = 5 spam_amount = 5 spam_punish_time = 10 mute_role_id = 12345 database_name = 'kaggle_30dML' database_url = '' token = 'DISCORD BOT TOKEN'
# -------------- #Code starts here #Function to read file def read_file(path): file = open(path, 'r') scentence = file.readline() file.close() return scentence path = file_path sample_message = read_file(path) print (sample_message) message_1 = read_file(file_path_1) print (message_1) message_2 = read_file(file_path_2) print (message_2) def fuse_msg(message_a, message_b): v = int(message_a) m = int(message_b) quotient = m//v str(quotient) return quotient secret_msg_1 = fuse_msg(message_1, message_2) print (secret_msg_1) p = read_file(file_path_3) message_3 = p print(message_3) def substitute_msg(message_c): if message_c == "red": sub = "Army General" elif message_c == "Green": sub = "Data Scientist" elif mesaage_c == "Blue": sub = "Marine Biologist" return sub secret_msg_2 = substitute_msg(message_3) print (secret_msg_2) message_4 = read_file(file_path_4) message_5 = read_file(file_path_5) print (message_4) print (message_5) def compare_msg(message_d, message_e): a_list = message_d.split() b_list = message_e.split() c_list = [x for x in a_list if x not in b_list] final_msg = " ".join(c_list) return final_msg secret_msg_3 = compare_msg(message_4, message_5) print (secret_msg_3) message_6 = read_file(file_path_6) print (message_6) def extract_msg(message_f): a_list = message_f.split() even_word= lambda x: len(x)%2 == 0 b_list = filter(even_word, a_list) final_msg = " ".join(b_list) return final_msg secret_msg_4 = extract_msg(message_6) print (secret_msg_4) message_parts=[secret_msg_3, str(secret_msg_1), secret_msg_4, secret_msg_2] final_path= user_data_dir + '/secret_message.txt' secret_msg = " ".join(message_parts) def write_file(secret_msg, path): s = open(path,'a+') s.write(secret_msg) s.close() write_file(secret_msg, final_path) print (secret_msg)
def read_file(path): file = open(path, 'r') scentence = file.readline() file.close() return scentence path = file_path sample_message = read_file(path) print(sample_message) message_1 = read_file(file_path_1) print(message_1) message_2 = read_file(file_path_2) print(message_2) def fuse_msg(message_a, message_b): v = int(message_a) m = int(message_b) quotient = m // v str(quotient) return quotient secret_msg_1 = fuse_msg(message_1, message_2) print(secret_msg_1) p = read_file(file_path_3) message_3 = p print(message_3) def substitute_msg(message_c): if message_c == 'red': sub = 'Army General' elif message_c == 'Green': sub = 'Data Scientist' elif mesaage_c == 'Blue': sub = 'Marine Biologist' return sub secret_msg_2 = substitute_msg(message_3) print(secret_msg_2) message_4 = read_file(file_path_4) message_5 = read_file(file_path_5) print(message_4) print(message_5) def compare_msg(message_d, message_e): a_list = message_d.split() b_list = message_e.split() c_list = [x for x in a_list if x not in b_list] final_msg = ' '.join(c_list) return final_msg secret_msg_3 = compare_msg(message_4, message_5) print(secret_msg_3) message_6 = read_file(file_path_6) print(message_6) def extract_msg(message_f): a_list = message_f.split() even_word = lambda x: len(x) % 2 == 0 b_list = filter(even_word, a_list) final_msg = ' '.join(b_list) return final_msg secret_msg_4 = extract_msg(message_6) print(secret_msg_4) message_parts = [secret_msg_3, str(secret_msg_1), secret_msg_4, secret_msg_2] final_path = user_data_dir + '/secret_message.txt' secret_msg = ' '.join(message_parts) def write_file(secret_msg, path): s = open(path, 'a+') s.write(secret_msg) s.close() write_file(secret_msg, final_path) print(secret_msg)
# # PySNMP MIB module MY-MEMORY-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/MY-MEMORY-MIB # Produced by pysmi-0.3.4 at Wed May 1 14:16:30 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection") myMgmt, = mibBuilder.importSymbols("MY-SMI", "myMgmt") ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup") MibScalar, MibTable, MibTableRow, MibTableColumn, Unsigned32, ObjectIdentity, Gauge32, NotificationType, TimeTicks, IpAddress, ModuleIdentity, iso, Bits, Counter64, Counter32, MibIdentifier, Integer32 = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Unsigned32", "ObjectIdentity", "Gauge32", "NotificationType", "TimeTicks", "IpAddress", "ModuleIdentity", "iso", "Bits", "Counter64", "Counter32", "MibIdentifier", "Integer32") TruthValue, DisplayString, TextualConvention, RowStatus = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "DisplayString", "TextualConvention", "RowStatus") myMemoryMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35)) myMemoryMIB.setRevisions(('2003-10-14 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: myMemoryMIB.setRevisionsDescriptions(('Initial version of this MIB module.',)) if mibBuilder.loadTexts: myMemoryMIB.setLastUpdated('200310140000Z') if mibBuilder.loadTexts: myMemoryMIB.setOrganization('D-Link Crop.') if mibBuilder.loadTexts: myMemoryMIB.setContactInfo(' http://support.dlink.com') if mibBuilder.loadTexts: myMemoryMIB.setDescription('This module defines my system mibs.') class Percent(TextualConvention, Integer32): description = 'An integer that is in the range of a percent value.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 100) myMemoryPoolMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1)) myMemoryPoolUtilizationTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1), ) if mibBuilder.loadTexts: myMemoryPoolUtilizationTable.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolUtilizationTable.setDescription('A table of memory pool utilization entries. Each of the objects provides a general idea of how much of the memory pool has been used over a given period of time.') myMemoryPoolUtilizationEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1, 1), ).setIndexNames((0, "MY-MEMORY-MIB", "myMemoryPoolIndex")) if mibBuilder.loadTexts: myMemoryPoolUtilizationEntry.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolUtilizationEntry.setDescription('An entry in the memory pool utilization table.') myMemoryPoolIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: myMemoryPoolIndex.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolIndex.setDescription('An index that uniquely represents a Memory Pool.') myMemoryPoolName = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: myMemoryPoolName.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolName.setDescription('A textual name assigned to the memory pool. This object is suitable for output to a human operator') myMemoryPoolCurrentUtilization = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1, 1, 3), Percent()).setMaxAccess("readonly") if mibBuilder.loadTexts: myMemoryPoolCurrentUtilization.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolCurrentUtilization.setDescription('This is the memory pool utilization currently.') myMemoryPoolLowestUtilization = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1, 1, 4), Percent()).setMaxAccess("readonly") if mibBuilder.loadTexts: myMemoryPoolLowestUtilization.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolLowestUtilization.setDescription('This is the memory pool utilization when memory used least.') myMemoryPoolLargestUtilization = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1, 1, 5), Percent()).setMaxAccess("readonly") if mibBuilder.loadTexts: myMemoryPoolLargestUtilization.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolLargestUtilization.setDescription('This is the memory pool utilization when memory used most.') myMemoryPoolSize = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: myMemoryPoolSize.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolSize.setDescription('This is the size of physical memory .') myMemoryPoolUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: myMemoryPoolUsed.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolUsed.setDescription('This is the memory size that has been used.') myMemoryPoolFree = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: myMemoryPoolFree.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolFree.setDescription('This is the memory size that is free.') myMemoryPoolWarning = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1, 1, 9), Percent()).setMaxAccess("readwrite") if mibBuilder.loadTexts: myMemoryPoolWarning.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolWarning.setDescription('The first warning of memory pool.') myMemoryPoolCritical = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1, 1, 10), Percent()).setMaxAccess("readwrite") if mibBuilder.loadTexts: myMemoryPoolCritical.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolCritical.setDescription('The second warning of memory pool.') myNodeMemoryPoolTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2), ) if mibBuilder.loadTexts: myNodeMemoryPoolTable.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolTable.setDescription("A table of node's memory pool utilization entries. Each of the objects provides a general idea of how much of the memory pool has been used over a given period of time.") myNodeMemoryPoolEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2, 1), ).setIndexNames((0, "MY-MEMORY-MIB", "myNodeMemoryPoolIndex")) if mibBuilder.loadTexts: myNodeMemoryPoolEntry.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolEntry.setDescription("An entry in the node's memory pool utilization table.") myNodeMemoryPoolIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: myNodeMemoryPoolIndex.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolIndex.setDescription("An index that uniquely represents a node's Memory Pool.") myNodeMemoryPoolName = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: myNodeMemoryPoolName.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolName.setDescription("A textual name assigned to the node's memory pool. This object is suitable for output to a human operator") myNodeMemoryPoolCurrentUtilization = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2, 1, 3), Percent()).setMaxAccess("readonly") if mibBuilder.loadTexts: myNodeMemoryPoolCurrentUtilization.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolCurrentUtilization.setDescription("This is the node's memory pool utilization currently.") myNodeMemoryPoolLowestUtilization = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2, 1, 4), Percent()).setMaxAccess("readonly") if mibBuilder.loadTexts: myNodeMemoryPoolLowestUtilization.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolLowestUtilization.setDescription("This is the node's memory pool utilization when memory used least.") myNodeMemoryPoolLargestUtilization = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2, 1, 5), Percent()).setMaxAccess("readonly") if mibBuilder.loadTexts: myNodeMemoryPoolLargestUtilization.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolLargestUtilization.setDescription("This is the node's memory pool utilization when memory used most.") myNodeMemoryPoolSize = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: myNodeMemoryPoolSize.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolSize.setDescription("This is the size of the node's physical memory .") myNodeMemoryPoolUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: myNodeMemoryPoolUsed.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolUsed.setDescription("This is the node's memory size that has been used.") myNodeMemoryPoolFree = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: myNodeMemoryPoolFree.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolFree.setDescription("This is the node's memory size that is free.") myNodeMemoryPoolWarning = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2, 1, 9), Percent()).setMaxAccess("readwrite") if mibBuilder.loadTexts: myNodeMemoryPoolWarning.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolWarning.setDescription("This is the first warning of the node's memory.") myNodeMemoryPoolCritical = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2, 1, 10), Percent()).setMaxAccess("readwrite") if mibBuilder.loadTexts: myNodeMemoryPoolCritical.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolCritical.setDescription("This is the second warning of the node's memory.") myMemoryMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 2)) myMemoryMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 2, 1)) myMemoryMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 2, 2)) myMemoryMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 2, 1, 1)).setObjects(("MY-MEMORY-MIB", "myMemoryPoolUtilizationMIBGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): myMemoryMIBCompliance = myMemoryMIBCompliance.setStatus('current') if mibBuilder.loadTexts: myMemoryMIBCompliance.setDescription('The compliance statement for entities which implement the My Memory MIB') myMemoryPoolUtilizationMIBGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 2, 2, 1)).setObjects(("MY-MEMORY-MIB", "myMemoryPoolIndex"), ("MY-MEMORY-MIB", "myMemoryPoolName"), ("MY-MEMORY-MIB", "myMemoryPoolCurrentUtilization"), ("MY-MEMORY-MIB", "myMemoryPoolLowestUtilization"), ("MY-MEMORY-MIB", "myMemoryPoolLargestUtilization"), ("MY-MEMORY-MIB", "myMemoryPoolSize"), ("MY-MEMORY-MIB", "myMemoryPoolUsed"), ("MY-MEMORY-MIB", "myMemoryPoolFree"), ("MY-MEMORY-MIB", "myMemoryPoolWarning"), ("MY-MEMORY-MIB", "myMemoryPoolCritical")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): myMemoryPoolUtilizationMIBGroup = myMemoryPoolUtilizationMIBGroup.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolUtilizationMIBGroup.setDescription('A collection of objects providing memory pool utilization to a My agent.') myNodeMemoryPoolMIBGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 2, 2, 2)).setObjects(("MY-MEMORY-MIB", "myNodeMemoryPoolIndex"), ("MY-MEMORY-MIB", "myNodeMemoryPoolName"), ("MY-MEMORY-MIB", "myNodeMemoryPoolCurrentUtilization"), ("MY-MEMORY-MIB", "myNodeMemoryPoolLowestUtilization"), ("MY-MEMORY-MIB", "myNodeMemoryPoolLargestUtilization"), ("MY-MEMORY-MIB", "myNodeMemoryPoolSize"), ("MY-MEMORY-MIB", "myNodeMemoryPoolUsed"), ("MY-MEMORY-MIB", "myNodeMemoryPoolFree"), ("MY-MEMORY-MIB", "myNodeMemoryPoolWarning"), ("MY-MEMORY-MIB", "myNodeMemoryPoolCritical")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): myNodeMemoryPoolMIBGroup = myNodeMemoryPoolMIBGroup.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolMIBGroup.setDescription("A collection of objects providing node's memory pool utilization to a My agent.") mibBuilder.exportSymbols("MY-MEMORY-MIB", myNodeMemoryPoolCritical=myNodeMemoryPoolCritical, myNodeMemoryPoolName=myNodeMemoryPoolName, myMemoryMIBCompliance=myMemoryMIBCompliance, PYSNMP_MODULE_ID=myMemoryMIB, myMemoryMIB=myMemoryMIB, myNodeMemoryPoolFree=myNodeMemoryPoolFree, myMemoryPoolLowestUtilization=myMemoryPoolLowestUtilization, myMemoryPoolCurrentUtilization=myMemoryPoolCurrentUtilization, myNodeMemoryPoolUsed=myNodeMemoryPoolUsed, myMemoryPoolIndex=myMemoryPoolIndex, myMemoryPoolName=myMemoryPoolName, myNodeMemoryPoolCurrentUtilization=myNodeMemoryPoolCurrentUtilization, Percent=Percent, myNodeMemoryPoolWarning=myNodeMemoryPoolWarning, myMemoryMIBGroups=myMemoryMIBGroups, myMemoryPoolUsed=myMemoryPoolUsed, myNodeMemoryPoolLargestUtilization=myNodeMemoryPoolLargestUtilization, myNodeMemoryPoolEntry=myNodeMemoryPoolEntry, myMemoryPoolUtilizationTable=myMemoryPoolUtilizationTable, myMemoryPoolMIBObjects=myMemoryPoolMIBObjects, myMemoryMIBConformance=myMemoryMIBConformance, myMemoryPoolLargestUtilization=myMemoryPoolLargestUtilization, myMemoryPoolUtilizationMIBGroup=myMemoryPoolUtilizationMIBGroup, myNodeMemoryPoolSize=myNodeMemoryPoolSize, myMemoryPoolWarning=myMemoryPoolWarning, myMemoryPoolUtilizationEntry=myMemoryPoolUtilizationEntry, myMemoryPoolSize=myMemoryPoolSize, myMemoryPoolCritical=myMemoryPoolCritical, myMemoryPoolFree=myMemoryPoolFree, myNodeMemoryPoolLowestUtilization=myNodeMemoryPoolLowestUtilization, myNodeMemoryPoolIndex=myNodeMemoryPoolIndex, myNodeMemoryPoolTable=myNodeMemoryPoolTable, myNodeMemoryPoolMIBGroup=myNodeMemoryPoolMIBGroup, myMemoryMIBCompliances=myMemoryMIBCompliances)
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, constraints_union, value_size_constraint, single_value_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsUnion', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection') (my_mgmt,) = mibBuilder.importSymbols('MY-SMI', 'myMgmt') (module_compliance, notification_group, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup', 'ObjectGroup') (mib_scalar, mib_table, mib_table_row, mib_table_column, unsigned32, object_identity, gauge32, notification_type, time_ticks, ip_address, module_identity, iso, bits, counter64, counter32, mib_identifier, integer32) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Unsigned32', 'ObjectIdentity', 'Gauge32', 'NotificationType', 'TimeTicks', 'IpAddress', 'ModuleIdentity', 'iso', 'Bits', 'Counter64', 'Counter32', 'MibIdentifier', 'Integer32') (truth_value, display_string, textual_convention, row_status) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'DisplayString', 'TextualConvention', 'RowStatus') my_memory_mib = module_identity((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35)) myMemoryMIB.setRevisions(('2003-10-14 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: myMemoryMIB.setRevisionsDescriptions(('Initial version of this MIB module.',)) if mibBuilder.loadTexts: myMemoryMIB.setLastUpdated('200310140000Z') if mibBuilder.loadTexts: myMemoryMIB.setOrganization('D-Link Crop.') if mibBuilder.loadTexts: myMemoryMIB.setContactInfo(' http://support.dlink.com') if mibBuilder.loadTexts: myMemoryMIB.setDescription('This module defines my system mibs.') class Percent(TextualConvention, Integer32): description = 'An integer that is in the range of a percent value.' status = 'current' subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 100) my_memory_pool_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1)) my_memory_pool_utilization_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1)) if mibBuilder.loadTexts: myMemoryPoolUtilizationTable.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolUtilizationTable.setDescription('A table of memory pool utilization entries. Each of the objects provides a general idea of how much of the memory pool has been used over a given period of time.') my_memory_pool_utilization_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1, 1)).setIndexNames((0, 'MY-MEMORY-MIB', 'myMemoryPoolIndex')) if mibBuilder.loadTexts: myMemoryPoolUtilizationEntry.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolUtilizationEntry.setDescription('An entry in the memory pool utilization table.') my_memory_pool_index = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: myMemoryPoolIndex.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolIndex.setDescription('An index that uniquely represents a Memory Pool.') my_memory_pool_name = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1, 1, 2), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: myMemoryPoolName.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolName.setDescription('A textual name assigned to the memory pool. This object is suitable for output to a human operator') my_memory_pool_current_utilization = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1, 1, 3), percent()).setMaxAccess('readonly') if mibBuilder.loadTexts: myMemoryPoolCurrentUtilization.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolCurrentUtilization.setDescription('This is the memory pool utilization currently.') my_memory_pool_lowest_utilization = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1, 1, 4), percent()).setMaxAccess('readonly') if mibBuilder.loadTexts: myMemoryPoolLowestUtilization.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolLowestUtilization.setDescription('This is the memory pool utilization when memory used least.') my_memory_pool_largest_utilization = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1, 1, 5), percent()).setMaxAccess('readonly') if mibBuilder.loadTexts: myMemoryPoolLargestUtilization.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolLargestUtilization.setDescription('This is the memory pool utilization when memory used most.') my_memory_pool_size = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: myMemoryPoolSize.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolSize.setDescription('This is the size of physical memory .') my_memory_pool_used = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1, 1, 7), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: myMemoryPoolUsed.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolUsed.setDescription('This is the memory size that has been used.') my_memory_pool_free = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1, 1, 8), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: myMemoryPoolFree.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolFree.setDescription('This is the memory size that is free.') my_memory_pool_warning = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1, 1, 9), percent()).setMaxAccess('readwrite') if mibBuilder.loadTexts: myMemoryPoolWarning.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolWarning.setDescription('The first warning of memory pool.') my_memory_pool_critical = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 1, 1, 10), percent()).setMaxAccess('readwrite') if mibBuilder.loadTexts: myMemoryPoolCritical.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolCritical.setDescription('The second warning of memory pool.') my_node_memory_pool_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2)) if mibBuilder.loadTexts: myNodeMemoryPoolTable.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolTable.setDescription("A table of node's memory pool utilization entries. Each of the objects provides a general idea of how much of the memory pool has been used over a given period of time.") my_node_memory_pool_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2, 1)).setIndexNames((0, 'MY-MEMORY-MIB', 'myNodeMemoryPoolIndex')) if mibBuilder.loadTexts: myNodeMemoryPoolEntry.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolEntry.setDescription("An entry in the node's memory pool utilization table.") my_node_memory_pool_index = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: myNodeMemoryPoolIndex.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolIndex.setDescription("An index that uniquely represents a node's Memory Pool.") my_node_memory_pool_name = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2, 1, 2), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: myNodeMemoryPoolName.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolName.setDescription("A textual name assigned to the node's memory pool. This object is suitable for output to a human operator") my_node_memory_pool_current_utilization = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2, 1, 3), percent()).setMaxAccess('readonly') if mibBuilder.loadTexts: myNodeMemoryPoolCurrentUtilization.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolCurrentUtilization.setDescription("This is the node's memory pool utilization currently.") my_node_memory_pool_lowest_utilization = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2, 1, 4), percent()).setMaxAccess('readonly') if mibBuilder.loadTexts: myNodeMemoryPoolLowestUtilization.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolLowestUtilization.setDescription("This is the node's memory pool utilization when memory used least.") my_node_memory_pool_largest_utilization = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2, 1, 5), percent()).setMaxAccess('readonly') if mibBuilder.loadTexts: myNodeMemoryPoolLargestUtilization.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolLargestUtilization.setDescription("This is the node's memory pool utilization when memory used most.") my_node_memory_pool_size = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: myNodeMemoryPoolSize.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolSize.setDescription("This is the size of the node's physical memory .") my_node_memory_pool_used = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2, 1, 7), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: myNodeMemoryPoolUsed.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolUsed.setDescription("This is the node's memory size that has been used.") my_node_memory_pool_free = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2, 1, 8), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: myNodeMemoryPoolFree.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolFree.setDescription("This is the node's memory size that is free.") my_node_memory_pool_warning = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2, 1, 9), percent()).setMaxAccess('readwrite') if mibBuilder.loadTexts: myNodeMemoryPoolWarning.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolWarning.setDescription("This is the first warning of the node's memory.") my_node_memory_pool_critical = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 1, 2, 1, 10), percent()).setMaxAccess('readwrite') if mibBuilder.loadTexts: myNodeMemoryPoolCritical.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolCritical.setDescription("This is the second warning of the node's memory.") my_memory_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 2)) my_memory_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 2, 1)) my_memory_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 2, 2)) my_memory_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 2, 1, 1)).setObjects(('MY-MEMORY-MIB', 'myMemoryPoolUtilizationMIBGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): my_memory_mib_compliance = myMemoryMIBCompliance.setStatus('current') if mibBuilder.loadTexts: myMemoryMIBCompliance.setDescription('The compliance statement for entities which implement the My Memory MIB') my_memory_pool_utilization_mib_group = object_group((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 2, 2, 1)).setObjects(('MY-MEMORY-MIB', 'myMemoryPoolIndex'), ('MY-MEMORY-MIB', 'myMemoryPoolName'), ('MY-MEMORY-MIB', 'myMemoryPoolCurrentUtilization'), ('MY-MEMORY-MIB', 'myMemoryPoolLowestUtilization'), ('MY-MEMORY-MIB', 'myMemoryPoolLargestUtilization'), ('MY-MEMORY-MIB', 'myMemoryPoolSize'), ('MY-MEMORY-MIB', 'myMemoryPoolUsed'), ('MY-MEMORY-MIB', 'myMemoryPoolFree'), ('MY-MEMORY-MIB', 'myMemoryPoolWarning'), ('MY-MEMORY-MIB', 'myMemoryPoolCritical')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): my_memory_pool_utilization_mib_group = myMemoryPoolUtilizationMIBGroup.setStatus('current') if mibBuilder.loadTexts: myMemoryPoolUtilizationMIBGroup.setDescription('A collection of objects providing memory pool utilization to a My agent.') my_node_memory_pool_mib_group = object_group((1, 3, 6, 1, 4, 1, 171, 10, 97, 2, 35, 2, 2, 2)).setObjects(('MY-MEMORY-MIB', 'myNodeMemoryPoolIndex'), ('MY-MEMORY-MIB', 'myNodeMemoryPoolName'), ('MY-MEMORY-MIB', 'myNodeMemoryPoolCurrentUtilization'), ('MY-MEMORY-MIB', 'myNodeMemoryPoolLowestUtilization'), ('MY-MEMORY-MIB', 'myNodeMemoryPoolLargestUtilization'), ('MY-MEMORY-MIB', 'myNodeMemoryPoolSize'), ('MY-MEMORY-MIB', 'myNodeMemoryPoolUsed'), ('MY-MEMORY-MIB', 'myNodeMemoryPoolFree'), ('MY-MEMORY-MIB', 'myNodeMemoryPoolWarning'), ('MY-MEMORY-MIB', 'myNodeMemoryPoolCritical')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): my_node_memory_pool_mib_group = myNodeMemoryPoolMIBGroup.setStatus('current') if mibBuilder.loadTexts: myNodeMemoryPoolMIBGroup.setDescription("A collection of objects providing node's memory pool utilization to a My agent.") mibBuilder.exportSymbols('MY-MEMORY-MIB', myNodeMemoryPoolCritical=myNodeMemoryPoolCritical, myNodeMemoryPoolName=myNodeMemoryPoolName, myMemoryMIBCompliance=myMemoryMIBCompliance, PYSNMP_MODULE_ID=myMemoryMIB, myMemoryMIB=myMemoryMIB, myNodeMemoryPoolFree=myNodeMemoryPoolFree, myMemoryPoolLowestUtilization=myMemoryPoolLowestUtilization, myMemoryPoolCurrentUtilization=myMemoryPoolCurrentUtilization, myNodeMemoryPoolUsed=myNodeMemoryPoolUsed, myMemoryPoolIndex=myMemoryPoolIndex, myMemoryPoolName=myMemoryPoolName, myNodeMemoryPoolCurrentUtilization=myNodeMemoryPoolCurrentUtilization, Percent=Percent, myNodeMemoryPoolWarning=myNodeMemoryPoolWarning, myMemoryMIBGroups=myMemoryMIBGroups, myMemoryPoolUsed=myMemoryPoolUsed, myNodeMemoryPoolLargestUtilization=myNodeMemoryPoolLargestUtilization, myNodeMemoryPoolEntry=myNodeMemoryPoolEntry, myMemoryPoolUtilizationTable=myMemoryPoolUtilizationTable, myMemoryPoolMIBObjects=myMemoryPoolMIBObjects, myMemoryMIBConformance=myMemoryMIBConformance, myMemoryPoolLargestUtilization=myMemoryPoolLargestUtilization, myMemoryPoolUtilizationMIBGroup=myMemoryPoolUtilizationMIBGroup, myNodeMemoryPoolSize=myNodeMemoryPoolSize, myMemoryPoolWarning=myMemoryPoolWarning, myMemoryPoolUtilizationEntry=myMemoryPoolUtilizationEntry, myMemoryPoolSize=myMemoryPoolSize, myMemoryPoolCritical=myMemoryPoolCritical, myMemoryPoolFree=myMemoryPoolFree, myNodeMemoryPoolLowestUtilization=myNodeMemoryPoolLowestUtilization, myNodeMemoryPoolIndex=myNodeMemoryPoolIndex, myNodeMemoryPoolTable=myNodeMemoryPoolTable, myNodeMemoryPoolMIBGroup=myNodeMemoryPoolMIBGroup, myMemoryMIBCompliances=myMemoryMIBCompliances)