content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
cx = 250 cy = 250 cRadius = 200 i=0 def setup(): size(500, 500) smooth() background(50) strokeWeight(5) stroke(250) noLoop() def draw(): global i while i <2*PI : x1 = cos(i)*cRadius + cx y1 = sin(i)*cRadius + cy line(x1 , y1 , x1 , y1) line(cx , cy , cx , cy) i += 2*PI/12 def keyPressed(): if (key== "s"): saveFrame(" myProcessing .png")
cx = 250 cy = 250 c_radius = 200 i = 0 def setup(): size(500, 500) smooth() background(50) stroke_weight(5) stroke(250) no_loop() def draw(): global i while i < 2 * PI: x1 = cos(i) * cRadius + cx y1 = sin(i) * cRadius + cy line(x1, y1, x1, y1) line(cx, cy, cx, cy) i += 2 * PI / 12 def key_pressed(): if key == 's': save_frame(' myProcessing .png')
def m(a,n,b,c,d): if n<0: return(abs(b-c)) k = str(n)+'|'+str(b) try: return d[k] except: inc = m(a,n-1,b+a[n],c,d) exc = m(a,n-1,b,c+a[n],d) d[k] = min(inc,exc) return d[k] for i in range(int(input())): d = {} n = int(input()) a = [int(j) for j in input().split()] if len(set(a))-n!=0: print(0) else: print(m(a,n-1,0,0,d))
def m(a, n, b, c, d): if n < 0: return abs(b - c) k = str(n) + '|' + str(b) try: return d[k] except: inc = m(a, n - 1, b + a[n], c, d) exc = m(a, n - 1, b, c + a[n], d) d[k] = min(inc, exc) return d[k] for i in range(int(input())): d = {} n = int(input()) a = [int(j) for j in input().split()] if len(set(a)) - n != 0: print(0) else: print(m(a, n - 1, 0, 0, d))
class DocumentFileContentToolsViewsTestMixin: def _request_document_parsing_error_list_view(self): return self.get(viewname='document_parsing:error_list') def _request_document_type_parsing_view(self): return self.post( viewname='document_parsing:document_type_submit', data={ 'document_type': self.test_document_type.pk } ) class DocumentFileContentViewTestMixin: def _request_test_document_file_content_delete_view(self): return self.post( viewname='document_parsing:document_file_content_delete', kwargs={ 'document_file_id': self.test_document_file.pk } ) def _request_test_document_file_content_download_view(self): return self.get( viewname='document_parsing:document_file_content_download', kwargs={ 'document_file_id': self.test_document_file.pk } ) def _request_test_document_file_content_view(self): return self.get( 'document_parsing:document_file_content_view', kwargs={ 'document_file_id': self.test_document_file.pk } ) def _request_test_document_file_page_content_view(self): return self.get( viewname='document_parsing:document_file_page_content_view', kwargs={ 'document_file_page_id': self.test_document_file.pages.first().pk, } ) def _request_test_document_file_parsing_error_list_view(self): return self.get( viewname='document_parsing:document_file_parsing_error_list', kwargs={ 'document_file_id': self.test_document_file.pk, } ) def _request_test_document_file_parsing_submit_view(self): return self.post( viewname='document_parsing:document_file_submit', kwargs={ 'document_file_id': self.test_document_file.pk } ) def _request_test_document_parsing_submit_view(self): return self.post( viewname='document_parsing:document_submit', kwargs={ 'document_id': self.test_document.pk } ) class DocumentParsingAPITestMixin: def _request_document_file_page_content_api_view(self): return self.get( viewname='rest_api:document-file-page-content-view', kwargs={ 'document_id': self.test_document.pk, 'document_file_id': self.test_document_file.pk, 'document_file_page_id': self.test_document_file.pages.first().pk } ) class DocumentTypeContentViewsTestMixin: def _request_test_document_type_parsing_settings_view(self): return self.get( viewname='document_parsing:document_type_parsing_settings', kwargs={'document_type_id': self.test_document_type.pk} ) class DocumentTypeParsingSettingsAPIViewTestMixin(): def _request_document_type_parsing_settings_details_api_view(self): return self.get( viewname='rest_api:document-type-parsing-settings-view', kwargs={'document_type_id': self.test_document_type.pk} ) def _request_document_type_parsing_settings_patch_api_view(self): return self.patch( viewname='rest_api:document-type-parsing-settings-view', kwargs={'document_type_id': self.test_document_type.pk}, data={'auto_parsing': True} ) def _request_document_type_parsing_settings_put_api_view(self): return self.put( viewname='rest_api:document-type-parsing-settings-view', kwargs={'document_type_id': self.test_document_type.pk}, data={'auto_parsing': True} )
class Documentfilecontenttoolsviewstestmixin: def _request_document_parsing_error_list_view(self): return self.get(viewname='document_parsing:error_list') def _request_document_type_parsing_view(self): return self.post(viewname='document_parsing:document_type_submit', data={'document_type': self.test_document_type.pk}) class Documentfilecontentviewtestmixin: def _request_test_document_file_content_delete_view(self): return self.post(viewname='document_parsing:document_file_content_delete', kwargs={'document_file_id': self.test_document_file.pk}) def _request_test_document_file_content_download_view(self): return self.get(viewname='document_parsing:document_file_content_download', kwargs={'document_file_id': self.test_document_file.pk}) def _request_test_document_file_content_view(self): return self.get('document_parsing:document_file_content_view', kwargs={'document_file_id': self.test_document_file.pk}) def _request_test_document_file_page_content_view(self): return self.get(viewname='document_parsing:document_file_page_content_view', kwargs={'document_file_page_id': self.test_document_file.pages.first().pk}) def _request_test_document_file_parsing_error_list_view(self): return self.get(viewname='document_parsing:document_file_parsing_error_list', kwargs={'document_file_id': self.test_document_file.pk}) def _request_test_document_file_parsing_submit_view(self): return self.post(viewname='document_parsing:document_file_submit', kwargs={'document_file_id': self.test_document_file.pk}) def _request_test_document_parsing_submit_view(self): return self.post(viewname='document_parsing:document_submit', kwargs={'document_id': self.test_document.pk}) class Documentparsingapitestmixin: def _request_document_file_page_content_api_view(self): return self.get(viewname='rest_api:document-file-page-content-view', kwargs={'document_id': self.test_document.pk, 'document_file_id': self.test_document_file.pk, 'document_file_page_id': self.test_document_file.pages.first().pk}) class Documenttypecontentviewstestmixin: def _request_test_document_type_parsing_settings_view(self): return self.get(viewname='document_parsing:document_type_parsing_settings', kwargs={'document_type_id': self.test_document_type.pk}) class Documenttypeparsingsettingsapiviewtestmixin: def _request_document_type_parsing_settings_details_api_view(self): return self.get(viewname='rest_api:document-type-parsing-settings-view', kwargs={'document_type_id': self.test_document_type.pk}) def _request_document_type_parsing_settings_patch_api_view(self): return self.patch(viewname='rest_api:document-type-parsing-settings-view', kwargs={'document_type_id': self.test_document_type.pk}, data={'auto_parsing': True}) def _request_document_type_parsing_settings_put_api_view(self): return self.put(viewname='rest_api:document-type-parsing-settings-view', kwargs={'document_type_id': self.test_document_type.pk}, data={'auto_parsing': True})
# Excel Sheet Column Number ''' Given a column title as appear in an Excel sheet, return its corresponding column number. For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 ... Example 1: Input: "A" Output: 1 Example 2: Input: "AB" Output: 28 Example 3: Input: "ZY" Output: 701 Constraints: 1 <= s.length <= 7 s consists only of uppercase English letters. s is between "A" and "FXSHRXW". ''' class Solution: def titleToNumber(self, s: str) -> int: s = s[::-1] ans = 0 for i, ch in enumerate(s): ans = ans + (ord(ch)-64)*(26**i) return ans
""" Given a column title as appear in an Excel sheet, return its corresponding column number. For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 ... Example 1: Input: "A" Output: 1 Example 2: Input: "AB" Output: 28 Example 3: Input: "ZY" Output: 701 Constraints: 1 <= s.length <= 7 s consists only of uppercase English letters. s is between "A" and "FXSHRXW". """ class Solution: def title_to_number(self, s: str) -> int: s = s[::-1] ans = 0 for (i, ch) in enumerate(s): ans = ans + (ord(ch) - 64) * 26 ** i return ans
''' Add two numbers ''' def add(a, b): return a + b ''' Concatenate two lists ''' def concat(L1, L2, L3): return L1 + L2 + L3 ''' Get length of a list ''' def length(L): # We will make this one wrong to test failed tests return len(L) - 1
""" Add two numbers """ def add(a, b): return a + b '\nConcatenate two lists\n' def concat(L1, L2, L3): return L1 + L2 + L3 '\nGet length of a list\n' def length(L): return len(L) - 1
Terrain = [ {"stop": 0.00, "color": {'r': 0x00, 'g': 0x9a, 'b': 0x24}}, {"stop": 0.45, "color": {'r': 0xff, 'g': 0xff, 'b': 0x00}}, {"stop": 0.90, "color": {'r': 0xff, 'g': 0x00, 'b': 0x00}}, {"stop": 1.00, "color": {'r': 0xff, 'g': 0xe0, 'b': 0xe0}} ] Water = [ {"stop": 0.00, "color": {'r': 0x34, 'g': 0x40, 'b': 0x44}}, {"stop": 1.00, "color": {'r': 0x15, 'g': 0x54, 'b': 0xd1}} ] WaterDepth = [ {"stop": 0.00, "color": {'r': 0x15, 'g': 0x54, 'b': 0xd1}}, {"stop": 1.00, "color": {'r': 0x34, 'g': 0x40, 'b': 0x44}} ] GrayScale = [ {"stop": 0.00, "color": {'r': 0x00, 'g': 0x00, 'b': 0x00}}, {"stop": 1.00, "color": {'r': 0xff, 'g': 0xff, 'b': 0xff}} ]
terrain = [{'stop': 0.0, 'color': {'r': 0, 'g': 154, 'b': 36}}, {'stop': 0.45, 'color': {'r': 255, 'g': 255, 'b': 0}}, {'stop': 0.9, 'color': {'r': 255, 'g': 0, 'b': 0}}, {'stop': 1.0, 'color': {'r': 255, 'g': 224, 'b': 224}}] water = [{'stop': 0.0, 'color': {'r': 52, 'g': 64, 'b': 68}}, {'stop': 1.0, 'color': {'r': 21, 'g': 84, 'b': 209}}] water_depth = [{'stop': 0.0, 'color': {'r': 21, 'g': 84, 'b': 209}}, {'stop': 1.0, 'color': {'r': 52, 'g': 64, 'b': 68}}] gray_scale = [{'stop': 0.0, 'color': {'r': 0, 'g': 0, 'b': 0}}, {'stop': 1.0, 'color': {'r': 255, 'g': 255, 'b': 255}}]
def load(h): return ({'abbr': 0, 'code': 0, 'title': 'Unknown'}, {'abbr': 'fg', 'code': 1, 'title': 'First guess'}, {'abbr': 'an', 'code': 2, 'title': 'Analysis'}, {'abbr': 'ia', 'code': 3, 'title': 'Initialised analysis'}, {'abbr': 'oi', 'code': 4, 'title': 'Oi analysis'}, {'abbr': '3v', 'code': 5, 'title': '3d variational analysis'}, {'abbr': '4v', 'code': 6, 'title': '4d variational analysis'}, {'abbr': '3g', 'code': 7, 'title': '3d variational gradients'}, {'abbr': '4g', 'code': 8, 'title': '4d variational gradients'}, {'abbr': 'fc', 'code': 9, 'title': 'Forecast'}, {'abbr': 'cf', 'code': 10, 'title': 'Control forecast'}, {'abbr': 'pf', 'code': 11, 'title': 'Perturbed forecast'}, {'abbr': 'ef', 'code': 12, 'title': 'Errors in first guess'}, {'abbr': 'ea', 'code': 13, 'title': 'Errors in analysis'}, {'abbr': 'cm', 'code': 14, 'title': 'Cluster means'}, {'abbr': 'cs', 'code': 15, 'title': 'Cluster std deviations'}, {'abbr': 'fp', 'code': 16, 'title': 'Forecast probability'}, {'abbr': 'em', 'code': 17, 'title': 'Ensemble mean'}, {'abbr': 'es', 'code': 18, 'title': 'Ensemble standard deviation'}, {'abbr': 'fa', 'code': 19, 'title': 'Forecast accumulation'}, {'abbr': 'cl', 'code': 20, 'title': 'Climatology'}, {'abbr': 'si', 'code': 21, 'title': 'Climate simulation'}, {'abbr': 's3', 'code': 22, 'title': 'Climate 30 days simulation'}, {'abbr': 'ed', 'code': 23, 'title': 'Empirical distribution'}, {'abbr': 'tu', 'code': 24, 'title': 'Tubes'}, {'abbr': 'ff', 'code': 25, 'title': 'Flux forcing realtime'}, {'abbr': 'of', 'code': 26, 'title': 'Ocean forward'}, {'abbr': 'efi', 'code': 27, 'title': 'Extreme forecast index'}, {'abbr': 'efic', 'code': 28, 'title': 'Extreme forecast index control'}, {'abbr': 'pb', 'code': 29, 'title': 'Probability boundaries'}, {'abbr': 'ep', 'code': 30, 'title': 'Event probability'}, {'abbr': 'bf', 'code': 31, 'title': 'Bias-corrected forecast'}, {'abbr': 'cd', 'code': 32, 'title': 'Climate distribution'}, {'abbr': '4i', 'code': 33, 'title': '4D analysis increments'}, {'abbr': 'go', 'code': 34, 'title': 'Gridded observations'}, {'abbr': 'me', 'code': 35, 'title': 'Model errors'}, {'abbr': 'pd', 'code': 36, 'title': 'Probability distribution'}, {'abbr': 'ci', 'code': 37, 'title': 'Cluster information'}, {'abbr': 'sot', 'code': 38, 'title': 'Shift of Tail'}, {'abbr': 'eme', 'code': 39, 'title': 'Ensemble data assimilation model errors'}, {'abbr': 'im', 'code': 40, 'title': 'Images'}, {'abbr': 'sim', 'code': 42, 'title': 'Simulated images'}, {'abbr': 'wem', 'code': 43, 'title': 'Weighted ensemble mean'}, {'abbr': 'wes', 'code': 44, 'title': 'Weighted ensemble standard deviation'}, {'abbr': 'cr', 'code': 45, 'title': 'Cluster representative'}, {'abbr': 'ses', 'code': 46, 'title': 'Scaled ensemble standard deviation'}, {'abbr': 'taem', 'code': 47, 'title': 'Time average ensemble mean'}, {'abbr': 'taes', 'code': 48, 'title': 'Time average ensemble standard deviation'}, {'abbr': 'sg', 'code': 50, 'title': 'Sensitivity gradient'}, {'abbr': 'sf', 'code': 52, 'title': 'Sensitivity forecast'}, {'abbr': 'pa', 'code': 60, 'title': 'Perturbed analysis'}, {'abbr': 'icp', 'code': 61, 'title': 'Initial condition perturbation'}, {'abbr': 'sv', 'code': 62, 'title': 'Singular vector'}, {'abbr': 'as', 'code': 63, 'title': 'Adjoint singular vector'}, {'abbr': 'svar', 'code': 64, 'title': 'Signal variance'}, {'abbr': 'cv', 'code': 65, 'title': 'Calibration/Validation forecast'}, {'abbr': 'or', 'code': 70, 'title': 'Ocean reanalysis'}, {'abbr': 'fx', 'code': 71, 'title': 'Flux forcing'}, {'abbr': 'fu', 'code': 72, 'title': 'Fill-up'}, {'abbr': 'sfo', 'code': 73, 'title': 'Simulations with forcing'}, {'abbr': 'fcmean', 'code': 80, 'title': 'Forecast mean'}, {'abbr': 'fcmax', 'code': 81, 'title': 'Forecast maximum'}, {'abbr': 'fcmin', 'code': 82, 'title': 'Forecast minimum'}, {'abbr': 'fcstdev', 'code': 83, 'title': 'Forecast standard deviation'}, {'abbr': 'emtm', 'code': 84, 'title': 'Ensemble mean of temporal mean'}, {'abbr': 'estdtm', 'code': 85, 'title': 'Ensemble standard deviation of temporal mean'}, {'abbr': 'hcmean', 'code': 86, 'title': 'Hindcast climate mean'}, {'abbr': 'ssd', 'code': 87, 'title': 'Simulated satellite data'}, {'abbr': 'gsd', 'code': 88, 'title': 'Gridded satellite data'}, {'abbr': 'ga', 'code': 89, 'title': 'GFAS analysis'}, {'abbr': 'gai', 'code': 90, 'title': 'Gridded analysis input'})
def load(h): return ({'abbr': 0, 'code': 0, 'title': 'Unknown'}, {'abbr': 'fg', 'code': 1, 'title': 'First guess'}, {'abbr': 'an', 'code': 2, 'title': 'Analysis'}, {'abbr': 'ia', 'code': 3, 'title': 'Initialised analysis'}, {'abbr': 'oi', 'code': 4, 'title': 'Oi analysis'}, {'abbr': '3v', 'code': 5, 'title': '3d variational analysis'}, {'abbr': '4v', 'code': 6, 'title': '4d variational analysis'}, {'abbr': '3g', 'code': 7, 'title': '3d variational gradients'}, {'abbr': '4g', 'code': 8, 'title': '4d variational gradients'}, {'abbr': 'fc', 'code': 9, 'title': 'Forecast'}, {'abbr': 'cf', 'code': 10, 'title': 'Control forecast'}, {'abbr': 'pf', 'code': 11, 'title': 'Perturbed forecast'}, {'abbr': 'ef', 'code': 12, 'title': 'Errors in first guess'}, {'abbr': 'ea', 'code': 13, 'title': 'Errors in analysis'}, {'abbr': 'cm', 'code': 14, 'title': 'Cluster means'}, {'abbr': 'cs', 'code': 15, 'title': 'Cluster std deviations'}, {'abbr': 'fp', 'code': 16, 'title': 'Forecast probability'}, {'abbr': 'em', 'code': 17, 'title': 'Ensemble mean'}, {'abbr': 'es', 'code': 18, 'title': 'Ensemble standard deviation'}, {'abbr': 'fa', 'code': 19, 'title': 'Forecast accumulation'}, {'abbr': 'cl', 'code': 20, 'title': 'Climatology'}, {'abbr': 'si', 'code': 21, 'title': 'Climate simulation'}, {'abbr': 's3', 'code': 22, 'title': 'Climate 30 days simulation'}, {'abbr': 'ed', 'code': 23, 'title': 'Empirical distribution'}, {'abbr': 'tu', 'code': 24, 'title': 'Tubes'}, {'abbr': 'ff', 'code': 25, 'title': 'Flux forcing realtime'}, {'abbr': 'of', 'code': 26, 'title': 'Ocean forward'}, {'abbr': 'efi', 'code': 27, 'title': 'Extreme forecast index'}, {'abbr': 'efic', 'code': 28, 'title': 'Extreme forecast index control'}, {'abbr': 'pb', 'code': 29, 'title': 'Probability boundaries'}, {'abbr': 'ep', 'code': 30, 'title': 'Event probability'}, {'abbr': 'bf', 'code': 31, 'title': 'Bias-corrected forecast'}, {'abbr': 'cd', 'code': 32, 'title': 'Climate distribution'}, {'abbr': '4i', 'code': 33, 'title': '4D analysis increments'}, {'abbr': 'go', 'code': 34, 'title': 'Gridded observations'}, {'abbr': 'me', 'code': 35, 'title': 'Model errors'}, {'abbr': 'pd', 'code': 36, 'title': 'Probability distribution'}, {'abbr': 'ci', 'code': 37, 'title': 'Cluster information'}, {'abbr': 'sot', 'code': 38, 'title': 'Shift of Tail'}, {'abbr': 'eme', 'code': 39, 'title': 'Ensemble data assimilation model errors'}, {'abbr': 'im', 'code': 40, 'title': 'Images'}, {'abbr': 'sim', 'code': 42, 'title': 'Simulated images'}, {'abbr': 'wem', 'code': 43, 'title': 'Weighted ensemble mean'}, {'abbr': 'wes', 'code': 44, 'title': 'Weighted ensemble standard deviation'}, {'abbr': 'cr', 'code': 45, 'title': 'Cluster representative'}, {'abbr': 'ses', 'code': 46, 'title': 'Scaled ensemble standard deviation'}, {'abbr': 'taem', 'code': 47, 'title': 'Time average ensemble mean'}, {'abbr': 'taes', 'code': 48, 'title': 'Time average ensemble standard deviation'}, {'abbr': 'sg', 'code': 50, 'title': 'Sensitivity gradient'}, {'abbr': 'sf', 'code': 52, 'title': 'Sensitivity forecast'}, {'abbr': 'pa', 'code': 60, 'title': 'Perturbed analysis'}, {'abbr': 'icp', 'code': 61, 'title': 'Initial condition perturbation'}, {'abbr': 'sv', 'code': 62, 'title': 'Singular vector'}, {'abbr': 'as', 'code': 63, 'title': 'Adjoint singular vector'}, {'abbr': 'svar', 'code': 64, 'title': 'Signal variance'}, {'abbr': 'cv', 'code': 65, 'title': 'Calibration/Validation forecast'}, {'abbr': 'or', 'code': 70, 'title': 'Ocean reanalysis'}, {'abbr': 'fx', 'code': 71, 'title': 'Flux forcing'}, {'abbr': 'fu', 'code': 72, 'title': 'Fill-up'}, {'abbr': 'sfo', 'code': 73, 'title': 'Simulations with forcing'}, {'abbr': 'fcmean', 'code': 80, 'title': 'Forecast mean'}, {'abbr': 'fcmax', 'code': 81, 'title': 'Forecast maximum'}, {'abbr': 'fcmin', 'code': 82, 'title': 'Forecast minimum'}, {'abbr': 'fcstdev', 'code': 83, 'title': 'Forecast standard deviation'}, {'abbr': 'emtm', 'code': 84, 'title': 'Ensemble mean of temporal mean'}, {'abbr': 'estdtm', 'code': 85, 'title': 'Ensemble standard deviation of temporal mean'}, {'abbr': 'hcmean', 'code': 86, 'title': 'Hindcast climate mean'}, {'abbr': 'ssd', 'code': 87, 'title': 'Simulated satellite data'}, {'abbr': 'gsd', 'code': 88, 'title': 'Gridded satellite data'}, {'abbr': 'ga', 'code': 89, 'title': 'GFAS analysis'}, {'abbr': 'gai', 'code': 90, 'title': 'Gridded analysis input'})
class Solution: def maxSubArray(self, nums: [int]) -> int: tmp = nums[0] maxv = tmp for i in range(1, len(nums)): if tmp + nums[i] > nums[i]: maxv = max(maxv, tmp + nums[i]) tmp = tmp + nums[i] else: maxv = max(maxv, tmp, nums[i]) tmp = nums[i] return maxv
class Solution: def max_sub_array(self, nums: [int]) -> int: tmp = nums[0] maxv = tmp for i in range(1, len(nums)): if tmp + nums[i] > nums[i]: maxv = max(maxv, tmp + nums[i]) tmp = tmp + nums[i] else: maxv = max(maxv, tmp, nums[i]) tmp = nums[i] return maxv
class SimulationParameters: start_time = 0. # start time for simulation end_time = 50000. # end time for simulation dt_video = 0.1 dt_simulation = 0.03 # smallest time step for simulation dt_plotting = 0.3 # refresh rate for plots dt_controller = dt_simulation # sample rate for the controller dt_observer = dt_simulation # sample rate for the observer
class Simulationparameters: start_time = 0.0 end_time = 50000.0 dt_video = 0.1 dt_simulation = 0.03 dt_plotting = 0.3 dt_controller = dt_simulation dt_observer = dt_simulation
class CyclesCurveSettings: radius_scale = None root_width = None shape = None tip_width = None use_closetip = None
class Cyclescurvesettings: radius_scale = None root_width = None shape = None tip_width = None use_closetip = None
#from .atributo import Atributo class TablaDestino: nombre = " " atributos = [] datos=[] funcion=False atributo='' proceso='' def __init__(self,nombre,atributos,funcion=False,atributo=None,proceso=None): self.nombre=nombre self.atributos=atributos self.funcion=funcion self.atributo=atributo self.proceso=proceso def setDato(self,datos): #print (datos) self.datos.append(datos)
class Tabladestino: nombre = ' ' atributos = [] datos = [] funcion = False atributo = '' proceso = '' def __init__(self, nombre, atributos, funcion=False, atributo=None, proceso=None): self.nombre = nombre self.atributos = atributos self.funcion = funcion self.atributo = atributo self.proceso = proceso def set_dato(self, datos): self.datos.append(datos)
#ordena a lista em ordem crescente sem o SORT/SORTED numeros = list() for n in range(0,5): numero = int(input("Digite um numero: ")) for chave, valor in enumerate(numeros): if numero < valor: numeros.insert(chave, numero) break else: numeros.append(numero) print(numeros)
numeros = list() for n in range(0, 5): numero = int(input('Digite um numero: ')) for (chave, valor) in enumerate(numeros): if numero < valor: numeros.insert(chave, numero) break else: numeros.append(numero) print(numeros)
valid_address_types = [ ['ant', 'antenna'], ['mbth', 'marine berth'], ['allotment', 'allotment'], ['atm', 'auto teller machine'], ['bbox', 'bathing box'], ['bbq', 'barbeque'], ['berths', 'berths'], ['berth', 'berth'], ['bldgs', 'buildings'], ['bldg', 'building'], ['bld', 'building'], ['bngws', 'bungalows'], ['bngw', 'bungalow'], ['cages', 'cages'], ['cage', 'cage'], ['carps', 'carparks'], ['carp', 'carpark'], ['cars', 'carspace'], ['carw', 'carwash'], ['cool', 'coolroom'], ['ctges', 'cottages'], ['ctge', 'cottage'], ['ctyds', 'courtyards'], ['ctyd', 'courtyard'], ['dupl', 'duplex'], ['fctys', 'factories'], ['fcty', 'factory'], ['flats', 'flats'], ['grges', 'garages'], ['flat', 'flat'], ['grge', 'garage'], ['heli', 'heliport'], ['hngrs', 'hangers'], ['hngr', 'hanger'], ['host', 'hostel'], ['hses', 'houses'], ['hse', 'house'], ['ksk', 'kiosk'], ['lbby', 'lobby'], ['loft', 'loft'], ['lots', 'lots'], ['lot', 'lot'], ['lse', 'lease'], ['str', 'strata unit'], ['msnt', 'maisonette'], ['offcs', 'offices'], ['offc', 'office'], ['pswy', 'passageway'], ['pths', 'penthouse'], ['rest', 'restaraunt'], ['room', 'room'], ['rptn', 'reception'], ['sapt', 'studio apartment'], ['suites', 'suites'], ['suite', 'suite'], ['shcs', 'showcase'], ['sheds', 'sheds'], ['shed', 'shed'], ['shops', 'shops'], ['shp', 'shop'], ['shop', 'shop'], ['shrms', 'showrooms'], ['shrm', 'showroom'], ['sign', 'sign'], ['sites', 'sites'], ['site', 'site'], ['stlls', 'stalls'], ['stll', 'stall'], ['stors', 'stores'], ['stor', 'store'], ['studios', 'studios'], ['stu', 'studio'], ['subs', 'substation'], ['tncys', 'tenancies'], ['tncy', 'tenancy'], ['townhouses', 'townhouses'], ['tnhs', 'townhouse'], ['twrs', 'towers'], ['twr', 'tower'], ['units', 'units'], ['unit', 'unit'], ['u', 'unit'], ['vllas', 'villas'], ['vlla', 'villa'], ['vlt', 'vault'], ['wards', 'wards'], ['ward', 'ward'], ['wc', 'toilet'], ['whses', 'warehouses'], ['whse', 'warehouse'], ['wkshs', 'workshops'], ['wksh', 'workshop'], ['apts', 'apartments'], ['apt', 'apartment'] ]
valid_address_types = [['ant', 'antenna'], ['mbth', 'marine berth'], ['allotment', 'allotment'], ['atm', 'auto teller machine'], ['bbox', 'bathing box'], ['bbq', 'barbeque'], ['berths', 'berths'], ['berth', 'berth'], ['bldgs', 'buildings'], ['bldg', 'building'], ['bld', 'building'], ['bngws', 'bungalows'], ['bngw', 'bungalow'], ['cages', 'cages'], ['cage', 'cage'], ['carps', 'carparks'], ['carp', 'carpark'], ['cars', 'carspace'], ['carw', 'carwash'], ['cool', 'coolroom'], ['ctges', 'cottages'], ['ctge', 'cottage'], ['ctyds', 'courtyards'], ['ctyd', 'courtyard'], ['dupl', 'duplex'], ['fctys', 'factories'], ['fcty', 'factory'], ['flats', 'flats'], ['grges', 'garages'], ['flat', 'flat'], ['grge', 'garage'], ['heli', 'heliport'], ['hngrs', 'hangers'], ['hngr', 'hanger'], ['host', 'hostel'], ['hses', 'houses'], ['hse', 'house'], ['ksk', 'kiosk'], ['lbby', 'lobby'], ['loft', 'loft'], ['lots', 'lots'], ['lot', 'lot'], ['lse', 'lease'], ['str', 'strata unit'], ['msnt', 'maisonette'], ['offcs', 'offices'], ['offc', 'office'], ['pswy', 'passageway'], ['pths', 'penthouse'], ['rest', 'restaraunt'], ['room', 'room'], ['rptn', 'reception'], ['sapt', 'studio apartment'], ['suites', 'suites'], ['suite', 'suite'], ['shcs', 'showcase'], ['sheds', 'sheds'], ['shed', 'shed'], ['shops', 'shops'], ['shp', 'shop'], ['shop', 'shop'], ['shrms', 'showrooms'], ['shrm', 'showroom'], ['sign', 'sign'], ['sites', 'sites'], ['site', 'site'], ['stlls', 'stalls'], ['stll', 'stall'], ['stors', 'stores'], ['stor', 'store'], ['studios', 'studios'], ['stu', 'studio'], ['subs', 'substation'], ['tncys', 'tenancies'], ['tncy', 'tenancy'], ['townhouses', 'townhouses'], ['tnhs', 'townhouse'], ['twrs', 'towers'], ['twr', 'tower'], ['units', 'units'], ['unit', 'unit'], ['u', 'unit'], ['vllas', 'villas'], ['vlla', 'villa'], ['vlt', 'vault'], ['wards', 'wards'], ['ward', 'ward'], ['wc', 'toilet'], ['whses', 'warehouses'], ['whse', 'warehouse'], ['wkshs', 'workshops'], ['wksh', 'workshop'], ['apts', 'apartments'], ['apt', 'apartment']]
def get_oauth(): pass def get_repo(owner, name): pass
def get_oauth(): pass def get_repo(owner, name): pass
def decompress(nums): keep = [] for i in range (0,len(nums),2): x = nums[i] while x > 0: keep.append(nums[i+1]) x-=1 return keep #nums = [1,2,3,4] nums = [1,1,2,3] print(decompress(nums))
def decompress(nums): keep = [] for i in range(0, len(nums), 2): x = nums[i] while x > 0: keep.append(nums[i + 1]) x -= 1 return keep nums = [1, 1, 2, 3] print(decompress(nums))
def weekday(n): 'returns the name of the nth day of the week' days = ['Monday', 'Tuesday', 'Wednesday'] if 1 <= n and n <= 7: return days[n-1]
def weekday(n): """returns the name of the nth day of the week""" days = ['Monday', 'Tuesday', 'Wednesday'] if 1 <= n and n <= 7: return days[n - 1]
while True: enemy = hero.findNearestEnemy() friend = hero.findNearestFriend() hero.moveXY((friend.pos.x + enemy.pos.x) / 2, (friend.pos.y + enemy.pos.y) / 2);
while True: enemy = hero.findNearestEnemy() friend = hero.findNearestFriend() hero.moveXY((friend.pos.x + enemy.pos.x) / 2, (friend.pos.y + enemy.pos.y) / 2)
r_fib = {} LIMIT = 100 + 1 fib = [1,2] for i in range(LIMIT): fib.append(fib[-1] + fib[-2]) for i in range(LIMIT): r_fib[fib[i]] = i num_cases = int(input()) for c in range(num_cases): input() code = list(map(int, input().split())) cipher = input().strip() out_text = [' '] * 100 i = 0 str_len = 0 for ch in cipher: if i >= len(code): break if ch.isupper(): out_index = r_fib[code[i]] out_text[out_index] = ch str_len = max(str_len, out_index+1) i += 1 print("".join(out_text[:str_len]))
r_fib = {} limit = 100 + 1 fib = [1, 2] for i in range(LIMIT): fib.append(fib[-1] + fib[-2]) for i in range(LIMIT): r_fib[fib[i]] = i num_cases = int(input()) for c in range(num_cases): input() code = list(map(int, input().split())) cipher = input().strip() out_text = [' '] * 100 i = 0 str_len = 0 for ch in cipher: if i >= len(code): break if ch.isupper(): out_index = r_fib[code[i]] out_text[out_index] = ch str_len = max(str_len, out_index + 1) i += 1 print(''.join(out_text[:str_len]))
g = 85 h = 85 if g < h: print("g is less than h") else: if g == h: print("g is equal to h") else: print("g is greater than h")
g = 85 h = 85 if g < h: print('g is less than h') elif g == h: print('g is equal to h') else: print('g is greater than h')
# -*- coding:utf-8 -*- # Copyright 2019 TEEX # # 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. class Response: def __init__(self, type, response_method, result, request_id, chain_name, gas_price, gas_limit, tora_addr, user_addr, params): self.type = type # builtin 0, collector 1, swap verify 2, cross chain info 3, executor 4 self.response_method = response_method self.result = result self.request_id = request_id self.chain_name = chain_name self.gas_price = gas_price self.gas_limit = gas_limit self.tora_addr = tora_addr self.user_addr = user_addr self.params = params
class Response: def __init__(self, type, response_method, result, request_id, chain_name, gas_price, gas_limit, tora_addr, user_addr, params): self.type = type self.response_method = response_method self.result = result self.request_id = request_id self.chain_name = chain_name self.gas_price = gas_price self.gas_limit = gas_limit self.tora_addr = tora_addr self.user_addr = user_addr self.params = params
class Solution: def lengthOfLastWord(self, s: str) -> int: length = 0 for s_i in reversed(s): if(s_i != ' '): length += 1 elif (length != 0): break return length # input = "Hello World" input = "a " output = Solution().lengthOfLastWord(input) print(output)
class Solution: def length_of_last_word(self, s: str) -> int: length = 0 for s_i in reversed(s): if s_i != ' ': length += 1 elif length != 0: break return length input = 'a ' output = solution().lengthOfLastWord(input) print(output)
# -*- coding: utf-8 -*- moves = { 0x01: "POUND", 0x02: "KARATE_CHOP", 0x03: "DOUBLESLAP", 0x04: "COMET_PUNCH", 0x05: "MEGA_PUNCH", 0x06: "PAY_DAY", 0x07: "FIRE_PUNCH", 0x08: "ICE_PUNCH", 0x09: "THUNDERPUNCH", 0x0A: "SCRATCH", 0x0B: "VICEGRIP", 0x0C: "GUILLOTINE", 0x0D: "RAZOR_WIND", 0x0E: "SWORDS_DANCE", 0x0F: "CUT", 0x10: "GUST", 0x11: "WING_ATTACK", 0x12: "WHIRLWIND", 0x13: "FLY", 0x14: "BIND", 0x15: "SLAM", 0x16: "VINE_WHIP", 0x17: "STOMP", 0x18: "DOUBLE_KICK", 0x19: "MEGA_KICK", 0x1A: "JUMP_KICK", 0x1B: "ROLLING_KICK", 0x1C: "SAND_ATTACK", 0x1D: "HEADBUTT", 0x1E: "HORN_ATTACK", 0x1F: "FURY_ATTACK", 0x20: "HORN_DRILL", 0x21: "TACKLE", 0x22: "BODY_SLAM", 0x23: "WRAP", 0x24: "TAKE_DOWN", 0x25: "THRASH", 0x26: "DOUBLE_EDGE", 0x27: "TAIL_WHIP", 0x28: "POISON_STING", 0x29: "TWINEEDLE", 0x2A: "PIN_MISSILE", 0x2B: "LEER", 0x2C: "BITE", 0x2D: "GROWL", 0x2E: "ROAR", 0x2F: "SING", 0x30: "SUPERSONIC", 0x31: "SONICBOOM", 0x32: "DISABLE", 0x33: "ACID", 0x34: "EMBER", 0x35: "FLAMETHROWER", 0x36: "MIST", 0x37: "WATER_GUN", 0x38: "HYDRO_PUMP", 0x39: "SURF", 0x3A: "ICE_BEAM", 0x3B: "BLIZZARD", 0x3C: "PSYBEAM", 0x3D: "BUBBLEBEAM", 0x3E: "AURORA_BEAM", 0x3F: "HYPER_BEAM", 0x40: "PECK", 0x41: "DRILL_PECK", 0x42: "SUBMISSION", 0x43: "LOW_KICK", 0x44: "COUNTER", 0x45: "SEISMIC_TOSS", 0x46: "STRENGTH", 0x47: "ABSORB", 0x48: "MEGA_DRAIN", 0x49: "LEECH_SEED", 0x4A: "GROWTH", 0x4B: "RAZOR_LEAF", 0x4C: "SOLARBEAM", 0x4D: "POISONPOWDER", 0x4E: "STUN_SPORE", 0x4F: "SLEEP_POWDER", 0x50: "PETAL_DANCE", 0x51: "STRING_SHOT", 0x52: "DRAGON_RAGE", 0x53: "FIRE_SPIN", 0x54: "THUNDERSHOCK", 0x55: "THUNDERBOLT", 0x56: "THUNDER_WAVE", 0x57: "THUNDER", 0x58: "ROCK_THROW", 0x59: "EARTHQUAKE", 0x5A: "FISSURE", 0x5B: "DIG", 0x5C: "TOXIC", 0x5D: "CONFUSION", 0x5E: "PSYCHIC_M", 0x5F: "HYPNOSIS", 0x60: "MEDITATE", 0x61: "AGILITY", 0x62: "QUICK_ATTACK", 0x63: "RAGE", 0x64: "TELEPORT", 0x65: "NIGHT_SHADE", 0x66: "MIMIC", 0x67: "SCREECH", 0x68: "DOUBLE_TEAM", 0x69: "RECOVER", 0x6A: "HARDEN", 0x6B: "MINIMIZE", 0x6C: "SMOKESCREEN", 0x6D: "CONFUSE_RAY", 0x6E: "WITHDRAW", 0x6F: "DEFENSE_CURL", 0x70: "BARRIER", 0x71: "LIGHT_SCREEN", 0x72: "HAZE", 0x73: "REFLECT", 0x74: "FOCUS_ENERGY", 0x75: "BIDE", 0x76: "METRONOME", 0x77: "MIRROR_MOVE", 0x78: "SELFDESTRUCT", 0x79: "EGG_BOMB", 0x7A: "LICK", 0x7B: "SMOG", 0x7C: "SLUDGE", 0x7D: "BONE_CLUB", 0x7E: "FIRE_BLAST", 0x7F: "WATERFALL", 0x80: "CLAMP", 0x81: "SWIFT", 0x82: "SKULL_BASH", 0x83: "SPIKE_CANNON", 0x84: "CONSTRICT", 0x85: "AMNESIA", 0x86: "KINESIS", 0x87: "SOFTBOILED", 0x88: "HI_JUMP_KICK", 0x89: "GLARE", 0x8A: "DREAM_EATER", 0x8B: "POISON_GAS", 0x8C: "BARRAGE", 0x8D: "LEECH_LIFE", 0x8E: "LOVELY_KISS", 0x8F: "SKY_ATTACK", 0x90: "TRANSFORM", 0x91: "BUBBLE", 0x92: "DIZZY_PUNCH", 0x93: "SPORE", 0x94: "FLASH", 0x95: "PSYWAVE", 0x96: "SPLASH", 0x97: "ACID_ARMOR", 0x98: "CRABHAMMER", 0x99: "EXPLOSION", 0x9A: "FURY_SWIPES", 0x9B: "BONEMERANG", 0x9C: "REST", 0x9D: "ROCK_SLIDE", 0x9E: "HYPER_FANG", 0x9F: "SHARPEN", 0xA0: "CONVERSION", 0xA1: "TRI_ATTACK", 0xA2: "SUPER_FANG", 0xA3: "SLASH", 0xA4: "SUBSTITUTE", 0xA5: "STRUGGLE", 0xA6: "SKETCH", 0xA7: "TRIPLE_KICK", 0xA8: "THIEF", 0xA9: "SPIDER_WEB", 0xAA: "MIND_READER", 0xAB: "NIGHTMARE", 0xAC: "FLAME_WHEEL", 0xAD: "SNORE", 0xAE: "CURSE", 0xAF: "FLAIL", 0xB0: "CONVERSION2", 0xB1: "AEROBLAST", 0xB2: "COTTON_SPORE", 0xB3: "REVERSAL", 0xB4: "SPITE", 0xB5: "POWDER_SNOW", 0xB6: "PROTECT", 0xB7: "MACH_PUNCH", 0xB8: "SCARY_FACE", 0xB9: "FAINT_ATTACK", 0xBA: "SWEET_KISS", 0xBB: "BELLY_DRUM", 0xBC: "SLUDGE_BOMB", 0xBD: "MUD_SLAP", 0xBE: "OCTAZOOKA", 0xBF: "SPIKES", 0xC0: "ZAP_CANNON", 0xC1: "FORESIGHT", 0xC2: "DESTINY_BOND", 0xC3: "PERISH_SONG", 0xC4: "ICY_WIND", 0xC5: "DETECT", 0xC6: "BONE_RUSH", 0xC7: "LOCK_ON", 0xC8: "OUTRAGE", 0xC9: "SANDSTORM", 0xCA: "GIGA_DRAIN", 0xCB: "ENDURE", 0xCC: "CHARM", 0xCD: "ROLLOUT", 0xCE: "FALSE_SWIPE", 0xCF: "SWAGGER", 0xD0: "MILK_DRINK", 0xD1: "SPARK", 0xD2: "FURY_CUTTER", 0xD3: "STEEL_WING", 0xD4: "MEAN_LOOK", 0xD5: "ATTRACT", 0xD6: "SLEEP_TALK", 0xD7: "HEAL_BELL", 0xD8: "RETURN", 0xD9: "PRESENT", 0xDA: "FRUSTRATION", 0xDB: "SAFEGUARD", 0xDC: "PAIN_SPLIT", 0xDD: "SACRED_FIRE", 0xDE: "MAGNITUDE", 0xDF: "DYNAMICPUNCH", 0xE0: "MEGAHORN", 0xE1: "DRAGONBREATH", 0xE2: "BATON_PASS", 0xE3: "ENCORE", 0xE4: "PURSUIT", 0xE5: "RAPID_SPIN", 0xE6: "SWEET_SCENT", 0xE7: "IRON_TAIL", 0xE8: "METAL_CLAW", 0xE9: "VITAL_THROW", 0xEA: "MORNING_SUN", 0xEB: "SYNTHESIS", 0xEC: "MOONLIGHT", 0xED: "HIDDEN_POWER", 0xEE: "CROSS_CHOP", 0xEF: "TWISTER", 0xF0: "RAIN_DANCE", 0xF1: "SUNNY_DAY", 0xF2: "CRUNCH", 0xF3: "MIRROR_COAT", 0xF4: "PSYCH_UP", 0xF5: "EXTREMESPEED", 0xF6: "ANCIENTPOWER", 0xF7: "SHADOW_BALL", 0xF8: "FUTURE_SIGHT", 0xF9: "ROCK_SMASH", 0xFA: "WHIRLPOOL", 0xFB: "BEAT_UP", }
moves = {1: 'POUND', 2: 'KARATE_CHOP', 3: 'DOUBLESLAP', 4: 'COMET_PUNCH', 5: 'MEGA_PUNCH', 6: 'PAY_DAY', 7: 'FIRE_PUNCH', 8: 'ICE_PUNCH', 9: 'THUNDERPUNCH', 10: 'SCRATCH', 11: 'VICEGRIP', 12: 'GUILLOTINE', 13: 'RAZOR_WIND', 14: 'SWORDS_DANCE', 15: 'CUT', 16: 'GUST', 17: 'WING_ATTACK', 18: 'WHIRLWIND', 19: 'FLY', 20: 'BIND', 21: 'SLAM', 22: 'VINE_WHIP', 23: 'STOMP', 24: 'DOUBLE_KICK', 25: 'MEGA_KICK', 26: 'JUMP_KICK', 27: 'ROLLING_KICK', 28: 'SAND_ATTACK', 29: 'HEADBUTT', 30: 'HORN_ATTACK', 31: 'FURY_ATTACK', 32: 'HORN_DRILL', 33: 'TACKLE', 34: 'BODY_SLAM', 35: 'WRAP', 36: 'TAKE_DOWN', 37: 'THRASH', 38: 'DOUBLE_EDGE', 39: 'TAIL_WHIP', 40: 'POISON_STING', 41: 'TWINEEDLE', 42: 'PIN_MISSILE', 43: 'LEER', 44: 'BITE', 45: 'GROWL', 46: 'ROAR', 47: 'SING', 48: 'SUPERSONIC', 49: 'SONICBOOM', 50: 'DISABLE', 51: 'ACID', 52: 'EMBER', 53: 'FLAMETHROWER', 54: 'MIST', 55: 'WATER_GUN', 56: 'HYDRO_PUMP', 57: 'SURF', 58: 'ICE_BEAM', 59: 'BLIZZARD', 60: 'PSYBEAM', 61: 'BUBBLEBEAM', 62: 'AURORA_BEAM', 63: 'HYPER_BEAM', 64: 'PECK', 65: 'DRILL_PECK', 66: 'SUBMISSION', 67: 'LOW_KICK', 68: 'COUNTER', 69: 'SEISMIC_TOSS', 70: 'STRENGTH', 71: 'ABSORB', 72: 'MEGA_DRAIN', 73: 'LEECH_SEED', 74: 'GROWTH', 75: 'RAZOR_LEAF', 76: 'SOLARBEAM', 77: 'POISONPOWDER', 78: 'STUN_SPORE', 79: 'SLEEP_POWDER', 80: 'PETAL_DANCE', 81: 'STRING_SHOT', 82: 'DRAGON_RAGE', 83: 'FIRE_SPIN', 84: 'THUNDERSHOCK', 85: 'THUNDERBOLT', 86: 'THUNDER_WAVE', 87: 'THUNDER', 88: 'ROCK_THROW', 89: 'EARTHQUAKE', 90: 'FISSURE', 91: 'DIG', 92: 'TOXIC', 93: 'CONFUSION', 94: 'PSYCHIC_M', 95: 'HYPNOSIS', 96: 'MEDITATE', 97: 'AGILITY', 98: 'QUICK_ATTACK', 99: 'RAGE', 100: 'TELEPORT', 101: 'NIGHT_SHADE', 102: 'MIMIC', 103: 'SCREECH', 104: 'DOUBLE_TEAM', 105: 'RECOVER', 106: 'HARDEN', 107: 'MINIMIZE', 108: 'SMOKESCREEN', 109: 'CONFUSE_RAY', 110: 'WITHDRAW', 111: 'DEFENSE_CURL', 112: 'BARRIER', 113: 'LIGHT_SCREEN', 114: 'HAZE', 115: 'REFLECT', 116: 'FOCUS_ENERGY', 117: 'BIDE', 118: 'METRONOME', 119: 'MIRROR_MOVE', 120: 'SELFDESTRUCT', 121: 'EGG_BOMB', 122: 'LICK', 123: 'SMOG', 124: 'SLUDGE', 125: 'BONE_CLUB', 126: 'FIRE_BLAST', 127: 'WATERFALL', 128: 'CLAMP', 129: 'SWIFT', 130: 'SKULL_BASH', 131: 'SPIKE_CANNON', 132: 'CONSTRICT', 133: 'AMNESIA', 134: 'KINESIS', 135: 'SOFTBOILED', 136: 'HI_JUMP_KICK', 137: 'GLARE', 138: 'DREAM_EATER', 139: 'POISON_GAS', 140: 'BARRAGE', 141: 'LEECH_LIFE', 142: 'LOVELY_KISS', 143: 'SKY_ATTACK', 144: 'TRANSFORM', 145: 'BUBBLE', 146: 'DIZZY_PUNCH', 147: 'SPORE', 148: 'FLASH', 149: 'PSYWAVE', 150: 'SPLASH', 151: 'ACID_ARMOR', 152: 'CRABHAMMER', 153: 'EXPLOSION', 154: 'FURY_SWIPES', 155: 'BONEMERANG', 156: 'REST', 157: 'ROCK_SLIDE', 158: 'HYPER_FANG', 159: 'SHARPEN', 160: 'CONVERSION', 161: 'TRI_ATTACK', 162: 'SUPER_FANG', 163: 'SLASH', 164: 'SUBSTITUTE', 165: 'STRUGGLE', 166: 'SKETCH', 167: 'TRIPLE_KICK', 168: 'THIEF', 169: 'SPIDER_WEB', 170: 'MIND_READER', 171: 'NIGHTMARE', 172: 'FLAME_WHEEL', 173: 'SNORE', 174: 'CURSE', 175: 'FLAIL', 176: 'CONVERSION2', 177: 'AEROBLAST', 178: 'COTTON_SPORE', 179: 'REVERSAL', 180: 'SPITE', 181: 'POWDER_SNOW', 182: 'PROTECT', 183: 'MACH_PUNCH', 184: 'SCARY_FACE', 185: 'FAINT_ATTACK', 186: 'SWEET_KISS', 187: 'BELLY_DRUM', 188: 'SLUDGE_BOMB', 189: 'MUD_SLAP', 190: 'OCTAZOOKA', 191: 'SPIKES', 192: 'ZAP_CANNON', 193: 'FORESIGHT', 194: 'DESTINY_BOND', 195: 'PERISH_SONG', 196: 'ICY_WIND', 197: 'DETECT', 198: 'BONE_RUSH', 199: 'LOCK_ON', 200: 'OUTRAGE', 201: 'SANDSTORM', 202: 'GIGA_DRAIN', 203: 'ENDURE', 204: 'CHARM', 205: 'ROLLOUT', 206: 'FALSE_SWIPE', 207: 'SWAGGER', 208: 'MILK_DRINK', 209: 'SPARK', 210: 'FURY_CUTTER', 211: 'STEEL_WING', 212: 'MEAN_LOOK', 213: 'ATTRACT', 214: 'SLEEP_TALK', 215: 'HEAL_BELL', 216: 'RETURN', 217: 'PRESENT', 218: 'FRUSTRATION', 219: 'SAFEGUARD', 220: 'PAIN_SPLIT', 221: 'SACRED_FIRE', 222: 'MAGNITUDE', 223: 'DYNAMICPUNCH', 224: 'MEGAHORN', 225: 'DRAGONBREATH', 226: 'BATON_PASS', 227: 'ENCORE', 228: 'PURSUIT', 229: 'RAPID_SPIN', 230: 'SWEET_SCENT', 231: 'IRON_TAIL', 232: 'METAL_CLAW', 233: 'VITAL_THROW', 234: 'MORNING_SUN', 235: 'SYNTHESIS', 236: 'MOONLIGHT', 237: 'HIDDEN_POWER', 238: 'CROSS_CHOP', 239: 'TWISTER', 240: 'RAIN_DANCE', 241: 'SUNNY_DAY', 242: 'CRUNCH', 243: 'MIRROR_COAT', 244: 'PSYCH_UP', 245: 'EXTREMESPEED', 246: 'ANCIENTPOWER', 247: 'SHADOW_BALL', 248: 'FUTURE_SIGHT', 249: 'ROCK_SMASH', 250: 'WHIRLPOOL', 251: 'BEAT_UP'}
x,y,z = 32,31,23; list = ['Apple','Benana','Mango']; a,b,c = list; print(">>> x y z <<<"); print("> x : " + str(x)); print("> y : " + str(y)); print("> z : " + str(z)); print("\n>>> a b c <<<"); print("> a : " + a); print("> b : " + b); print("> c : " + c);
(x, y, z) = (32, 31, 23) list = ['Apple', 'Benana', 'Mango'] (a, b, c) = list print('>>> x y z <<<') print('> x : ' + str(x)) print('> y : ' + str(y)) print('> z : ' + str(z)) print('\n>>> a b c <<<') print('> a : ' + a) print('> b : ' + b) print('> c : ' + c)
def addr(regs, a, b, c): result = regs[:] result[c] = regs[a] + regs[b] return result def addi(regs, a, b, c): result = regs[:] result[c] = regs[a] + b return result def mulr(regs, a, b, c): result = regs[:] result[c] = regs[a] * regs[b] return result def muli(regs, a, b, c): result = regs[:] result[c] = regs[a] * b return result def banr(regs, a, b, c): result = regs[:] result[c] = regs[a] & regs[b] return result def bani(regs, a, b, c): result = regs[:] result[c] = regs[a] & b return result def borr(regs, a, b, c): result = regs[:] result[c] = regs[a] | regs[b] return result def bori(regs, a, b, c): result = regs[:] result[c] = regs[a] | b return result def setr(regs, a, b, c): result = regs[:] result[c] = regs[a] return result def seti(regs, a, b, c): result = regs[:] result[c] = a return result def gtir(regs, a, b, c): result = regs[:] if a > regs[b]: result[c] = 1 else: result[c] = 0 return result def gtri(regs, a, b, c): result = regs[:] if regs[a] > b: result[c] = 1 else: result[c] = 0 return result def gtrr(regs, a, b, c): result = regs[:] if regs[a] > regs[b]: result[c] = 1 else: result[c] = 0 return result def eqir(regs, a, b, c): result = regs[:] if a == regs[b]: result[c] = 1 else: result[c] = 0 return result def eqri(regs, a, b, c): result = regs[:] if regs[a] == b: result[c] = 1 else: result[c] = 0 return result def eqrr(regs, a, b, c): result = regs[:] if regs[a] == regs[b]: result[c] = 1 else: result[c] = 0 return result ops = [ addr, addi, mulr, muli, banr, bani, borr, bori, setr, seti, gtir, gtri, gtrr, eqir, eqri, eqrr, ] def registers(line): return list(map(int,line[9:-1].split(', '))) def solve(input): i = 0 total = 0 while i <= len(input): before = registers(input[i]) after = registers(input[i+2]) op = list(map(int, input[i+1].split())) count = 0 for o in ops: # print( o(before, *op[1:]), after) if o(before, *op[1:]) == after: count += 1 if count >= 3: total +=1 i += 4 print(total) # with open('test.txt', 'r') as f: # input = f.read().splitlines() # solve(input) with open('input.txt', 'r') as f: input = f.read().splitlines() solve(input)
def addr(regs, a, b, c): result = regs[:] result[c] = regs[a] + regs[b] return result def addi(regs, a, b, c): result = regs[:] result[c] = regs[a] + b return result def mulr(regs, a, b, c): result = regs[:] result[c] = regs[a] * regs[b] return result def muli(regs, a, b, c): result = regs[:] result[c] = regs[a] * b return result def banr(regs, a, b, c): result = regs[:] result[c] = regs[a] & regs[b] return result def bani(regs, a, b, c): result = regs[:] result[c] = regs[a] & b return result def borr(regs, a, b, c): result = regs[:] result[c] = regs[a] | regs[b] return result def bori(regs, a, b, c): result = regs[:] result[c] = regs[a] | b return result def setr(regs, a, b, c): result = regs[:] result[c] = regs[a] return result def seti(regs, a, b, c): result = regs[:] result[c] = a return result def gtir(regs, a, b, c): result = regs[:] if a > regs[b]: result[c] = 1 else: result[c] = 0 return result def gtri(regs, a, b, c): result = regs[:] if regs[a] > b: result[c] = 1 else: result[c] = 0 return result def gtrr(regs, a, b, c): result = regs[:] if regs[a] > regs[b]: result[c] = 1 else: result[c] = 0 return result def eqir(regs, a, b, c): result = regs[:] if a == regs[b]: result[c] = 1 else: result[c] = 0 return result def eqri(regs, a, b, c): result = regs[:] if regs[a] == b: result[c] = 1 else: result[c] = 0 return result def eqrr(regs, a, b, c): result = regs[:] if regs[a] == regs[b]: result[c] = 1 else: result[c] = 0 return result ops = [addr, addi, mulr, muli, banr, bani, borr, bori, setr, seti, gtir, gtri, gtrr, eqir, eqri, eqrr] def registers(line): return list(map(int, line[9:-1].split(', '))) def solve(input): i = 0 total = 0 while i <= len(input): before = registers(input[i]) after = registers(input[i + 2]) op = list(map(int, input[i + 1].split())) count = 0 for o in ops: if o(before, *op[1:]) == after: count += 1 if count >= 3: total += 1 i += 4 print(total) with open('input.txt', 'r') as f: input = f.read().splitlines() solve(input)
languages = [ "afrikaans", "albanian", "amharic", "arabic", "armenian", "assamese", "azerbaijani", "basque", "belarusian", "bengali", "bengali romanize", "bosnian", "breton", "bulgarian", "burmese", "burmese zawgyi font", "catalan", "chinese (simplified)", "chinese (traditional)", "croatian", "czech", "danish", "dutch", "english", "esperanto", "estonian", "filipino", "finnish", "french", "galician", "georgian", "german", "greek", "gujarati", "hausa", "hebrew", "hindi", "hindi romanize", "hungarian", "icelandic", "indonesian", "irish", "italian", "japanese", "javanese", "kannada", "kazakh", "khmer", "korean", "kurdish (kurmanji)", "kyrgyz", "lao", "latin", "latvian", "lithuanian", "macedonian", "malagasy", "malay", "malayalam", "marathi", "mongolian", "nepali", "norwegian", "oriya", "oromo", "pashto", "persian", "polish", "portuguese", "punjabi", "romanian", "russian", "sanskrit", "scottish gaelic", "serbian", "sindhi", "sinhala", "slovak", "slovenian", "somali", "spanish", "sundanese", "swahili", "swedish", "tamil", "tamil romanize", "telugu", "telugu romanize", "thai", "turkish", "ukrainian", "urdu", "urdu romanize", "uyghur", "uzbek", "vietnamese", "welsh", "western frisian", "xhosa", "yiddish", ]
languages = ['afrikaans', 'albanian', 'amharic', 'arabic', 'armenian', 'assamese', 'azerbaijani', 'basque', 'belarusian', 'bengali', 'bengali romanize', 'bosnian', 'breton', 'bulgarian', 'burmese', 'burmese zawgyi font', 'catalan', 'chinese (simplified)', 'chinese (traditional)', 'croatian', 'czech', 'danish', 'dutch', 'english', 'esperanto', 'estonian', 'filipino', 'finnish', 'french', 'galician', 'georgian', 'german', 'greek', 'gujarati', 'hausa', 'hebrew', 'hindi', 'hindi romanize', 'hungarian', 'icelandic', 'indonesian', 'irish', 'italian', 'japanese', 'javanese', 'kannada', 'kazakh', 'khmer', 'korean', 'kurdish (kurmanji)', 'kyrgyz', 'lao', 'latin', 'latvian', 'lithuanian', 'macedonian', 'malagasy', 'malay', 'malayalam', 'marathi', 'mongolian', 'nepali', 'norwegian', 'oriya', 'oromo', 'pashto', 'persian', 'polish', 'portuguese', 'punjabi', 'romanian', 'russian', 'sanskrit', 'scottish gaelic', 'serbian', 'sindhi', 'sinhala', 'slovak', 'slovenian', 'somali', 'spanish', 'sundanese', 'swahili', 'swedish', 'tamil', 'tamil romanize', 'telugu', 'telugu romanize', 'thai', 'turkish', 'ukrainian', 'urdu', 'urdu romanize', 'uyghur', 'uzbek', 'vietnamese', 'welsh', 'western frisian', 'xhosa', 'yiddish']
{ "name": "PerUDT", "version": "1.0.0", "task": "Treebank", "splits": ["train", "test", "dev"], "description": "The Persian Universal Dependency Treebank (PerUDT) is the result of automatic coversion of Persian Dependency Treebank (PerDT) with extensive manual corrections", "size": {"train": 26196, "test": 1455, "dev": 1456}, "filenames": ["fa_perdt-ud-train.conllu", "fa_perdt-ud-dev.conllu", "fa_perdt-ud-test.conllu"] }
{'name': 'PerUDT', 'version': '1.0.0', 'task': 'Treebank', 'splits': ['train', 'test', 'dev'], 'description': 'The Persian Universal Dependency Treebank (PerUDT) is the result of automatic coversion of Persian Dependency Treebank (PerDT) with extensive manual corrections', 'size': {'train': 26196, 'test': 1455, 'dev': 1456}, 'filenames': ['fa_perdt-ud-train.conllu', 'fa_perdt-ud-dev.conllu', 'fa_perdt-ud-test.conllu']}
# # PySNMP MIB module BNET-ATM-TOPOLOGY-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BNET-ATM-TOPOLOGY-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:22:58 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, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection") VpiInteger, = mibBuilder.importSymbols("LAN-EMULATION-CLIENT-MIB", "VpiInteger") s5AtmTop, = mibBuilder.importSymbols("S5-ROOT-MIB", "s5AtmTop") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") Counter64, Counter32, ModuleIdentity, Integer32, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, TimeTicks, ObjectIdentity, Unsigned32, iso, Gauge32, IpAddress, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "Counter32", "ModuleIdentity", "Integer32", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "TimeTicks", "ObjectIdentity", "Unsigned32", "iso", "Gauge32", "IpAddress", "Bits") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") bnetAtmTopGbl = MibIdentifier((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 1)) bnetAtmTopLinks = MibIdentifier((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2)) bnetAtmTopGblStatus = MibScalar((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("topOn", 1), ("topOff", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: bnetAtmTopGblStatus.setStatus('mandatory') bnetAtmTopGblLstChg = MibScalar((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 1, 2), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: bnetAtmTopGblLstChg.setStatus('mandatory') bnetAtmTopGblCurNum = MibScalar((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: bnetAtmTopGblCurNum.setStatus('mandatory') bnetAtmTopGblCurMibVer = MibScalar((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: bnetAtmTopGblCurMibVer.setStatus('mandatory') bnetAtmTopGblOperStatus = MibScalar((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("topOn", 1), ("topOff", 2), ("topUnavailable", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: bnetAtmTopGblOperStatus.setStatus('mandatory') bnetAtmTopLinksTable = MibTable((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 1), ) if mibBuilder.loadTexts: bnetAtmTopLinksTable.setStatus('mandatory') bnetAtmTopLinksEntry = MibTableRow((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 1, 1), ).setIndexNames((0, "BNET-ATM-TOPOLOGY-MIB", "bnetAtmTopLinksSlotNumIndx"), (0, "BNET-ATM-TOPOLOGY-MIB", "bnetAtmTopLinksPortNumIndx"), (0, "BNET-ATM-TOPOLOGY-MIB", "bnetAtmTopLinksLcnIndx")) if mibBuilder.loadTexts: bnetAtmTopLinksEntry.setStatus('mandatory') bnetAtmTopLinksSlotNumIndx = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: bnetAtmTopLinksSlotNumIndx.setStatus('mandatory') bnetAtmTopLinksPortNumIndx = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: bnetAtmTopLinksPortNumIndx.setStatus('mandatory') bnetAtmTopLinksLcnIndx = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 1, 1, 3), VpiInteger()).setMaxAccess("readonly") if mibBuilder.loadTexts: bnetAtmTopLinksLcnIndx.setStatus('mandatory') bnetAtmTopLinksTopoState = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unavailable", 1), ("notParticipating", 2), ("participating", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: bnetAtmTopLinksTopoState.setStatus('mandatory') bnetAtmTopLinksPeerSlotNum = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: bnetAtmTopLinksPeerSlotNum.setStatus('mandatory') bnetAtmTopLinksPeerPortNum = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: bnetAtmTopLinksPeerPortNum.setStatus('mandatory') bnetAtmTopLinksPeerIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 1, 1, 7), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: bnetAtmTopLinksPeerIpAddr.setStatus('mandatory') bnetAtmTopLinksPeerChassisType = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 1, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: bnetAtmTopLinksPeerChassisType.setStatus('mandatory') bnetAtmTopLinksPeerChassisSubType = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 1, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: bnetAtmTopLinksPeerChassisSubType.setStatus('mandatory') bnetAtmTopLinksEosSize = MibScalar((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 1440))).setMaxAccess("readonly") if mibBuilder.loadTexts: bnetAtmTopLinksEosSize.setStatus('mandatory') bnetAtmTopLinksEosTable = MibTable((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 3), ) if mibBuilder.loadTexts: bnetAtmTopLinksEosTable.setStatus('mandatory') bnetAtmTopLinksEosEntry = MibTableRow((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 3, 1), ).setIndexNames((0, "BNET-ATM-TOPOLOGY-MIB", "bnetAtmTopLinksSlotNumIndx"), (0, "BNET-ATM-TOPOLOGY-MIB", "bnetAtmTopLinksPortNumIndx"), (0, "BNET-ATM-TOPOLOGY-MIB", "bnetAtmTopLinksLcnIndx")) if mibBuilder.loadTexts: bnetAtmTopLinksEosEntry.setStatus('mandatory') bnetAtmTopLinksEos = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 3, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 1400))).setMaxAccess("readonly") if mibBuilder.loadTexts: bnetAtmTopLinksEos.setStatus('mandatory') mibBuilder.exportSymbols("BNET-ATM-TOPOLOGY-MIB", bnetAtmTopLinksPortNumIndx=bnetAtmTopLinksPortNumIndx, bnetAtmTopLinksLcnIndx=bnetAtmTopLinksLcnIndx, bnetAtmTopLinksEosSize=bnetAtmTopLinksEosSize, bnetAtmTopGblCurNum=bnetAtmTopGblCurNum, bnetAtmTopLinksEntry=bnetAtmTopLinksEntry, bnetAtmTopLinksEosTable=bnetAtmTopLinksEosTable, bnetAtmTopLinksPeerChassisSubType=bnetAtmTopLinksPeerChassisSubType, bnetAtmTopGblLstChg=bnetAtmTopGblLstChg, bnetAtmTopGblStatus=bnetAtmTopGblStatus, bnetAtmTopGblOperStatus=bnetAtmTopGblOperStatus, bnetAtmTopLinks=bnetAtmTopLinks, bnetAtmTopLinksTopoState=bnetAtmTopLinksTopoState, bnetAtmTopLinksEos=bnetAtmTopLinksEos, bnetAtmTopGblCurMibVer=bnetAtmTopGblCurMibVer, bnetAtmTopLinksTable=bnetAtmTopLinksTable, bnetAtmTopLinksPeerPortNum=bnetAtmTopLinksPeerPortNum, bnetAtmTopLinksPeerChassisType=bnetAtmTopLinksPeerChassisType, bnetAtmTopLinksPeerIpAddr=bnetAtmTopLinksPeerIpAddr, bnetAtmTopLinksEosEntry=bnetAtmTopLinksEosEntry, bnetAtmTopGbl=bnetAtmTopGbl, bnetAtmTopLinksSlotNumIndx=bnetAtmTopLinksSlotNumIndx, bnetAtmTopLinksPeerSlotNum=bnetAtmTopLinksPeerSlotNum)
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, value_size_constraint, value_range_constraint, constraints_union, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueSizeConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection') (vpi_integer,) = mibBuilder.importSymbols('LAN-EMULATION-CLIENT-MIB', 'VpiInteger') (s5_atm_top,) = mibBuilder.importSymbols('S5-ROOT-MIB', 's5AtmTop') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (counter64, counter32, module_identity, integer32, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, mib_identifier, time_ticks, object_identity, unsigned32, iso, gauge32, ip_address, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter64', 'Counter32', 'ModuleIdentity', 'Integer32', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'MibIdentifier', 'TimeTicks', 'ObjectIdentity', 'Unsigned32', 'iso', 'Gauge32', 'IpAddress', 'Bits') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') bnet_atm_top_gbl = mib_identifier((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 1)) bnet_atm_top_links = mib_identifier((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2)) bnet_atm_top_gbl_status = mib_scalar((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('topOn', 1), ('topOff', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: bnetAtmTopGblStatus.setStatus('mandatory') bnet_atm_top_gbl_lst_chg = mib_scalar((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 1, 2), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: bnetAtmTopGblLstChg.setStatus('mandatory') bnet_atm_top_gbl_cur_num = mib_scalar((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: bnetAtmTopGblCurNum.setStatus('mandatory') bnet_atm_top_gbl_cur_mib_ver = mib_scalar((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: bnetAtmTopGblCurMibVer.setStatus('mandatory') bnet_atm_top_gbl_oper_status = mib_scalar((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('topOn', 1), ('topOff', 2), ('topUnavailable', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: bnetAtmTopGblOperStatus.setStatus('mandatory') bnet_atm_top_links_table = mib_table((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 1)) if mibBuilder.loadTexts: bnetAtmTopLinksTable.setStatus('mandatory') bnet_atm_top_links_entry = mib_table_row((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 1, 1)).setIndexNames((0, 'BNET-ATM-TOPOLOGY-MIB', 'bnetAtmTopLinksSlotNumIndx'), (0, 'BNET-ATM-TOPOLOGY-MIB', 'bnetAtmTopLinksPortNumIndx'), (0, 'BNET-ATM-TOPOLOGY-MIB', 'bnetAtmTopLinksLcnIndx')) if mibBuilder.loadTexts: bnetAtmTopLinksEntry.setStatus('mandatory') bnet_atm_top_links_slot_num_indx = mib_table_column((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: bnetAtmTopLinksSlotNumIndx.setStatus('mandatory') bnet_atm_top_links_port_num_indx = mib_table_column((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: bnetAtmTopLinksPortNumIndx.setStatus('mandatory') bnet_atm_top_links_lcn_indx = mib_table_column((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 1, 1, 3), vpi_integer()).setMaxAccess('readonly') if mibBuilder.loadTexts: bnetAtmTopLinksLcnIndx.setStatus('mandatory') bnet_atm_top_links_topo_state = mib_table_column((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('unavailable', 1), ('notParticipating', 2), ('participating', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: bnetAtmTopLinksTopoState.setStatus('mandatory') bnet_atm_top_links_peer_slot_num = mib_table_column((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 1, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: bnetAtmTopLinksPeerSlotNum.setStatus('mandatory') bnet_atm_top_links_peer_port_num = mib_table_column((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 1, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: bnetAtmTopLinksPeerPortNum.setStatus('mandatory') bnet_atm_top_links_peer_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 1, 1, 7), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: bnetAtmTopLinksPeerIpAddr.setStatus('mandatory') bnet_atm_top_links_peer_chassis_type = mib_table_column((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 1, 1, 8), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: bnetAtmTopLinksPeerChassisType.setStatus('mandatory') bnet_atm_top_links_peer_chassis_sub_type = mib_table_column((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 1, 1, 9), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: bnetAtmTopLinksPeerChassisSubType.setStatus('mandatory') bnet_atm_top_links_eos_size = mib_scalar((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 1440))).setMaxAccess('readonly') if mibBuilder.loadTexts: bnetAtmTopLinksEosSize.setStatus('mandatory') bnet_atm_top_links_eos_table = mib_table((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 3)) if mibBuilder.loadTexts: bnetAtmTopLinksEosTable.setStatus('mandatory') bnet_atm_top_links_eos_entry = mib_table_row((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 3, 1)).setIndexNames((0, 'BNET-ATM-TOPOLOGY-MIB', 'bnetAtmTopLinksSlotNumIndx'), (0, 'BNET-ATM-TOPOLOGY-MIB', 'bnetAtmTopLinksPortNumIndx'), (0, 'BNET-ATM-TOPOLOGY-MIB', 'bnetAtmTopLinksLcnIndx')) if mibBuilder.loadTexts: bnetAtmTopLinksEosEntry.setStatus('mandatory') bnet_atm_top_links_eos = mib_table_column((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 2, 3, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 1400))).setMaxAccess('readonly') if mibBuilder.loadTexts: bnetAtmTopLinksEos.setStatus('mandatory') mibBuilder.exportSymbols('BNET-ATM-TOPOLOGY-MIB', bnetAtmTopLinksPortNumIndx=bnetAtmTopLinksPortNumIndx, bnetAtmTopLinksLcnIndx=bnetAtmTopLinksLcnIndx, bnetAtmTopLinksEosSize=bnetAtmTopLinksEosSize, bnetAtmTopGblCurNum=bnetAtmTopGblCurNum, bnetAtmTopLinksEntry=bnetAtmTopLinksEntry, bnetAtmTopLinksEosTable=bnetAtmTopLinksEosTable, bnetAtmTopLinksPeerChassisSubType=bnetAtmTopLinksPeerChassisSubType, bnetAtmTopGblLstChg=bnetAtmTopGblLstChg, bnetAtmTopGblStatus=bnetAtmTopGblStatus, bnetAtmTopGblOperStatus=bnetAtmTopGblOperStatus, bnetAtmTopLinks=bnetAtmTopLinks, bnetAtmTopLinksTopoState=bnetAtmTopLinksTopoState, bnetAtmTopLinksEos=bnetAtmTopLinksEos, bnetAtmTopGblCurMibVer=bnetAtmTopGblCurMibVer, bnetAtmTopLinksTable=bnetAtmTopLinksTable, bnetAtmTopLinksPeerPortNum=bnetAtmTopLinksPeerPortNum, bnetAtmTopLinksPeerChassisType=bnetAtmTopLinksPeerChassisType, bnetAtmTopLinksPeerIpAddr=bnetAtmTopLinksPeerIpAddr, bnetAtmTopLinksEosEntry=bnetAtmTopLinksEosEntry, bnetAtmTopGbl=bnetAtmTopGbl, bnetAtmTopLinksSlotNumIndx=bnetAtmTopLinksSlotNumIndx, bnetAtmTopLinksPeerSlotNum=bnetAtmTopLinksPeerSlotNum)
# sorting algorithm # insertion sorting def insertion_sort(a): for i in range(1, len(a)): print("In the i {%s} A : {%s}" % (i, a)) key = a[i] j = i - 1 print('Before entering in the while j : {%s} , i : {%s} , key : {%s}' % (j, i, key)) while j >= 0 and a[j] > key: print("In the j {%s} A : {%s}" % (j, a)) a[j + 1] = a[j] j = j - 1 a[j + 1] = key # for j in range(i-1, 0): # print('j for loop', j) # if a[j] > a[i]: # print("In the j {%s} i {%s} A : {%s}" % (j, i, a)) # temp = a[j] # a[j] = a[j+1] # a[j+1] = temp # print("In the j {%s} i {%s} A : {%s}" % (j, i, a)) return a # A = [8.01203212, 7, 6.2, 4.123122, 3-3, 43, 432, -2, 43, 42, 224, 2432, -432.0102, -42.4, -242342, -242342, 24234232, # 4, 0, 20, 0.0001, 00.2, 00.32, -0.41, 2, 432, 2, -224223423] # A = [4, 3, 8, 7, 6, 5, 4, 3, 2] A = [5, 4, 6, 8, 1] # A = ['KA', 'CB', 'EC', 'EF', 'ALPHA', 'ZOOM', 'D', 'J'] print("UnSorted list : ", A) insertion_sort(A) print("Sorted list : ", A) j = range(len(A), 0) print(j) j = range(len(A)) print(j)
def insertion_sort(a): for i in range(1, len(a)): print('In the i {%s} A : {%s}' % (i, a)) key = a[i] j = i - 1 print('Before entering in the while j : {%s} , i : {%s} , key : {%s}' % (j, i, key)) while j >= 0 and a[j] > key: print('In the j {%s} A : {%s}' % (j, a)) a[j + 1] = a[j] j = j - 1 a[j + 1] = key return a a = [5, 4, 6, 8, 1] print('UnSorted list : ', A) insertion_sort(A) print('Sorted list : ', A) j = range(len(A), 0) print(j) j = range(len(A)) print(j)
expected_output = { "lldp-global-status": "Disabled", "lldp-advertisement-interval": "30", "lldp-transmit-delay-interval": "0", "lldp-hold-time-interval": "120", "lldp-notification-interval": "5", "ptopo-configuration-trap-interval": "0", "ptopo-maximum-hold-time": "300", "lldp-med-global-status": "Disabled", "lldp-port-id-subtype": "locally-assigned", "lldp-port-description-type": "interface-alias (ifAlias)", }
expected_output = {'lldp-global-status': 'Disabled', 'lldp-advertisement-interval': '30', 'lldp-transmit-delay-interval': '0', 'lldp-hold-time-interval': '120', 'lldp-notification-interval': '5', 'ptopo-configuration-trap-interval': '0', 'ptopo-maximum-hold-time': '300', 'lldp-med-global-status': 'Disabled', 'lldp-port-id-subtype': 'locally-assigned', 'lldp-port-description-type': 'interface-alias (ifAlias)'}
# The following method includes .format() methd to write in a csv file. Otherwise .join() method can be used on ',' when all the elements are string # and there is no extra comma in between a chunk of string. Follow the code below: olympians = [("John Aalberg", 31, "Cross Country Skiing"), ("Minna Maarit Aalto", 30, "Sailing"), ("Win Valdemar Aaltonen", 54, "Art Competitions"), ("Wakako Abe", 18, "Cycling")] outfile = open("reduced_olympics.csv", "w") # output the header row outfile.write('Name,Age,Sport') outfile.write('\n') # output each of the rows: for olympian in olympians: row_string = '{},{},{}'.format(olympian[0], olympian[1], olympian[2]) ### .join() method: # row_string = ','.join(olympian[0], str(olympian[1]), olympian[2]) ### concatenation method: #row_string = olympian[0] + ',' + olympian[1] + ',' + olympian[2] outfile.write(row_string) outfile.write('\n') outfile.close() ### OUTPUT ### # Name,Age,Sport # John Aalberg,31,Cross Country Skiing # Minna Maarit Aalto,30,Sailing # Win Valdemar Aaltonen,54,Art Competitions # Wakako Abe,18,Cycling ####################_______________________________########################## # Now, if there remains any other delimiter in any of the elements of olympians list, then we need to consider each element independently within # whole block of outfile and row_string. That can be accomplished by this format '" ", " ", " "'. See the following block of code and the OUTPUT for # clarification. olympians = [("John Aalberg", 31, "Cross Country Skiing, 15KM"), ("Minna Maarit Aalto", 30, "Sailing"), ("Win Valdemar Aaltonen", 54, "Art Competitions"), ("Wakako Abe", 18, "Cycling")] outfile = open("reduced_olympics2.csv", "w") # output the header row outfile.write('"Name","Age","Sport"') outfile.write('\n') # output each of the rows: for olympian in olympians: row_string = '"{}", "{}", "{}"'.format(olympian[0], olympian[1], olympian[2]) outfile.write(row_string) outfile.write('\n') outfile.close() ### OUTPUT ### # "Name","Age","Sport" # "John Aalberg", "31", "Cross Country Skiing, 15KM" # "Minna Maarit Aalto", "30", "Sailing" # "Win Valdemar Aaltonen", "54", "Art Competitions" # "Wakako Abe", "18", "Cycling"
olympians = [('John Aalberg', 31, 'Cross Country Skiing'), ('Minna Maarit Aalto', 30, 'Sailing'), ('Win Valdemar Aaltonen', 54, 'Art Competitions'), ('Wakako Abe', 18, 'Cycling')] outfile = open('reduced_olympics.csv', 'w') outfile.write('Name,Age,Sport') outfile.write('\n') for olympian in olympians: row_string = '{},{},{}'.format(olympian[0], olympian[1], olympian[2]) outfile.write(row_string) outfile.write('\n') outfile.close() olympians = [('John Aalberg', 31, 'Cross Country Skiing, 15KM'), ('Minna Maarit Aalto', 30, 'Sailing'), ('Win Valdemar Aaltonen', 54, 'Art Competitions'), ('Wakako Abe', 18, 'Cycling')] outfile = open('reduced_olympics2.csv', 'w') outfile.write('"Name","Age","Sport"') outfile.write('\n') for olympian in olympians: row_string = '"{}", "{}", "{}"'.format(olympian[0], olympian[1], olympian[2]) outfile.write(row_string) outfile.write('\n') outfile.close()
tables = [ "title.principals.csv", "title.akas.csv", "title.ratings.csv", "title.basics.csv", "name.basics.csv" ] data_cardinality = { "3GB":{ "title.principals": 36499704, "title.akas": 19344171, "title.ratings": 993821, "title.basics": 6326545, "name.basics": 9711022 } } database_meta = { "title.principals": { "schema": "(String, Int, String, String, String, String)", "fields": ['titleId', 'ordering', 'nconst', 'category', 'job', 'characters'], "date_fields": [], "filter_fields": ["category"], "join_fields": { "titleId": { "title.akas": "titleId", "title.ratings": "titleId", "title.basics": "titleId", }, "nconst": { "name.basics":"nconst" } }, "groupby_fields": ["category", "nconst", "titleId"] }, "title.akas": { "schema": "(String, Int, String, String, String, String, String, String)", "fields": ['titleId', 'ordering', 'title', 'region', 'language', 'types', 'attributes', 'isOriginalTitle'], "date_fields": [], "filter_fields": ["region", "types", "isOriginalTitle"], "join_fields": { "titleId": { "title.principals": "titleId", "title.ratings": "titleId", "title.basics": "titleId", } }, "groupby_fields": ["region", "types", "isOriginalTitle" ] }, "title.ratings": { "schema": "(String, Float, Int)", "fields": ['titleId', 'averageRating', 'numVotes'], "date_fields": [], "filter_fields": ["averageRating", "numVotes"], "join_fields": { "titleId": { "title.principals": "titleId", "title.akas": "titleId", "title.basics": "titleId", } }, "groupby_fields": [] }, "title.basics": { "schema": "(String, String, String, String, Int, Int, Int, Int, String)", "fields": ['titleId', 'titleType', 'primaryTitle', 'originalTitle', 'isAdult', 'startYear', 'endYear', 'runtimeMinutes', 'genres'], "date_fields": [], "filter_fields": ["titleType", "isAdult", "startYear"], "join_fields": { "titleId": { "title.principals": "titleId", "title.akas": "titleId", "title.ratings": "titleId" } }, "groupby_fields": ["isAdult", "titleType"] }, "name.basics": { "schema": "(String, String, Int, Int, String, String)", "fields": ['nconst', 'primaryName', 'birthYear', 'deathYear', 'primaryProfession', 'knownForTitles'], "date_fields": [], "filter_fields": ["birthYear", "deathYear", "primaryProfession"], "join_fields": { "nconst": { "title.principals": "nconst" } }, "groupby_fields": ["primaryProfession"] } }
tables = ['title.principals.csv', 'title.akas.csv', 'title.ratings.csv', 'title.basics.csv', 'name.basics.csv'] data_cardinality = {'3GB': {'title.principals': 36499704, 'title.akas': 19344171, 'title.ratings': 993821, 'title.basics': 6326545, 'name.basics': 9711022}} database_meta = {'title.principals': {'schema': '(String, Int, String, String, String, String)', 'fields': ['titleId', 'ordering', 'nconst', 'category', 'job', 'characters'], 'date_fields': [], 'filter_fields': ['category'], 'join_fields': {'titleId': {'title.akas': 'titleId', 'title.ratings': 'titleId', 'title.basics': 'titleId'}, 'nconst': {'name.basics': 'nconst'}}, 'groupby_fields': ['category', 'nconst', 'titleId']}, 'title.akas': {'schema': '(String, Int, String, String, String, String, String, String)', 'fields': ['titleId', 'ordering', 'title', 'region', 'language', 'types', 'attributes', 'isOriginalTitle'], 'date_fields': [], 'filter_fields': ['region', 'types', 'isOriginalTitle'], 'join_fields': {'titleId': {'title.principals': 'titleId', 'title.ratings': 'titleId', 'title.basics': 'titleId'}}, 'groupby_fields': ['region', 'types', 'isOriginalTitle']}, 'title.ratings': {'schema': '(String, Float, Int)', 'fields': ['titleId', 'averageRating', 'numVotes'], 'date_fields': [], 'filter_fields': ['averageRating', 'numVotes'], 'join_fields': {'titleId': {'title.principals': 'titleId', 'title.akas': 'titleId', 'title.basics': 'titleId'}}, 'groupby_fields': []}, 'title.basics': {'schema': '(String, String, String, String, Int, Int, Int, Int, String)', 'fields': ['titleId', 'titleType', 'primaryTitle', 'originalTitle', 'isAdult', 'startYear', 'endYear', 'runtimeMinutes', 'genres'], 'date_fields': [], 'filter_fields': ['titleType', 'isAdult', 'startYear'], 'join_fields': {'titleId': {'title.principals': 'titleId', 'title.akas': 'titleId', 'title.ratings': 'titleId'}}, 'groupby_fields': ['isAdult', 'titleType']}, 'name.basics': {'schema': '(String, String, Int, Int, String, String)', 'fields': ['nconst', 'primaryName', 'birthYear', 'deathYear', 'primaryProfession', 'knownForTitles'], 'date_fields': [], 'filter_fields': ['birthYear', 'deathYear', 'primaryProfession'], 'join_fields': {'nconst': {'title.principals': 'nconst'}}, 'groupby_fields': ['primaryProfession']}}
list1 = [] input_str1 = input("Please input a word: ") str1 = input_str1.lower() list1 = list(str1) for item in list1: if item == 'a' or item == 'e' or item == 'i' or item == 'o' or item == 'u': while True: try: list1.remove(item) except: break output = ''.join(list1).capitalize() print(output)
list1 = [] input_str1 = input('Please input a word: ') str1 = input_str1.lower() list1 = list(str1) for item in list1: if item == 'a' or item == 'e' or item == 'i' or (item == 'o') or (item == 'u'): while True: try: list1.remove(item) except: break output = ''.join(list1).capitalize() print(output)
def reverse_words(s): return ' '.join(s.split(' ')[::-1]) # Best Practices def reverseWords(str): return " ".join(str.split(" ")[::-1])
def reverse_words(s): return ' '.join(s.split(' ')[::-1]) def reverse_words(str): return ' '.join(str.split(' ')[::-1])
# encoding: utf-8 START_SERVERS = u'Start DNS Server' STOP_SERVERS = u'Stop DNS Server'
start_servers = u'Start DNS Server' stop_servers = u'Stop DNS Server'
# Problem 7 100001st Prime primes = [] number = 1000000 for x in range(2, number+1): isPrime = True for y in range(2, int(x**0.5)+1): if x%y ==0: isPrime = False break if isPrime: primes.append(x) if len(primes) == 10001: print(primes[-1]) break
primes = [] number = 1000000 for x in range(2, number + 1): is_prime = True for y in range(2, int(x ** 0.5) + 1): if x % y == 0: is_prime = False break if isPrime: primes.append(x) if len(primes) == 10001: print(primes[-1]) break
# Annette Chun # amc4sq # 02/22/16 # helper.py __author__ = 'Annette Chun' def greeting(msg): print(msg)
__author__ = 'Annette Chun' def greeting(msg): print(msg)
# -*- coding: utf-8 -*- # Jamdict-web - Japanese Reading Assistant # This code is a part of jamdict-web library: https://github.com/neocl/jamdict-web # :copyright: (c) 2021 Le Tuan Anh <tuananh.ke@gmail.com> # :license: MIT, see LICENSE for more details. __author__ = "Le Tuan Anh" __email__ = "tuananh.ke@gmail.com" __copyright__ = "Copyright (c) 2021, Le Tuan Anh" __credits__ = [] __license__ = "MIT License" __description__ = "Free and open-source Japanese Reading Assistant with morphological analyser, Japanese-English dictionary, Kanji dictionary, and Japanese Names dictionary" __url__ = "https://github.com/neocl/jamdict-web" __maintainer__ = "Le Tuan Anh" __version_major__ = "1.0" __version__ = "{}b1".format(__version_major__) __status__ = "4 - Beta" __version_long__ = "{} - {}".format(__version_major__, __status__)
__author__ = 'Le Tuan Anh' __email__ = 'tuananh.ke@gmail.com' __copyright__ = 'Copyright (c) 2021, Le Tuan Anh' __credits__ = [] __license__ = 'MIT License' __description__ = 'Free and open-source Japanese Reading Assistant with morphological analyser, Japanese-English dictionary, Kanji dictionary, and Japanese Names dictionary' __url__ = 'https://github.com/neocl/jamdict-web' __maintainer__ = 'Le Tuan Anh' __version_major__ = '1.0' __version__ = '{}b1'.format(__version_major__) __status__ = '4 - Beta' __version_long__ = '{} - {}'.format(__version_major__, __status__)
alphabet = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ") def cipher(text,key): new_text = "" for index,letter in enumerate(text): offset = key[index%len(key)] try: position = alphabet.index(letter.upper()) new_position = (position+offset)%len(alphabet) new_text+=alphabet[new_position] except: new_text+=letter return new_text def invert_key(key): return [0-x for x in key] def decipher(text,key): key = invert_key(key) return cipher(text,key) def key_word_to_list(key): return [alphabet.index(x.upper()) for x in key] option = 1 while 1 <= option <= 2: print("Caesar Cipher:\n1) Cipher\n2) Decipher\nOther) Exit") option = int(input()) if option == 1: text = input("Text to cipher:\n").strip() key = input("Key: ").strip(); key = key_word_to_list(key) if key.isalpha() else [int(key)] ciphered_text = cipher(text,key) print(ciphered_text) input("Press Enter to continue:") elif option == 2: text = input("Text to decipher:\n").strip() key = input("Key: ").strip(); key = key_word_to_list(key); deciphered_text = decipher(text,key) print(deciphered_text) input("Press Enter to continue:")
alphabet = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ') def cipher(text, key): new_text = '' for (index, letter) in enumerate(text): offset = key[index % len(key)] try: position = alphabet.index(letter.upper()) new_position = (position + offset) % len(alphabet) new_text += alphabet[new_position] except: new_text += letter return new_text def invert_key(key): return [0 - x for x in key] def decipher(text, key): key = invert_key(key) return cipher(text, key) def key_word_to_list(key): return [alphabet.index(x.upper()) for x in key] option = 1 while 1 <= option <= 2: print('Caesar Cipher:\n1) Cipher\n2) Decipher\nOther) Exit') option = int(input()) if option == 1: text = input('Text to cipher:\n').strip() key = input('Key: ').strip() key = key_word_to_list(key) if key.isalpha() else [int(key)] ciphered_text = cipher(text, key) print(ciphered_text) input('Press Enter to continue:') elif option == 2: text = input('Text to decipher:\n').strip() key = input('Key: ').strip() key = key_word_to_list(key) deciphered_text = decipher(text, key) print(deciphered_text) input('Press Enter to continue:')
amber99_dict = { 'NHE': [ ( 'N<0>([H]<1>)([H]<2>)', { 0: ('N' , 'N' , -0.4630, 1.8240), 1: ('HN1' , 'H' , 0.2315, 0.6000), 2: ('HN2' , 'H' , 0.2315, 0.6000), }, ), ], 'NME': [ ( 'N<0>([H]<1>)[C@]<2>([H]<3>)([H]<4>)[H]<5>', { 0: ('N' , 'N' , -0.4157, 1.8240), 1: ('H' , 'H' , 0.2719, 0.6000), 2: ('CH3' , 'CT' , -0.1490, 1.9080), 3: ('HH31', 'HC' , 0.0976, 1.3870), 4: ('HH32', 'HC' , 0.0976, 1.3870), 5: ('HH33', 'HC' , 0.0976, 1.3870), }, ), ], 'ACE': [ ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([H]<4>)[H]<5>', { 0: ('C' , 'C' , 0.5972, 1.9080), 1: ('O' , 'O' , -0.5679, 1.6612), 2: ('CH3' , 'CT' , -0.3662, 1.9080), 3: ('HH31', 'HC' , 0.1123, 1.4870), 4: ('HH32', 'HC' , 0.1123, 1.4870), 5: ('HH33', 'HC' , 0.1123, 1.4870), }, ), ], 'ALA': [ ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@]<4>([H]<5>)([H]<6>)[H]<7>)C<8>=O<9>', { 0: ('N' , 'N' , -0.4157, 1.8240), 1: ('H' , 'H' , 0.2719, 0.6000), 2: ('CA' , 'CT' , 0.0337, 1.9080), 3: ('HA' , 'H1' , 0.0823, 1.3870), 4: ('CB' , 'CT' , -0.1825, 1.9080), 5: ('HB3' , 'HC' , 0.0603, 1.4870), 6: ('HB2' , 'HC' , 0.0603, 1.4870), 7: ('HB1' , 'HC' , 0.0603, 1.4870), 8: ('C' , 'C' , 0.5973, 1.9080), 9: ('O' , 'O' , -0.5679, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([C@]<4>([H]<5>)([H]<6>)[H]<7>)[N@+]<8>([H]<9>)([H]<10>)[H]<11>', { 0: ('C' , 'C' , 0.6163, 1.9080), 1: ('O' , 'O' , -0.5722, 1.6612), 2: ('CA' , 'CT' , 0.0962, 1.9080), 3: ('HA' , 'HP' , 0.0889, 1.1000), 4: ('CB' , 'CT' , -0.0597, 1.9080), 5: ('HB3' , 'HC' , 0.0300, 1.4870), 6: ('HB2' , 'HC' , 0.0300, 1.4870), 7: ('HB1' , 'HC' , 0.0300, 1.4870), 8: ('N' , 'N3' , 0.1414, 1.8240), 9: ('H3' , 'H' , 0.1997, 0.6000), 10: ('H2' , 'H' , 0.1997, 0.6000), 11: ('H1' , 'H' , 0.1997, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@]<4>([H]<5>)([H]<6>)[H]<7>)C<8>([O-]<9>)=O<10>', { 0: ('N' , 'N' , -0.3821, 1.8240), 1: ('H' , 'H' , 0.2681, 0.6000), 2: ('CA' , 'CT' , -0.1747, 1.9080), 3: ('HA' , 'H1' , 0.1067, 1.3870), 4: ('CB' , 'CT' , -0.2093, 1.9080), 5: ('HB3' , 'HC' , 0.0764, 1.4870), 6: ('HB2' , 'HC' , 0.0764, 1.4870), 7: ('HB1' , 'HC' , 0.0764, 1.4870), 8: ('C' , 'C' , 0.7731, 1.9080), 9: ('OXT' , 'O2' , -0.8055, 1.6612), 10: ('O' , 'O2' , -0.8055, 1.6612), }, ), ], 'ARG': [ ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)[C@@]<10>([H]<11>)([H]<12>)N<13>([H]<14>)C<15>(N<16>([H]<17>)[H]<18>)=[N+]<19>([H]<20>)[H]<21>)C<22>=O<23>', { 0: ('N' , 'N' , -0.3479, 1.8240), 1: ('H' , 'H' , 0.2747, 0.6000), 2: ('CA' , 'CT' , -0.2637, 1.9080), 3: ('HA' , 'H1' , 0.1560, 1.3870), 4: ('CB' , 'CT' , -0.0007, 1.9080), 5: ('HB3' , 'HC' , 0.0327, 1.4870), 6: ('HB2' , 'HC' , 0.0327, 1.4870), 7: ('CG' , 'CT' , 0.0390, 1.9080), 8: ('HG3' , 'HC' , 0.0285, 1.4870), 9: ('HG2' , 'HC' , 0.0285, 1.4870), 10: ('CD' , 'CT' , 0.0486, 1.9080), 11: ('HD3' , 'H1' , 0.0687, 1.3870), 12: ('HD2' , 'H1' , 0.0687, 1.3870), 13: ('NE' , 'N2' , -0.5295, 1.8240), 14: ('HE' , 'H' , 0.3456, 0.6000), 15: ('CZ' , 'CA' , 0.8076, 1.9080), 16: ('NH2' , 'N2' , -0.8627, 1.8240), 17: ('HH22', 'H' , 0.4478, 0.6000), 18: ('HH21', 'H' , 0.4478, 0.6000), 19: ('NH1' , 'N2' , -0.8627, 1.8240), 20: ('HH12', 'H' , 0.4478, 0.6000), 21: ('HH11', 'H' , 0.4478, 0.6000), 22: ('C' , 'C' , 0.7341, 1.9080), 23: ('O' , 'O' , -0.5894, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)[C@@]<10>([H]<11>)([H]<12>)N<13>([H]<14>)C<15>(N<16>([H]<17>)[H]<18>)=[N+]<19>([H]<20>)[H]<21>)[N@+]<22>([H]<23>)([H]<24>)[H]<25>', { 0: ('C' , 'C' , 0.7214, 1.9080), 1: ('O' , 'O' , -0.6013, 1.6612), 2: ('CA' , 'CT' , -0.0223, 1.9080), 3: ('HA' , 'HP' , 0.1242, 1.1000), 4: ('CB' , 'CT' , 0.0118, 1.9080), 5: ('HB3' , 'HC' , 0.0226, 1.4870), 6: ('HB2' , 'HC' , 0.0226, 1.4870), 7: ('CG' , 'CT' , 0.0236, 1.9080), 8: ('HG3' , 'HC' , 0.0309, 1.4870), 9: ('HG2' , 'HC' , 0.0309, 1.4870), 10: ('CD' , 'CT' , 0.0935, 1.9080), 11: ('HD3' , 'H1' , 0.0527, 1.3870), 12: ('HD2' , 'H1' , 0.0527, 1.3870), 13: ('NE' , 'N2' , -0.5650, 1.8240), 14: ('HE' , 'H' , 0.3592, 0.6000), 15: ('CZ' , 'CA' , 0.8281, 1.9080), 16: ('NH2' , 'N2' , -0.8693, 1.8240), 17: ('HH22', 'H' , 0.4494, 0.6000), 18: ('HH21', 'H' , 0.4494, 0.6000), 19: ('NH1' , 'N2' , -0.8693, 1.8240), 20: ('HH12', 'H' , 0.4494, 0.6000), 21: ('HH11', 'H' , 0.4494, 0.6000), 22: ('N' , 'N3' , 0.1305, 1.8240), 23: ('H3' , 'H' , 0.2083, 0.6000), 24: ('H2' , 'H' , 0.2083, 0.6000), 25: ('H1' , 'H' , 0.2083, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)[C@@]<10>([H]<11>)([H]<12>)N<13>([H]<14>)C<15>(N<16>([H]<17>)[H]<18>)=[N+]<19>([H]<20>)[H]<21>)C<22>([O-]<23>)=O<24>', { 0: ('N' , 'N' , -0.3481, 1.8240), 1: ('H' , 'H' , 0.2764, 0.6000), 2: ('CA' , 'CT' , -0.3068, 1.9080), 3: ('HA' , 'H1' , 0.1447, 1.3870), 4: ('CB' , 'CT' , -0.0374, 1.9080), 5: ('HB3' , 'HC' , 0.0371, 1.4870), 6: ('HB2' , 'HC' , 0.0371, 1.4870), 7: ('CG' , 'CT' , 0.0744, 1.9080), 8: ('HG3' , 'HC' , 0.0185, 1.4870), 9: ('HG2' , 'HC' , 0.0185, 1.4870), 10: ('CD' , 'CT' , 0.1114, 1.9080), 11: ('HD3' , 'H1' , 0.0468, 1.3870), 12: ('HD2' , 'H1' , 0.0468, 1.3870), 13: ('NE' , 'N2' , -0.5564, 1.8240), 14: ('HE' , 'H' , 0.3479, 0.6000), 15: ('CZ' , 'CA' , 0.8368, 1.9080), 16: ('NH2' , 'N2' , -0.8737, 1.8240), 17: ('HH22', 'H' , 0.4493, 0.6000), 18: ('HH21', 'H' , 0.4493, 0.6000), 19: ('NH1' , 'N2' , -0.8737, 1.8240), 20: ('HH12', 'H' , 0.4493, 0.6000), 21: ('HH11', 'H' , 0.4493, 0.6000), 22: ('C' , 'C' , 0.8557, 1.9080), 23: ('OXT' , 'O2' , -0.8266, 1.6612), 24: ('O' , 'O2' , -0.8266, 1.6612), }, ), ], 'ASP': [ ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>([O-]<8>)=O<9>)C<10>=O<11>', { 0: ('N' , 'N' , -0.5163, 1.8240), 1: ('H' , 'H' , 0.2936, 0.6000), 2: ('CA' , 'CT' , 0.0381, 1.9080), 3: ('HA' , 'H1' , 0.0880, 1.3870), 4: ('CB' , 'CT' , -0.0303, 1.9080), 5: ('HB3' , 'HC' , -0.0122, 1.4870), 6: ('HB2' , 'HC' , -0.0122, 1.4870), 7: ('CG' , 'C' , 0.7994, 1.9080), 8: ('OD2' , 'O2' , -0.8014, 1.6612), 9: ('OD1' , 'O2' , -0.8014, 1.6612), 10: ('C' , 'C' , 0.5366, 1.9080), 11: ('O' , 'O' , -0.5819, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>([O-]<8>)=O<9>)[N@+]<10>([H]<11>)([H]<12>)[H]<13>', { 0: ('C' , 'C' , 0.5621, 1.9080), 1: ('O' , 'O' , -0.5889, 1.6612), 2: ('CA' , 'CT' , 0.0292, 1.9080), 3: ('HA' , 'HP' , 0.1141, 1.1000), 4: ('CB' , 'CT' , -0.0235, 1.9080), 5: ('HB3' , 'HC' , -0.0169, 1.4870), 6: ('HB2' , 'HC' , -0.0169, 1.4870), 7: ('CG' , 'C' , 0.8194, 1.9080), 8: ('OD2' , 'O2' , -0.8084, 1.6612), 9: ('OD1' , 'O2' , -0.8084, 1.6612), 10: ('N' , 'N3' , 0.0782, 1.8240), 11: ('H3' , 'H' , 0.2200, 0.6000), 12: ('H2' , 'H' , 0.2200, 0.6000), 13: ('H1' , 'H' , 0.2200, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>([O-]<8>)=O<9>)C<10>([O-]<11>)=O<12>', { 0: ('N' , 'N' , -0.5192, 1.8240), 1: ('H' , 'H' , 0.3055, 0.6000), 2: ('CA' , 'CT' , -0.1817, 1.9080), 3: ('HA' , 'H1' , 0.1046, 1.3870), 4: ('CB' , 'CT' , -0.0677, 1.9080), 5: ('HB3' , 'HC' , -0.0212, 1.4870), 6: ('HB2' , 'HC' , -0.0212, 1.4870), 7: ('CG' , 'C' , 0.8851, 1.9080), 8: ('OD2' , 'O2' , -0.8162, 1.6612), 9: ('OD1' , 'O2' , -0.8162, 1.6612), 10: ('C' , 'C' , 0.7256, 1.9080), 11: ('OXT' , 'O2' , -0.7887, 1.6612), 12: ('O' , 'O2' , -0.7887, 1.6612), }, ), ], 'ASN': [ ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>(=O<8>)N<9>([H]<10>)[H]<11>)C<12>=O<13>', { 0: ('N' , 'N' , -0.4157, 1.8240), 1: ('H' , 'H' , 0.2719, 0.6000), 2: ('CA' , 'CT' , 0.0143, 1.9080), 3: ('HA' , 'H1' , 0.1048, 1.3870), 4: ('CB' , 'CT' , -0.2041, 1.9080), 5: ('HB3' , 'HC' , 0.0797, 1.4870), 6: ('HB2' , 'HC' , 0.0797, 1.4870), 7: ('CG' , 'C' , 0.7130, 1.9080), 8: ('OD1' , 'O' , -0.5931, 1.6612), 9: ('ND2' , 'N' , -0.9191, 1.8240), 10: ('HD22', 'H' , 0.4196, 0.6000), 11: ('HD21', 'H' , 0.4196, 0.6000), 12: ('C' , 'C' , 0.5973, 1.9080), 13: ('O' , 'O' , -0.5679, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>(=O<8>)N<9>([H]<10>)[H]<11>)[N@+]<12>([H]<13>)([H]<14>)[H]<15>', { 0: ('C' , 'C' , 0.6163, 1.9080), 1: ('O' , 'O' , -0.5722, 1.6612), 2: ('CA' , 'CT' , 0.0368, 1.9080), 3: ('HA' , 'HP' , 0.1231, 1.1000), 4: ('CB' , 'CT' , -0.0283, 1.9080), 5: ('HB3' , 'HC' , 0.0515, 1.4870), 6: ('HB2' , 'HC' , 0.0515, 1.4870), 7: ('CG' , 'C' , 0.5833, 1.9080), 8: ('OD1' , 'O' , -0.5744, 1.6612), 9: ('ND2' , 'N' , -0.8634, 1.8240), 10: ('HD22', 'H' , 0.4097, 0.6000), 11: ('HD21', 'H' , 0.4097, 0.6000), 12: ('N' , 'N3' , 0.1801, 1.8240), 13: ('H3' , 'H' , 0.1921, 0.6000), 14: ('H2' , 'H' , 0.1921, 0.6000), 15: ('H1' , 'H' , 0.1921, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>(=O<8>)N<9>([H]<10>)[H]<11>)C<12>([O-]<13>)=O<14>', { 0: ('N' , 'N' , -0.3821, 1.8240), 1: ('H' , 'H' , 0.2681, 0.6000), 2: ('CA' , 'CT' , -0.2080, 1.9080), 3: ('HA' , 'H1' , 0.1358, 1.3870), 4: ('CB' , 'CT' , -0.2299, 1.9080), 5: ('HB3' , 'HC' , 0.1023, 1.4870), 6: ('HB2' , 'HC' , 0.1023, 1.4870), 7: ('CG' , 'C' , 0.7153, 1.9080), 8: ('OD1' , 'O' , -0.6010, 1.6612), 9: ('ND2' , 'N' , -0.9084, 1.8240), 10: ('HD22', 'H' , 0.4150, 0.6000), 11: ('HD21', 'H' , 0.4150, 0.6000), 12: ('C' , 'C' , 0.8050, 1.9080), 13: ('OXT' , 'O2' , -0.8147, 1.6612), 14: ('O' , 'O2' , -0.8147, 1.6612), }, ), ], 'CYS': [ ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)S<7>[H]<8>)C<9>=O<10>', { 0: ('N' , 'N' , -0.4157, 1.8240), 1: ('H' , 'H' , 0.2719, 0.6000), 2: ('CA' , 'CT' , 0.0213, 1.9080), 3: ('HA' , 'H1' , 0.1124, 1.3870), 4: ('CB' , 'CT' , -0.1231, 1.9080), 5: ('HB3' , 'H1' , 0.1112, 1.3870), 6: ('HB2' , 'H1' , 0.1112, 1.3870), 7: ('SG' , 'SH' , -0.3119, 2.0000), 8: ('HG' , 'HS' , 0.1933, 0.6000), 9: ('C' , 'C' , 0.5973, 1.9080), 10: ('O' , 'O' , -0.5679, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)S<7>[H]<8>)[N@+]<9>([H]<10>)([H]<11>)[H]<12>', { 0: ('C' , 'C' , 0.6123, 1.9080), 1: ('O' , 'O' , -0.5713, 1.6612), 2: ('CA' , 'CT' , 0.0927, 1.9080), 3: ('HA' , 'HP' , 0.1411, 1.1000), 4: ('CB' , 'CT' , -0.1195, 1.9080), 5: ('HB3' , 'H1' , 0.1188, 1.3870), 6: ('HB2' , 'H1' , 0.1188, 1.3870), 7: ('SG' , 'SH' , -0.3298, 2.0000), 8: ('HG' , 'HS' , 0.1975, 0.6000), 9: ('N' , 'N3' , 0.1325, 1.8240), 10: ('H3' , 'H' , 0.2023, 0.6000), 11: ('H2' , 'H' , 0.2023, 0.6000), 12: ('H1' , 'H' , 0.2023, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)S<7>[H]<8>)C<9>([O-]<10>)=O<11>', { 0: ('N' , 'N' , -0.3821, 1.8240), 1: ('H' , 'H' , 0.2681, 0.6000), 2: ('CA' , 'CT' , -0.1635, 1.9080), 3: ('HA' , 'H1' , 0.1396, 1.3870), 4: ('CB' , 'CT' , -0.1996, 1.9080), 5: ('HB3' , 'H1' , 0.1437, 1.3870), 6: ('HB2' , 'H1' , 0.1437, 1.3870), 7: ('SG' , 'SH' , -0.3102, 2.0000), 8: ('HG' , 'HS' , 0.2068, 0.6000), 9: ('C' , 'C' , 0.7497, 1.9080), 10: ('OXT' , 'O2' , -0.7981, 1.6612), 11: ('O' , 'O2' , -0.7981, 1.6612), }, ), ( # disulfide bonded 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)S<7>S<7>)C<9>=O<10>', { 0: ('N' , 'N' , -0.4157, 1.8240), 1: ('H' , 'H' , 0.2719, 0.6000), 2: ('CA' , 'CT' , 0.0429, 1.9080), 3: ('HA' , 'H1' , 0.0766, 1.3870), 4: ('CB' , 'CT' , -0.0790, 1.9080), 5: ('HB3' , 'H1' , 0.0910, 1.3870), 6: ('HB2' , 'H1' , 0.0910, 1.3870), 7: ('SG' , 'S' , -0.1081, 2.0000), 9: ('C' , 'C' , 0.5973, 1.9080), 10: ('O' , 'O' , -0.5679, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)S<7>S<7>)[N@+]<9>([H]<10>)([H]<11>)[H]<12>', { 0: ('C' , 'C' , 0.6123, 1.9080), 1: ('O' , 'O' , -0.5713, 1.6612), 2: ('CA' , 'CT' , 0.1055, 1.9080), 3: ('HA' , 'HP' , 0.0922, 1.1000), 4: ('CB' , 'CT' , -0.0277, 1.9080), 5: ('HB3' , 'H1' , 0.0680, 1.3870), 6: ('HB2' , 'H1' , 0.0680, 1.3870), 7: ('SG' , 'S' , -0.0984, 2.0000), 9: ('N' , 'N3' , 0.2069, 1.8240), 10: ('H3' , 'H' , 0.1815, 0.6000), 11: ('H2' , 'H' , 0.1815, 0.6000), 12: ('H1' , 'H' , 0.1815, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)S<7>S<7>)C<9>([O-]<10>)=O<11>', { 0: ('N' , 'N' , -0.3821, 1.8240), 1: ('H' , 'H' , 0.2681, 0.6000), 2: ('CA' , 'CT' , -0.1318, 1.9080), 3: ('HA' , 'H1' , 0.0938, 1.3870), 4: ('CB' , 'CT' , -0.1934, 1.9080), 5: ('HB3' , 'H1' , 0.1228, 1.3870), 6: ('HB2' , 'H1' , 0.1228, 1.3870), 7: ('SG' , 'S' , -0.0529, 2.0000), 9: ('C' , 'C' , 0.7618, 1.9080), 10: ('OXT' , 'O2' , -0.8041, 1.6612), 11: ('O' , 'O2' , -0.8041, 1.6612), }, ), ], 'CYX': [ ( # disulfide bonded 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)S<7>S<7>)C<9>=O<10>', { 0: ('N' , 'N' , -0.4157, 1.8240), 1: ('H' , 'H' , 0.2719, 0.6000), 2: ('CA' , 'CT' , 0.0429, 1.9080), 3: ('HA' , 'H1' , 0.0766, 1.3870), 4: ('CB' , 'CT' , -0.0790, 1.9080), 5: ('HB3' , 'H1' , 0.0910, 1.3870), 6: ('HB2' , 'H1' , 0.0910, 1.3870), 7: ('SG' , 'S' , -0.1081, 2.0000), 9: ('C' , 'C' , 0.5973, 1.9080), 10: ('O' , 'O' , -0.5679, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)S<7>S<7>)[N@+]<9>([H]<10>)([H]<11>)[H]<12>', { 0: ('C' , 'C' , 0.6123, 1.9080), 1: ('O' , 'O' , -0.5713, 1.6612), 2: ('CA' , 'CT' , 0.1055, 1.9080), 3: ('HA' , 'HP' , 0.0922, 1.1000), 4: ('CB' , 'CT' , -0.0277, 1.9080), 5: ('HB3' , 'H1' , 0.0680, 1.3870), 6: ('HB2' , 'H1' , 0.0680, 1.3870), 7: ('SG' , 'S' , -0.0984, 2.0000), 9: ('N' , 'N3' , 0.2069, 1.8240), 10: ('H3' , 'H' , 0.1815, 0.6000), 11: ('H2' , 'H' , 0.1815, 0.6000), 12: ('H1' , 'H' , 0.1815, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)S<7>S<7>)C<9>([O-]<10>)=O<11>', { 0: ('N' , 'N' , -0.3821, 1.8240), 1: ('H' , 'H' , 0.2681, 0.6000), 2: ('CA' , 'CT' , -0.1318, 1.9080), 3: ('HA' , 'H1' , 0.0938, 1.3870), 4: ('CB' , 'CT' , -0.1934, 1.9080), 5: ('HB3' , 'H1' , 0.1228, 1.3870), 6: ('HB2' , 'H1' , 0.1228, 1.3870), 7: ('SG' , 'S' , -0.0529, 2.0000), 9: ('C' , 'C' , 0.7618, 1.9080), 10: ('OXT' , 'O2' , -0.8041, 1.6612), 11: ('O' , 'O2' , -0.8041, 1.6612), }, ), ], 'GLN': [ ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)C<10>(=O<11>)N<12>([H]<13>)[H]<14>)C<15>=O<16>', { 0: ('N' , 'N' , -0.4157, 1.8240), 1: ('H' , 'H' , 0.2719, 0.6000), 2: ('CA' , 'CT' , -0.0031, 1.9080), 3: ('HA' , 'H1' , 0.0850, 1.3870), 4: ('CB' , 'CT' , -0.0036, 1.9080), 5: ('HB3' , 'HC' , 0.0171, 1.4870), 6: ('HB2' , 'HC' , 0.0171, 1.4870), 7: ('CG' , 'CT' , -0.0645, 1.9080), 8: ('HG3' , 'HC' , 0.0352, 1.4870), 9: ('HG2' , 'HC' , 0.0352, 1.4870), 10: ('CD' , 'C' , 0.6951, 1.9080), 11: ('OE1' , 'O' , -0.6086, 1.6612), 12: ('NE2' , 'N' , -0.9407, 1.8240), 13: ('HE22', 'H' , 0.4251, 0.6000), 14: ('HE21', 'H' , 0.4251, 0.6000), 15: ('C' , 'C' , 0.5973, 1.9080), 16: ('O' , 'O' , -0.5679, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)C<10>(=O<11>)N<12>([H]<13>)[H]<14>)[N@+]<15>([H]<16>)([H]<17>)[H]<18>', { 0: ('C' , 'C' , 0.6123, 1.9080), 1: ('O' , 'O' , -0.5713, 1.6612), 2: ('CA' , 'CT' , 0.0536, 1.9080), 3: ('HA' , 'HP' , 0.1015, 1.1000), 4: ('CB' , 'CT' , 0.0651, 1.9080), 5: ('HB3' , 'HC' , 0.0050, 1.4870), 6: ('HB2' , 'HC' , 0.0050, 1.4870), 7: ('CG' , 'CT' , -0.0903, 1.9080), 8: ('HG3' , 'HC' , 0.0331, 1.4870), 9: ('HG2' , 'HC' , 0.0331, 1.4870), 10: ('CD' , 'C' , 0.7354, 1.9080), 11: ('OE1' , 'O' , -0.6133, 1.6612), 12: ('NE2' , 'N' , -1.0031, 1.8240), 13: ('HE22', 'H' , 0.4429, 0.6000), 14: ('HE21', 'H' , 0.4429, 0.6000), 15: ('N' , 'N3' , 0.1493, 1.8240), 16: ('H3' , 'H' , 0.1996, 0.6000), 17: ('H2' , 'H' , 0.1996, 0.6000), 18: ('H1' , 'H' , 0.1996, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)C<10>(=O<11>)N<12>([H]<13>)[H]<14>)C<15>([O-]<16>)=O<17>', { 0: ('N' , 'N' , -0.3821, 1.8240), 1: ('H' , 'H' , 0.2681, 0.6000), 2: ('CA' , 'CT' , -0.2248, 1.9080), 3: ('HA' , 'H1' , 0.1232, 1.3870), 4: ('CB' , 'CT' , -0.0664, 1.9080), 5: ('HB3' , 'HC' , 0.0452, 1.4870), 6: ('HB2' , 'HC' , 0.0452, 1.4870), 7: ('CG' , 'CT' , -0.0210, 1.9080), 8: ('HG3' , 'HC' , 0.0203, 1.4870), 9: ('HG2' , 'HC' , 0.0203, 1.4870), 10: ('CD' , 'C' , 0.7093, 1.9080), 11: ('OE1' , 'O' , -0.6098, 1.6612), 12: ('NE2' , 'N' , -0.9574, 1.8240), 13: ('HE22', 'H' , 0.4304, 0.6000), 14: ('HE21', 'H' , 0.4304, 0.6000), 15: ('C' , 'C' , 0.7775, 1.9080), 16: ('OXT' , 'O2' , -0.8042, 1.6612), 17: ('O' , 'O2' , -0.8042, 1.6612), }, ), ], 'GLU': [ ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)C<10>([O-]<11>)=O<12>)C<13>=O<14>', { 0: ('N' , 'N' , -0.5163, 1.8240), 1: ('H' , 'H' , 0.2936, 0.6000), 2: ('CA' , 'CT' , 0.0397, 1.9080), 3: ('HA' , 'H1' , 0.1105, 1.3870), 4: ('CB' , 'CT' , 0.0560, 1.9080), 5: ('HB3' , 'HC' , -0.0173, 1.4870), 6: ('HB2' , 'HC' , -0.0173, 1.4870), 7: ('CG' , 'CT' , 0.0136, 1.9080), 8: ('HG3' , 'HC' , -0.0425, 1.4870), 9: ('HG2' , 'HC' , -0.0425, 1.4870), 10: ('CD' , 'C' , 0.8054, 1.9080), 11: ('OE2' , 'O2' , -0.8188, 1.6612), 12: ('OE1' , 'O2' , -0.8188, 1.6612), 13: ('C' , 'C' , 0.5366, 1.9080), 14: ('O' , 'O' , -0.5819, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)C<10>([O-]<11>)=O<12>)[N@+]<13>([H]<14>)([H]<15>)[H]<16>', { 0: ('C' , 'C' , 0.5621, 1.9080), 1: ('O' , 'O' , -0.5889, 1.6612), 2: ('CA' , 'CT' , 0.0588, 1.9080), 3: ('HA' , 'HP' , 0.1202, 1.1000), 4: ('CB' , 'CT' , 0.0909, 1.9080), 5: ('HB3' , 'HC' , -0.0232, 1.4870), 6: ('HB2' , 'HC' , -0.0232, 1.4870), 7: ('CG' , 'CT' , -0.0236, 1.9080), 8: ('HG3' , 'HC' , -0.0315, 1.4870), 9: ('HG2' , 'HC' , -0.0315, 1.4870), 10: ('CD' , 'C' , 0.8087, 1.9080), 11: ('OE2' , 'O2' , -0.8189, 1.6612), 12: ('OE1' , 'O2' , -0.8189, 1.6612), 13: ('N' , 'N3' , 0.0017, 1.8240), 14: ('H3' , 'H' , 0.2391, 0.6000), 15: ('H2' , 'H' , 0.2391, 0.6000), 16: ('H1' , 'H' , 0.2391, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)C<10>([O-]<11>)=O<12>)C<13>([O-]<14>)=O<15>', { 0: ('N' , 'N' , -0.5192, 1.8240), 1: ('H' , 'H' , 0.3055, 0.6000), 2: ('CA' , 'CT' , -0.2059, 1.9080), 3: ('HA' , 'H1' , 0.1399, 1.3870), 4: ('CB' , 'CT' , 0.0071, 1.9080), 5: ('HB3' , 'HC' , -0.0078, 1.4870), 6: ('HB2' , 'HC' , -0.0078, 1.4870), 7: ('CG' , 'CT' , 0.0675, 1.9080), 8: ('HG3' , 'HC' , -0.0548, 1.4870), 9: ('HG2' , 'HC' , -0.0548, 1.4870), 10: ('CD' , 'C' , 0.8183, 1.9080), 11: ('OE2' , 'O2' , -0.8220, 1.6612), 12: ('OE1' , 'O2' , -0.8220, 1.6612), 13: ('C' , 'C' , 0.7420, 1.9080), 14: ('OXT' , 'O2' , -0.7930, 1.6612), 15: ('O' , 'O2' , -0.7930, 1.6612), }, ), ], 'GLY': [ ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([H]<4>)C<5>=O<6>', { 0: ('N' , 'N' , -0.4157, 1.8240), 1: ('H' , 'H' , 0.2719, 0.6000), 2: ('CA' , 'CT' , -0.0252, 1.9080), 3: ('HA' , 'H1' , 0.0698, 1.3870), 4: ('HA3' , 'H1' , 0.0698, 1.3870), 5: ('C' , 'C' , 0.5973, 1.9080), 6: ('O' , 'O' , -0.5679, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([H]<4>)[N@+]<5>([H]<6>)([H]<7>)[H]<8>', { 0: ('C' , 'C' , 0.6163, 1.9080), 1: ('O' , 'O' , -0.5722, 1.6612), 2: ('CA' , 'CT' , -0.0100, 1.9080), 3: ('HA' , 'H1' , 0.0895, 1.1000), 4: ('HA3' , 'H1' , 0.0895, 1.1000), 5: ('N' , 'N' , 0.2943, 1.8240), 6: ('H2' , 'H' , 0.1642, 0.6000), 7: ('H1' , 'H' , 0.1642, 0.6000), 8: ('H3' , 'H' , 0.1642, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([H]<4>)C<5>([O-]<6>)=O<7>', { 0: ('N' , 'N' , -0.3821, 1.8240), 1: ('H' , 'H' , 0.2681, 0.6000), 2: ('CA' , 'CT' , -0.2493, 1.9080), 3: ('HA' , 'H1' , 0.1056, 1.3870), 4: ('HA3' , 'H1' , 0.1056, 1.3870), 5: ('C' , 'C' , 0.7231, 1.9080), 6: ('OXT' , 'O2' , -0.7855, 1.6612), 7: ('O' , 'O' , -0.7855, 1.6612), }, ), ], 'HIS': [ ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1N<8>=C<9>([H]<10>)N<11>([H]<12>)C<13>=1[H]<14>)C<15>=O<16>', { 0: ('N' , 'N' , -0.4157, 1.8240), 1: ('H' , 'H' , 0.2719, 0.6000), 2: ('CA' , 'CT' , -0.0581, 1.9080), 3: ('HA' , 'H1' , 0.1360, 1.3870), 4: ('CB' , 'CT' , -0.0074, 1.9080), 5: ('HB3' , 'HC' , 0.0367, 1.4870), 6: ('HB2' , 'HC' , 0.0367, 1.4870), 7: ('CG' , 'CC' , 0.1868, 1.9080), 8: ('ND1' , 'NB' , -0.5432, 1.8240), 9: ('CE1' , 'CR' , 0.1635, 1.9080), 10: ('HE1' , 'H5' , 0.1435, 1.3590), 11: ('NE2' , 'NA' , -0.2795, 1.8240), 12: ('HE2' , 'H' , 0.3339, 0.6000), 13: ('CD2' , 'CW' , -0.2207, 1.9080), 14: ('HD2' , 'H4' , 0.1862, 1.4090), 15: ('C' , 'C' , 0.5973, 1.9080), 16: ('O' , 'O' , -0.5679, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1N<8>=C<9>([H]<10>)N<11>([H]<12>)C<13>=1[H]<14>)[N@+]<15>([H]<16>)([H]<17>)[H]<18>', { 0: ('C' , 'C' , 0.6123, 1.9080), 1: ('O' , 'O' , -0.5713, 1.6612), 2: ('CA' , 'CT' , 0.0236, 1.9080), 3: ('HA' , 'HP' , 0.1380, 1.1000), 4: ('CB' , 'CT' , 0.0489, 1.9080), 5: ('HB3' , 'HC' , 0.0223, 1.4870), 6: ('HB2' , 'HC' , 0.0223, 1.4870), 7: ('CG' , 'CC' , 0.1740, 1.9080), 8: ('ND1' , 'NB' , -0.5579, 1.8240), 9: ('CE1' , 'CR' , 0.1804, 1.9080), 10: ('HE1' , 'H5' , 0.1397, 1.3590), 11: ('NE2' , 'NA' , -0.2781, 1.8240), 12: ('HE2' , 'H' , 0.3324, 0.6000), 13: ('CD2' , 'CW' , -0.2349, 1.9080), 14: ('HD2' , 'H4' , 0.1963, 1.4090), 15: ('N' , 'N3' , 0.1472, 1.8240), 16: ('H3' , 'H' , 0.2016, 0.6000), 17: ('H2' , 'H' , 0.2016, 0.6000), 18: ('H1' , 'H' , 0.2016, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1N<8>=C<9>([H]<10>)N<11>([H]<12>)C<13>=1[H]<14>)C<15>([O-]<16>)=O<17>', { 0: ('N' , 'N' , -0.3821, 1.8240), 1: ('H' , 'H' , 0.2681, 0.6000), 2: ('CA' , 'CT' , -0.2699, 1.9080), 3: ('HA' , 'H1' , 0.1650, 1.3870), 4: ('CB' , 'CT' , -0.1068, 1.9080), 5: ('HB3' , 'HC' , 0.0620, 1.4870), 6: ('HB2' , 'HC' , 0.0620, 1.4870), 7: ('CG' , 'CC' , 0.2724, 1.9080), 8: ('ND1' , 'NB' , -0.5517, 1.8240), 9: ('CE1' , 'CR' , 0.1558, 1.9080), 10: ('HE1' , 'H5' , 0.1448, 1.3590), 11: ('NE2' , 'NA' , -0.2670, 1.8240), 12: ('HE2' , 'H' , 0.3319, 0.6000), 13: ('CD2' , 'CW' , -0.2588, 1.9080), 14: ('HD2' , 'H4' , 0.1957, 1.4090), 15: ('C' , 'C' , 0.7916, 1.9080), 16: ('OXT' , 'O2' , -0.8065, 1.6612), 17: ('O' , 'O2' , -0.8065, 1.6612), }, ), ], 'HIP': [ ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1[N+]<8>([H]<9>)=C<10>([H]<11>)N<12>([H]<13>)C<14>=1[H]<15>)C<16>=O<17>', { 0: ('N' , 'N' , -0.3479, 1.8240), 1: ('H' , 'H' , 0.2747, 0.6000), 2: ('CA' , 'CT' , -0.1354, 1.9080), 3: ('HA' , 'H1' , 0.1212, 1.3870), 4: ('CB' , 'CT' , -0.0414, 1.9080), 5: ('HB3' , 'HC' , 0.0810, 1.4870), 6: ('HB2' , 'HC' , 0.0810, 1.4870), 7: ('CG' , 'CC' , -0.0012, 1.9080), 8: ('ND1' , 'NA' , -0.1513, 1.8240), 9: ('HD1' , 'H' , 0.3866, 0.6000), 10: ('CE1' , 'CR' , -0.0170, 1.9080), 11: ('HE1' , 'H5' , 0.2681, 1.3590), 12: ('NE2' , 'NA' , -0.1718, 1.8240), 13: ('HE2' , 'H' , 0.3911, 0.6000), 14: ('CD2' , 'CW' , -0.1141, 1.9080), 15: ('HD2' , 'H4' , 0.2317, 1.4090), 16: ('C' , 'C' , 0.7341, 1.9080), 17: ('O' , 'O' , -0.5894, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1[N+]<8>([H]<9>)=C<10>([H]<11>)N<12>([H]<13>)C<14>=1[H]<15>)[N@+]<16>([H]<17>)([H]<18>)[H]<19>', { 0: ('C' , 'C' , 0.7214, 1.9080), 1: ('O' , 'O' , -0.6013, 1.6612), 2: ('CA' , 'CT' , 0.0581, 1.9080), 3: ('HA' , 'HP' , 0.1047, 1.1000), 4: ('CB' , 'CT' , 0.0484, 1.9080), 5: ('HB3' , 'HC' , 0.0531, 1.4870), 6: ('HB2' , 'HC' , 0.0531, 1.4870), 7: ('CG' , 'CC' , -0.0236, 1.9080), 8: ('ND1' , 'NA' , -0.1510, 1.8240), 9: ('HD1' , 'H' , 0.3821, 0.6000), 10: ('CE1' , 'CR' , -0.0011, 1.9080), 11: ('HE1' , 'H5' , 0.2645, 1.3590), 12: ('NE2' , 'NA' , -0.1739, 1.8240), 13: ('HE2' , 'H' , 0.3921, 0.6000), 14: ('CD2' , 'CW' , -0.1433, 1.9080), 15: ('HD2' , 'H4' , 0.2495, 1.4090), 16: ('N' , 'N3' , 0.2560, 1.8240), 17: ('H3' , 'H' , 0.1704, 0.6000), 18: ('H2' , 'H' , 0.1704, 0.6000), 19: ('H1' , 'H' , 0.1704, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1[N+]<8>([H]<9>)=C<10>([H]<11>)N<12>([H]<13>)C<14>=1[H]<15>)C<16>([O-]<17>)=O<18>', { 0: ('N' , 'N' , -0.3481, 1.8240), 1: ('H' , 'H' , 0.2764, 0.6000), 2: ('CA' , 'CT' , -0.1445, 1.9080), 3: ('HA' , 'H1' , 0.1115, 1.3870), 4: ('CB' , 'CT' , -0.0800, 1.9080), 5: ('HB3' , 'HC' , 0.0868, 1.4870), 6: ('HB2' , 'HC' , 0.0868, 1.4870), 7: ('CG' , 'CC' , 0.0298, 1.9080), 8: ('ND1' , 'NA' , -0.1501, 1.8240), 9: ('HD1' , 'H' , 0.3883, 0.6000), 10: ('CE1' , 'CR' , -0.0251, 1.9080), 11: ('HE1' , 'H5' , 0.2694, 1.3590), 12: ('NE2' , 'NA' , -0.1683, 1.8240), 13: ('HE2' , 'H' , 0.3913, 0.6000), 14: ('CD2' , 'CW' , -0.1256, 1.9080), 15: ('HD2' , 'H4' , 0.2336, 1.4090), 16: ('C' , 'C' , 0.8032, 1.9080), 17: ('OXT' , 'O2' , -0.8177, 1.6612), 18: ('O' , 'O2' , -0.8177, 1.6612), }, ), ], 'HID': [ ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1N<8>([H]<9>)C<10>([H]<11>)=N<12>C<13>=1[H]<14>)C<15>=O<16>', { 0: ('N' , 'N' , -0.4157, 1.8240), 1: ('H' , 'H' , 0.2719, 0.6000), 2: ('CA' , 'CT' , 0.0188, 1.9080), 3: ('HA' , 'H1' , 0.0881, 1.3870), 4: ('CB' , 'CT' , -0.0462, 1.9080), 5: ('HB3' , 'HC' , 0.0402, 1.4870), 6: ('HB2' , 'HC' , 0.0402, 1.4870), 7: ('CG' , 'CC' , -0.0266, 1.9080), 8: ('ND1' , 'NA' , -0.3811, 1.8240), 9: ('HD1' , 'H' , 0.3649, 0.6000), 10: ('CE1' , 'CR' , 0.2057, 1.9080), 11: ('HE1' , 'H5' , 0.1392, 1.3590), 12: ('NE2' , 'NB' , -0.5727, 1.8240), 13: ('CD2' , 'CV' , 0.1292, 1.9080), 14: ('HD2' , 'H4' , 0.1147, 1.4090), 15: ('C' , 'C' , 0.5973, 1.9080), 16: ('O' , 'O' , -0.5679, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1N<8>([H]<9>)C<10>([H]<11>)=N<12>C<13>=1[H]<14>)[N@+]<15>([H]<16>)([H]<17>)[H]<18>', { 0: ('C' , 'C' , 0.6123, 1.9080), 1: ('O' , 'O' , -0.5713, 1.6612), 2: ('CA' , 'CT' , 0.0964, 1.9080), 3: ('HA' , 'HP' , 0.0958, 1.1000), 4: ('CB' , 'CT' , 0.0259, 1.9080), 5: ('HB3' , 'HC' , 0.0209, 1.4870), 6: ('HB2' , 'HC' , 0.0209, 1.4870), 7: ('CG' , 'CC' , -0.0399, 1.9080), 8: ('ND1' , 'NA' , -0.3819, 1.8240), 9: ('HD1' , 'H' , 0.3632, 0.6000), 10: ('CE1' , 'CR' , 0.2127, 1.9080), 11: ('HE1' , 'H5' , 0.1385, 1.3590), 12: ('NE2' , 'NB' , -0.5711, 1.8240), 13: ('CD2' , 'CV' , 0.1046, 1.9080), 14: ('HD2' , 'H4' , 0.1299, 1.4090), 15: ('N' , 'N3' , 0.1542, 1.8240), 16: ('H3' , 'H' , 0.1963, 0.6000), 17: ('H2' , 'H' , 0.1963, 0.6000), 18: ('H1' , 'H' , 0.1963, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1N<8>([H]<9>)C<10>([H]<11>)=N<12>C<13>=1[H]<14>)C<15>([O-]<16>)=O<17>', { 0: ('N' , 'N' , -0.3821, 1.8240), 1: ('H' , 'H' , 0.2681, 0.6000), 2: ('CA' , 'CT' , -0.1739, 1.9080), 3: ('HA' , 'H1' , 0.1100, 1.3870), 4: ('CB' , 'CT' , -0.1046, 1.9080), 5: ('HB3' , 'HC' , 0.0565, 1.4870), 6: ('HB2' , 'HC' , 0.0565, 1.4870), 7: ('CG' , 'CC' , 0.0293, 1.9080), 8: ('ND1' , 'NA' , -0.3892, 1.8240), 9: ('HD1' , 'H' , 0.3755, 0.6000), 10: ('CE1' , 'CR' , 0.1925, 1.9080), 11: ('HE1' , 'H5' , 0.1418, 1.3590), 12: ('NE2' , 'NB' , -0.5629, 1.8240), 13: ('CD2' , 'CV' , 0.1001, 1.9080), 14: ('HD2' , 'H4' , 0.1241, 1.4090), 15: ('C' , 'C' , 0.7615, 1.9080), 16: ('OXT' , 'O2' , -0.8016, 1.6612), 17: ('O' , 'O2' , -0.8016, 1.6612), }, ), ], 'ILE': [ ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([C@]<6>([H]<7>)([H]<8>)[H]<9>)[C@@]<10>([H]<11>)([H]<12>)[C@]<13>([H]<14>)([H]<15>)[H]<16>)C<17>=O<18>', { 0: ('N' , 'N' , -0.4157, 1.8240), 1: ('H' , 'H' , 0.2719, 0.6000), 2: ('CA' , 'CT' , -0.0597, 1.9080), 3: ('HA' , 'H1' , 0.0869, 1.3870), 4: ('CB' , 'CT' , 0.1303, 1.9080), 5: ('HB' , 'HC' , 0.0187, 1.4870), 6: ('CG2' , 'CT' , -0.3204, 1.9080), 7: ('HG23', 'HC' , 0.0882, 1.4870), 8: ('HG22', 'HC' , 0.0882, 1.4870), 9: ('HG21', 'HC' , 0.0882, 1.4870), 10: ('CG1' , 'CT' , -0.0430, 1.9080), 11: ('HG13', 'HC' , 0.0236, 1.4870), 12: ('HG12', 'HC' , 0.0236, 1.4870), 13: ('CD1' , 'CT' , -0.0660, 1.9080), 14: ('HD13', 'HC' , 0.0186, 1.4870), 15: ('HD12', 'HC' , 0.0186, 1.4870), 16: ('HD11', 'HC' , 0.0186, 1.4870), 17: ('C' , 'C' , 0.5973, 1.9080), 18: ('O' , 'O' , -0.5679, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([C@]<6>([H]<7>)([H]<8>)[H]<9>)[C@@]<10>([H]<11>)([H]<12>)[C@]<13>([H]<14>)([H]<15>)[H]<16>)[N@+]<17>([H]<18>)([H]<19>)[H]<20>', { 0: ('C' , 'C' , 0.6123, 1.9080), 1: ('O' , 'O' , -0.5713, 1.6612), 2: ('CA' , 'CT' , 0.0257, 1.9080), 3: ('HA' , 'HP' , 0.1031, 1.1000), 4: ('CB' , 'CT' , 0.1885, 1.9080), 5: ('HB' , 'HC' , 0.0213, 1.4870), 6: ('CG2' , 'CT' , -0.3720, 1.9080), 7: ('HG23', 'HC' , 0.0947, 1.4870), 8: ('HG22', 'HC' , 0.0947, 1.4870), 9: ('HG21', 'HC' , 0.0947, 1.4870), 10: ('CG1' , 'CT' , -0.0387, 1.9080), 11: ('HG13', 'HC' , 0.0201, 1.4870), 12: ('HG12', 'HC' , 0.0201, 1.4870), 13: ('CD1' , 'CT' , -0.0908, 1.9080), 14: ('HD13', 'HC' , 0.0226, 1.4870), 15: ('HD12', 'HC' , 0.0226, 1.4870), 16: ('HD11', 'HC' , 0.0226, 1.4870), 17: ('N' , 'N3' , 0.0311, 1.8240), 18: ('H3' , 'H' , 0.2329, 0.6000), 19: ('H2' , 'H' , 0.2329, 0.6000), 20: ('H1' , 'H' , 0.2329, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([C@]<6>([H]<7>)([H]<8>)[H]<9>)[C@@]<10>([H]<11>)([H]<12>)[C@]<13>([H]<14>)([H]<15>)[H]<16>)C<17>([O-]<18>)=O<19>', { 0: ('N' , 'N' , -0.3821, 1.8240), 1: ('H' , 'H' , 0.2681, 0.6000), 2: ('CA' , 'CT' , -0.3100, 1.9080), 3: ('HA' , 'H1' , 0.1375, 1.3870), 4: ('CB' , 'CT' , 0.0363, 1.9080), 5: ('HB' , 'HC' , 0.0766, 1.4870), 6: ('CG2' , 'CT' , -0.3498, 1.9080), 7: ('HG23', 'HC' , 0.1021, 1.4870), 8: ('HG22', 'HC' , 0.1021, 1.4870), 9: ('HG21', 'HC' , 0.1021, 1.4870), 10: ('CG1' , 'CT' , -0.0323, 1.9080), 11: ('HG13', 'HC' , 0.0321, 1.4870), 12: ('HG12', 'HC' , 0.0321, 1.4870), 13: ('CD1' , 'CT' , -0.0699, 1.9080), 14: ('HD13', 'HC' , 0.0196, 1.4870), 15: ('HD12', 'HC' , 0.0196, 1.4870), 16: ('HD11', 'HC' , 0.0196, 1.4870), 17: ('C' , 'C' , 0.8343, 1.9080), 18: ('OXT' , 'O2' , -0.8190, 1.6612), 19: ('O' , 'O2' , -0.8190, 1.6612), }, ), ], 'LEU': [ ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@]<7>([H]<8>)([C@]<9>([H]<10>)([H]<11>)[H]<12>)[C@]<13>([H]<14>)([H]<15>)[H]<16>)C<17>=O<18>', { 0: ('N' , 'N' , -0.4157, 1.8240), 1: ('H' , 'H' , 0.2719, 0.6000), 2: ('CA' , 'CT' , -0.0518, 1.9080), 3: ('HA' , 'H1' , 0.0922, 1.3870), 4: ('CB' , 'CT' , -0.1102, 1.9080), 5: ('HB3' , 'HC' , 0.0457, 1.4870), 6: ('HB2' , 'HC' , 0.0457, 1.4870), 7: ('CG' , 'CT' , 0.3531, 1.9080), 8: ('HG' , 'HC' , -0.0361, 1.4870), 9: ('CD2' , 'CT' , -0.4121, 1.9080), 10: ('HD23', 'HC' , 0.1000, 1.4870), 11: ('HD22', 'HC' , 0.1000, 1.4870), 12: ('HD21', 'HC' , 0.1000, 1.4870), 13: ('CD1' , 'CT' , -0.4121, 1.9080), 14: ('HD13', 'HC' , 0.1000, 1.4870), 15: ('HD12', 'HC' , 0.1000, 1.4870), 16: ('HD11', 'HC' , 0.1000, 1.4870), 17: ('C' , 'C' , 0.5973, 1.9080), 18: ('O' , 'O' , -0.5679, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@]<7>([H]<8>)([C@]<9>([H]<10>)([H]<11>)[H]<12>)[C@]<13>([H]<14>)([H]<15>)[H]<16>)[N@+]<17>([H]<18>)([H]<19>)[H]<20>', { 0: ('C' , 'C' , 0.6123, 1.9080), 1: ('O' , 'O' , -0.5713, 1.6612), 2: ('CA' , 'CT' , 0.0104, 1.9080), 3: ('HA' , 'HP' , 0.1053, 1.1000), 4: ('CB' , 'CT' , -0.0244, 1.9080), 5: ('HB3' , 'HC' , 0.0256, 1.4870), 6: ('HB2' , 'HC' , 0.0256, 1.4870), 7: ('CG' , 'CT' , 0.3421, 1.9080), 8: ('HG' , 'HC' , -0.0380, 1.4870), 9: ('CD2' , 'CT' , -0.4104, 1.9080), 10: ('HD23', 'HC' , 0.0980, 1.4870), 11: ('HD22', 'HC' , 0.0980, 1.4870), 12: ('HD21', 'HC' , 0.0980, 1.4870), 13: ('CD1' , 'CT' , -0.4106, 1.9080), 14: ('HD13', 'HC' , 0.0980, 1.4870), 15: ('HD12', 'HC' , 0.0980, 1.4870), 16: ('HD11', 'HC' , 0.0980, 1.4870), 17: ('N' , 'N3' , 0.1010, 1.8240), 18: ('H3' , 'H' , 0.2148, 0.6000), 19: ('H2' , 'H' , 0.2148, 0.6000), 20: ('H1' , 'H' , 0.2148, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@]<7>([H]<8>)([C@]<9>([H]<10>)([H]<11>)[H]<12>)[C@]<13>([H]<14>)([H]<15>)[H]<16>)C<17>([O-]<18>)=O<19>', { 0: ('N' , 'N' , -0.3821, 1.8240), 1: ('H' , 'H' , 0.2681, 0.6000), 2: ('CA' , 'CT' , -0.2847, 1.9080), 3: ('HA' , 'H1' , 0.1346, 1.3870), 4: ('CB' , 'CT' , -0.2469, 1.9080), 5: ('HB3' , 'HC' , 0.0974, 1.4870), 6: ('HB2' , 'HC' , 0.0974, 1.4870), 7: ('CG' , 'CT' , 0.3706, 1.9080), 8: ('HG' , 'HC' , -0.0374, 1.4870), 9: ('CD2' , 'CT' , -0.4163, 1.9080), 10: ('HD23', 'HC' , 0.1038, 1.4870), 11: ('HD22', 'HC' , 0.1038, 1.4870), 12: ('HD21', 'HC' , 0.1038, 1.4870), 13: ('CD1' , 'CT' , -0.4163, 1.9080), 14: ('HD13', 'HC' , 0.1038, 1.4870), 15: ('HD12', 'HC' , 0.1038, 1.4870), 16: ('HD11', 'HC' , 0.1038, 1.4870), 17: ('C' , 'C' , 0.8326, 1.9080), 18: ('OXT' , 'O2' , -0.8199, 1.6612), 19: ('O' , 'O2' , -0.8199, 1.6612), }, ), ], 'LYS': [ ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)[C@@]<10>([H]<11>)([H]<12>)[C@@]<13>([H]<14>)([H]<15>)[N@+]<16>([H]<17>)([H]<18>)[H]<19>)C<20>=O<21>', { 0: ('N' , 'N' , -0.3479, 1.8240), 1: ('H' , 'H' , 0.2747, 0.6000), 2: ('CA' , 'CT' , -0.2400, 1.9080), 3: ('HA' , 'H1' , 0.1426, 1.3870), 4: ('CB' , 'CT' , -0.0094, 1.9080), 5: ('HB3' , 'HC' , 0.0362, 1.4870), 6: ('HB2' , 'HC' , 0.0362, 1.4870), 7: ('CG' , 'CT' , 0.0187, 1.9080), 8: ('HG3' , 'HC' , 0.0103, 1.4870), 9: ('HG2' , 'HC' , 0.0103, 1.4870), 10: ('CD' , 'CT' , -0.0479, 1.9080), 11: ('HD3' , 'HC' , 0.0621, 1.4870), 12: ('HD2' , 'HC' , 0.0621, 1.4870), 13: ('CE' , 'CT' , -0.0143, 1.9080), 14: ('HE3' , 'HP' , 0.1135, 1.1000), 15: ('HE2' , 'HP' , 0.1135, 1.1000), 16: ('NZ' , 'N3' , -0.3854, 1.8240), 17: ('HZ2' , 'H' , 0.3400, 0.6000), 18: ('HZ1' , 'H' , 0.3400, 0.6000), 19: ('HZ3' , 'H' , 0.3400, 0.6000), 20: ('C' , 'C' , 0.7341, 1.9080), 21: ('O' , 'O' , -0.5894, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)[C@@]<10>([H]<11>)([H]<12>)[C@@]<13>([H]<14>)([H]<15>)[N@+]<16>([H]<17>)([H]<18>)[H]<19>)[N@+]<20>([H]<21>)([H]<22>)[H]<23>', { 0: ('C' , 'C' , 0.7214, 1.9080), 1: ('O' , 'O' , -0.6013, 1.6612), 2: ('CA' , 'CT' , -0.0015, 1.9080), 3: ('HA' , 'HP' , 0.1180, 1.1000), 4: ('CB' , 'CT' , 0.0212, 1.9080), 5: ('HB3' , 'HC' , 0.0283, 1.4870), 6: ('HB2' , 'HC' , 0.0283, 1.4870), 7: ('CG' , 'CT' , -0.0048, 1.9080), 8: ('HG3' , 'HC' , 0.0121, 1.4870), 9: ('HG2' , 'HC' , 0.0121, 1.4870), 10: ('CD' , 'CT' , -0.0608, 1.9080), 11: ('HD3' , 'HC' , 0.0633, 1.4870), 12: ('HD2' , 'HC' , 0.0633, 1.4870), 13: ('CE' , 'CT' , -0.0181, 1.9080), 14: ('HE3' , 'HP' , 0.1171, 1.1000), 15: ('HE2' , 'HP' , 0.1171, 1.1000), 16: ('NZ' , 'N3' , -0.3764, 1.8240), 17: ('HZ2' , 'H' , 0.3382, 0.6000), 18: ('HZ1' , 'H' , 0.3382, 0.6000), 19: ('HZ3' , 'H' , 0.3382, 0.6000), 20: ('N' , 'N3' , 0.0966, 1.8240), 21: ('H3' , 'H' , 0.2165, 0.6000), 22: ('H2' , 'H' , 0.2165, 0.6000), 23: ('H1' , 'H' , 0.2165, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)[C@@]<10>([H]<11>)([H]<12>)[C@@]<13>([H]<14>)([H]<15>)[N@+]<16>([H]<17>)([H]<18>)[H]<19>)C<20>([O-]<21>)=O<22>', { 0: ('N' , 'N' , -0.3481, 1.8240), 1: ('H' , 'H' , 0.2764, 0.6000), 2: ('CA' , 'CT' , -0.2903, 1.9080), 3: ('HA' , 'H1' , 0.1438, 1.3870), 4: ('CB' , 'CT' , -0.0538, 1.9080), 5: ('HB3' , 'HC' , 0.0482, 1.4870), 6: ('HB2' , 'HC' , 0.0482, 1.4870), 7: ('CG' , 'CT' , 0.0227, 1.9080), 8: ('HG3' , 'HC' , 0.0134, 1.4870), 9: ('HG2' , 'HC' , 0.0134, 1.4870), 10: ('CD' , 'CT' , -0.0392, 1.9080), 11: ('HD3' , 'HC' , 0.0611, 1.4870), 12: ('HD2' , 'HC' , 0.0611, 1.4870), 13: ('CE' , 'CT' , -0.0176, 1.9080), 14: ('HE3' , 'HP' , 0.1121, 1.1000), 15: ('HE2' , 'HP' , 0.1121, 1.1000), 16: ('NZ' , 'N3' , -0.3741, 1.8240), 17: ('HZ2' , 'H' , 0.3374, 0.6000), 18: ('HZ1' , 'H' , 0.3374, 0.6000), 19: ('HZ3' , 'H' , 0.3374, 0.6000), 20: ('C' , 'C' , 0.8488, 1.9080), 21: ('OXT' , 'O2' , -0.8252, 1.6612), 22: ('O' , 'O2' , -0.8252, 1.6612), }, ), ], 'MET': [ ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)S<10>[C@]<11>([H]<12>)([H]<13>)[H]<14>)C<15>=O<16>', { 0: ('N' , 'N' , -0.4157, 1.8240), 1: ('H' , 'H' , 0.2719, 0.6000), 2: ('CA' , 'CT' , -0.0237, 1.9080), 3: ('HA' , 'H1' , 0.0880, 1.3870), 4: ('CB' , 'CT' , 0.0342, 1.9080), 5: ('HB3' , 'HC' , 0.0241, 1.4870), 6: ('HB2' , 'HC' , 0.0241, 1.4870), 7: ('CG' , 'CT' , 0.0018, 1.9080), 8: ('HG3' , 'H1' , 0.0440, 1.3870), 9: ('HG2' , 'H1' , 0.0440, 1.3870), 10: ('SD' , 'S' , -0.2737, 2.0000), 11: ('CE' , 'CT' , -0.0536, 1.9080), 12: ('HE3' , 'H1' , 0.0684, 1.3870), 13: ('HE2' , 'H1' , 0.0684, 1.3870), 14: ('HE1' , 'H1' , 0.0684, 1.3870), 15: ('C' , 'C' , 0.5973, 1.9080), 16: ('O' , 'O' , -0.5679, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)S<10>[C@]<11>([H]<12>)([H]<13>)[H]<14>)[N@+]<15>([H]<16>)([H]<17>)[H]<18>', { 0: ('C' , 'C' , 0.6123, 1.9080), 1: ('O' , 'O' , -0.5713, 1.6612), 2: ('CA' , 'CT' , 0.0221, 1.9080), 3: ('HA' , 'HP' , 0.1116, 1.1000), 4: ('CB' , 'CT' , 0.0865, 1.9080), 5: ('HB3' , 'HC' , 0.0125, 1.4870), 6: ('HB2' , 'HC' , 0.0125, 1.4870), 7: ('CG' , 'CT' , 0.0334, 1.9080), 8: ('HG3' , 'H1' , 0.0292, 1.3870), 9: ('HG2' , 'H1' , 0.0292, 1.3870), 10: ('SD' , 'S' , -0.2774, 2.0000), 11: ('CE' , 'CT' , -0.0341, 1.9080), 12: ('HE3' , 'H1' , 0.0597, 1.3870), 13: ('HE2' , 'H1' , 0.0597, 1.3870), 14: ('HE1' , 'H1' , 0.0597, 1.3870), 15: ('N' , 'N3' , 0.1592, 1.8240), 16: ('H3' , 'H' , 0.1984, 0.6000), 17: ('H2' , 'H' , 0.1984, 0.6000), 18: ('H1' , 'H' , 0.1984, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)S<10>[C@]<11>([H]<12>)([H]<13>)[H]<14>)C<15>([O-]<16>)=O<17>', { 0: ('N' , 'N' , -0.3821, 1.8240), 1: ('H' , 'H' , 0.2681, 0.6000), 2: ('CA' , 'CT' , -0.2597, 1.9080), 3: ('HA' , 'H1' , 0.1277, 1.3870), 4: ('CB' , 'CT' , -0.0236, 1.9080), 5: ('HB3' , 'HC' , 0.0480, 1.4870), 6: ('HB2' , 'HC' , 0.0480, 1.4870), 7: ('CG' , 'CT' , 0.0492, 1.9080), 8: ('HG3' , 'H1' , 0.0317, 1.3870), 9: ('HG2' , 'H1' , 0.0317, 1.3870), 10: ('SD' , 'S' , -0.2692, 2.0000), 11: ('CE' , 'CT' , -0.0376, 1.9080), 12: ('HE3' , 'H1' , 0.0625, 1.3870), 13: ('HE2' , 'H1' , 0.0625, 1.3870), 14: ('HE1' , 'H1' , 0.0625, 1.3870), 15: ('C' , 'C' , 0.8013, 1.9080), 16: ('OXT' , 'O2' , -0.8105, 1.6612), 17: ('O' , 'O2' , -0.8105, 1.6612), }, ), ], 'PHE': [ ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1C<8>([H]<9>)=C<10>([H]<11>)C<12>([H]<13>)=C<14>([H]<15>)C<16>=1[H]<17>)C<18>=O<19>', { 0: ('N' , 'N' , -0.4157, 1.8240), 1: ('H' , 'H' , 0.2719, 0.6000), 2: ('CA' , 'CT' , -0.0024, 1.9080), 3: ('HA' , 'H1' , 0.0978, 1.3870), 4: ('CB' , 'CT' , -0.0343, 1.9080), 5: ('HB3' , 'HC' , 0.0295, 1.4870), 6: ('HB2' , 'HC' , 0.0295, 1.4870), 7: ('CG' , 'CA' , 0.0118, 1.9080), 8: ('CD2' , 'CA' , -0.1256, 1.9080), 9: ('HD2' , 'HA' , 0.1330, 1.4590), 10: ('CE2' , 'CA' , -0.1704, 1.9080), 11: ('HE2' , 'HA' , 0.1430, 1.4590), 12: ('CZ' , 'CA' , -0.1072, 1.9080), 13: ('HZ' , 'HA' , 0.1297, 1.4590), 14: ('CE1' , 'CA' , -0.1704, 1.9080), 15: ('HE1' , 'HA' , 0.1430, 1.4590), 16: ('CD1' , 'CA' , -0.1256, 1.9080), 17: ('HD1' , 'HA' , 0.1330, 1.4590), 18: ('C' , 'C' , 0.5973, 1.9080), 19: ('O' , 'O' , -0.5679, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1C<8>([H]<9>)=C<10>([H]<11>)C<12>([H]<13>)=C<14>([H]<15>)C<16>=1[H]<17>)[N@+]<18>([H]<19>)([H]<20>)[H]<21>', { 0: ('C' , 'C' , 0.6123, 1.9080), 1: ('O' , 'O' , -0.5713, 1.6612), 2: ('CA' , 'CT' , 0.0733, 1.9080), 3: ('HA' , 'HP' , 0.1041, 1.1000), 4: ('CB' , 'CT' , 0.0330, 1.9080), 5: ('HB3' , 'HC' , 0.0104, 1.4870), 6: ('HB2' , 'HC' , 0.0104, 1.4870), 7: ('CG' , 'CA' , 0.0031, 1.9080), 8: ('CD2' , 'CA' , -0.1391, 1.9080), 9: ('HD2' , 'HA' , 0.1374, 1.4590), 10: ('CE2' , 'CA' , -0.1603, 1.9080), 11: ('HE2' , 'HA' , 0.1433, 1.4590), 12: ('CZ' , 'CA' , -0.1208, 1.9080), 13: ('HZ' , 'HA' , 0.1329, 1.4590), 14: ('CE1' , 'CA' , -0.1602, 1.9080), 15: ('HE1' , 'HA' , 0.1433, 1.4590), 16: ('CD1' , 'CA' , -0.1392, 1.9080), 17: ('HD1' , 'HA' , 0.1374, 1.4590), 18: ('N' , 'N3' , 0.1737, 1.8240), 19: ('H3' , 'H' , 0.1921, 0.6000), 20: ('H2' , 'H' , 0.1921, 0.6000), 21: ('H1' , 'H' , 0.1921, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1C<8>([H]<9>)=C<10>([H]<11>)C<12>([H]<13>)=C<14>([H]<15>)C<16>=1[H]<17>)C<18>([O-]<19>)=O<20>', { 0: ('N' , 'N' , -0.3821, 1.8240), 1: ('H' , 'H' , 0.2681, 0.6000), 2: ('CA' , 'CT' , -0.1825, 1.9080), 3: ('HA' , 'H1' , 0.1098, 1.3870), 4: ('CB' , 'CT' , -0.0959, 1.9080), 5: ('HB3' , 'HC' , 0.0443, 1.4870), 6: ('HB2' , 'HC' , 0.0443, 1.4870), 7: ('CG' , 'CA' , 0.0552, 1.9080), 8: ('CD2' , 'CA' , -0.1300, 1.9080), 9: ('HD2' , 'HA' , 0.1408, 1.4590), 10: ('CE2' , 'CA' , -0.1847, 1.9080), 11: ('HE2' , 'HA' , 0.1461, 1.4590), 12: ('CZ' , 'CA' , -0.0944, 1.9080), 13: ('HZ' , 'HA' , 0.1280, 1.4590), 14: ('CE1' , 'CA' , -0.1847, 1.9080), 15: ('HE1' , 'HA' , 0.1461, 1.4590), 16: ('CD1' , 'CA' , -0.1300, 1.9080), 17: ('HD1' , 'HA' , 0.1408, 1.4590), 18: ('C' , 'C' , 0.7660, 1.9080), 19: ('OXT' , 'O2' , -0.8026, 1.6612), 20: ('O' , 'O2' , -0.8026, 1.6612), }, ), ], 'PRO': [ ( 'N<0>1[C@]<1>([H]<2>)([H]<3>)[C@]<4>([H]<5>)([H]<6>)[C@]<7>([H]<8>)([H]<9>)[C@@]<10>1([H]<11>)C<12>=O<13>', { 0: ('N' , 'N' , -0.2548, 1.8240), 1: ('CD' , 'CT' , 0.0192, 1.9080), 2: ('HD3' , 'H1' , 0.0391, 1.3870), 3: ('HD2' , 'H1' , 0.0391, 1.3870), 4: ('CG' , 'CT' , 0.0189, 1.9080), 5: ('HG3' , 'HC' , 0.0213, 1.4870), 6: ('HG2' , 'HC' , 0.0213, 1.4870), 7: ('CB' , 'CT' , -0.0070, 1.9080), 8: ('HB3' , 'HC' , 0.0253, 1.4870), 9: ('HB2' , 'HC' , 0.0253, 1.4870), 10: ('CA' , 'CT' , -0.0266, 1.9080), 11: ('HA' , 'H1' , 0.0641, 1.3870), 12: ('C' , 'C' , 0.5896, 1.9080), 13: ('O' , 'O' , -0.5748, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>1([H]<3>)[C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)[C@@]<10>([H]<11>)([H]<12>)[N@@+]<13>1([H]<14>)[H]<15>', { 0: ('C' , 'C' , 0.5260, 1.9080), 1: ('O' , 'O' , -0.5000, 1.6612), 2: ('CA' , 'CT' , 0.1000, 1.9080), 3: ('HA' , 'HP' , 0.1000, 1.1000), 4: ('CB' , 'CT' , -0.1150, 1.9080), 5: ('HB3' , 'HC' , 0.1000, 1.4870), 6: ('HB2' , 'HC' , 0.1000, 1.4870), 7: ('CG' , 'CT' , -0.1210, 1.9080), 8: ('HG3' , 'HC' , 0.1000, 1.4870), 9: ('HG2' , 'HC' , 0.1000, 1.4870), 10: ('CD' , 'CT' , -0.0120, 1.9080), 11: ('HD3' , 'H1' , 0.1000, 1.1000), 12: ('HD2' , 'H1' , 0.1000, 1.1000), 13: ('N' , 'N3' , -0.2020, 1.8240), 14: ('H3' , 'H' , 0.3120, 0.6000), 15: ('H2' , 'H' , 0.3120, 0.6000), }, ), ( 'N<0>1[C@]<1>([H]<2>)([H]<3>)[C@]<4>([H]<5>)([H]<6>)[C@]<7>([H]<8>)([H]<9>)[C@@]<10>1([H]<11>)C<12>([O-]<13>)=O<14>', { 0: ('N' , 'N' , -0.2802, 1.8240), 1: ('CD' , 'CT' , 0.0434, 1.9080), 2: ('HD3' , 'H1' , 0.0331, 1.3870), 3: ('HD2' , 'H1' , 0.0331, 1.3870), 4: ('CG' , 'CT' , 0.0466, 1.9080), 5: ('HG3' , 'HC' , 0.0172, 1.4870), 6: ('HG2' , 'HC' , 0.0172, 1.4870), 7: ('CB' , 'CT' , -0.0543, 1.9080), 8: ('HB3' , 'HC' , 0.0381, 1.4870), 9: ('HB2' , 'HC' , 0.0381, 1.4870), 10: ('CA' , 'CT' , -0.1336, 1.9080), 11: ('HA' , 'H1' , 0.0776, 1.3870), 12: ('C' , 'C' , 0.6631, 1.9080), 13: ('OXT' , 'O2' , -0.7697, 1.6612), 14: ('O' , 'O2' , -0.7697, 1.6612), }, ), ], 'SER': [ ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)O<7>[H]<8>)C<9>=O<10>', { 0: ('N' , 'N' , -0.4157, 1.8240), 1: ('H' , 'H' , 0.2719, 0.6000), 2: ('CA' , 'CT' , -0.0249, 1.9080), 3: ('HA' , 'H1' , 0.0843, 1.3870), 4: ('CB' , 'CT' , 0.2117, 1.9080), 5: ('HB3' , 'H1' , 0.0352, 1.3870), 6: ('HB2' , 'H1' , 0.0352, 1.3870), 7: ('OG' , 'OH' , -0.6546, 1.7210), 8: ('HG' , 'HO' , 0.4275, 0.0000), 9: ('C' , 'C' , 0.5973, 1.9080), 10: ('O' , 'O' , -0.5679, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)O<7>[H]<8>)[N@+]<9>([H]<10>)([H]<11>)[H]<12>', { 0: ('C' , 'C' , 0.6163, 1.9080), 1: ('O' , 'O' , -0.5722, 1.6612), 2: ('CA' , 'CT' , 0.0567, 1.9080), 3: ('HA' , 'HP' , 0.0782, 1.1000), 4: ('CB' , 'CT' , 0.2596, 1.9080), 5: ('HB3' , 'H1' , 0.0273, 1.3870), 6: ('HB2' , 'H1' , 0.0273, 1.3870), 7: ('OG' , 'OH' , -0.6714, 1.7210), 8: ('HG' , 'HO' , 0.4239, 0.0000), 9: ('N' , 'N3' , 0.1849, 1.8240), 10: ('H3' , 'H' , 0.1898, 0.6000), 11: ('H2' , 'H' , 0.1898, 0.6000), 12: ('H1' , 'H' , 0.1898, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)O<7>[H]<8>)C<9>([O-]<10>)=O<11>', { 0: ('N' , 'N' , -0.3821, 1.8240), 1: ('H' , 'H' , 0.2681, 0.6000), 2: ('CA' , 'CT' , -0.2722, 1.9080), 3: ('HA' , 'H1' , 0.1304, 1.3870), 4: ('CB' , 'CT' , 0.1123, 1.9080), 5: ('HB3' , 'H1' , 0.0813, 1.3870), 6: ('HB2' , 'H1' , 0.0813, 1.3870), 7: ('OG' , 'OH' , -0.6514, 1.7210), 8: ('HG' , 'HO' , 0.4474, 0.0000), 9: ('C' , 'C' , 0.8113, 1.9080), 10: ('OXT' , 'O2' , -0.8132, 1.6612), 11: ('O' , 'O2' , -0.8132, 1.6612), }, ), ], 'THR': [ ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@]<4>([H]<5>)(O<6>[H]<7>)[C@]<8>([H]<9>)([H]<10>)[H]<11>)C<12>=O<13>', { 0: ('N' , 'N' , -0.4157, 1.8240), 1: ('H' , 'H' , 0.2719, 0.6000), 2: ('CA' , 'CT' , -0.0389, 1.9080), 3: ('HA' , 'H1' , 0.1007, 1.3870), 4: ('CB' , 'CT' , 0.3654, 1.9080), 5: ('HB' , 'H1' , 0.0043, 1.3870), 6: ('OG1' , 'OH' , -0.6761, 1.7210), 7: ('HG1' , 'HO' , 0.4102, 0.0000), 8: ('CG2' , 'CT' , -0.2438, 1.9080), 9: ('HG23', 'HC' , 0.0642, 1.4870), 10: ('HG22', 'HC' , 0.0642, 1.4870), 11: ('HG21', 'HC' , 0.0642, 1.4870), 12: ('C' , 'C' , 0.5973, 1.9080), 13: ('O' , 'O' , -0.5679, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([C@]<4>([H]<5>)(O<6>[H]<7>)[C@]<8>([H]<9>)([H]<10>)[H]<11>)[N@+]<12>([H]<13>)([H]<14>)[H]<15>', { 0: ('C' , 'C' , 0.6163, 1.9080), 1: ('O' , 'O' , -0.5722, 1.6612), 2: ('CA' , 'CT' , 0.0034, 1.9080), 3: ('HA' , 'HP' , 0.1087, 1.1000), 4: ('CB' , 'CT' , 0.4514, 1.9080), 5: ('HB' , 'H1' , -0.0323, 1.3870), 6: ('OG1' , 'OH' , -0.6764, 1.7210), 7: ('HG1' , 'HO' , 0.4070, 0.0000), 8: ('CG2' , 'CT' , -0.2554, 1.9080), 9: ('HG23', 'HC' , 0.0627, 1.4870), 10: ('HG22', 'HC' , 0.0627, 1.4870), 11: ('HG21', 'HC' , 0.0627, 1.4870), 12: ('N' , 'N3' , 0.1812, 1.8240), 13: ('H3' , 'H' , 0.1934, 0.6000), 14: ('H2' , 'H' , 0.1934, 0.6000), 15: ('H1' , 'H' , 0.1934, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@]<4>([H]<5>)(O<6>[H]<7>)[C@]<8>([H]<9>)([H]<10>)[H]<11>)C<12>([O-]<13>)=O<14>', { 0: ('N' , 'N' , -0.3821, 1.8240), 1: ('H' , 'H' , 0.2681, 0.6000), 2: ('CA' , 'CT' , -0.2420, 1.9080), 3: ('HA' , 'H1' , 0.1207, 1.3870), 4: ('CB' , 'CT' , 0.3025, 1.9080), 5: ('HB' , 'H1' , 0.0078, 1.3870), 6: ('OG1' , 'OH' , -0.6496, 1.7210), 7: ('HG1' , 'HO' , 0.4119, 0.0000), 8: ('CG2' , 'CT' , -0.1853, 1.9080), 9: ('HG23', 'HC' , 0.0586, 1.4870), 10: ('HG22', 'HC' , 0.0586, 1.4870), 11: ('HG21', 'HC' , 0.0586, 1.4870), 12: ('C' , 'C' , 0.7810, 1.9080), 13: ('OXT' , 'O2' , -0.8044, 1.6612), 14: ('O' , 'O2' , -0.8044, 1.6612), }, ), ], 'TRP': [ ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>1=C<8>([H]<9>)N<10>([H]<11>)C<12>=2C<13>([H]<14>)=C<15>([H]<16>)C<17>([H]<18>)=C<19>([H]<20>)C<21>1=2)C<22>=O<23>', { 0: ('N' , 'N' , -0.4157, 1.8240), 1: ('H' , 'H' , 0.2719, 0.6000), 2: ('CA' , 'CT' , -0.0275, 1.9080), 3: ('HA' , 'H1' , 0.1123, 1.3870), 4: ('CB' , 'CT' , -0.0050, 1.9080), 5: ('HB3' , 'HC' , 0.0339, 1.4870), 6: ('HB2' , 'HC' , 0.0339, 1.4870), 7: ('CG' , 'C*' , -0.1415, 1.9080), 8: ('CD1' , 'CW' , -0.1638, 1.9080), 9: ('HD1' , 'H4' , 0.2062, 1.4090), 10: ('NE1' , 'NA' , -0.3418, 1.8240), 11: ('HE1' , 'H' , 0.3412, 0.6000), 12: ('CE2' , 'CN' , 0.1380, 1.9080), 13: ('CZ2' , 'CA' , -0.2601, 1.9080), 14: ('HZ2' , 'HA' , 0.1572, 1.4590), 15: ('CH2' , 'CA' , -0.1134, 1.9080), 16: ('HH2' , 'HA' , 0.1417, 1.4590), 17: ('CZ3' , 'CA' , -0.1972, 1.9080), 18: ('HZ3' , 'HA' , 0.1447, 1.4590), 19: ('CE3' , 'CA' , -0.2387, 1.9080), 20: ('HE3' , 'HA' , 0.1700, 1.4590), 21: ('CD2' , 'CB' , 0.1243, 1.9080), 22: ('C' , 'C' , 0.5973, 1.9080), 23: ('O' , 'O' , -0.5679, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>1=C<8>([H]<9>)N<10>([H]<11>)C<12>=2C<13>([H]<14>)=C<15>([H]<16>)C<17>([H]<18>)=C<19>([H]<20>)C<21>1=2)[N@+]<22>([H]<23>)([H]<24>)[H]<25>', { 0: ('C' , 'C' , 0.6123, 1.9080), 1: ('O' , 'O' , -0.5713, 1.6612), 2: ('CA' , 'CT' , 0.0421, 1.9080), 3: ('HA' , 'HP' , 0.1162, 1.1000), 4: ('CB' , 'CT' , 0.0543, 1.9080), 5: ('HB3' , 'HC' , 0.0222, 1.4870), 6: ('HB2' , 'HC' , 0.0222, 1.4870), 7: ('CG' , 'C*' , -0.1654, 1.9080), 8: ('CD1' , 'CW' , -0.1788, 1.9080), 9: ('HD1' , 'H4' , 0.2195, 1.4090), 10: ('NE1' , 'NA' , -0.3444, 1.8240), 11: ('HE1' , 'H' , 0.3412, 0.6000), 12: ('CE2' , 'CN' , 0.1575, 1.9080), 13: ('CZ2' , 'CA' , -0.2710, 1.9080), 14: ('HZ2' , 'HA' , 0.1589, 1.4590), 15: ('CH2' , 'CA' , -0.1080, 1.9080), 16: ('HH2' , 'HA' , 0.1411, 1.4590), 17: ('CZ3' , 'CA' , -0.2034, 1.9080), 18: ('HZ3' , 'HA' , 0.1458, 1.4590), 19: ('CE3' , 'CA' , -0.2265, 1.9080), 20: ('HE3' , 'HA' , 0.1646, 1.4590), 21: ('CD2' , 'CB' , 0.1132, 1.9080), 22: ('N' , 'N3' , 0.1913, 1.8240), 23: ('H3' , 'H' , 0.1888, 0.6000), 24: ('H2' , 'H' , 0.1888, 0.6000), 25: ('H1' , 'H' , 0.1888, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>1=C<8>([H]<9>)N<10>([H]<11>)C<12>=2C<13>([H]<14>)=C<15>([H]<16>)C<17>([H]<18>)=C<19>([H]<20>)C<21>1=2)C<22>([O-]<23>)=O<24>', { 0: ('N' , 'N' , -0.3821, 1.8240), 1: ('H' , 'H' , 0.2681, 0.6000), 2: ('CA' , 'CT' , -0.2084, 1.9080), 3: ('HA' , 'H1' , 0.1272, 1.3870), 4: ('CB' , 'CT' , -0.0742, 1.9080), 5: ('HB3' , 'HC' , 0.0497, 1.4870), 6: ('HB2' , 'HC' , 0.0497, 1.4870), 7: ('CG' , 'C*' , -0.0796, 1.9080), 8: ('CD1' , 'CW' , -0.1808, 1.9080), 9: ('HD1' , 'H4' , 0.2043, 1.4090), 10: ('NE1' , 'NA' , -0.3316, 1.8240), 11: ('HE1' , 'H' , 0.3413, 0.6000), 12: ('CE2' , 'CN' , 0.1222, 1.9080), 13: ('CZ2' , 'CA' , -0.2594, 1.9080), 14: ('HZ2' , 'HA' , 0.1567, 1.4590), 15: ('CH2' , 'CA' , -0.1020, 1.9080), 16: ('HH2' , 'HA' , 0.1401, 1.4590), 17: ('CZ3' , 'CA' , -0.2287, 1.9080), 18: ('HZ3' , 'HA' , 0.1507, 1.4590), 19: ('CE3' , 'CA' , -0.1837, 1.9080), 20: ('HE3' , 'HA' , 0.1491, 1.4590), 21: ('CD2' , 'CB' , 0.1078, 1.9080), 22: ('C' , 'C' , 0.7658, 1.9080), 23: ('OXT' , 'O2' , -0.8011, 1.6612), 24: ('O' , 'O2' , -0.8011, 1.6612), }, ), ], 'TYR': [ ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1C<8>([H]<9>)=C<10>([H]<11>)C<12>(O<13>[H]<14>)=C<15>([H]<16>)C<17>=1[H]<18>)C<19>=O<20>', { 0: ('N' , 'N' , -0.4157, 1.8240), 1: ('H' , 'H' , 0.2719, 0.6000), 2: ('CA' , 'CT' , -0.0014, 1.9080), 3: ('HA' , 'H1' , 0.0876, 1.3870), 4: ('CB' , 'CT' , -0.0152, 1.9080), 5: ('HB3' , 'HC' , 0.0295, 1.4870), 6: ('HB2' , 'HC' , 0.0295, 1.4870), 7: ('CG' , 'CA' , -0.0011, 1.9080), 8: ('CD2' , 'CA' , -0.1906, 1.9080), 9: ('HD2' , 'HA' , 0.1699, 1.4590), 10: ('CE2' , 'CA' , -0.2341, 1.9080), 11: ('HE2' , 'HA' , 0.1656, 1.4590), 12: ('CZ' , 'CA' , 0.3226, 1.9080), 13: ('OH' , 'OH' , -0.5579, 1.7210), 14: ('HH' , 'HO' , 0.3992, 0.0000), 15: ('CE1' , 'CA' , -0.2341, 1.9080), 16: ('HE1' , 'HA' , 0.1656, 1.4590), 17: ('CD1' , 'CA' , -0.1906, 1.9080), 18: ('HD1' , 'HA' , 0.1699, 1.4590), 19: ('C' , 'C' , 0.5973, 1.9080), 20: ('O' , 'O' , -0.5679, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1C<8>([H]<9>)=C<10>([H]<11>)C<12>(O<13>[H]<14>)=C<15>([H]<16>)C<17>=1[H]<18>)[N@+]<19>([H]<20>)([H]<21>)[H]<22>', { 0: ('C' , 'C' , 0.6123, 1.9080), 1: ('O' , 'O' , -0.5713, 1.6612), 2: ('CA' , 'CT' , 0.0570, 1.9080), 3: ('HA' , 'H1' , 0.0983, 1.1000), 4: ('CB' , 'CT' , 0.0659, 1.9080), 5: ('HB3' , 'HC' , 0.0102, 1.4870), 6: ('HB2' , 'HC' , 0.0102, 1.4870), 7: ('CG' , 'CA' , -0.0205, 1.9080), 8: ('CD2' , 'CA' , -0.2002, 1.9080), 9: ('HD2' , 'HA' , 0.1720, 1.4590), 10: ('CE2' , 'CA' , -0.2239, 1.9080), 11: ('HE2' , 'HA' , 0.1650, 1.4590), 12: ('CZ' , 'CA' , 0.3139, 1.9080), 13: ('OH' , 'OH' , -0.5578, 1.7210), 14: ('HH' , 'HO' , 0.4001, 0.0000), 15: ('CE1' , 'CA' , -0.2239, 1.9080), 16: ('HE1' , 'HA' , 0.1650, 1.4590), 17: ('CD1' , 'CA' , -0.2002, 1.9080), 18: ('HD1' , 'HA' , 0.1720, 1.4590), 19: ('N' , 'N' , 0.1940, 1.8240), 20: ('H3' , 'H' , 0.1873, 0.6000), 21: ('H2' , 'H' , 0.1873, 0.6000), 22: ('H1' , 'H' , 0.1873, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1C<8>([H]<9>)=C<10>([H]<11>)C<12>(O<13>[H]<14>)=C<15>([H]<16>)C<17>=1[H]<18>)C<19>([O-]<20>)=O<21>', { 0: ('N' , 'N' , -0.3821, 1.8240), 1: ('H' , 'H' , 0.2681, 0.6000), 2: ('CA' , 'CT' , -0.2015, 1.9080), 3: ('HA' , 'H1' , 0.1092, 1.3870), 4: ('CB' , 'CT' , -0.0752, 1.9080), 5: ('HB3' , 'HC' , 0.0490, 1.4870), 6: ('HB2' , 'HC' , 0.0490, 1.4870), 7: ('CG' , 'CA' , 0.0243, 1.9080), 8: ('CD2' , 'CA' , -0.1922, 1.9080), 9: ('HD2' , 'HA' , 0.1780, 1.4590), 10: ('CE2' , 'CA' , -0.2458, 1.9080), 11: ('HE2' , 'HA' , 0.1673, 1.4590), 12: ('CZ' , 'CA' , 0.3395, 1.9080), 13: ('OH' , 'OH' , -0.5643, 1.7210), 14: ('HH' , 'HO' , 0.4017, 0.0000), 15: ('CE1' , 'CA' , -0.2458, 1.9080), 16: ('HE1' , 'HA' , 0.1673, 1.4590), 17: ('CD1' , 'CA' , -0.1922, 1.9080), 18: ('HD1' , 'HA' , 0.1780, 1.4590), 19: ('C' , 'C' , 0.7817, 1.9080), 20: ('OXT' , 'O2' , -0.8070, 1.6612), 21: ('O' , 'O' , -0.8070, 1.6612), }, ), ], 'VAL': [ ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@]<4>([H]<5>)([C@]<6>([H]<7>)([H]<8>)[H]<9>)[C@]<10>([H]<11>)([H]<12>)[H]<13>)C<14>=O<15>', { 0: ('N' , 'N' , -0.4157, 1.8240), 1: ('H' , 'H' , 0.2719, 0.6000), 2: ('CA' , 'CT' , -0.0875, 1.9080), 3: ('HA' , 'H1' , 0.0969, 1.3870), 4: ('CB' , 'CT' , 0.2985, 1.9080), 5: ('HB' , 'HC' , -0.0297, 1.4870), 6: ('CG2' , 'CT' , -0.3192, 1.9080), 7: ('HG23', 'HC' , 0.0791, 1.4870), 8: ('HG22', 'HC' , 0.0791, 1.4870), 9: ('HG21', 'HC' , 0.0791, 1.4870), 10: ('CG1' , 'CT' , -0.3192, 1.9080), 11: ('HG13', 'HC' , 0.0791, 1.4870), 12: ('HG12', 'HC' , 0.0791, 1.4870), 13: ('HG11', 'HC' , 0.0791, 1.4870), 14: ('C' , 'C' , 0.5973, 1.9080), 15: ('O' , 'O' , -0.5679, 1.6612), }, ), ( 'C<0>(=O<1>)[C@]<2>([H]<3>)([C@]<4>([H]<5>)([C@]<6>([H]<7>)([H]<8>)[H]<9>)[C@]<10>([H]<11>)([H]<12>)[H]<13>)[N@+]<14>([H]<15>)([H]<16>)[H]<17>', { 0: ('C' , 'C' , 0.6163, 1.9080), 1: ('O' , 'O' , -0.5722, 1.6612), 2: ('CA' , 'CT' , -0.0054, 1.9080), 3: ('HA' , 'HP' , 0.1093, 1.1000), 4: ('CB' , 'CT' , 0.3196, 1.9080), 5: ('HB' , 'HC' , -0.0221, 1.4870), 6: ('CG2' , 'CT' , -0.3129, 1.9080), 7: ('HG23', 'HC' , 0.0735, 1.4870), 8: ('HG22', 'HC' , 0.0735, 1.4870), 9: ('HG21', 'HC' , 0.0735, 1.4870), 10: ('CG1' , 'CT' , -0.3129, 1.9080), 11: ('HG13', 'HC' , 0.0735, 1.4870), 12: ('HG12', 'HC' , 0.0735, 1.4870), 13: ('HG11', 'HC' , 0.0735, 1.4870), 14: ('N' , 'N3' , 0.0577, 1.8240), 15: ('H3' , 'H' , 0.2272, 0.6000), 16: ('H2' , 'H' , 0.2272, 0.6000), 17: ('H1' , 'H' , 0.2272, 0.6000), }, ), ( 'N<0>([H]<1>)[C@@]<2>([H]<3>)([C@]<4>([H]<5>)([C@]<6>([H]<7>)([H]<8>)[H]<9>)[C@]<10>([H]<11>)([H]<12>)[H]<13>)C<14>([O-]<15>)=O<16>', { 0: ('N' , 'N' , -0.3821, 1.8240), 1: ('H' , 'H' , 0.2681, 0.6000), 2: ('CA' , 'CT' , -0.3438, 1.9080), 3: ('HA' , 'H1' , 0.1438, 1.3870), 4: ('CB' , 'CT' , 0.1940, 1.9080), 5: ('HB' , 'HC' , 0.0308, 1.4870), 6: ('CG2' , 'CT' , -0.3064, 1.9080), 7: ('HG23', 'HC' , 0.0836, 1.4870), 8: ('HG22', 'HC' , 0.0836, 1.4870), 9: ('HG21', 'HC' , 0.0836, 1.4870), 10: ('CG1' , 'CT' , -0.3064, 1.9080), 11: ('HG13', 'HC' , 0.0836, 1.4870), 12: ('HG12', 'HC' , 0.0836, 1.4870), 13: ('HG11', 'HC' , 0.0836, 1.4870), 14: ('C' , 'C' , 0.8350, 1.9080), 15: ('OXT' , 'O2' , -0.8173, 1.6612), 16: ('O' , 'O2' , -0.8173, 1.6612), }, ), ], 'WAT': [ ( 'O<0>([H]<1>)[H]<2>', { 0: ('O' , 'OW' , -0.8340, 1.6612), 1: ('H1' , 'HW' , 0.4170, 0.0000), 2: ('H2' , 'HW' , 0.4170, 0.0000), }, ), ], 'HOH': [ ( 'O<0>([H]<1>)[H]<2>', { 0: ('O' , 'OW' , -0.8340, 1.6612), 1: ('H1' , 'HW' , 0.4170, 0.0000), 2: ('H2' , 'HW' , 0.4170, 0.0000), }, ), ], 'TIP': [ ( 'O<0>([H]<1>)[H]<2>', { 0: ('O' , 'OW' , -0.8340, 1.6612), 1: ('H1' , 'HW' , 0.4170, 0.0000), 2: ('H2' , 'HW' , 0.4170, 0.0000), }, ), ], } # also want commong residues like PTyr, PSer, # missing neutrals GLUH/GLUN,GLH, ASPH/ASH/ASPN, LYSN, ARGN for alias in ( ( 'HIE', 'HIS'), # default HIS is HISE ( 'HISE', 'HIS'), ( 'HISD', 'HID'), ( 'HISP', 'HIP'), ( 'GLUM', 'GLU'), # default -1 ( 'ASPM', 'ASP'), # default -1 ( 'LYSP', 'LYS'), # default +1 ( 'ARGP', 'ARG'), # default +1 ): amber99_dict[alias[0]] = amber99_dict[alias[1]]
amber99_dict = {'NHE': [('N<0>([H]<1>)([H]<2>)', {0: ('N', 'N', -0.463, 1.824), 1: ('HN1', 'H', 0.2315, 0.6), 2: ('HN2', 'H', 0.2315, 0.6)})], 'NME': [('N<0>([H]<1>)[C@]<2>([H]<3>)([H]<4>)[H]<5>', {0: ('N', 'N', -0.4157, 1.824), 1: ('H', 'H', 0.2719, 0.6), 2: ('CH3', 'CT', -0.149, 1.908), 3: ('HH31', 'HC', 0.0976, 1.387), 4: ('HH32', 'HC', 0.0976, 1.387), 5: ('HH33', 'HC', 0.0976, 1.387)})], 'ACE': [('C<0>(=O<1>)[C@]<2>([H]<3>)([H]<4>)[H]<5>', {0: ('C', 'C', 0.5972, 1.908), 1: ('O', 'O', -0.5679, 1.6612), 2: ('CH3', 'CT', -0.3662, 1.908), 3: ('HH31', 'HC', 0.1123, 1.487), 4: ('HH32', 'HC', 0.1123, 1.487), 5: ('HH33', 'HC', 0.1123, 1.487)})], 'ALA': [('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@]<4>([H]<5>)([H]<6>)[H]<7>)C<8>=O<9>', {0: ('N', 'N', -0.4157, 1.824), 1: ('H', 'H', 0.2719, 0.6), 2: ('CA', 'CT', 0.0337, 1.908), 3: ('HA', 'H1', 0.0823, 1.387), 4: ('CB', 'CT', -0.1825, 1.908), 5: ('HB3', 'HC', 0.0603, 1.487), 6: ('HB2', 'HC', 0.0603, 1.487), 7: ('HB1', 'HC', 0.0603, 1.487), 8: ('C', 'C', 0.5973, 1.908), 9: ('O', 'O', -0.5679, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([C@]<4>([H]<5>)([H]<6>)[H]<7>)[N@+]<8>([H]<9>)([H]<10>)[H]<11>', {0: ('C', 'C', 0.6163, 1.908), 1: ('O', 'O', -0.5722, 1.6612), 2: ('CA', 'CT', 0.0962, 1.908), 3: ('HA', 'HP', 0.0889, 1.1), 4: ('CB', 'CT', -0.0597, 1.908), 5: ('HB3', 'HC', 0.03, 1.487), 6: ('HB2', 'HC', 0.03, 1.487), 7: ('HB1', 'HC', 0.03, 1.487), 8: ('N', 'N3', 0.1414, 1.824), 9: ('H3', 'H', 0.1997, 0.6), 10: ('H2', 'H', 0.1997, 0.6), 11: ('H1', 'H', 0.1997, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@]<4>([H]<5>)([H]<6>)[H]<7>)C<8>([O-]<9>)=O<10>', {0: ('N', 'N', -0.3821, 1.824), 1: ('H', 'H', 0.2681, 0.6), 2: ('CA', 'CT', -0.1747, 1.908), 3: ('HA', 'H1', 0.1067, 1.387), 4: ('CB', 'CT', -0.2093, 1.908), 5: ('HB3', 'HC', 0.0764, 1.487), 6: ('HB2', 'HC', 0.0764, 1.487), 7: ('HB1', 'HC', 0.0764, 1.487), 8: ('C', 'C', 0.7731, 1.908), 9: ('OXT', 'O2', -0.8055, 1.6612), 10: ('O', 'O2', -0.8055, 1.6612)})], 'ARG': [('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)[C@@]<10>([H]<11>)([H]<12>)N<13>([H]<14>)C<15>(N<16>([H]<17>)[H]<18>)=[N+]<19>([H]<20>)[H]<21>)C<22>=O<23>', {0: ('N', 'N', -0.3479, 1.824), 1: ('H', 'H', 0.2747, 0.6), 2: ('CA', 'CT', -0.2637, 1.908), 3: ('HA', 'H1', 0.156, 1.387), 4: ('CB', 'CT', -0.0007, 1.908), 5: ('HB3', 'HC', 0.0327, 1.487), 6: ('HB2', 'HC', 0.0327, 1.487), 7: ('CG', 'CT', 0.039, 1.908), 8: ('HG3', 'HC', 0.0285, 1.487), 9: ('HG2', 'HC', 0.0285, 1.487), 10: ('CD', 'CT', 0.0486, 1.908), 11: ('HD3', 'H1', 0.0687, 1.387), 12: ('HD2', 'H1', 0.0687, 1.387), 13: ('NE', 'N2', -0.5295, 1.824), 14: ('HE', 'H', 0.3456, 0.6), 15: ('CZ', 'CA', 0.8076, 1.908), 16: ('NH2', 'N2', -0.8627, 1.824), 17: ('HH22', 'H', 0.4478, 0.6), 18: ('HH21', 'H', 0.4478, 0.6), 19: ('NH1', 'N2', -0.8627, 1.824), 20: ('HH12', 'H', 0.4478, 0.6), 21: ('HH11', 'H', 0.4478, 0.6), 22: ('C', 'C', 0.7341, 1.908), 23: ('O', 'O', -0.5894, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)[C@@]<10>([H]<11>)([H]<12>)N<13>([H]<14>)C<15>(N<16>([H]<17>)[H]<18>)=[N+]<19>([H]<20>)[H]<21>)[N@+]<22>([H]<23>)([H]<24>)[H]<25>', {0: ('C', 'C', 0.7214, 1.908), 1: ('O', 'O', -0.6013, 1.6612), 2: ('CA', 'CT', -0.0223, 1.908), 3: ('HA', 'HP', 0.1242, 1.1), 4: ('CB', 'CT', 0.0118, 1.908), 5: ('HB3', 'HC', 0.0226, 1.487), 6: ('HB2', 'HC', 0.0226, 1.487), 7: ('CG', 'CT', 0.0236, 1.908), 8: ('HG3', 'HC', 0.0309, 1.487), 9: ('HG2', 'HC', 0.0309, 1.487), 10: ('CD', 'CT', 0.0935, 1.908), 11: ('HD3', 'H1', 0.0527, 1.387), 12: ('HD2', 'H1', 0.0527, 1.387), 13: ('NE', 'N2', -0.565, 1.824), 14: ('HE', 'H', 0.3592, 0.6), 15: ('CZ', 'CA', 0.8281, 1.908), 16: ('NH2', 'N2', -0.8693, 1.824), 17: ('HH22', 'H', 0.4494, 0.6), 18: ('HH21', 'H', 0.4494, 0.6), 19: ('NH1', 'N2', -0.8693, 1.824), 20: ('HH12', 'H', 0.4494, 0.6), 21: ('HH11', 'H', 0.4494, 0.6), 22: ('N', 'N3', 0.1305, 1.824), 23: ('H3', 'H', 0.2083, 0.6), 24: ('H2', 'H', 0.2083, 0.6), 25: ('H1', 'H', 0.2083, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)[C@@]<10>([H]<11>)([H]<12>)N<13>([H]<14>)C<15>(N<16>([H]<17>)[H]<18>)=[N+]<19>([H]<20>)[H]<21>)C<22>([O-]<23>)=O<24>', {0: ('N', 'N', -0.3481, 1.824), 1: ('H', 'H', 0.2764, 0.6), 2: ('CA', 'CT', -0.3068, 1.908), 3: ('HA', 'H1', 0.1447, 1.387), 4: ('CB', 'CT', -0.0374, 1.908), 5: ('HB3', 'HC', 0.0371, 1.487), 6: ('HB2', 'HC', 0.0371, 1.487), 7: ('CG', 'CT', 0.0744, 1.908), 8: ('HG3', 'HC', 0.0185, 1.487), 9: ('HG2', 'HC', 0.0185, 1.487), 10: ('CD', 'CT', 0.1114, 1.908), 11: ('HD3', 'H1', 0.0468, 1.387), 12: ('HD2', 'H1', 0.0468, 1.387), 13: ('NE', 'N2', -0.5564, 1.824), 14: ('HE', 'H', 0.3479, 0.6), 15: ('CZ', 'CA', 0.8368, 1.908), 16: ('NH2', 'N2', -0.8737, 1.824), 17: ('HH22', 'H', 0.4493, 0.6), 18: ('HH21', 'H', 0.4493, 0.6), 19: ('NH1', 'N2', -0.8737, 1.824), 20: ('HH12', 'H', 0.4493, 0.6), 21: ('HH11', 'H', 0.4493, 0.6), 22: ('C', 'C', 0.8557, 1.908), 23: ('OXT', 'O2', -0.8266, 1.6612), 24: ('O', 'O2', -0.8266, 1.6612)})], 'ASP': [('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>([O-]<8>)=O<9>)C<10>=O<11>', {0: ('N', 'N', -0.5163, 1.824), 1: ('H', 'H', 0.2936, 0.6), 2: ('CA', 'CT', 0.0381, 1.908), 3: ('HA', 'H1', 0.088, 1.387), 4: ('CB', 'CT', -0.0303, 1.908), 5: ('HB3', 'HC', -0.0122, 1.487), 6: ('HB2', 'HC', -0.0122, 1.487), 7: ('CG', 'C', 0.7994, 1.908), 8: ('OD2', 'O2', -0.8014, 1.6612), 9: ('OD1', 'O2', -0.8014, 1.6612), 10: ('C', 'C', 0.5366, 1.908), 11: ('O', 'O', -0.5819, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>([O-]<8>)=O<9>)[N@+]<10>([H]<11>)([H]<12>)[H]<13>', {0: ('C', 'C', 0.5621, 1.908), 1: ('O', 'O', -0.5889, 1.6612), 2: ('CA', 'CT', 0.0292, 1.908), 3: ('HA', 'HP', 0.1141, 1.1), 4: ('CB', 'CT', -0.0235, 1.908), 5: ('HB3', 'HC', -0.0169, 1.487), 6: ('HB2', 'HC', -0.0169, 1.487), 7: ('CG', 'C', 0.8194, 1.908), 8: ('OD2', 'O2', -0.8084, 1.6612), 9: ('OD1', 'O2', -0.8084, 1.6612), 10: ('N', 'N3', 0.0782, 1.824), 11: ('H3', 'H', 0.22, 0.6), 12: ('H2', 'H', 0.22, 0.6), 13: ('H1', 'H', 0.22, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>([O-]<8>)=O<9>)C<10>([O-]<11>)=O<12>', {0: ('N', 'N', -0.5192, 1.824), 1: ('H', 'H', 0.3055, 0.6), 2: ('CA', 'CT', -0.1817, 1.908), 3: ('HA', 'H1', 0.1046, 1.387), 4: ('CB', 'CT', -0.0677, 1.908), 5: ('HB3', 'HC', -0.0212, 1.487), 6: ('HB2', 'HC', -0.0212, 1.487), 7: ('CG', 'C', 0.8851, 1.908), 8: ('OD2', 'O2', -0.8162, 1.6612), 9: ('OD1', 'O2', -0.8162, 1.6612), 10: ('C', 'C', 0.7256, 1.908), 11: ('OXT', 'O2', -0.7887, 1.6612), 12: ('O', 'O2', -0.7887, 1.6612)})], 'ASN': [('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>(=O<8>)N<9>([H]<10>)[H]<11>)C<12>=O<13>', {0: ('N', 'N', -0.4157, 1.824), 1: ('H', 'H', 0.2719, 0.6), 2: ('CA', 'CT', 0.0143, 1.908), 3: ('HA', 'H1', 0.1048, 1.387), 4: ('CB', 'CT', -0.2041, 1.908), 5: ('HB3', 'HC', 0.0797, 1.487), 6: ('HB2', 'HC', 0.0797, 1.487), 7: ('CG', 'C', 0.713, 1.908), 8: ('OD1', 'O', -0.5931, 1.6612), 9: ('ND2', 'N', -0.9191, 1.824), 10: ('HD22', 'H', 0.4196, 0.6), 11: ('HD21', 'H', 0.4196, 0.6), 12: ('C', 'C', 0.5973, 1.908), 13: ('O', 'O', -0.5679, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>(=O<8>)N<9>([H]<10>)[H]<11>)[N@+]<12>([H]<13>)([H]<14>)[H]<15>', {0: ('C', 'C', 0.6163, 1.908), 1: ('O', 'O', -0.5722, 1.6612), 2: ('CA', 'CT', 0.0368, 1.908), 3: ('HA', 'HP', 0.1231, 1.1), 4: ('CB', 'CT', -0.0283, 1.908), 5: ('HB3', 'HC', 0.0515, 1.487), 6: ('HB2', 'HC', 0.0515, 1.487), 7: ('CG', 'C', 0.5833, 1.908), 8: ('OD1', 'O', -0.5744, 1.6612), 9: ('ND2', 'N', -0.8634, 1.824), 10: ('HD22', 'H', 0.4097, 0.6), 11: ('HD21', 'H', 0.4097, 0.6), 12: ('N', 'N3', 0.1801, 1.824), 13: ('H3', 'H', 0.1921, 0.6), 14: ('H2', 'H', 0.1921, 0.6), 15: ('H1', 'H', 0.1921, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>(=O<8>)N<9>([H]<10>)[H]<11>)C<12>([O-]<13>)=O<14>', {0: ('N', 'N', -0.3821, 1.824), 1: ('H', 'H', 0.2681, 0.6), 2: ('CA', 'CT', -0.208, 1.908), 3: ('HA', 'H1', 0.1358, 1.387), 4: ('CB', 'CT', -0.2299, 1.908), 5: ('HB3', 'HC', 0.1023, 1.487), 6: ('HB2', 'HC', 0.1023, 1.487), 7: ('CG', 'C', 0.7153, 1.908), 8: ('OD1', 'O', -0.601, 1.6612), 9: ('ND2', 'N', -0.9084, 1.824), 10: ('HD22', 'H', 0.415, 0.6), 11: ('HD21', 'H', 0.415, 0.6), 12: ('C', 'C', 0.805, 1.908), 13: ('OXT', 'O2', -0.8147, 1.6612), 14: ('O', 'O2', -0.8147, 1.6612)})], 'CYS': [('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)S<7>[H]<8>)C<9>=O<10>', {0: ('N', 'N', -0.4157, 1.824), 1: ('H', 'H', 0.2719, 0.6), 2: ('CA', 'CT', 0.0213, 1.908), 3: ('HA', 'H1', 0.1124, 1.387), 4: ('CB', 'CT', -0.1231, 1.908), 5: ('HB3', 'H1', 0.1112, 1.387), 6: ('HB2', 'H1', 0.1112, 1.387), 7: ('SG', 'SH', -0.3119, 2.0), 8: ('HG', 'HS', 0.1933, 0.6), 9: ('C', 'C', 0.5973, 1.908), 10: ('O', 'O', -0.5679, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)S<7>[H]<8>)[N@+]<9>([H]<10>)([H]<11>)[H]<12>', {0: ('C', 'C', 0.6123, 1.908), 1: ('O', 'O', -0.5713, 1.6612), 2: ('CA', 'CT', 0.0927, 1.908), 3: ('HA', 'HP', 0.1411, 1.1), 4: ('CB', 'CT', -0.1195, 1.908), 5: ('HB3', 'H1', 0.1188, 1.387), 6: ('HB2', 'H1', 0.1188, 1.387), 7: ('SG', 'SH', -0.3298, 2.0), 8: ('HG', 'HS', 0.1975, 0.6), 9: ('N', 'N3', 0.1325, 1.824), 10: ('H3', 'H', 0.2023, 0.6), 11: ('H2', 'H', 0.2023, 0.6), 12: ('H1', 'H', 0.2023, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)S<7>[H]<8>)C<9>([O-]<10>)=O<11>', {0: ('N', 'N', -0.3821, 1.824), 1: ('H', 'H', 0.2681, 0.6), 2: ('CA', 'CT', -0.1635, 1.908), 3: ('HA', 'H1', 0.1396, 1.387), 4: ('CB', 'CT', -0.1996, 1.908), 5: ('HB3', 'H1', 0.1437, 1.387), 6: ('HB2', 'H1', 0.1437, 1.387), 7: ('SG', 'SH', -0.3102, 2.0), 8: ('HG', 'HS', 0.2068, 0.6), 9: ('C', 'C', 0.7497, 1.908), 10: ('OXT', 'O2', -0.7981, 1.6612), 11: ('O', 'O2', -0.7981, 1.6612)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)S<7>S<7>)C<9>=O<10>', {0: ('N', 'N', -0.4157, 1.824), 1: ('H', 'H', 0.2719, 0.6), 2: ('CA', 'CT', 0.0429, 1.908), 3: ('HA', 'H1', 0.0766, 1.387), 4: ('CB', 'CT', -0.079, 1.908), 5: ('HB3', 'H1', 0.091, 1.387), 6: ('HB2', 'H1', 0.091, 1.387), 7: ('SG', 'S', -0.1081, 2.0), 9: ('C', 'C', 0.5973, 1.908), 10: ('O', 'O', -0.5679, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)S<7>S<7>)[N@+]<9>([H]<10>)([H]<11>)[H]<12>', {0: ('C', 'C', 0.6123, 1.908), 1: ('O', 'O', -0.5713, 1.6612), 2: ('CA', 'CT', 0.1055, 1.908), 3: ('HA', 'HP', 0.0922, 1.1), 4: ('CB', 'CT', -0.0277, 1.908), 5: ('HB3', 'H1', 0.068, 1.387), 6: ('HB2', 'H1', 0.068, 1.387), 7: ('SG', 'S', -0.0984, 2.0), 9: ('N', 'N3', 0.2069, 1.824), 10: ('H3', 'H', 0.1815, 0.6), 11: ('H2', 'H', 0.1815, 0.6), 12: ('H1', 'H', 0.1815, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)S<7>S<7>)C<9>([O-]<10>)=O<11>', {0: ('N', 'N', -0.3821, 1.824), 1: ('H', 'H', 0.2681, 0.6), 2: ('CA', 'CT', -0.1318, 1.908), 3: ('HA', 'H1', 0.0938, 1.387), 4: ('CB', 'CT', -0.1934, 1.908), 5: ('HB3', 'H1', 0.1228, 1.387), 6: ('HB2', 'H1', 0.1228, 1.387), 7: ('SG', 'S', -0.0529, 2.0), 9: ('C', 'C', 0.7618, 1.908), 10: ('OXT', 'O2', -0.8041, 1.6612), 11: ('O', 'O2', -0.8041, 1.6612)})], 'CYX': [('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)S<7>S<7>)C<9>=O<10>', {0: ('N', 'N', -0.4157, 1.824), 1: ('H', 'H', 0.2719, 0.6), 2: ('CA', 'CT', 0.0429, 1.908), 3: ('HA', 'H1', 0.0766, 1.387), 4: ('CB', 'CT', -0.079, 1.908), 5: ('HB3', 'H1', 0.091, 1.387), 6: ('HB2', 'H1', 0.091, 1.387), 7: ('SG', 'S', -0.1081, 2.0), 9: ('C', 'C', 0.5973, 1.908), 10: ('O', 'O', -0.5679, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)S<7>S<7>)[N@+]<9>([H]<10>)([H]<11>)[H]<12>', {0: ('C', 'C', 0.6123, 1.908), 1: ('O', 'O', -0.5713, 1.6612), 2: ('CA', 'CT', 0.1055, 1.908), 3: ('HA', 'HP', 0.0922, 1.1), 4: ('CB', 'CT', -0.0277, 1.908), 5: ('HB3', 'H1', 0.068, 1.387), 6: ('HB2', 'H1', 0.068, 1.387), 7: ('SG', 'S', -0.0984, 2.0), 9: ('N', 'N3', 0.2069, 1.824), 10: ('H3', 'H', 0.1815, 0.6), 11: ('H2', 'H', 0.1815, 0.6), 12: ('H1', 'H', 0.1815, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)S<7>S<7>)C<9>([O-]<10>)=O<11>', {0: ('N', 'N', -0.3821, 1.824), 1: ('H', 'H', 0.2681, 0.6), 2: ('CA', 'CT', -0.1318, 1.908), 3: ('HA', 'H1', 0.0938, 1.387), 4: ('CB', 'CT', -0.1934, 1.908), 5: ('HB3', 'H1', 0.1228, 1.387), 6: ('HB2', 'H1', 0.1228, 1.387), 7: ('SG', 'S', -0.0529, 2.0), 9: ('C', 'C', 0.7618, 1.908), 10: ('OXT', 'O2', -0.8041, 1.6612), 11: ('O', 'O2', -0.8041, 1.6612)})], 'GLN': [('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)C<10>(=O<11>)N<12>([H]<13>)[H]<14>)C<15>=O<16>', {0: ('N', 'N', -0.4157, 1.824), 1: ('H', 'H', 0.2719, 0.6), 2: ('CA', 'CT', -0.0031, 1.908), 3: ('HA', 'H1', 0.085, 1.387), 4: ('CB', 'CT', -0.0036, 1.908), 5: ('HB3', 'HC', 0.0171, 1.487), 6: ('HB2', 'HC', 0.0171, 1.487), 7: ('CG', 'CT', -0.0645, 1.908), 8: ('HG3', 'HC', 0.0352, 1.487), 9: ('HG2', 'HC', 0.0352, 1.487), 10: ('CD', 'C', 0.6951, 1.908), 11: ('OE1', 'O', -0.6086, 1.6612), 12: ('NE2', 'N', -0.9407, 1.824), 13: ('HE22', 'H', 0.4251, 0.6), 14: ('HE21', 'H', 0.4251, 0.6), 15: ('C', 'C', 0.5973, 1.908), 16: ('O', 'O', -0.5679, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)C<10>(=O<11>)N<12>([H]<13>)[H]<14>)[N@+]<15>([H]<16>)([H]<17>)[H]<18>', {0: ('C', 'C', 0.6123, 1.908), 1: ('O', 'O', -0.5713, 1.6612), 2: ('CA', 'CT', 0.0536, 1.908), 3: ('HA', 'HP', 0.1015, 1.1), 4: ('CB', 'CT', 0.0651, 1.908), 5: ('HB3', 'HC', 0.005, 1.487), 6: ('HB2', 'HC', 0.005, 1.487), 7: ('CG', 'CT', -0.0903, 1.908), 8: ('HG3', 'HC', 0.0331, 1.487), 9: ('HG2', 'HC', 0.0331, 1.487), 10: ('CD', 'C', 0.7354, 1.908), 11: ('OE1', 'O', -0.6133, 1.6612), 12: ('NE2', 'N', -1.0031, 1.824), 13: ('HE22', 'H', 0.4429, 0.6), 14: ('HE21', 'H', 0.4429, 0.6), 15: ('N', 'N3', 0.1493, 1.824), 16: ('H3', 'H', 0.1996, 0.6), 17: ('H2', 'H', 0.1996, 0.6), 18: ('H1', 'H', 0.1996, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)C<10>(=O<11>)N<12>([H]<13>)[H]<14>)C<15>([O-]<16>)=O<17>', {0: ('N', 'N', -0.3821, 1.824), 1: ('H', 'H', 0.2681, 0.6), 2: ('CA', 'CT', -0.2248, 1.908), 3: ('HA', 'H1', 0.1232, 1.387), 4: ('CB', 'CT', -0.0664, 1.908), 5: ('HB3', 'HC', 0.0452, 1.487), 6: ('HB2', 'HC', 0.0452, 1.487), 7: ('CG', 'CT', -0.021, 1.908), 8: ('HG3', 'HC', 0.0203, 1.487), 9: ('HG2', 'HC', 0.0203, 1.487), 10: ('CD', 'C', 0.7093, 1.908), 11: ('OE1', 'O', -0.6098, 1.6612), 12: ('NE2', 'N', -0.9574, 1.824), 13: ('HE22', 'H', 0.4304, 0.6), 14: ('HE21', 'H', 0.4304, 0.6), 15: ('C', 'C', 0.7775, 1.908), 16: ('OXT', 'O2', -0.8042, 1.6612), 17: ('O', 'O2', -0.8042, 1.6612)})], 'GLU': [('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)C<10>([O-]<11>)=O<12>)C<13>=O<14>', {0: ('N', 'N', -0.5163, 1.824), 1: ('H', 'H', 0.2936, 0.6), 2: ('CA', 'CT', 0.0397, 1.908), 3: ('HA', 'H1', 0.1105, 1.387), 4: ('CB', 'CT', 0.056, 1.908), 5: ('HB3', 'HC', -0.0173, 1.487), 6: ('HB2', 'HC', -0.0173, 1.487), 7: ('CG', 'CT', 0.0136, 1.908), 8: ('HG3', 'HC', -0.0425, 1.487), 9: ('HG2', 'HC', -0.0425, 1.487), 10: ('CD', 'C', 0.8054, 1.908), 11: ('OE2', 'O2', -0.8188, 1.6612), 12: ('OE1', 'O2', -0.8188, 1.6612), 13: ('C', 'C', 0.5366, 1.908), 14: ('O', 'O', -0.5819, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)C<10>([O-]<11>)=O<12>)[N@+]<13>([H]<14>)([H]<15>)[H]<16>', {0: ('C', 'C', 0.5621, 1.908), 1: ('O', 'O', -0.5889, 1.6612), 2: ('CA', 'CT', 0.0588, 1.908), 3: ('HA', 'HP', 0.1202, 1.1), 4: ('CB', 'CT', 0.0909, 1.908), 5: ('HB3', 'HC', -0.0232, 1.487), 6: ('HB2', 'HC', -0.0232, 1.487), 7: ('CG', 'CT', -0.0236, 1.908), 8: ('HG3', 'HC', -0.0315, 1.487), 9: ('HG2', 'HC', -0.0315, 1.487), 10: ('CD', 'C', 0.8087, 1.908), 11: ('OE2', 'O2', -0.8189, 1.6612), 12: ('OE1', 'O2', -0.8189, 1.6612), 13: ('N', 'N3', 0.0017, 1.824), 14: ('H3', 'H', 0.2391, 0.6), 15: ('H2', 'H', 0.2391, 0.6), 16: ('H1', 'H', 0.2391, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)C<10>([O-]<11>)=O<12>)C<13>([O-]<14>)=O<15>', {0: ('N', 'N', -0.5192, 1.824), 1: ('H', 'H', 0.3055, 0.6), 2: ('CA', 'CT', -0.2059, 1.908), 3: ('HA', 'H1', 0.1399, 1.387), 4: ('CB', 'CT', 0.0071, 1.908), 5: ('HB3', 'HC', -0.0078, 1.487), 6: ('HB2', 'HC', -0.0078, 1.487), 7: ('CG', 'CT', 0.0675, 1.908), 8: ('HG3', 'HC', -0.0548, 1.487), 9: ('HG2', 'HC', -0.0548, 1.487), 10: ('CD', 'C', 0.8183, 1.908), 11: ('OE2', 'O2', -0.822, 1.6612), 12: ('OE1', 'O2', -0.822, 1.6612), 13: ('C', 'C', 0.742, 1.908), 14: ('OXT', 'O2', -0.793, 1.6612), 15: ('O', 'O2', -0.793, 1.6612)})], 'GLY': [('N<0>([H]<1>)[C@@]<2>([H]<3>)([H]<4>)C<5>=O<6>', {0: ('N', 'N', -0.4157, 1.824), 1: ('H', 'H', 0.2719, 0.6), 2: ('CA', 'CT', -0.0252, 1.908), 3: ('HA', 'H1', 0.0698, 1.387), 4: ('HA3', 'H1', 0.0698, 1.387), 5: ('C', 'C', 0.5973, 1.908), 6: ('O', 'O', -0.5679, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([H]<4>)[N@+]<5>([H]<6>)([H]<7>)[H]<8>', {0: ('C', 'C', 0.6163, 1.908), 1: ('O', 'O', -0.5722, 1.6612), 2: ('CA', 'CT', -0.01, 1.908), 3: ('HA', 'H1', 0.0895, 1.1), 4: ('HA3', 'H1', 0.0895, 1.1), 5: ('N', 'N', 0.2943, 1.824), 6: ('H2', 'H', 0.1642, 0.6), 7: ('H1', 'H', 0.1642, 0.6), 8: ('H3', 'H', 0.1642, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([H]<4>)C<5>([O-]<6>)=O<7>', {0: ('N', 'N', -0.3821, 1.824), 1: ('H', 'H', 0.2681, 0.6), 2: ('CA', 'CT', -0.2493, 1.908), 3: ('HA', 'H1', 0.1056, 1.387), 4: ('HA3', 'H1', 0.1056, 1.387), 5: ('C', 'C', 0.7231, 1.908), 6: ('OXT', 'O2', -0.7855, 1.6612), 7: ('O', 'O', -0.7855, 1.6612)})], 'HIS': [('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1N<8>=C<9>([H]<10>)N<11>([H]<12>)C<13>=1[H]<14>)C<15>=O<16>', {0: ('N', 'N', -0.4157, 1.824), 1: ('H', 'H', 0.2719, 0.6), 2: ('CA', 'CT', -0.0581, 1.908), 3: ('HA', 'H1', 0.136, 1.387), 4: ('CB', 'CT', -0.0074, 1.908), 5: ('HB3', 'HC', 0.0367, 1.487), 6: ('HB2', 'HC', 0.0367, 1.487), 7: ('CG', 'CC', 0.1868, 1.908), 8: ('ND1', 'NB', -0.5432, 1.824), 9: ('CE1', 'CR', 0.1635, 1.908), 10: ('HE1', 'H5', 0.1435, 1.359), 11: ('NE2', 'NA', -0.2795, 1.824), 12: ('HE2', 'H', 0.3339, 0.6), 13: ('CD2', 'CW', -0.2207, 1.908), 14: ('HD2', 'H4', 0.1862, 1.409), 15: ('C', 'C', 0.5973, 1.908), 16: ('O', 'O', -0.5679, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1N<8>=C<9>([H]<10>)N<11>([H]<12>)C<13>=1[H]<14>)[N@+]<15>([H]<16>)([H]<17>)[H]<18>', {0: ('C', 'C', 0.6123, 1.908), 1: ('O', 'O', -0.5713, 1.6612), 2: ('CA', 'CT', 0.0236, 1.908), 3: ('HA', 'HP', 0.138, 1.1), 4: ('CB', 'CT', 0.0489, 1.908), 5: ('HB3', 'HC', 0.0223, 1.487), 6: ('HB2', 'HC', 0.0223, 1.487), 7: ('CG', 'CC', 0.174, 1.908), 8: ('ND1', 'NB', -0.5579, 1.824), 9: ('CE1', 'CR', 0.1804, 1.908), 10: ('HE1', 'H5', 0.1397, 1.359), 11: ('NE2', 'NA', -0.2781, 1.824), 12: ('HE2', 'H', 0.3324, 0.6), 13: ('CD2', 'CW', -0.2349, 1.908), 14: ('HD2', 'H4', 0.1963, 1.409), 15: ('N', 'N3', 0.1472, 1.824), 16: ('H3', 'H', 0.2016, 0.6), 17: ('H2', 'H', 0.2016, 0.6), 18: ('H1', 'H', 0.2016, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1N<8>=C<9>([H]<10>)N<11>([H]<12>)C<13>=1[H]<14>)C<15>([O-]<16>)=O<17>', {0: ('N', 'N', -0.3821, 1.824), 1: ('H', 'H', 0.2681, 0.6), 2: ('CA', 'CT', -0.2699, 1.908), 3: ('HA', 'H1', 0.165, 1.387), 4: ('CB', 'CT', -0.1068, 1.908), 5: ('HB3', 'HC', 0.062, 1.487), 6: ('HB2', 'HC', 0.062, 1.487), 7: ('CG', 'CC', 0.2724, 1.908), 8: ('ND1', 'NB', -0.5517, 1.824), 9: ('CE1', 'CR', 0.1558, 1.908), 10: ('HE1', 'H5', 0.1448, 1.359), 11: ('NE2', 'NA', -0.267, 1.824), 12: ('HE2', 'H', 0.3319, 0.6), 13: ('CD2', 'CW', -0.2588, 1.908), 14: ('HD2', 'H4', 0.1957, 1.409), 15: ('C', 'C', 0.7916, 1.908), 16: ('OXT', 'O2', -0.8065, 1.6612), 17: ('O', 'O2', -0.8065, 1.6612)})], 'HIP': [('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1[N+]<8>([H]<9>)=C<10>([H]<11>)N<12>([H]<13>)C<14>=1[H]<15>)C<16>=O<17>', {0: ('N', 'N', -0.3479, 1.824), 1: ('H', 'H', 0.2747, 0.6), 2: ('CA', 'CT', -0.1354, 1.908), 3: ('HA', 'H1', 0.1212, 1.387), 4: ('CB', 'CT', -0.0414, 1.908), 5: ('HB3', 'HC', 0.081, 1.487), 6: ('HB2', 'HC', 0.081, 1.487), 7: ('CG', 'CC', -0.0012, 1.908), 8: ('ND1', 'NA', -0.1513, 1.824), 9: ('HD1', 'H', 0.3866, 0.6), 10: ('CE1', 'CR', -0.017, 1.908), 11: ('HE1', 'H5', 0.2681, 1.359), 12: ('NE2', 'NA', -0.1718, 1.824), 13: ('HE2', 'H', 0.3911, 0.6), 14: ('CD2', 'CW', -0.1141, 1.908), 15: ('HD2', 'H4', 0.2317, 1.409), 16: ('C', 'C', 0.7341, 1.908), 17: ('O', 'O', -0.5894, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1[N+]<8>([H]<9>)=C<10>([H]<11>)N<12>([H]<13>)C<14>=1[H]<15>)[N@+]<16>([H]<17>)([H]<18>)[H]<19>', {0: ('C', 'C', 0.7214, 1.908), 1: ('O', 'O', -0.6013, 1.6612), 2: ('CA', 'CT', 0.0581, 1.908), 3: ('HA', 'HP', 0.1047, 1.1), 4: ('CB', 'CT', 0.0484, 1.908), 5: ('HB3', 'HC', 0.0531, 1.487), 6: ('HB2', 'HC', 0.0531, 1.487), 7: ('CG', 'CC', -0.0236, 1.908), 8: ('ND1', 'NA', -0.151, 1.824), 9: ('HD1', 'H', 0.3821, 0.6), 10: ('CE1', 'CR', -0.0011, 1.908), 11: ('HE1', 'H5', 0.2645, 1.359), 12: ('NE2', 'NA', -0.1739, 1.824), 13: ('HE2', 'H', 0.3921, 0.6), 14: ('CD2', 'CW', -0.1433, 1.908), 15: ('HD2', 'H4', 0.2495, 1.409), 16: ('N', 'N3', 0.256, 1.824), 17: ('H3', 'H', 0.1704, 0.6), 18: ('H2', 'H', 0.1704, 0.6), 19: ('H1', 'H', 0.1704, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1[N+]<8>([H]<9>)=C<10>([H]<11>)N<12>([H]<13>)C<14>=1[H]<15>)C<16>([O-]<17>)=O<18>', {0: ('N', 'N', -0.3481, 1.824), 1: ('H', 'H', 0.2764, 0.6), 2: ('CA', 'CT', -0.1445, 1.908), 3: ('HA', 'H1', 0.1115, 1.387), 4: ('CB', 'CT', -0.08, 1.908), 5: ('HB3', 'HC', 0.0868, 1.487), 6: ('HB2', 'HC', 0.0868, 1.487), 7: ('CG', 'CC', 0.0298, 1.908), 8: ('ND1', 'NA', -0.1501, 1.824), 9: ('HD1', 'H', 0.3883, 0.6), 10: ('CE1', 'CR', -0.0251, 1.908), 11: ('HE1', 'H5', 0.2694, 1.359), 12: ('NE2', 'NA', -0.1683, 1.824), 13: ('HE2', 'H', 0.3913, 0.6), 14: ('CD2', 'CW', -0.1256, 1.908), 15: ('HD2', 'H4', 0.2336, 1.409), 16: ('C', 'C', 0.8032, 1.908), 17: ('OXT', 'O2', -0.8177, 1.6612), 18: ('O', 'O2', -0.8177, 1.6612)})], 'HID': [('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1N<8>([H]<9>)C<10>([H]<11>)=N<12>C<13>=1[H]<14>)C<15>=O<16>', {0: ('N', 'N', -0.4157, 1.824), 1: ('H', 'H', 0.2719, 0.6), 2: ('CA', 'CT', 0.0188, 1.908), 3: ('HA', 'H1', 0.0881, 1.387), 4: ('CB', 'CT', -0.0462, 1.908), 5: ('HB3', 'HC', 0.0402, 1.487), 6: ('HB2', 'HC', 0.0402, 1.487), 7: ('CG', 'CC', -0.0266, 1.908), 8: ('ND1', 'NA', -0.3811, 1.824), 9: ('HD1', 'H', 0.3649, 0.6), 10: ('CE1', 'CR', 0.2057, 1.908), 11: ('HE1', 'H5', 0.1392, 1.359), 12: ('NE2', 'NB', -0.5727, 1.824), 13: ('CD2', 'CV', 0.1292, 1.908), 14: ('HD2', 'H4', 0.1147, 1.409), 15: ('C', 'C', 0.5973, 1.908), 16: ('O', 'O', -0.5679, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1N<8>([H]<9>)C<10>([H]<11>)=N<12>C<13>=1[H]<14>)[N@+]<15>([H]<16>)([H]<17>)[H]<18>', {0: ('C', 'C', 0.6123, 1.908), 1: ('O', 'O', -0.5713, 1.6612), 2: ('CA', 'CT', 0.0964, 1.908), 3: ('HA', 'HP', 0.0958, 1.1), 4: ('CB', 'CT', 0.0259, 1.908), 5: ('HB3', 'HC', 0.0209, 1.487), 6: ('HB2', 'HC', 0.0209, 1.487), 7: ('CG', 'CC', -0.0399, 1.908), 8: ('ND1', 'NA', -0.3819, 1.824), 9: ('HD1', 'H', 0.3632, 0.6), 10: ('CE1', 'CR', 0.2127, 1.908), 11: ('HE1', 'H5', 0.1385, 1.359), 12: ('NE2', 'NB', -0.5711, 1.824), 13: ('CD2', 'CV', 0.1046, 1.908), 14: ('HD2', 'H4', 0.1299, 1.409), 15: ('N', 'N3', 0.1542, 1.824), 16: ('H3', 'H', 0.1963, 0.6), 17: ('H2', 'H', 0.1963, 0.6), 18: ('H1', 'H', 0.1963, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1N<8>([H]<9>)C<10>([H]<11>)=N<12>C<13>=1[H]<14>)C<15>([O-]<16>)=O<17>', {0: ('N', 'N', -0.3821, 1.824), 1: ('H', 'H', 0.2681, 0.6), 2: ('CA', 'CT', -0.1739, 1.908), 3: ('HA', 'H1', 0.11, 1.387), 4: ('CB', 'CT', -0.1046, 1.908), 5: ('HB3', 'HC', 0.0565, 1.487), 6: ('HB2', 'HC', 0.0565, 1.487), 7: ('CG', 'CC', 0.0293, 1.908), 8: ('ND1', 'NA', -0.3892, 1.824), 9: ('HD1', 'H', 0.3755, 0.6), 10: ('CE1', 'CR', 0.1925, 1.908), 11: ('HE1', 'H5', 0.1418, 1.359), 12: ('NE2', 'NB', -0.5629, 1.824), 13: ('CD2', 'CV', 0.1001, 1.908), 14: ('HD2', 'H4', 0.1241, 1.409), 15: ('C', 'C', 0.7615, 1.908), 16: ('OXT', 'O2', -0.8016, 1.6612), 17: ('O', 'O2', -0.8016, 1.6612)})], 'ILE': [('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([C@]<6>([H]<7>)([H]<8>)[H]<9>)[C@@]<10>([H]<11>)([H]<12>)[C@]<13>([H]<14>)([H]<15>)[H]<16>)C<17>=O<18>', {0: ('N', 'N', -0.4157, 1.824), 1: ('H', 'H', 0.2719, 0.6), 2: ('CA', 'CT', -0.0597, 1.908), 3: ('HA', 'H1', 0.0869, 1.387), 4: ('CB', 'CT', 0.1303, 1.908), 5: ('HB', 'HC', 0.0187, 1.487), 6: ('CG2', 'CT', -0.3204, 1.908), 7: ('HG23', 'HC', 0.0882, 1.487), 8: ('HG22', 'HC', 0.0882, 1.487), 9: ('HG21', 'HC', 0.0882, 1.487), 10: ('CG1', 'CT', -0.043, 1.908), 11: ('HG13', 'HC', 0.0236, 1.487), 12: ('HG12', 'HC', 0.0236, 1.487), 13: ('CD1', 'CT', -0.066, 1.908), 14: ('HD13', 'HC', 0.0186, 1.487), 15: ('HD12', 'HC', 0.0186, 1.487), 16: ('HD11', 'HC', 0.0186, 1.487), 17: ('C', 'C', 0.5973, 1.908), 18: ('O', 'O', -0.5679, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([C@]<6>([H]<7>)([H]<8>)[H]<9>)[C@@]<10>([H]<11>)([H]<12>)[C@]<13>([H]<14>)([H]<15>)[H]<16>)[N@+]<17>([H]<18>)([H]<19>)[H]<20>', {0: ('C', 'C', 0.6123, 1.908), 1: ('O', 'O', -0.5713, 1.6612), 2: ('CA', 'CT', 0.0257, 1.908), 3: ('HA', 'HP', 0.1031, 1.1), 4: ('CB', 'CT', 0.1885, 1.908), 5: ('HB', 'HC', 0.0213, 1.487), 6: ('CG2', 'CT', -0.372, 1.908), 7: ('HG23', 'HC', 0.0947, 1.487), 8: ('HG22', 'HC', 0.0947, 1.487), 9: ('HG21', 'HC', 0.0947, 1.487), 10: ('CG1', 'CT', -0.0387, 1.908), 11: ('HG13', 'HC', 0.0201, 1.487), 12: ('HG12', 'HC', 0.0201, 1.487), 13: ('CD1', 'CT', -0.0908, 1.908), 14: ('HD13', 'HC', 0.0226, 1.487), 15: ('HD12', 'HC', 0.0226, 1.487), 16: ('HD11', 'HC', 0.0226, 1.487), 17: ('N', 'N3', 0.0311, 1.824), 18: ('H3', 'H', 0.2329, 0.6), 19: ('H2', 'H', 0.2329, 0.6), 20: ('H1', 'H', 0.2329, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([C@]<6>([H]<7>)([H]<8>)[H]<9>)[C@@]<10>([H]<11>)([H]<12>)[C@]<13>([H]<14>)([H]<15>)[H]<16>)C<17>([O-]<18>)=O<19>', {0: ('N', 'N', -0.3821, 1.824), 1: ('H', 'H', 0.2681, 0.6), 2: ('CA', 'CT', -0.31, 1.908), 3: ('HA', 'H1', 0.1375, 1.387), 4: ('CB', 'CT', 0.0363, 1.908), 5: ('HB', 'HC', 0.0766, 1.487), 6: ('CG2', 'CT', -0.3498, 1.908), 7: ('HG23', 'HC', 0.1021, 1.487), 8: ('HG22', 'HC', 0.1021, 1.487), 9: ('HG21', 'HC', 0.1021, 1.487), 10: ('CG1', 'CT', -0.0323, 1.908), 11: ('HG13', 'HC', 0.0321, 1.487), 12: ('HG12', 'HC', 0.0321, 1.487), 13: ('CD1', 'CT', -0.0699, 1.908), 14: ('HD13', 'HC', 0.0196, 1.487), 15: ('HD12', 'HC', 0.0196, 1.487), 16: ('HD11', 'HC', 0.0196, 1.487), 17: ('C', 'C', 0.8343, 1.908), 18: ('OXT', 'O2', -0.819, 1.6612), 19: ('O', 'O2', -0.819, 1.6612)})], 'LEU': [('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@]<7>([H]<8>)([C@]<9>([H]<10>)([H]<11>)[H]<12>)[C@]<13>([H]<14>)([H]<15>)[H]<16>)C<17>=O<18>', {0: ('N', 'N', -0.4157, 1.824), 1: ('H', 'H', 0.2719, 0.6), 2: ('CA', 'CT', -0.0518, 1.908), 3: ('HA', 'H1', 0.0922, 1.387), 4: ('CB', 'CT', -0.1102, 1.908), 5: ('HB3', 'HC', 0.0457, 1.487), 6: ('HB2', 'HC', 0.0457, 1.487), 7: ('CG', 'CT', 0.3531, 1.908), 8: ('HG', 'HC', -0.0361, 1.487), 9: ('CD2', 'CT', -0.4121, 1.908), 10: ('HD23', 'HC', 0.1, 1.487), 11: ('HD22', 'HC', 0.1, 1.487), 12: ('HD21', 'HC', 0.1, 1.487), 13: ('CD1', 'CT', -0.4121, 1.908), 14: ('HD13', 'HC', 0.1, 1.487), 15: ('HD12', 'HC', 0.1, 1.487), 16: ('HD11', 'HC', 0.1, 1.487), 17: ('C', 'C', 0.5973, 1.908), 18: ('O', 'O', -0.5679, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@]<7>([H]<8>)([C@]<9>([H]<10>)([H]<11>)[H]<12>)[C@]<13>([H]<14>)([H]<15>)[H]<16>)[N@+]<17>([H]<18>)([H]<19>)[H]<20>', {0: ('C', 'C', 0.6123, 1.908), 1: ('O', 'O', -0.5713, 1.6612), 2: ('CA', 'CT', 0.0104, 1.908), 3: ('HA', 'HP', 0.1053, 1.1), 4: ('CB', 'CT', -0.0244, 1.908), 5: ('HB3', 'HC', 0.0256, 1.487), 6: ('HB2', 'HC', 0.0256, 1.487), 7: ('CG', 'CT', 0.3421, 1.908), 8: ('HG', 'HC', -0.038, 1.487), 9: ('CD2', 'CT', -0.4104, 1.908), 10: ('HD23', 'HC', 0.098, 1.487), 11: ('HD22', 'HC', 0.098, 1.487), 12: ('HD21', 'HC', 0.098, 1.487), 13: ('CD1', 'CT', -0.4106, 1.908), 14: ('HD13', 'HC', 0.098, 1.487), 15: ('HD12', 'HC', 0.098, 1.487), 16: ('HD11', 'HC', 0.098, 1.487), 17: ('N', 'N3', 0.101, 1.824), 18: ('H3', 'H', 0.2148, 0.6), 19: ('H2', 'H', 0.2148, 0.6), 20: ('H1', 'H', 0.2148, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@]<7>([H]<8>)([C@]<9>([H]<10>)([H]<11>)[H]<12>)[C@]<13>([H]<14>)([H]<15>)[H]<16>)C<17>([O-]<18>)=O<19>', {0: ('N', 'N', -0.3821, 1.824), 1: ('H', 'H', 0.2681, 0.6), 2: ('CA', 'CT', -0.2847, 1.908), 3: ('HA', 'H1', 0.1346, 1.387), 4: ('CB', 'CT', -0.2469, 1.908), 5: ('HB3', 'HC', 0.0974, 1.487), 6: ('HB2', 'HC', 0.0974, 1.487), 7: ('CG', 'CT', 0.3706, 1.908), 8: ('HG', 'HC', -0.0374, 1.487), 9: ('CD2', 'CT', -0.4163, 1.908), 10: ('HD23', 'HC', 0.1038, 1.487), 11: ('HD22', 'HC', 0.1038, 1.487), 12: ('HD21', 'HC', 0.1038, 1.487), 13: ('CD1', 'CT', -0.4163, 1.908), 14: ('HD13', 'HC', 0.1038, 1.487), 15: ('HD12', 'HC', 0.1038, 1.487), 16: ('HD11', 'HC', 0.1038, 1.487), 17: ('C', 'C', 0.8326, 1.908), 18: ('OXT', 'O2', -0.8199, 1.6612), 19: ('O', 'O2', -0.8199, 1.6612)})], 'LYS': [('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)[C@@]<10>([H]<11>)([H]<12>)[C@@]<13>([H]<14>)([H]<15>)[N@+]<16>([H]<17>)([H]<18>)[H]<19>)C<20>=O<21>', {0: ('N', 'N', -0.3479, 1.824), 1: ('H', 'H', 0.2747, 0.6), 2: ('CA', 'CT', -0.24, 1.908), 3: ('HA', 'H1', 0.1426, 1.387), 4: ('CB', 'CT', -0.0094, 1.908), 5: ('HB3', 'HC', 0.0362, 1.487), 6: ('HB2', 'HC', 0.0362, 1.487), 7: ('CG', 'CT', 0.0187, 1.908), 8: ('HG3', 'HC', 0.0103, 1.487), 9: ('HG2', 'HC', 0.0103, 1.487), 10: ('CD', 'CT', -0.0479, 1.908), 11: ('HD3', 'HC', 0.0621, 1.487), 12: ('HD2', 'HC', 0.0621, 1.487), 13: ('CE', 'CT', -0.0143, 1.908), 14: ('HE3', 'HP', 0.1135, 1.1), 15: ('HE2', 'HP', 0.1135, 1.1), 16: ('NZ', 'N3', -0.3854, 1.824), 17: ('HZ2', 'H', 0.34, 0.6), 18: ('HZ1', 'H', 0.34, 0.6), 19: ('HZ3', 'H', 0.34, 0.6), 20: ('C', 'C', 0.7341, 1.908), 21: ('O', 'O', -0.5894, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)[C@@]<10>([H]<11>)([H]<12>)[C@@]<13>([H]<14>)([H]<15>)[N@+]<16>([H]<17>)([H]<18>)[H]<19>)[N@+]<20>([H]<21>)([H]<22>)[H]<23>', {0: ('C', 'C', 0.7214, 1.908), 1: ('O', 'O', -0.6013, 1.6612), 2: ('CA', 'CT', -0.0015, 1.908), 3: ('HA', 'HP', 0.118, 1.1), 4: ('CB', 'CT', 0.0212, 1.908), 5: ('HB3', 'HC', 0.0283, 1.487), 6: ('HB2', 'HC', 0.0283, 1.487), 7: ('CG', 'CT', -0.0048, 1.908), 8: ('HG3', 'HC', 0.0121, 1.487), 9: ('HG2', 'HC', 0.0121, 1.487), 10: ('CD', 'CT', -0.0608, 1.908), 11: ('HD3', 'HC', 0.0633, 1.487), 12: ('HD2', 'HC', 0.0633, 1.487), 13: ('CE', 'CT', -0.0181, 1.908), 14: ('HE3', 'HP', 0.1171, 1.1), 15: ('HE2', 'HP', 0.1171, 1.1), 16: ('NZ', 'N3', -0.3764, 1.824), 17: ('HZ2', 'H', 0.3382, 0.6), 18: ('HZ1', 'H', 0.3382, 0.6), 19: ('HZ3', 'H', 0.3382, 0.6), 20: ('N', 'N3', 0.0966, 1.824), 21: ('H3', 'H', 0.2165, 0.6), 22: ('H2', 'H', 0.2165, 0.6), 23: ('H1', 'H', 0.2165, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)[C@@]<10>([H]<11>)([H]<12>)[C@@]<13>([H]<14>)([H]<15>)[N@+]<16>([H]<17>)([H]<18>)[H]<19>)C<20>([O-]<21>)=O<22>', {0: ('N', 'N', -0.3481, 1.824), 1: ('H', 'H', 0.2764, 0.6), 2: ('CA', 'CT', -0.2903, 1.908), 3: ('HA', 'H1', 0.1438, 1.387), 4: ('CB', 'CT', -0.0538, 1.908), 5: ('HB3', 'HC', 0.0482, 1.487), 6: ('HB2', 'HC', 0.0482, 1.487), 7: ('CG', 'CT', 0.0227, 1.908), 8: ('HG3', 'HC', 0.0134, 1.487), 9: ('HG2', 'HC', 0.0134, 1.487), 10: ('CD', 'CT', -0.0392, 1.908), 11: ('HD3', 'HC', 0.0611, 1.487), 12: ('HD2', 'HC', 0.0611, 1.487), 13: ('CE', 'CT', -0.0176, 1.908), 14: ('HE3', 'HP', 0.1121, 1.1), 15: ('HE2', 'HP', 0.1121, 1.1), 16: ('NZ', 'N3', -0.3741, 1.824), 17: ('HZ2', 'H', 0.3374, 0.6), 18: ('HZ1', 'H', 0.3374, 0.6), 19: ('HZ3', 'H', 0.3374, 0.6), 20: ('C', 'C', 0.8488, 1.908), 21: ('OXT', 'O2', -0.8252, 1.6612), 22: ('O', 'O2', -0.8252, 1.6612)})], 'MET': [('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)S<10>[C@]<11>([H]<12>)([H]<13>)[H]<14>)C<15>=O<16>', {0: ('N', 'N', -0.4157, 1.824), 1: ('H', 'H', 0.2719, 0.6), 2: ('CA', 'CT', -0.0237, 1.908), 3: ('HA', 'H1', 0.088, 1.387), 4: ('CB', 'CT', 0.0342, 1.908), 5: ('HB3', 'HC', 0.0241, 1.487), 6: ('HB2', 'HC', 0.0241, 1.487), 7: ('CG', 'CT', 0.0018, 1.908), 8: ('HG3', 'H1', 0.044, 1.387), 9: ('HG2', 'H1', 0.044, 1.387), 10: ('SD', 'S', -0.2737, 2.0), 11: ('CE', 'CT', -0.0536, 1.908), 12: ('HE3', 'H1', 0.0684, 1.387), 13: ('HE2', 'H1', 0.0684, 1.387), 14: ('HE1', 'H1', 0.0684, 1.387), 15: ('C', 'C', 0.5973, 1.908), 16: ('O', 'O', -0.5679, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)S<10>[C@]<11>([H]<12>)([H]<13>)[H]<14>)[N@+]<15>([H]<16>)([H]<17>)[H]<18>', {0: ('C', 'C', 0.6123, 1.908), 1: ('O', 'O', -0.5713, 1.6612), 2: ('CA', 'CT', 0.0221, 1.908), 3: ('HA', 'HP', 0.1116, 1.1), 4: ('CB', 'CT', 0.0865, 1.908), 5: ('HB3', 'HC', 0.0125, 1.487), 6: ('HB2', 'HC', 0.0125, 1.487), 7: ('CG', 'CT', 0.0334, 1.908), 8: ('HG3', 'H1', 0.0292, 1.387), 9: ('HG2', 'H1', 0.0292, 1.387), 10: ('SD', 'S', -0.2774, 2.0), 11: ('CE', 'CT', -0.0341, 1.908), 12: ('HE3', 'H1', 0.0597, 1.387), 13: ('HE2', 'H1', 0.0597, 1.387), 14: ('HE1', 'H1', 0.0597, 1.387), 15: ('N', 'N3', 0.1592, 1.824), 16: ('H3', 'H', 0.1984, 0.6), 17: ('H2', 'H', 0.1984, 0.6), 18: ('H1', 'H', 0.1984, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)S<10>[C@]<11>([H]<12>)([H]<13>)[H]<14>)C<15>([O-]<16>)=O<17>', {0: ('N', 'N', -0.3821, 1.824), 1: ('H', 'H', 0.2681, 0.6), 2: ('CA', 'CT', -0.2597, 1.908), 3: ('HA', 'H1', 0.1277, 1.387), 4: ('CB', 'CT', -0.0236, 1.908), 5: ('HB3', 'HC', 0.048, 1.487), 6: ('HB2', 'HC', 0.048, 1.487), 7: ('CG', 'CT', 0.0492, 1.908), 8: ('HG3', 'H1', 0.0317, 1.387), 9: ('HG2', 'H1', 0.0317, 1.387), 10: ('SD', 'S', -0.2692, 2.0), 11: ('CE', 'CT', -0.0376, 1.908), 12: ('HE3', 'H1', 0.0625, 1.387), 13: ('HE2', 'H1', 0.0625, 1.387), 14: ('HE1', 'H1', 0.0625, 1.387), 15: ('C', 'C', 0.8013, 1.908), 16: ('OXT', 'O2', -0.8105, 1.6612), 17: ('O', 'O2', -0.8105, 1.6612)})], 'PHE': [('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1C<8>([H]<9>)=C<10>([H]<11>)C<12>([H]<13>)=C<14>([H]<15>)C<16>=1[H]<17>)C<18>=O<19>', {0: ('N', 'N', -0.4157, 1.824), 1: ('H', 'H', 0.2719, 0.6), 2: ('CA', 'CT', -0.0024, 1.908), 3: ('HA', 'H1', 0.0978, 1.387), 4: ('CB', 'CT', -0.0343, 1.908), 5: ('HB3', 'HC', 0.0295, 1.487), 6: ('HB2', 'HC', 0.0295, 1.487), 7: ('CG', 'CA', 0.0118, 1.908), 8: ('CD2', 'CA', -0.1256, 1.908), 9: ('HD2', 'HA', 0.133, 1.459), 10: ('CE2', 'CA', -0.1704, 1.908), 11: ('HE2', 'HA', 0.143, 1.459), 12: ('CZ', 'CA', -0.1072, 1.908), 13: ('HZ', 'HA', 0.1297, 1.459), 14: ('CE1', 'CA', -0.1704, 1.908), 15: ('HE1', 'HA', 0.143, 1.459), 16: ('CD1', 'CA', -0.1256, 1.908), 17: ('HD1', 'HA', 0.133, 1.459), 18: ('C', 'C', 0.5973, 1.908), 19: ('O', 'O', -0.5679, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1C<8>([H]<9>)=C<10>([H]<11>)C<12>([H]<13>)=C<14>([H]<15>)C<16>=1[H]<17>)[N@+]<18>([H]<19>)([H]<20>)[H]<21>', {0: ('C', 'C', 0.6123, 1.908), 1: ('O', 'O', -0.5713, 1.6612), 2: ('CA', 'CT', 0.0733, 1.908), 3: ('HA', 'HP', 0.1041, 1.1), 4: ('CB', 'CT', 0.033, 1.908), 5: ('HB3', 'HC', 0.0104, 1.487), 6: ('HB2', 'HC', 0.0104, 1.487), 7: ('CG', 'CA', 0.0031, 1.908), 8: ('CD2', 'CA', -0.1391, 1.908), 9: ('HD2', 'HA', 0.1374, 1.459), 10: ('CE2', 'CA', -0.1603, 1.908), 11: ('HE2', 'HA', 0.1433, 1.459), 12: ('CZ', 'CA', -0.1208, 1.908), 13: ('HZ', 'HA', 0.1329, 1.459), 14: ('CE1', 'CA', -0.1602, 1.908), 15: ('HE1', 'HA', 0.1433, 1.459), 16: ('CD1', 'CA', -0.1392, 1.908), 17: ('HD1', 'HA', 0.1374, 1.459), 18: ('N', 'N3', 0.1737, 1.824), 19: ('H3', 'H', 0.1921, 0.6), 20: ('H2', 'H', 0.1921, 0.6), 21: ('H1', 'H', 0.1921, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1C<8>([H]<9>)=C<10>([H]<11>)C<12>([H]<13>)=C<14>([H]<15>)C<16>=1[H]<17>)C<18>([O-]<19>)=O<20>', {0: ('N', 'N', -0.3821, 1.824), 1: ('H', 'H', 0.2681, 0.6), 2: ('CA', 'CT', -0.1825, 1.908), 3: ('HA', 'H1', 0.1098, 1.387), 4: ('CB', 'CT', -0.0959, 1.908), 5: ('HB3', 'HC', 0.0443, 1.487), 6: ('HB2', 'HC', 0.0443, 1.487), 7: ('CG', 'CA', 0.0552, 1.908), 8: ('CD2', 'CA', -0.13, 1.908), 9: ('HD2', 'HA', 0.1408, 1.459), 10: ('CE2', 'CA', -0.1847, 1.908), 11: ('HE2', 'HA', 0.1461, 1.459), 12: ('CZ', 'CA', -0.0944, 1.908), 13: ('HZ', 'HA', 0.128, 1.459), 14: ('CE1', 'CA', -0.1847, 1.908), 15: ('HE1', 'HA', 0.1461, 1.459), 16: ('CD1', 'CA', -0.13, 1.908), 17: ('HD1', 'HA', 0.1408, 1.459), 18: ('C', 'C', 0.766, 1.908), 19: ('OXT', 'O2', -0.8026, 1.6612), 20: ('O', 'O2', -0.8026, 1.6612)})], 'PRO': [('N<0>1[C@]<1>([H]<2>)([H]<3>)[C@]<4>([H]<5>)([H]<6>)[C@]<7>([H]<8>)([H]<9>)[C@@]<10>1([H]<11>)C<12>=O<13>', {0: ('N', 'N', -0.2548, 1.824), 1: ('CD', 'CT', 0.0192, 1.908), 2: ('HD3', 'H1', 0.0391, 1.387), 3: ('HD2', 'H1', 0.0391, 1.387), 4: ('CG', 'CT', 0.0189, 1.908), 5: ('HG3', 'HC', 0.0213, 1.487), 6: ('HG2', 'HC', 0.0213, 1.487), 7: ('CB', 'CT', -0.007, 1.908), 8: ('HB3', 'HC', 0.0253, 1.487), 9: ('HB2', 'HC', 0.0253, 1.487), 10: ('CA', 'CT', -0.0266, 1.908), 11: ('HA', 'H1', 0.0641, 1.387), 12: ('C', 'C', 0.5896, 1.908), 13: ('O', 'O', -0.5748, 1.6612)}), ('C<0>(=O<1>)[C@]<2>1([H]<3>)[C@@]<4>([H]<5>)([H]<6>)[C@@]<7>([H]<8>)([H]<9>)[C@@]<10>([H]<11>)([H]<12>)[N@@+]<13>1([H]<14>)[H]<15>', {0: ('C', 'C', 0.526, 1.908), 1: ('O', 'O', -0.5, 1.6612), 2: ('CA', 'CT', 0.1, 1.908), 3: ('HA', 'HP', 0.1, 1.1), 4: ('CB', 'CT', -0.115, 1.908), 5: ('HB3', 'HC', 0.1, 1.487), 6: ('HB2', 'HC', 0.1, 1.487), 7: ('CG', 'CT', -0.121, 1.908), 8: ('HG3', 'HC', 0.1, 1.487), 9: ('HG2', 'HC', 0.1, 1.487), 10: ('CD', 'CT', -0.012, 1.908), 11: ('HD3', 'H1', 0.1, 1.1), 12: ('HD2', 'H1', 0.1, 1.1), 13: ('N', 'N3', -0.202, 1.824), 14: ('H3', 'H', 0.312, 0.6), 15: ('H2', 'H', 0.312, 0.6)}), ('N<0>1[C@]<1>([H]<2>)([H]<3>)[C@]<4>([H]<5>)([H]<6>)[C@]<7>([H]<8>)([H]<9>)[C@@]<10>1([H]<11>)C<12>([O-]<13>)=O<14>', {0: ('N', 'N', -0.2802, 1.824), 1: ('CD', 'CT', 0.0434, 1.908), 2: ('HD3', 'H1', 0.0331, 1.387), 3: ('HD2', 'H1', 0.0331, 1.387), 4: ('CG', 'CT', 0.0466, 1.908), 5: ('HG3', 'HC', 0.0172, 1.487), 6: ('HG2', 'HC', 0.0172, 1.487), 7: ('CB', 'CT', -0.0543, 1.908), 8: ('HB3', 'HC', 0.0381, 1.487), 9: ('HB2', 'HC', 0.0381, 1.487), 10: ('CA', 'CT', -0.1336, 1.908), 11: ('HA', 'H1', 0.0776, 1.387), 12: ('C', 'C', 0.6631, 1.908), 13: ('OXT', 'O2', -0.7697, 1.6612), 14: ('O', 'O2', -0.7697, 1.6612)})], 'SER': [('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)O<7>[H]<8>)C<9>=O<10>', {0: ('N', 'N', -0.4157, 1.824), 1: ('H', 'H', 0.2719, 0.6), 2: ('CA', 'CT', -0.0249, 1.908), 3: ('HA', 'H1', 0.0843, 1.387), 4: ('CB', 'CT', 0.2117, 1.908), 5: ('HB3', 'H1', 0.0352, 1.387), 6: ('HB2', 'H1', 0.0352, 1.387), 7: ('OG', 'OH', -0.6546, 1.721), 8: ('HG', 'HO', 0.4275, 0.0), 9: ('C', 'C', 0.5973, 1.908), 10: ('O', 'O', -0.5679, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)O<7>[H]<8>)[N@+]<9>([H]<10>)([H]<11>)[H]<12>', {0: ('C', 'C', 0.6163, 1.908), 1: ('O', 'O', -0.5722, 1.6612), 2: ('CA', 'CT', 0.0567, 1.908), 3: ('HA', 'HP', 0.0782, 1.1), 4: ('CB', 'CT', 0.2596, 1.908), 5: ('HB3', 'H1', 0.0273, 1.387), 6: ('HB2', 'H1', 0.0273, 1.387), 7: ('OG', 'OH', -0.6714, 1.721), 8: ('HG', 'HO', 0.4239, 0.0), 9: ('N', 'N3', 0.1849, 1.824), 10: ('H3', 'H', 0.1898, 0.6), 11: ('H2', 'H', 0.1898, 0.6), 12: ('H1', 'H', 0.1898, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)O<7>[H]<8>)C<9>([O-]<10>)=O<11>', {0: ('N', 'N', -0.3821, 1.824), 1: ('H', 'H', 0.2681, 0.6), 2: ('CA', 'CT', -0.2722, 1.908), 3: ('HA', 'H1', 0.1304, 1.387), 4: ('CB', 'CT', 0.1123, 1.908), 5: ('HB3', 'H1', 0.0813, 1.387), 6: ('HB2', 'H1', 0.0813, 1.387), 7: ('OG', 'OH', -0.6514, 1.721), 8: ('HG', 'HO', 0.4474, 0.0), 9: ('C', 'C', 0.8113, 1.908), 10: ('OXT', 'O2', -0.8132, 1.6612), 11: ('O', 'O2', -0.8132, 1.6612)})], 'THR': [('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@]<4>([H]<5>)(O<6>[H]<7>)[C@]<8>([H]<9>)([H]<10>)[H]<11>)C<12>=O<13>', {0: ('N', 'N', -0.4157, 1.824), 1: ('H', 'H', 0.2719, 0.6), 2: ('CA', 'CT', -0.0389, 1.908), 3: ('HA', 'H1', 0.1007, 1.387), 4: ('CB', 'CT', 0.3654, 1.908), 5: ('HB', 'H1', 0.0043, 1.387), 6: ('OG1', 'OH', -0.6761, 1.721), 7: ('HG1', 'HO', 0.4102, 0.0), 8: ('CG2', 'CT', -0.2438, 1.908), 9: ('HG23', 'HC', 0.0642, 1.487), 10: ('HG22', 'HC', 0.0642, 1.487), 11: ('HG21', 'HC', 0.0642, 1.487), 12: ('C', 'C', 0.5973, 1.908), 13: ('O', 'O', -0.5679, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([C@]<4>([H]<5>)(O<6>[H]<7>)[C@]<8>([H]<9>)([H]<10>)[H]<11>)[N@+]<12>([H]<13>)([H]<14>)[H]<15>', {0: ('C', 'C', 0.6163, 1.908), 1: ('O', 'O', -0.5722, 1.6612), 2: ('CA', 'CT', 0.0034, 1.908), 3: ('HA', 'HP', 0.1087, 1.1), 4: ('CB', 'CT', 0.4514, 1.908), 5: ('HB', 'H1', -0.0323, 1.387), 6: ('OG1', 'OH', -0.6764, 1.721), 7: ('HG1', 'HO', 0.407, 0.0), 8: ('CG2', 'CT', -0.2554, 1.908), 9: ('HG23', 'HC', 0.0627, 1.487), 10: ('HG22', 'HC', 0.0627, 1.487), 11: ('HG21', 'HC', 0.0627, 1.487), 12: ('N', 'N3', 0.1812, 1.824), 13: ('H3', 'H', 0.1934, 0.6), 14: ('H2', 'H', 0.1934, 0.6), 15: ('H1', 'H', 0.1934, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@]<4>([H]<5>)(O<6>[H]<7>)[C@]<8>([H]<9>)([H]<10>)[H]<11>)C<12>([O-]<13>)=O<14>', {0: ('N', 'N', -0.3821, 1.824), 1: ('H', 'H', 0.2681, 0.6), 2: ('CA', 'CT', -0.242, 1.908), 3: ('HA', 'H1', 0.1207, 1.387), 4: ('CB', 'CT', 0.3025, 1.908), 5: ('HB', 'H1', 0.0078, 1.387), 6: ('OG1', 'OH', -0.6496, 1.721), 7: ('HG1', 'HO', 0.4119, 0.0), 8: ('CG2', 'CT', -0.1853, 1.908), 9: ('HG23', 'HC', 0.0586, 1.487), 10: ('HG22', 'HC', 0.0586, 1.487), 11: ('HG21', 'HC', 0.0586, 1.487), 12: ('C', 'C', 0.781, 1.908), 13: ('OXT', 'O2', -0.8044, 1.6612), 14: ('O', 'O2', -0.8044, 1.6612)})], 'TRP': [('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>1=C<8>([H]<9>)N<10>([H]<11>)C<12>=2C<13>([H]<14>)=C<15>([H]<16>)C<17>([H]<18>)=C<19>([H]<20>)C<21>1=2)C<22>=O<23>', {0: ('N', 'N', -0.4157, 1.824), 1: ('H', 'H', 0.2719, 0.6), 2: ('CA', 'CT', -0.0275, 1.908), 3: ('HA', 'H1', 0.1123, 1.387), 4: ('CB', 'CT', -0.005, 1.908), 5: ('HB3', 'HC', 0.0339, 1.487), 6: ('HB2', 'HC', 0.0339, 1.487), 7: ('CG', 'C*', -0.1415, 1.908), 8: ('CD1', 'CW', -0.1638, 1.908), 9: ('HD1', 'H4', 0.2062, 1.409), 10: ('NE1', 'NA', -0.3418, 1.824), 11: ('HE1', 'H', 0.3412, 0.6), 12: ('CE2', 'CN', 0.138, 1.908), 13: ('CZ2', 'CA', -0.2601, 1.908), 14: ('HZ2', 'HA', 0.1572, 1.459), 15: ('CH2', 'CA', -0.1134, 1.908), 16: ('HH2', 'HA', 0.1417, 1.459), 17: ('CZ3', 'CA', -0.1972, 1.908), 18: ('HZ3', 'HA', 0.1447, 1.459), 19: ('CE3', 'CA', -0.2387, 1.908), 20: ('HE3', 'HA', 0.17, 1.459), 21: ('CD2', 'CB', 0.1243, 1.908), 22: ('C', 'C', 0.5973, 1.908), 23: ('O', 'O', -0.5679, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>1=C<8>([H]<9>)N<10>([H]<11>)C<12>=2C<13>([H]<14>)=C<15>([H]<16>)C<17>([H]<18>)=C<19>([H]<20>)C<21>1=2)[N@+]<22>([H]<23>)([H]<24>)[H]<25>', {0: ('C', 'C', 0.6123, 1.908), 1: ('O', 'O', -0.5713, 1.6612), 2: ('CA', 'CT', 0.0421, 1.908), 3: ('HA', 'HP', 0.1162, 1.1), 4: ('CB', 'CT', 0.0543, 1.908), 5: ('HB3', 'HC', 0.0222, 1.487), 6: ('HB2', 'HC', 0.0222, 1.487), 7: ('CG', 'C*', -0.1654, 1.908), 8: ('CD1', 'CW', -0.1788, 1.908), 9: ('HD1', 'H4', 0.2195, 1.409), 10: ('NE1', 'NA', -0.3444, 1.824), 11: ('HE1', 'H', 0.3412, 0.6), 12: ('CE2', 'CN', 0.1575, 1.908), 13: ('CZ2', 'CA', -0.271, 1.908), 14: ('HZ2', 'HA', 0.1589, 1.459), 15: ('CH2', 'CA', -0.108, 1.908), 16: ('HH2', 'HA', 0.1411, 1.459), 17: ('CZ3', 'CA', -0.2034, 1.908), 18: ('HZ3', 'HA', 0.1458, 1.459), 19: ('CE3', 'CA', -0.2265, 1.908), 20: ('HE3', 'HA', 0.1646, 1.459), 21: ('CD2', 'CB', 0.1132, 1.908), 22: ('N', 'N3', 0.1913, 1.824), 23: ('H3', 'H', 0.1888, 0.6), 24: ('H2', 'H', 0.1888, 0.6), 25: ('H1', 'H', 0.1888, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>1=C<8>([H]<9>)N<10>([H]<11>)C<12>=2C<13>([H]<14>)=C<15>([H]<16>)C<17>([H]<18>)=C<19>([H]<20>)C<21>1=2)C<22>([O-]<23>)=O<24>', {0: ('N', 'N', -0.3821, 1.824), 1: ('H', 'H', 0.2681, 0.6), 2: ('CA', 'CT', -0.2084, 1.908), 3: ('HA', 'H1', 0.1272, 1.387), 4: ('CB', 'CT', -0.0742, 1.908), 5: ('HB3', 'HC', 0.0497, 1.487), 6: ('HB2', 'HC', 0.0497, 1.487), 7: ('CG', 'C*', -0.0796, 1.908), 8: ('CD1', 'CW', -0.1808, 1.908), 9: ('HD1', 'H4', 0.2043, 1.409), 10: ('NE1', 'NA', -0.3316, 1.824), 11: ('HE1', 'H', 0.3413, 0.6), 12: ('CE2', 'CN', 0.1222, 1.908), 13: ('CZ2', 'CA', -0.2594, 1.908), 14: ('HZ2', 'HA', 0.1567, 1.459), 15: ('CH2', 'CA', -0.102, 1.908), 16: ('HH2', 'HA', 0.1401, 1.459), 17: ('CZ3', 'CA', -0.2287, 1.908), 18: ('HZ3', 'HA', 0.1507, 1.459), 19: ('CE3', 'CA', -0.1837, 1.908), 20: ('HE3', 'HA', 0.1491, 1.459), 21: ('CD2', 'CB', 0.1078, 1.908), 22: ('C', 'C', 0.7658, 1.908), 23: ('OXT', 'O2', -0.8011, 1.6612), 24: ('O', 'O2', -0.8011, 1.6612)})], 'TYR': [('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1C<8>([H]<9>)=C<10>([H]<11>)C<12>(O<13>[H]<14>)=C<15>([H]<16>)C<17>=1[H]<18>)C<19>=O<20>', {0: ('N', 'N', -0.4157, 1.824), 1: ('H', 'H', 0.2719, 0.6), 2: ('CA', 'CT', -0.0014, 1.908), 3: ('HA', 'H1', 0.0876, 1.387), 4: ('CB', 'CT', -0.0152, 1.908), 5: ('HB3', 'HC', 0.0295, 1.487), 6: ('HB2', 'HC', 0.0295, 1.487), 7: ('CG', 'CA', -0.0011, 1.908), 8: ('CD2', 'CA', -0.1906, 1.908), 9: ('HD2', 'HA', 0.1699, 1.459), 10: ('CE2', 'CA', -0.2341, 1.908), 11: ('HE2', 'HA', 0.1656, 1.459), 12: ('CZ', 'CA', 0.3226, 1.908), 13: ('OH', 'OH', -0.5579, 1.721), 14: ('HH', 'HO', 0.3992, 0.0), 15: ('CE1', 'CA', -0.2341, 1.908), 16: ('HE1', 'HA', 0.1656, 1.459), 17: ('CD1', 'CA', -0.1906, 1.908), 18: ('HD1', 'HA', 0.1699, 1.459), 19: ('C', 'C', 0.5973, 1.908), 20: ('O', 'O', -0.5679, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1C<8>([H]<9>)=C<10>([H]<11>)C<12>(O<13>[H]<14>)=C<15>([H]<16>)C<17>=1[H]<18>)[N@+]<19>([H]<20>)([H]<21>)[H]<22>', {0: ('C', 'C', 0.6123, 1.908), 1: ('O', 'O', -0.5713, 1.6612), 2: ('CA', 'CT', 0.057, 1.908), 3: ('HA', 'H1', 0.0983, 1.1), 4: ('CB', 'CT', 0.0659, 1.908), 5: ('HB3', 'HC', 0.0102, 1.487), 6: ('HB2', 'HC', 0.0102, 1.487), 7: ('CG', 'CA', -0.0205, 1.908), 8: ('CD2', 'CA', -0.2002, 1.908), 9: ('HD2', 'HA', 0.172, 1.459), 10: ('CE2', 'CA', -0.2239, 1.908), 11: ('HE2', 'HA', 0.165, 1.459), 12: ('CZ', 'CA', 0.3139, 1.908), 13: ('OH', 'OH', -0.5578, 1.721), 14: ('HH', 'HO', 0.4001, 0.0), 15: ('CE1', 'CA', -0.2239, 1.908), 16: ('HE1', 'HA', 0.165, 1.459), 17: ('CD1', 'CA', -0.2002, 1.908), 18: ('HD1', 'HA', 0.172, 1.459), 19: ('N', 'N', 0.194, 1.824), 20: ('H3', 'H', 0.1873, 0.6), 21: ('H2', 'H', 0.1873, 0.6), 22: ('H1', 'H', 0.1873, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@@]<4>([H]<5>)([H]<6>)C<7>=1C<8>([H]<9>)=C<10>([H]<11>)C<12>(O<13>[H]<14>)=C<15>([H]<16>)C<17>=1[H]<18>)C<19>([O-]<20>)=O<21>', {0: ('N', 'N', -0.3821, 1.824), 1: ('H', 'H', 0.2681, 0.6), 2: ('CA', 'CT', -0.2015, 1.908), 3: ('HA', 'H1', 0.1092, 1.387), 4: ('CB', 'CT', -0.0752, 1.908), 5: ('HB3', 'HC', 0.049, 1.487), 6: ('HB2', 'HC', 0.049, 1.487), 7: ('CG', 'CA', 0.0243, 1.908), 8: ('CD2', 'CA', -0.1922, 1.908), 9: ('HD2', 'HA', 0.178, 1.459), 10: ('CE2', 'CA', -0.2458, 1.908), 11: ('HE2', 'HA', 0.1673, 1.459), 12: ('CZ', 'CA', 0.3395, 1.908), 13: ('OH', 'OH', -0.5643, 1.721), 14: ('HH', 'HO', 0.4017, 0.0), 15: ('CE1', 'CA', -0.2458, 1.908), 16: ('HE1', 'HA', 0.1673, 1.459), 17: ('CD1', 'CA', -0.1922, 1.908), 18: ('HD1', 'HA', 0.178, 1.459), 19: ('C', 'C', 0.7817, 1.908), 20: ('OXT', 'O2', -0.807, 1.6612), 21: ('O', 'O', -0.807, 1.6612)})], 'VAL': [('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@]<4>([H]<5>)([C@]<6>([H]<7>)([H]<8>)[H]<9>)[C@]<10>([H]<11>)([H]<12>)[H]<13>)C<14>=O<15>', {0: ('N', 'N', -0.4157, 1.824), 1: ('H', 'H', 0.2719, 0.6), 2: ('CA', 'CT', -0.0875, 1.908), 3: ('HA', 'H1', 0.0969, 1.387), 4: ('CB', 'CT', 0.2985, 1.908), 5: ('HB', 'HC', -0.0297, 1.487), 6: ('CG2', 'CT', -0.3192, 1.908), 7: ('HG23', 'HC', 0.0791, 1.487), 8: ('HG22', 'HC', 0.0791, 1.487), 9: ('HG21', 'HC', 0.0791, 1.487), 10: ('CG1', 'CT', -0.3192, 1.908), 11: ('HG13', 'HC', 0.0791, 1.487), 12: ('HG12', 'HC', 0.0791, 1.487), 13: ('HG11', 'HC', 0.0791, 1.487), 14: ('C', 'C', 0.5973, 1.908), 15: ('O', 'O', -0.5679, 1.6612)}), ('C<0>(=O<1>)[C@]<2>([H]<3>)([C@]<4>([H]<5>)([C@]<6>([H]<7>)([H]<8>)[H]<9>)[C@]<10>([H]<11>)([H]<12>)[H]<13>)[N@+]<14>([H]<15>)([H]<16>)[H]<17>', {0: ('C', 'C', 0.6163, 1.908), 1: ('O', 'O', -0.5722, 1.6612), 2: ('CA', 'CT', -0.0054, 1.908), 3: ('HA', 'HP', 0.1093, 1.1), 4: ('CB', 'CT', 0.3196, 1.908), 5: ('HB', 'HC', -0.0221, 1.487), 6: ('CG2', 'CT', -0.3129, 1.908), 7: ('HG23', 'HC', 0.0735, 1.487), 8: ('HG22', 'HC', 0.0735, 1.487), 9: ('HG21', 'HC', 0.0735, 1.487), 10: ('CG1', 'CT', -0.3129, 1.908), 11: ('HG13', 'HC', 0.0735, 1.487), 12: ('HG12', 'HC', 0.0735, 1.487), 13: ('HG11', 'HC', 0.0735, 1.487), 14: ('N', 'N3', 0.0577, 1.824), 15: ('H3', 'H', 0.2272, 0.6), 16: ('H2', 'H', 0.2272, 0.6), 17: ('H1', 'H', 0.2272, 0.6)}), ('N<0>([H]<1>)[C@@]<2>([H]<3>)([C@]<4>([H]<5>)([C@]<6>([H]<7>)([H]<8>)[H]<9>)[C@]<10>([H]<11>)([H]<12>)[H]<13>)C<14>([O-]<15>)=O<16>', {0: ('N', 'N', -0.3821, 1.824), 1: ('H', 'H', 0.2681, 0.6), 2: ('CA', 'CT', -0.3438, 1.908), 3: ('HA', 'H1', 0.1438, 1.387), 4: ('CB', 'CT', 0.194, 1.908), 5: ('HB', 'HC', 0.0308, 1.487), 6: ('CG2', 'CT', -0.3064, 1.908), 7: ('HG23', 'HC', 0.0836, 1.487), 8: ('HG22', 'HC', 0.0836, 1.487), 9: ('HG21', 'HC', 0.0836, 1.487), 10: ('CG1', 'CT', -0.3064, 1.908), 11: ('HG13', 'HC', 0.0836, 1.487), 12: ('HG12', 'HC', 0.0836, 1.487), 13: ('HG11', 'HC', 0.0836, 1.487), 14: ('C', 'C', 0.835, 1.908), 15: ('OXT', 'O2', -0.8173, 1.6612), 16: ('O', 'O2', -0.8173, 1.6612)})], 'WAT': [('O<0>([H]<1>)[H]<2>', {0: ('O', 'OW', -0.834, 1.6612), 1: ('H1', 'HW', 0.417, 0.0), 2: ('H2', 'HW', 0.417, 0.0)})], 'HOH': [('O<0>([H]<1>)[H]<2>', {0: ('O', 'OW', -0.834, 1.6612), 1: ('H1', 'HW', 0.417, 0.0), 2: ('H2', 'HW', 0.417, 0.0)})], 'TIP': [('O<0>([H]<1>)[H]<2>', {0: ('O', 'OW', -0.834, 1.6612), 1: ('H1', 'HW', 0.417, 0.0), 2: ('H2', 'HW', 0.417, 0.0)})]} for alias in (('HIE', 'HIS'), ('HISE', 'HIS'), ('HISD', 'HID'), ('HISP', 'HIP'), ('GLUM', 'GLU'), ('ASPM', 'ASP'), ('LYSP', 'LYS'), ('ARGP', 'ARG')): amber99_dict[alias[0]] = amber99_dict[alias[1]]
s=[] for x in range(6): s.append(input()) a=[] sizes=[] for x in s: a.append(x.split()) row=[] sum1=[] w=[] for k in range(4): for z in range(4): e=[] for x in range(3): e.append(a[x+k][z]) e.append(a[x+k][z+1]) e.append(a[x+k][z+2]) w.append(e) sums=[] for x in range(16): c=0 for y in range(9): if y!=3 and y!=5: c+=int(w[x][y]) sums.append(c) max1=-63 for x in sums: if x>max1: max1=x print(max1)
s = [] for x in range(6): s.append(input()) a = [] sizes = [] for x in s: a.append(x.split()) row = [] sum1 = [] w = [] for k in range(4): for z in range(4): e = [] for x in range(3): e.append(a[x + k][z]) e.append(a[x + k][z + 1]) e.append(a[x + k][z + 2]) w.append(e) sums = [] for x in range(16): c = 0 for y in range(9): if y != 3 and y != 5: c += int(w[x][y]) sums.append(c) max1 = -63 for x in sums: if x > max1: max1 = x print(max1)
def g(x): return x**2 def gp(x): return 2*x def gpp(x): return 2 def h(x): return 0.5*(x[0]**2 + x[1]**2) def H(X,Y): return 0.5*(X**2 + Y**2)
def g(x): return x ** 2 def gp(x): return 2 * x def gpp(x): return 2 def h(x): return 0.5 * (x[0] ** 2 + x[1] ** 2) def h(X, Y): return 0.5 * (X ** 2 + Y ** 2)
class Solution: def reverseParentheses(self, s: str) -> str: stack = [''] for c in s: if c == '(': stack.append('') elif c == ')': add = stack.pop()[::-1] stack[-1] += add else: stack[-1] += c return stack.pop()
class Solution: def reverse_parentheses(self, s: str) -> str: stack = [''] for c in s: if c == '(': stack.append('') elif c == ')': add = stack.pop()[::-1] stack[-1] += add else: stack[-1] += c return stack.pop()
def print_numeric_list(number_list): print('------------------ START LIST ------------------') for number in number_list: print('{} -> {}'.format(number_list.index(number), number)) print('------------------ END LIST ------------------') numberList = [1] print_numeric_list(numberList) numberList.append(34) print_numeric_list(numberList)
def print_numeric_list(number_list): print('------------------ START LIST ------------------') for number in number_list: print('{} -> {}'.format(number_list.index(number), number)) print('------------------ END LIST ------------------') number_list = [1] print_numeric_list(numberList) numberList.append(34) print_numeric_list(numberList)
class Solution: def multiply(self, num1: str, num2: str) -> str: s = [0] * (len(num1) + len(num2)) for i in reversed(range(len(num1))): for j in reversed(range(len(num2))): mult = int(num1[i]) * int(num2[j]) summ = mult + s[i + j + 1] s[i + j] += summ // 10 s[i + j + 1] = summ % 10 for i, c in enumerate(s): if c != 0: break return ''.join(map(str, s[i:]))
class Solution: def multiply(self, num1: str, num2: str) -> str: s = [0] * (len(num1) + len(num2)) for i in reversed(range(len(num1))): for j in reversed(range(len(num2))): mult = int(num1[i]) * int(num2[j]) summ = mult + s[i + j + 1] s[i + j] += summ // 10 s[i + j + 1] = summ % 10 for (i, c) in enumerate(s): if c != 0: break return ''.join(map(str, s[i:]))
ANSI_TKL = [ {'Key': 'Key.esc', 'Pos': [0, 0], 'Size': [1, 1], }, {'Key': "SPACER", 'Pos': [0, 1], 'Size': [1, 1], }, # Spacer {'Key': 'Key.f1', 'Pos': [0, 2], 'Size': [1, 1], }, {'Key': 'Key.f2', 'Pos': [0, 3], 'Size': [1, 1], }, {'Key': 'Key.f3', 'Pos': [0, 4], 'Size': [1, 1], }, {'Key': 'Key.f4', 'Pos': [0, 5], 'Size': [1, 1], }, {'Key': "SPACER", 'Pos': [0, 6], 'Size': [1, 0.5], }, # Spacer {'Key': 'Key.f5', 'Pos': [0, 6.5], 'Size': [1, 1], }, {'Key': 'Key.f6', 'Pos': [0, 7.5], 'Size': [1, 1], }, {'Key': 'Key.f7', 'Pos': [0, 8.5], 'Size': [1, 1], }, {'Key': 'Key.f8', 'Pos': [0, 9.5], 'Size': [1, 1], }, {'Key': "SPACER", 'Pos': [0, 10.5], 'Size': [1, 0.5], }, # Spacer {'Key': 'Key.f9', 'Pos': [0, 11], 'Size': [1, 1], }, {'Key': 'Key.f10', 'Pos': [0, 12], 'Size': [1, 1], }, {'Key': 'Key.f11', 'Pos': [0, 13], 'Size': [1, 1], }, {'Key': 'Key.f12', 'Pos': [0, 14], 'Size': [1, 1], }, {'Key': "SPACER", 'Pos': [0, 15], 'Size': [1, 0.25], }, # Spacer {'Key': 'Key.print_screen', 'Pos': [0, 15.25], 'Size': [1, 1], }, {'Key': 'Key.scroll_lock', 'Pos': [0, 16.25], 'Size': [1, 1], }, {'Key': 'Key.pause', 'Pos': [0, 17.25], 'Size': [1, 1], }, {'Key': "SPACER", 'Pos': [1, 0], 'Size': [0.5, 18.25]}, {'Key': '`', 'Pos': [2, 0], 'Shift': '~', 'Size': [1, 1], }, {'Key': '1', 'Pos': [2, 1], 'Shift': '!', 'Size': [1, 1], }, {'Key': '2', 'Pos': [2, 2], 'Shift': '@', 'Size': [1, 1], }, {'Key': '3', 'Pos': [2, 3], 'Shift': '#', 'Size': [1, 1], }, {'Key': '4', 'Pos': [2, 4], 'Shift': '$', 'Size': [1, 1], }, {'Key': '5', 'Pos': [2, 5], 'Shift': '%', 'Size': [1, 1], }, {'Key': '6', 'Pos': [2, 6], 'Shift': '^', 'Size': [1, 1], }, {'Key': '7', 'Pos': [2, 7], 'Shift': '&', 'Size': [1, 1], }, {'Key': '8', 'Pos': [2, 8], 'Shift': '*', 'Size': [1, 1], }, {'Key': '9', 'Pos': [2, 9], 'Shift': '(', 'Size': [1, 1], }, {'Key': '0', 'Pos': [2, 10], 'Shift': ')', 'Size': [1, 1], }, {'Key': '-', 'Pos': [2, 11], 'Shift': '_', 'Size': [1, 1], }, {'Key': '=', 'Pos': [2, 12], 'Shift': '+', 'Size': [1, 1], }, {'Key': 'Key.backspace', 'Pos': [2, 13], 'Size': [1, 2], }, {'Key': "SPACER", 'Pos': [2, 15], 'Size': [1, 0.25], }, # Spacer {'Key': 'Key.insert', 'Pos': [2, 15.25], 'Size': [1, 1], }, {'Key': 'Key.home', 'Pos': [2, 16.25], 'Size': [1, 1], }, {'Key': 'Key.page_up', 'Pos': [2, 17.25], 'Size': [1, 1], }, {'Key': 'Key.tab', 'Pos': [3, 0], 'Size': [1, 1.5], }, {'Key': 'q', 'Pos': [3, 1.5], 'Shift': 'Q', 'Size': [1, 1], }, {'Key': 'w', 'Pos': [3, 2.5], 'Shift': 'W', 'Size': [1, 1], }, {'Key': 'e', 'Pos': [3, 3.5], 'Shift': 'E', 'Size': [1, 1], }, {'Key': 'r', 'Pos': [3, 4.5], 'Shift': 'R', 'Size': [1, 1], }, {'Key': 't', 'Pos': [3, 5.5], 'Shift': 'T', 'Size': [1, 1], }, {'Key': 'y', 'Pos': [3, 6.5], 'Shift': 'Y', 'Size': [1, 1], }, {'Key': 'u', 'Pos': [3, 7.5], 'Shift': 'U', 'Size': [1, 1], }, {'Key': 'i', 'Pos': [3, 8.5], 'Shift': 'I', 'Size': [1, 1], }, {'Key': 'o', 'Pos': [3, 9.5], 'Shift': 'O', 'Size': [1, 1], }, {'Key': 'p', 'Pos': [3, 10.5], 'Shift': 'P', 'Size': [1, 1], }, {'Key': '[', 'Pos': [3, 11.5], 'Shift': '{', 'Size': [1, 1], }, {'Key': ']', 'Pos': [3, 12.5], 'Shift': '}', 'Size': [1, 1], }, {'Key': '\\', 'Pos': [3, 13.5], 'Shift': '|', 'Size': [1, 1.5], }, {'Key': "SPACER", 'Pos': [3, 15], 'Size': [1, 0.25], }, # Spacer {'Key': 'Key.delete', 'Pos': [3, 15.25], 'Size': [1, 1], }, {'Key': 'Key.end', 'Pos': [3, 16.25], 'Size': [1, 1], }, {'Key': 'Key.page_down', 'Pos': [3, 17.25], 'Size': [1, 1], }, {'Key': 'Key.caps_lock', 'Pos': [4, 0], 'Size': [1, 1.75], }, {'Key': 'a', 'Pos': [4, 1.75], 'Shift': 'A', 'Size': [1, 1], }, {'Key': 's', 'Pos': [4, 2.75], 'Shift': 'S', 'Size': [1, 1], }, {'Key': 'd', 'Pos': [4, 3.75], 'Shift': 'D', 'Size': [1, 1], }, {'Key': 'f', 'Pos': [4, 4.75], 'Shift': 'F', 'Size': [1, 1], }, {'Key': 'g', 'Pos': [4, 5.75], 'Shift': 'G', 'Size': [1, 1], }, {'Key': 'h', 'Pos': [4, 6.75], 'Shift': 'H', 'Size': [1, 1], }, {'Key': 'j', 'Pos': [4, 7.75], 'Shift': 'J', 'Size': [1, 1], }, {'Key': 'k', 'Pos': [4, 8.75], 'Shift': 'K', 'Size': [1, 1], }, {'Key': 'l', 'Pos': [4, 9.75], 'Shift': 'L', 'Size': [1, 1], }, {'Key': ';', 'Pos': [4, 10.75], 'Shift': ':', 'Size': [1, 1], }, {'Key': "'", 'Pos': [4, 11.75], 'Shift': '"', 'Size': [1, 1], }, {'Key': 'Key.enter', 'Pos': [4, 12.75], 'Size': [1, 2.25], }, {'Key': 'Key.shift', 'Pos': [5, 0], 'Size': [1, 2.25], }, {'Key': 'z', 'Pos': [5, 2.25], 'Shift': 'Z', 'Size': [1, 1], }, {'Key': 'x', 'Pos': [5, 3.25], 'Shift': 'X', 'Size': [1, 1], }, {'Key': 'c', 'Pos': [5, 4.25], 'Shift': 'C', 'Size': [1, 1], }, {'Key': 'v', 'Pos': [5, 5.25], 'Shift': 'V', 'Size': [1, 1], }, {'Key': 'b', 'Pos': [5, 6.25], 'Shift': 'B', 'Size': [1, 1], }, {'Key': 'n', 'Pos': [5, 7.25], 'Shift': 'N', 'Size': [1, 1], }, {'Key': 'm', 'Pos': [5, 8.25], 'Shift': 'M', 'Size': [1, 1], }, {'Key': ',', 'Pos': [5, 9.25], 'Shift': '<', 'Size': [1, 1], }, {'Key': '.', 'Pos': [5, 10.25], 'Shift': '>', 'Size': [1, 1], }, {'Key': '/', 'Pos': [5, 11.25], 'Shift': '?', 'Size': [1, 1], }, {'Key': 'Key.shift_r', 'Pos': [5, 12.25], 'Size': [1, 2.75], }, {'Key': "SPACER", 'Pos': [5, 15], 'Size': [1, 1.25], }, # Spacer {'Key': 'Key.up', 'Pos': [5, 16.25], 'Size': [1, 1], }, {'Key': 'Key.ctrl_l', 'Pos': [6, 0], 'Size': [1, 1.25], }, {'Key': 'Key.cmd', 'Pos': [6, 1.25], 'Size': [1, 1.25], }, {'Key': 'Key.alt_l', 'Pos': [6, 2.5], 'Size': [1, 1.25], }, {'Key': 'Key.space', 'Pos': [6, 3.75], 'Size': [1, 6.25], }, {'Key': 'Key.alt_gr', 'Pos': [6, 10], 'Size': [1, 1.25], }, {'Key': 'Key.cmd_r', 'Pos': [6, 11.25], 'Size': [1, 1.25], }, {'Key': "SPACER", 'Pos': [6, 12.5], 'Size': [1, 1.25], }, # Spacer (Menu Key doesn't show?) {'Key': 'Key.ctrl_r', 'Pos': [6, 13.75], 'Size': [1, 1.25], }, {'Key': "SPACER", 'Pos': [6, 15.75], 'Size': [1, 0.25], }, # Spacer {'Key': 'Key.left', 'Pos': [6, 15.25], 'Size': [1, 1], }, {'Key': 'Key.down', 'Pos': [6, 16.25], 'Size': [1, 1], }, {'Key': 'Key.right', 'Pos': [6, 17.25], 'Size': [1, 1], }, ]
ansi_tkl = [{'Key': 'Key.esc', 'Pos': [0, 0], 'Size': [1, 1]}, {'Key': 'SPACER', 'Pos': [0, 1], 'Size': [1, 1]}, {'Key': 'Key.f1', 'Pos': [0, 2], 'Size': [1, 1]}, {'Key': 'Key.f2', 'Pos': [0, 3], 'Size': [1, 1]}, {'Key': 'Key.f3', 'Pos': [0, 4], 'Size': [1, 1]}, {'Key': 'Key.f4', 'Pos': [0, 5], 'Size': [1, 1]}, {'Key': 'SPACER', 'Pos': [0, 6], 'Size': [1, 0.5]}, {'Key': 'Key.f5', 'Pos': [0, 6.5], 'Size': [1, 1]}, {'Key': 'Key.f6', 'Pos': [0, 7.5], 'Size': [1, 1]}, {'Key': 'Key.f7', 'Pos': [0, 8.5], 'Size': [1, 1]}, {'Key': 'Key.f8', 'Pos': [0, 9.5], 'Size': [1, 1]}, {'Key': 'SPACER', 'Pos': [0, 10.5], 'Size': [1, 0.5]}, {'Key': 'Key.f9', 'Pos': [0, 11], 'Size': [1, 1]}, {'Key': 'Key.f10', 'Pos': [0, 12], 'Size': [1, 1]}, {'Key': 'Key.f11', 'Pos': [0, 13], 'Size': [1, 1]}, {'Key': 'Key.f12', 'Pos': [0, 14], 'Size': [1, 1]}, {'Key': 'SPACER', 'Pos': [0, 15], 'Size': [1, 0.25]}, {'Key': 'Key.print_screen', 'Pos': [0, 15.25], 'Size': [1, 1]}, {'Key': 'Key.scroll_lock', 'Pos': [0, 16.25], 'Size': [1, 1]}, {'Key': 'Key.pause', 'Pos': [0, 17.25], 'Size': [1, 1]}, {'Key': 'SPACER', 'Pos': [1, 0], 'Size': [0.5, 18.25]}, {'Key': '`', 'Pos': [2, 0], 'Shift': '~', 'Size': [1, 1]}, {'Key': '1', 'Pos': [2, 1], 'Shift': '!', 'Size': [1, 1]}, {'Key': '2', 'Pos': [2, 2], 'Shift': '@', 'Size': [1, 1]}, {'Key': '3', 'Pos': [2, 3], 'Shift': '#', 'Size': [1, 1]}, {'Key': '4', 'Pos': [2, 4], 'Shift': '$', 'Size': [1, 1]}, {'Key': '5', 'Pos': [2, 5], 'Shift': '%', 'Size': [1, 1]}, {'Key': '6', 'Pos': [2, 6], 'Shift': '^', 'Size': [1, 1]}, {'Key': '7', 'Pos': [2, 7], 'Shift': '&', 'Size': [1, 1]}, {'Key': '8', 'Pos': [2, 8], 'Shift': '*', 'Size': [1, 1]}, {'Key': '9', 'Pos': [2, 9], 'Shift': '(', 'Size': [1, 1]}, {'Key': '0', 'Pos': [2, 10], 'Shift': ')', 'Size': [1, 1]}, {'Key': '-', 'Pos': [2, 11], 'Shift': '_', 'Size': [1, 1]}, {'Key': '=', 'Pos': [2, 12], 'Shift': '+', 'Size': [1, 1]}, {'Key': 'Key.backspace', 'Pos': [2, 13], 'Size': [1, 2]}, {'Key': 'SPACER', 'Pos': [2, 15], 'Size': [1, 0.25]}, {'Key': 'Key.insert', 'Pos': [2, 15.25], 'Size': [1, 1]}, {'Key': 'Key.home', 'Pos': [2, 16.25], 'Size': [1, 1]}, {'Key': 'Key.page_up', 'Pos': [2, 17.25], 'Size': [1, 1]}, {'Key': 'Key.tab', 'Pos': [3, 0], 'Size': [1, 1.5]}, {'Key': 'q', 'Pos': [3, 1.5], 'Shift': 'Q', 'Size': [1, 1]}, {'Key': 'w', 'Pos': [3, 2.5], 'Shift': 'W', 'Size': [1, 1]}, {'Key': 'e', 'Pos': [3, 3.5], 'Shift': 'E', 'Size': [1, 1]}, {'Key': 'r', 'Pos': [3, 4.5], 'Shift': 'R', 'Size': [1, 1]}, {'Key': 't', 'Pos': [3, 5.5], 'Shift': 'T', 'Size': [1, 1]}, {'Key': 'y', 'Pos': [3, 6.5], 'Shift': 'Y', 'Size': [1, 1]}, {'Key': 'u', 'Pos': [3, 7.5], 'Shift': 'U', 'Size': [1, 1]}, {'Key': 'i', 'Pos': [3, 8.5], 'Shift': 'I', 'Size': [1, 1]}, {'Key': 'o', 'Pos': [3, 9.5], 'Shift': 'O', 'Size': [1, 1]}, {'Key': 'p', 'Pos': [3, 10.5], 'Shift': 'P', 'Size': [1, 1]}, {'Key': '[', 'Pos': [3, 11.5], 'Shift': '{', 'Size': [1, 1]}, {'Key': ']', 'Pos': [3, 12.5], 'Shift': '}', 'Size': [1, 1]}, {'Key': '\\', 'Pos': [3, 13.5], 'Shift': '|', 'Size': [1, 1.5]}, {'Key': 'SPACER', 'Pos': [3, 15], 'Size': [1, 0.25]}, {'Key': 'Key.delete', 'Pos': [3, 15.25], 'Size': [1, 1]}, {'Key': 'Key.end', 'Pos': [3, 16.25], 'Size': [1, 1]}, {'Key': 'Key.page_down', 'Pos': [3, 17.25], 'Size': [1, 1]}, {'Key': 'Key.caps_lock', 'Pos': [4, 0], 'Size': [1, 1.75]}, {'Key': 'a', 'Pos': [4, 1.75], 'Shift': 'A', 'Size': [1, 1]}, {'Key': 's', 'Pos': [4, 2.75], 'Shift': 'S', 'Size': [1, 1]}, {'Key': 'd', 'Pos': [4, 3.75], 'Shift': 'D', 'Size': [1, 1]}, {'Key': 'f', 'Pos': [4, 4.75], 'Shift': 'F', 'Size': [1, 1]}, {'Key': 'g', 'Pos': [4, 5.75], 'Shift': 'G', 'Size': [1, 1]}, {'Key': 'h', 'Pos': [4, 6.75], 'Shift': 'H', 'Size': [1, 1]}, {'Key': 'j', 'Pos': [4, 7.75], 'Shift': 'J', 'Size': [1, 1]}, {'Key': 'k', 'Pos': [4, 8.75], 'Shift': 'K', 'Size': [1, 1]}, {'Key': 'l', 'Pos': [4, 9.75], 'Shift': 'L', 'Size': [1, 1]}, {'Key': ';', 'Pos': [4, 10.75], 'Shift': ':', 'Size': [1, 1]}, {'Key': "'", 'Pos': [4, 11.75], 'Shift': '"', 'Size': [1, 1]}, {'Key': 'Key.enter', 'Pos': [4, 12.75], 'Size': [1, 2.25]}, {'Key': 'Key.shift', 'Pos': [5, 0], 'Size': [1, 2.25]}, {'Key': 'z', 'Pos': [5, 2.25], 'Shift': 'Z', 'Size': [1, 1]}, {'Key': 'x', 'Pos': [5, 3.25], 'Shift': 'X', 'Size': [1, 1]}, {'Key': 'c', 'Pos': [5, 4.25], 'Shift': 'C', 'Size': [1, 1]}, {'Key': 'v', 'Pos': [5, 5.25], 'Shift': 'V', 'Size': [1, 1]}, {'Key': 'b', 'Pos': [5, 6.25], 'Shift': 'B', 'Size': [1, 1]}, {'Key': 'n', 'Pos': [5, 7.25], 'Shift': 'N', 'Size': [1, 1]}, {'Key': 'm', 'Pos': [5, 8.25], 'Shift': 'M', 'Size': [1, 1]}, {'Key': ',', 'Pos': [5, 9.25], 'Shift': '<', 'Size': [1, 1]}, {'Key': '.', 'Pos': [5, 10.25], 'Shift': '>', 'Size': [1, 1]}, {'Key': '/', 'Pos': [5, 11.25], 'Shift': '?', 'Size': [1, 1]}, {'Key': 'Key.shift_r', 'Pos': [5, 12.25], 'Size': [1, 2.75]}, {'Key': 'SPACER', 'Pos': [5, 15], 'Size': [1, 1.25]}, {'Key': 'Key.up', 'Pos': [5, 16.25], 'Size': [1, 1]}, {'Key': 'Key.ctrl_l', 'Pos': [6, 0], 'Size': [1, 1.25]}, {'Key': 'Key.cmd', 'Pos': [6, 1.25], 'Size': [1, 1.25]}, {'Key': 'Key.alt_l', 'Pos': [6, 2.5], 'Size': [1, 1.25]}, {'Key': 'Key.space', 'Pos': [6, 3.75], 'Size': [1, 6.25]}, {'Key': 'Key.alt_gr', 'Pos': [6, 10], 'Size': [1, 1.25]}, {'Key': 'Key.cmd_r', 'Pos': [6, 11.25], 'Size': [1, 1.25]}, {'Key': 'SPACER', 'Pos': [6, 12.5], 'Size': [1, 1.25]}, {'Key': 'Key.ctrl_r', 'Pos': [6, 13.75], 'Size': [1, 1.25]}, {'Key': 'SPACER', 'Pos': [6, 15.75], 'Size': [1, 0.25]}, {'Key': 'Key.left', 'Pos': [6, 15.25], 'Size': [1, 1]}, {'Key': 'Key.down', 'Pos': [6, 16.25], 'Size': [1, 1]}, {'Key': 'Key.right', 'Pos': [6, 17.25], 'Size': [1, 1]}]
class DummyLogger: def debug (self, *arg): pass def info (self, *arg): pass def error (self, *arg): pass def critical (self, *arg): pass
class Dummylogger: def debug(self, *arg): pass def info(self, *arg): pass def error(self, *arg): pass def critical(self, *arg): pass
_base_ = [ '../_base_/models/gma/gma_p-only.py', '../_base_/datasets/flyingchairs_raft_368x496.py', '../_base_/default_runtime.py' ] optimizer = dict( type='AdamW', lr=0.00025, betas=(0.9, 0.999), eps=1e-08, weight_decay=0.0001, amsgrad=False) optimizer_config = dict(grad_clip=dict(max_norm=1.)) lr_config = dict( policy='OneCycle', max_lr=0.00025, total_steps=120100, pct_start=0.05, anneal_strategy='linear') runner = dict(type='IterBasedRunner', max_iters=120000) checkpoint_config = dict(by_epoch=False, interval=10000) evaluation = dict(interval=10000, metric='EPE')
_base_ = ['../_base_/models/gma/gma_p-only.py', '../_base_/datasets/flyingchairs_raft_368x496.py', '../_base_/default_runtime.py'] optimizer = dict(type='AdamW', lr=0.00025, betas=(0.9, 0.999), eps=1e-08, weight_decay=0.0001, amsgrad=False) optimizer_config = dict(grad_clip=dict(max_norm=1.0)) lr_config = dict(policy='OneCycle', max_lr=0.00025, total_steps=120100, pct_start=0.05, anneal_strategy='linear') runner = dict(type='IterBasedRunner', max_iters=120000) checkpoint_config = dict(by_epoch=False, interval=10000) evaluation = dict(interval=10000, metric='EPE')
class Median: def findMedianSortedArrays(self, nums1, nums2): new=sorted(nums1+nums2) x=len(new) if x%2==1: return new[int(x/2)] elif x%2==0: return (new[int(x/2)]+new[int(x/2)-1])/2 if __name__=="__main__": a=[1,2] b=[3] c=[1,283,4577,609] d=[98732,4739,21] print(Median().findMedianSortedArrays(a,b)) print(Median().findMedianSortedArrays(c,d))
class Median: def find_median_sorted_arrays(self, nums1, nums2): new = sorted(nums1 + nums2) x = len(new) if x % 2 == 1: return new[int(x / 2)] elif x % 2 == 0: return (new[int(x / 2)] + new[int(x / 2) - 1]) / 2 if __name__ == '__main__': a = [1, 2] b = [3] c = [1, 283, 4577, 609] d = [98732, 4739, 21] print(median().findMedianSortedArrays(a, b)) print(median().findMedianSortedArrays(c, d))
class TreeNode: __slots__ = ['left', 'right'] def __init__(self, value: int): self.value = value
class Treenode: __slots__ = ['left', 'right'] def __init__(self, value: int): self.value = value
def is_palindrome(x): l = len(a) for i in range(int((l-l%2)/2)): if a[i] == a[l-i-1]: continue else: print(x," is not palindrome") return False return True a= input("Please enter the palindrome digit \n") if is_palindrome(a): l = len(a) if int(a)!=9: a = list(a) for i in range(int((l-l%2)/2),l): if a[i] is not '9': a[i] = str(int(a[i])+1) if i != l-i-1: a[l-i-1]=a[i] break else: if i == l-1: a[i] ='1' a[l-i-1] ='1' a.insert(2,'0') continue a[i] = '0' if i != l-i-1: a[l-i-1]=a[i] else: a = '11' print("".join(a))
def is_palindrome(x): l = len(a) for i in range(int((l - l % 2) / 2)): if a[i] == a[l - i - 1]: continue else: print(x, ' is not palindrome') return False return True a = input('Please enter the palindrome digit \n') if is_palindrome(a): l = len(a) if int(a) != 9: a = list(a) for i in range(int((l - l % 2) / 2), l): if a[i] is not '9': a[i] = str(int(a[i]) + 1) if i != l - i - 1: a[l - i - 1] = a[i] break else: if i == l - 1: a[i] = '1' a[l - i - 1] = '1' a.insert(2, '0') continue a[i] = '0' if i != l - i - 1: a[l - i - 1] = a[i] else: a = '11' print(''.join(a))
# # PySNMP MIB module CISCO-TRUSTSEC-TC-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-TRUSTSEC-TC-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:57:57 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, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ValueSizeConstraint, ValueRangeConstraint, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "SingleValueConstraint") ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") Gauge32, MibIdentifier, Integer32, IpAddress, iso, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, Counter64, Unsigned32, Counter32, NotificationType, TimeTicks, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "MibIdentifier", "Integer32", "IpAddress", "iso", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "Counter64", "Unsigned32", "Counter32", "NotificationType", "TimeTicks", "Bits") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") ciscoCtsTcMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 694)) ciscoCtsTcMIB.setRevisions(('2013-06-06 00:00', '2012-01-30 00:00', '2009-05-14 00:00',)) if mibBuilder.loadTexts: ciscoCtsTcMIB.setLastUpdated('201306060000Z') if mibBuilder.loadTexts: ciscoCtsTcMIB.setOrganization('Cisco Systems, Inc.') class CtsSecurityGroupTag(TextualConvention, Unsigned32): status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 65535) class CtsAclName(TextualConvention, OctetString): status = 'current' displayHint = '255a' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(1, 255) class CtsAclNameOrEmpty(TextualConvention, OctetString): status = 'current' displayHint = '255a' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 255) class CtsAclList(TextualConvention, OctetString): status = 'current' displayHint = '255a' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(1, 255) class CtsAclListOrEmpty(TextualConvention, OctetString): status = 'current' displayHint = '255a' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 255) class CtsPolicyName(TextualConvention, OctetString): status = 'current' displayHint = '255a' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 255) class CtsPasswordEncryptionType(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5)) namedValues = NamedValues(("other", 1), ("none", 2), ("clearText", 3), ("typeSix", 4), ("typeSeven", 5)) class CtsPassword(TextualConvention, OctetString): status = 'current' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 256) class CtsGenerationId(TextualConvention, OctetString): status = 'current' displayHint = '128a' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 128) class CtsAcsAuthorityIdentity(TextualConvention, OctetString): status = 'current' displayHint = '1x' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 64) class CtsCredentialRecordType(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("simpleSecret", 1), ("pac", 2)) class CtsSgaclMonitorMode(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("on", 1), ("off", 2)) class CtsSxpConnectionStatus(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5)) namedValues = NamedValues(("other", 1), ("off", 2), ("on", 3), ("pendingOn", 4), ("deleteHoldDown", 5)) mibBuilder.exportSymbols("CISCO-TRUSTSEC-TC-MIB", PYSNMP_MODULE_ID=ciscoCtsTcMIB, CtsAclListOrEmpty=CtsAclListOrEmpty, CtsPolicyName=CtsPolicyName, CtsSxpConnectionStatus=CtsSxpConnectionStatus, CtsPassword=CtsPassword, CtsAclList=CtsAclList, CtsAclNameOrEmpty=CtsAclNameOrEmpty, ciscoCtsTcMIB=ciscoCtsTcMIB, CtsPasswordEncryptionType=CtsPasswordEncryptionType, CtsAclName=CtsAclName, CtsGenerationId=CtsGenerationId, CtsAcsAuthorityIdentity=CtsAcsAuthorityIdentity, CtsCredentialRecordType=CtsCredentialRecordType, CtsSgaclMonitorMode=CtsSgaclMonitorMode, CtsSecurityGroupTag=CtsSecurityGroupTag)
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, value_size_constraint, value_range_constraint, constraints_intersection, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueSizeConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint') (cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (gauge32, mib_identifier, integer32, ip_address, iso, module_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, object_identity, counter64, unsigned32, counter32, notification_type, time_ticks, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'Gauge32', 'MibIdentifier', 'Integer32', 'IpAddress', 'iso', 'ModuleIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ObjectIdentity', 'Counter64', 'Unsigned32', 'Counter32', 'NotificationType', 'TimeTicks', 'Bits') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') cisco_cts_tc_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 694)) ciscoCtsTcMIB.setRevisions(('2013-06-06 00:00', '2012-01-30 00:00', '2009-05-14 00:00')) if mibBuilder.loadTexts: ciscoCtsTcMIB.setLastUpdated('201306060000Z') if mibBuilder.loadTexts: ciscoCtsTcMIB.setOrganization('Cisco Systems, Inc.') class Ctssecuritygrouptag(TextualConvention, Unsigned32): status = 'current' subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 65535) class Ctsaclname(TextualConvention, OctetString): status = 'current' display_hint = '255a' subtype_spec = OctetString.subtypeSpec + value_size_constraint(1, 255) class Ctsaclnameorempty(TextualConvention, OctetString): status = 'current' display_hint = '255a' subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 255) class Ctsacllist(TextualConvention, OctetString): status = 'current' display_hint = '255a' subtype_spec = OctetString.subtypeSpec + value_size_constraint(1, 255) class Ctsacllistorempty(TextualConvention, OctetString): status = 'current' display_hint = '255a' subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 255) class Ctspolicyname(TextualConvention, OctetString): status = 'current' display_hint = '255a' subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 255) class Ctspasswordencryptiontype(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5)) named_values = named_values(('other', 1), ('none', 2), ('clearText', 3), ('typeSix', 4), ('typeSeven', 5)) class Ctspassword(TextualConvention, OctetString): status = 'current' subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 256) class Ctsgenerationid(TextualConvention, OctetString): status = 'current' display_hint = '128a' subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 128) class Ctsacsauthorityidentity(TextualConvention, OctetString): status = 'current' display_hint = '1x' subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 64) class Ctscredentialrecordtype(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('simpleSecret', 1), ('pac', 2)) class Ctssgaclmonitormode(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('on', 1), ('off', 2)) class Ctssxpconnectionstatus(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5)) named_values = named_values(('other', 1), ('off', 2), ('on', 3), ('pendingOn', 4), ('deleteHoldDown', 5)) mibBuilder.exportSymbols('CISCO-TRUSTSEC-TC-MIB', PYSNMP_MODULE_ID=ciscoCtsTcMIB, CtsAclListOrEmpty=CtsAclListOrEmpty, CtsPolicyName=CtsPolicyName, CtsSxpConnectionStatus=CtsSxpConnectionStatus, CtsPassword=CtsPassword, CtsAclList=CtsAclList, CtsAclNameOrEmpty=CtsAclNameOrEmpty, ciscoCtsTcMIB=ciscoCtsTcMIB, CtsPasswordEncryptionType=CtsPasswordEncryptionType, CtsAclName=CtsAclName, CtsGenerationId=CtsGenerationId, CtsAcsAuthorityIdentity=CtsAcsAuthorityIdentity, CtsCredentialRecordType=CtsCredentialRecordType, CtsSgaclMonitorMode=CtsSgaclMonitorMode, CtsSecurityGroupTag=CtsSecurityGroupTag)
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # Created on 2013-04-22 16:15:32 class RoomManager(object): def __init__(self): self.rooms = {} def new(self, meta): if meta['hash'] in self.rooms: if self.rooms[meta['hash']].sha1_array == meta['sha1_array']: return self.rooms[meta['hash']] else: return None else: self.rooms[meta['hash']] = Room(meta['hash'], meta) return self.rooms[meta['hash']] def delete(self, roomid): if roomid in self.rooms: del self.rooms[roomid] def get(self, roomid): return self.rooms.get(roomid) def keys(self): return self.rooms.keys() class Room(object): def __init__(self, id, meta): for each in ('hash', 'sha1_array', 'filename', 'piece_size', 'block_size', 'size', 'type'): setattr(self, each, meta[each]) self.id = id self.meta = meta self.title = self.filename self.peers = {} def join(self, peerid, ws): self.peers[peerid] = Peer(peerid, ws) return self.peers[peerid] def leave(self, peerid): if peerid in self.peers: del self.peers[peerid] def get(self, peerid): return self.peers.get(peerid) def peer_list(self): result = {} for each in self.peers.itervalues(): result[each.peerid] = { 'bitmap': each.bitmap, } return result class Peer(object): def __init__(self, peerid, ws): self.ws = ws self.peerid = peerid self.bitmap = ''
class Roommanager(object): def __init__(self): self.rooms = {} def new(self, meta): if meta['hash'] in self.rooms: if self.rooms[meta['hash']].sha1_array == meta['sha1_array']: return self.rooms[meta['hash']] else: return None else: self.rooms[meta['hash']] = room(meta['hash'], meta) return self.rooms[meta['hash']] def delete(self, roomid): if roomid in self.rooms: del self.rooms[roomid] def get(self, roomid): return self.rooms.get(roomid) def keys(self): return self.rooms.keys() class Room(object): def __init__(self, id, meta): for each in ('hash', 'sha1_array', 'filename', 'piece_size', 'block_size', 'size', 'type'): setattr(self, each, meta[each]) self.id = id self.meta = meta self.title = self.filename self.peers = {} def join(self, peerid, ws): self.peers[peerid] = peer(peerid, ws) return self.peers[peerid] def leave(self, peerid): if peerid in self.peers: del self.peers[peerid] def get(self, peerid): return self.peers.get(peerid) def peer_list(self): result = {} for each in self.peers.itervalues(): result[each.peerid] = {'bitmap': each.bitmap} return result class Peer(object): def __init__(self, peerid, ws): self.ws = ws self.peerid = peerid self.bitmap = ''
with open("td9_graph_lworld.txt", "r") as f : lines = f.readlines() links =[] for line in lines : spl = line.strip("\n\r ").split(",") if len(spl) == 2 : l = { "source":spl[0],"target":spl[1],"type":"-"} links.append(l) l = { "source":spl[1],"target":spl[0],"type":"-"} links.append(l) with open("td9_graph_lworld.js", "w") as f : f.write ("var links = [\n") for l in links : f.write("{") f.write( ",".join ( [ "{0}:'{1}'".format (k,v) for k,v in l.items() ] ) ) f.write("},\n") f.write("\n];\n")
with open('td9_graph_lworld.txt', 'r') as f: lines = f.readlines() links = [] for line in lines: spl = line.strip('\n\r ').split(',') if len(spl) == 2: l = {'source': spl[0], 'target': spl[1], 'type': '-'} links.append(l) l = {'source': spl[1], 'target': spl[0], 'type': '-'} links.append(l) with open('td9_graph_lworld.js', 'w') as f: f.write('var links = [\n') for l in links: f.write('{') f.write(','.join(["{0}:'{1}'".format(k, v) for (k, v) in l.items()])) f.write('},\n') f.write('\n];\n')
def func(b=None, a=None): pass func(a=1)
def func(b=None, a=None): pass func(a=1)
# Header used to check if it's an UPX file UPX_STRING = b"UPX!" # Header used to find the config offset ([ss] after unxor) CONFIG_HEADER = b"\x15\x15\x29\xD2" # Size of every element in the config space CONFIG_SIZE = 428 SIGNATURE1_SIZE = 96 SIGNATURE2_SIZE = 96 CONFIG_VERSION_SIZE = 4 CONFIG_TOTAL_SIZE = CONFIG_SIZE + \ SIGNATURE1_SIZE + \ SIGNATURE2_SIZE + \ CONFIG_VERSION_SIZE # Hardcoded XOR key used to encrypt the config XOR_KEY = b"\x4E\x66\x5A\x8F\x80\xC8\xAC\x23\x8D\xAC\x47\x06\xD5\x4F\x6F\x7E" # The first signature public key used to authenticate the encrypted config SIGNATURE1_KEY = "\x02\xc0\xa1\x43\x78\x53\xbe\x3c\xc4\xc8\x0a\x29\xe9\x58" \ "\xbf\xc6\xa7\x1b\x7e\xab\x72\x15\x1d\x64\x64\x98\x95\xc4" \ "\x6a\x48\xc3\x2d\x6c\x39\x82\x1d\x7e\x25\xf3\x80\x44\xf7" \ "\x2d\x10\x6b\xcb\x2f\x09\xc6" # The second signature public key used to authenticate the decrypted config SIGNATURE2_KEY = "\x02\xd5\xd5\xe7\x41\xee\xdc\xc8\x10\x6d\x2f\x48\x0d\x04" \ "\x12\x21\x27\x39\xc7\x45\x0d\x2a\xd1\x40\x72\x01\xd1\x8b" \ "\xcd\xc4\x16\x65\x76\x57\xc1\x9d\xe9\xbb\x05\x0d\x3b\xcf" \ "\x6e\x70\x79\x60\xf1\xea\xef" # All tags that can be present in a Mozi config CONFIG_TAGS = { "ss": "Bot role", "ssx": "enable/disable tag [ss]", "cpu": "CPU architecture", "cpux": "enable/disable tag [cpu]", "nd": "new DHT node", "hp": "DHT node hash prefix", "atk": "DDoS attack type", "ver": "Value in V section in DHT protcol", "sv": "Update config", "ud": "Update bot", "dr": "Download and execute payload from the specified URL", "rn": "Execute specified command", "dip": "ip:port to download Mozi bot", "idp": "report bot", "count": "URL that used to report bot" } # List of the bootstrap nodes hardcoded in Mozi BOOTSTRAP_NODES = [ ("router.bittorrent.com", 6881), ("dht.transmissionbt.com", 6881), ("router.utorrent.com", 6881), ("bttracker.debian.org", 6881), ("212.129.33.59", 6881), ("82.221.103.244", 6881), ("130.239.18.159", 6881), ("87.98.162.88", 6881), ] # ELK Settings to import Mozi configurations ELK_HOSTS = "https://admin:admin@opendistro-opendistro-es-client-service " \ ".monitoring.svc.cluster.local:9200" ELK_SSL = True ELK_INDEX = "mozitools" ELK_BULK_SIZE = 100 # Number of node to remember. Nodes in cache aren't queried. NODES_CACHE_SIZE = 10000
upx_string = b'UPX!' config_header = b'\x15\x15)\xd2' config_size = 428 signature1_size = 96 signature2_size = 96 config_version_size = 4 config_total_size = CONFIG_SIZE + SIGNATURE1_SIZE + SIGNATURE2_SIZE + CONFIG_VERSION_SIZE xor_key = b'NfZ\x8f\x80\xc8\xac#\x8d\xacG\x06\xd5Oo~' signature1_key = '\x02À¡CxS¾<ÄÈ\n)éX¿Æ§\x1b~«r\x15\x1ddd\x98\x95ÄjHÃ-l9\x82\x1d~%ó\x80D÷-\x10kË/\tÆ' signature2_key = "\x02ÕÕçAîÜÈ\x10m/H\r\x04\x12!'9ÇE\r*Ñ@r\x01Ñ\x8bÍÄ\x16evWÁ\x9dé»\x05\r;Ïnpy`ñêï" config_tags = {'ss': 'Bot role', 'ssx': 'enable/disable tag [ss]', 'cpu': 'CPU architecture', 'cpux': 'enable/disable tag [cpu]', 'nd': 'new DHT node', 'hp': 'DHT node hash prefix', 'atk': 'DDoS attack type', 'ver': 'Value in V section in DHT protcol', 'sv': 'Update config', 'ud': 'Update bot', 'dr': 'Download and execute payload from the specified URL', 'rn': 'Execute specified command', 'dip': 'ip:port to download Mozi bot', 'idp': 'report bot', 'count': 'URL that used to report bot'} bootstrap_nodes = [('router.bittorrent.com', 6881), ('dht.transmissionbt.com', 6881), ('router.utorrent.com', 6881), ('bttracker.debian.org', 6881), ('212.129.33.59', 6881), ('82.221.103.244', 6881), ('130.239.18.159', 6881), ('87.98.162.88', 6881)] elk_hosts = 'https://admin:admin@opendistro-opendistro-es-client-service .monitoring.svc.cluster.local:9200' elk_ssl = True elk_index = 'mozitools' elk_bulk_size = 100 nodes_cache_size = 10000
#lists li = [45,54,56,'dtr',True,54.76] mytuple = (34,34,34,23,45,56,2,32,56,24) ''' #index print(li[4]) #negative indexing print(li[-1]) print(li[2]) #slicing print(li[2:5]) print(li[3:]) print(li[:]) print(li[:4]) ''' # integers #mutability, immutability a = 10 print(a) print(id(a)) a = 23 print(a) print(id(a))
li = [45, 54, 56, 'dtr', True, 54.76] mytuple = (34, 34, 34, 23, 45, 56, 2, 32, 56, 24) '\n#index\nprint(li[4])\n#negative indexing\nprint(li[-1])\n\nprint(li[2])\n#slicing\nprint(li[2:5])\n\nprint(li[3:])\n\nprint(li[:])\n\nprint(li[:4])\n' a = 10 print(a) print(id(a)) a = 23 print(a) print(id(a))
# The Python versions of list comprehensions found in Graham Hutton's # "Programming Haskell" book, chapter 5. [ x**2 for x in range(1,6) ] [ (x,y) for x in range(1,4) for y in range(4,6) ] [ (x,y) for x in range(1,4) for y in range(x,4) ] concat = lambda xss: [ x for xs in xss for x in xs ] firsts = lambda ps: [ x for (x,_) in ps ] length = lambda xs: sum(1 for _ in xs) factors = lambda n: [ x for x in range(1,n+1) if n % x == 0 ] prime = lambda n: factors(n) == [1, n] primes = lambda n: [ x for x in range(2, n+1) if prime(x) ] find = lambda k, t: [ v for (k1,v) in t if k == k1 ] pairs = lambda xs: zip(xs, xs[1:]) is_sorted = lambda xs: all(x <= y for (x,y) in pairs(xs)) positions = lambda x, xs: [ i for (x1,i) in zip(xs, range(len(xs))) if x == x1 ] lowers = lambda xs: len([ x for x in xs if x.islower() ]) count = lambda x, xs: len([ x1 for x1 in xs if x == x1])
[x ** 2 for x in range(1, 6)] [(x, y) for x in range(1, 4) for y in range(4, 6)] [(x, y) for x in range(1, 4) for y in range(x, 4)] concat = lambda xss: [x for xs in xss for x in xs] firsts = lambda ps: [x for (x, _) in ps] length = lambda xs: sum((1 for _ in xs)) factors = lambda n: [x for x in range(1, n + 1) if n % x == 0] prime = lambda n: factors(n) == [1, n] primes = lambda n: [x for x in range(2, n + 1) if prime(x)] find = lambda k, t: [v for (k1, v) in t if k == k1] pairs = lambda xs: zip(xs, xs[1:]) is_sorted = lambda xs: all((x <= y for (x, y) in pairs(xs))) positions = lambda x, xs: [i for (x1, i) in zip(xs, range(len(xs))) if x == x1] lowers = lambda xs: len([x for x in xs if x.islower()]) count = lambda x, xs: len([x1 for x1 in xs if x == x1])
# Shift cipher # Used with the shift and ceasar option of ciphers def encrypt(message, shift): shift = int(shift) result = "" for i in range(len(message)): char = message[i] if(char.isupper()): result += chr((ord(char)+ shift-65) % 26 + 65) elif(char.islower()): result += chr((ord(char) + shift-97) % 26 + 97) else: result += char return result def decrypt(message, shift): shift = int(shift) result = "" for i in range(len(message)): char = message[i] if(char.isupper()): result += chr((ord(char) - shift-65) % 26 + 65) elif(char.islower()): result += chr((ord(char) - shift-97) % 26 + 97) else: result += char return result
def encrypt(message, shift): shift = int(shift) result = '' for i in range(len(message)): char = message[i] if char.isupper(): result += chr((ord(char) + shift - 65) % 26 + 65) elif char.islower(): result += chr((ord(char) + shift - 97) % 26 + 97) else: result += char return result def decrypt(message, shift): shift = int(shift) result = '' for i in range(len(message)): char = message[i] if char.isupper(): result += chr((ord(char) - shift - 65) % 26 + 65) elif char.islower(): result += chr((ord(char) - shift - 97) % 26 + 97) else: result += char return result
class Person: def __init__(self, name, age): self.name = name self.age = age def say_hi(self): print('Hello, my name is', self.name) person = Person('Sun Jinbo', 20) print(person) person.say_hi() class Robot: poplulation = 0 def __init__(self, name): self.name = name print("(Initializing {})".format(self.name)) Robot.poplulation += 1 def die(self): print("({} is died!)".format(self.name)) Robot.poplulation -= 1 if (Robot.poplulation == 0): print("({} was the last one.)".format(self.name)) else: print("There are still {:d} robots working.".format(Robot.poplulation)) def say_hi(self): print("Greetings, my masters call me {}.".format(self.name)) @classmethod def hom_many_robots(cls): print("We have {:d} robots.".format(cls.poplulation)) droid1 = Robot("R2-D2") droid1.say_hi() Robot.hom_many_robots() droid2 = Robot("C1-3P") droid2.say_hi() Robot.hom_many_robots() droid1.die() droid2.die() Robot.hom_many_robots() class Teacher(Person): def __init__(self, name, age, salary): Person.__init__(self, name, age) self.salary = salary def tell(self): print('Salary: {:d}'.format(self.salary)) teacher = Teacher('Tom', 29, 15000) teacher.say_hi() teacher.tell()
class Person: def __init__(self, name, age): self.name = name self.age = age def say_hi(self): print('Hello, my name is', self.name) person = person('Sun Jinbo', 20) print(person) person.say_hi() class Robot: poplulation = 0 def __init__(self, name): self.name = name print('(Initializing {})'.format(self.name)) Robot.poplulation += 1 def die(self): print('({} is died!)'.format(self.name)) Robot.poplulation -= 1 if Robot.poplulation == 0: print('({} was the last one.)'.format(self.name)) else: print('There are still {:d} robots working.'.format(Robot.poplulation)) def say_hi(self): print('Greetings, my masters call me {}.'.format(self.name)) @classmethod def hom_many_robots(cls): print('We have {:d} robots.'.format(cls.poplulation)) droid1 = robot('R2-D2') droid1.say_hi() Robot.hom_many_robots() droid2 = robot('C1-3P') droid2.say_hi() Robot.hom_many_robots() droid1.die() droid2.die() Robot.hom_many_robots() class Teacher(Person): def __init__(self, name, age, salary): Person.__init__(self, name, age) self.salary = salary def tell(self): print('Salary: {:d}'.format(self.salary)) teacher = teacher('Tom', 29, 15000) teacher.say_hi() teacher.tell()
#encoding:utf-8 subreddit = 'TikTok_Tits' t_channel = '@r_TikTok_Tits' def send_post(submission, r2t): return r2t.send_simple(submission)
subreddit = 'TikTok_Tits' t_channel = '@r_TikTok_Tits' def send_post(submission, r2t): return r2t.send_simple(submission)
class Foreign: def __init__(self,nombreConstraint:str,columnas:list,nombreTablaReferencia:str, columnasOtraTabla:list): self.nombreConstraint = nombreConstraint self.columnas = columnas self.nombreTabla = nombreTablaReferencia self.columnasrefer = columnasOtraTabla
class Foreign: def __init__(self, nombreConstraint: str, columnas: list, nombreTablaReferencia: str, columnasOtraTabla: list): self.nombreConstraint = nombreConstraint self.columnas = columnas self.nombreTabla = nombreTablaReferencia self.columnasrefer = columnasOtraTabla
def longest_equal_subarray2(A): longest = cnt = 0 n = len(A) for i in range(n): for j in range(i, n): cnt += 1 if A[j] else -1 if cnt == 0: longest = max(longest, j - i + 1) return longest def longest_equal_subarray(nums): d = {0: -1} sm = ans = 0 for i, x in enumerate(nums): sm += 1 if x else -1 if sm in d: ans = max(ans, i - d[sm]) else: d[sm] = i return ans print(longest_equal_subarray([1,0,1,1,0,0,0,0,1]))
def longest_equal_subarray2(A): longest = cnt = 0 n = len(A) for i in range(n): for j in range(i, n): cnt += 1 if A[j] else -1 if cnt == 0: longest = max(longest, j - i + 1) return longest def longest_equal_subarray(nums): d = {0: -1} sm = ans = 0 for (i, x) in enumerate(nums): sm += 1 if x else -1 if sm in d: ans = max(ans, i - d[sm]) else: d[sm] = i return ans print(longest_equal_subarray([1, 0, 1, 1, 0, 0, 0, 0, 1]))
#!/usr/bin/python class GrabzItCookie: def __init__(self, name, value, domain, path, httponly, expires, type): self.Name = name self.Value = value self.Domain = domain self.Path = path self.HttpOnly = httponly self.Expires = expires self.Type = type
class Grabzitcookie: def __init__(self, name, value, domain, path, httponly, expires, type): self.Name = name self.Value = value self.Domain = domain self.Path = path self.HttpOnly = httponly self.Expires = expires self.Type = type
# Hash Table; Stack # Given a list of daily temperatures T, return a list such that, for each day in the input, tells you how many days you would have to wait until a warmer temperature. If there is no future day for which this is possible, put 0 instead. # For example, given the list of temperatures T = [73, 74, 75, 71, 69, 72, 76, 73], your output should be [1, 1, 4, 2, 1, 1, 0, 0]. # Note: The length of temperatures will be in the range [1, 30000]. Each temperature will be an integer in the range [30, 100]. class Solution: def dailyTemperatures(self, T: List[int]) -> List[int]: ans = [0] * len(T) stack = [] for i in range(len(T) - 1, -1, -1): while stack and T[i] >= T[stack[-1]]: stack.pop() if stack: ans[i] = stack[-1] - i stack.append(i) return ans
class Solution: def daily_temperatures(self, T: List[int]) -> List[int]: ans = [0] * len(T) stack = [] for i in range(len(T) - 1, -1, -1): while stack and T[i] >= T[stack[-1]]: stack.pop() if stack: ans[i] = stack[-1] - i stack.append(i) return ans
# -*- coding: utf-8 -*- class A: i = 5 def getI(self): print ("self.i: ", self.i) one = A() one.getI()
class A: i = 5 def get_i(self): print('self.i: ', self.i) one = a() one.getI()
#!/usr/bin/env python3 # https://abc099.contest.atcoder.jp/tasks/abc099_a n = int(input()) if n < 1000: print('ABC') else: print('ABD')
n = int(input()) if n < 1000: print('ABC') else: print('ABD')
if __name__ == "__main__": xt101_radio = xt101('COM9', 247) xt101_radio.send_message(0x1234, [1,2,4,5]) print("Mac:", xt101_radio.get_mac_address()) time.sleep(0.75) print("Sink:", xt101_radio.get_sink_address()) time.sleep(0.75) print("Firmware:", xt101_radio.get_firmware_version()) time.sleep(0.75) print("Region:", xt101_radio.get_region()) time.sleep(0.75) print("Mode:", xt101_radio.get_mode()) time.sleep(0.75) print("Node ID:", xt101_radio.get_node_short_id()) time.sleep(0.75) print(xt101_radio.get_debug_regs()) time.sleep(0.75) app_key = [0x1234, 0x2345, 0x3456, 0x4567, 0x5678, 0x6789, 0x789A, 0x89AB] net_key = [0x1234, 0x2345, 0x3456, 0x4567, 0x5678, 0x6789, 0x789A, 0x89AB] print("App key:", xt101_radio.set_aes_key(app_key, 'A')) time.sleep(1) print("Net key:", xt101_radio.set_aes_key(net_key, 'N')) time.sleep(1) print("Set as sink", xt101_radio.set_sink()) time.sleep(0.75) old_val = xt101_radio.get_net_id() time.sleep(0.75) xt101_radio.set_net_id(0x55) time.sleep(0.75) new_val = xt101_radio.get_net_id() print("Net id:", old_val, new_val) time.sleep(0.75) old_val = xt101_radio.get_tx_power() time.sleep(0.75) xt101_radio.set_tx_power(13) time.sleep(0.75) new_val = xt101_radio.get_tx_power() print("Tx power:", old_val, new_val) old_val = xt101_radio.get_sf() time.sleep(0.75) xt101_radio.set_sf(8) time.sleep(0.75) new_val = xt101_radio.get_sf() print("SF:", old_val, new_val) old_val = xt101_radio.get_target_rssi() time.sleep(0.75) xt101_radio.set_target_rssi(81) time.sleep(0.75) new_val = xt101_radio.get_target_rssi() print("RSSI:", old_val, new_val)
if __name__ == '__main__': xt101_radio = xt101('COM9', 247) xt101_radio.send_message(4660, [1, 2, 4, 5]) print('Mac:', xt101_radio.get_mac_address()) time.sleep(0.75) print('Sink:', xt101_radio.get_sink_address()) time.sleep(0.75) print('Firmware:', xt101_radio.get_firmware_version()) time.sleep(0.75) print('Region:', xt101_radio.get_region()) time.sleep(0.75) print('Mode:', xt101_radio.get_mode()) time.sleep(0.75) print('Node ID:', xt101_radio.get_node_short_id()) time.sleep(0.75) print(xt101_radio.get_debug_regs()) time.sleep(0.75) app_key = [4660, 9029, 13398, 17767, 22136, 26505, 30874, 35243] net_key = [4660, 9029, 13398, 17767, 22136, 26505, 30874, 35243] print('App key:', xt101_radio.set_aes_key(app_key, 'A')) time.sleep(1) print('Net key:', xt101_radio.set_aes_key(net_key, 'N')) time.sleep(1) print('Set as sink', xt101_radio.set_sink()) time.sleep(0.75) old_val = xt101_radio.get_net_id() time.sleep(0.75) xt101_radio.set_net_id(85) time.sleep(0.75) new_val = xt101_radio.get_net_id() print('Net id:', old_val, new_val) time.sleep(0.75) old_val = xt101_radio.get_tx_power() time.sleep(0.75) xt101_radio.set_tx_power(13) time.sleep(0.75) new_val = xt101_radio.get_tx_power() print('Tx power:', old_val, new_val) old_val = xt101_radio.get_sf() time.sleep(0.75) xt101_radio.set_sf(8) time.sleep(0.75) new_val = xt101_radio.get_sf() print('SF:', old_val, new_val) old_val = xt101_radio.get_target_rssi() time.sleep(0.75) xt101_radio.set_target_rssi(81) time.sleep(0.75) new_val = xt101_radio.get_target_rssi() print('RSSI:', old_val, new_val)
for i in range(1,999): params = dict( pin=i ) resp=requests.get(url=url,params=params) data = resp.json() if(data["accept"] == "Yesss"): print(i, resp.json())
for i in range(1, 999): params = dict(pin=i) resp = requests.get(url=url, params=params) data = resp.json() if data['accept'] == 'Yesss': print(i, resp.json())
# SPDX-License-Identifier: Apache-2.0 # @version 1.0.0 rules = { "sol": {"shebang": False, "comment": ["///", "/*", "//"],}, "rs": {"shebang": False, "comment": ["//", "/*"],}, "py": {"shebang": True, "comment": ["#"],}, }
rules = {'sol': {'shebang': False, 'comment': ['///', '/*', '//']}, 'rs': {'shebang': False, 'comment': ['//', '/*']}, 'py': {'shebang': True, 'comment': ['#']}}
class Solution: def reverseVowels(self, s: str) -> str: vowels = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'] new_s = [c for c in s] l, r = 0, len(s) - 1 while l < r: if s[l] not in vowels: l += 1 continue if s[r] not in vowels: r -= 1 continue new_s[l], new_s[r] = new_s[r], new_s[l] l, r = l + 1, r - 1 return ''.join(new_s) class FinalSolution: def reverseVowels(self, s: str) -> str: vowels = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'] s = [c for c in s] l, r = 0, len(s) - 1 while l < r: if s[l] not in vowels: l += 1 if s[r] not in vowels: r -= 1 if s[l] in vowels and s[r] in vowels: s[l], s[r] = s[r], s[l] l, r = l + 1, r - 1 return ''.join(s) if __name__ == '__main__': s = 'hello' expected = 'holle' a = FinalSolution().reverseVowels(s) print(a) print(a == expected)
class Solution: def reverse_vowels(self, s: str) -> str: vowels = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'] new_s = [c for c in s] (l, r) = (0, len(s) - 1) while l < r: if s[l] not in vowels: l += 1 continue if s[r] not in vowels: r -= 1 continue (new_s[l], new_s[r]) = (new_s[r], new_s[l]) (l, r) = (l + 1, r - 1) return ''.join(new_s) class Finalsolution: def reverse_vowels(self, s: str) -> str: vowels = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'] s = [c for c in s] (l, r) = (0, len(s) - 1) while l < r: if s[l] not in vowels: l += 1 if s[r] not in vowels: r -= 1 if s[l] in vowels and s[r] in vowels: (s[l], s[r]) = (s[r], s[l]) (l, r) = (l + 1, r - 1) return ''.join(s) if __name__ == '__main__': s = 'hello' expected = 'holle' a = final_solution().reverseVowels(s) print(a) print(a == expected)
class Optimizer: def step(self, model): raise NotImplementedError class GD(Optimizer): def __init__(self, lr=0.001): self.lr = lr def step(self, model): for layer, name, param, grad in model.params_and_grads(): layer.params[name] = param - self.lr*grad
class Optimizer: def step(self, model): raise NotImplementedError class Gd(Optimizer): def __init__(self, lr=0.001): self.lr = lr def step(self, model): for (layer, name, param, grad) in model.params_and_grads(): layer.params[name] = param - self.lr * grad
########################################################################## # # Processor specific code # CPU = "Z80" # Description = "Zilog 8-bit microprocessor." # DataWidth = 8 # 8-bit data # AddressWidth = 16 # 16-bit addresses # Maximum length of an instruction (for formatting purposes) maxLength = 4 # Leadin bytes for multibyte instructions leadInBytes = [0xcb, 0xdd, 0xed, 0xfd] # Addressing mode table # List of addressing modes and corresponding format strings for operands. addressModeTable = { "implied" : "", "0" : "0", "0,a" : "0,a", "0,b" : "0,b", "0,c" : "0,c", "0,d" : "0,d", "0,e" : "0,e", "0,h" : "0,h", "0,indhl" : "0,(hl)", "0,l" : "0,l", "00" : "$00", "08" : "$08", "1" : "1", "1,a" : "1,a", "1,b" : "1,b", "1,c" : "1,c", "1,d" : "1,d", "1,e" : "1,e", "1,h" : "1,h", "1,indhl" : "1,(hl)", "1,l" : "1,l", "10" : "$10", "18" : "$18", "2" : "2", "2,a" : "2,a", "2,b" : "2,b", "2,c" : "2,c", "2,d" : "2,d", "2,e" : "2,e", "2,h" : "2,h", "2,indhl" : "2,(hl)", "2,l" : "2,l", "20" : "$20", "28" : "$28", "3,a" : "3,a", "3,b" : "3,b", "3,c" : "3,c", "3,d" : "3,d", "3,e" : "3,e", "3,h" : "3,h", "3,indhl" : "3,(hl)", "3,l" : "3,l", "30" : "$30", "38" : "$38", "4,a" : "4,a", "4,b" : "4,b", "4,c" : "4,c", "4,d" : "4,d", "4,e" : "4,e", "4,h" : "4,h", "4,indhl" : "4,(hl)", "4,l" : "4,l", "5,a" : "5,a", "5,b" : "5,b", "5,c" : "5,c", "5,d" : "5,d", "5,e" : "5,e", "5,h" : "5,h", "5,indhl" : "5,(hl)", "5,l" : "5,l", "6,a" : "6,a", "6,b" : "6,b", "6,c" : "6,c", "6,d" : "6,d", "6,e" : "6,e", "6,h" : "6,h", "6,indhl" : "6,(hl)", "6,l" : "6,l", "7,a" : "7,a", "7,b" : "7,b", "7,c" : "7,c", "7,d" : "7,d", "7,e" : "7,e", "7,h" : "7,h", "7,indhl" : "7,(hl)", "7,l" : "7,l", "a" : "a", "a,a" : "a,a", "a,b" : "a,b", "a,c" : "a,c", "a,d" : "a,d", "a,e" : "a,e", "a,h" : "a,h", "a,i" : "a,i", "a,indbc" : "a,(bc)", "a,indc" : "a,(c)", "a,indde" : "a,(de)", "a,indhl" : "a,(hl)", "a,indix+d" : "a,(ix+${0:02X})", "a,indiy+d" : "a,(iy+${0:02X})", "a,indn" : "a,(${0:02X})", "a,indnn" : "a,(${1:02X}{0:02X})", "a,l" : "a,l", "a,n" : "a,${0:02X}", "a,r" : "a,r", "af" : "af", "af,af'" : "af,af'", "b" : "b", "b,a" : "b,a", "b,b" : "b,b", "b,c" : "b,c", "b,d" : "b,d", "b,e" : "b,e", "b,h" : "b,h", "b,indc" : "b,(c)", "b,indhl" : "b,(hl)", "b,indix+d" : "b,(ix+${0:02X})", "b,indiy+d" : "b,(iy+${0:02X})", "b,l" : "b,l", "b,n" : "b,${0:02X}", "bc" : "bc", "bc,indaa" : "bc,(${1:02X}{0:02X})", "bc,nn" : "bc,${1:02X}{0:02X}", "c" : "c", "c,a" : "c,a", "c,b" : "c,b", "c,c" : "c,c", "c,d" : "c,d", "c,e" : "c,e", "c,h" : "c,h", "c,indc" : "c,(c)", "c,indhl" : "c,(hl)", "c,indix+d" : "c,(ix+${0:02X})", "c,indiy+d" : "c,(iy+${0:02X})", "c,l" : "c,l", "c,n" : "c,${0:02X}", "c,pcr" : "c,${0:04X}", "c,nn" : "c,${1:02X}{0:02X}", "d" : "d", "d,a" : "d,a", "d,b" : "d,b", "d,c" : "d,c", "d,d" : "d,d", "d,e" : "d,e", "d,h" : "d,h", "d,indc" : "d,(c)", "d,indhl" : "d,(hl)", "d,indix+d" : "d,(ix+${0:02X})", "d,indiy+d" : "d,(iy+${0:02X})", "d,l" : "d,l", "d,n" : "d,${0:02X}", "de" : "de", "de,hl" : "de,hl", "de,indaa" : "de,(${1:02X}{0:02X})", "de,nn" : "de,${1:02X}{0:02X}", "e" : "e", "e,a" : "e,a", "e,b" : "e,b", "e,c" : "e,c", "e,d" : "e,d", "e,e" : "e,e", "e,h" : "e,h", "e,indc" : "e,(c)", "e,indhl" : "e,(hl)", "e,indix+d" : "e,(ix+${0:02X})", "e,indiy+d" : "e,(iy+${0:02X})", "e,l" : "e,l", "e,n" : "e,${0:02X}", "h" : "h", "h,a" : "h,a", "h,b" : "h,b", "h,c" : "h,c", "h,d" : "h,d", "h,e" : "h,e", "h,h" : "h,h", "h,indc" : "h,(c)", "h,indhl" : "h,(hl)", "h,indix+d" : "h,(ix+${0:02X})", "h,indiy+d" : "h,(iy+${0:02X})", "h,l" : "h,l", "h,n" : "h,${0:02X}", "hl" : "hl", "hl,bc" : "hl,bc", "hl,de" : "hl,de", "hl,hl" : "hl,hl", "hl,indnn" : "hl,(${1:02X}{0:02X})", "hl,nn" : "hl,${1:02X}{0:02X}", "hl,sp" : "hl,sp", "i,a" : "i,a", "indaa,bc" : "(${1:02X}{0:02X}),bc", "indaa,de" : "(${1:02X}{0:02X}),de", "indaa,ix" : "(${1:02X}{0:02X}),ix", "indaa,iy" : "(${1:02X}{0:02X}),iy", "indaa,sp" : "(${1:02X}{0:02X}),sp", "indbc,a" : "(bc),a", "indc,a" : "(c),a", "indc,b" : "(c),b", "indc,c" : "(c),c", "indc,d" : "(c),d", "indc,e" : "(c),e", "indc,h" : "(c),h", "indc,l" : "(c),l", "indde,a" : "(de),a", "indhl" : "(hl)", "indhl,a" : "(hl),a", "indhl,b" : "(hl),b", "indhl,c" : "(hl),c", "indhl,d" : "(hl),d", "indhl,e" : "(hl),e", "indhl,h" : "(hl),h", "indhl,l" : "(hl),l", "indhl,n" : "(hl),${0:02X}", "indix+d" : "(ix+${0:02X})", "indix+d,a" : "(ix+${0:02X}),a", "indiy+d,a" : "(iy+${0:02X}),a", "indix+d,b" : "(ix+${0:02X}),b", "indix+d,c" : "(ix+${0:02X}),c", "indix+d,d" : "(ix+${0:02X}),d", "indix+d,e" : "(ix+${0:02X}),e", "indix+d,h" : "(ix+${0:02X}),h", "indix+d,l" : "(ix+${0:02X}),l", "indix+d,n" : "(ix+${0:02X}),${1:02X}", "indiy+d" : "(iy+${0:02X})", "indiy+d,b" : "(iy+${0:02X}),b", "indiy+d,c" : "(iy+${0:02X}),c", "indiy+d,d" : "(iy+${0:02X}),d", "indiy+d,e" : "(iy+${0:02X}),e", "indiy+d,h" : "(iy+${0:02X}),h", "indiy+d,l" : "(iy+${0:02X}),l", "indiy+d,n" : "(iy+${0:02X}),${1:02X}", "indn,a" : "(${0:02X}),a", "indnn,a" : "(${1:02X}{0:02X}),a", "indnn,hl" : "(${1:02X}{0:02X}),hl", "indsp,hl" : "(sp),hl", "ix" : "ix", "ix,aa" : "ix,${1:02X}{0:02X}", "ix,bc" : "ix,bc", "ix,de" : "ix,de", "ix,indaa" : "ix,(${1:02X}{0:02X})", "ix,ix" : "ix,ix", "ix,sp" : "ix,sp", "iy" : "iy", "iy,aa" : "iy,${1:02X}{0:02X}", "iy,bc" : "iy,bc", "iy,bc" : "iy,bc", "iy,de" : "iy,de", "iy,indaa" : "iy,(${1:02X}{0:02X})", "iy,indaa" : "iy,(${1:02X}{0:02X})", "iy,iy" : "iy,iy", "iy,sp" : "iy,sp", "l" : "l", "l,a" : "l,a", "l,b" : "l,b", "l,c" : "l,c", "l,d" : "l,d", "l,e" : "l,e", "l,h" : "l,h", "l,indc" : "l,(c)", "l,indhl" : "l,(hl)", "l,indix+d" : "l,(ix+${0:02X})", "l,indiy+d" : "l,(iy+${0:02X})", "l,l" : "l,l", "l,n" : "l,${0:02X}", "m" : "m", "m,nn" : "m,${1:02X}{0:02X}", "n" : "${0:02X}", "n,pcr" : "${0:04X}", "n,indix+d" : "n,(ix+${0:02X})", "n,indiy+d" : "n,(iy+${0:02X})", "nc" : "nc", "nc,pcr" : "nc,${0:04X}", "nc,nn" : "nc,${1:02X}{0:02X}", "nn" : "${1:02X}{0:02X}", "nz" : "nz", "nz,pcr" : "nz,${0:04X}", "nz,nn" : "nz,${1:02X}{0:02X}", "p" : "p", "p,nn" : "p,${1:02X}{0:02X}", "pcr" : "${0:04X}", "pe" : "pe", "pe,nn" : "pe,${1:02X}{0:02X}", "po" : "po", "po,nn" : "po,${1:02X}{0:02X}", "r,a" : "r,a", "sp" : "sp", "sp,hl" : "sp,hl", "sp,indaa" : "sp,(${1:02X}{0:02X})", "sp,nn" : "sp,${1:02X}{0:02X}", "z" : "z", "z,pcr" : "z,${0:04X}", "z,nn" : "z,${1:02X}{0:02X}", } # Op Code Table # Key is numeric opcode (possibly multiple bytes) # Value is a list: # # bytes # mnemonic # addressing mode # flags (e.g. pcr) opcodeTable = { 0x00 : [ 1, "nop", "implied" ], 0x01 : [ 3, "ld", "bc,nn" ], 0x02 : [ 1, "ld", "indbc,a" ], 0x03 : [ 1, "inc", "bc" ], 0x04 : [ 1, "inc", "b" ], 0x05 : [ 1, "dec", "b" ], 0x06 : [ 2, "ld", "b,n" ], 0x07 : [ 1, "rlca", "implied" ], 0x08 : [ 1, "ex", "af,af'" ], 0x09 : [ 1, "add", "hl,bc" ], 0x0a : [ 1, "ld", "a,indbc" ], 0x0b : [ 1, "dec", "bc" ], 0x0c : [ 1, "inc", "c" ], 0x0d : [ 1, "dec", "c" ], 0x0e : [ 2, "ld", "c,n" ], 0x0f : [ 1, "rrca", "implied" ], 0x10 : [ 2, "djnz", "pcr", pcr ], 0x11 : [ 3, "ld", "de,nn" ], 0x12 : [ 1, "ld", "indde,a" ], 0x13 : [ 1, "inc", "de" ], 0x14 : [ 1, "inc", "d" ], 0x15 : [ 1, "dec", "d" ], 0x16 : [ 2, "ld", "d,n" ], 0x17 : [ 1, "rla", "implied" ], 0x18 : [ 2, "jr", "pcr", pcr ], 0x19 : [ 1, "add", "hl,de" ], 0x1a : [ 1, "ld", "a,indde" ], 0x1b : [ 1, "dec", "de" ], 0x1c : [ 1, "inc", "e" ], 0x1d : [ 1, "dec", "e" ], 0x1e : [ 2, "ld", "e,n" ], 0x1f : [ 1, "rra", "implied" ], 0x20 : [ 2, "jr", "nz,pcr", pcr ], 0x21 : [ 3, "ld", "hl,nn" ], 0x22 : [ 3, "ld", "indnn,hl" ], 0x23 : [ 1, "inc", "hl" ], 0x24 : [ 1, "inc", "h" ], 0x25 : [ 1, "dec", "h" ], 0x26 : [ 2, "ld", "h,n" ], 0x27 : [ 1, "daa", "implied" ], 0x28 : [ 2, "jr", "z,pcr", pcr ], 0x29 : [ 1, "add", "hl,hl" ], 0x2a : [ 3, "ld", "hl,indnn" ], 0x2b : [ 1, "dec", "hl" ], 0x2c : [ 1, "inc", "l" ], 0x2d : [ 1, "dec", "l" ], 0x2e : [ 2, "ld", "l,n" ], 0x2f : [ 1, "cpl", "implied" ], 0x30 : [ 2, "jr", "nc,pcr", pcr ], 0x31 : [ 3, "ld", "sp,nn" ], 0x32 : [ 3, "ld", "indnn,a" ], 0x33 : [ 1, "inc", "sp" ], 0x34 : [ 1, "inc", "indhl" ], 0x35 : [ 1, "dec", "indhl" ], 0x36 : [ 2, "ld", "indhl,n" ], 0x37 : [ 1, "scf", "implied" ], 0x38 : [ 2, "jr", "c,pcr", pcr ], 0x39 : [ 1, "add", "hl,sp" ], 0x3a : [ 3, "ld", "a,indnn" ], 0x3b : [ 1, "dec", "sp" ], 0x3c : [ 1, "inc", "a" ], 0x3d : [ 1, "dec", "a" ], 0x3e : [ 2, "ld", "a,n" ], 0x3f : [ 1, "ccf", "implied" ], 0x40 : [ 1, "ld", "b,b" ], 0x41 : [ 1, "ld", "b,c" ], 0x42 : [ 1, "ld", "b,d" ], 0x43 : [ 1, "ld", "b,e" ], 0x44 : [ 1, "ld", "b,h" ], 0x45 : [ 1, "ld", "b,l" ], 0x46 : [ 1, "ld", "b,indhl" ], 0x47 : [ 1, "ld", "b,a" ], 0x48 : [ 1, "ld", "c,b" ], 0x49 : [ 1, "ld", "c,c" ], 0x4a : [ 1, "ld", "c,d" ], 0x4b : [ 1, "ld", "c,e" ], 0x4c : [ 1, "ld", "c,h" ], 0x4d : [ 1, "ld", "c,l" ], 0x4e : [ 1, "ld", "c,indhl" ], 0x4f : [ 1, "ld", "c,a" ], 0x50 : [ 1, "ld", "d,b" ], 0x51 : [ 1, "ld", "d,c" ], 0x52 : [ 1, "ld", "d,d" ], 0x53 : [ 1, "ld", "d,e" ], 0x54 : [ 1, "ld", "d,h" ], 0x55 : [ 1, "ld", "d,l" ], 0x56 : [ 1, "ld", "d,indhl" ], 0x57 : [ 1, "ld", "d,a" ], 0x58 : [ 1, "ld", "e,b" ], 0x59 : [ 1, "ld", "e,c" ], 0x5a : [ 1, "ld", "e,d" ], 0x5b : [ 1, "ld", "e,e" ], 0x5c : [ 1, "ld", "e,h" ], 0x5d : [ 1, "ld", "e,l" ], 0x5e : [ 1, "ld", "e,indhl" ], 0x5f : [ 1, "ld", "e,a" ], 0x60 : [ 1, "ld", "h,b" ], 0x61 : [ 1, "ld", "h,c" ], 0x62 : [ 1, "ld", "h,d" ], 0x63 : [ 1, "ld", "h,e" ], 0x64 : [ 1, "ld", "h,h" ], 0x65 : [ 1, "ld", "h,l" ], 0x66 : [ 1, "ld", "h,indhl" ], 0x67 : [ 1, "ld", "h,a" ], 0x68 : [ 1, "ld", "l,b" ], 0x69 : [ 1, "ld", "l,c" ], 0x6a : [ 1, "ld", "l,d" ], 0x6b : [ 1, "ld", "l,e" ], 0x6c : [ 1, "ld", "l,h" ], 0x6d : [ 1, "ld", "l,l" ], 0x6e : [ 1, "ld", "l,indhl" ], 0x6f : [ 1, "ld", "l,a" ], 0x70 : [ 1, "ld", "indhl,b" ], 0x71 : [ 1, "ld", "indhl,c" ], 0x72 : [ 1, "ld", "indhl,d" ], 0x73 : [ 1, "ld", "indhl,e" ], 0x74 : [ 1, "ld", "indhl,h" ], 0x75 : [ 1, "ld", "indhl,l" ], 0x76 : [ 1, "halt", "implied" ], 0x77 : [ 1, "ld", "indhl,a" ], 0x78 : [ 1, "ld", "a,b" ], 0x79 : [ 1, "ld", "a,c" ], 0x7a : [ 1, "ld", "a,d" ], 0x7b : [ 1, "ld", "a,e" ], 0x7c : [ 1, "ld", "a,h" ], 0x7d : [ 1, "ld", "a,l" ], 0x7e : [ 1, "ld", "a,indhl" ], 0x7f : [ 1, "ld", "a,a" ], 0x80 : [ 1, "add", "a,b" ], 0x81 : [ 1, "add", "a,c" ], 0x82 : [ 1, "add", "a,d" ], 0x83 : [ 1, "add", "a,e" ], 0x84 : [ 1, "add", "a,h" ], 0x85 : [ 1, "add", "a,l" ], 0x86 : [ 1, "add", "a,indhl" ], 0x87 : [ 1, "add", "a,a" ], 0x88 : [ 1, "adc", "a,b" ], 0x89 : [ 1, "adc", "a,c" ], 0x8a : [ 1, "adc", "a,d" ], 0x8b : [ 1, "adc", "a,e" ], 0x8c : [ 1, "adc", "a,h" ], 0x8d : [ 1, "adc", "a,l" ], 0x8e : [ 1, "adc", "a,indhl" ], 0x8f : [ 1, "adc", "a,a" ], 0x90 : [ 1, "sub", "b" ], 0x91 : [ 1, "sub", "c" ], 0x92 : [ 1, "sub", "d" ], 0x93 : [ 1, "sub", "e" ], 0x94 : [ 1, "sub", "h" ], 0x95 : [ 1, "sub", "l" ], 0x96 : [ 1, "sub", "indhl" ], 0x97 : [ 1, "sub", "a" ], 0x98 : [ 1, "sbc", "a,b" ], 0x99 : [ 1, "sbc", "a,c" ], 0x9a : [ 1, "sbc", "a,d" ], 0x9b : [ 1, "sbc", "a,e" ], 0x9c : [ 1, "sbc", "a,h" ], 0x9d : [ 1, "sbc", "a,l" ], 0x9e : [ 1, "sbc", "a,indhl" ], 0x9f : [ 1, "sbc", "a,a" ], 0xa0 : [ 1, "and", "b" ], 0xa1 : [ 1, "and", "c" ], 0xa2 : [ 1, "and", "d" ], 0xa3 : [ 1, "and", "e" ], 0xa4 : [ 1, "and", "h" ], 0xa5 : [ 1, "and", "l" ], 0xa6 : [ 1, "and", "indhl" ], 0xa7 : [ 1, "and", "a" ], 0xa8 : [ 1, "xor", "b" ], 0xa9 : [ 1, "xor", "c" ], 0xaa : [ 1, "xor", "d" ], 0xab : [ 1, "xor", "e" ], 0xac : [ 1, "xor", "h" ], 0xad : [ 1, "xor", "l" ], 0xae : [ 1, "xor", "indhl" ], 0xaf : [ 1, "xor", "a" ], 0xb0 : [ 1, "or", "b" ], 0xb1 : [ 1, "or", "c" ], 0xb2 : [ 1, "or", "d" ], 0xb3 : [ 1, "or", "e" ], 0xb4 : [ 1, "or", "h" ], 0xb5 : [ 1, "or", "l" ], 0xb6 : [ 1, "or", "indhl" ], 0xb7 : [ 1, "or", "a" ], 0xb8 : [ 1, "cp", "b" ], 0xb9 : [ 1, "cp", "c" ], 0xba : [ 1, "cp", "d" ], 0xbb : [ 1, "cp", "e" ], 0xbc : [ 1, "cp", "h" ], 0xbd : [ 1, "cp", "l" ], 0xbe : [ 1, "cp", "indhl" ], 0xbf : [ 1, "cp", "a" ], 0xc0 : [ 1, "ret", "nz" ], 0xc1 : [ 1, "pop", "bc" ], 0xc2 : [ 3, "jp", "nz,nn" ], 0xc3 : [ 3, "jp", "nn" ], 0xc4 : [ 3, "call","nz,nn" ], 0xc5 : [ 1, "push","bc" ], 0xc6 : [ 2, "add", "a,n" ], 0xc7 : [ 1, "rst", "00" ], 0xc8 : [ 1, "ret", "z" ], 0xc9 : [ 1, "ret", "implied" ], 0xca : [ 3, "jp", "z,nn" ], 0xcc : [ 3, "call","z,nn" ], 0xcd : [ 3, "call", "nn" ], 0xce : [ 2, "adc", "a,n" ], 0xcf : [ 1, "rst", "08" ], 0xd0 : [ 1, "ret", "nc" ], 0xd1 : [ 1, "pop", "de" ], 0xd2 : [ 3, "jp", "nc,nn" ], 0xd3 : [ 2, "out", "indn,a" ], 0xd4 : [ 3, "call", "nc,nn" ], 0xd5 : [ 1, "push", "de" ], 0xd6 : [ 2, "sub", "n" ], 0xd7 : [ 1, "rst", "10" ], 0xd8 : [ 1, "ret", "c" ], 0xd9 : [ 1, "exx", "implied" ], 0xda : [ 3, "jp", "c,nn" ], 0xdb : [ 2, "in", "a,indn" ], 0xdc : [ 3, "call", "c,nn" ], 0xde : [ 2, "sbc", "a,n" ], 0xdf : [ 1, "rst", "18" ], 0xe0 : [ 1, "ret", "po" ], 0xe1 : [ 1, "pop", "hl" ], 0xe2 : [ 3, "jp", "po,nn" ], 0xe3 : [ 1, "ex", "indsp,hl" ], 0xe4 : [ 3, "call", "po,nn" ], 0xe5 : [ 1, "push", "hl" ], 0xe6 : [ 2, "and", "n" ], 0xe7 : [ 1, "rst", "20" ], 0xe8 : [ 1, "ret", "pe" ], 0xe9 : [ 1, "jp", "indhl" ], 0xea : [ 3, "jp", "pe,nn" ], 0xeb : [ 1, "ex", "de,hl" ], 0xec : [ 3, "call", "pe,nn" ], 0xee : [ 2, "xor", "n" ], 0xef : [ 1, "rst", "28" ], 0xf0 : [ 1, "ret", "p" ], 0xf1 : [ 1, "pop", "af" ], 0xf2 : [ 3, "jp", "p,nn" ], 0xf3 : [ 1, "di", "implied" ], 0xf4 : [ 3, "call", "p,nn" ], 0xf5 : [ 1, "push", "af" ], 0xf6 : [ 2, "or", "n" ], 0xf7 : [ 1, "rst", "30" ], 0xf8 : [ 1, "ret", "m" ], 0xf9 : [ 1, "ld", "sp,hl" ], 0xfa : [ 3, "jp", "m,nn" ], 0xfb : [ 1, "ei", "implied" ], 0xfc : [ 3, "call", "m,nn" ], 0xfe : [ 2, "cp", "n" ], 0xff : [ 1, "rst", "38" ], # Multibyte instructions 0xcb00 : [ 2, "rlc", "b" ], 0xcb01 : [ 2, "rlc", "c" ], 0xcb02 : [ 2, "rlc", "d" ], 0xcb03 : [ 2, "rlc", "e" ], 0xcb04 : [ 2, "rlc", "h" ], 0xcb05 : [ 2, "rlc", "l" ], 0xcb06 : [ 2, "rlc", "indhl" ], 0xcb07 : [ 2, "rlc", "a" ], 0xcb08 : [ 2, "rrc", "b" ], 0xcb09 : [ 2, "rrc", "c" ], 0xcb0a : [ 2, "rrc", "d" ], 0xcb0b : [ 2, "rrc", "e" ], 0xcb0c : [ 2, "rrc", "h" ], 0xcb0d : [ 2, "rrc", "l" ], 0xcb0e : [ 2, "rrc", "indhl" ], 0xcb0f : [ 2, "rrc", "a" ], 0xcb10 : [ 2, "rl", "b" ], 0xcb11 : [ 2, "rl", "c" ], 0xcb12 : [ 2, "rl", "d" ], 0xcb13 : [ 2, "rl", "e" ], 0xcb14 : [ 2, "rl", "h" ], 0xcb15 : [ 2, "rl", "l" ], 0xcb16 : [ 2, "rl", "indhl" ], 0xcb17 : [ 2, "rl", "a" ], 0xcb18 : [ 2, "rr", "b" ], 0xcb19 : [ 2, "rr", "c" ], 0xcb1a : [ 2, "rr", "d" ], 0xcb1b : [ 2, "rr", "e" ], 0xcb1c : [ 2, "rr", "h" ], 0xcb1d : [ 2, "rr", "l" ], 0xcb1e : [ 2, "rr", "indhl" ], 0xcb1f : [ 2, "rr", "a" ], 0xcb20 : [ 2, "sla", "b" ], 0xcb21 : [ 2, "sla", "c" ], 0xcb22 : [ 2, "sla", "d" ], 0xcb23 : [ 2, "sla", "e" ], 0xcb24 : [ 2, "sla", "h" ], 0xcb25 : [ 2, "sla", "l" ], 0xcb26 : [ 2, "sla", "indhl" ], 0xcb27 : [ 2, "sla", "a" ], 0xcb28 : [ 2, "sra", "b" ], 0xcb29 : [ 2, "sra", "c" ], 0xcb2a : [ 2, "sra", "d" ], 0xcb2b : [ 2, "sra", "e" ], 0xcb2c : [ 2, "sra", "h" ], 0xcb2d : [ 2, "sra", "l" ], 0xcb2e : [ 2, "sra", "indhl" ], 0xcb2f : [ 2, "sra", "a" ], 0xcb38 : [ 2, "srl", "b" ], 0xcb39 : [ 2, "srl", "c" ], 0xcb3a : [ 2, "srl", "d" ], 0xcb3b : [ 2, "srl", "e" ], 0xcb3c : [ 2, "srl", "h" ], 0xcb3d : [ 2, "srl", "l" ], 0xcb3e : [ 2, "srl", "indhl" ], 0xcb3f : [ 2, "srl", "a" ], 0xcb40 : [ 2, "bit", "0,b" ], 0xcb41 : [ 2, "bit", "0,c" ], 0xcb42 : [ 2, "bit", "0,d" ], 0xcb43 : [ 2, "bit", "0,e" ], 0xcb44 : [ 2, "bit", "0,h" ], 0xcb45 : [ 2, "bit", "0,l" ], 0xcb46 : [ 2, "bit", "0,indhl" ], 0xcb47 : [ 2, "bit", "0,a" ], 0xcb48 : [ 2, "bit", "1,b" ], 0xcb49 : [ 2, "bit", "1,c" ], 0xcb4a : [ 2, "bit", "1,d" ], 0xcb4b : [ 2, "bit", "1,e" ], 0xcb4c : [ 2, "bit", "1,h" ], 0xcb4d : [ 2, "bit", "1,l" ], 0xcb4e : [ 2, "bit", "1,indhl" ], 0xcb4f : [ 2, "bit", "1,a" ], 0xcb50 : [ 2, "bit", "2,b" ], 0xcb51 : [ 2, "bit", "2,c" ], 0xcb52 : [ 2, "bit", "2,d" ], 0xcb53 : [ 2, "bit", "2,e" ], 0xcb54 : [ 2, "bit", "2,h" ], 0xcb55 : [ 2, "bit", "2,l" ], 0xcb56 : [ 2, "bit", "2,indhl" ], 0xcb57 : [ 2, "bit", "2,a" ], 0xcb58 : [ 2, "bit", "3,b" ], 0xcb59 : [ 2, "bit", "3,c" ], 0xcb5a : [ 2, "bit", "3,d" ], 0xcb5b : [ 2, "bit", "3,e" ], 0xcb5c : [ 2, "bit", "3,h" ], 0xcb5d : [ 2, "bit", "3,l" ], 0xcb5e : [ 2, "bit", "3,indhl" ], 0xcb5f : [ 2, "bit", "3,a" ], 0xcb60 : [ 2, "bit", "4,b" ], 0xcb61 : [ 2, "bit", "4,c" ], 0xcb62 : [ 2, "bit", "4,d" ], 0xcb63 : [ 2, "bit", "4,e" ], 0xcb64 : [ 2, "bit", "4,h" ], 0xcb65 : [ 2, "bit", "4,l" ], 0xcb66 : [ 2, "bit", "4,indhl" ], 0xcb67 : [ 2, "bit", "4,a" ], 0xcb68 : [ 2, "bit", "5,b" ], 0xcb69 : [ 2, "bit", "5,c" ], 0xcb6a : [ 2, "bit", "5,d" ], 0xcb6b : [ 2, "bit", "5,e" ], 0xcb6c : [ 2, "bit", "5,h" ], 0xcb6d : [ 2, "bit", "5,l" ], 0xcb6e : [ 2, "bit", "5,indhl" ], 0xcb6f : [ 2, "bit", "5,a" ], 0xcb70 : [ 2, "bit", "6,b" ], 0xcb71 : [ 2, "bit", "6,c" ], 0xcb72 : [ 2, "bit", "6,d" ], 0xcb73 : [ 2, "bit", "6,e" ], 0xcb74 : [ 2, "bit", "6,h" ], 0xcb75 : [ 2, "bit", "6,l" ], 0xcb76 : [ 2, "bit", "6,indhl" ], 0xcb77 : [ 2, "bit", "6,a" ], 0xcb78 : [ 2, "bit", "7,b" ], 0xcb79 : [ 2, "bit", "7,c" ], 0xcb7a : [ 2, "bit", "7,d" ], 0xcb7b : [ 2, "bit", "7,e" ], 0xcb7c : [ 2, "bit", "7,h" ], 0xcb7d : [ 2, "bit", "7,l" ], 0xcb7e : [ 2, "bit", "7,indhl" ], 0xcb7f : [ 2, "bit", "7,a" ], 0xcb80 : [ 2, "res", "0,b" ], 0xcb81 : [ 2, "res", "0,c" ], 0xcb82 : [ 2, "res", "0,d" ], 0xcb83 : [ 2, "res", "0,e" ], 0xcb84 : [ 2, "res", "0,h" ], 0xcb85 : [ 2, "res", "0,l" ], 0xcb86 : [ 2, "res", "0,indhl" ], 0xcb87 : [ 2, "res", "0,a" ], 0xcb88 : [ 2, "res", "1,b" ], 0xcb89 : [ 2, "res", "1,c" ], 0xcb8a : [ 2, "res", "1,d" ], 0xcb8b : [ 2, "res", "1,e" ], 0xcb8c : [ 2, "res", "1,h" ], 0xcb8d : [ 2, "res", "1,l" ], 0xcb8e : [ 2, "res", "1,indhl" ], 0xcb8f : [ 2, "res", "1,a" ], 0xcb90 : [ 2, "res", "2,b" ], 0xcb91 : [ 2, "res", "2,c" ], 0xcb92 : [ 2, "res", "2,d" ], 0xcb93 : [ 2, "res", "2,e" ], 0xcb94 : [ 2, "res", "2,h" ], 0xcb95 : [ 2, "res", "2,l" ], 0xcb96 : [ 2, "res", "2,indhl" ], 0xcb97 : [ 2, "res", "2,a" ], 0xcb98 : [ 2, "res", "3,b" ], 0xcb99 : [ 2, "res", "3,c" ], 0xcb9a : [ 2, "res", "3,d" ], 0xcb9b : [ 2, "res", "3,e" ], 0xcb9c : [ 2, "res", "3,h" ], 0xcb9d : [ 2, "res", "3,l" ], 0xcb9e : [ 2, "res", "3,indhl" ], 0xcb9f : [ 2, "res", "3,a" ], 0xcba0 : [ 2, "res", "4,b" ], 0xcba1 : [ 2, "res", "4,c" ], 0xcba2 : [ 2, "res", "4,d" ], 0xcba3 : [ 2, "res", "4,e" ], 0xcba4 : [ 2, "res", "4,h" ], 0xcba5 : [ 2, "res", "4,l" ], 0xcba6 : [ 2, "res", "4,indhl" ], 0xcba7 : [ 2, "res", "4,a" ], 0xcba8 : [ 2, "res", "5,b" ], 0xcba9 : [ 2, "res", "5,c" ], 0xcbaa : [ 2, "res", "5,d" ], 0xcbab : [ 2, "res", "5,e" ], 0xcbac : [ 2, "res", "5,h" ], 0xcbad : [ 2, "res", "5,l" ], 0xcbae : [ 2, "res", "5,indhl" ], 0xcbaf : [ 2, "res", "5,a" ], 0xcbb0 : [ 2, "res", "6,b" ], 0xcbb1 : [ 2, "res", "6,c" ], 0xcbb2 : [ 2, "res", "6,d" ], 0xcbb3 : [ 2, "res", "6,e" ], 0xcbb4 : [ 2, "res", "6,h" ], 0xcbb5 : [ 2, "res", "6,l" ], 0xcbb6 : [ 2, "res", "6,indhl" ], 0xcbb7 : [ 2, "res", "6,a" ], 0xcbb8 : [ 2, "res", "7,b" ], 0xcbb9 : [ 2, "res", "7,c" ], 0xcbba : [ 2, "res", "7,d" ], 0xcbbb : [ 2, "res", "7,e" ], 0xcbbc : [ 2, "res", "7,h" ], 0xcbbd : [ 2, "res", "7,l" ], 0xcbbe : [ 2, "res", "7,indhl" ], 0xcbbf : [ 2, "res", "7,a" ], 0xcbc0 : [ 2, "set", "0,b" ], 0xcbc1 : [ 2, "set", "0,c" ], 0xcbc2 : [ 2, "set", "0,d" ], 0xcbc3 : [ 2, "set", "0,e" ], 0xcbc4 : [ 2, "set", "0,h" ], 0xcbc5 : [ 2, "set", "0,l" ], 0xcbc6 : [ 2, "set", "0,indhl" ], 0xcbc7 : [ 2, "set", "0,a" ], 0xcbc8 : [ 2, "set", "1,b" ], 0xcbc9 : [ 2, "set", "1,c" ], 0xcbca : [ 2, "set", "1,d" ], 0xcbcb : [ 2, "set", "1,e" ], 0xcbcc : [ 2, "set", "1,h" ], 0xcbcd : [ 2, "set", "1,l" ], 0xcbce : [ 2, "set", "1,indhl" ], 0xcbcf : [ 2, "set", "1,a" ], 0xcbd0 : [ 2, "set", "2,b" ], 0xcbd1 : [ 2, "set", "2,c" ], 0xcbd2 : [ 2, "set", "2,d" ], 0xcbd3 : [ 2, "set", "2,e" ], 0xcbd4 : [ 2, "set", "2,h" ], 0xcbd5 : [ 2, "set", "2,l" ], 0xcbd6 : [ 2, "set", "2,indhl" ], 0xcbd7 : [ 2, "set", "2,a" ], 0xcbd8 : [ 2, "set", "3,b" ], 0xcbd9 : [ 2, "set", "3,c" ], 0xcbda : [ 2, "set", "3,d" ], 0xcbdb : [ 2, "set", "3,e" ], 0xcbdc : [ 2, "set", "3,h" ], 0xcbdd : [ 2, "set", "3,l" ], 0xcbde : [ 2, "set", "3,indhl" ], 0xcbdf : [ 2, "set", "3,a" ], 0xcbe0 : [ 2, "set", "4,b" ], 0xcbe1 : [ 2, "set", "4,c" ], 0xcbe2 : [ 2, "set", "4,d" ], 0xcbe3 : [ 2, "set", "4,e" ], 0xcbe4 : [ 2, "set", "4,h" ], 0xcbe5 : [ 2, "set", "4,l" ], 0xcbe6 : [ 2, "set", "4,indhl" ], 0xcbe7 : [ 2, "set", "4,a" ], 0xcbe8 : [ 2, "set", "5,b" ], 0xcbe9 : [ 2, "set", "5,c" ], 0xcbea : [ 2, "set", "5,d" ], 0xcbeb : [ 2, "set", "5,e" ], 0xcbec : [ 2, "set", "5,h" ], 0xcbed : [ 2, "set", "5,l" ], 0xcbee : [ 2, "set", "5,indhl" ], 0xcbef : [ 2, "set", "5,a" ], 0xcbf0 : [ 2, "set", "6,b" ], 0xcbf1 : [ 2, "set", "6,c" ], 0xcbf2 : [ 2, "set", "6,d" ], 0xcbf3 : [ 2, "set", "6,e" ], 0xcbf4 : [ 2, "set", "6,h" ], 0xcbf5 : [ 2, "set", "6,l" ], 0xcbf6 : [ 2, "set", "6,indhl" ], 0xcbf7 : [ 2, "set", "6,a" ], 0xcbf8 : [ 2, "set", "7,b" ], 0xcbf9 : [ 2, "set", "7,c" ], 0xcbfa : [ 2, "set", "7,d" ], 0xcbfb : [ 2, "set", "7,e" ], 0xcbfc : [ 2, "set", "7,h" ], 0xcbfd : [ 2, "set", "7,l" ], 0xcbfe : [ 2, "set", "7,indhl" ], 0xcbff : [ 2, "set", "7,a" ], 0xdd09 : [ 2, "add", "ix,bc" ], 0xdd19 : [ 2, "add", "ix,de" ], 0xdd21 : [ 4, "ld", "ix,aa" ], 0xdd22 : [ 4, "ld", "indaa,ix" ], 0xdd23 : [ 2, "inc", "ix" ], 0xdd29 : [ 2, "add", "ix,ix" ], 0xdd2a : [ 4, "ld", "ix,indaa" ], 0xdd2b : [ 2, "dec", "ix" ], 0xdd34 : [ 3, "inc", "indix+d" ], 0xdd35 : [ 3, "dec", "indix+d" ], 0xdd36 : [ 4, "ld", "indix+d,n" ], 0xdd39 : [ 2, "add", "ix,sp" ], 0xdd46 : [ 3, "ld", "b,indix+d" ], 0xdd4e : [ 3, "ld", "c,indix+d" ], 0xdd56 : [ 3, "ld", "d,indix+d" ], 0xdd5e : [ 3, "ld", "e,indix+d" ], 0xdd66 : [ 3, "ld", "h,indix+d" ], 0xdd6e : [ 3, "ld", "l,indix+d" ], 0xdd70 : [ 3, "ld", "indix+d,b" ], 0xdd71 : [ 3, "ld", "indix+d,c" ], 0xdd72 : [ 3, "ld", "indix+d,d" ], 0xdd73 : [ 3, "ld", "indix+d,e" ], 0xdd74 : [ 3, "ld", "indix+d,h" ], 0xdd75 : [ 3, "ld", "indix+d,l" ], 0xdd77 : [ 3, "ld", "indix+d,a" ], 0xdd7e : [ 3, "ld", "a,indix+d" ], 0xdd86 : [ 3, "add", "a,indix+d" ], 0xdd8e : [ 3, "adc", "a,indix+d" ], 0xdd96 : [ 3, "sub", "indix+d" ], 0xdd9e : [ 3, "sbc", "a,indix+d" ], 0xdda6 : [ 3, "and", "indix+d" ], 0xddae : [ 3, "xor", "indix+d" ], 0xddb6 : [ 3, "or", "indix+d" ], 0xddbe : [ 3, "cp", "indix+d" ], 0xdd8e : [3, "adc", "indix+d" ], 0xed40 : [ 2, "in", "b,indc" ], 0xed41 : [ 2, "out", "indc,b" ], 0xed42 : [ 2, "sbc", "hl,bc" ], 0xed43 : [ 4, "ld", "indaa,bc" ], 0xed44 : [ 2, "neg", "implied" ], 0xed45 : [ 2, "retn", "implied" ], 0xed46 : [ 2, "im", "0" ], 0xed47 : [ 2, "ld", "i,a" ], 0xed48 : [ 2, "in", "c,indc" ], 0xed49 : [ 2, "out", "indc,c" ], 0xed4a : [ 2, "adc", "hl,bc" ], 0xed4b : [ 4, "ld", "bc,indaa" ], 0xed4d : [ 2, "reti", "implied" ], 0xed4f : [ 2, "ld", "r,a" ], 0xed50 : [ 2, "in", "d,indc" ], 0xed51 : [ 2, "out", "indc,d" ], 0xed52 : [ 2, "sbc", "hl,de" ], 0xed53 : [ 4, "ld", "indaa,de" ], 0xed56 : [ 2, "im", "1" ], 0xed57 : [ 2, "ld", "a,i" ], 0xed58 : [ 2, "in", "e,indc" ], 0xed59 : [ 2, "out", "indc,e" ], 0xed5a : [ 2, "adc", "hl,de" ], 0xed5b : [ 4, "ld", "de,indaa" ], 0xed5e : [ 2, "im", "2" ], 0xed5f : [ 2, "ld", "a,r" ], 0xed60 : [ 2, "in", "h,indc" ], 0xed61 : [ 2, "out", "indc,h" ], 0xed62 : [ 2, "sbc", "hl,hl" ], 0xed67 : [ 2, "rrd", "implied" ], 0xed68 : [ 2, "in", "l,indc" ], 0xed69 : [ 2, "out", "indc,l" ], 0xed6a : [ 2, "adc", "hl,hl" ], 0xed6f : [ 2, "rld", "implied" ], 0xed72 : [ 2, "sbc", "hl,sp" ], 0xed73 : [ 4, "ld", "indaa,sp" ], 0xed76 : [ 2, "in", "a,indc" ], 0xed79 : [ 2, "out", "indc,a" ], 0xed7a : [ 2, "adc", "hl,sp" ], 0xed7b : [ 4, "ld", "sp,indaa" ], 0xeda0 : [ 2, "ldi", "implied" ], 0xeda1 : [ 2, "cpi", "implied" ], 0xeda2 : [ 2, "ini", "implied" ], 0xeda3 : [ 2, "outi", "implied" ], 0xeda8 : [ 2, "ldd", "implied" ], 0xeda9 : [ 2, "cpd", "implied" ], 0xedaa : [ 2, "ind", "implied" ], 0xedab : [ 2, "outd", "implied" ], 0xedb0 : [ 2, "ldir", "implied" ], 0xedb1 : [ 2, "cpir", "implied" ], 0xedb2 : [ 2, "inir", "implied" ], 0xedb3 : [ 2, "otir", "implied" ], 0xedb8 : [ 2, "lddr", "implied" ], 0xedb9 : [ 2, "cpdr", "implied" ], 0xedba : [ 2, "indr", "implied" ], 0xedbb : [ 2, "otdr", "implied" ], 0xfd09 : [ 2, "add", "iy,bc" ], 0xfd19 : [ 2, "add", "iy,de" ], 0xfd21 : [ 4, "ld", "iy,aa" ], 0xfd22 : [ 4, "ld", "indaa,iy" ], 0xfd23 : [ 2, "inc", "iy" ], 0xfd29 : [ 2, "add", "iy,iy" ], 0xfd2a : [ 4, "ld", "iy,indaa" ], 0xfd2b : [ 2, "dec", "iy" ], 0xfd34 : [ 3, "inc", "indiy+d" ], 0xfd35 : [ 3, "dec", "indiy+d" ], 0xfd36 : [ 4, "ld", "indiy+d,n" ], 0xfd39 : [ 2, "add", "iy,sp" ], 0xfd46 : [ 3, "ld", "b,indiy+d" ], 0xfd4e : [ 3, "ld", "c,indiy+d" ], 0xfd56 : [ 3, "ld", "d,indiy+d" ], 0xfd5e : [ 3, "ld", "e,indiy+d" ], 0xfd66 : [ 3, "ld", "h,indiy+d" ], 0xfd6e : [ 3, "ld", "l,indiy+d" ], 0xfd70 : [ 3, "ld", "indiy+d,b" ], 0xfd71 : [ 3, "ld", "indiy+d,c" ], 0xfd72 : [ 3, "ld", "indiy+d,d" ], 0xfd73 : [ 3, "ld", "indiy+d,e" ], 0xfd74 : [ 3, "ld", "indiy+d,h" ], 0xfd75 : [ 3, "ld", "indiy+d,l" ], 0xfd77 : [ 3, "ld", "indiy+d,a" ], 0xfd7e : [ 3, "ld", "a,indiy+d" ], 0xfd86 : [ 3, "add", "a,indiy+d" ], 0xfd8e : [ 3, "adc", "a,indiy+d" ], 0xfd96 : [ 3, "sub", "indiy+d" ], 0xfd9e : [ 3, "sbc", "a,indiy+d" ], 0xfda6 : [ 3, "and", "indiy+d" ], 0xfdae : [ 3, "xor", "indiy+d" ], 0xfdb6 : [ 3, "or", "indiy+d" ], 0xfdbe : [ 3, "cp", "indiy+d" ], # Placeholder 2-byte leadins for the 4-byte ix/iy bit instructions fully # defined below. The z80bit flag triggers a special case in the disassembler # to look up the 4 byte instruction. 0xddcb : [ 4, "ixbit", "implied", z80bit ], 0xfdcb : [ 4, "iybit", "implied", z80bit ], } def extra_opcodes(addr_table, op_table): # Create all the 0xddcb and 0xfdcb addressing modes. The modes look like [0-7],(i[xy]+*)[,[abcdehl]]? for index in ['x', 'y']: for bit in range(8): k = "%d,indi%s+d" % (bit, index) v = "%d,(i%s+${0:02X})" % (bit, index) addr_table[k] = v for reg in ['a', 'b', 'c', 'd', 'e', 'h', 'l']: k = "%d,indi%s+d,%s" % (bit, index, reg) v = "%d,(i%s+${0:02X}),%s" % (bit, index, reg) addr_table[k] = v # Create all the 0xddcb and 0xfdcb opcodes. These are all 4 byte opcodes # where the 3rd byte is a -128 - +127 offset. For the purposes of using # this table, the 3rd byte will be marked as zero and the disassembler will # have to insert the real 3rd byte the check of the z80bit special case for first_byte, x_or_y in [(0xdd, 'x'), (0xfd, 'y')]: # groups of 8, expand to full 256 mnemonics_8 = ['rlc', 'rrc', 'rl', 'rr', 'sla', 'sra', 'sll', 'sr1'] + ['bit'] * 8 + ['res'] * 8 + ['set'] * 8 mnemonics = [m for mnemonic in mnemonics_8 for m in [mnemonic]*8] # create all 256 addressing modes, in groups of 64 addrmodes = ['indi%s+d' + a for a in [',b', ',c', ',d', ',e', ',h', ',l', '', ',a']] * 8 + [f % d for d in range(8) for f in ['%d,indi%%s+d'] * 8] + [f % d for d in range(8) for f in ['%d,indi%%s+d' + a for a in [',b', ',c', ',d', ',e', ',h', ',l', '', ',a']]] * 2 for fourth_byte, (instruction, addrmode) in enumerate(zip(mnemonics, addrmodes)): opcode = (first_byte << 24) + (0xcb << 16) + fourth_byte op_table[opcode] = [ 4, instruction, addrmode % x_or_y, z80bit ] extra_opcodes(addressModeTable, opcodeTable) del extra_opcodes # End of processor specific code ##########################################################################
max_length = 4 lead_in_bytes = [203, 221, 237, 253] address_mode_table = {'implied': '', '0': '0', '0,a': '0,a', '0,b': '0,b', '0,c': '0,c', '0,d': '0,d', '0,e': '0,e', '0,h': '0,h', '0,indhl': '0,(hl)', '0,l': '0,l', '00': '$00', '08': '$08', '1': '1', '1,a': '1,a', '1,b': '1,b', '1,c': '1,c', '1,d': '1,d', '1,e': '1,e', '1,h': '1,h', '1,indhl': '1,(hl)', '1,l': '1,l', '10': '$10', '18': '$18', '2': '2', '2,a': '2,a', '2,b': '2,b', '2,c': '2,c', '2,d': '2,d', '2,e': '2,e', '2,h': '2,h', '2,indhl': '2,(hl)', '2,l': '2,l', '20': '$20', '28': '$28', '3,a': '3,a', '3,b': '3,b', '3,c': '3,c', '3,d': '3,d', '3,e': '3,e', '3,h': '3,h', '3,indhl': '3,(hl)', '3,l': '3,l', '30': '$30', '38': '$38', '4,a': '4,a', '4,b': '4,b', '4,c': '4,c', '4,d': '4,d', '4,e': '4,e', '4,h': '4,h', '4,indhl': '4,(hl)', '4,l': '4,l', '5,a': '5,a', '5,b': '5,b', '5,c': '5,c', '5,d': '5,d', '5,e': '5,e', '5,h': '5,h', '5,indhl': '5,(hl)', '5,l': '5,l', '6,a': '6,a', '6,b': '6,b', '6,c': '6,c', '6,d': '6,d', '6,e': '6,e', '6,h': '6,h', '6,indhl': '6,(hl)', '6,l': '6,l', '7,a': '7,a', '7,b': '7,b', '7,c': '7,c', '7,d': '7,d', '7,e': '7,e', '7,h': '7,h', '7,indhl': '7,(hl)', '7,l': '7,l', 'a': 'a', 'a,a': 'a,a', 'a,b': 'a,b', 'a,c': 'a,c', 'a,d': 'a,d', 'a,e': 'a,e', 'a,h': 'a,h', 'a,i': 'a,i', 'a,indbc': 'a,(bc)', 'a,indc': 'a,(c)', 'a,indde': 'a,(de)', 'a,indhl': 'a,(hl)', 'a,indix+d': 'a,(ix+${0:02X})', 'a,indiy+d': 'a,(iy+${0:02X})', 'a,indn': 'a,(${0:02X})', 'a,indnn': 'a,(${1:02X}{0:02X})', 'a,l': 'a,l', 'a,n': 'a,${0:02X}', 'a,r': 'a,r', 'af': 'af', "af,af'": "af,af'", 'b': 'b', 'b,a': 'b,a', 'b,b': 'b,b', 'b,c': 'b,c', 'b,d': 'b,d', 'b,e': 'b,e', 'b,h': 'b,h', 'b,indc': 'b,(c)', 'b,indhl': 'b,(hl)', 'b,indix+d': 'b,(ix+${0:02X})', 'b,indiy+d': 'b,(iy+${0:02X})', 'b,l': 'b,l', 'b,n': 'b,${0:02X}', 'bc': 'bc', 'bc,indaa': 'bc,(${1:02X}{0:02X})', 'bc,nn': 'bc,${1:02X}{0:02X}', 'c': 'c', 'c,a': 'c,a', 'c,b': 'c,b', 'c,c': 'c,c', 'c,d': 'c,d', 'c,e': 'c,e', 'c,h': 'c,h', 'c,indc': 'c,(c)', 'c,indhl': 'c,(hl)', 'c,indix+d': 'c,(ix+${0:02X})', 'c,indiy+d': 'c,(iy+${0:02X})', 'c,l': 'c,l', 'c,n': 'c,${0:02X}', 'c,pcr': 'c,${0:04X}', 'c,nn': 'c,${1:02X}{0:02X}', 'd': 'd', 'd,a': 'd,a', 'd,b': 'd,b', 'd,c': 'd,c', 'd,d': 'd,d', 'd,e': 'd,e', 'd,h': 'd,h', 'd,indc': 'd,(c)', 'd,indhl': 'd,(hl)', 'd,indix+d': 'd,(ix+${0:02X})', 'd,indiy+d': 'd,(iy+${0:02X})', 'd,l': 'd,l', 'd,n': 'd,${0:02X}', 'de': 'de', 'de,hl': 'de,hl', 'de,indaa': 'de,(${1:02X}{0:02X})', 'de,nn': 'de,${1:02X}{0:02X}', 'e': 'e', 'e,a': 'e,a', 'e,b': 'e,b', 'e,c': 'e,c', 'e,d': 'e,d', 'e,e': 'e,e', 'e,h': 'e,h', 'e,indc': 'e,(c)', 'e,indhl': 'e,(hl)', 'e,indix+d': 'e,(ix+${0:02X})', 'e,indiy+d': 'e,(iy+${0:02X})', 'e,l': 'e,l', 'e,n': 'e,${0:02X}', 'h': 'h', 'h,a': 'h,a', 'h,b': 'h,b', 'h,c': 'h,c', 'h,d': 'h,d', 'h,e': 'h,e', 'h,h': 'h,h', 'h,indc': 'h,(c)', 'h,indhl': 'h,(hl)', 'h,indix+d': 'h,(ix+${0:02X})', 'h,indiy+d': 'h,(iy+${0:02X})', 'h,l': 'h,l', 'h,n': 'h,${0:02X}', 'hl': 'hl', 'hl,bc': 'hl,bc', 'hl,de': 'hl,de', 'hl,hl': 'hl,hl', 'hl,indnn': 'hl,(${1:02X}{0:02X})', 'hl,nn': 'hl,${1:02X}{0:02X}', 'hl,sp': 'hl,sp', 'i,a': 'i,a', 'indaa,bc': '(${1:02X}{0:02X}),bc', 'indaa,de': '(${1:02X}{0:02X}),de', 'indaa,ix': '(${1:02X}{0:02X}),ix', 'indaa,iy': '(${1:02X}{0:02X}),iy', 'indaa,sp': '(${1:02X}{0:02X}),sp', 'indbc,a': '(bc),a', 'indc,a': '(c),a', 'indc,b': '(c),b', 'indc,c': '(c),c', 'indc,d': '(c),d', 'indc,e': '(c),e', 'indc,h': '(c),h', 'indc,l': '(c),l', 'indde,a': '(de),a', 'indhl': '(hl)', 'indhl,a': '(hl),a', 'indhl,b': '(hl),b', 'indhl,c': '(hl),c', 'indhl,d': '(hl),d', 'indhl,e': '(hl),e', 'indhl,h': '(hl),h', 'indhl,l': '(hl),l', 'indhl,n': '(hl),${0:02X}', 'indix+d': '(ix+${0:02X})', 'indix+d,a': '(ix+${0:02X}),a', 'indiy+d,a': '(iy+${0:02X}),a', 'indix+d,b': '(ix+${0:02X}),b', 'indix+d,c': '(ix+${0:02X}),c', 'indix+d,d': '(ix+${0:02X}),d', 'indix+d,e': '(ix+${0:02X}),e', 'indix+d,h': '(ix+${0:02X}),h', 'indix+d,l': '(ix+${0:02X}),l', 'indix+d,n': '(ix+${0:02X}),${1:02X}', 'indiy+d': '(iy+${0:02X})', 'indiy+d,b': '(iy+${0:02X}),b', 'indiy+d,c': '(iy+${0:02X}),c', 'indiy+d,d': '(iy+${0:02X}),d', 'indiy+d,e': '(iy+${0:02X}),e', 'indiy+d,h': '(iy+${0:02X}),h', 'indiy+d,l': '(iy+${0:02X}),l', 'indiy+d,n': '(iy+${0:02X}),${1:02X}', 'indn,a': '(${0:02X}),a', 'indnn,a': '(${1:02X}{0:02X}),a', 'indnn,hl': '(${1:02X}{0:02X}),hl', 'indsp,hl': '(sp),hl', 'ix': 'ix', 'ix,aa': 'ix,${1:02X}{0:02X}', 'ix,bc': 'ix,bc', 'ix,de': 'ix,de', 'ix,indaa': 'ix,(${1:02X}{0:02X})', 'ix,ix': 'ix,ix', 'ix,sp': 'ix,sp', 'iy': 'iy', 'iy,aa': 'iy,${1:02X}{0:02X}', 'iy,bc': 'iy,bc', 'iy,bc': 'iy,bc', 'iy,de': 'iy,de', 'iy,indaa': 'iy,(${1:02X}{0:02X})', 'iy,indaa': 'iy,(${1:02X}{0:02X})', 'iy,iy': 'iy,iy', 'iy,sp': 'iy,sp', 'l': 'l', 'l,a': 'l,a', 'l,b': 'l,b', 'l,c': 'l,c', 'l,d': 'l,d', 'l,e': 'l,e', 'l,h': 'l,h', 'l,indc': 'l,(c)', 'l,indhl': 'l,(hl)', 'l,indix+d': 'l,(ix+${0:02X})', 'l,indiy+d': 'l,(iy+${0:02X})', 'l,l': 'l,l', 'l,n': 'l,${0:02X}', 'm': 'm', 'm,nn': 'm,${1:02X}{0:02X}', 'n': '${0:02X}', 'n,pcr': '${0:04X}', 'n,indix+d': 'n,(ix+${0:02X})', 'n,indiy+d': 'n,(iy+${0:02X})', 'nc': 'nc', 'nc,pcr': 'nc,${0:04X}', 'nc,nn': 'nc,${1:02X}{0:02X}', 'nn': '${1:02X}{0:02X}', 'nz': 'nz', 'nz,pcr': 'nz,${0:04X}', 'nz,nn': 'nz,${1:02X}{0:02X}', 'p': 'p', 'p,nn': 'p,${1:02X}{0:02X}', 'pcr': '${0:04X}', 'pe': 'pe', 'pe,nn': 'pe,${1:02X}{0:02X}', 'po': 'po', 'po,nn': 'po,${1:02X}{0:02X}', 'r,a': 'r,a', 'sp': 'sp', 'sp,hl': 'sp,hl', 'sp,indaa': 'sp,(${1:02X}{0:02X})', 'sp,nn': 'sp,${1:02X}{0:02X}', 'z': 'z', 'z,pcr': 'z,${0:04X}', 'z,nn': 'z,${1:02X}{0:02X}'} opcode_table = {0: [1, 'nop', 'implied'], 1: [3, 'ld', 'bc,nn'], 2: [1, 'ld', 'indbc,a'], 3: [1, 'inc', 'bc'], 4: [1, 'inc', 'b'], 5: [1, 'dec', 'b'], 6: [2, 'ld', 'b,n'], 7: [1, 'rlca', 'implied'], 8: [1, 'ex', "af,af'"], 9: [1, 'add', 'hl,bc'], 10: [1, 'ld', 'a,indbc'], 11: [1, 'dec', 'bc'], 12: [1, 'inc', 'c'], 13: [1, 'dec', 'c'], 14: [2, 'ld', 'c,n'], 15: [1, 'rrca', 'implied'], 16: [2, 'djnz', 'pcr', pcr], 17: [3, 'ld', 'de,nn'], 18: [1, 'ld', 'indde,a'], 19: [1, 'inc', 'de'], 20: [1, 'inc', 'd'], 21: [1, 'dec', 'd'], 22: [2, 'ld', 'd,n'], 23: [1, 'rla', 'implied'], 24: [2, 'jr', 'pcr', pcr], 25: [1, 'add', 'hl,de'], 26: [1, 'ld', 'a,indde'], 27: [1, 'dec', 'de'], 28: [1, 'inc', 'e'], 29: [1, 'dec', 'e'], 30: [2, 'ld', 'e,n'], 31: [1, 'rra', 'implied'], 32: [2, 'jr', 'nz,pcr', pcr], 33: [3, 'ld', 'hl,nn'], 34: [3, 'ld', 'indnn,hl'], 35: [1, 'inc', 'hl'], 36: [1, 'inc', 'h'], 37: [1, 'dec', 'h'], 38: [2, 'ld', 'h,n'], 39: [1, 'daa', 'implied'], 40: [2, 'jr', 'z,pcr', pcr], 41: [1, 'add', 'hl,hl'], 42: [3, 'ld', 'hl,indnn'], 43: [1, 'dec', 'hl'], 44: [1, 'inc', 'l'], 45: [1, 'dec', 'l'], 46: [2, 'ld', 'l,n'], 47: [1, 'cpl', 'implied'], 48: [2, 'jr', 'nc,pcr', pcr], 49: [3, 'ld', 'sp,nn'], 50: [3, 'ld', 'indnn,a'], 51: [1, 'inc', 'sp'], 52: [1, 'inc', 'indhl'], 53: [1, 'dec', 'indhl'], 54: [2, 'ld', 'indhl,n'], 55: [1, 'scf', 'implied'], 56: [2, 'jr', 'c,pcr', pcr], 57: [1, 'add', 'hl,sp'], 58: [3, 'ld', 'a,indnn'], 59: [1, 'dec', 'sp'], 60: [1, 'inc', 'a'], 61: [1, 'dec', 'a'], 62: [2, 'ld', 'a,n'], 63: [1, 'ccf', 'implied'], 64: [1, 'ld', 'b,b'], 65: [1, 'ld', 'b,c'], 66: [1, 'ld', 'b,d'], 67: [1, 'ld', 'b,e'], 68: [1, 'ld', 'b,h'], 69: [1, 'ld', 'b,l'], 70: [1, 'ld', 'b,indhl'], 71: [1, 'ld', 'b,a'], 72: [1, 'ld', 'c,b'], 73: [1, 'ld', 'c,c'], 74: [1, 'ld', 'c,d'], 75: [1, 'ld', 'c,e'], 76: [1, 'ld', 'c,h'], 77: [1, 'ld', 'c,l'], 78: [1, 'ld', 'c,indhl'], 79: [1, 'ld', 'c,a'], 80: [1, 'ld', 'd,b'], 81: [1, 'ld', 'd,c'], 82: [1, 'ld', 'd,d'], 83: [1, 'ld', 'd,e'], 84: [1, 'ld', 'd,h'], 85: [1, 'ld', 'd,l'], 86: [1, 'ld', 'd,indhl'], 87: [1, 'ld', 'd,a'], 88: [1, 'ld', 'e,b'], 89: [1, 'ld', 'e,c'], 90: [1, 'ld', 'e,d'], 91: [1, 'ld', 'e,e'], 92: [1, 'ld', 'e,h'], 93: [1, 'ld', 'e,l'], 94: [1, 'ld', 'e,indhl'], 95: [1, 'ld', 'e,a'], 96: [1, 'ld', 'h,b'], 97: [1, 'ld', 'h,c'], 98: [1, 'ld', 'h,d'], 99: [1, 'ld', 'h,e'], 100: [1, 'ld', 'h,h'], 101: [1, 'ld', 'h,l'], 102: [1, 'ld', 'h,indhl'], 103: [1, 'ld', 'h,a'], 104: [1, 'ld', 'l,b'], 105: [1, 'ld', 'l,c'], 106: [1, 'ld', 'l,d'], 107: [1, 'ld', 'l,e'], 108: [1, 'ld', 'l,h'], 109: [1, 'ld', 'l,l'], 110: [1, 'ld', 'l,indhl'], 111: [1, 'ld', 'l,a'], 112: [1, 'ld', 'indhl,b'], 113: [1, 'ld', 'indhl,c'], 114: [1, 'ld', 'indhl,d'], 115: [1, 'ld', 'indhl,e'], 116: [1, 'ld', 'indhl,h'], 117: [1, 'ld', 'indhl,l'], 118: [1, 'halt', 'implied'], 119: [1, 'ld', 'indhl,a'], 120: [1, 'ld', 'a,b'], 121: [1, 'ld', 'a,c'], 122: [1, 'ld', 'a,d'], 123: [1, 'ld', 'a,e'], 124: [1, 'ld', 'a,h'], 125: [1, 'ld', 'a,l'], 126: [1, 'ld', 'a,indhl'], 127: [1, 'ld', 'a,a'], 128: [1, 'add', 'a,b'], 129: [1, 'add', 'a,c'], 130: [1, 'add', 'a,d'], 131: [1, 'add', 'a,e'], 132: [1, 'add', 'a,h'], 133: [1, 'add', 'a,l'], 134: [1, 'add', 'a,indhl'], 135: [1, 'add', 'a,a'], 136: [1, 'adc', 'a,b'], 137: [1, 'adc', 'a,c'], 138: [1, 'adc', 'a,d'], 139: [1, 'adc', 'a,e'], 140: [1, 'adc', 'a,h'], 141: [1, 'adc', 'a,l'], 142: [1, 'adc', 'a,indhl'], 143: [1, 'adc', 'a,a'], 144: [1, 'sub', 'b'], 145: [1, 'sub', 'c'], 146: [1, 'sub', 'd'], 147: [1, 'sub', 'e'], 148: [1, 'sub', 'h'], 149: [1, 'sub', 'l'], 150: [1, 'sub', 'indhl'], 151: [1, 'sub', 'a'], 152: [1, 'sbc', 'a,b'], 153: [1, 'sbc', 'a,c'], 154: [1, 'sbc', 'a,d'], 155: [1, 'sbc', 'a,e'], 156: [1, 'sbc', 'a,h'], 157: [1, 'sbc', 'a,l'], 158: [1, 'sbc', 'a,indhl'], 159: [1, 'sbc', 'a,a'], 160: [1, 'and', 'b'], 161: [1, 'and', 'c'], 162: [1, 'and', 'd'], 163: [1, 'and', 'e'], 164: [1, 'and', 'h'], 165: [1, 'and', 'l'], 166: [1, 'and', 'indhl'], 167: [1, 'and', 'a'], 168: [1, 'xor', 'b'], 169: [1, 'xor', 'c'], 170: [1, 'xor', 'd'], 171: [1, 'xor', 'e'], 172: [1, 'xor', 'h'], 173: [1, 'xor', 'l'], 174: [1, 'xor', 'indhl'], 175: [1, 'xor', 'a'], 176: [1, 'or', 'b'], 177: [1, 'or', 'c'], 178: [1, 'or', 'd'], 179: [1, 'or', 'e'], 180: [1, 'or', 'h'], 181: [1, 'or', 'l'], 182: [1, 'or', 'indhl'], 183: [1, 'or', 'a'], 184: [1, 'cp', 'b'], 185: [1, 'cp', 'c'], 186: [1, 'cp', 'd'], 187: [1, 'cp', 'e'], 188: [1, 'cp', 'h'], 189: [1, 'cp', 'l'], 190: [1, 'cp', 'indhl'], 191: [1, 'cp', 'a'], 192: [1, 'ret', 'nz'], 193: [1, 'pop', 'bc'], 194: [3, 'jp', 'nz,nn'], 195: [3, 'jp', 'nn'], 196: [3, 'call', 'nz,nn'], 197: [1, 'push', 'bc'], 198: [2, 'add', 'a,n'], 199: [1, 'rst', '00'], 200: [1, 'ret', 'z'], 201: [1, 'ret', 'implied'], 202: [3, 'jp', 'z,nn'], 204: [3, 'call', 'z,nn'], 205: [3, 'call', 'nn'], 206: [2, 'adc', 'a,n'], 207: [1, 'rst', '08'], 208: [1, 'ret', 'nc'], 209: [1, 'pop', 'de'], 210: [3, 'jp', 'nc,nn'], 211: [2, 'out', 'indn,a'], 212: [3, 'call', 'nc,nn'], 213: [1, 'push', 'de'], 214: [2, 'sub', 'n'], 215: [1, 'rst', '10'], 216: [1, 'ret', 'c'], 217: [1, 'exx', 'implied'], 218: [3, 'jp', 'c,nn'], 219: [2, 'in', 'a,indn'], 220: [3, 'call', 'c,nn'], 222: [2, 'sbc', 'a,n'], 223: [1, 'rst', '18'], 224: [1, 'ret', 'po'], 225: [1, 'pop', 'hl'], 226: [3, 'jp', 'po,nn'], 227: [1, 'ex', 'indsp,hl'], 228: [3, 'call', 'po,nn'], 229: [1, 'push', 'hl'], 230: [2, 'and', 'n'], 231: [1, 'rst', '20'], 232: [1, 'ret', 'pe'], 233: [1, 'jp', 'indhl'], 234: [3, 'jp', 'pe,nn'], 235: [1, 'ex', 'de,hl'], 236: [3, 'call', 'pe,nn'], 238: [2, 'xor', 'n'], 239: [1, 'rst', '28'], 240: [1, 'ret', 'p'], 241: [1, 'pop', 'af'], 242: [3, 'jp', 'p,nn'], 243: [1, 'di', 'implied'], 244: [3, 'call', 'p,nn'], 245: [1, 'push', 'af'], 246: [2, 'or', 'n'], 247: [1, 'rst', '30'], 248: [1, 'ret', 'm'], 249: [1, 'ld', 'sp,hl'], 250: [3, 'jp', 'm,nn'], 251: [1, 'ei', 'implied'], 252: [3, 'call', 'm,nn'], 254: [2, 'cp', 'n'], 255: [1, 'rst', '38'], 51968: [2, 'rlc', 'b'], 51969: [2, 'rlc', 'c'], 51970: [2, 'rlc', 'd'], 51971: [2, 'rlc', 'e'], 51972: [2, 'rlc', 'h'], 51973: [2, 'rlc', 'l'], 51974: [2, 'rlc', 'indhl'], 51975: [2, 'rlc', 'a'], 51976: [2, 'rrc', 'b'], 51977: [2, 'rrc', 'c'], 51978: [2, 'rrc', 'd'], 51979: [2, 'rrc', 'e'], 51980: [2, 'rrc', 'h'], 51981: [2, 'rrc', 'l'], 51982: [2, 'rrc', 'indhl'], 51983: [2, 'rrc', 'a'], 51984: [2, 'rl', 'b'], 51985: [2, 'rl', 'c'], 51986: [2, 'rl', 'd'], 51987: [2, 'rl', 'e'], 51988: [2, 'rl', 'h'], 51989: [2, 'rl', 'l'], 51990: [2, 'rl', 'indhl'], 51991: [2, 'rl', 'a'], 51992: [2, 'rr', 'b'], 51993: [2, 'rr', 'c'], 51994: [2, 'rr', 'd'], 51995: [2, 'rr', 'e'], 51996: [2, 'rr', 'h'], 51997: [2, 'rr', 'l'], 51998: [2, 'rr', 'indhl'], 51999: [2, 'rr', 'a'], 52000: [2, 'sla', 'b'], 52001: [2, 'sla', 'c'], 52002: [2, 'sla', 'd'], 52003: [2, 'sla', 'e'], 52004: [2, 'sla', 'h'], 52005: [2, 'sla', 'l'], 52006: [2, 'sla', 'indhl'], 52007: [2, 'sla', 'a'], 52008: [2, 'sra', 'b'], 52009: [2, 'sra', 'c'], 52010: [2, 'sra', 'd'], 52011: [2, 'sra', 'e'], 52012: [2, 'sra', 'h'], 52013: [2, 'sra', 'l'], 52014: [2, 'sra', 'indhl'], 52015: [2, 'sra', 'a'], 52024: [2, 'srl', 'b'], 52025: [2, 'srl', 'c'], 52026: [2, 'srl', 'd'], 52027: [2, 'srl', 'e'], 52028: [2, 'srl', 'h'], 52029: [2, 'srl', 'l'], 52030: [2, 'srl', 'indhl'], 52031: [2, 'srl', 'a'], 52032: [2, 'bit', '0,b'], 52033: [2, 'bit', '0,c'], 52034: [2, 'bit', '0,d'], 52035: [2, 'bit', '0,e'], 52036: [2, 'bit', '0,h'], 52037: [2, 'bit', '0,l'], 52038: [2, 'bit', '0,indhl'], 52039: [2, 'bit', '0,a'], 52040: [2, 'bit', '1,b'], 52041: [2, 'bit', '1,c'], 52042: [2, 'bit', '1,d'], 52043: [2, 'bit', '1,e'], 52044: [2, 'bit', '1,h'], 52045: [2, 'bit', '1,l'], 52046: [2, 'bit', '1,indhl'], 52047: [2, 'bit', '1,a'], 52048: [2, 'bit', '2,b'], 52049: [2, 'bit', '2,c'], 52050: [2, 'bit', '2,d'], 52051: [2, 'bit', '2,e'], 52052: [2, 'bit', '2,h'], 52053: [2, 'bit', '2,l'], 52054: [2, 'bit', '2,indhl'], 52055: [2, 'bit', '2,a'], 52056: [2, 'bit', '3,b'], 52057: [2, 'bit', '3,c'], 52058: [2, 'bit', '3,d'], 52059: [2, 'bit', '3,e'], 52060: [2, 'bit', '3,h'], 52061: [2, 'bit', '3,l'], 52062: [2, 'bit', '3,indhl'], 52063: [2, 'bit', '3,a'], 52064: [2, 'bit', '4,b'], 52065: [2, 'bit', '4,c'], 52066: [2, 'bit', '4,d'], 52067: [2, 'bit', '4,e'], 52068: [2, 'bit', '4,h'], 52069: [2, 'bit', '4,l'], 52070: [2, 'bit', '4,indhl'], 52071: [2, 'bit', '4,a'], 52072: [2, 'bit', '5,b'], 52073: [2, 'bit', '5,c'], 52074: [2, 'bit', '5,d'], 52075: [2, 'bit', '5,e'], 52076: [2, 'bit', '5,h'], 52077: [2, 'bit', '5,l'], 52078: [2, 'bit', '5,indhl'], 52079: [2, 'bit', '5,a'], 52080: [2, 'bit', '6,b'], 52081: [2, 'bit', '6,c'], 52082: [2, 'bit', '6,d'], 52083: [2, 'bit', '6,e'], 52084: [2, 'bit', '6,h'], 52085: [2, 'bit', '6,l'], 52086: [2, 'bit', '6,indhl'], 52087: [2, 'bit', '6,a'], 52088: [2, 'bit', '7,b'], 52089: [2, 'bit', '7,c'], 52090: [2, 'bit', '7,d'], 52091: [2, 'bit', '7,e'], 52092: [2, 'bit', '7,h'], 52093: [2, 'bit', '7,l'], 52094: [2, 'bit', '7,indhl'], 52095: [2, 'bit', '7,a'], 52096: [2, 'res', '0,b'], 52097: [2, 'res', '0,c'], 52098: [2, 'res', '0,d'], 52099: [2, 'res', '0,e'], 52100: [2, 'res', '0,h'], 52101: [2, 'res', '0,l'], 52102: [2, 'res', '0,indhl'], 52103: [2, 'res', '0,a'], 52104: [2, 'res', '1,b'], 52105: [2, 'res', '1,c'], 52106: [2, 'res', '1,d'], 52107: [2, 'res', '1,e'], 52108: [2, 'res', '1,h'], 52109: [2, 'res', '1,l'], 52110: [2, 'res', '1,indhl'], 52111: [2, 'res', '1,a'], 52112: [2, 'res', '2,b'], 52113: [2, 'res', '2,c'], 52114: [2, 'res', '2,d'], 52115: [2, 'res', '2,e'], 52116: [2, 'res', '2,h'], 52117: [2, 'res', '2,l'], 52118: [2, 'res', '2,indhl'], 52119: [2, 'res', '2,a'], 52120: [2, 'res', '3,b'], 52121: [2, 'res', '3,c'], 52122: [2, 'res', '3,d'], 52123: [2, 'res', '3,e'], 52124: [2, 'res', '3,h'], 52125: [2, 'res', '3,l'], 52126: [2, 'res', '3,indhl'], 52127: [2, 'res', '3,a'], 52128: [2, 'res', '4,b'], 52129: [2, 'res', '4,c'], 52130: [2, 'res', '4,d'], 52131: [2, 'res', '4,e'], 52132: [2, 'res', '4,h'], 52133: [2, 'res', '4,l'], 52134: [2, 'res', '4,indhl'], 52135: [2, 'res', '4,a'], 52136: [2, 'res', '5,b'], 52137: [2, 'res', '5,c'], 52138: [2, 'res', '5,d'], 52139: [2, 'res', '5,e'], 52140: [2, 'res', '5,h'], 52141: [2, 'res', '5,l'], 52142: [2, 'res', '5,indhl'], 52143: [2, 'res', '5,a'], 52144: [2, 'res', '6,b'], 52145: [2, 'res', '6,c'], 52146: [2, 'res', '6,d'], 52147: [2, 'res', '6,e'], 52148: [2, 'res', '6,h'], 52149: [2, 'res', '6,l'], 52150: [2, 'res', '6,indhl'], 52151: [2, 'res', '6,a'], 52152: [2, 'res', '7,b'], 52153: [2, 'res', '7,c'], 52154: [2, 'res', '7,d'], 52155: [2, 'res', '7,e'], 52156: [2, 'res', '7,h'], 52157: [2, 'res', '7,l'], 52158: [2, 'res', '7,indhl'], 52159: [2, 'res', '7,a'], 52160: [2, 'set', '0,b'], 52161: [2, 'set', '0,c'], 52162: [2, 'set', '0,d'], 52163: [2, 'set', '0,e'], 52164: [2, 'set', '0,h'], 52165: [2, 'set', '0,l'], 52166: [2, 'set', '0,indhl'], 52167: [2, 'set', '0,a'], 52168: [2, 'set', '1,b'], 52169: [2, 'set', '1,c'], 52170: [2, 'set', '1,d'], 52171: [2, 'set', '1,e'], 52172: [2, 'set', '1,h'], 52173: [2, 'set', '1,l'], 52174: [2, 'set', '1,indhl'], 52175: [2, 'set', '1,a'], 52176: [2, 'set', '2,b'], 52177: [2, 'set', '2,c'], 52178: [2, 'set', '2,d'], 52179: [2, 'set', '2,e'], 52180: [2, 'set', '2,h'], 52181: [2, 'set', '2,l'], 52182: [2, 'set', '2,indhl'], 52183: [2, 'set', '2,a'], 52184: [2, 'set', '3,b'], 52185: [2, 'set', '3,c'], 52186: [2, 'set', '3,d'], 52187: [2, 'set', '3,e'], 52188: [2, 'set', '3,h'], 52189: [2, 'set', '3,l'], 52190: [2, 'set', '3,indhl'], 52191: [2, 'set', '3,a'], 52192: [2, 'set', '4,b'], 52193: [2, 'set', '4,c'], 52194: [2, 'set', '4,d'], 52195: [2, 'set', '4,e'], 52196: [2, 'set', '4,h'], 52197: [2, 'set', '4,l'], 52198: [2, 'set', '4,indhl'], 52199: [2, 'set', '4,a'], 52200: [2, 'set', '5,b'], 52201: [2, 'set', '5,c'], 52202: [2, 'set', '5,d'], 52203: [2, 'set', '5,e'], 52204: [2, 'set', '5,h'], 52205: [2, 'set', '5,l'], 52206: [2, 'set', '5,indhl'], 52207: [2, 'set', '5,a'], 52208: [2, 'set', '6,b'], 52209: [2, 'set', '6,c'], 52210: [2, 'set', '6,d'], 52211: [2, 'set', '6,e'], 52212: [2, 'set', '6,h'], 52213: [2, 'set', '6,l'], 52214: [2, 'set', '6,indhl'], 52215: [2, 'set', '6,a'], 52216: [2, 'set', '7,b'], 52217: [2, 'set', '7,c'], 52218: [2, 'set', '7,d'], 52219: [2, 'set', '7,e'], 52220: [2, 'set', '7,h'], 52221: [2, 'set', '7,l'], 52222: [2, 'set', '7,indhl'], 52223: [2, 'set', '7,a'], 56585: [2, 'add', 'ix,bc'], 56601: [2, 'add', 'ix,de'], 56609: [4, 'ld', 'ix,aa'], 56610: [4, 'ld', 'indaa,ix'], 56611: [2, 'inc', 'ix'], 56617: [2, 'add', 'ix,ix'], 56618: [4, 'ld', 'ix,indaa'], 56619: [2, 'dec', 'ix'], 56628: [3, 'inc', 'indix+d'], 56629: [3, 'dec', 'indix+d'], 56630: [4, 'ld', 'indix+d,n'], 56633: [2, 'add', 'ix,sp'], 56646: [3, 'ld', 'b,indix+d'], 56654: [3, 'ld', 'c,indix+d'], 56662: [3, 'ld', 'd,indix+d'], 56670: [3, 'ld', 'e,indix+d'], 56678: [3, 'ld', 'h,indix+d'], 56686: [3, 'ld', 'l,indix+d'], 56688: [3, 'ld', 'indix+d,b'], 56689: [3, 'ld', 'indix+d,c'], 56690: [3, 'ld', 'indix+d,d'], 56691: [3, 'ld', 'indix+d,e'], 56692: [3, 'ld', 'indix+d,h'], 56693: [3, 'ld', 'indix+d,l'], 56695: [3, 'ld', 'indix+d,a'], 56702: [3, 'ld', 'a,indix+d'], 56710: [3, 'add', 'a,indix+d'], 56718: [3, 'adc', 'a,indix+d'], 56726: [3, 'sub', 'indix+d'], 56734: [3, 'sbc', 'a,indix+d'], 56742: [3, 'and', 'indix+d'], 56750: [3, 'xor', 'indix+d'], 56758: [3, 'or', 'indix+d'], 56766: [3, 'cp', 'indix+d'], 56718: [3, 'adc', 'indix+d'], 60736: [2, 'in', 'b,indc'], 60737: [2, 'out', 'indc,b'], 60738: [2, 'sbc', 'hl,bc'], 60739: [4, 'ld', 'indaa,bc'], 60740: [2, 'neg', 'implied'], 60741: [2, 'retn', 'implied'], 60742: [2, 'im', '0'], 60743: [2, 'ld', 'i,a'], 60744: [2, 'in', 'c,indc'], 60745: [2, 'out', 'indc,c'], 60746: [2, 'adc', 'hl,bc'], 60747: [4, 'ld', 'bc,indaa'], 60749: [2, 'reti', 'implied'], 60751: [2, 'ld', 'r,a'], 60752: [2, 'in', 'd,indc'], 60753: [2, 'out', 'indc,d'], 60754: [2, 'sbc', 'hl,de'], 60755: [4, 'ld', 'indaa,de'], 60758: [2, 'im', '1'], 60759: [2, 'ld', 'a,i'], 60760: [2, 'in', 'e,indc'], 60761: [2, 'out', 'indc,e'], 60762: [2, 'adc', 'hl,de'], 60763: [4, 'ld', 'de,indaa'], 60766: [2, 'im', '2'], 60767: [2, 'ld', 'a,r'], 60768: [2, 'in', 'h,indc'], 60769: [2, 'out', 'indc,h'], 60770: [2, 'sbc', 'hl,hl'], 60775: [2, 'rrd', 'implied'], 60776: [2, 'in', 'l,indc'], 60777: [2, 'out', 'indc,l'], 60778: [2, 'adc', 'hl,hl'], 60783: [2, 'rld', 'implied'], 60786: [2, 'sbc', 'hl,sp'], 60787: [4, 'ld', 'indaa,sp'], 60790: [2, 'in', 'a,indc'], 60793: [2, 'out', 'indc,a'], 60794: [2, 'adc', 'hl,sp'], 60795: [4, 'ld', 'sp,indaa'], 60832: [2, 'ldi', 'implied'], 60833: [2, 'cpi', 'implied'], 60834: [2, 'ini', 'implied'], 60835: [2, 'outi', 'implied'], 60840: [2, 'ldd', 'implied'], 60841: [2, 'cpd', 'implied'], 60842: [2, 'ind', 'implied'], 60843: [2, 'outd', 'implied'], 60848: [2, 'ldir', 'implied'], 60849: [2, 'cpir', 'implied'], 60850: [2, 'inir', 'implied'], 60851: [2, 'otir', 'implied'], 60856: [2, 'lddr', 'implied'], 60857: [2, 'cpdr', 'implied'], 60858: [2, 'indr', 'implied'], 60859: [2, 'otdr', 'implied'], 64777: [2, 'add', 'iy,bc'], 64793: [2, 'add', 'iy,de'], 64801: [4, 'ld', 'iy,aa'], 64802: [4, 'ld', 'indaa,iy'], 64803: [2, 'inc', 'iy'], 64809: [2, 'add', 'iy,iy'], 64810: [4, 'ld', 'iy,indaa'], 64811: [2, 'dec', 'iy'], 64820: [3, 'inc', 'indiy+d'], 64821: [3, 'dec', 'indiy+d'], 64822: [4, 'ld', 'indiy+d,n'], 64825: [2, 'add', 'iy,sp'], 64838: [3, 'ld', 'b,indiy+d'], 64846: [3, 'ld', 'c,indiy+d'], 64854: [3, 'ld', 'd,indiy+d'], 64862: [3, 'ld', 'e,indiy+d'], 64870: [3, 'ld', 'h,indiy+d'], 64878: [3, 'ld', 'l,indiy+d'], 64880: [3, 'ld', 'indiy+d,b'], 64881: [3, 'ld', 'indiy+d,c'], 64882: [3, 'ld', 'indiy+d,d'], 64883: [3, 'ld', 'indiy+d,e'], 64884: [3, 'ld', 'indiy+d,h'], 64885: [3, 'ld', 'indiy+d,l'], 64887: [3, 'ld', 'indiy+d,a'], 64894: [3, 'ld', 'a,indiy+d'], 64902: [3, 'add', 'a,indiy+d'], 64910: [3, 'adc', 'a,indiy+d'], 64918: [3, 'sub', 'indiy+d'], 64926: [3, 'sbc', 'a,indiy+d'], 64934: [3, 'and', 'indiy+d'], 64942: [3, 'xor', 'indiy+d'], 64950: [3, 'or', 'indiy+d'], 64958: [3, 'cp', 'indiy+d'], 56779: [4, 'ixbit', 'implied', z80bit], 64971: [4, 'iybit', 'implied', z80bit]} def extra_opcodes(addr_table, op_table): for index in ['x', 'y']: for bit in range(8): k = '%d,indi%s+d' % (bit, index) v = '%d,(i%s+${0:02X})' % (bit, index) addr_table[k] = v for reg in ['a', 'b', 'c', 'd', 'e', 'h', 'l']: k = '%d,indi%s+d,%s' % (bit, index, reg) v = '%d,(i%s+${0:02X}),%s' % (bit, index, reg) addr_table[k] = v for (first_byte, x_or_y) in [(221, 'x'), (253, 'y')]: mnemonics_8 = ['rlc', 'rrc', 'rl', 'rr', 'sla', 'sra', 'sll', 'sr1'] + ['bit'] * 8 + ['res'] * 8 + ['set'] * 8 mnemonics = [m for mnemonic in mnemonics_8 for m in [mnemonic] * 8] addrmodes = ['indi%s+d' + a for a in [',b', ',c', ',d', ',e', ',h', ',l', '', ',a']] * 8 + [f % d for d in range(8) for f in ['%d,indi%%s+d'] * 8] + [f % d for d in range(8) for f in ['%d,indi%%s+d' + a for a in [',b', ',c', ',d', ',e', ',h', ',l', '', ',a']]] * 2 for (fourth_byte, (instruction, addrmode)) in enumerate(zip(mnemonics, addrmodes)): opcode = (first_byte << 24) + (203 << 16) + fourth_byte op_table[opcode] = [4, instruction, addrmode % x_or_y, z80bit] extra_opcodes(addressModeTable, opcodeTable) del extra_opcodes
def min_platforms(arrival, departure): arrival.sort() departure.sort() platform_count = 1 output = 1 i = 1 j = 0 while i < len(arrival) and j < len(arrival): if arrival[i] < departure[j]: platform_count += 1 i += 1 if platform_count > output: output = platform_count else: platform_count -= 1 j += 1 return output
def min_platforms(arrival, departure): arrival.sort() departure.sort() platform_count = 1 output = 1 i = 1 j = 0 while i < len(arrival) and j < len(arrival): if arrival[i] < departure[j]: platform_count += 1 i += 1 if platform_count > output: output = platform_count else: platform_count -= 1 j += 1 return output
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # 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 someFunctionThatReturnsDeletedValueViaAttributeLookup(): class C: def __getattr__(self, attr_name): nonlocal a del a c = C() a = 1 c.something return a try: someFunctionThatReturnsDeletedValueViaAttributeLookup() except UnboundLocalError: print("OK, object attribute look-up correctly deleted an item.") else: print("Ouch.!") def someFunctionThatReturnsDeletedValueViaAttributeSetting(): class C: def __setattr__(self, attr_name, value): nonlocal a del a c = C() a = 1 c.something = 1 return a try: someFunctionThatReturnsDeletedValueViaAttributeSetting() except UnboundLocalError: print("OK, object attribute setting correctly deleted an item.") else: print("Ouch.!") def someFunctionThatReturnsDeletedValueViaAttributeDel(): class C: def __delattr__(self, attr_name): nonlocal a del a return True c = C() a = 1 del c.something return a try: someFunctionThatReturnsDeletedValueViaAttributeDel() except UnboundLocalError: print("OK, object attribute del correctly deleted an item.") else: print("Ouch.!") def someFunctionThatReturnsDeletedValueViaItemLookup(): class C: def __getitem__(self, attr_name): nonlocal a del a c = C() a = 1 c[2] return a try: someFunctionThatReturnsDeletedValueViaItemLookup() except UnboundLocalError: print("OK, object subscript look-up correctly deleted an item.") else: print("Ouch.!") def someFunctionThatReturnsDeletedValueViaItemSetting(): class C: def __setitem__(self, attr_name, value): nonlocal a del a c = C() a = 1 c[2] = 3 return a try: someFunctionThatReturnsDeletedValueViaItemSetting() except UnboundLocalError: print("OK, object subscript setting correctly deleted an item.") else: print("Ouch.!") def someFunctionThatReturnsDeletedValueViaItemDel(): class C: def __delitem__(self, attr_name): nonlocal a del a c = C() a = 1 del c[2] return a try: someFunctionThatReturnsDeletedValueViaItemDel() except UnboundLocalError: print("OK, object subscript del correctly deleted an item.") else: print("Ouch.!") def someFunctionThatReturnsDeletedValueViaCall(): class C: def __call__(self): nonlocal a del a c = C() a = 1 c() return a try: someFunctionThatReturnsDeletedValueViaCall() except UnboundLocalError: print("OK, object call correctly deleted an item.") else: print("Ouch.!") def someFunctionThatReturnsDeletedValueViaAdd(): class C: def __add__(self, other): nonlocal a del a c = C() a = 1 c += 1 return a try: someFunctionThatReturnsDeletedValueViaAdd() except UnboundLocalError: print("OK, object add correctly deleted an item.") else: print("Ouch.!") def someFunctionThatReturnsDeletedValueViaSub(): class C: def __add__(self, other): nonlocal a del a c = C() a = 1 c += 1 return a try: someFunctionThatReturnsDeletedValueViaSub() except UnboundLocalError: print("OK, object sub correctly deleted an item.") else: print("Ouch.!") # TODO: There is a whole lot more operations to cover. def someFunctionThatReturnsDeletedValueViaNot(): class C: def __bool__(self): nonlocal a del a return False c = C() a = 1 not c return a try: someFunctionThatReturnsDeletedValueViaNot() except UnboundLocalError: print("OK, object not correctly deleted an item.") else: print("Ouch.!") def someFunctionThatReturnsDeletedValueViaRepr(): class C: def __repr__(self): nonlocal a del a return "<some_repr>" c = C() a = 1 repr(c) return a try: someFunctionThatReturnsDeletedValueViaRepr() except UnboundLocalError: print("OK, object repr correctly deleted an item.") else: print("Ouch.!") def someFunctionThatReturnsDeletedValueViaStr(): class C: def __str__(self): nonlocal a del a return "<some_repr>" c = C() a = 1 str(c) return a try: someFunctionThatReturnsDeletedValueViaStr() except UnboundLocalError: print("OK, object str correctly deleted an item.") else: print("Ouch.!") def someFunctionThatReturnsDeletedValueViaCompare(): class C: def __lt__(self, other): nonlocal a del a return "<some_repr>" c = C() a = 1 c < None return a try: someFunctionThatReturnsDeletedValueViaCompare() except UnboundLocalError: print("OK, object compare correctly deleted an item.") else: print("Ouch.!") # TODO: The "del" operation may surrect a variable value by "__del__". # TODO: There must be way more than these.
def some_function_that_returns_deleted_value_via_attribute_lookup(): class C: def __getattr__(self, attr_name): nonlocal a del a c = c() a = 1 c.something return a try: some_function_that_returns_deleted_value_via_attribute_lookup() except UnboundLocalError: print('OK, object attribute look-up correctly deleted an item.') else: print('Ouch.!') def some_function_that_returns_deleted_value_via_attribute_setting(): class C: def __setattr__(self, attr_name, value): nonlocal a del a c = c() a = 1 c.something = 1 return a try: some_function_that_returns_deleted_value_via_attribute_setting() except UnboundLocalError: print('OK, object attribute setting correctly deleted an item.') else: print('Ouch.!') def some_function_that_returns_deleted_value_via_attribute_del(): class C: def __delattr__(self, attr_name): nonlocal a del a return True c = c() a = 1 del c.something return a try: some_function_that_returns_deleted_value_via_attribute_del() except UnboundLocalError: print('OK, object attribute del correctly deleted an item.') else: print('Ouch.!') def some_function_that_returns_deleted_value_via_item_lookup(): class C: def __getitem__(self, attr_name): nonlocal a del a c = c() a = 1 c[2] return a try: some_function_that_returns_deleted_value_via_item_lookup() except UnboundLocalError: print('OK, object subscript look-up correctly deleted an item.') else: print('Ouch.!') def some_function_that_returns_deleted_value_via_item_setting(): class C: def __setitem__(self, attr_name, value): nonlocal a del a c = c() a = 1 c[2] = 3 return a try: some_function_that_returns_deleted_value_via_item_setting() except UnboundLocalError: print('OK, object subscript setting correctly deleted an item.') else: print('Ouch.!') def some_function_that_returns_deleted_value_via_item_del(): class C: def __delitem__(self, attr_name): nonlocal a del a c = c() a = 1 del c[2] return a try: some_function_that_returns_deleted_value_via_item_del() except UnboundLocalError: print('OK, object subscript del correctly deleted an item.') else: print('Ouch.!') def some_function_that_returns_deleted_value_via_call(): class C: def __call__(self): nonlocal a del a c = c() a = 1 c() return a try: some_function_that_returns_deleted_value_via_call() except UnboundLocalError: print('OK, object call correctly deleted an item.') else: print('Ouch.!') def some_function_that_returns_deleted_value_via_add(): class C: def __add__(self, other): nonlocal a del a c = c() a = 1 c += 1 return a try: some_function_that_returns_deleted_value_via_add() except UnboundLocalError: print('OK, object add correctly deleted an item.') else: print('Ouch.!') def some_function_that_returns_deleted_value_via_sub(): class C: def __add__(self, other): nonlocal a del a c = c() a = 1 c += 1 return a try: some_function_that_returns_deleted_value_via_sub() except UnboundLocalError: print('OK, object sub correctly deleted an item.') else: print('Ouch.!') def some_function_that_returns_deleted_value_via_not(): class C: def __bool__(self): nonlocal a del a return False c = c() a = 1 not c return a try: some_function_that_returns_deleted_value_via_not() except UnboundLocalError: print('OK, object not correctly deleted an item.') else: print('Ouch.!') def some_function_that_returns_deleted_value_via_repr(): class C: def __repr__(self): nonlocal a del a return '<some_repr>' c = c() a = 1 repr(c) return a try: some_function_that_returns_deleted_value_via_repr() except UnboundLocalError: print('OK, object repr correctly deleted an item.') else: print('Ouch.!') def some_function_that_returns_deleted_value_via_str(): class C: def __str__(self): nonlocal a del a return '<some_repr>' c = c() a = 1 str(c) return a try: some_function_that_returns_deleted_value_via_str() except UnboundLocalError: print('OK, object str correctly deleted an item.') else: print('Ouch.!') def some_function_that_returns_deleted_value_via_compare(): class C: def __lt__(self, other): nonlocal a del a return '<some_repr>' c = c() a = 1 c < None return a try: some_function_that_returns_deleted_value_via_compare() except UnboundLocalError: print('OK, object compare correctly deleted an item.') else: print('Ouch.!')
class Solution: def XXX(self, n: int) -> int: nums=[] nums.append(1) nums.append(2) if n>2: for i in range(2,n,1): nums.append( nums[-1] + nums[-2] ) return nums[n-1]
class Solution: def xxx(self, n: int) -> int: nums = [] nums.append(1) nums.append(2) if n > 2: for i in range(2, n, 1): nums.append(nums[-1] + nums[-2]) return nums[n - 1]
def foo(): def bar(): def baz(): pass # baz 1 # baz 2 # baz 3 # bar # foo
def foo(): def bar(): def baz(): pass
# Write a function on_all that applies a function to every element of a list. # Use it to print the first twenty perfect squares. # The perfect squares can be found by multiplying each natural number with itself. # The first few perfect squares are 1*1= 1, 2*2=4, 3*3=9, 4*4=16. # Twelve for example is not a perfect square because there is no natural number m so that m*m=12. # (This question is tricky if your programming language makes it difficult to pass functions as arguments.) def check_so_hoan_hao(a): for i in range(int(a) + 1): if (i * i == a): return a def nhap(n, a): for i in range(n): x = int(input("nhap phan tu thu " + str(i + 1) + ": ")) a.append(x) def tim_so_hoan_hao(a): print("so hoan hao trong list:", end=" ") for i in a: if (check_so_hoan_hao(i) == i): print(i, end=" ") my_list = [] n = int(input("nhap so phan tu: ")) nhap(n, my_list) print("my_list = ", my_list) tim_so_hoan_hao(my_list)
def check_so_hoan_hao(a): for i in range(int(a) + 1): if i * i == a: return a def nhap(n, a): for i in range(n): x = int(input('nhap phan tu thu ' + str(i + 1) + ': ')) a.append(x) def tim_so_hoan_hao(a): print('so hoan hao trong list:', end=' ') for i in a: if check_so_hoan_hao(i) == i: print(i, end=' ') my_list = [] n = int(input('nhap so phan tu: ')) nhap(n, my_list) print('my_list = ', my_list) tim_so_hoan_hao(my_list)
class Node: def __init__(self,value, next=None): self.value = value self.next = next self.read = 0 class Queue: def __init__(self, front=None, rear=None): self.front = front self.rear = rear def enqueue(self, value): node = Node(value) if not self.front: self.front = node self.rear = self.front else: self.rear.next = node self.rear = node def dequeue(self): if not self.front: return else: temp = self.front.value self.front = self.front.next return temp class Edge: def __init__(self,end, weight=0): self.end = end self.weight = weight class Graph: def __init__(self): self._adjacency_list = {} def add_vertex(self,value): vertex = Node(value) self._adjacency_list[vertex] = [] return vertex def add_edge(self, start, end, weight=0): if not start in self._adjacency_list: raise Exception('start vertex not in graph') if not end in self._adjacency_list: raise Exception('end vertex not in graph') edge = Edge(end, weight) self._adjacency_list[start].append(edge) def breadth_first_traversal(self,start): output = "" queue = Queue() start.read = 1 queue.enqueue(start) while queue.front: current = queue.dequeue() output += f"{current.value}" for edge in self._adjacency_list[current]: if not edge.end.read: edge.end.read = 1 queue.enqueue(edge.end) return output
class Node: def __init__(self, value, next=None): self.value = value self.next = next self.read = 0 class Queue: def __init__(self, front=None, rear=None): self.front = front self.rear = rear def enqueue(self, value): node = node(value) if not self.front: self.front = node self.rear = self.front else: self.rear.next = node self.rear = node def dequeue(self): if not self.front: return else: temp = self.front.value self.front = self.front.next return temp class Edge: def __init__(self, end, weight=0): self.end = end self.weight = weight class Graph: def __init__(self): self._adjacency_list = {} def add_vertex(self, value): vertex = node(value) self._adjacency_list[vertex] = [] return vertex def add_edge(self, start, end, weight=0): if not start in self._adjacency_list: raise exception('start vertex not in graph') if not end in self._adjacency_list: raise exception('end vertex not in graph') edge = edge(end, weight) self._adjacency_list[start].append(edge) def breadth_first_traversal(self, start): output = '' queue = queue() start.read = 1 queue.enqueue(start) while queue.front: current = queue.dequeue() output += f'{current.value}' for edge in self._adjacency_list[current]: if not edge.end.read: edge.end.read = 1 queue.enqueue(edge.end) return output
class parser_base(object): def __init__(self, file_body, **kwargs): # self.body = file_body # Include any optional key word arguments that were provided in # the instance dictionary self.__dict__.update(kwargs) # Initialize the dictionary that will receive parsed items self.parsed = {} # Override this in parser subclasses to implement parsers for different form types. def _parsing_work_function(self): # Get all the real work done here and in other internal functions # For example, set a test entry in the self.parsed dictionary # self.parsed['test'] = 'pass' pass def parse(self): # Call one or more internal functions that will populate the # self.parsed dictionary self._parsing_work_function() # Return the dictionary of parsed items. return self.parsed
class Parser_Base(object): def __init__(self, file_body, **kwargs): self.body = file_body self.__dict__.update(kwargs) self.parsed = {} def _parsing_work_function(self): pass def parse(self): self._parsing_work_function() return self.parsed
# Definition for a binary tree node. class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None def lowestCommonAncestor(root: 'TreeNode', p: 'TreeNode', q: 'TreeNode') -> 'TreeNode': result = root while True : if p.val < result.val and q.val < result.val : result = result.left elif p.val > result.val and q.val > result.val : result = result.right else : return result if __name__ == "__main__" : node = TreeNode(3) node.left = TreeNode(5) node.right = TreeNode(1) node.left.left = TreeNode(6) node.left.right = TreeNode(2) node.left.right.left = TreeNode(7) node.left.right.right = TreeNode(4) node.right.left = TreeNode(0) node.right.right = TreeNode(8) p = TreeNode(5) q = TreeNode(1) result = lowestCommonAncestor(node,p,q) print(result.val)
class Treenode: def __init__(self, x): self.val = x self.left = None self.right = None def lowest_common_ancestor(root: 'TreeNode', p: 'TreeNode', q: 'TreeNode') -> 'TreeNode': result = root while True: if p.val < result.val and q.val < result.val: result = result.left elif p.val > result.val and q.val > result.val: result = result.right else: return result if __name__ == '__main__': node = tree_node(3) node.left = tree_node(5) node.right = tree_node(1) node.left.left = tree_node(6) node.left.right = tree_node(2) node.left.right.left = tree_node(7) node.left.right.right = tree_node(4) node.right.left = tree_node(0) node.right.right = tree_node(8) p = tree_node(5) q = tree_node(1) result = lowest_common_ancestor(node, p, q) print(result.val)
if __name__ == '__main__': a = int(input()) b = int(input()) int_result = int(a/b) float_result = a/b print(int_result) print(float_result)
if __name__ == '__main__': a = int(input()) b = int(input()) int_result = int(a / b) float_result = a / b print(int_result) print(float_result)
#!/usr/bin/python # egyptian opentype generator data qcontrols = ['vj','hj','ts','bs','te','be','om','ss','se','cb','ce','cre','cfb','cfe','hwtb','hwte','hwttb','hwtte','hwtbb','hwtbe','hwtfb','hwtfe','dottedcircle','O33aEL','O33aER','O33aEB'] featurename = { 'abvs' : {'prefix':'ab','name':'Above-base Substitutions','type':'GSUB'}, 'blws' : {'prefix':'bl','name':'Below-base Substitutions','type':'GSUB'}, 'haln' : {'prefix':'ha','name':'Halant Forms','type':'GSUB'}, 'mark' : {'prefix':'ma','name':'Mark Positioning','type':'GPOS'}, 'mkmk' : {'prefix':'mk','name':'Mark to Mark Positioning','type':'GPOS'}, 'pres' : {'prefix':'pr','name':'Pre-base Substitutions','type':'GSUB'}, 'psts' : {'prefix':'ps','name':'Post-base Substitutions','type':'GSUB'}, 'rlig' : {'prefix':'rl','name':'Required Ligatures','type':'GSUB'}, 'rtlm' : {'prefix':'rt','name':'Right-to-left mirrored forms','type':'GSUB'}, 'vrt2' : {'prefix':'vr','name':'Vertical Alternates and Rotation','type':'GSUB'} } groupdata = { 'bases_all' : ['quadratBases','quadratCartouches','quadratFortifieds','quadratCartouchesV','quadratFortifiedsV'], 'cartoucheendsL' : ['csL','creL','ceL','hwtsL','hwteL','hwttsL','hwtteL','hwtbsL','hwtbeL','cfsL', 'cfeL','hfsL','hfeL','O33aEL'], 'cartoucheendsR' : ['csR','creR','ceR','hwtsR','hwteR','hwttsR','hwtteR','hwtbsR','hwtbeR','cfsR', 'cfeR','hfsR','hfeR','O33aER'], 'cartoucheendsV' : ['csT','creB','ceB','hwtsT','hwteB','hwttsT','hwtteB','hwtbsT','hwtbeB','cfsT', 'cfeB','hfsT','hfeB','O33aEB'], 'characters_all' : ['GB1'], # 'cobras' : ['F20','I1','I10','I11','I31','M10','V22','V23','V23a'], 'colCounter' : ['hj2B','hj1B','hj0B','h0'], 'colspacers0' : ['c0s4p0','c0s3p0','c0s2p0','c0s1p5','c0s1p0','c0s0p5','c0s0p66','c0s0p33','c0s0p25'], 'colspacers0R' : ['c0s4p0R','c0s3p0R','c0s2p0R','c0s1p5R','c0s1p0R','c0s0p5R','c0s0p66R','c0s0p33R','c0s0p25R'], 'colspacers1' : ['c1s3p0','c1s2p0','c1s1p0','c1s0p5','c1s0p33'], 'colspacers1R' : ['c1s3p0R','c1s2p0R','c1s1p0R','c1s0p5R','c1s0p33R'], 'colspacers2' : ['c2s1p0'], 'colspacers2R' : ['c2s1p0R'], 'color_all' : [], 'controls_a' : ['controls_joiners','ss','se'], 'controls_b' : ['hj1A','vj1A','hj0A','vj0A','hj2A','vj2A','corners0a','corners1a','om0A','om1A'], 'controls_ng': ['Qi','Qf','m0','cleanup','ins1l0','ins1','et00','dda','mn5','mn4','mn3','mn2','mn1','ub','it00','it00a'], #controls not grouped for injection 'controls_joiners' : ['hj','vj','ts','te','bs','be','om'], 'cornerglyphs' : [], 'corners' : ['ts','te','bs','be'], 'corners0a' : ['its0A','ibs0A','ite0A','ibe0A','om0A'], 'corners0b' : ['its0B','ibs0B','ite0B','ibe0B','om0B'], 'corners0bNotOM' : ['its0B','ibs0B','ite0B','ibe0B'], 'corners1a' : ['its1A','ibs1A','ite1A','ibe1A','om1A'], 'corners1b' : ['its1B','ibs1B','ite1B','ibe1B','om1B'], 'corners1bNotOM' : ['its1B','ibs1B','ite1B','ibe1B'], 'counters_h' : ['ch0','ch1','ch2','ch3','ch4','ch5','ch6','ch7','ch8','ch9','ch10','ch11','ch12','ch13','ch14','ch15','ch16','ch17','ch18','ch19','ch20','ch21','ch22','ch23','ch24','ch25','ch26','ch27','ch28','ch29','ch30','ch31','ch32','ch33','ch34','ch35','ch36','chb'], 'counters_v' : ['cv0','cv1','cv2','cv3','cv4','cv5','cv6','cv7','cv8','cv9','cv10','cv11','cv12','cv13','cv14','cv15','cv16','cv17','cv18','cv19','cv20','cv21','cv22','cv23','cv24','cv25','cv26','cv27','cv28','cv29','cv30','cv31','cv32','cv33','cv34','cv35','cv36','cvb'], 'deltas' : ['dv1','dv2','dv3','dv4','dv5','dv6','dv7','dv8','dv9','dv10','dv11','dv12','dv13','dv14','dv15','dv16','dv17','dv18','dv19','dv20','dv21','dv22','dv23','dv24','dv25','dv26','dv27','dv28','dv29','dv30'], 'deltas_sp' : ['ds5','ds4','ds3','ds2','ds1'], 'deltas_cells' : ['dCells','en_all'], 'deltas_spacers' : ['spacers_deltarows','cs0','rs0'], 'deltas_all' : ['dd1','dv0','deltas','th6','th5','th4','th3','th2'], 'dCells' : ['dc0','dc1','dc2','dc3','dc4','dc5'], 'eh_all' : ['eh1','eh2','eh3','eh4','eh5','eh6','eh7','eh8'], 'en_all' : ['en1','en2','en3','en4','en5','en6','enb'], 'et_all' : ['et11','et12','et13','et14','et15','et16','et21','et22','et23','et24','et25','et26','et31','et32','et33','et34','et35','et36','et41','et42','et43','et44','et45','et46','et51','et52','et53','et54','et55','et56','et61','et62','et63','et64','et65','et66','et71','et72','et73','et74','et75','et76','et81','et82','et83','et84','et85','et86'], 'ev_all' : ['ev1','ev2','ev3','ev4','ev5','ev6'], 'expansionheights' : ['xv1','xv2','xv3','xv4','xv5'], 'expansion_lvl0' : ['rowplus','expansionheights','r0eA'], 'expansion_lvl1' : ['rowplus','expansionheights','r1eA'], 'expansion_lvl2' : ['rowplus','expansionheights','r2eA'], 'glyphs_all' : ['placeholder'], 'groupCounters' : ['grp0','grp1','grp2'], 'horizontals2' : ['eh_all','h1','h2','h3','h4','h5','h6','h7','h8'], 'insertionmarkers': ['ima','imb','im0'], 'insertionsizes1' : [ 'it11','it12','it13','it14','it15','it16','it21','it22','it23','it24','it25','it26','it31','it32','it33','it34','it35','it36','it41','it42','it43','it44','it45','it46','it51','it52','it53','it54','it55','it56','it61','it62','it63','it64','it65','it66'], 'insertionsizes1R' : [ 'it11R' ,'it12R' ,'it13R' ,'it14R' ,'it15R' ,'it16R' ,'it21R' ,'it22R' ,'it23R' ,'it24R' ,'it25R' ,'it26R' ,'it31R' ,'it32R' ,'it33R' ,'it34R' ,'it35R' ,'it36R' ,'it41R' ,'it42R' ,'it43R' ,'it44R' ,'it45R' ,'it46R' ,'it51R' ,'it52R' ,'it53R' ,'it54R' ,'it55R' ,'it56R' ,'it61R' ,'it62R' ,'it63R' ,'it64R' ,'it65R' ,'it66R'], 'insertionsizes2' : [ 'it211' ,'it212' ,'it213' ,'it214' ,'it215' ,'it216' ,'it221' ,'it222' ,'it223' ,'it224' ,'it225' ,'it226' ,'it231' ,'it232' ,'it233' ,'it234' ,'it235' ,'it236' ,'it241' ,'it242' ,'it243' ,'it244' ,'it245' ,'it246' ,'it251' ,'it252' ,'it253' ,'it254' ,'it255' ,'it256' ,'it261' ,'it262' ,'it263' ,'it264' ,'it265' ,'it266'], 'insertionsizes2R' : [ 'it211R','it212R','it213R','it214R','it215R','it216R','it221R','it222R','it223R','it224R','it225R','it226R','it231R','it232R','it233R','it234R','it235R','it236R','it241R','it242R','it243R','it244R','it245R','it246R','it251R','it252R','it253R','it254R','it255R','it256R','it261R','it262R','it263R','it264R','it265R','it266R'], 'insertions' : ['insertionmarkers','insertionsizes1a'], 'minsizes' : [ 'mt11','mt12','mt13','mt14','mt15','mt16','mt21','mt22','mt23','mt24','mt25','mt26','mt31','mt32','mt33','mt34','mt35','mt36','mt41','mt42','mt43','mt44','mt45','mt46','mt51','mt52','mt53','mt54','mt55','mt56','mt61','mt62','mt63','mt64','mt65','mt66', 'su'], 'mirror_all' : [], 'multicorners1' : ['shapes_ts','shapes_bs','shapes_te','shapes_be','it00','cornerglyphs','c0eA'], 'multicorners2' : ['shapes_ts2','shapes_bs2','shapes_te2','shapes_be2','it00','cornerglyphs','c1eA'], 'normalize' : ['dn1','dn2','dn3','dn4','dn5','hn1','hn2','hn3','hn4','hn5'], 'parens' : ['parens_h','parens_v','corners0a','corners1a','om0A'], 'parensub' : ['parens_h','parens_v','corners0a','corners1a','om0A','su'], 'parens_h' : ['c0bA','c0eA','c1bA','c1eA','c2bA','c2eA'], 'parens_v' : ['r0bA','r0eA','r1bA','r1eA','r2bA','r2eA'], 'quadratBases' : ['QB1','QB2','QB3','QB4','QB5','QB6','QB7','QB8'], 'quadratCartouches' : ['QC1','QC2','QC3','QC4','QC5','QC6','QC7','QC8'], 'quadratCartouchesV' : ['QC1V','QC2V','QC3V','QC4V','QC5V','QC6V','QC7V','QC8V'], 'quadratFortifieds' : ['QF1','QF2','QF3','QF4','QF5','QF6','QF7','QF8'], 'quadratFortifiedsV' : ['QF1V','QF2V','QF3V','QF4V','QF5V','QF6V','QF7V','QF8V'], 'rowCounter' : ['vj0B','vj1B','vj2B','v0'], 'rowmaxes' : ['rm1','rm2','rm3','rm4','rm5','rm6','rm7','rm8','rc0','minsizes'], 'rowplus' : ['rp1','rp2','rp3','rp4','rp5'], 'rowspacers0' : ['r0s4p0','r0s3p0','r0s2p0','r0s1p5','r0s1p0','r0s0p5','r0s0p66','r0s0p33','r0s0p25'], 'rowspacers0R' : ['r0s4p0R','r0s3p0R','r0s2p0R','r0s1p5R','r0s1p0R','r0s0p5R','r0s0p66R','r0s0p33R','r0s0p25R'], 'rowspacers1' : ['r1s4p0','r1s3p0','r1s2p0','r1s1p0','r1s0p5','r1s0p33'], 'rowspacers1R' : ['r1s4p0R','r1s3p0R','r1s2p0R','r1s1p0R','r1s0p5R','r1s0p33R'], 'rowspacers2' : ['r2s1p0'], 'rowspacers2R' : ['r2s1p0R'], 'shapes_0' : ['o86','o85','o84','o83','o82','o81','o76','o75','o74','o73','o72','o71','o66','o65','o64','o63','o62','o61','o56','o55','o54','o53','o52','o51','o46','o45','o44','o43','o42','o41','o36','o35','o34','o33','o32','o31','o26','o25','o24','o23','o22','o21','o16','o15','o14','o13','o12','o11'], 'shapes_1' : ['s66','s65','s64','s63','s62','s61','s56','s55','s54','s53','s52','s51','s46','s45','s44','s43','s42','s41','s36','s35','s34','s33','s32','s31','s26','s25','s24','s23','s22','s21','s16','s15','s14','s13','s12','s11'], 'shapes_2' : ['i66','i65','i64','i63','i62','i61','i56','i55','i54','i53','i52','i51','i46','i45','i44','i43','i42','i41','i36','i35','i34','i33','i32','i31','i26','i25','i24','i23','i22','i21','i16','i15','i14','i13','i12','i11'], 'shapeinsertions0' : ['shapes_0','ih0','iv0','shapes_ts','shapes_bs','shapes_te','shapes_be','shapes_om'], 'shapeinsertions1' : ['shapes_1','shapes_ts2','shapes_bs2','shapes_te2','shapes_be2','shapes_om2'], # ih0 and iv0 not included. . . 'insertionsizes' : ['ih1','ih2','ih3','ih4','ih5','ih6','iv2','iv3','iv4','iv5','iv6'], 'shapes_insert0_POS' : ['o66','o65','o64','o63','o62','o56','o55','o54','o53','o52','o46','o45','o44','o43','o42','o36','o35','o34','o33','o32','o26','o25','o24','o23','o22'], 'shapes_ts' : ['ts66','ts65','ts64','ts63','ts62','ts56','ts55','ts54','ts53','ts52','ts46','ts45','ts44','ts43','ts42','ts36','ts35','ts34','ts33','ts32','ts26','ts25','ts24','ts23','ts22'], 'shapes_bs' : ['bs66','bs65','bs64','bs63','bs62','bs56','bs55','bs54','bs53','bs52','bs46','bs45','bs44','bs43','bs42','bs36','bs35','bs34','bs33','bs32','bs26','bs25','bs24','bs23','bs22'], 'shapes_te' : ['te66','te65','te64','te63','te62','te56','te55','te54','te53','te52','te46','te45','te44','te43','te42','te36','te35','te34','te33','te32','te26','te25','te24','te23','te22'], 'shapes_be' : ['be66','be65','be64','be63','be62','be56','be55','be54','be53','be52','be46','be45','be44','be43','be42','be36','be35','be34','be33','be32','be26','be25','be24','be23','be22'], 'shapes_om' : ['om66','om65','om64','om63','om62','om61','om56','om55','om54','om53','om52','om51','om46','om45','om44','om43','om42','om41','om36','om35','om34','om33','om32','om31','om26','om25','om24','om23','om22','om21','om16','om15','om14','om13','om12','om11'], 'shapes_ts2' : ['ts266','ts265','ts264','ts263','ts262','ts256','ts255','ts254','ts253','ts252','ts246','ts245','ts244','ts243','ts242','ts236','ts235','ts234','ts233','ts232','ts226','ts225','ts224','ts223','ts222'], 'shapes_bs2' : ['bs266','bs265','bs264','bs263','bs262','bs256','bs255','bs254','bs253','bs252','bs246','bs245','bs244','bs243','bs242','bs236','bs235','bs234','bs233','bs232','bs226','bs225','bs224','bs223','bs222'], 'shapes_te2' : ['te266','te265','te264','te263','te262','te256','te255','te254','te253','te252','te246','te245','te244','te243','te242','te236','te235','te234','te233','te232','te226','te225','te224','te223','te222'], 'shapes_be2' : ['be266','be265','be264','be263','be262','be256','be255','be254','be253','be252','be246','be245','be244','be243','be242','be236','be235','be234','be233','be232','be226','be225','be224','be223','be222'], 'shapes_om2' : ['om266','om265','om264','om263','om262','om261','om256','om255','om254','om253','om252','om251','om246','om245','om244','om243','om242','om241','om236','om235','om234','om233','om232','om231','om226','om225','om224','om223','om222','om221','om216','om215','om214','om213','om212','om211'], 'shapes_corners_1' : ['shapes_ts','shapes_bs','shapes_te','shapes_be'], 'shapes_cornersom_1' : ['shapes_ts','shapes_bs','shapes_te','shapes_be','shapes_om'], 'shapes_corners_2' : ['shapes_ts2','shapes_bs2','shapes_te2','shapes_be2'], 'shapes_cornersom_2' : ['shapes_ts2','shapes_bs2','shapes_te2','shapes_be2','shapes_om2'], # Unbalanced shapes are used in corner insertions and need to be split so they can be reversed for RTL in mkmk 'shapes_u' : ['es66','es65','es64','es63','es62','es61','es56','es55','es54','es53','es52','es51','es46','es45','es44','es43','es42','es41','es36','es35','es34','es33','es32','es31','es26','es25','es24','es23','es22','es21','es16','es15','es14','es13','es12','es11'], 'shapes_ls' : ['ls66','ls65','ls64','ls63','ls62','ls61','ls56','ls55','ls54','ls53','ls52','ls51','ls46','ls45','ls44','ls43','ls42','ls41','ls36','ls35','ls34','ls33','ls32','ls31','ls26','ls25','ls24','ls23','ls22','ls21','ls16','ls15','ls14','ls13','ls12','ls11'], 'shapewidths' : ['sh0','sh1','sh2','sh3','sh4','sh5','sh6','sh7','sh8'], 'shapeheights' : ['sv0','sv1','sv2','sv3','sv4','sv5','sv6'], 'spacers_cols0' : ['cs0','c0s1p0','c0s0p5','c0s0p66','c0s0p33','c0s0p25'], # ORDER OF THESE ITEMS IS IMPORTANT 'spacers_cols1' : ['cs0','c1s1p0','c1s0p5','cs0','c1s0p33','cs0'], # ORDER OF THESE ITEMS IS IMPORTANT 'spacers_cols2' : ['cs0','c2s1p0','cs0','cs0','cs0','cs0'], # ORDER OF THESE ITEMS IS IMPORTANT 'spacers_deltas' : ['ds0','ds1p0','ds0p5','ds0p66','ds0p33','ds0p25'], # ORDER OF THESE ITEMS IS IMPORTANT 'spacers_rows0' : ['rs0','r0s4p0','r0s3p0','r0s2p0','r0s1p5','r0s1p0','r0s0p5','r0s0p66','r0s0p33','r0s0p25'], # ORDER OF THESE ITEMS IS IMPORTANT 'spacers_rows1' : ['rs0','r1s4p0','r1s3p0','r1s2p0','rs0','r1s1p0','r1s0p5','rs0','r1s0p33','rs0'], # ORDER OF THESE ITEMS IS IMPORTANT 'spacers_rows2' : ['rs0','rs0','rs0','rs0','rs0','r2s1p0','rs0','rs0','rs0','rs0'], # ORDER OF THESE ITEMS IS IMPORTANT 'spacers_deltarows': ['ds0','ds4p0','ds3p0','ds2p0','ds1p5','ds1p0','ds0p5','ds0p66','ds0p33','ds0p25'], # ORDER OF THESE ITEMS IS IMPORTANT 'stems0-h' : ['c0h1', 'c0h2', 'c0h3', 'c0h4', 'c0h5', 'c0h6', 'c0h7', 'c0h8', 'colspacers0', 'r0eB'], 'stems0-hR' : ['c0h1R','c0h2R','c0h3R','c0h4R','c0h5R','c0h6R','c0h7R','c0h8R','colspacers0R','r0eBR'], 'stems0-v' : ['r0v1', 'r0v2', 'r0v3', 'r0v4', 'r0v5', 'r0v6', 'rowspacers0'], 'stems0-vR' : ['r0v1R','r0v2R','r0v3R','r0v4R','r0v5R','r0v6R','rowspacers0R'], 'stems1-h' : ['c1h1', 'c1h2', 'c1h3', 'c1h4', 'c1h5', 'c1h6', 'colspacers1','r1eB'], 'stems1-hR' : ['c1h1R','c1h2R','c1h3R','c1h4R','c1h5R','c1h6R','colspacers1R','r1eBR'], 'stems1-v' : ['r1v1', 'r1v2', 'r1v3', 'r1v4', 'r1v5', 'r1v6', 'rowspacers1','insertionsizes1','r1sep'], 'stems1-vx' : ['r1v1', 'r1v2', 'r1v3', 'r1v4', 'r1v5', 'r1v6', 'rowspacers1','insertionsizes1','r1sep','c0eA','shapes_corners_1'], #NEED R VERSION 'stems1-vR' : ['r1v1R','r1v2R','r1v3R','r1v4R','r1v5R','r1v6R','rowspacers1R','insertionsizes1R','r1sepR'], 'stems2-h' : ['c2h1', 'c2h2', 'c2h3', 'c2h4', 'c2h5', 'c2h6', 'colspacers2', 'r2eB'], 'stems2-hR' : ['c2h1R','c2h2R','c2h3R','c2h4R','c2h5R','c2h6R','colspacers2R','r2eBR'], 'stems2-v' : ['r2v1', 'r2v2', 'r2v3', 'r2v4', 'r2v5', 'r2v6', 'r2vb','rowspacers2','insertionsizes2','r2sep'], 'stems2-vx' : ['r2v1', 'r2v2', 'r2v3', 'r2v4', 'r2v5', 'r2v6', 'r2vb','rowspacers2','insertionsizes2','r2sep','c0eA','shapes_corners_2'], #NEED R VERSION 'stems2-vR' : ['r2v1R','r2v2R','r2v3R','r2v4R','r2v5R','r2v6R','r2vbR','rowspacers2R','insertionsizes2R','r2sepR'], 'stems_12' : ['stems1-h','stems1-v','stems2-h','stems2-v','ub'], 'targets' : ['t86','t85','t84','t83','t82','t81','t76','t75','t74','t73','t72','t71','t66','t65','t64','t63','t62','t61','t56','t55','t54','t53','t52','t51','t46','t45','t44','t43','t42','t41','t36','t35','t34','t33','t32','t31','t26','t25','t24','t23','t22','t21','t16','t15','t14','t13','t12','t11'], #Not in use 'targetwidth' : ['trg1','trg2','trg3','trg4','trg5','trg6'], 'verticals2' : ['v1','v2','v3','v4','v5','v6','deltas_sp'], 'vss' : ['VS1','VS2','VS3'], 'genericbases' : ['dottedcircle'] } basetypes = ['dottedcircle','QB1','QB2','QB3','QB4','QB5','QB6','QB7','QB8', 'QC1','QC2','QC3','QC4','QC5','QC6','QC7','QC8', 'QF1','QF2','QF3','QF4','QF5','QF6','QF7','QF8', 'QC1V','QC2V','QC3V','QC4V','QC5V','QC6V','QC7V','QC8V', 'QF1V','QF2V','QF3V','QF4V','QF5V','QF6V','QF7V','QF8V', 'csL','creL','ceL','hwtsL','hwteL','hwttsL','hwtteL','hwtbsL','hwtbeL','cfsL', 'cfeL','hfsL','hfeL','O33aEL', 'csR','creR','ceR','hwtsR','hwteR','hwttsR','hwtteR','hwtbsR','hwtbeR','cfsR', 'cfeR','hfsR','hfeR','O33aER', 'csT','creB','ceB','hwtsT','hwteB','hwttsT','hwtteB','hwtbsT','hwtbeB','cfsT', 'cfeB','hfsT','hfeB','O33aEB', 'Qf','Qi','vjV','hjV','tsV','bsV','teV','beV','omV','ssV','seV' ] internalmirrors = { 'C2':'C2c','C2c':'C2','C2a':'C2b','C2b':'C2a','C12':'C13','C13':'C12','C14':'C15','C15':'C14', 'D54':'D55','D55':'D54','F46':'F47','F46a':'F47a','F47':'F46','F47a':'F46a','F48':'F49', 'F49':'F48','L6':'L6a','L6a':'L6','O5':'O5a','O5a':'O5','O50a':'O50b','O50b':'O50a', 'U6a':'U6b','U6b':'U6a','V31':'V31a','V31a':'V31','Y3':'Y4','Y4':'Y3','J7':'J7a','J7a':'J7' } mirroring = { 'A1','A2','A3','A4','A5','A5a','A6','A6a','A6b','A7','A8','A9','A10','A11', 'A12','A13','A14','A14a','A15','A16','A17','A17a','A18','A19','A20','A21','A22', 'A23','A24','A25','A26','A27','A28','A29','A30','A31','A32','A32a','A33','A34', 'A35','A36','A37','A38','A39','A40','A40a','A41','A42','A42a','A43','A43a', 'A44','A45','A45a','A46','A47','A48','A49','A50','A51','A52','A53','A54','A55', 'A56','A57','A58','A59','A60','A61','A62','A63','A64','A65','A66','A67','A68', 'A69','A70','B1','B2','B3','B4','B5','B5a','B6','B7','B8','B9','C1','C3','C4', 'C5','C6','C7','C8','C9','C10','C10a','C11','C16','C17','C18','C19','C20','C21', 'C22','C23','C24','D1','D3', 'D4','D5','D6','D7','D8','D8a','D9','D10','D11','D13','D14','D15','D16','D17', 'D18','D19','D20','D26','D29','D30','D31','D33','D34','D34a','D36','D37','D38', 'D39','D40','D41','D42','D43','D44','D45','D46','D46a','D47','D48','D48a','D49', 'D50','D50a','D50b','D50c','D50d','D50e','D50f','D50g','D50h','D50i','D51', 'D52','D52a','D53','D54a','D56','D57','D58','D59','D60','D61','D62','D63','D64', 'D65','D66','E1','E2','E3','E4','E5','E6','E7','E8','E8a','E9','E9a','E10', 'E11','E12','E13','E14','E15','E16','E16a','E17','E17a','E18','E19','E20', 'E20a','E21','E22','E23','E24','E25','E26','E27','E28','E28a','E29','E30','E31', 'E32','E33','E34','E34a','E36','E37','E38','F1','F1a','F2','F3','F4','F5','F6', 'F7','F8','F9','F10','F11','F12','F14','F15','F16','F17','F18','F19','F20', 'F21','F21a','F22','F23','F24','F25','F26','F27','F29','F30','F32','F33','F37', 'F37a','F38','F38a','F39','F40','F42','F44','F50','F51','F51a','F51b','F51C', 'F52','F53','G1','G2','G3','G4','G5','G6','G6a','G7','G7a','G7b','G8','G9', 'G10','G11','G11a','G12','G13','G14','G15','G16','G17','G18','G19','G20','G20a', 'G21','G22','G23','G24','G25','G26','G26a','G27','G28','G29','G30','G31','G32', 'G33','G34','G35','G36','G36a','G37','G37a','G38','G39','G40','G41','G42','G43', 'G43a','G44','G45','G45a','G46','G47','G48','G49','G50','G51','G52','G53','G54', 'H1','H2','H3','H4','H5','H6','H6a','H7','H8','I1','I2','I3','I4','I5','I5a', 'I6','I7','I8','I9','I9a','I10','I10a','I11','I11a','I12','I13','I14','I15', 'K1','K2','K3','K4','K5','K6','K7','K8','L1','L2','L2a','L3','L4','L5','M1a', 'M1b','M2','M3','M3a','M4','M5','M6','M7','M9','M10','M10a','M11','M12','M12a', 'M12b','M12c','M12d','M12e','M12f','M12g','M12h','M14','M17','M17a','M18','M19', 'M20','M21','M22','M22a','M23','M24','M25','M26','M27','M28','M29','M30','M33', 'M33a','M33B','M36','M37','M38','M40','M40a','M41','M43','N2','N3','N6','N13', 'N20','N21','N22','N23','N29','N32','N34','N34a','N37a','N39','N40','NL1','NL2', 'NL3','NL4','NL5','NL5a','NL6','NL7','NL8','NL9','NL10','NL11','NL12','NL13', 'NL14','NL15','NL16','NL17','NL17a','NL18','NL19','NL20','NU1','NU2','NU3', 'NU4','NU5','NU6','NU7','NU8','NU9','NU10','NU10a','NU11','NU11a','NU12','NU13', 'NU14','NU15','NU16','NU17','NU18','NU18a','NU19','NU20','NU21','NU22','NU22a', 'O3','O4','O6','O7','O8','O9','O10','O10a','O10B','O10C','O11','O12','O13', 'O14','O15','O16','O17','O18','O19','O19a','O20','O29','O30','O30a','O33a', 'O35','O37','O38','O40','O42','O44','O45','O46','O47','O51','P1','P1a','P2', 'P3','P3a','P5','P7','P9','P10','P11','Q1','Q2','Q7','R1','R2','R3','R5','R6', 'R7','R8','R9','R10','R10a','R12','R13','R14','R15','R16','R17','R18','R19', 'R25','R27','R29','S1','S2','S2a','S3','S4','S5','S6','S6a','S7','S8','S9', 'S10','S13','S14a','S14b','S18','S19','S26','S28','S29','S30','S31','S32','S33', 'S37','S38','S39','S40','S41','S44','S45','S46','T1','T2','T4','T5','T6','T7', 'T7a','T11','T12','T13','T14','T15','T16','T16a','T17','T18','T19','T20','T21', 'T24','T25','T26','T27','T29','T30','T31','T32','T32a','T33','T33a','T34','T35', 'T36','U1','U2','U3','U4','U5','U6','U7','U8','U9','U10','U11','U12','U13', 'U14','U15','U16','U17','U18','U19','U20','U21','U24','U25','U29a','U30','U31', 'U32','U32a','U33','U35','U37','U38','U39','U40','V1','V1a','V1b','V1c','V1d', 'V1e','V1f','V1g','V1h','V1i','V2','V2a','V3','V4','V10','V11','V11a','V11B', 'V11C','V12','V12a','V12B','V13','V14','V15','V21','V22','V23','V23a','V25', 'V28a','V29a','V33','V34','V35','V36','V37','V37a','V40','V40a','W9','W9a', 'W10a','W14a','W15','W16','W17a','W20','W25','X5','X6a','X7','Y1a','Y7','Z4', 'Z5','Z5a','Z6','Z7','Z9','Z10','Z12','Z14','Z16d','Z16f','J2','J3', 'J4','J7b','J10','J11','J13','J14','J15','J16','J17','J18','J22','J26','J28', 'J29','J31','J32' }
qcontrols = ['vj', 'hj', 'ts', 'bs', 'te', 'be', 'om', 'ss', 'se', 'cb', 'ce', 'cre', 'cfb', 'cfe', 'hwtb', 'hwte', 'hwttb', 'hwtte', 'hwtbb', 'hwtbe', 'hwtfb', 'hwtfe', 'dottedcircle', 'O33aEL', 'O33aER', 'O33aEB'] featurename = {'abvs': {'prefix': 'ab', 'name': 'Above-base Substitutions', 'type': 'GSUB'}, 'blws': {'prefix': 'bl', 'name': 'Below-base Substitutions', 'type': 'GSUB'}, 'haln': {'prefix': 'ha', 'name': 'Halant Forms', 'type': 'GSUB'}, 'mark': {'prefix': 'ma', 'name': 'Mark Positioning', 'type': 'GPOS'}, 'mkmk': {'prefix': 'mk', 'name': 'Mark to Mark Positioning', 'type': 'GPOS'}, 'pres': {'prefix': 'pr', 'name': 'Pre-base Substitutions', 'type': 'GSUB'}, 'psts': {'prefix': 'ps', 'name': 'Post-base Substitutions', 'type': 'GSUB'}, 'rlig': {'prefix': 'rl', 'name': 'Required Ligatures', 'type': 'GSUB'}, 'rtlm': {'prefix': 'rt', 'name': 'Right-to-left mirrored forms', 'type': 'GSUB'}, 'vrt2': {'prefix': 'vr', 'name': 'Vertical Alternates and Rotation', 'type': 'GSUB'}} groupdata = {'bases_all': ['quadratBases', 'quadratCartouches', 'quadratFortifieds', 'quadratCartouchesV', 'quadratFortifiedsV'], 'cartoucheendsL': ['csL', 'creL', 'ceL', 'hwtsL', 'hwteL', 'hwttsL', 'hwtteL', 'hwtbsL', 'hwtbeL', 'cfsL', 'cfeL', 'hfsL', 'hfeL', 'O33aEL'], 'cartoucheendsR': ['csR', 'creR', 'ceR', 'hwtsR', 'hwteR', 'hwttsR', 'hwtteR', 'hwtbsR', 'hwtbeR', 'cfsR', 'cfeR', 'hfsR', 'hfeR', 'O33aER'], 'cartoucheendsV': ['csT', 'creB', 'ceB', 'hwtsT', 'hwteB', 'hwttsT', 'hwtteB', 'hwtbsT', 'hwtbeB', 'cfsT', 'cfeB', 'hfsT', 'hfeB', 'O33aEB'], 'characters_all': ['GB1'], 'colCounter': ['hj2B', 'hj1B', 'hj0B', 'h0'], 'colspacers0': ['c0s4p0', 'c0s3p0', 'c0s2p0', 'c0s1p5', 'c0s1p0', 'c0s0p5', 'c0s0p66', 'c0s0p33', 'c0s0p25'], 'colspacers0R': ['c0s4p0R', 'c0s3p0R', 'c0s2p0R', 'c0s1p5R', 'c0s1p0R', 'c0s0p5R', 'c0s0p66R', 'c0s0p33R', 'c0s0p25R'], 'colspacers1': ['c1s3p0', 'c1s2p0', 'c1s1p0', 'c1s0p5', 'c1s0p33'], 'colspacers1R': ['c1s3p0R', 'c1s2p0R', 'c1s1p0R', 'c1s0p5R', 'c1s0p33R'], 'colspacers2': ['c2s1p0'], 'colspacers2R': ['c2s1p0R'], 'color_all': [], 'controls_a': ['controls_joiners', 'ss', 'se'], 'controls_b': ['hj1A', 'vj1A', 'hj0A', 'vj0A', 'hj2A', 'vj2A', 'corners0a', 'corners1a', 'om0A', 'om1A'], 'controls_ng': ['Qi', 'Qf', 'm0', 'cleanup', 'ins1l0', 'ins1', 'et00', 'dda', 'mn5', 'mn4', 'mn3', 'mn2', 'mn1', 'ub', 'it00', 'it00a'], 'controls_joiners': ['hj', 'vj', 'ts', 'te', 'bs', 'be', 'om'], 'cornerglyphs': [], 'corners': ['ts', 'te', 'bs', 'be'], 'corners0a': ['its0A', 'ibs0A', 'ite0A', 'ibe0A', 'om0A'], 'corners0b': ['its0B', 'ibs0B', 'ite0B', 'ibe0B', 'om0B'], 'corners0bNotOM': ['its0B', 'ibs0B', 'ite0B', 'ibe0B'], 'corners1a': ['its1A', 'ibs1A', 'ite1A', 'ibe1A', 'om1A'], 'corners1b': ['its1B', 'ibs1B', 'ite1B', 'ibe1B', 'om1B'], 'corners1bNotOM': ['its1B', 'ibs1B', 'ite1B', 'ibe1B'], 'counters_h': ['ch0', 'ch1', 'ch2', 'ch3', 'ch4', 'ch5', 'ch6', 'ch7', 'ch8', 'ch9', 'ch10', 'ch11', 'ch12', 'ch13', 'ch14', 'ch15', 'ch16', 'ch17', 'ch18', 'ch19', 'ch20', 'ch21', 'ch22', 'ch23', 'ch24', 'ch25', 'ch26', 'ch27', 'ch28', 'ch29', 'ch30', 'ch31', 'ch32', 'ch33', 'ch34', 'ch35', 'ch36', 'chb'], 'counters_v': ['cv0', 'cv1', 'cv2', 'cv3', 'cv4', 'cv5', 'cv6', 'cv7', 'cv8', 'cv9', 'cv10', 'cv11', 'cv12', 'cv13', 'cv14', 'cv15', 'cv16', 'cv17', 'cv18', 'cv19', 'cv20', 'cv21', 'cv22', 'cv23', 'cv24', 'cv25', 'cv26', 'cv27', 'cv28', 'cv29', 'cv30', 'cv31', 'cv32', 'cv33', 'cv34', 'cv35', 'cv36', 'cvb'], 'deltas': ['dv1', 'dv2', 'dv3', 'dv4', 'dv5', 'dv6', 'dv7', 'dv8', 'dv9', 'dv10', 'dv11', 'dv12', 'dv13', 'dv14', 'dv15', 'dv16', 'dv17', 'dv18', 'dv19', 'dv20', 'dv21', 'dv22', 'dv23', 'dv24', 'dv25', 'dv26', 'dv27', 'dv28', 'dv29', 'dv30'], 'deltas_sp': ['ds5', 'ds4', 'ds3', 'ds2', 'ds1'], 'deltas_cells': ['dCells', 'en_all'], 'deltas_spacers': ['spacers_deltarows', 'cs0', 'rs0'], 'deltas_all': ['dd1', 'dv0', 'deltas', 'th6', 'th5', 'th4', 'th3', 'th2'], 'dCells': ['dc0', 'dc1', 'dc2', 'dc3', 'dc4', 'dc5'], 'eh_all': ['eh1', 'eh2', 'eh3', 'eh4', 'eh5', 'eh6', 'eh7', 'eh8'], 'en_all': ['en1', 'en2', 'en3', 'en4', 'en5', 'en6', 'enb'], 'et_all': ['et11', 'et12', 'et13', 'et14', 'et15', 'et16', 'et21', 'et22', 'et23', 'et24', 'et25', 'et26', 'et31', 'et32', 'et33', 'et34', 'et35', 'et36', 'et41', 'et42', 'et43', 'et44', 'et45', 'et46', 'et51', 'et52', 'et53', 'et54', 'et55', 'et56', 'et61', 'et62', 'et63', 'et64', 'et65', 'et66', 'et71', 'et72', 'et73', 'et74', 'et75', 'et76', 'et81', 'et82', 'et83', 'et84', 'et85', 'et86'], 'ev_all': ['ev1', 'ev2', 'ev3', 'ev4', 'ev5', 'ev6'], 'expansionheights': ['xv1', 'xv2', 'xv3', 'xv4', 'xv5'], 'expansion_lvl0': ['rowplus', 'expansionheights', 'r0eA'], 'expansion_lvl1': ['rowplus', 'expansionheights', 'r1eA'], 'expansion_lvl2': ['rowplus', 'expansionheights', 'r2eA'], 'glyphs_all': ['placeholder'], 'groupCounters': ['grp0', 'grp1', 'grp2'], 'horizontals2': ['eh_all', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'h7', 'h8'], 'insertionmarkers': ['ima', 'imb', 'im0'], 'insertionsizes1': ['it11', 'it12', 'it13', 'it14', 'it15', 'it16', 'it21', 'it22', 'it23', 'it24', 'it25', 'it26', 'it31', 'it32', 'it33', 'it34', 'it35', 'it36', 'it41', 'it42', 'it43', 'it44', 'it45', 'it46', 'it51', 'it52', 'it53', 'it54', 'it55', 'it56', 'it61', 'it62', 'it63', 'it64', 'it65', 'it66'], 'insertionsizes1R': ['it11R', 'it12R', 'it13R', 'it14R', 'it15R', 'it16R', 'it21R', 'it22R', 'it23R', 'it24R', 'it25R', 'it26R', 'it31R', 'it32R', 'it33R', 'it34R', 'it35R', 'it36R', 'it41R', 'it42R', 'it43R', 'it44R', 'it45R', 'it46R', 'it51R', 'it52R', 'it53R', 'it54R', 'it55R', 'it56R', 'it61R', 'it62R', 'it63R', 'it64R', 'it65R', 'it66R'], 'insertionsizes2': ['it211', 'it212', 'it213', 'it214', 'it215', 'it216', 'it221', 'it222', 'it223', 'it224', 'it225', 'it226', 'it231', 'it232', 'it233', 'it234', 'it235', 'it236', 'it241', 'it242', 'it243', 'it244', 'it245', 'it246', 'it251', 'it252', 'it253', 'it254', 'it255', 'it256', 'it261', 'it262', 'it263', 'it264', 'it265', 'it266'], 'insertionsizes2R': ['it211R', 'it212R', 'it213R', 'it214R', 'it215R', 'it216R', 'it221R', 'it222R', 'it223R', 'it224R', 'it225R', 'it226R', 'it231R', 'it232R', 'it233R', 'it234R', 'it235R', 'it236R', 'it241R', 'it242R', 'it243R', 'it244R', 'it245R', 'it246R', 'it251R', 'it252R', 'it253R', 'it254R', 'it255R', 'it256R', 'it261R', 'it262R', 'it263R', 'it264R', 'it265R', 'it266R'], 'insertions': ['insertionmarkers', 'insertionsizes1a'], 'minsizes': ['mt11', 'mt12', 'mt13', 'mt14', 'mt15', 'mt16', 'mt21', 'mt22', 'mt23', 'mt24', 'mt25', 'mt26', 'mt31', 'mt32', 'mt33', 'mt34', 'mt35', 'mt36', 'mt41', 'mt42', 'mt43', 'mt44', 'mt45', 'mt46', 'mt51', 'mt52', 'mt53', 'mt54', 'mt55', 'mt56', 'mt61', 'mt62', 'mt63', 'mt64', 'mt65', 'mt66', 'su'], 'mirror_all': [], 'multicorners1': ['shapes_ts', 'shapes_bs', 'shapes_te', 'shapes_be', 'it00', 'cornerglyphs', 'c0eA'], 'multicorners2': ['shapes_ts2', 'shapes_bs2', 'shapes_te2', 'shapes_be2', 'it00', 'cornerglyphs', 'c1eA'], 'normalize': ['dn1', 'dn2', 'dn3', 'dn4', 'dn5', 'hn1', 'hn2', 'hn3', 'hn4', 'hn5'], 'parens': ['parens_h', 'parens_v', 'corners0a', 'corners1a', 'om0A'], 'parensub': ['parens_h', 'parens_v', 'corners0a', 'corners1a', 'om0A', 'su'], 'parens_h': ['c0bA', 'c0eA', 'c1bA', 'c1eA', 'c2bA', 'c2eA'], 'parens_v': ['r0bA', 'r0eA', 'r1bA', 'r1eA', 'r2bA', 'r2eA'], 'quadratBases': ['QB1', 'QB2', 'QB3', 'QB4', 'QB5', 'QB6', 'QB7', 'QB8'], 'quadratCartouches': ['QC1', 'QC2', 'QC3', 'QC4', 'QC5', 'QC6', 'QC7', 'QC8'], 'quadratCartouchesV': ['QC1V', 'QC2V', 'QC3V', 'QC4V', 'QC5V', 'QC6V', 'QC7V', 'QC8V'], 'quadratFortifieds': ['QF1', 'QF2', 'QF3', 'QF4', 'QF5', 'QF6', 'QF7', 'QF8'], 'quadratFortifiedsV': ['QF1V', 'QF2V', 'QF3V', 'QF4V', 'QF5V', 'QF6V', 'QF7V', 'QF8V'], 'rowCounter': ['vj0B', 'vj1B', 'vj2B', 'v0'], 'rowmaxes': ['rm1', 'rm2', 'rm3', 'rm4', 'rm5', 'rm6', 'rm7', 'rm8', 'rc0', 'minsizes'], 'rowplus': ['rp1', 'rp2', 'rp3', 'rp4', 'rp5'], 'rowspacers0': ['r0s4p0', 'r0s3p0', 'r0s2p0', 'r0s1p5', 'r0s1p0', 'r0s0p5', 'r0s0p66', 'r0s0p33', 'r0s0p25'], 'rowspacers0R': ['r0s4p0R', 'r0s3p0R', 'r0s2p0R', 'r0s1p5R', 'r0s1p0R', 'r0s0p5R', 'r0s0p66R', 'r0s0p33R', 'r0s0p25R'], 'rowspacers1': ['r1s4p0', 'r1s3p0', 'r1s2p0', 'r1s1p0', 'r1s0p5', 'r1s0p33'], 'rowspacers1R': ['r1s4p0R', 'r1s3p0R', 'r1s2p0R', 'r1s1p0R', 'r1s0p5R', 'r1s0p33R'], 'rowspacers2': ['r2s1p0'], 'rowspacers2R': ['r2s1p0R'], 'shapes_0': ['o86', 'o85', 'o84', 'o83', 'o82', 'o81', 'o76', 'o75', 'o74', 'o73', 'o72', 'o71', 'o66', 'o65', 'o64', 'o63', 'o62', 'o61', 'o56', 'o55', 'o54', 'o53', 'o52', 'o51', 'o46', 'o45', 'o44', 'o43', 'o42', 'o41', 'o36', 'o35', 'o34', 'o33', 'o32', 'o31', 'o26', 'o25', 'o24', 'o23', 'o22', 'o21', 'o16', 'o15', 'o14', 'o13', 'o12', 'o11'], 'shapes_1': ['s66', 's65', 's64', 's63', 's62', 's61', 's56', 's55', 's54', 's53', 's52', 's51', 's46', 's45', 's44', 's43', 's42', 's41', 's36', 's35', 's34', 's33', 's32', 's31', 's26', 's25', 's24', 's23', 's22', 's21', 's16', 's15', 's14', 's13', 's12', 's11'], 'shapes_2': ['i66', 'i65', 'i64', 'i63', 'i62', 'i61', 'i56', 'i55', 'i54', 'i53', 'i52', 'i51', 'i46', 'i45', 'i44', 'i43', 'i42', 'i41', 'i36', 'i35', 'i34', 'i33', 'i32', 'i31', 'i26', 'i25', 'i24', 'i23', 'i22', 'i21', 'i16', 'i15', 'i14', 'i13', 'i12', 'i11'], 'shapeinsertions0': ['shapes_0', 'ih0', 'iv0', 'shapes_ts', 'shapes_bs', 'shapes_te', 'shapes_be', 'shapes_om'], 'shapeinsertions1': ['shapes_1', 'shapes_ts2', 'shapes_bs2', 'shapes_te2', 'shapes_be2', 'shapes_om2'], 'insertionsizes': ['ih1', 'ih2', 'ih3', 'ih4', 'ih5', 'ih6', 'iv2', 'iv3', 'iv4', 'iv5', 'iv6'], 'shapes_insert0_POS': ['o66', 'o65', 'o64', 'o63', 'o62', 'o56', 'o55', 'o54', 'o53', 'o52', 'o46', 'o45', 'o44', 'o43', 'o42', 'o36', 'o35', 'o34', 'o33', 'o32', 'o26', 'o25', 'o24', 'o23', 'o22'], 'shapes_ts': ['ts66', 'ts65', 'ts64', 'ts63', 'ts62', 'ts56', 'ts55', 'ts54', 'ts53', 'ts52', 'ts46', 'ts45', 'ts44', 'ts43', 'ts42', 'ts36', 'ts35', 'ts34', 'ts33', 'ts32', 'ts26', 'ts25', 'ts24', 'ts23', 'ts22'], 'shapes_bs': ['bs66', 'bs65', 'bs64', 'bs63', 'bs62', 'bs56', 'bs55', 'bs54', 'bs53', 'bs52', 'bs46', 'bs45', 'bs44', 'bs43', 'bs42', 'bs36', 'bs35', 'bs34', 'bs33', 'bs32', 'bs26', 'bs25', 'bs24', 'bs23', 'bs22'], 'shapes_te': ['te66', 'te65', 'te64', 'te63', 'te62', 'te56', 'te55', 'te54', 'te53', 'te52', 'te46', 'te45', 'te44', 'te43', 'te42', 'te36', 'te35', 'te34', 'te33', 'te32', 'te26', 'te25', 'te24', 'te23', 'te22'], 'shapes_be': ['be66', 'be65', 'be64', 'be63', 'be62', 'be56', 'be55', 'be54', 'be53', 'be52', 'be46', 'be45', 'be44', 'be43', 'be42', 'be36', 'be35', 'be34', 'be33', 'be32', 'be26', 'be25', 'be24', 'be23', 'be22'], 'shapes_om': ['om66', 'om65', 'om64', 'om63', 'om62', 'om61', 'om56', 'om55', 'om54', 'om53', 'om52', 'om51', 'om46', 'om45', 'om44', 'om43', 'om42', 'om41', 'om36', 'om35', 'om34', 'om33', 'om32', 'om31', 'om26', 'om25', 'om24', 'om23', 'om22', 'om21', 'om16', 'om15', 'om14', 'om13', 'om12', 'om11'], 'shapes_ts2': ['ts266', 'ts265', 'ts264', 'ts263', 'ts262', 'ts256', 'ts255', 'ts254', 'ts253', 'ts252', 'ts246', 'ts245', 'ts244', 'ts243', 'ts242', 'ts236', 'ts235', 'ts234', 'ts233', 'ts232', 'ts226', 'ts225', 'ts224', 'ts223', 'ts222'], 'shapes_bs2': ['bs266', 'bs265', 'bs264', 'bs263', 'bs262', 'bs256', 'bs255', 'bs254', 'bs253', 'bs252', 'bs246', 'bs245', 'bs244', 'bs243', 'bs242', 'bs236', 'bs235', 'bs234', 'bs233', 'bs232', 'bs226', 'bs225', 'bs224', 'bs223', 'bs222'], 'shapes_te2': ['te266', 'te265', 'te264', 'te263', 'te262', 'te256', 'te255', 'te254', 'te253', 'te252', 'te246', 'te245', 'te244', 'te243', 'te242', 'te236', 'te235', 'te234', 'te233', 'te232', 'te226', 'te225', 'te224', 'te223', 'te222'], 'shapes_be2': ['be266', 'be265', 'be264', 'be263', 'be262', 'be256', 'be255', 'be254', 'be253', 'be252', 'be246', 'be245', 'be244', 'be243', 'be242', 'be236', 'be235', 'be234', 'be233', 'be232', 'be226', 'be225', 'be224', 'be223', 'be222'], 'shapes_om2': ['om266', 'om265', 'om264', 'om263', 'om262', 'om261', 'om256', 'om255', 'om254', 'om253', 'om252', 'om251', 'om246', 'om245', 'om244', 'om243', 'om242', 'om241', 'om236', 'om235', 'om234', 'om233', 'om232', 'om231', 'om226', 'om225', 'om224', 'om223', 'om222', 'om221', 'om216', 'om215', 'om214', 'om213', 'om212', 'om211'], 'shapes_corners_1': ['shapes_ts', 'shapes_bs', 'shapes_te', 'shapes_be'], 'shapes_cornersom_1': ['shapes_ts', 'shapes_bs', 'shapes_te', 'shapes_be', 'shapes_om'], 'shapes_corners_2': ['shapes_ts2', 'shapes_bs2', 'shapes_te2', 'shapes_be2'], 'shapes_cornersom_2': ['shapes_ts2', 'shapes_bs2', 'shapes_te2', 'shapes_be2', 'shapes_om2'], 'shapes_u': ['es66', 'es65', 'es64', 'es63', 'es62', 'es61', 'es56', 'es55', 'es54', 'es53', 'es52', 'es51', 'es46', 'es45', 'es44', 'es43', 'es42', 'es41', 'es36', 'es35', 'es34', 'es33', 'es32', 'es31', 'es26', 'es25', 'es24', 'es23', 'es22', 'es21', 'es16', 'es15', 'es14', 'es13', 'es12', 'es11'], 'shapes_ls': ['ls66', 'ls65', 'ls64', 'ls63', 'ls62', 'ls61', 'ls56', 'ls55', 'ls54', 'ls53', 'ls52', 'ls51', 'ls46', 'ls45', 'ls44', 'ls43', 'ls42', 'ls41', 'ls36', 'ls35', 'ls34', 'ls33', 'ls32', 'ls31', 'ls26', 'ls25', 'ls24', 'ls23', 'ls22', 'ls21', 'ls16', 'ls15', 'ls14', 'ls13', 'ls12', 'ls11'], 'shapewidths': ['sh0', 'sh1', 'sh2', 'sh3', 'sh4', 'sh5', 'sh6', 'sh7', 'sh8'], 'shapeheights': ['sv0', 'sv1', 'sv2', 'sv3', 'sv4', 'sv5', 'sv6'], 'spacers_cols0': ['cs0', 'c0s1p0', 'c0s0p5', 'c0s0p66', 'c0s0p33', 'c0s0p25'], 'spacers_cols1': ['cs0', 'c1s1p0', 'c1s0p5', 'cs0', 'c1s0p33', 'cs0'], 'spacers_cols2': ['cs0', 'c2s1p0', 'cs0', 'cs0', 'cs0', 'cs0'], 'spacers_deltas': ['ds0', 'ds1p0', 'ds0p5', 'ds0p66', 'ds0p33', 'ds0p25'], 'spacers_rows0': ['rs0', 'r0s4p0', 'r0s3p0', 'r0s2p0', 'r0s1p5', 'r0s1p0', 'r0s0p5', 'r0s0p66', 'r0s0p33', 'r0s0p25'], 'spacers_rows1': ['rs0', 'r1s4p0', 'r1s3p0', 'r1s2p0', 'rs0', 'r1s1p0', 'r1s0p5', 'rs0', 'r1s0p33', 'rs0'], 'spacers_rows2': ['rs0', 'rs0', 'rs0', 'rs0', 'rs0', 'r2s1p0', 'rs0', 'rs0', 'rs0', 'rs0'], 'spacers_deltarows': ['ds0', 'ds4p0', 'ds3p0', 'ds2p0', 'ds1p5', 'ds1p0', 'ds0p5', 'ds0p66', 'ds0p33', 'ds0p25'], 'stems0-h': ['c0h1', 'c0h2', 'c0h3', 'c0h4', 'c0h5', 'c0h6', 'c0h7', 'c0h8', 'colspacers0', 'r0eB'], 'stems0-hR': ['c0h1R', 'c0h2R', 'c0h3R', 'c0h4R', 'c0h5R', 'c0h6R', 'c0h7R', 'c0h8R', 'colspacers0R', 'r0eBR'], 'stems0-v': ['r0v1', 'r0v2', 'r0v3', 'r0v4', 'r0v5', 'r0v6', 'rowspacers0'], 'stems0-vR': ['r0v1R', 'r0v2R', 'r0v3R', 'r0v4R', 'r0v5R', 'r0v6R', 'rowspacers0R'], 'stems1-h': ['c1h1', 'c1h2', 'c1h3', 'c1h4', 'c1h5', 'c1h6', 'colspacers1', 'r1eB'], 'stems1-hR': ['c1h1R', 'c1h2R', 'c1h3R', 'c1h4R', 'c1h5R', 'c1h6R', 'colspacers1R', 'r1eBR'], 'stems1-v': ['r1v1', 'r1v2', 'r1v3', 'r1v4', 'r1v5', 'r1v6', 'rowspacers1', 'insertionsizes1', 'r1sep'], 'stems1-vx': ['r1v1', 'r1v2', 'r1v3', 'r1v4', 'r1v5', 'r1v6', 'rowspacers1', 'insertionsizes1', 'r1sep', 'c0eA', 'shapes_corners_1'], 'stems1-vR': ['r1v1R', 'r1v2R', 'r1v3R', 'r1v4R', 'r1v5R', 'r1v6R', 'rowspacers1R', 'insertionsizes1R', 'r1sepR'], 'stems2-h': ['c2h1', 'c2h2', 'c2h3', 'c2h4', 'c2h5', 'c2h6', 'colspacers2', 'r2eB'], 'stems2-hR': ['c2h1R', 'c2h2R', 'c2h3R', 'c2h4R', 'c2h5R', 'c2h6R', 'colspacers2R', 'r2eBR'], 'stems2-v': ['r2v1', 'r2v2', 'r2v3', 'r2v4', 'r2v5', 'r2v6', 'r2vb', 'rowspacers2', 'insertionsizes2', 'r2sep'], 'stems2-vx': ['r2v1', 'r2v2', 'r2v3', 'r2v4', 'r2v5', 'r2v6', 'r2vb', 'rowspacers2', 'insertionsizes2', 'r2sep', 'c0eA', 'shapes_corners_2'], 'stems2-vR': ['r2v1R', 'r2v2R', 'r2v3R', 'r2v4R', 'r2v5R', 'r2v6R', 'r2vbR', 'rowspacers2R', 'insertionsizes2R', 'r2sepR'], 'stems_12': ['stems1-h', 'stems1-v', 'stems2-h', 'stems2-v', 'ub'], 'targets': ['t86', 't85', 't84', 't83', 't82', 't81', 't76', 't75', 't74', 't73', 't72', 't71', 't66', 't65', 't64', 't63', 't62', 't61', 't56', 't55', 't54', 't53', 't52', 't51', 't46', 't45', 't44', 't43', 't42', 't41', 't36', 't35', 't34', 't33', 't32', 't31', 't26', 't25', 't24', 't23', 't22', 't21', 't16', 't15', 't14', 't13', 't12', 't11'], 'targetwidth': ['trg1', 'trg2', 'trg3', 'trg4', 'trg5', 'trg6'], 'verticals2': ['v1', 'v2', 'v3', 'v4', 'v5', 'v6', 'deltas_sp'], 'vss': ['VS1', 'VS2', 'VS3'], 'genericbases': ['dottedcircle']} basetypes = ['dottedcircle', 'QB1', 'QB2', 'QB3', 'QB4', 'QB5', 'QB6', 'QB7', 'QB8', 'QC1', 'QC2', 'QC3', 'QC4', 'QC5', 'QC6', 'QC7', 'QC8', 'QF1', 'QF2', 'QF3', 'QF4', 'QF5', 'QF6', 'QF7', 'QF8', 'QC1V', 'QC2V', 'QC3V', 'QC4V', 'QC5V', 'QC6V', 'QC7V', 'QC8V', 'QF1V', 'QF2V', 'QF3V', 'QF4V', 'QF5V', 'QF6V', 'QF7V', 'QF8V', 'csL', 'creL', 'ceL', 'hwtsL', 'hwteL', 'hwttsL', 'hwtteL', 'hwtbsL', 'hwtbeL', 'cfsL', 'cfeL', 'hfsL', 'hfeL', 'O33aEL', 'csR', 'creR', 'ceR', 'hwtsR', 'hwteR', 'hwttsR', 'hwtteR', 'hwtbsR', 'hwtbeR', 'cfsR', 'cfeR', 'hfsR', 'hfeR', 'O33aER', 'csT', 'creB', 'ceB', 'hwtsT', 'hwteB', 'hwttsT', 'hwtteB', 'hwtbsT', 'hwtbeB', 'cfsT', 'cfeB', 'hfsT', 'hfeB', 'O33aEB', 'Qf', 'Qi', 'vjV', 'hjV', 'tsV', 'bsV', 'teV', 'beV', 'omV', 'ssV', 'seV'] internalmirrors = {'C2': 'C2c', 'C2c': 'C2', 'C2a': 'C2b', 'C2b': 'C2a', 'C12': 'C13', 'C13': 'C12', 'C14': 'C15', 'C15': 'C14', 'D54': 'D55', 'D55': 'D54', 'F46': 'F47', 'F46a': 'F47a', 'F47': 'F46', 'F47a': 'F46a', 'F48': 'F49', 'F49': 'F48', 'L6': 'L6a', 'L6a': 'L6', 'O5': 'O5a', 'O5a': 'O5', 'O50a': 'O50b', 'O50b': 'O50a', 'U6a': 'U6b', 'U6b': 'U6a', 'V31': 'V31a', 'V31a': 'V31', 'Y3': 'Y4', 'Y4': 'Y3', 'J7': 'J7a', 'J7a': 'J7'} mirroring = {'A1', 'A2', 'A3', 'A4', 'A5', 'A5a', 'A6', 'A6a', 'A6b', 'A7', 'A8', 'A9', 'A10', 'A11', 'A12', 'A13', 'A14', 'A14a', 'A15', 'A16', 'A17', 'A17a', 'A18', 'A19', 'A20', 'A21', 'A22', 'A23', 'A24', 'A25', 'A26', 'A27', 'A28', 'A29', 'A30', 'A31', 'A32', 'A32a', 'A33', 'A34', 'A35', 'A36', 'A37', 'A38', 'A39', 'A40', 'A40a', 'A41', 'A42', 'A42a', 'A43', 'A43a', 'A44', 'A45', 'A45a', 'A46', 'A47', 'A48', 'A49', 'A50', 'A51', 'A52', 'A53', 'A54', 'A55', 'A56', 'A57', 'A58', 'A59', 'A60', 'A61', 'A62', 'A63', 'A64', 'A65', 'A66', 'A67', 'A68', 'A69', 'A70', 'B1', 'B2', 'B3', 'B4', 'B5', 'B5a', 'B6', 'B7', 'B8', 'B9', 'C1', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9', 'C10', 'C10a', 'C11', 'C16', 'C17', 'C18', 'C19', 'C20', 'C21', 'C22', 'C23', 'C24', 'D1', 'D3', 'D4', 'D5', 'D6', 'D7', 'D8', 'D8a', 'D9', 'D10', 'D11', 'D13', 'D14', 'D15', 'D16', 'D17', 'D18', 'D19', 'D20', 'D26', 'D29', 'D30', 'D31', 'D33', 'D34', 'D34a', 'D36', 'D37', 'D38', 'D39', 'D40', 'D41', 'D42', 'D43', 'D44', 'D45', 'D46', 'D46a', 'D47', 'D48', 'D48a', 'D49', 'D50', 'D50a', 'D50b', 'D50c', 'D50d', 'D50e', 'D50f', 'D50g', 'D50h', 'D50i', 'D51', 'D52', 'D52a', 'D53', 'D54a', 'D56', 'D57', 'D58', 'D59', 'D60', 'D61', 'D62', 'D63', 'D64', 'D65', 'D66', 'E1', 'E2', 'E3', 'E4', 'E5', 'E6', 'E7', 'E8', 'E8a', 'E9', 'E9a', 'E10', 'E11', 'E12', 'E13', 'E14', 'E15', 'E16', 'E16a', 'E17', 'E17a', 'E18', 'E19', 'E20', 'E20a', 'E21', 'E22', 'E23', 'E24', 'E25', 'E26', 'E27', 'E28', 'E28a', 'E29', 'E30', 'E31', 'E32', 'E33', 'E34', 'E34a', 'E36', 'E37', 'E38', 'F1', 'F1a', 'F2', 'F3', 'F4', 'F5', 'F6', 'F7', 'F8', 'F9', 'F10', 'F11', 'F12', 'F14', 'F15', 'F16', 'F17', 'F18', 'F19', 'F20', 'F21', 'F21a', 'F22', 'F23', 'F24', 'F25', 'F26', 'F27', 'F29', 'F30', 'F32', 'F33', 'F37', 'F37a', 'F38', 'F38a', 'F39', 'F40', 'F42', 'F44', 'F50', 'F51', 'F51a', 'F51b', 'F51C', 'F52', 'F53', 'G1', 'G2', 'G3', 'G4', 'G5', 'G6', 'G6a', 'G7', 'G7a', 'G7b', 'G8', 'G9', 'G10', 'G11', 'G11a', 'G12', 'G13', 'G14', 'G15', 'G16', 'G17', 'G18', 'G19', 'G20', 'G20a', 'G21', 'G22', 'G23', 'G24', 'G25', 'G26', 'G26a', 'G27', 'G28', 'G29', 'G30', 'G31', 'G32', 'G33', 'G34', 'G35', 'G36', 'G36a', 'G37', 'G37a', 'G38', 'G39', 'G40', 'G41', 'G42', 'G43', 'G43a', 'G44', 'G45', 'G45a', 'G46', 'G47', 'G48', 'G49', 'G50', 'G51', 'G52', 'G53', 'G54', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'H6a', 'H7', 'H8', 'I1', 'I2', 'I3', 'I4', 'I5', 'I5a', 'I6', 'I7', 'I8', 'I9', 'I9a', 'I10', 'I10a', 'I11', 'I11a', 'I12', 'I13', 'I14', 'I15', 'K1', 'K2', 'K3', 'K4', 'K5', 'K6', 'K7', 'K8', 'L1', 'L2', 'L2a', 'L3', 'L4', 'L5', 'M1a', 'M1b', 'M2', 'M3', 'M3a', 'M4', 'M5', 'M6', 'M7', 'M9', 'M10', 'M10a', 'M11', 'M12', 'M12a', 'M12b', 'M12c', 'M12d', 'M12e', 'M12f', 'M12g', 'M12h', 'M14', 'M17', 'M17a', 'M18', 'M19', 'M20', 'M21', 'M22', 'M22a', 'M23', 'M24', 'M25', 'M26', 'M27', 'M28', 'M29', 'M30', 'M33', 'M33a', 'M33B', 'M36', 'M37', 'M38', 'M40', 'M40a', 'M41', 'M43', 'N2', 'N3', 'N6', 'N13', 'N20', 'N21', 'N22', 'N23', 'N29', 'N32', 'N34', 'N34a', 'N37a', 'N39', 'N40', 'NL1', 'NL2', 'NL3', 'NL4', 'NL5', 'NL5a', 'NL6', 'NL7', 'NL8', 'NL9', 'NL10', 'NL11', 'NL12', 'NL13', 'NL14', 'NL15', 'NL16', 'NL17', 'NL17a', 'NL18', 'NL19', 'NL20', 'NU1', 'NU2', 'NU3', 'NU4', 'NU5', 'NU6', 'NU7', 'NU8', 'NU9', 'NU10', 'NU10a', 'NU11', 'NU11a', 'NU12', 'NU13', 'NU14', 'NU15', 'NU16', 'NU17', 'NU18', 'NU18a', 'NU19', 'NU20', 'NU21', 'NU22', 'NU22a', 'O3', 'O4', 'O6', 'O7', 'O8', 'O9', 'O10', 'O10a', 'O10B', 'O10C', 'O11', 'O12', 'O13', 'O14', 'O15', 'O16', 'O17', 'O18', 'O19', 'O19a', 'O20', 'O29', 'O30', 'O30a', 'O33a', 'O35', 'O37', 'O38', 'O40', 'O42', 'O44', 'O45', 'O46', 'O47', 'O51', 'P1', 'P1a', 'P2', 'P3', 'P3a', 'P5', 'P7', 'P9', 'P10', 'P11', 'Q1', 'Q2', 'Q7', 'R1', 'R2', 'R3', 'R5', 'R6', 'R7', 'R8', 'R9', 'R10', 'R10a', 'R12', 'R13', 'R14', 'R15', 'R16', 'R17', 'R18', 'R19', 'R25', 'R27', 'R29', 'S1', 'S2', 'S2a', 'S3', 'S4', 'S5', 'S6', 'S6a', 'S7', 'S8', 'S9', 'S10', 'S13', 'S14a', 'S14b', 'S18', 'S19', 'S26', 'S28', 'S29', 'S30', 'S31', 'S32', 'S33', 'S37', 'S38', 'S39', 'S40', 'S41', 'S44', 'S45', 'S46', 'T1', 'T2', 'T4', 'T5', 'T6', 'T7', 'T7a', 'T11', 'T12', 'T13', 'T14', 'T15', 'T16', 'T16a', 'T17', 'T18', 'T19', 'T20', 'T21', 'T24', 'T25', 'T26', 'T27', 'T29', 'T30', 'T31', 'T32', 'T32a', 'T33', 'T33a', 'T34', 'T35', 'T36', 'U1', 'U2', 'U3', 'U4', 'U5', 'U6', 'U7', 'U8', 'U9', 'U10', 'U11', 'U12', 'U13', 'U14', 'U15', 'U16', 'U17', 'U18', 'U19', 'U20', 'U21', 'U24', 'U25', 'U29a', 'U30', 'U31', 'U32', 'U32a', 'U33', 'U35', 'U37', 'U38', 'U39', 'U40', 'V1', 'V1a', 'V1b', 'V1c', 'V1d', 'V1e', 'V1f', 'V1g', 'V1h', 'V1i', 'V2', 'V2a', 'V3', 'V4', 'V10', 'V11', 'V11a', 'V11B', 'V11C', 'V12', 'V12a', 'V12B', 'V13', 'V14', 'V15', 'V21', 'V22', 'V23', 'V23a', 'V25', 'V28a', 'V29a', 'V33', 'V34', 'V35', 'V36', 'V37', 'V37a', 'V40', 'V40a', 'W9', 'W9a', 'W10a', 'W14a', 'W15', 'W16', 'W17a', 'W20', 'W25', 'X5', 'X6a', 'X7', 'Y1a', 'Y7', 'Z4', 'Z5', 'Z5a', 'Z6', 'Z7', 'Z9', 'Z10', 'Z12', 'Z14', 'Z16d', 'Z16f', 'J2', 'J3', 'J4', 'J7b', 'J10', 'J11', 'J13', 'J14', 'J15', 'J16', 'J17', 'J18', 'J22', 'J26', 'J28', 'J29', 'J31', 'J32'}
y = 1 x = 0 while y <= 5: x += 1 x = 0 while False: x += 1 x = 0 while x == 2: x += 1 x = 0 while 2 <= 2: x += 1 x = 0 while True: x += 1
y = 1 x = 0 while y <= 5: x += 1 x = 0 while False: x += 1 x = 0 while x == 2: x += 1 x = 0 while 2 <= 2: x += 1 x = 0 while True: x += 1
class Solution: def findDuplicate(self, nums: list) -> int: slow = nums[nums[0]] fast = nums[nums[nums[0]]] while fast != slow: slow = nums[slow] fast = nums[nums[fast]] start = nums[0] while start != slow: slow = nums[slow] start = nums[start] return start if __name__ == "__main__": solu = Solution() print(solu.findDuplicate([1, 3, 4, 2, 2]))
class Solution: def find_duplicate(self, nums: list) -> int: slow = nums[nums[0]] fast = nums[nums[nums[0]]] while fast != slow: slow = nums[slow] fast = nums[nums[fast]] start = nums[0] while start != slow: slow = nums[slow] start = nums[start] return start if __name__ == '__main__': solu = solution() print(solu.findDuplicate([1, 3, 4, 2, 2]))
def test(): return True
def test(): return True
#!/usr/bin/env python def extract_arguments(call): # Replace any leftover multiple whitespaces with single whitespaces call = ' '.join(call.split()) # Extract arguments part of call args_start = call.find('(') args_end = call.rfind(')') args_str = (call[args_start+1:args_end]).strip() args_str_formatted = '' # Remove whitespaces from parts of the argument list that are inside brackets # and add missing whitespaces after the comma of each variable in the call open_brackets = 0 for i in xrange(len(args_str)): # First check if we are inside or outside of a bracketed area if args_str[i] == '(': open_brackets += 1 elif args_str[i] == ')': if open_brackets < 1: raise Exception('Error parsing {0}, found closing bracket w/o matching opening bracket'.format(call)) open_brackets -= 1 # Remove whitespaces inside bracketed areas if open_brackets > 0 and args_str[i] == ' ': continue args_str_formatted += args_str[i] # Add missing whitespace after comma between arguments if open_brackets == 0 and i<len(args_str)-1 and args_str_formatted[-1] == ',' and not args_str[i+1] == ' ': args_str_formatted += ' ' # Split argument list args = [x for x in args_str_formatted.split(', ')] return args def parse_subroutine_call(file, subroutine): parse = False calls = [] with open(file) as f: contents = [] for line in f.readlines(): line = line.strip() # Skip comments and empty lines if line.startswith('!') or line == '': continue # Replace tabs with single whitespaces line = line.replace('\t', ' ') # Replace multiple whitespaces with one whitespace line = ' '.join(line.split()) # Remove inline comments if '!' in line: line = line[:line.find('!')].strip() contents.append(line) for line in contents: #print subroutine + ' : "' + line + '"' if 'call {0}'.format(subroutine) in line.lower(): #DH* case sensitive? if 'call {0}'.format(subroutine) in line: parse = True call = line.replace('&', ' ') count_opening_brackets = line.count('(') count_closing_brackets = line.count(')') # Entire call on one line if count_opening_brackets > 0 and count_closing_brackets == count_opening_brackets: parse = False arguments = extract_arguments(call) calls.append(arguments) elif parse: call += line.replace('&', ' ') count_opening_brackets += line.count('(') count_closing_brackets += line.count(')') # Call over multiple lines if (count_closing_brackets == count_opening_brackets) and (count_closing_brackets>0): parse = False arguments = extract_arguments(call) calls.append(arguments) #print "file, subroutine, calls:", file, subroutine, calls, [len(arguments) for arguments in calls] return calls
def extract_arguments(call): call = ' '.join(call.split()) args_start = call.find('(') args_end = call.rfind(')') args_str = call[args_start + 1:args_end].strip() args_str_formatted = '' open_brackets = 0 for i in xrange(len(args_str)): if args_str[i] == '(': open_brackets += 1 elif args_str[i] == ')': if open_brackets < 1: raise exception('Error parsing {0}, found closing bracket w/o matching opening bracket'.format(call)) open_brackets -= 1 if open_brackets > 0 and args_str[i] == ' ': continue args_str_formatted += args_str[i] if open_brackets == 0 and i < len(args_str) - 1 and (args_str_formatted[-1] == ',') and (not args_str[i + 1] == ' '): args_str_formatted += ' ' args = [x for x in args_str_formatted.split(', ')] return args def parse_subroutine_call(file, subroutine): parse = False calls = [] with open(file) as f: contents = [] for line in f.readlines(): line = line.strip() if line.startswith('!') or line == '': continue line = line.replace('\t', ' ') line = ' '.join(line.split()) if '!' in line: line = line[:line.find('!')].strip() contents.append(line) for line in contents: if 'call {0}'.format(subroutine) in line.lower(): parse = True call = line.replace('&', ' ') count_opening_brackets = line.count('(') count_closing_brackets = line.count(')') if count_opening_brackets > 0 and count_closing_brackets == count_opening_brackets: parse = False arguments = extract_arguments(call) calls.append(arguments) elif parse: call += line.replace('&', ' ') count_opening_brackets += line.count('(') count_closing_brackets += line.count(')') if count_closing_brackets == count_opening_brackets and count_closing_brackets > 0: parse = False arguments = extract_arguments(call) calls.append(arguments) return calls
# Remove White Spaces from a string userInput = input("Enter a String: ") lists = userInput.split() newValue = "" for i in lists: newValue += str(i) print(newValue)
user_input = input('Enter a String: ') lists = userInput.split() new_value = '' for i in lists: new_value += str(i) print(newValue)
map = { "U": (-3, []), "D": (+3, []), "L": (-1, [4, 7]), "R": (+1, [3, 6]), } def aoc(data): button = 5 code = "" for line in data.split("\n"): for step in line: new = button + map[step][0] if 0 < new <= 9 and not button in map[step][1]: button = new code += str(button) return code
map = {'U': (-3, []), 'D': (+3, []), 'L': (-1, [4, 7]), 'R': (+1, [3, 6])} def aoc(data): button = 5 code = '' for line in data.split('\n'): for step in line: new = button + map[step][0] if 0 < new <= 9 and (not button in map[step][1]): button = new code += str(button) return code
test_cases = int(input().strip()) secrets = { '0001101': 0, '0011001': 1, '0010011': 2, '0111101': 3, '0100011': 4, '0110001': 5, '0101111': 6, '0111011': 7, '0110111': 8, '0001011': 9, } for t in range(1, test_cases + 1): N, M = map(int, input().strip().split()) code = '' for i in range(N): line = input().strip() if not code and '1' in line: code = line end_idx = 0 for i in range(M - 1, -1, -1): if code[i] == '1': end_idx = i break nums = [0] * 8 idx = 7 for i in range(end_idx, -1, -7): nums[idx] = secrets[code[i - 6: i + 1]] idx -= 1 if idx < 0: break check = (nums[0] + nums[2] + nums[4] + nums[6]) * 3 + (nums[1] + nums[3] + nums[5]) + nums[7] result = 0 if check % 10 == 0: result = sum(nums) print('#{} {}'.format(t, result))
test_cases = int(input().strip()) secrets = {'0001101': 0, '0011001': 1, '0010011': 2, '0111101': 3, '0100011': 4, '0110001': 5, '0101111': 6, '0111011': 7, '0110111': 8, '0001011': 9} for t in range(1, test_cases + 1): (n, m) = map(int, input().strip().split()) code = '' for i in range(N): line = input().strip() if not code and '1' in line: code = line end_idx = 0 for i in range(M - 1, -1, -1): if code[i] == '1': end_idx = i break nums = [0] * 8 idx = 7 for i in range(end_idx, -1, -7): nums[idx] = secrets[code[i - 6:i + 1]] idx -= 1 if idx < 0: break check = (nums[0] + nums[2] + nums[4] + nums[6]) * 3 + (nums[1] + nums[3] + nums[5]) + nums[7] result = 0 if check % 10 == 0: result = sum(nums) print('#{} {}'.format(t, result))
homepage_publish_event = { "sys": { "type": "Entry", "id": "5bfZXM2wx8fCAb60IuLDdH", "space": { "sys": { "type": "Link", "linkType": "Space", "id": "83pwon8meh4m" } }, "environment": { "sys": { "id": "master", "type": "Link", "linkType": "Environment" } }, "contentType": { "sys": { "type": "Link", "linkType": "ContentType", "id": "homePage" } }, "revision": 8, "createdAt": "2020-12-21T16:41:56.909Z", "updatedAt": "2020-12-29T15:48:20.027Z" }, "fields": { "page": { "en-US": { "sys": { "type": "Link", "linkType": "Entry", "id": "5P4wtOQF1TIULKEixOOesS" } } }, "title": { "en-US": "Adventure Trips" }, "featuredImage": { "en-US": { "sys": { "type": "Link", "linkType": "Asset", "id": "1CKhMZljDByaL0tfwUXd6A" } } }, "description": { "en-US": { "data": {}, "content": [ { "data": {}, "content": [ { "data": {}, "marks": [], "value": "We are a boutique tour operator focusing on a handpicked selection of our favourite adventure trips around the globe :)", "nodeType": "text" } ], "nodeType": "paragraph" } ], "nodeType": "document" } }, "reviews": { "en-US": [ { "sys": { "type": "Link", "linkType": "Entry", "id": "3lNXHY1zY8cr9eM5AtcEQ3" } }, { "sys": { "type": "Link", "linkType": "Entry", "id": "xj4oobeiVF9wUWpyuFvNL" } }, { "sys": { "type": "Link", "linkType": "Entry", "id": "3oh7w0AVD8DtgbQrY2AUWU" } } ] } } } generic_text_page_publish_event = { "sys": { "type": "Entry", "id": "20Nz2Y1oRRDkCeAJ8Anbvd", "space": { "sys": { "type": "Link", "linkType": "Space", "id": "83pwon8meh4m" } }, "environment": { "sys": { "id": "master", "type": "Link", "linkType": "Environment" } }, "contentType": { "sys": { "type": "Link", "linkType": "ContentType", "id": "page" } }, "revision": 1, "createdAt": "2021-02-04T08:25:14.567Z", "updatedAt": "2021-02-04T08:25:14.567Z" }, "fields": { "page": { "en-US": { "sys": { "type": "Link", "linkType": "Entry", "id": "7sT7h262jsMfYHhPX18Aaq" } } }, "slug": { "en-US": "asdas" }, "body": { "en-US": { "data": {}, "content": [ { "data": {}, "content": [ { "data": {}, "marks": [], "value": "Test", "nodeType": "text" } ], "nodeType": "paragraph" } ], "nodeType": "document" } }, "featuredImage": { "en-US": { "sys": { "type": "Link", "linkType": "Asset", "id": "4shwYI3POEGkw0Eg6kcyaQ" } } } } }
homepage_publish_event = {'sys': {'type': 'Entry', 'id': '5bfZXM2wx8fCAb60IuLDdH', 'space': {'sys': {'type': 'Link', 'linkType': 'Space', 'id': '83pwon8meh4m'}}, 'environment': {'sys': {'id': 'master', 'type': 'Link', 'linkType': 'Environment'}}, 'contentType': {'sys': {'type': 'Link', 'linkType': 'ContentType', 'id': 'homePage'}}, 'revision': 8, 'createdAt': '2020-12-21T16:41:56.909Z', 'updatedAt': '2020-12-29T15:48:20.027Z'}, 'fields': {'page': {'en-US': {'sys': {'type': 'Link', 'linkType': 'Entry', 'id': '5P4wtOQF1TIULKEixOOesS'}}}, 'title': {'en-US': 'Adventure Trips'}, 'featuredImage': {'en-US': {'sys': {'type': 'Link', 'linkType': 'Asset', 'id': '1CKhMZljDByaL0tfwUXd6A'}}}, 'description': {'en-US': {'data': {}, 'content': [{'data': {}, 'content': [{'data': {}, 'marks': [], 'value': 'We are a boutique tour operator focusing on a handpicked selection of our favourite adventure trips around the globe :)', 'nodeType': 'text'}], 'nodeType': 'paragraph'}], 'nodeType': 'document'}}, 'reviews': {'en-US': [{'sys': {'type': 'Link', 'linkType': 'Entry', 'id': '3lNXHY1zY8cr9eM5AtcEQ3'}}, {'sys': {'type': 'Link', 'linkType': 'Entry', 'id': 'xj4oobeiVF9wUWpyuFvNL'}}, {'sys': {'type': 'Link', 'linkType': 'Entry', 'id': '3oh7w0AVD8DtgbQrY2AUWU'}}]}}} generic_text_page_publish_event = {'sys': {'type': 'Entry', 'id': '20Nz2Y1oRRDkCeAJ8Anbvd', 'space': {'sys': {'type': 'Link', 'linkType': 'Space', 'id': '83pwon8meh4m'}}, 'environment': {'sys': {'id': 'master', 'type': 'Link', 'linkType': 'Environment'}}, 'contentType': {'sys': {'type': 'Link', 'linkType': 'ContentType', 'id': 'page'}}, 'revision': 1, 'createdAt': '2021-02-04T08:25:14.567Z', 'updatedAt': '2021-02-04T08:25:14.567Z'}, 'fields': {'page': {'en-US': {'sys': {'type': 'Link', 'linkType': 'Entry', 'id': '7sT7h262jsMfYHhPX18Aaq'}}}, 'slug': {'en-US': 'asdas'}, 'body': {'en-US': {'data': {}, 'content': [{'data': {}, 'content': [{'data': {}, 'marks': [], 'value': 'Test', 'nodeType': 'text'}], 'nodeType': 'paragraph'}], 'nodeType': 'document'}}, 'featuredImage': {'en-US': {'sys': {'type': 'Link', 'linkType': 'Asset', 'id': '4shwYI3POEGkw0Eg6kcyaQ'}}}}}
# Py PI = 3.1415926535897932384626433832795 #endif # 2.0 * PI TWO_PI = 6.283185307179586476925286766559 #endif # PI / 2.0 HALF_PI = 1.5707963267948966192313216916398 # 2.0/3.0 * PI TWOTHIRD_PI = 2.0943951023931954923084289221863 # degree to pi multiplier (PI/360.0) DEG_TO_PI = PI/360.0 # degree to 2*pi multiplier (TWO_PI/360.0) DEG_TO_TWO_PI = PI/180.0 # 2*pi to degree multiplier (360.0/TWO_PI) */ TWO_PI_TO_DEG = 180.0/PI # degree to radians multiplier (1.0/360.0) DEG_TO_RAD = 0.0027777777777777777777777777777 # sqrt(2.0) * SQRT_2 = 1.4142135623730950488016887242097 # tanh(1.0) * TANH_1 = 0.761594 # 1.0/tanh(1.0) TANH_1_I = 1.313035
pi = 3.141592653589793 two_pi = 6.283185307179586 half_pi = 1.5707963267948966 twothird_pi = 2.0943951023931957 deg_to_pi = PI / 360.0 deg_to_two_pi = PI / 180.0 two_pi_to_deg = 180.0 / PI deg_to_rad = 0.002777777777777778 sqrt_2 = 1.4142135623730951 tanh_1 = 0.761594 tanh_1_i = 1.313035
class CommentInteraction: def __init__(self, like=None, dislike=None): self.like = like # Int self.dislike = dislike # Int @staticmethod def generate(source): if source is None or type(source) is str and len(source) == 0: return CommentInteraction() return CommentInteraction(source['like'], source['dislike'])
class Commentinteraction: def __init__(self, like=None, dislike=None): self.like = like self.dislike = dislike @staticmethod def generate(source): if source is None or (type(source) is str and len(source) == 0): return comment_interaction() return comment_interaction(source['like'], source['dislike'])
# local settings for this tlsscout installation, # the {{ foo }} bits should be replaced with real values (by Ansible or by hand) # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'hemmelig' # debug settings - remember to set allowed_hosts if debug is disabled DEBUG=True ALLOWED_HOSTS = [] # Database settings # https://docs.djangoproject.com/en/2.0/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'tlsscoutdb', 'USER': 'tlsscout', 'PASSWORD': 'tlsscout', 'HOST': '127.0.0.1', }, } # admin site url prefix, set to 'admin' for /admin/ ADMIN_PREFIX='admin' # email settings EMAIL_BACKEND='django.core.mail.backends.console.EmailBackend' #EMAIL_HOST='mailhost.example.com' #EMAIL_PORT=587 #EMAIL_HOST_USER='mymailuser' #EMAIL_HOST_PASSWORD='mymailpassword' #EMAIL_USE_TLS=True #EMAIL_FROM='noreply@example.com' # NOTE: this email is included in the useragent when using the SSL Labs API # enable new accout creation / signups / registration? ENABLE_SIGNUP=False # pagination EVENTS_PER_PAGE=100
secret_key = 'hemmelig' debug = True allowed_hosts = [] databases = {'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'tlsscoutdb', 'USER': 'tlsscout', 'PASSWORD': 'tlsscout', 'HOST': '127.0.0.1'}} admin_prefix = 'admin' email_backend = 'django.core.mail.backends.console.EmailBackend' enable_signup = False events_per_page = 100
# # PySNMP MIB module Juniper-HOST-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Juniper-HOST-MIB # Produced by pysmi-0.3.4 at Wed May 1 14:02:51 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, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint") juniMibs, = mibBuilder.importSymbols("Juniper-MIBs", "juniMibs") ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup") ModuleIdentity, Counter32, iso, Integer32, MibIdentifier, Bits, NotificationType, TimeTicks, ObjectIdentity, Unsigned32, Counter64, IpAddress, Gauge32, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "ModuleIdentity", "Counter32", "iso", "Integer32", "MibIdentifier", "Bits", "NotificationType", "TimeTicks", "ObjectIdentity", "Unsigned32", "Counter64", "IpAddress", "Gauge32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn") TextualConvention, DisplayString, RowStatus = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString", "RowStatus") juniHostMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33)) juniHostMIB.setRevisions(('2004-11-26 00:00', '2002-09-16 21:44', '2001-05-07 17:02', '2000-01-26 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: juniHostMIB.setRevisionsDescriptions(('Added Tftp option in juniHostProtocol object.', 'Replaced Unisphere names with Juniper names.', 'Increase the max lenght of the host name.', 'Initial version of this MIB module.',)) if mibBuilder.loadTexts: juniHostMIB.setLastUpdated('200209162144Z') if mibBuilder.loadTexts: juniHostMIB.setOrganization('Juniper Networks, Inc.') if mibBuilder.loadTexts: juniHostMIB.setContactInfo(' Juniper Networks, Inc. Postal: 10 Technology Park Road Westford, MA 01886-3146 USA Tel: +1 978 589 5800 E-mail: mib@Juniper.net') if mibBuilder.loadTexts: juniHostMIB.setDescription('The host configuration MIB for Juniper Networks enterprise.') juniHostObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 1)) juniHost = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 1, 1)) juniHostTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 1, 1, 1), ) if mibBuilder.loadTexts: juniHostTable.setStatus('current') if mibBuilder.loadTexts: juniHostTable.setDescription('The entries in this table describe host configuration information.') juniHostEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 1, 1, 1, 1), ).setIndexNames((1, "Juniper-HOST-MIB", "juniHostName")) if mibBuilder.loadTexts: juniHostEntry.setStatus('current') if mibBuilder.loadTexts: juniHostEntry.setDescription('An entry describing the configuration of a host.') juniHostName = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 1, 1, 1, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 40))).setMaxAccess("readonly") if mibBuilder.loadTexts: juniHostName.setStatus('current') if mibBuilder.loadTexts: juniHostName.setDescription('The hostname identifier associated with this host entry.') juniHostIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 1, 1, 1, 1, 2), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniHostIpAddress.setStatus('current') if mibBuilder.loadTexts: juniHostIpAddress.setDescription('The IP address associated with this host entry.') juniHostProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 1, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("juniHostFtp", 1), ("juniHostTftp", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniHostProtocol.setStatus('current') if mibBuilder.loadTexts: juniHostProtocol.setDescription('The file transfer protocol associated with this host entry.') juniHostUserName = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 1, 1, 1, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 20))).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniHostUserName.setStatus('current') if mibBuilder.loadTexts: juniHostUserName.setDescription('The username associated with this host entry.') juniHostUserPassword = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 1, 1, 1, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 25))).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniHostUserPassword.setStatus('current') if mibBuilder.loadTexts: juniHostUserPassword.setDescription('The password associated with this host entry. Reading this object returns a null DisplayString to avoid security breaches. However, a null string is not accepted for create or write operations.') juniHostRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 1, 1, 1, 1, 6), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: juniHostRowStatus.setStatus('current') if mibBuilder.loadTexts: juniHostRowStatus.setDescription("Controls creation/deletion of entries in this table. Only the values 'createAndGo' and 'destroy' may be SET.") juniHostMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 4)) juniHostMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 4, 1)) juniHostMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 4, 2)) juniHostCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 4, 1, 1)).setObjects(("Juniper-HOST-MIB", "juniHostGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniHostCompliance = juniHostCompliance.setStatus('current') if mibBuilder.loadTexts: juniHostCompliance.setDescription('The compliance statement for systems supporting host configuration.') juniHostGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 4, 2, 1)).setObjects(("Juniper-HOST-MIB", "juniHostName"), ("Juniper-HOST-MIB", "juniHostIpAddress"), ("Juniper-HOST-MIB", "juniHostProtocol"), ("Juniper-HOST-MIB", "juniHostUserName"), ("Juniper-HOST-MIB", "juniHostUserPassword"), ("Juniper-HOST-MIB", "juniHostRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniHostGroup = juniHostGroup.setStatus('current') if mibBuilder.loadTexts: juniHostGroup.setDescription('The basic collection of objects providing management of host configuration functionality in a Juniper product.') mibBuilder.exportSymbols("Juniper-HOST-MIB", juniHostObjects=juniHostObjects, juniHostMIBConformance=juniHostMIBConformance, juniHostIpAddress=juniHostIpAddress, juniHostGroup=juniHostGroup, juniHostProtocol=juniHostProtocol, juniHostTable=juniHostTable, juniHostUserPassword=juniHostUserPassword, juniHostEntry=juniHostEntry, juniHostMIB=juniHostMIB, juniHostName=juniHostName, juniHost=juniHost, juniHostUserName=juniHostUserName, PYSNMP_MODULE_ID=juniHostMIB, juniHostRowStatus=juniHostRowStatus, juniHostMIBGroups=juniHostMIBGroups, juniHostCompliance=juniHostCompliance, juniHostMIBCompliances=juniHostMIBCompliances)
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, value_range_constraint, single_value_constraint, constraints_intersection, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection', 'ValueSizeConstraint') (juni_mibs,) = mibBuilder.importSymbols('Juniper-MIBs', 'juniMibs') (module_compliance, object_group, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'ObjectGroup', 'NotificationGroup') (module_identity, counter32, iso, integer32, mib_identifier, bits, notification_type, time_ticks, object_identity, unsigned32, counter64, ip_address, gauge32, mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('SNMPv2-SMI', 'ModuleIdentity', 'Counter32', 'iso', 'Integer32', 'MibIdentifier', 'Bits', 'NotificationType', 'TimeTicks', 'ObjectIdentity', 'Unsigned32', 'Counter64', 'IpAddress', 'Gauge32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn') (textual_convention, display_string, row_status) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString', 'RowStatus') juni_host_mib = module_identity((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33)) juniHostMIB.setRevisions(('2004-11-26 00:00', '2002-09-16 21:44', '2001-05-07 17:02', '2000-01-26 00:00')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: juniHostMIB.setRevisionsDescriptions(('Added Tftp option in juniHostProtocol object.', 'Replaced Unisphere names with Juniper names.', 'Increase the max lenght of the host name.', 'Initial version of this MIB module.')) if mibBuilder.loadTexts: juniHostMIB.setLastUpdated('200209162144Z') if mibBuilder.loadTexts: juniHostMIB.setOrganization('Juniper Networks, Inc.') if mibBuilder.loadTexts: juniHostMIB.setContactInfo(' Juniper Networks, Inc. Postal: 10 Technology Park Road Westford, MA 01886-3146 USA Tel: +1 978 589 5800 E-mail: mib@Juniper.net') if mibBuilder.loadTexts: juniHostMIB.setDescription('The host configuration MIB for Juniper Networks enterprise.') juni_host_objects = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 1)) juni_host = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 1, 1)) juni_host_table = mib_table((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 1, 1, 1)) if mibBuilder.loadTexts: juniHostTable.setStatus('current') if mibBuilder.loadTexts: juniHostTable.setDescription('The entries in this table describe host configuration information.') juni_host_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 1, 1, 1, 1)).setIndexNames((1, 'Juniper-HOST-MIB', 'juniHostName')) if mibBuilder.loadTexts: juniHostEntry.setStatus('current') if mibBuilder.loadTexts: juniHostEntry.setDescription('An entry describing the configuration of a host.') juni_host_name = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 1, 1, 1, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(1, 40))).setMaxAccess('readonly') if mibBuilder.loadTexts: juniHostName.setStatus('current') if mibBuilder.loadTexts: juniHostName.setDescription('The hostname identifier associated with this host entry.') juni_host_ip_address = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 1, 1, 1, 1, 2), ip_address()).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniHostIpAddress.setStatus('current') if mibBuilder.loadTexts: juniHostIpAddress.setDescription('The IP address associated with this host entry.') juni_host_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 1, 1, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('juniHostFtp', 1), ('juniHostTftp', 2)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniHostProtocol.setStatus('current') if mibBuilder.loadTexts: juniHostProtocol.setDescription('The file transfer protocol associated with this host entry.') juni_host_user_name = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 1, 1, 1, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 20))).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniHostUserName.setStatus('current') if mibBuilder.loadTexts: juniHostUserName.setDescription('The username associated with this host entry.') juni_host_user_password = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 1, 1, 1, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 25))).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniHostUserPassword.setStatus('current') if mibBuilder.loadTexts: juniHostUserPassword.setDescription('The password associated with this host entry. Reading this object returns a null DisplayString to avoid security breaches. However, a null string is not accepted for create or write operations.') juni_host_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 1, 1, 1, 1, 6), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: juniHostRowStatus.setStatus('current') if mibBuilder.loadTexts: juniHostRowStatus.setDescription("Controls creation/deletion of entries in this table. Only the values 'createAndGo' and 'destroy' may be SET.") juni_host_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 4)) juni_host_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 4, 1)) juni_host_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 4, 2)) juni_host_compliance = module_compliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 4, 1, 1)).setObjects(('Juniper-HOST-MIB', 'juniHostGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_host_compliance = juniHostCompliance.setStatus('current') if mibBuilder.loadTexts: juniHostCompliance.setDescription('The compliance statement for systems supporting host configuration.') juni_host_group = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 33, 4, 2, 1)).setObjects(('Juniper-HOST-MIB', 'juniHostName'), ('Juniper-HOST-MIB', 'juniHostIpAddress'), ('Juniper-HOST-MIB', 'juniHostProtocol'), ('Juniper-HOST-MIB', 'juniHostUserName'), ('Juniper-HOST-MIB', 'juniHostUserPassword'), ('Juniper-HOST-MIB', 'juniHostRowStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_host_group = juniHostGroup.setStatus('current') if mibBuilder.loadTexts: juniHostGroup.setDescription('The basic collection of objects providing management of host configuration functionality in a Juniper product.') mibBuilder.exportSymbols('Juniper-HOST-MIB', juniHostObjects=juniHostObjects, juniHostMIBConformance=juniHostMIBConformance, juniHostIpAddress=juniHostIpAddress, juniHostGroup=juniHostGroup, juniHostProtocol=juniHostProtocol, juniHostTable=juniHostTable, juniHostUserPassword=juniHostUserPassword, juniHostEntry=juniHostEntry, juniHostMIB=juniHostMIB, juniHostName=juniHostName, juniHost=juniHost, juniHostUserName=juniHostUserName, PYSNMP_MODULE_ID=juniHostMIB, juniHostRowStatus=juniHostRowStatus, juniHostMIBGroups=juniHostMIBGroups, juniHostCompliance=juniHostCompliance, juniHostMIBCompliances=juniHostMIBCompliances)
##def do_twice(f): # f() # f() # #def print_spam(): # print('spam') # #do_twice(print_spam) def do_twice(dt_function,dt_value): dt_function(dt_value)*2 thing = "Sausage, Egg and Spam" do_twice(print,"thing")
def do_twice(dt_function, dt_value): dt_function(dt_value) * 2 thing = 'Sausage, Egg and Spam' do_twice(print, 'thing')
class Tile: map_word = "Island beach" def describe(self): print("The beach is really quiet and you can hear and see the seagulls " "on the sea.\n") def action(self, player, do): print("What is this gibberish?") def leave(self, player, direction): if direction == "e": print("You can't go back by swimming, that part is full of " "electric eels.\n") return False elif direction == "s": print("I'm afraid I can't let you go there Dave.") return False elif direction == "w": print("The sandy beach is transforming into big rocks but it looks " "like you are able to climb them.\n" "Just be careful because they are a bit slipery.") return True else: return True
class Tile: map_word = 'Island beach' def describe(self): print('The beach is really quiet and you can hear and see the seagulls on the sea.\n') def action(self, player, do): print('What is this gibberish?') def leave(self, player, direction): if direction == 'e': print("You can't go back by swimming, that part is full of electric eels.\n") return False elif direction == 's': print("I'm afraid I can't let you go there Dave.") return False elif direction == 'w': print('The sandy beach is transforming into big rocks but it looks like you are able to climb them.\nJust be careful because they are a bit slipery.') return True else: return True
f = maxsumit assert f([]) == [] assert f([-1]) == [] assert f([0]) == [] assert f([1]) == [1] assert f([1, 0]) == [1] assert f([0, 1]) == [0, 1] assert f([0, 1, 0]) == [0, 1] assert f([2]) == [2] assert f([2, -1]) == [2] assert f([-1, 2]) == [2] assert f([-1, 2, -1]) == [2] assert f([2, -1, 3]) == [2, -1, 3] assert f([2, -1, 3, -1]) == [2, -1, 3] assert f([-1, 2, -1, 3]) == [2, -1, 3] assert f([-1, 2, -1, 3, -1]) == [2, -1, 3] assert f([-1, 1, 2, -5, -6]) == [1,2]
f = maxsumit assert f([]) == [] assert f([-1]) == [] assert f([0]) == [] assert f([1]) == [1] assert f([1, 0]) == [1] assert f([0, 1]) == [0, 1] assert f([0, 1, 0]) == [0, 1] assert f([2]) == [2] assert f([2, -1]) == [2] assert f([-1, 2]) == [2] assert f([-1, 2, -1]) == [2] assert f([2, -1, 3]) == [2, -1, 3] assert f([2, -1, 3, -1]) == [2, -1, 3] assert f([-1, 2, -1, 3]) == [2, -1, 3] assert f([-1, 2, -1, 3, -1]) == [2, -1, 3] assert f([-1, 1, 2, -5, -6]) == [1, 2]
field=[[0]*100 for i in range(100)] n,m=map(int,input().split()) for i in range(n): x,y,a,b=map(int,input().split()) for j in range(x-1,a): for k in range(y-1,b): field[j][k]+=1 a=0 for i in range(100): for j in range(100): if field[i][j]>m:a+=1 print(a)
field = [[0] * 100 for i in range(100)] (n, m) = map(int, input().split()) for i in range(n): (x, y, a, b) = map(int, input().split()) for j in range(x - 1, a): for k in range(y - 1, b): field[j][k] += 1 a = 0 for i in range(100): for j in range(100): if field[i][j] > m: a += 1 print(a)
class oprand: def init (self): self.props = {} def add (self, name, value): self.props[name] = value def get (self, name): return self.props.get(name, "") def remove (self, name): return self.props.pop(name) def parse (self, stream): pass def run (self): pass def build (self): pass __init__ = init
class Oprand: def init(self): self.props = {} def add(self, name, value): self.props[name] = value def get(self, name): return self.props.get(name, '') def remove(self, name): return self.props.pop(name) def parse(self, stream): pass def run(self): pass def build(self): pass __init__ = init
print('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~') print(' Hello world ') print('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~') user_input = input('What is your name?') reply = 'Nice to meet you ' + user_input print(reply)
print('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~') print(' Hello world ') print('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~') user_input = input('What is your name?') reply = 'Nice to meet you ' + user_input print(reply)