content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
def main():
# input
N = int(input())
Ss = [*map(int, input().split())]
Ts = [*map(int, input().split())]
# compute
for i in range(2*N):
Ts[(i+1)%N] = min(Ts[(i+1)%N], Ts[i%N]+Ss[i%N])
# output
print(Ss)
print(Ts)
for ans in Ts:
print(ans)
if __name__ == '__main__':
main()
| def main():
n = int(input())
ss = [*map(int, input().split())]
ts = [*map(int, input().split())]
for i in range(2 * N):
Ts[(i + 1) % N] = min(Ts[(i + 1) % N], Ts[i % N] + Ss[i % N])
print(Ss)
print(Ts)
for ans in Ts:
print(ans)
if __name__ == '__main__':
main() |
# Ke Chen
# knutchen@ucsd.edu
# Zero-shot Audio Source Separation via Query-based Learning from Weakly-labeled Data
# The configuration file
# for model training
exp_name = "exp_zs_asp_full" # the saved ckpt prefix name of the model
workspace = "/home/Research/ZS_ASP/" # the folder of your code
dataset_path = "/home/Research/ZS_ASP/data/audioset" # the dataset path
index_type = "full_train"
idc_path = "/home/Research/ZS_ASP/" # the folder of audioset class count files
balanced_data = True
# trained from a checkpoint, or evaluate a single model
resume_checkpoint = None
# "/home/Research/ZS_ASP/model_backup/zeroshot_asp_full.ckpt"
loss_type = "mae"
gather_mode = False
debug = False
classes_num = 527
eval_list = [] # left blank to preserve all classes, otherwise will filter the specified classes
# [15, 63, 81, 184, 335, 449, 474, 348, 486, 4] # randomly generated from the 527-classes for held-out evaludation
batch_size = 16 * 8 # batch size per GPU x GPU number , default is 16 x 8 = 128
learning_rate = 1e-3 # 3e-4 is also workable
max_epoch = 100
num_workers = 3
lr_scheduler_epoch = [90, 110]
latent_dim = 2048
# for signal processing
sample_rate = 32000
clip_samples = sample_rate * 10 # audio_set 10-sec clip
segment_frames = 200
hop_samples = 320
random_seed = 12412 # 444612 1536123 12412
random_mode = "one_class" # "no_random, one_class, random, order", one class is the best
# for evaluation
musdb_path = "/home/Research/ZS_ASP/data/musdb-wav/" # musdb download folder
testavg_path = "/home/Research/ZS_ASP/data/musdb30-train-32000fs.npy" # the processed training set (to get the latent query)
testset_path = "/home/Research/ZS_ASP/data/musdb-test-32000fs.npy" # the processed testing set (to calculate the performance)
test_key = ["vocals", "drums", "bass", "other"] # four tracks for musdb, and your named track for other inference
test_type = "mix"
infer_type = "mean"
energy_thres = 0.1
wave_output_path = "/home/Research/ZS_ASP/wavoutput" # output folder
using_wiener = True # use wiener filter or not (default: True)
using_whiting = False # use whiting or not (default: False)
# weight average
wa_model_folder = "/home/Research/ZS_ASP/version_3/checkpoints/"
wa_model_path = "zs_wa.ckpt"
# for inference
inference_file = "/home/Research/ZS_ASP/data/pagenini.wav" # an audio file to separate
inference_query = "/home/Research/ZS_ASP/data/query" # a folder containing all samples for obtaining the query
overlap_rate = 0.5 # [0.0, 1.0), 0 to disabled, recommand 0.5 for 50% overlap. Overlap will increase computation time and improve result quality | exp_name = 'exp_zs_asp_full'
workspace = '/home/Research/ZS_ASP/'
dataset_path = '/home/Research/ZS_ASP/data/audioset'
index_type = 'full_train'
idc_path = '/home/Research/ZS_ASP/'
balanced_data = True
resume_checkpoint = None
loss_type = 'mae'
gather_mode = False
debug = False
classes_num = 527
eval_list = []
batch_size = 16 * 8
learning_rate = 0.001
max_epoch = 100
num_workers = 3
lr_scheduler_epoch = [90, 110]
latent_dim = 2048
sample_rate = 32000
clip_samples = sample_rate * 10
segment_frames = 200
hop_samples = 320
random_seed = 12412
random_mode = 'one_class'
musdb_path = '/home/Research/ZS_ASP/data/musdb-wav/'
testavg_path = '/home/Research/ZS_ASP/data/musdb30-train-32000fs.npy'
testset_path = '/home/Research/ZS_ASP/data/musdb-test-32000fs.npy'
test_key = ['vocals', 'drums', 'bass', 'other']
test_type = 'mix'
infer_type = 'mean'
energy_thres = 0.1
wave_output_path = '/home/Research/ZS_ASP/wavoutput'
using_wiener = True
using_whiting = False
wa_model_folder = '/home/Research/ZS_ASP/version_3/checkpoints/'
wa_model_path = 'zs_wa.ckpt'
inference_file = '/home/Research/ZS_ASP/data/pagenini.wav'
inference_query = '/home/Research/ZS_ASP/data/query'
overlap_rate = 0.5 |
class ImportInstance(Instance,IDisposable):
""" An element created during either import or link operation in Autodesk Revit. """
def Dispose(self):
""" Dispose(self: Element,A_0: bool) """
pass
def getBoundingBox(self,*args):
""" getBoundingBox(self: Element,view: View) -> BoundingBoxXYZ """
pass
def GetVisibility(self):
"""
GetVisibility(self: ImportInstance) -> FamilyElementVisibility
Gets the visibility for the import instance in a family document.
Returns: A copy of visibility settings for the import instance in a family document.
"""
pass
def ReleaseUnmanagedResources(self,*args):
""" ReleaseUnmanagedResources(self: Element,disposing: bool) """
pass
def setElementType(self,*args):
""" setElementType(self: Element,type: ElementType,incompatibleExceptionMessage: str) """
pass
def SetVisibility(self,visibility):
"""
SetVisibility(self: ImportInstance,visibility: FamilyElementVisibility)
Sets the visibility for the import instance in a family document.
"""
pass
def __enter__(self,*args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self,*args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
IsLinked=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Identifies whether this instance is a linked object rather than imported one.
Get: IsLinked(self: ImportInstance) -> bool
"""
| class Importinstance(Instance, IDisposable):
""" An element created during either import or link operation in Autodesk Revit. """
def dispose(self):
""" Dispose(self: Element,A_0: bool) """
pass
def get_bounding_box(self, *args):
""" getBoundingBox(self: Element,view: View) -> BoundingBoxXYZ """
pass
def get_visibility(self):
"""
GetVisibility(self: ImportInstance) -> FamilyElementVisibility
Gets the visibility for the import instance in a family document.
Returns: A copy of visibility settings for the import instance in a family document.
"""
pass
def release_unmanaged_resources(self, *args):
""" ReleaseUnmanagedResources(self: Element,disposing: bool) """
pass
def set_element_type(self, *args):
""" setElementType(self: Element,type: ElementType,incompatibleExceptionMessage: str) """
pass
def set_visibility(self, visibility):
"""
SetVisibility(self: ImportInstance,visibility: FamilyElementVisibility)
Sets the visibility for the import instance in a family document.
"""
pass
def __enter__(self, *args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self, *args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
is_linked = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Identifies whether this instance is a linked object rather than imported one.\n\n\n\nGet: IsLinked(self: ImportInstance) -> bool\n\n\n\n' |
class Error(Exception):
"""Error personalizado para mayor control en los programas.
ATRIBUTOS:
type = Especifica el tipo de error, en caso de ser un
error lanzado por el usuario se sugiere utilizar
el valor 'validacion'.
message = Descripcion del error.
control = Variable utilizada por otros programas para
validar resultado.
origen = Funcion donde se dispara el error.
"""
def __init__(self, _type, _message, _control="", _origin=""):
self.type = _type
self.message = _message
self.control = _control
self.origen = _origin
def __str__(self):
msg = "[%s]....%s - (%s)" % (
self.type,
self.message,
self.control
)
return repr(msg)
| class Error(Exception):
"""Error personalizado para mayor control en los programas.
ATRIBUTOS:
type = Especifica el tipo de error, en caso de ser un
error lanzado por el usuario se sugiere utilizar
el valor 'validacion'.
message = Descripcion del error.
control = Variable utilizada por otros programas para
validar resultado.
origen = Funcion donde se dispara el error.
"""
def __init__(self, _type, _message, _control='', _origin=''):
self.type = _type
self.message = _message
self.control = _control
self.origen = _origin
def __str__(self):
msg = '[%s]....%s - (%s)' % (self.type, self.message, self.control)
return repr(msg) |
#!/bin/python
# coding: utf-8
# Source: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
statuscodes = [
(100, "Continue"),
(101, "Switching Protocol"),
(102, "Processing"),
(200, "OK"),
(201, "Created"),
(202, "Accepted"),
(203, "Non-Authoritative Information"),
(204, "No Content"),
(205, "Reset Content"),
(206, "Partial Content"),
(207, "Multi-Status"),
(208, "Already Reported"),
(226, "IM Used"),
(300, "Multiple Choices"),
(301, "Moved Permanently"),
(302, "Found"),
(303, "See Other"),
(304, "Not Modified"),
(305, "Use Proxy"),
(307, "Temporary Redirect"),
(308, "Permanent Redirect"),
(400, "Bad Request"),
(401, "Unauthorized"),
(402, "Payment Required"),
(403, "Forbidden"),
(404, "Not Found"),
(405, "Method Not Allowed"),
(406, "Not Acceptable"),
(407, "Proxy Authentication Required"),
(408, "Request Timeout"),
(409, "Conflict"),
(410, "Gone"),
(411, "Length Required"),
(412, "Precondition Failed"),
(413, "Payload Too Large"),
(414, "URI Too Long"),
(415, "Unsupported Media Type"),
(416, "Range Not Satisfiable"),
(417, "Expectation Failed"),
(422, "Unprocessable Entity"),
(423, "Locked"),
(424, "Failed Dependency"),
(426, "Upgrade Required"),
(428, "Precondition Required"),
(429, "Too Many Requests"),
(431, "Request Header Fields Too Large"),
(500, "Internal Server Error"),
(501, "Not Implemented"),
(502, "Bad Gateway"),
(503, "Service Unavailable"),
(504, "Gateway Timeout"),
(505, "HTTP Version Not Supported"),
(506, "Variant Also Negotiates"),
(507, "Insufficient Storage"),
(508, "Loop Detected"),
(510, "Not Extended"),
(511, "Network Authentication Required"),
(103, "Unassigned"),
(104, "Unassigned"),
(105, "Unassigned"),
(106, "Unassigned"),
(107, "Unassigned"),
(108, "Unassigned"),
(109, "Unassigned"),
(110, "Unassigned"),
(111, "Unassigned"),
(112, "Unassigned"),
(113, "Unassigned"),
(114, "Unassigned"),
(115, "Unassigned"),
(116, "Unassigned"),
(117, "Unassigned"),
(118, "Unassigned"),
(119, "Unassigned"),
(120, "Unassigned"),
(121, "Unassigned"),
(122, "Unassigned"),
(123, "Unassigned"),
(124, "Unassigned"),
(125, "Unassigned"),
(126, "Unassigned"),
(127, "Unassigned"),
(128, "Unassigned"),
(129, "Unassigned"),
(130, "Unassigned"),
(131, "Unassigned"),
(132, "Unassigned"),
(133, "Unassigned"),
(134, "Unassigned"),
(135, "Unassigned"),
(136, "Unassigned"),
(137, "Unassigned"),
(138, "Unassigned"),
(139, "Unassigned"),
(140, "Unassigned"),
(141, "Unassigned"),
(142, "Unassigned"),
(143, "Unassigned"),
(144, "Unassigned"),
(145, "Unassigned"),
(146, "Unassigned"),
(147, "Unassigned"),
(148, "Unassigned"),
(149, "Unassigned"),
(150, "Unassigned"),
(151, "Unassigned"),
(152, "Unassigned"),
(153, "Unassigned"),
(154, "Unassigned"),
(155, "Unassigned"),
(156, "Unassigned"),
(157, "Unassigned"),
(158, "Unassigned"),
(159, "Unassigned"),
(160, "Unassigned"),
(161, "Unassigned"),
(162, "Unassigned"),
(163, "Unassigned"),
(164, "Unassigned"),
(165, "Unassigned"),
(166, "Unassigned"),
(167, "Unassigned"),
(168, "Unassigned"),
(169, "Unassigned"),
(170, "Unassigned"),
(171, "Unassigned"),
(172, "Unassigned"),
(173, "Unassigned"),
(174, "Unassigned"),
(175, "Unassigned"),
(176, "Unassigned"),
(177, "Unassigned"),
(178, "Unassigned"),
(179, "Unassigned"),
(180, "Unassigned"),
(181, "Unassigned"),
(182, "Unassigned"),
(183, "Unassigned"),
(184, "Unassigned"),
(185, "Unassigned"),
(186, "Unassigned"),
(187, "Unassigned"),
(188, "Unassigned"),
(189, "Unassigned"),
(190, "Unassigned"),
(191, "Unassigned"),
(192, "Unassigned"),
(193, "Unassigned"),
(194, "Unassigned"),
(195, "Unassigned"),
(196, "Unassigned"),
(197, "Unassigned"),
(198, "Unassigned"),
(199, "Unassigned"),
(209, "Unassigned"),
(210, "Unassigned"),
(211, "Unassigned"),
(212, "Unassigned"),
(213, "Unassigned"),
(214, "Unassigned"),
(215, "Unassigned"),
(216, "Unassigned"),
(217, "Unassigned"),
(218, "Unassigned"),
(219, "Unassigned"),
(220, "Unassigned"),
(221, "Unassigned"),
(222, "Unassigned"),
(223, "Unassigned"),
(224, "Unassigned"),
(225, "Unassigned"),
(227, "Unassigned"),
(228, "Unassigned"),
(229, "Unassigned"),
(230, "Unassigned"),
(231, "Unassigned"),
(232, "Unassigned"),
(233, "Unassigned"),
(234, "Unassigned"),
(235, "Unassigned"),
(236, "Unassigned"),
(237, "Unassigned"),
(238, "Unassigned"),
(239, "Unassigned"),
(240, "Unassigned"),
(241, "Unassigned"),
(242, "Unassigned"),
(243, "Unassigned"),
(244, "Unassigned"),
(245, "Unassigned"),
(246, "Unassigned"),
(247, "Unassigned"),
(248, "Unassigned"),
(249, "Unassigned"),
(250, "Unassigned"),
(251, "Unassigned"),
(252, "Unassigned"),
(253, "Unassigned"),
(254, "Unassigned"),
(255, "Unassigned"),
(256, "Unassigned"),
(257, "Unassigned"),
(258, "Unassigned"),
(259, "Unassigned"),
(260, "Unassigned"),
(261, "Unassigned"),
(262, "Unassigned"),
(263, "Unassigned"),
(264, "Unassigned"),
(265, "Unassigned"),
(266, "Unassigned"),
(267, "Unassigned"),
(268, "Unassigned"),
(269, "Unassigned"),
(270, "Unassigned"),
(271, "Unassigned"),
(272, "Unassigned"),
(273, "Unassigned"),
(274, "Unassigned"),
(275, "Unassigned"),
(276, "Unassigned"),
(277, "Unassigned"),
(278, "Unassigned"),
(279, "Unassigned"),
(280, "Unassigned"),
(281, "Unassigned"),
(282, "Unassigned"),
(283, "Unassigned"),
(284, "Unassigned"),
(285, "Unassigned"),
(286, "Unassigned"),
(287, "Unassigned"),
(288, "Unassigned"),
(289, "Unassigned"),
(290, "Unassigned"),
(291, "Unassigned"),
(292, "Unassigned"),
(293, "Unassigned"),
(294, "Unassigned"),
(295, "Unassigned"),
(296, "Unassigned"),
(297, "Unassigned"),
(298, "Unassigned"),
(299, "Unassigned"),
(309, "(Unused"),
(309, "Unassigned"),
(310, "Unassigned"),
(311, "Unassigned"),
(312, "Unassigned"),
(313, "Unassigned"),
(314, "Unassigned"),
(315, "Unassigned"),
(316, "Unassigned"),
(317, "Unassigned"),
(318, "Unassigned"),
(319, "Unassigned"),
(320, "Unassigned"),
(321, "Unassigned"),
(322, "Unassigned"),
(323, "Unassigned"),
(324, "Unassigned"),
(325, "Unassigned"),
(326, "Unassigned"),
(327, "Unassigned"),
(328, "Unassigned"),
(329, "Unassigned"),
(330, "Unassigned"),
(331, "Unassigned"),
(332, "Unassigned"),
(333, "Unassigned"),
(334, "Unassigned"),
(335, "Unassigned"),
(336, "Unassigned"),
(337, "Unassigned"),
(338, "Unassigned"),
(339, "Unassigned"),
(340, "Unassigned"),
(341, "Unassigned"),
(342, "Unassigned"),
(343, "Unassigned"),
(344, "Unassigned"),
(345, "Unassigned"),
(346, "Unassigned"),
(347, "Unassigned"),
(348, "Unassigned"),
(349, "Unassigned"),
(350, "Unassigned"),
(351, "Unassigned"),
(352, "Unassigned"),
(353, "Unassigned"),
(354, "Unassigned"),
(355, "Unassigned"),
(356, "Unassigned"),
(357, "Unassigned"),
(358, "Unassigned"),
(359, "Unassigned"),
(360, "Unassigned"),
(361, "Unassigned"),
(362, "Unassigned"),
(363, "Unassigned"),
(364, "Unassigned"),
(365, "Unassigned"),
(366, "Unassigned"),
(367, "Unassigned"),
(368, "Unassigned"),
(369, "Unassigned"),
(370, "Unassigned"),
(371, "Unassigned"),
(372, "Unassigned"),
(373, "Unassigned"),
(374, "Unassigned"),
(375, "Unassigned"),
(376, "Unassigned"),
(377, "Unassigned"),
(378, "Unassigned"),
(379, "Unassigned"),
(380, "Unassigned"),
(381, "Unassigned"),
(382, "Unassigned"),
(383, "Unassigned"),
(384, "Unassigned"),
(385, "Unassigned"),
(386, "Unassigned"),
(387, "Unassigned"),
(388, "Unassigned"),
(389, "Unassigned"),
(390, "Unassigned"),
(391, "Unassigned"),
(392, "Unassigned"),
(393, "Unassigned"),
(394, "Unassigned"),
(395, "Unassigned"),
(396, "Unassigned"),
(397, "Unassigned"),
(398, "Unassigned"),
(399, "Unassigned"),
(418, "Unassigned"),
(419, "Unassigned"),
(420, "Unassigned"),
(421, "Unassigned"),
(425, "Unassigned"),
(427, "Unassigned"),
(430, "Unassigned"),
(432, "Unassigned"),
(433, "Unassigned"),
(434, "Unassigned"),
(435, "Unassigned"),
(436, "Unassigned"),
(437, "Unassigned"),
(438, "Unassigned"),
(439, "Unassigned"),
(440, "Unassigned"),
(441, "Unassigned"),
(442, "Unassigned"),
(443, "Unassigned"),
(444, "Unassigned"),
(445, "Unassigned"),
(446, "Unassigned"),
(447, "Unassigned"),
(448, "Unassigned"),
(449, "Unassigned"),
(450, "Unassigned"),
(451, "Unassigned"),
(452, "Unassigned"),
(453, "Unassigned"),
(454, "Unassigned"),
(455, "Unassigned"),
(456, "Unassigned"),
(457, "Unassigned"),
(458, "Unassigned"),
(459, "Unassigned"),
(460, "Unassigned"),
(461, "Unassigned"),
(462, "Unassigned"),
(463, "Unassigned"),
(464, "Unassigned"),
(465, "Unassigned"),
(466, "Unassigned"),
(467, "Unassigned"),
(468, "Unassigned"),
(469, "Unassigned"),
(470, "Unassigned"),
(471, "Unassigned"),
(472, "Unassigned"),
(473, "Unassigned"),
(474, "Unassigned"),
(475, "Unassigned"),
(476, "Unassigned"),
(477, "Unassigned"),
(478, "Unassigned"),
(479, "Unassigned"),
(480, "Unassigned"),
(481, "Unassigned"),
(482, "Unassigned"),
(483, "Unassigned"),
(484, "Unassigned"),
(485, "Unassigned"),
(486, "Unassigned"),
(487, "Unassigned"),
(488, "Unassigned"),
(489, "Unassigned"),
(490, "Unassigned"),
(491, "Unassigned"),
(492, "Unassigned"),
(493, "Unassigned"),
(494, "Unassigned"),
(495, "Unassigned"),
(496, "Unassigned"),
(497, "Unassigned"),
(498, "Unassigned"),
(499, "Unassigned"),
(509, "Unassigned")
]
| statuscodes = [(100, 'Continue'), (101, 'Switching Protocol'), (102, 'Processing'), (200, 'OK'), (201, 'Created'), (202, 'Accepted'), (203, 'Non-Authoritative Information'), (204, 'No Content'), (205, 'Reset Content'), (206, 'Partial Content'), (207, 'Multi-Status'), (208, 'Already Reported'), (226, 'IM Used'), (300, 'Multiple Choices'), (301, 'Moved Permanently'), (302, 'Found'), (303, 'See Other'), (304, 'Not Modified'), (305, 'Use Proxy'), (307, 'Temporary Redirect'), (308, 'Permanent Redirect'), (400, 'Bad Request'), (401, 'Unauthorized'), (402, 'Payment Required'), (403, 'Forbidden'), (404, 'Not Found'), (405, 'Method Not Allowed'), (406, 'Not Acceptable'), (407, 'Proxy Authentication Required'), (408, 'Request Timeout'), (409, 'Conflict'), (410, 'Gone'), (411, 'Length Required'), (412, 'Precondition Failed'), (413, 'Payload Too Large'), (414, 'URI Too Long'), (415, 'Unsupported Media Type'), (416, 'Range Not Satisfiable'), (417, 'Expectation Failed'), (422, 'Unprocessable Entity'), (423, 'Locked'), (424, 'Failed Dependency'), (426, 'Upgrade Required'), (428, 'Precondition Required'), (429, 'Too Many Requests'), (431, 'Request Header Fields Too Large'), (500, 'Internal Server Error'), (501, 'Not Implemented'), (502, 'Bad Gateway'), (503, 'Service Unavailable'), (504, 'Gateway Timeout'), (505, 'HTTP Version Not Supported'), (506, 'Variant Also Negotiates'), (507, 'Insufficient Storage'), (508, 'Loop Detected'), (510, 'Not Extended'), (511, 'Network Authentication Required'), (103, 'Unassigned'), (104, 'Unassigned'), (105, 'Unassigned'), (106, 'Unassigned'), (107, 'Unassigned'), (108, 'Unassigned'), (109, 'Unassigned'), (110, 'Unassigned'), (111, 'Unassigned'), (112, 'Unassigned'), (113, 'Unassigned'), (114, 'Unassigned'), (115, 'Unassigned'), (116, 'Unassigned'), (117, 'Unassigned'), (118, 'Unassigned'), (119, 'Unassigned'), (120, 'Unassigned'), (121, 'Unassigned'), (122, 'Unassigned'), (123, 'Unassigned'), (124, 'Unassigned'), (125, 'Unassigned'), (126, 'Unassigned'), (127, 'Unassigned'), (128, 'Unassigned'), (129, 'Unassigned'), (130, 'Unassigned'), (131, 'Unassigned'), (132, 'Unassigned'), (133, 'Unassigned'), (134, 'Unassigned'), (135, 'Unassigned'), (136, 'Unassigned'), (137, 'Unassigned'), (138, 'Unassigned'), (139, 'Unassigned'), (140, 'Unassigned'), (141, 'Unassigned'), (142, 'Unassigned'), (143, 'Unassigned'), (144, 'Unassigned'), (145, 'Unassigned'), (146, 'Unassigned'), (147, 'Unassigned'), (148, 'Unassigned'), (149, 'Unassigned'), (150, 'Unassigned'), (151, 'Unassigned'), (152, 'Unassigned'), (153, 'Unassigned'), (154, 'Unassigned'), (155, 'Unassigned'), (156, 'Unassigned'), (157, 'Unassigned'), (158, 'Unassigned'), (159, 'Unassigned'), (160, 'Unassigned'), (161, 'Unassigned'), (162, 'Unassigned'), (163, 'Unassigned'), (164, 'Unassigned'), (165, 'Unassigned'), (166, 'Unassigned'), (167, 'Unassigned'), (168, 'Unassigned'), (169, 'Unassigned'), (170, 'Unassigned'), (171, 'Unassigned'), (172, 'Unassigned'), (173, 'Unassigned'), (174, 'Unassigned'), (175, 'Unassigned'), (176, 'Unassigned'), (177, 'Unassigned'), (178, 'Unassigned'), (179, 'Unassigned'), (180, 'Unassigned'), (181, 'Unassigned'), (182, 'Unassigned'), (183, 'Unassigned'), (184, 'Unassigned'), (185, 'Unassigned'), (186, 'Unassigned'), (187, 'Unassigned'), (188, 'Unassigned'), (189, 'Unassigned'), (190, 'Unassigned'), (191, 'Unassigned'), (192, 'Unassigned'), (193, 'Unassigned'), (194, 'Unassigned'), (195, 'Unassigned'), (196, 'Unassigned'), (197, 'Unassigned'), (198, 'Unassigned'), (199, 'Unassigned'), (209, 'Unassigned'), (210, 'Unassigned'), (211, 'Unassigned'), (212, 'Unassigned'), (213, 'Unassigned'), (214, 'Unassigned'), (215, 'Unassigned'), (216, 'Unassigned'), (217, 'Unassigned'), (218, 'Unassigned'), (219, 'Unassigned'), (220, 'Unassigned'), (221, 'Unassigned'), (222, 'Unassigned'), (223, 'Unassigned'), (224, 'Unassigned'), (225, 'Unassigned'), (227, 'Unassigned'), (228, 'Unassigned'), (229, 'Unassigned'), (230, 'Unassigned'), (231, 'Unassigned'), (232, 'Unassigned'), (233, 'Unassigned'), (234, 'Unassigned'), (235, 'Unassigned'), (236, 'Unassigned'), (237, 'Unassigned'), (238, 'Unassigned'), (239, 'Unassigned'), (240, 'Unassigned'), (241, 'Unassigned'), (242, 'Unassigned'), (243, 'Unassigned'), (244, 'Unassigned'), (245, 'Unassigned'), (246, 'Unassigned'), (247, 'Unassigned'), (248, 'Unassigned'), (249, 'Unassigned'), (250, 'Unassigned'), (251, 'Unassigned'), (252, 'Unassigned'), (253, 'Unassigned'), (254, 'Unassigned'), (255, 'Unassigned'), (256, 'Unassigned'), (257, 'Unassigned'), (258, 'Unassigned'), (259, 'Unassigned'), (260, 'Unassigned'), (261, 'Unassigned'), (262, 'Unassigned'), (263, 'Unassigned'), (264, 'Unassigned'), (265, 'Unassigned'), (266, 'Unassigned'), (267, 'Unassigned'), (268, 'Unassigned'), (269, 'Unassigned'), (270, 'Unassigned'), (271, 'Unassigned'), (272, 'Unassigned'), (273, 'Unassigned'), (274, 'Unassigned'), (275, 'Unassigned'), (276, 'Unassigned'), (277, 'Unassigned'), (278, 'Unassigned'), (279, 'Unassigned'), (280, 'Unassigned'), (281, 'Unassigned'), (282, 'Unassigned'), (283, 'Unassigned'), (284, 'Unassigned'), (285, 'Unassigned'), (286, 'Unassigned'), (287, 'Unassigned'), (288, 'Unassigned'), (289, 'Unassigned'), (290, 'Unassigned'), (291, 'Unassigned'), (292, 'Unassigned'), (293, 'Unassigned'), (294, 'Unassigned'), (295, 'Unassigned'), (296, 'Unassigned'), (297, 'Unassigned'), (298, 'Unassigned'), (299, 'Unassigned'), (309, '(Unused'), (309, 'Unassigned'), (310, 'Unassigned'), (311, 'Unassigned'), (312, 'Unassigned'), (313, 'Unassigned'), (314, 'Unassigned'), (315, 'Unassigned'), (316, 'Unassigned'), (317, 'Unassigned'), (318, 'Unassigned'), (319, 'Unassigned'), (320, 'Unassigned'), (321, 'Unassigned'), (322, 'Unassigned'), (323, 'Unassigned'), (324, 'Unassigned'), (325, 'Unassigned'), (326, 'Unassigned'), (327, 'Unassigned'), (328, 'Unassigned'), (329, 'Unassigned'), (330, 'Unassigned'), (331, 'Unassigned'), (332, 'Unassigned'), (333, 'Unassigned'), (334, 'Unassigned'), (335, 'Unassigned'), (336, 'Unassigned'), (337, 'Unassigned'), (338, 'Unassigned'), (339, 'Unassigned'), (340, 'Unassigned'), (341, 'Unassigned'), (342, 'Unassigned'), (343, 'Unassigned'), (344, 'Unassigned'), (345, 'Unassigned'), (346, 'Unassigned'), (347, 'Unassigned'), (348, 'Unassigned'), (349, 'Unassigned'), (350, 'Unassigned'), (351, 'Unassigned'), (352, 'Unassigned'), (353, 'Unassigned'), (354, 'Unassigned'), (355, 'Unassigned'), (356, 'Unassigned'), (357, 'Unassigned'), (358, 'Unassigned'), (359, 'Unassigned'), (360, 'Unassigned'), (361, 'Unassigned'), (362, 'Unassigned'), (363, 'Unassigned'), (364, 'Unassigned'), (365, 'Unassigned'), (366, 'Unassigned'), (367, 'Unassigned'), (368, 'Unassigned'), (369, 'Unassigned'), (370, 'Unassigned'), (371, 'Unassigned'), (372, 'Unassigned'), (373, 'Unassigned'), (374, 'Unassigned'), (375, 'Unassigned'), (376, 'Unassigned'), (377, 'Unassigned'), (378, 'Unassigned'), (379, 'Unassigned'), (380, 'Unassigned'), (381, 'Unassigned'), (382, 'Unassigned'), (383, 'Unassigned'), (384, 'Unassigned'), (385, 'Unassigned'), (386, 'Unassigned'), (387, 'Unassigned'), (388, 'Unassigned'), (389, 'Unassigned'), (390, 'Unassigned'), (391, 'Unassigned'), (392, 'Unassigned'), (393, 'Unassigned'), (394, 'Unassigned'), (395, 'Unassigned'), (396, 'Unassigned'), (397, 'Unassigned'), (398, 'Unassigned'), (399, 'Unassigned'), (418, 'Unassigned'), (419, 'Unassigned'), (420, 'Unassigned'), (421, 'Unassigned'), (425, 'Unassigned'), (427, 'Unassigned'), (430, 'Unassigned'), (432, 'Unassigned'), (433, 'Unassigned'), (434, 'Unassigned'), (435, 'Unassigned'), (436, 'Unassigned'), (437, 'Unassigned'), (438, 'Unassigned'), (439, 'Unassigned'), (440, 'Unassigned'), (441, 'Unassigned'), (442, 'Unassigned'), (443, 'Unassigned'), (444, 'Unassigned'), (445, 'Unassigned'), (446, 'Unassigned'), (447, 'Unassigned'), (448, 'Unassigned'), (449, 'Unassigned'), (450, 'Unassigned'), (451, 'Unassigned'), (452, 'Unassigned'), (453, 'Unassigned'), (454, 'Unassigned'), (455, 'Unassigned'), (456, 'Unassigned'), (457, 'Unassigned'), (458, 'Unassigned'), (459, 'Unassigned'), (460, 'Unassigned'), (461, 'Unassigned'), (462, 'Unassigned'), (463, 'Unassigned'), (464, 'Unassigned'), (465, 'Unassigned'), (466, 'Unassigned'), (467, 'Unassigned'), (468, 'Unassigned'), (469, 'Unassigned'), (470, 'Unassigned'), (471, 'Unassigned'), (472, 'Unassigned'), (473, 'Unassigned'), (474, 'Unassigned'), (475, 'Unassigned'), (476, 'Unassigned'), (477, 'Unassigned'), (478, 'Unassigned'), (479, 'Unassigned'), (480, 'Unassigned'), (481, 'Unassigned'), (482, 'Unassigned'), (483, 'Unassigned'), (484, 'Unassigned'), (485, 'Unassigned'), (486, 'Unassigned'), (487, 'Unassigned'), (488, 'Unassigned'), (489, 'Unassigned'), (490, 'Unassigned'), (491, 'Unassigned'), (492, 'Unassigned'), (493, 'Unassigned'), (494, 'Unassigned'), (495, 'Unassigned'), (496, 'Unassigned'), (497, 'Unassigned'), (498, 'Unassigned'), (499, 'Unassigned'), (509, 'Unassigned')] |
async def send_large_text(channel, contents):
return_messages = []
content_lines = contents.splitlines(True)
output = ""
for line in content_lines:
if len(output) > 1800:
return_messages.append(await channel.send(output))
output = ""
output += line
if len(output) > 0:
return_messages.append(await channel.send(output))
return return_messages
async def send_large_embed(channel, embed, contents):
return_messages = []
content_lines = contents.splitlines(True)
output = ""
for line in content_lines:
if len(output) > 1800:
embed.description = output
return_messages.append(await channel.send(embed=embed))
output = ""
output += line
if len(output) > 0:
embed.description = output
return_messages.append(await channel.send(embed=embed))
return return_messages
| async def send_large_text(channel, contents):
return_messages = []
content_lines = contents.splitlines(True)
output = ''
for line in content_lines:
if len(output) > 1800:
return_messages.append(await channel.send(output))
output = ''
output += line
if len(output) > 0:
return_messages.append(await channel.send(output))
return return_messages
async def send_large_embed(channel, embed, contents):
return_messages = []
content_lines = contents.splitlines(True)
output = ''
for line in content_lines:
if len(output) > 1800:
embed.description = output
return_messages.append(await channel.send(embed=embed))
output = ''
output += line
if len(output) > 0:
embed.description = output
return_messages.append(await channel.send(embed=embed))
return return_messages |
class Point:
def __init__(self, x, y):
self.x = x
self.y = y
def __str__(self):
return "("+str(self.x)+","+str(self.y)+")"
class Rect:
def __init__(self, p1, p2):
self.lowerleft = p1
self.upperright = p2
def area(self):
dx = upperright.x - lowerleft.x
dy = upperright.y - lowerleft.y
return dx * dy
def contains(self,p):
if lowerleft.x <= p.x <= upperright.x \
and lowerleft.y <= p.y <= upperright.y :#check x & y
return True
return False
x1,y1,x2,y2 = [int(e) for e in input().split()]
lowerleft = Point(x1,y1)
upperright = Point(x2,y2)
rect = Rect(lowerleft, upperright)
print(Rect.area())
m = int(input())
for i in range(m):
x,y = [int(e) for e in input().split()]
p = Point(x,y)
print(Rect.contains(p))
| class Point:
def __init__(self, x, y):
self.x = x
self.y = y
def __str__(self):
return '(' + str(self.x) + ',' + str(self.y) + ')'
class Rect:
def __init__(self, p1, p2):
self.lowerleft = p1
self.upperright = p2
def area(self):
dx = upperright.x - lowerleft.x
dy = upperright.y - lowerleft.y
return dx * dy
def contains(self, p):
if lowerleft.x <= p.x <= upperright.x and lowerleft.y <= p.y <= upperright.y:
return True
return False
(x1, y1, x2, y2) = [int(e) for e in input().split()]
lowerleft = point(x1, y1)
upperright = point(x2, y2)
rect = rect(lowerleft, upperright)
print(Rect.area())
m = int(input())
for i in range(m):
(x, y) = [int(e) for e in input().split()]
p = point(x, y)
print(Rect.contains(p)) |
# Copyright (c) 2020 Dell Inc. or its subsidiaries.
#
# 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.
"""pyu4v_performance_data.py."""
class PerformanceData(object):
"""Performance data."""
first_date = 1555777200000
last_date = 1587399600000
perf_metrics_resp = {'resultList': {
'result': [{'PercentBusy': 0.025403459, 'timestamp': first_date},
{'PercentBusy': 0.027849833, 'timestamp': last_date}],
'from': 1, 'to': 2}, 'count': 2, 'expirationTime': last_date,
'id': 'c2c3a5bd-5bed-41b2-be7c-24376496bc73_0', 'maxPageSize': 1000}
director_info = {'directorId': 'test'}
array = '000197800123'
remote_array = '000197800124'
array_keys_empty = {'arrayInfo': list()}
array_keys = {'arrayInfo': [{'symmetrixId': array,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
array_reg_details_enabled = {'registrationDetailsInfo': [{
'symmetrixId': array, 'realtime': True, 'collectionintervalmins': 5,
'diagnostic': True, 'message': 'Success'}]}
array_reg_details_disabled = {'registrationDetailsInfo': [{
'symmetrixId': array, 'realtime': False, 'collectionintervalmins': 0,
'diagnostic': False, 'message': 'Success'}]}
array_is_registered_true = {'isRegistered': True}
array_is_registered_false = {'isRegistered': False}
array_register_success = {"message": [
"Successfully applied registration changes for "
"{arr} array(s).".format(arr=array)]}
array_register_fail = {"message": [
"Could not apply registration changes for {arr} array(s).".format(
arr=array)]}
array_backup_success = {'message': [
'Backup of {arr} array is now in progress.'.format(arr=array)]}
array_backup_fail = {'message': ['SymmetrixId [fake] not found.']}
be_dir_id = 'DF-1C'
be_dir_keys = {'beDirectorInfo': [{'directorId': be_dir_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
be_emu_id = 'DF-2C:2:11'
be_emu_keys = {'beEmulationInfo': [{'beEmulationId': be_emu_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
be_port_id = '12'
be_port_keys = {'bePortInfo': [{'portId': be_port_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
board_id = '1'
board_keys = {'boardInfo': [{'boardId': board_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
cache_part_id = 'test_partition'
cache_partition_keys = {
'cachePartitionInfo': [{'cachePartitionId': cache_part_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
core_id = '1:0'
core_keys = {'coreInfo': [{'coreId': core_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
database_id = 'my_test_db'
database_keys = {'databaseInfo': [{'databaseId': database_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
db_pool_id = 'DG1_F_F'
database_by_pool_keys = {'databaseByPoolInfo': [{
'poolId': db_pool_id, 'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
device_group_id = '526'
device_group_keys = {'deviceGroupInfo': [{'deviceGroupId': device_group_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
disk_id = '0'
disk_keys = {'diskInfo': [{'diskId': disk_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
disk_group_id = '0'
disk_group_keys = {'diskGroupInfo': [{'diskGroupId': disk_group_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
disk_technology = 'EFD'
disk_tech_pool_keys = {'diskTechPoolInfo': [{
'diskTechnology': disk_technology, 'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
eds_dir_id = 'ED-1B'
eds_dir_keys = {'edsDirectorInfo': [{'directorId': eds_dir_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
eds_emu_id = 'ED-1B:1:29'
eds_emu_keys = {'edsEmulationInfo': [{'edsEmulationId': eds_emu_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
ext_dir_id = 'ED-1G'
ext_dir_keys = {'externalDirectorInfo': [{'directorId': ext_dir_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
ext_disk_id = '5'
external_disk_id = {'externalDiskInfo': [{'diskId': ext_disk_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
ext_disk_group_id = '512'
ext_disk_group_keys = {'externalDiskGroupInfo': [{
'diskGroupId': ext_disk_group_id, 'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
fe_dir_id = 'FA-1D'
se_dir_id = 'SE-4E'
fe_dir_keys = {'feDirectorInfo': [{'directorId': fe_dir_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
fe_emu_id = 'FA-4D:4:66'
fe_emu_keys = {'feEmulationInfo': [{'feEmulationId': fe_emu_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
fe_port_id = '4'
fe_port_keys = {'fePortInfo': [{'portId': fe_port_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
ficon_emu_id = 'EF-2E:2'
ficon_emu_keys = {'ficonEmulationInfo': [{'ficonEmulationId': ficon_emu_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
ficon_emu_thread_id = 'EF-2E:2:0'
ficon_emu_thread_keys = {'ficonEmulationThreadInfo': [{
'ficonEmulationThreadId': ficon_emu_thread_id,
'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
ficon_port_thread_id = 'EF-2E:2:10'
ficon_port_thread_keys = {'ficonPortThreadInfo': [{
'ficonPortThreadId': ficon_port_thread_id,
'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
host_id = 'test_host'
host_keys = {'hostInfo': [{'hostId': host_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
im_dir_id = 'IM-1A'
im_dir_keys = {'imDirectorInfo': [{'directorId': im_dir_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
im_emu_id = 'IM-2A:2:0'
im_emu_keys = {'iMEmulationInfo': [{'imEmulationId': im_emu_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
init_id = '10000090fa141c10'
init_keys = {'initiatorInfo': [{'initiatorId': init_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
init_by_port_id = 'FA-1D:5:100000109b1b8ede'
init_by_port_keys = {'initiatorByPortInfo': [{
'initiatorByPortId': init_by_port_id, 'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
ip_interface_id = 'SE-3E:8:17:192.168.0.70'
ip_interface_keys = {'iSCSIClientInfo': [{'ipInterfaceId': ip_interface_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
iscsi_target_id = 'iqn.1992-04.com.emc:60000'
iscsi_target_keys = {'iSCSITargetInfo': [{'iSCSITargetId': iscsi_target_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
masking_view_id = 'test-mv'
masking_view_keys = {'maskingViewInfo': [{'maskingViewId': iscsi_target_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
port_group_id = 'test-pg'
port_group_keys = {'portGroupInfo': [{'portGroupId': port_group_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
rdfa_group_id = '11'
rdfa_keys = {'rdfaInfo': [{'raGroupId': rdfa_group_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
rdfs_group_id = '11'
rdfs_keys = {'rdfsInfo': [{'raGroupId': rdfs_group_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
rdf_dir_id = 'RF-1F'
rdf_dir_keys = {'rdfDirectorInfo': [{'directorId': rdf_dir_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
rdf_emu_id = 'RF-3F:3:68'
rdf_emu_keys = {'rdfEmulationInfo': [{'rdfEmulationId': rdf_emu_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
rdf_port_id = '7'
rdf_port_keys = {'rdfPortInfo': [{'portId': rdf_port_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
storage_container_id = 'test_container_1'
storage_container_keys = {'storageContainerInfo': [{
'storageContainerId': storage_container_id,
'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
storage_group_id = 'test_sg'
storage_group_keys = {'storageGroupInfo': [{
'storageGroupId': storage_group_id, 'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
storage_group_by_pool_id = 'test-pool'
storage_group_by_pool_keys = {'poolInfo': [{
'poolId': 'test-pool', 'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
srp_id = 'SRP_1'
srp_keys = {'srpInfo': [{'srpId': srp_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
storage_resource_id = 'storage_resource_1'
storage_resource_keys = {'storageResourceInfo': [{
'storageResourceId': storage_resource_id,
'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
storage_resource_by_pool_id = 'DG1_F_7'
storage_resource_by_pool_keys = {'poolInfo': [{
'poolId': storage_resource_by_pool_id,
'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
thin_pool_id = 'test_thin_pool'
thin_pool_keys = {'poolInfo': [{'poolId': thin_pool_id,
'firstAvailableDate': first_date,
'lastAvailableDate': last_date}]}
# Threshold
threshold_cat_resp = {'endpoint': ['Array']}
threshold_settings_resp = {
'category': 'Array', 'num_of_metric_performance_thresholds': 2,
'success': 'False', 'performanceThreshold': [
{'metric': 'ResponseTime', 'kpi': 'True', 'alertError': 'False',
'firstThreshold': 20, 'secondThreshold': 30},
{'metric': 'HostMBWritten', 'kpi': 'False', 'alertError': 'False',
'firstThreshold': 0, 'secondThreshold': 0}]}
# Days to full
days_to_full_resp = {'daysToFullObjectResultType': [{
'ProjectionDaysToFull': 181.0, 'PercentUsedCapacity': 0.17,
'TotalPoolCapacityGB': 62590.0, 'instanceId': array}]}
# Real-time
rt_categories = {"categoryName": [
"Array", "BEDirector", "BEPort", "ExternalDirector", "FEDirector",
"FEPort", "RDFDirector", "RDFPort", "StorageGroups"]}
rt_metrics = {"metricName": ["IOs", "PercentBusy", "ReadReqs", "Reqs",
"WriteReqs"]}
rt_times = {"arrayInfo": [
{"symmetrixId": array, "firstAvailableDate": 1599739566984,
"lastAvailableDate": 1599743600991},
{"symmetrixId": remote_array, "firstAvailableDate": 1599739572983,
"lastAvailableDate": 1599743600984}]}
rt_keys = {"keys": [array, remote_array]}
rt_perf_metrics = {
"expirationTime": 1599744006249, "count": 13,
"maxPageSize": 1000, "id": "b6807ec4-3ef3-4b7c-818f-5eda2311910a_0",
"resultList": {"from": 1, "to": 13, "result": [
{"FEReadReqs": 12.0, "HostMBs": 0.30714843},
{"FEReadReqs": 12.333333, "HostMBs": 0.30714843},
{"FEReadReqs": 14.0, "HostMBs": 0.38320404}]}}
| """pyu4v_performance_data.py."""
class Performancedata(object):
"""Performance data."""
first_date = 1555777200000
last_date = 1587399600000
perf_metrics_resp = {'resultList': {'result': [{'PercentBusy': 0.025403459, 'timestamp': first_date}, {'PercentBusy': 0.027849833, 'timestamp': last_date}], 'from': 1, 'to': 2}, 'count': 2, 'expirationTime': last_date, 'id': 'c2c3a5bd-5bed-41b2-be7c-24376496bc73_0', 'maxPageSize': 1000}
director_info = {'directorId': 'test'}
array = '000197800123'
remote_array = '000197800124'
array_keys_empty = {'arrayInfo': list()}
array_keys = {'arrayInfo': [{'symmetrixId': array, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
array_reg_details_enabled = {'registrationDetailsInfo': [{'symmetrixId': array, 'realtime': True, 'collectionintervalmins': 5, 'diagnostic': True, 'message': 'Success'}]}
array_reg_details_disabled = {'registrationDetailsInfo': [{'symmetrixId': array, 'realtime': False, 'collectionintervalmins': 0, 'diagnostic': False, 'message': 'Success'}]}
array_is_registered_true = {'isRegistered': True}
array_is_registered_false = {'isRegistered': False}
array_register_success = {'message': ['Successfully applied registration changes for {arr} array(s).'.format(arr=array)]}
array_register_fail = {'message': ['Could not apply registration changes for {arr} array(s).'.format(arr=array)]}
array_backup_success = {'message': ['Backup of {arr} array is now in progress.'.format(arr=array)]}
array_backup_fail = {'message': ['SymmetrixId [fake] not found.']}
be_dir_id = 'DF-1C'
be_dir_keys = {'beDirectorInfo': [{'directorId': be_dir_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
be_emu_id = 'DF-2C:2:11'
be_emu_keys = {'beEmulationInfo': [{'beEmulationId': be_emu_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
be_port_id = '12'
be_port_keys = {'bePortInfo': [{'portId': be_port_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
board_id = '1'
board_keys = {'boardInfo': [{'boardId': board_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
cache_part_id = 'test_partition'
cache_partition_keys = {'cachePartitionInfo': [{'cachePartitionId': cache_part_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
core_id = '1:0'
core_keys = {'coreInfo': [{'coreId': core_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
database_id = 'my_test_db'
database_keys = {'databaseInfo': [{'databaseId': database_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
db_pool_id = 'DG1_F_F'
database_by_pool_keys = {'databaseByPoolInfo': [{'poolId': db_pool_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
device_group_id = '526'
device_group_keys = {'deviceGroupInfo': [{'deviceGroupId': device_group_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
disk_id = '0'
disk_keys = {'diskInfo': [{'diskId': disk_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
disk_group_id = '0'
disk_group_keys = {'diskGroupInfo': [{'diskGroupId': disk_group_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
disk_technology = 'EFD'
disk_tech_pool_keys = {'diskTechPoolInfo': [{'diskTechnology': disk_technology, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
eds_dir_id = 'ED-1B'
eds_dir_keys = {'edsDirectorInfo': [{'directorId': eds_dir_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
eds_emu_id = 'ED-1B:1:29'
eds_emu_keys = {'edsEmulationInfo': [{'edsEmulationId': eds_emu_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
ext_dir_id = 'ED-1G'
ext_dir_keys = {'externalDirectorInfo': [{'directorId': ext_dir_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
ext_disk_id = '5'
external_disk_id = {'externalDiskInfo': [{'diskId': ext_disk_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
ext_disk_group_id = '512'
ext_disk_group_keys = {'externalDiskGroupInfo': [{'diskGroupId': ext_disk_group_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
fe_dir_id = 'FA-1D'
se_dir_id = 'SE-4E'
fe_dir_keys = {'feDirectorInfo': [{'directorId': fe_dir_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
fe_emu_id = 'FA-4D:4:66'
fe_emu_keys = {'feEmulationInfo': [{'feEmulationId': fe_emu_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
fe_port_id = '4'
fe_port_keys = {'fePortInfo': [{'portId': fe_port_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
ficon_emu_id = 'EF-2E:2'
ficon_emu_keys = {'ficonEmulationInfo': [{'ficonEmulationId': ficon_emu_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
ficon_emu_thread_id = 'EF-2E:2:0'
ficon_emu_thread_keys = {'ficonEmulationThreadInfo': [{'ficonEmulationThreadId': ficon_emu_thread_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
ficon_port_thread_id = 'EF-2E:2:10'
ficon_port_thread_keys = {'ficonPortThreadInfo': [{'ficonPortThreadId': ficon_port_thread_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
host_id = 'test_host'
host_keys = {'hostInfo': [{'hostId': host_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
im_dir_id = 'IM-1A'
im_dir_keys = {'imDirectorInfo': [{'directorId': im_dir_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
im_emu_id = 'IM-2A:2:0'
im_emu_keys = {'iMEmulationInfo': [{'imEmulationId': im_emu_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
init_id = '10000090fa141c10'
init_keys = {'initiatorInfo': [{'initiatorId': init_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
init_by_port_id = 'FA-1D:5:100000109b1b8ede'
init_by_port_keys = {'initiatorByPortInfo': [{'initiatorByPortId': init_by_port_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
ip_interface_id = 'SE-3E:8:17:192.168.0.70'
ip_interface_keys = {'iSCSIClientInfo': [{'ipInterfaceId': ip_interface_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
iscsi_target_id = 'iqn.1992-04.com.emc:60000'
iscsi_target_keys = {'iSCSITargetInfo': [{'iSCSITargetId': iscsi_target_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
masking_view_id = 'test-mv'
masking_view_keys = {'maskingViewInfo': [{'maskingViewId': iscsi_target_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
port_group_id = 'test-pg'
port_group_keys = {'portGroupInfo': [{'portGroupId': port_group_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
rdfa_group_id = '11'
rdfa_keys = {'rdfaInfo': [{'raGroupId': rdfa_group_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
rdfs_group_id = '11'
rdfs_keys = {'rdfsInfo': [{'raGroupId': rdfs_group_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
rdf_dir_id = 'RF-1F'
rdf_dir_keys = {'rdfDirectorInfo': [{'directorId': rdf_dir_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
rdf_emu_id = 'RF-3F:3:68'
rdf_emu_keys = {'rdfEmulationInfo': [{'rdfEmulationId': rdf_emu_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
rdf_port_id = '7'
rdf_port_keys = {'rdfPortInfo': [{'portId': rdf_port_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
storage_container_id = 'test_container_1'
storage_container_keys = {'storageContainerInfo': [{'storageContainerId': storage_container_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
storage_group_id = 'test_sg'
storage_group_keys = {'storageGroupInfo': [{'storageGroupId': storage_group_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
storage_group_by_pool_id = 'test-pool'
storage_group_by_pool_keys = {'poolInfo': [{'poolId': 'test-pool', 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
srp_id = 'SRP_1'
srp_keys = {'srpInfo': [{'srpId': srp_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
storage_resource_id = 'storage_resource_1'
storage_resource_keys = {'storageResourceInfo': [{'storageResourceId': storage_resource_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
storage_resource_by_pool_id = 'DG1_F_7'
storage_resource_by_pool_keys = {'poolInfo': [{'poolId': storage_resource_by_pool_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
thin_pool_id = 'test_thin_pool'
thin_pool_keys = {'poolInfo': [{'poolId': thin_pool_id, 'firstAvailableDate': first_date, 'lastAvailableDate': last_date}]}
threshold_cat_resp = {'endpoint': ['Array']}
threshold_settings_resp = {'category': 'Array', 'num_of_metric_performance_thresholds': 2, 'success': 'False', 'performanceThreshold': [{'metric': 'ResponseTime', 'kpi': 'True', 'alertError': 'False', 'firstThreshold': 20, 'secondThreshold': 30}, {'metric': 'HostMBWritten', 'kpi': 'False', 'alertError': 'False', 'firstThreshold': 0, 'secondThreshold': 0}]}
days_to_full_resp = {'daysToFullObjectResultType': [{'ProjectionDaysToFull': 181.0, 'PercentUsedCapacity': 0.17, 'TotalPoolCapacityGB': 62590.0, 'instanceId': array}]}
rt_categories = {'categoryName': ['Array', 'BEDirector', 'BEPort', 'ExternalDirector', 'FEDirector', 'FEPort', 'RDFDirector', 'RDFPort', 'StorageGroups']}
rt_metrics = {'metricName': ['IOs', 'PercentBusy', 'ReadReqs', 'Reqs', 'WriteReqs']}
rt_times = {'arrayInfo': [{'symmetrixId': array, 'firstAvailableDate': 1599739566984, 'lastAvailableDate': 1599743600991}, {'symmetrixId': remote_array, 'firstAvailableDate': 1599739572983, 'lastAvailableDate': 1599743600984}]}
rt_keys = {'keys': [array, remote_array]}
rt_perf_metrics = {'expirationTime': 1599744006249, 'count': 13, 'maxPageSize': 1000, 'id': 'b6807ec4-3ef3-4b7c-818f-5eda2311910a_0', 'resultList': {'from': 1, 'to': 13, 'result': [{'FEReadReqs': 12.0, 'HostMBs': 0.30714843}, {'FEReadReqs': 12.333333, 'HostMBs': 0.30714843}, {'FEReadReqs': 14.0, 'HostMBs': 0.38320404}]}} |
FREQ = 10 # 1/delta_time based on recorded data
SCENE_DUR = 5 # in seconds
NUM_TS_PER_SCENE = FREQ * SCENE_DUR
RADIUS_AROUND_AGENT = 50. # range to get surrounding objects, in meters
ORDERED_COLUMNS = [
"timestamp",
"id",
"object_type",
"center_x",
"center_y",
"heading",
"status"
] # a little fixed code here but, based on recorded data, too...
MAX_WORKERS = 5
| freq = 10
scene_dur = 5
num_ts_per_scene = FREQ * SCENE_DUR
radius_around_agent = 50.0
ordered_columns = ['timestamp', 'id', 'object_type', 'center_x', 'center_y', 'heading', 'status']
max_workers = 5 |
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'includes': [
'../../get_vivaldi_version.gypi'
],
'variables': {
'mac_product_name': 'Vivaldi',
'mac_packaging_dir':
'<(PRODUCT_DIR)/<(mac_product_name) Packaging',
# <(PRODUCT_DIR) expands to $(BUILT_PRODUCTS_DIR), which doesn't
# work properly in a shell script, where ${BUILT_PRODUCTS_DIR} is
# needed.
'mac_packaging_sh_dir':
'${BUILT_PRODUCTS_DIR}/<(mac_product_name) Packaging',
'mac_signing_key': '<!(echo $VIVALDI_SIGNING_KEY)',
'mac_signing_id': '<!(echo $VIVALDI_SIGNING_ID)',
}, # variables
'targets': [
{
'target_name': 'sign_packaging',
'type': 'none',
'includes': ['sign_mac_build.gypi']
},
{
# Convenience target to build a disk image.
'target_name': 'build_app_dmg',
# Don't place this in the 'all' list; most won't want it.
# In GYP, booleans are 0/1, not True/False.
'suppress_wildcard': 1,
'type': 'none',
'includes': ['build_mac_dmg.gypi']
},
],
}
| {'includes': ['../../get_vivaldi_version.gypi'], 'variables': {'mac_product_name': 'Vivaldi', 'mac_packaging_dir': '<(PRODUCT_DIR)/<(mac_product_name) Packaging', 'mac_packaging_sh_dir': '${BUILT_PRODUCTS_DIR}/<(mac_product_name) Packaging', 'mac_signing_key': '<!(echo $VIVALDI_SIGNING_KEY)', 'mac_signing_id': '<!(echo $VIVALDI_SIGNING_ID)'}, 'targets': [{'target_name': 'sign_packaging', 'type': 'none', 'includes': ['sign_mac_build.gypi']}, {'target_name': 'build_app_dmg', 'suppress_wildcard': 1, 'type': 'none', 'includes': ['build_mac_dmg.gypi']}]} |
'''
2-CLAUSE BSD
Copyright (c) 2017, apple502j
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the FreeBSD Project.
X11/MIT License
Copyright 2017 apple502j
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
THE USE OR OTHER DEALINGS IN THE SOFTWARE.
CC BY 2.0 Generic, 3.0 Unported, 4.0 International, 2.1 Japan
https://creativecommons.org/licenses/by/2.0/
https://creativecommons.org/licenses/by/3.0/
https://creativecommons.org/licenses/by/4.0/
https://creativecommons.org/licenses/by/2.1/jp/
'''
def getFormula(x1,y1,x2,y2):
try:
constA = float(y2-y1) / float(x2-x1)
# y=ax+b ax+b=y b=y-ax
constB = y1 - (constA * x1)
return constA,constB
except ZeroDivisionError:
pass
def getHalf(x1,y1,x2,y2):
halfX = (x1+x2) / 2.0
halfY = (y1+y2) / 2.0
return halfX,halfY
def getAcross(a1,b1,a2,b2):
try:
pointX = float(b2-b1) / float(a1-a2)
pointY = a1*pointX + b1
return pointX,pointY
except ZeroDivisionError:
pass | """
2-CLAUSE BSD
Copyright (c) 2017, apple502j
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the FreeBSD Project.
X11/MIT License
Copyright 2017 apple502j
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
THE USE OR OTHER DEALINGS IN THE SOFTWARE.
CC BY 2.0 Generic, 3.0 Unported, 4.0 International, 2.1 Japan
https://creativecommons.org/licenses/by/2.0/
https://creativecommons.org/licenses/by/3.0/
https://creativecommons.org/licenses/by/4.0/
https://creativecommons.org/licenses/by/2.1/jp/
"""
def get_formula(x1, y1, x2, y2):
try:
const_a = float(y2 - y1) / float(x2 - x1)
const_b = y1 - constA * x1
return (constA, constB)
except ZeroDivisionError:
pass
def get_half(x1, y1, x2, y2):
half_x = (x1 + x2) / 2.0
half_y = (y1 + y2) / 2.0
return (halfX, halfY)
def get_across(a1, b1, a2, b2):
try:
point_x = float(b2 - b1) / float(a1 - a2)
point_y = a1 * pointX + b1
return (pointX, pointY)
except ZeroDivisionError:
pass |
#!/usr/bin/python
# -*- coding: utf-8 -*-
API_METHOD_PURCHASE='wallet.trade.buy'
API_METHOD_REDEEM='wallet.trade.sell'
API_METHOD_QUERY='wallet.trade.query'
API_METHOD_CANCEL='wallet.trade.cancel'
PAYMENT_STATUS_NOTSTARTED='Not Started'
PAYMENT_STATUS_PAYSUCCESS='PaySuccess'
PAYMENT_STATUS_SUCCESS='Success'
PAYMENT_STATUS_EXPIREDINVALID='ExpiredInvalid'
PAYMENT_STATUS_DEVCLOSE='DevClose'
PAYMENT_STATUS_USERABANDON='UserAbandon'
PAYMENT_STATUS_UNKONWN='UnKnow'
PAYMENT_STATUS_FAILURE='Failure'
PAYMENT_STATUS_STARTING='Starting'
TRADE_STATUS_NOTSTARTED='NotStarted'
TRADE_STATUS_PAYSUCCESS='PaidSuccess'
TRADE_STATUS_SUCCESS='Success'
TRADE_STATUS_EXPIREDINVALID='ExpiredInvalid'
TRADE_STATUS_DEVCLOSE='DevClose'
TRADE_STATUS_USERABANDON='UserAbandon'
TRADE_STATUS_UNKNOWN='UnKnown'
TRADE_STATUS_FAILURE='Failure'
TRADE_STATUS_INPROGRESS='InProgress'
ERR_USER_NOT_FOUND_BASED_ON_APPID='ERR_USER_NOT_FOUND_BASED_ON_APPID'
ERR_MORE_THAN_ONE_USER_BASED_ON_APPID = 'ERR_MORE_THAN_ONE_USER_BASED_ON_APPID'
ERR_UNEXPECTED_METHOD ='ERR_UNEXPECTED_METHOD'
ERR_INVALID_SIGNATURE = 'ERR_INVALID_SIGNATURE'
ERR_OVER_TRANS_LIMIT = 'ERR_OVER_TRANS_LIMIT'
ERR_NO_RIGHT_SELL_ORDER_FOUND = 'ERR_NO_RIGHT_SELL_ORDER_FOUND'
ERR_NO_PAYMENTMETHOD = "No payment method provided" | api_method_purchase = 'wallet.trade.buy'
api_method_redeem = 'wallet.trade.sell'
api_method_query = 'wallet.trade.query'
api_method_cancel = 'wallet.trade.cancel'
payment_status_notstarted = 'Not Started'
payment_status_paysuccess = 'PaySuccess'
payment_status_success = 'Success'
payment_status_expiredinvalid = 'ExpiredInvalid'
payment_status_devclose = 'DevClose'
payment_status_userabandon = 'UserAbandon'
payment_status_unkonwn = 'UnKnow'
payment_status_failure = 'Failure'
payment_status_starting = 'Starting'
trade_status_notstarted = 'NotStarted'
trade_status_paysuccess = 'PaidSuccess'
trade_status_success = 'Success'
trade_status_expiredinvalid = 'ExpiredInvalid'
trade_status_devclose = 'DevClose'
trade_status_userabandon = 'UserAbandon'
trade_status_unknown = 'UnKnown'
trade_status_failure = 'Failure'
trade_status_inprogress = 'InProgress'
err_user_not_found_based_on_appid = 'ERR_USER_NOT_FOUND_BASED_ON_APPID'
err_more_than_one_user_based_on_appid = 'ERR_MORE_THAN_ONE_USER_BASED_ON_APPID'
err_unexpected_method = 'ERR_UNEXPECTED_METHOD'
err_invalid_signature = 'ERR_INVALID_SIGNATURE'
err_over_trans_limit = 'ERR_OVER_TRANS_LIMIT'
err_no_right_sell_order_found = 'ERR_NO_RIGHT_SELL_ORDER_FOUND'
err_no_paymentmethod = 'No payment method provided' |
# Problem name : Plus One
# Problem link : https://leetcode.com/problems/plus-one/
# Contributor : Shreeraksha R Aithal
class Solution:
def plusOne(self, digits: List[int]) -> List[int]:
n = len(digits)
i = -1
carry = 1
while i>=-n:
digits[i] = digits[i] + carry
carry = digits[i]//10
digits[i] = digits[i]%10
i = i-1
if carry > 0:
digits = [carry] + digits
return digits | class Solution:
def plus_one(self, digits: List[int]) -> List[int]:
n = len(digits)
i = -1
carry = 1
while i >= -n:
digits[i] = digits[i] + carry
carry = digits[i] // 10
digits[i] = digits[i] % 10
i = i - 1
if carry > 0:
digits = [carry] + digits
return digits |
n = int(input())
a = list(map(int, input().split()))
dp = [1] * n
for i in range(1, len(a)):
for j in range(i - 1, -1, -1):
if a[j] == a[i]:
dp[i] = max(dp[i], dp[j])
if a[j] < a[i]:
dp[i] = max(dp[i], dp[j] + 1)
print(max(dp))
print(dp)
| n = int(input())
a = list(map(int, input().split()))
dp = [1] * n
for i in range(1, len(a)):
for j in range(i - 1, -1, -1):
if a[j] == a[i]:
dp[i] = max(dp[i], dp[j])
if a[j] < a[i]:
dp[i] = max(dp[i], dp[j] + 1)
print(max(dp))
print(dp) |
"""Make this it's own package so unit tests run properly without
having to mess with path variables, see:
__ http://stackoverflow.com/questions/1896918/running-unittest-with-typical-test-directory-structure
Note:
run ``python -m unittest discover``
"""
| """Make this it's own package so unit tests run properly without
having to mess with path variables, see:
__ http://stackoverflow.com/questions/1896918/running-unittest-with-typical-test-directory-structure
Note:
run ``python -m unittest discover``
""" |
# https://leetcode.com/problems/deepest-leaves-sum/
# Definition for a binary tree node.
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
def dl_sum_and_depth(root: TreeNode, depth: int) -> tuple[int, int]:
if not root.left and not root.right:
return root.val, depth
left_sum, left_depth = (
dl_sum_and_depth(root.left, depth + 1) if root.left else (0, depth))
right_sum, right_depth = (
dl_sum_and_depth(root.right, depth + 1) if root.right else (0, depth))
if left_depth < right_depth:
return right_sum, right_depth
elif left_depth > right_depth:
return left_sum, left_depth
else: # left_depth == right_depth
return left_sum + right_sum, left_depth
class Solution:
def deepestLeavesSum(self, root: TreeNode) -> int:
result, _ = dl_sum_and_depth(root, 0)
return result
| class Treenode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
def dl_sum_and_depth(root: TreeNode, depth: int) -> tuple[int, int]:
if not root.left and (not root.right):
return (root.val, depth)
(left_sum, left_depth) = dl_sum_and_depth(root.left, depth + 1) if root.left else (0, depth)
(right_sum, right_depth) = dl_sum_and_depth(root.right, depth + 1) if root.right else (0, depth)
if left_depth < right_depth:
return (right_sum, right_depth)
elif left_depth > right_depth:
return (left_sum, left_depth)
else:
return (left_sum + right_sum, left_depth)
class Solution:
def deepest_leaves_sum(self, root: TreeNode) -> int:
(result, _) = dl_sum_and_depth(root, 0)
return result |
n, p, s = map(int, input().split())
sets = list()
for _ in range(s):
sets.append(input().split()[1:])
for s in sets:
if str(p) in s:
print('KEEP')
else:
print('REMOVE')
| (n, p, s) = map(int, input().split())
sets = list()
for _ in range(s):
sets.append(input().split()[1:])
for s in sets:
if str(p) in s:
print('KEEP')
else:
print('REMOVE') |
def iter(n):
sum = 0
sum1 = 0
for i in range(0,n,1):
sum += 7*pow(10,i)
for j in range(1,n,1):
sum1 = (pow(10,j+1)-10-(9*j))/81
x = sum + sum1
return x | def iter(n):
sum = 0
sum1 = 0
for i in range(0, n, 1):
sum += 7 * pow(10, i)
for j in range(1, n, 1):
sum1 = (pow(10, j + 1) - 10 - 9 * j) / 81
x = sum + sum1
return x |
power = {'BUSES': {'Area': 1.33155,
'Bus/Area': 1.33155,
'Bus/Gate Leakage': 0.00662954,
'Bus/Peak Dynamic': 0.0,
'Bus/Runtime Dynamic': 0.0,
'Bus/Subthreshold Leakage': 0.0691322,
'Bus/Subthreshold Leakage with power gating': 0.0259246,
'Gate Leakage': 0.00662954,
'Peak Dynamic': 0.0,
'Runtime Dynamic': 0.0,
'Subthreshold Leakage': 0.0691322,
'Subthreshold Leakage with power gating': 0.0259246},
'Core': [{'Area': 32.6082,
'Execution Unit/Area': 8.2042,
'Execution Unit/Complex ALUs/Area': 0.235435,
'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646,
'Execution Unit/Complex ALUs/Peak Dynamic': 0.000107695,
'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202773,
'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111,
'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163,
'Execution Unit/Floating Point Units/Area': 4.6585,
'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156,
'Execution Unit/Floating Point Units/Peak Dynamic': 0.00070841,
'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033,
'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829,
'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061,
'Execution Unit/Gate Leakage': 0.122718,
'Execution Unit/Instruction Scheduler/Area': 2.17927,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.328073,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.00115349,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.20978,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.619807,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.017004,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00962066,
'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00730101,
'Execution Unit/Instruction Scheduler/Instruction Window/Area': 1.00996,
'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00529112,
'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 2.07911,
'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 1.07328,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0800117,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0455351,
'Execution Unit/Instruction Scheduler/Peak Dynamic': 4.84781,
'Execution Unit/Instruction Scheduler/ROB/Area': 0.841232,
'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.000856399,
'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.55892,
'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.615558,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.0178624,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00897339,
'Execution Unit/Instruction Scheduler/Runtime Dynamic': 2.30865,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.114878,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.0641291,
'Execution Unit/Integer ALUs/Area': 0.47087,
'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291,
'Execution Unit/Integer ALUs/Peak Dynamic': 0.612546,
'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344,
'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222,
'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833,
'Execution Unit/Peak Dynamic': 6.09997,
'Execution Unit/Register Files/Area': 0.570804,
'Execution Unit/Register Files/Floating Point RF/Area': 0.208131,
'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788,
'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.000133834,
'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0224685,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968,
'Execution Unit/Register Files/Gate Leakage': 0.000622708,
'Execution Unit/Register Files/Integer RF/Area': 0.362673,
'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992,
'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.162511,
'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.166168,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675,
'Execution Unit/Register Files/Peak Dynamic': 0.162645,
'Execution Unit/Register Files/Runtime Dynamic': 0.188637,
'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387,
'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643,
'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0442632,
'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00607074,
'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.392723,
'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 1.20326,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.0920413,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0345155,
'Execution Unit/Runtime Dynamic': 4.3087,
'Execution Unit/Subthreshold Leakage': 1.83518,
'Execution Unit/Subthreshold Leakage with power gating': 0.709678,
'Gate Leakage': 0.372997,
'Instruction Fetch Unit/Area': 5.86007,
'Instruction Fetch Unit/Branch Predictor/Area': 0.138516,
'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00285011,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00285011,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.00247776,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000956619,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045,
'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838,
'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732,
'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05,
'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602,
'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.00238702,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733,
'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.010565,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282,
'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954,
'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758,
'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867,
'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0274939,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357,
'Instruction Fetch Unit/Gate Leakage': 0.0590479,
'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323,
'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05,
'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827,
'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.159742,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682,
'Instruction Fetch Unit/Instruction Cache/Area': 3.14635,
'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931,
'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 6.43323,
'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.472511,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386,
'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799,
'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493,
'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404,
'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.542555,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104,
'Instruction Fetch Unit/Peak Dynamic': 8.96874,
'Instruction Fetch Unit/Runtime Dynamic': 1.21287,
'Instruction Fetch Unit/Subthreshold Leakage': 0.932587,
'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.408542,
'L2/Area': 4.53318,
'L2/Gate Leakage': 0.015464,
'L2/Peak Dynamic': 0.0313857,
'L2/Runtime Dynamic': 0.00792346,
'L2/Subthreshold Leakage': 0.834142,
'L2/Subthreshold Leakage with power gating': 0.401066,
'Load Store Unit/Area': 8.80969,
'Load Store Unit/Data Cache/Area': 6.84535,
'Load Store Unit/Data Cache/Gate Leakage': 0.0279261,
'Load Store Unit/Data Cache/Peak Dynamic': 6.8313,
'Load Store Unit/Data Cache/Runtime Dynamic': 2.69691,
'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675,
'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085,
'Load Store Unit/Gate Leakage': 0.0351387,
'Load Store Unit/LoadQ/Area': 0.0836782,
'Load Store Unit/LoadQ/Gate Leakage': 0.00059896,
'Load Store Unit/LoadQ/Peak Dynamic': 0.180985,
'Load Store Unit/LoadQ/Runtime Dynamic': 0.180985,
'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961,
'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918,
'Load Store Unit/Peak Dynamic': 7.68942,
'Load Store Unit/Runtime Dynamic': 3.77045,
'Load Store Unit/StoreQ/Area': 0.322079,
'Load Store Unit/StoreQ/Gate Leakage': 0.00329971,
'Load Store Unit/StoreQ/Peak Dynamic': 0.446278,
'Load Store Unit/StoreQ/Runtime Dynamic': 0.892556,
'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621,
'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004,
'Load Store Unit/Subthreshold Leakage': 0.591622,
'Load Store Unit/Subthreshold Leakage with power gating': 0.283406,
'Memory Management Unit/Area': 0.434579,
'Memory Management Unit/Dtlb/Area': 0.0879726,
'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729,
'Memory Management Unit/Dtlb/Peak Dynamic': 0.158385,
'Memory Management Unit/Dtlb/Runtime Dynamic': 0.158803,
'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699,
'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485,
'Memory Management Unit/Gate Leakage': 0.00813591,
'Memory Management Unit/Itlb/Area': 0.301552,
'Memory Management Unit/Itlb/Gate Leakage': 0.00393464,
'Memory Management Unit/Itlb/Peak Dynamic': 0.399995,
'Memory Management Unit/Itlb/Runtime Dynamic': 0.0776214,
'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758,
'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842,
'Memory Management Unit/Peak Dynamic': 0.832312,
'Memory Management Unit/Runtime Dynamic': 0.236424,
'Memory Management Unit/Subthreshold Leakage': 0.0769113,
'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462,
'Peak Dynamic': 28.1835,
'Renaming Unit/Area': 0.369768,
'Renaming Unit/FP Front End RAT/Area': 0.168486,
'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00489731,
'Renaming Unit/FP Front End RAT/Peak Dynamic': 3.33511,
'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.000467569,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0437281,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.024925,
'Renaming Unit/Free List/Area': 0.0414755,
'Renaming Unit/Free List/Gate Leakage': 4.15911e-05,
'Renaming Unit/Free List/Peak Dynamic': 0.0401324,
'Renaming Unit/Free List/Runtime Dynamic': 0.0316991,
'Renaming Unit/Free List/Subthreshold Leakage': 0.000670426,
'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000377987,
'Renaming Unit/Gate Leakage': 0.00863632,
'Renaming Unit/Int Front End RAT/Area': 0.114751,
'Renaming Unit/Int Front End RAT/Gate Leakage': 0.00038343,
'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.86945,
'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.333958,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00611897,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781,
'Renaming Unit/Peak Dynamic': 4.56169,
'Renaming Unit/Runtime Dynamic': 0.366125,
'Renaming Unit/Subthreshold Leakage': 0.070483,
'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779,
'Runtime Dynamic': 9.90249,
'Subthreshold Leakage': 6.21877,
'Subthreshold Leakage with power gating': 2.58311},
{'Area': 32.0201,
'Execution Unit/Area': 7.68434,
'Execution Unit/Complex ALUs/Area': 0.235435,
'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646,
'Execution Unit/Complex ALUs/Peak Dynamic': 1.41703e-05,
'Execution Unit/Complex ALUs/Runtime Dynamic': 0.2027,
'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111,
'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163,
'Execution Unit/Floating Point Units/Area': 4.6585,
'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156,
'Execution Unit/Floating Point Units/Peak Dynamic': 8.09612e-05,
'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033,
'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829,
'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061,
'Execution Unit/Gate Leakage': 0.120359,
'Execution Unit/Instruction Scheduler/Area': 1.66526,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.406489,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519,
'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913,
'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223,
'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562,
'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763,
'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.655651,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964,
'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262,
'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388,
'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608,
'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451,
'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.330951,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446,
'Execution Unit/Instruction Scheduler/Runtime Dynamic': 1.39309,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346,
'Execution Unit/Integer ALUs/Area': 0.47087,
'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291,
'Execution Unit/Integer ALUs/Peak Dynamic': 0.464892,
'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344,
'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222,
'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833,
'Execution Unit/Peak Dynamic': 4.73305,
'Execution Unit/Register Files/Area': 0.570804,
'Execution Unit/Register Files/Floating Point RF/Area': 0.208131,
'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788,
'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 1.52953e-05,
'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.01705,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968,
'Execution Unit/Register Files/Gate Leakage': 0.000622708,
'Execution Unit/Register Files/Integer RF/Area': 0.362673,
'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992,
'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.123298,
'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.126095,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675,
'Execution Unit/Register Files/Peak Dynamic': 0.123313,
'Execution Unit/Register Files/Runtime Dynamic': 0.143145,
'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387,
'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643,
'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912,
'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402,
'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.259757,
'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.839221,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543,
'Execution Unit/Runtime Dynamic': 2.98353,
'Execution Unit/Subthreshold Leakage': 1.79543,
'Execution Unit/Subthreshold Leakage with power gating': 0.688821,
'Gate Leakage': 0.368936,
'Instruction Fetch Unit/Area': 5.85939,
'Instruction Fetch Unit/Branch Predictor/Area': 0.138516,
'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00160622,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00160622,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.00141491,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000556425,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045,
'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838,
'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732,
'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05,
'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602,
'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.00181136,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733,
'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00643871,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282,
'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954,
'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758,
'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867,
'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0148325,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357,
'Instruction Fetch Unit/Gate Leakage': 0.0589979,
'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323,
'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05,
'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827,
'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.121218,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682,
'Instruction Fetch Unit/Instruction Cache/Area': 3.14635,
'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931,
'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 6.43323,
'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.302917,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386,
'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799,
'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493,
'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404,
'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.411712,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104,
'Instruction Fetch Unit/Peak Dynamic': 8.96396,
'Instruction Fetch Unit/Runtime Dynamic': 0.857118,
'Instruction Fetch Unit/Subthreshold Leakage': 0.932286,
'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843,
'L2/Area': 4.53318,
'L2/Gate Leakage': 0.015464,
'L2/Peak Dynamic': 0.0205201,
'L2/Runtime Dynamic': 0.00867599,
'L2/Subthreshold Leakage': 0.834142,
'L2/Subthreshold Leakage with power gating': 0.401066,
'Load Store Unit/Area': 8.80901,
'Load Store Unit/Data Cache/Area': 6.84535,
'Load Store Unit/Data Cache/Gate Leakage': 0.0279261,
'Load Store Unit/Data Cache/Peak Dynamic': 5.95894,
'Load Store Unit/Data Cache/Runtime Dynamic': 2.27982,
'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675,
'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085,
'Load Store Unit/Gate Leakage': 0.0350888,
'Load Store Unit/LoadQ/Area': 0.0836782,
'Load Store Unit/LoadQ/Gate Leakage': 0.00059896,
'Load Store Unit/LoadQ/Peak Dynamic': 0.152762,
'Load Store Unit/LoadQ/Runtime Dynamic': 0.152762,
'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961,
'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918,
'Load Store Unit/Peak Dynamic': 6.68032,
'Load Store Unit/Runtime Dynamic': 3.18595,
'Load Store Unit/StoreQ/Area': 0.322079,
'Load Store Unit/StoreQ/Gate Leakage': 0.00329971,
'Load Store Unit/StoreQ/Peak Dynamic': 0.376685,
'Load Store Unit/StoreQ/Runtime Dynamic': 0.75337,
'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621,
'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004,
'Load Store Unit/Subthreshold Leakage': 0.591321,
'Load Store Unit/Subthreshold Leakage with power gating': 0.283293,
'Memory Management Unit/Area': 0.4339,
'Memory Management Unit/Dtlb/Area': 0.0879726,
'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729,
'Memory Management Unit/Dtlb/Peak Dynamic': 0.133687,
'Memory Management Unit/Dtlb/Runtime Dynamic': 0.13398,
'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699,
'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485,
'Memory Management Unit/Gate Leakage': 0.00808595,
'Memory Management Unit/Itlb/Area': 0.301552,
'Memory Management Unit/Itlb/Gate Leakage': 0.00393464,
'Memory Management Unit/Itlb/Peak Dynamic': 0.399995,
'Memory Management Unit/Itlb/Runtime Dynamic': 0.049702,
'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758,
'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842,
'Memory Management Unit/Peak Dynamic': 0.785754,
'Memory Management Unit/Runtime Dynamic': 0.183682,
'Memory Management Unit/Subthreshold Leakage': 0.0766103,
'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333,
'Peak Dynamic': 24.7731,
'Renaming Unit/Area': 0.303608,
'Renaming Unit/FP Front End RAT/Area': 0.131045,
'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123,
'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468,
'Renaming Unit/FP Front End RAT/Runtime Dynamic': 3.97702e-05,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885,
'Renaming Unit/Free List/Area': 0.0340654,
'Renaming Unit/Free List/Gate Leakage': 2.5481e-05,
'Renaming Unit/Free List/Peak Dynamic': 0.0306032,
'Renaming Unit/Free List/Runtime Dynamic': 0.0183401,
'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144,
'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064,
'Renaming Unit/Gate Leakage': 0.00708398,
'Renaming Unit/Int Front End RAT/Area': 0.0941223,
'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242,
'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965,
'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.215443,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228,
'Renaming Unit/Peak Dynamic': 3.58947,
'Renaming Unit/Runtime Dynamic': 0.233823,
'Renaming Unit/Subthreshold Leakage': 0.0552466,
'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461,
'Runtime Dynamic': 7.45279,
'Subthreshold Leakage': 6.16288,
'Subthreshold Leakage with power gating': 2.55328},
{'Area': 32.0201,
'Execution Unit/Area': 7.68434,
'Execution Unit/Complex ALUs/Area': 0.235435,
'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646,
'Execution Unit/Complex ALUs/Peak Dynamic': 3.30641e-05,
'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202715,
'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111,
'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163,
'Execution Unit/Floating Point Units/Area': 4.6585,
'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156,
'Execution Unit/Floating Point Units/Peak Dynamic': 0.000212523,
'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033,
'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829,
'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061,
'Execution Unit/Gate Leakage': 0.120359,
'Execution Unit/Instruction Scheduler/Area': 1.66526,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.372101,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519,
'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913,
'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223,
'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562,
'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763,
'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.600184,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964,
'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262,
'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388,
'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608,
'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451,
'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.302953,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446,
'Execution Unit/Instruction Scheduler/Runtime Dynamic': 1.27524,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346,
'Execution Unit/Integer ALUs/Area': 0.47087,
'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291,
'Execution Unit/Integer ALUs/Peak Dynamic': 0.425544,
'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344,
'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222,
'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833,
'Execution Unit/Peak Dynamic': 4.65621,
'Execution Unit/Register Files/Area': 0.570804,
'Execution Unit/Register Files/Floating Point RF/Area': 0.208131,
'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788,
'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 4.01502e-05,
'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0156076,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968,
'Execution Unit/Register Files/Gate Leakage': 0.000622708,
'Execution Unit/Register Files/Integer RF/Area': 0.362673,
'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992,
'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.112874,
'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.115428,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675,
'Execution Unit/Register Files/Peak Dynamic': 0.112914,
'Execution Unit/Register Files/Runtime Dynamic': 0.131035,
'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387,
'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643,
'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912,
'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402,
'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.237802,
'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.756814,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543,
'Execution Unit/Runtime Dynamic': 2.77118,
'Execution Unit/Subthreshold Leakage': 1.79543,
'Execution Unit/Subthreshold Leakage with power gating': 0.688821,
'Gate Leakage': 0.368936,
'Instruction Fetch Unit/Area': 5.85939,
'Instruction Fetch Unit/Branch Predictor/Area': 0.138516,
'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00164868,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00164868,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.00145609,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000574661,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045,
'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838,
'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732,
'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05,
'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602,
'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.00165813,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733,
'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00641157,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282,
'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954,
'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758,
'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867,
'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0150898,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357,
'Instruction Fetch Unit/Gate Leakage': 0.0589979,
'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323,
'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05,
'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827,
'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.110963,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682,
'Instruction Fetch Unit/Instruction Cache/Area': 3.14635,
'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931,
'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 6.43323,
'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.291947,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386,
'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799,
'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493,
'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404,
'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.376882,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104,
'Instruction Fetch Unit/Peak Dynamic': 8.96396,
'Instruction Fetch Unit/Runtime Dynamic': 0.801293,
'Instruction Fetch Unit/Subthreshold Leakage': 0.932286,
'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843,
'L2/Area': 4.53318,
'L2/Gate Leakage': 0.015464,
'L2/Peak Dynamic': 0.0194717,
'L2/Runtime Dynamic': 0.00707992,
'L2/Subthreshold Leakage': 0.834142,
'L2/Subthreshold Leakage with power gating': 0.401066,
'Load Store Unit/Area': 8.80901,
'Load Store Unit/Data Cache/Area': 6.84535,
'Load Store Unit/Data Cache/Gate Leakage': 0.0279261,
'Load Store Unit/Data Cache/Peak Dynamic': 5.42811,
'Load Store Unit/Data Cache/Runtime Dynamic': 2.02257,
'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675,
'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085,
'Load Store Unit/Gate Leakage': 0.0350888,
'Load Store Unit/LoadQ/Area': 0.0836782,
'Load Store Unit/LoadQ/Gate Leakage': 0.00059896,
'Load Store Unit/LoadQ/Peak Dynamic': 0.135588,
'Load Store Unit/LoadQ/Runtime Dynamic': 0.135588,
'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961,
'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918,
'Load Store Unit/Peak Dynamic': 6.06839,
'Load Store Unit/Runtime Dynamic': 2.82684,
'Load Store Unit/StoreQ/Area': 0.322079,
'Load Store Unit/StoreQ/Gate Leakage': 0.00329971,
'Load Store Unit/StoreQ/Peak Dynamic': 0.334338,
'Load Store Unit/StoreQ/Runtime Dynamic': 0.668676,
'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621,
'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004,
'Load Store Unit/Subthreshold Leakage': 0.591321,
'Load Store Unit/Subthreshold Leakage with power gating': 0.283293,
'Memory Management Unit/Area': 0.4339,
'Memory Management Unit/Dtlb/Area': 0.0879726,
'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729,
'Memory Management Unit/Dtlb/Peak Dynamic': 0.118658,
'Memory Management Unit/Dtlb/Runtime Dynamic': 0.118928,
'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699,
'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485,
'Memory Management Unit/Gate Leakage': 0.00808595,
'Memory Management Unit/Itlb/Area': 0.301552,
'Memory Management Unit/Itlb/Gate Leakage': 0.00393464,
'Memory Management Unit/Itlb/Peak Dynamic': 0.399995,
'Memory Management Unit/Itlb/Runtime Dynamic': 0.0479251,
'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758,
'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842,
'Memory Management Unit/Peak Dynamic': 0.759937,
'Memory Management Unit/Runtime Dynamic': 0.166853,
'Memory Management Unit/Subthreshold Leakage': 0.0766103,
'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333,
'Peak Dynamic': 24.0574,
'Renaming Unit/Area': 0.303608,
'Renaming Unit/FP Front End RAT/Area': 0.131045,
'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123,
'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468,
'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.000105581,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885,
'Renaming Unit/Free List/Area': 0.0340654,
'Renaming Unit/Free List/Gate Leakage': 2.5481e-05,
'Renaming Unit/Free List/Peak Dynamic': 0.0306032,
'Renaming Unit/Free List/Runtime Dynamic': 0.0167894,
'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144,
'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064,
'Renaming Unit/Gate Leakage': 0.00708398,
'Renaming Unit/Int Front End RAT/Area': 0.0941223,
'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242,
'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965,
'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.196819,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228,
'Renaming Unit/Peak Dynamic': 3.58947,
'Renaming Unit/Runtime Dynamic': 0.213714,
'Renaming Unit/Subthreshold Leakage': 0.0552466,
'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461,
'Runtime Dynamic': 6.78696,
'Subthreshold Leakage': 6.16288,
'Subthreshold Leakage with power gating': 2.55328},
{'Area': 32.0201,
'Execution Unit/Area': 7.68434,
'Execution Unit/Complex ALUs/Area': 0.235435,
'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646,
'Execution Unit/Complex ALUs/Peak Dynamic': 5.95155e-05,
'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202736,
'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111,
'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163,
'Execution Unit/Floating Point Units/Area': 4.6585,
'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156,
'Execution Unit/Floating Point Units/Peak Dynamic': 0.000407336,
'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033,
'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829,
'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061,
'Execution Unit/Gate Leakage': 0.120359,
'Execution Unit/Instruction Scheduler/Area': 1.66526,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.339854,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519,
'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913,
'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223,
'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562,
'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763,
'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.548172,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964,
'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262,
'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388,
'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608,
'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451,
'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.276699,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446,
'Execution Unit/Instruction Scheduler/Runtime Dynamic': 1.16472,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346,
'Execution Unit/Integer ALUs/Area': 0.47087,
'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291,
'Execution Unit/Integer ALUs/Peak Dynamic': 0.388632,
'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344,
'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222,
'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833,
'Execution Unit/Peak Dynamic': 4.58425,
'Execution Unit/Register Files/Area': 0.570804,
'Execution Unit/Register Files/Floating Point RF/Area': 0.208131,
'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788,
'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 7.69545e-05,
'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.014255,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968,
'Execution Unit/Register Files/Gate Leakage': 0.000622708,
'Execution Unit/Register Files/Integer RF/Area': 0.362673,
'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992,
'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.1031,
'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.105424,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675,
'Execution Unit/Register Files/Peak Dynamic': 0.103177,
'Execution Unit/Register Files/Runtime Dynamic': 0.119679,
'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387,
'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643,
'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912,
'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402,
'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.217219,
'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.676539,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543,
'Execution Unit/Runtime Dynamic': 2.56906,
'Execution Unit/Subthreshold Leakage': 1.79543,
'Execution Unit/Subthreshold Leakage with power gating': 0.688821,
'Gate Leakage': 0.368936,
'Instruction Fetch Unit/Area': 5.85939,
'Instruction Fetch Unit/Branch Predictor/Area': 0.138516,
'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00172945,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00172945,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.00153113,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000606278,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045,
'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838,
'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732,
'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05,
'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602,
'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.00151443,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733,
'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00650446,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282,
'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954,
'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758,
'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867,
'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0156965,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357,
'Instruction Fetch Unit/Gate Leakage': 0.0589979,
'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323,
'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05,
'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827,
'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.101347,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682,
'Instruction Fetch Unit/Instruction Cache/Area': 3.14635,
'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931,
'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 6.43323,
'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.281529,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386,
'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799,
'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493,
'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404,
'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.344221,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104,
'Instruction Fetch Unit/Peak Dynamic': 8.96396,
'Instruction Fetch Unit/Runtime Dynamic': 0.749298,
'Instruction Fetch Unit/Subthreshold Leakage': 0.932286,
'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843,
'L2/Area': 4.53318,
'L2/Gate Leakage': 0.015464,
'L2/Peak Dynamic': 0.0183368,
'L2/Runtime Dynamic': 0.00554616,
'L2/Subthreshold Leakage': 0.834142,
'L2/Subthreshold Leakage with power gating': 0.401066,
'Load Store Unit/Area': 8.80901,
'Load Store Unit/Data Cache/Area': 6.84535,
'Load Store Unit/Data Cache/Gate Leakage': 0.0279261,
'Load Store Unit/Data Cache/Peak Dynamic': 4.90577,
'Load Store Unit/Data Cache/Runtime Dynamic': 1.76943,
'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675,
'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085,
'Load Store Unit/Gate Leakage': 0.0350888,
'Load Store Unit/LoadQ/Area': 0.0836782,
'Load Store Unit/LoadQ/Gate Leakage': 0.00059896,
'Load Store Unit/LoadQ/Peak Dynamic': 0.11869,
'Load Store Unit/LoadQ/Runtime Dynamic': 0.11869,
'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961,
'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918,
'Load Store Unit/Peak Dynamic': 5.46625,
'Load Store Unit/Runtime Dynamic': 2.47345,
'Load Store Unit/StoreQ/Area': 0.322079,
'Load Store Unit/StoreQ/Gate Leakage': 0.00329971,
'Load Store Unit/StoreQ/Peak Dynamic': 0.292668,
'Load Store Unit/StoreQ/Runtime Dynamic': 0.585336,
'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621,
'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004,
'Load Store Unit/Subthreshold Leakage': 0.591321,
'Load Store Unit/Subthreshold Leakage with power gating': 0.283293,
'Memory Management Unit/Area': 0.4339,
'Memory Management Unit/Dtlb/Area': 0.0879726,
'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729,
'Memory Management Unit/Dtlb/Peak Dynamic': 0.103869,
'Memory Management Unit/Dtlb/Runtime Dynamic': 0.104113,
'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699,
'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485,
'Memory Management Unit/Gate Leakage': 0.00808595,
'Memory Management Unit/Itlb/Area': 0.301552,
'Memory Management Unit/Itlb/Gate Leakage': 0.00393464,
'Memory Management Unit/Itlb/Peak Dynamic': 0.399995,
'Memory Management Unit/Itlb/Runtime Dynamic': 0.0462454,
'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758,
'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842,
'Memory Management Unit/Peak Dynamic': 0.734532,
'Memory Management Unit/Runtime Dynamic': 0.150358,
'Memory Management Unit/Subthreshold Leakage': 0.0766103,
'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333,
'Peak Dynamic': 23.3568,
'Renaming Unit/Area': 0.303608,
'Renaming Unit/FP Front End RAT/Area': 0.131045,
'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123,
'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468,
'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.000202958,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885,
'Renaming Unit/Free List/Area': 0.0340654,
'Renaming Unit/Free List/Gate Leakage': 2.5481e-05,
'Renaming Unit/Free List/Peak Dynamic': 0.0306032,
'Renaming Unit/Free List/Runtime Dynamic': 0.0153357,
'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144,
'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064,
'Renaming Unit/Gate Leakage': 0.00708398,
'Renaming Unit/Int Front End RAT/Area': 0.0941223,
'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242,
'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965,
'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.179258,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228,
'Renaming Unit/Peak Dynamic': 3.58947,
'Renaming Unit/Runtime Dynamic': 0.194797,
'Renaming Unit/Subthreshold Leakage': 0.0552466,
'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461,
'Runtime Dynamic': 6.14251,
'Subthreshold Leakage': 6.16288,
'Subthreshold Leakage with power gating': 2.55328}],
'DRAM': {'Area': 0,
'Gate Leakage': 0,
'Peak Dynamic': 1.549791922570631,
'Runtime Dynamic': 1.549791922570631,
'Subthreshold Leakage': 4.252,
'Subthreshold Leakage with power gating': 4.252},
'L3': [{'Area': 61.9075,
'Gate Leakage': 0.0484137,
'Peak Dynamic': 0.120956,
'Runtime Dynamic': 0.0743872,
'Subthreshold Leakage': 6.80085,
'Subthreshold Leakage with power gating': 3.32364}],
'Processor': {'Area': 191.908,
'Gate Leakage': 1.53485,
'Peak Dynamic': 100.492,
'Peak Power': 133.604,
'Runtime Dynamic': 30.3591,
'Subthreshold Leakage': 31.5774,
'Subthreshold Leakage with power gating': 13.9484,
'Total Cores/Area': 128.669,
'Total Cores/Gate Leakage': 1.4798,
'Total Cores/Peak Dynamic': 100.371,
'Total Cores/Runtime Dynamic': 30.2847,
'Total Cores/Subthreshold Leakage': 24.7074,
'Total Cores/Subthreshold Leakage with power gating': 10.2429,
'Total L3s/Area': 61.9075,
'Total L3s/Gate Leakage': 0.0484137,
'Total L3s/Peak Dynamic': 0.120956,
'Total L3s/Runtime Dynamic': 0.0743872,
'Total L3s/Subthreshold Leakage': 6.80085,
'Total L3s/Subthreshold Leakage with power gating': 3.32364,
'Total Leakage': 33.1122,
'Total NoCs/Area': 1.33155,
'Total NoCs/Gate Leakage': 0.00662954,
'Total NoCs/Peak Dynamic': 0.0,
'Total NoCs/Runtime Dynamic': 0.0,
'Total NoCs/Subthreshold Leakage': 0.0691322,
'Total NoCs/Subthreshold Leakage with power gating': 0.0259246}} | power = {'BUSES': {'Area': 1.33155, 'Bus/Area': 1.33155, 'Bus/Gate Leakage': 0.00662954, 'Bus/Peak Dynamic': 0.0, 'Bus/Runtime Dynamic': 0.0, 'Bus/Subthreshold Leakage': 0.0691322, 'Bus/Subthreshold Leakage with power gating': 0.0259246, 'Gate Leakage': 0.00662954, 'Peak Dynamic': 0.0, 'Runtime Dynamic': 0.0, 'Subthreshold Leakage': 0.0691322, 'Subthreshold Leakage with power gating': 0.0259246}, 'Core': [{'Area': 32.6082, 'Execution Unit/Area': 8.2042, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.000107695, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202773, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.00070841, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.122718, 'Execution Unit/Instruction Scheduler/Area': 2.17927, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.328073, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.00115349, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.20978, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.619807, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.017004, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00962066, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00730101, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 1.00996, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00529112, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 2.07911, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 1.07328, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0800117, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0455351, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 4.84781, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.841232, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.000856399, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.55892, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.615558, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.0178624, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00897339, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 2.30865, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.114878, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.0641291, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.612546, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 6.09997, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.000133834, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0224685, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.162511, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.166168, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.162645, 'Execution Unit/Register Files/Runtime Dynamic': 0.188637, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0442632, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00607074, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.392723, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 1.20326, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.0920413, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0345155, 'Execution Unit/Runtime Dynamic': 4.3087, 'Execution Unit/Subthreshold Leakage': 1.83518, 'Execution Unit/Subthreshold Leakage with power gating': 0.709678, 'Gate Leakage': 0.372997, 'Instruction Fetch Unit/Area': 5.86007, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00285011, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00285011, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.00247776, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000956619, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.00238702, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.010565, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0274939, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0590479, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.159742, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 6.43323, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.472511, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.542555, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 8.96874, 'Instruction Fetch Unit/Runtime Dynamic': 1.21287, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932587, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.408542, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.0313857, 'L2/Runtime Dynamic': 0.00792346, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80969, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 6.8313, 'Load Store Unit/Data Cache/Runtime Dynamic': 2.69691, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0351387, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.180985, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.180985, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 7.68942, 'Load Store Unit/Runtime Dynamic': 3.77045, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.446278, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.892556, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591622, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283406, 'Memory Management Unit/Area': 0.434579, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.158385, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.158803, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00813591, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.399995, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0776214, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.832312, 'Memory Management Unit/Runtime Dynamic': 0.236424, 'Memory Management Unit/Subthreshold Leakage': 0.0769113, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462, 'Peak Dynamic': 28.1835, 'Renaming Unit/Area': 0.369768, 'Renaming Unit/FP Front End RAT/Area': 0.168486, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00489731, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 3.33511, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.000467569, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0437281, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.024925, 'Renaming Unit/Free List/Area': 0.0414755, 'Renaming Unit/Free List/Gate Leakage': 4.15911e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0401324, 'Renaming Unit/Free List/Runtime Dynamic': 0.0316991, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000670426, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000377987, 'Renaming Unit/Gate Leakage': 0.00863632, 'Renaming Unit/Int Front End RAT/Area': 0.114751, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.00038343, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.86945, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.333958, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00611897, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781, 'Renaming Unit/Peak Dynamic': 4.56169, 'Renaming Unit/Runtime Dynamic': 0.366125, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime Dynamic': 9.90249, 'Subthreshold Leakage': 6.21877, 'Subthreshold Leakage with power gating': 2.58311}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 1.41703e-05, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.2027, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 8.09612e-05, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.406489, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.655651, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.330951, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 1.39309, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.464892, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 4.73305, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 1.52953e-05, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.01705, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.123298, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.126095, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.123313, 'Execution Unit/Register Files/Runtime Dynamic': 0.143145, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.259757, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.839221, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543, 'Execution Unit/Runtime Dynamic': 2.98353, 'Execution Unit/Subthreshold Leakage': 1.79543, 'Execution Unit/Subthreshold Leakage with power gating': 0.688821, 'Gate Leakage': 0.368936, 'Instruction Fetch Unit/Area': 5.85939, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00160622, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00160622, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.00141491, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000556425, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.00181136, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00643871, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0148325, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0589979, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.121218, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 6.43323, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.302917, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.411712, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 8.96396, 'Instruction Fetch Unit/Runtime Dynamic': 0.857118, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932286, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.0205201, 'L2/Runtime Dynamic': 0.00867599, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 5.95894, 'Load Store Unit/Data Cache/Runtime Dynamic': 2.27982, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0350888, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.152762, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.152762, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 6.68032, 'Load Store Unit/Runtime Dynamic': 3.18595, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.376685, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.75337, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591321, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283293, 'Memory Management Unit/Area': 0.4339, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.133687, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.13398, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00808595, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.399995, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.049702, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.785754, 'Memory Management Unit/Runtime Dynamic': 0.183682, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 24.7731, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 3.97702e-05, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.0183401, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064, 'Renaming Unit/Gate Leakage': 0.00708398, 'Renaming Unit/Int Front End RAT/Area': 0.0941223, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.215443, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.233823, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 7.45279, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 3.30641e-05, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202715, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.000212523, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.372101, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.600184, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.302953, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 1.27524, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.425544, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 4.65621, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 4.01502e-05, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0156076, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.112874, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.115428, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.112914, 'Execution Unit/Register Files/Runtime Dynamic': 0.131035, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.237802, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.756814, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543, 'Execution Unit/Runtime Dynamic': 2.77118, 'Execution Unit/Subthreshold Leakage': 1.79543, 'Execution Unit/Subthreshold Leakage with power gating': 0.688821, 'Gate Leakage': 0.368936, 'Instruction Fetch Unit/Area': 5.85939, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00164868, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00164868, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.00145609, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000574661, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.00165813, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00641157, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0150898, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0589979, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.110963, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 6.43323, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.291947, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.376882, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 8.96396, 'Instruction Fetch Unit/Runtime Dynamic': 0.801293, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932286, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.0194717, 'L2/Runtime Dynamic': 0.00707992, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 5.42811, 'Load Store Unit/Data Cache/Runtime Dynamic': 2.02257, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0350888, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.135588, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.135588, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 6.06839, 'Load Store Unit/Runtime Dynamic': 2.82684, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.334338, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.668676, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591321, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283293, 'Memory Management Unit/Area': 0.4339, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.118658, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.118928, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00808595, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.399995, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0479251, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.759937, 'Memory Management Unit/Runtime Dynamic': 0.166853, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 24.0574, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.000105581, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.0167894, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064, 'Renaming Unit/Gate Leakage': 0.00708398, 'Renaming Unit/Int Front End RAT/Area': 0.0941223, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.196819, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.213714, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 6.78696, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 5.95155e-05, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202736, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.000407336, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.339854, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.548172, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.276699, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 1.16472, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.388632, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 4.58425, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 7.69545e-05, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.014255, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.1031, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.105424, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.103177, 'Execution Unit/Register Files/Runtime Dynamic': 0.119679, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.217219, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.676539, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543, 'Execution Unit/Runtime Dynamic': 2.56906, 'Execution Unit/Subthreshold Leakage': 1.79543, 'Execution Unit/Subthreshold Leakage with power gating': 0.688821, 'Gate Leakage': 0.368936, 'Instruction Fetch Unit/Area': 5.85939, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00172945, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00172945, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.00153113, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000606278, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.00151443, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00650446, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0156965, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0589979, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.101347, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 6.43323, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.281529, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.344221, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 8.96396, 'Instruction Fetch Unit/Runtime Dynamic': 0.749298, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932286, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.0183368, 'L2/Runtime Dynamic': 0.00554616, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 4.90577, 'Load Store Unit/Data Cache/Runtime Dynamic': 1.76943, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0350888, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.11869, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.11869, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 5.46625, 'Load Store Unit/Runtime Dynamic': 2.47345, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.292668, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.585336, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591321, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283293, 'Memory Management Unit/Area': 0.4339, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.103869, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.104113, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00808595, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.399995, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0462454, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.734532, 'Memory Management Unit/Runtime Dynamic': 0.150358, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 23.3568, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.000202958, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.0153357, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064, 'Renaming Unit/Gate Leakage': 0.00708398, 'Renaming Unit/Int Front End RAT/Area': 0.0941223, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.179258, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.194797, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 6.14251, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}], 'DRAM': {'Area': 0, 'Gate Leakage': 0, 'Peak Dynamic': 1.549791922570631, 'Runtime Dynamic': 1.549791922570631, 'Subthreshold Leakage': 4.252, 'Subthreshold Leakage with power gating': 4.252}, 'L3': [{'Area': 61.9075, 'Gate Leakage': 0.0484137, 'Peak Dynamic': 0.120956, 'Runtime Dynamic': 0.0743872, 'Subthreshold Leakage': 6.80085, 'Subthreshold Leakage with power gating': 3.32364}], 'Processor': {'Area': 191.908, 'Gate Leakage': 1.53485, 'Peak Dynamic': 100.492, 'Peak Power': 133.604, 'Runtime Dynamic': 30.3591, 'Subthreshold Leakage': 31.5774, 'Subthreshold Leakage with power gating': 13.9484, 'Total Cores/Area': 128.669, 'Total Cores/Gate Leakage': 1.4798, 'Total Cores/Peak Dynamic': 100.371, 'Total Cores/Runtime Dynamic': 30.2847, 'Total Cores/Subthreshold Leakage': 24.7074, 'Total Cores/Subthreshold Leakage with power gating': 10.2429, 'Total L3s/Area': 61.9075, 'Total L3s/Gate Leakage': 0.0484137, 'Total L3s/Peak Dynamic': 0.120956, 'Total L3s/Runtime Dynamic': 0.0743872, 'Total L3s/Subthreshold Leakage': 6.80085, 'Total L3s/Subthreshold Leakage with power gating': 3.32364, 'Total Leakage': 33.1122, 'Total NoCs/Area': 1.33155, 'Total NoCs/Gate Leakage': 0.00662954, 'Total NoCs/Peak Dynamic': 0.0, 'Total NoCs/Runtime Dynamic': 0.0, 'Total NoCs/Subthreshold Leakage': 0.0691322, 'Total NoCs/Subthreshold Leakage with power gating': 0.0259246}} |
#-------------------------------------------------------------------------------
# Name: module1
# Purpose:
#
# Author: mo-mo-
#
# Created: 25/08/2018
# Copyright: (c) mo-mo- 2018
# Licence: <your licence>
#-------------------------------------------------------------------------------
n, k = map(int, input().split())
x = list(map(int, input().split()) )
b = None
for i in range(n):
if x[i] == 0:
b = i
start = True
break
elif x[i] > 0:
b = i
start = False
break
if not b:
m = abs(x[-k])
else:
if start:
del x[b]
k -= 1
n -= 1
if k == 0:
m = 0
elif k == 1:
if b-1 >= 0:
m = min(x[b], abs(x[b-1]))
else:
m = x[b]
else:
if b >= k:
m1 = abs(x[b-k])
else:
m1 = None
if b+k-1 <= n-1:
m2 = abs(x[b+k-1])
else:
m2 = None
m = 2*10**8
for i in range(1, k):
if b-i >= 0 and b-i+k-1 < n:
m = min(2*abs(x[b-i])+abs(x[b-i+k-1]),abs(x[b-i])+2*abs(x[b-i+k-1]), m)
if m1:
m = min(m, m1)
if m2:
m = min(m, m2)
print(m)
| (n, k) = map(int, input().split())
x = list(map(int, input().split()))
b = None
for i in range(n):
if x[i] == 0:
b = i
start = True
break
elif x[i] > 0:
b = i
start = False
break
if not b:
m = abs(x[-k])
else:
if start:
del x[b]
k -= 1
n -= 1
if k == 0:
m = 0
elif k == 1:
if b - 1 >= 0:
m = min(x[b], abs(x[b - 1]))
else:
m = x[b]
else:
if b >= k:
m1 = abs(x[b - k])
else:
m1 = None
if b + k - 1 <= n - 1:
m2 = abs(x[b + k - 1])
else:
m2 = None
m = 2 * 10 ** 8
for i in range(1, k):
if b - i >= 0 and b - i + k - 1 < n:
m = min(2 * abs(x[b - i]) + abs(x[b - i + k - 1]), abs(x[b - i]) + 2 * abs(x[b - i + k - 1]), m)
if m1:
m = min(m, m1)
if m2:
m = min(m, m2)
print(m) |
# -*- coding: utf-8 -*-
"""
app.views.user
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Module for initialising app user API package.
:copyright: (c)2020 by rico0821
""" | """
app.views.user
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Module for initialising app user API package.
:copyright: (c)2020 by rico0821
""" |
pasta = "tomato, basil, garlic, salt, pasta, olive oil"
apple_pie = "apple, sugar, salt, cinnamon, flour, egg, butter"
ratatouille = "aubergine, carrot, onion, tomato, garlic, olive oil, pepper, salt"
chocolate_cake = "chocolate, sugar, salt, flour, coffee, butter"
omelette = "egg, milk, bacon, tomato, salt, pepper"
word = input()
list_ = [pasta, apple_pie,ratatouille, chocolate_cake, omelette]
dish = ['pasta', 'apple pie', 'ratatouille', 'chocolate cake', 'omelette']
dict_ = dict(zip(dish,list_))
for ele, ingredient in list(dict_.items()):
if word in ingredient:
print(ele + " time!")
| pasta = 'tomato, basil, garlic, salt, pasta, olive oil'
apple_pie = 'apple, sugar, salt, cinnamon, flour, egg, butter'
ratatouille = 'aubergine, carrot, onion, tomato, garlic, olive oil, pepper, salt'
chocolate_cake = 'chocolate, sugar, salt, flour, coffee, butter'
omelette = 'egg, milk, bacon, tomato, salt, pepper'
word = input()
list_ = [pasta, apple_pie, ratatouille, chocolate_cake, omelette]
dish = ['pasta', 'apple pie', 'ratatouille', 'chocolate cake', 'omelette']
dict_ = dict(zip(dish, list_))
for (ele, ingredient) in list(dict_.items()):
if word in ingredient:
print(ele + ' time!') |
num1 = 1
num2 = 1
num3 = 200
num100 = 000000
num2 = 100
num4 = 000
num33 = 9998
age = 12
age1 = 123
hahah = 1320389
| num1 = 1
num2 = 1
num3 = 200
num100 = 0
num2 = 100
num4 = 0
num33 = 9998
age = 12
age1 = 123
hahah = 1320389 |
# -*- coding: utf-8 -*-
__author__ = 'Sumeet Kumar'
__email__ = 'kr.sumeet@gmail.com'
__version__ = '1.0.0'
| __author__ = 'Sumeet Kumar'
__email__ = 'kr.sumeet@gmail.com'
__version__ = '1.0.0' |
N = int(input())
A = list(map(int, input().split()))
ans = 0
for i in range(N):
if A[A[i]-1] == (i+1):
ans += 1
print(ans//2)
| n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(N):
if A[A[i] - 1] == i + 1:
ans += 1
print(ans // 2) |
class Solution:
def repeatedSubstringPattern(self, s: str) -> bool:
ans=""
temp=""
for i in range(0,len(s)-1):
temp+=s[i]
if len(s)%len(temp)==0 and temp*int((len(s)/len(temp)))==s:
print(temp)
return 1
return 0
| class Solution:
def repeated_substring_pattern(self, s: str) -> bool:
ans = ''
temp = ''
for i in range(0, len(s) - 1):
temp += s[i]
if len(s) % len(temp) == 0 and temp * int(len(s) / len(temp)) == s:
print(temp)
return 1
return 0 |
# GYP file to build unit tests.
{
'includes': [
'apptype_console.gypi',
],
'targets': [
{
'target_name': 'pathops_unittest',
'type': 'executable',
'suppress_wildcard': '1',
'include_dirs' : [
'../src/core',
'../src/effects',
'../src/lazy',
'../src/pathops',
'../src/pdf',
'../src/pipe/utils',
'../src/utils',
'../tools/',
],
'includes': [
'pathops_unittest.gypi',
],
'sources': [
'../tests/Test.cpp',
'../tests/skia_test.cpp',
'../tests/Test.h',
],
'dependencies': [
'skia_base_libs.gyp:skia_base_libs',
'effects.gyp:effects',
'flags.gyp:flags',
'images.gyp:images',
'utils.gyp:utils',
],
'conditions': [
[ 'skia_gpu == 1', {
'include_dirs': [
'../src/gpu',
],
}],
],
},
],
}
# Local Variables:
# tab-width:2
# indent-tabs-mode:nil
# End:
# vim: set expandtab tabstop=2 shiftwidth=2:
| {'includes': ['apptype_console.gypi'], 'targets': [{'target_name': 'pathops_unittest', 'type': 'executable', 'suppress_wildcard': '1', 'include_dirs': ['../src/core', '../src/effects', '../src/lazy', '../src/pathops', '../src/pdf', '../src/pipe/utils', '../src/utils', '../tools/'], 'includes': ['pathops_unittest.gypi'], 'sources': ['../tests/Test.cpp', '../tests/skia_test.cpp', '../tests/Test.h'], 'dependencies': ['skia_base_libs.gyp:skia_base_libs', 'effects.gyp:effects', 'flags.gyp:flags', 'images.gyp:images', 'utils.gyp:utils'], 'conditions': [['skia_gpu == 1', {'include_dirs': ['../src/gpu']}]]}]} |
# =============================================================================
#
# =============================================================================
x =[1,2,5]+ [3,4]
x.sort()
# =============================================================================
#
# =============================================================================
a = [[1,2],
[3,4]]
findMatrix(a)
def findMatrix(a):
n_rows = len(a)
n_cols = len(a[0])
for row in range(n_rows):
for col in range(n_cols):
if row == 0 and col == 0:
pass
elif row == 0 and col!= 0:
a[row][col] += a[row][col-1]
elif row != 0 and col == 0:
a[row][col] += a[row-1][col]
elif row != 0 and col != 0:
a[row][col] += a[row-1][col] + a[row][col-1] - a[row-1][col-1]
else:
pass
return a
# =============================================================================
#
# =============================================================================
nodes = "(B,D) (D,E) (A,B) (C,F) (E,G) (A,C)"
#( A(B(D(E(G)))) (C(F)) )
nodes = "(B,D) (D,E) (A,C) (C,F) (E,G) (A,C)"
def SExpression(nodes):
x = nodes.split(" ")
x = [k.lstrip("(").rstrip(")") for k in x]
x = [(k[0],k[2]) if k[0]<k[2] else (k[2],k[0]) for k in x] # sort order
x.sort()
# > 2 children
counter = dict()
for parent, child in x:
if parent in counter:
counter[parent] += 1
else:
counter[parent] = 1
if any([k>2 for k in list(counter.values())]):
return "E1"
# duplicate edges
if len(set(x)) < len(x):
return "E2"
root = x[0][0]
if x[0][0] == x[1][0]:
root_binary = True
else:
root_binary = False
if root_binary:
_x1 = [x[0]]
x.remove(_x1[0])
_x2 = [x[0]]
x.remove(_x2[0])
for parent, child in x:
if parent == _x1[len(_x1)-1][1]:
_x1.append((parent,child))
elif parent == _x2[len(_x2)-1][1]:
_x2.append((parent,child))
else:
pass
branch1 = root + "(" + "(".join([k[1] for k in _x1]) + ")"*len(_x1)
branch2 = "(" + "(".join([k[1] for k in _x2]) + ")"*len(_x2)
children1= [k[1] for k in _x1]
children2= [k[1] for k in _x2]
# cycle detected
if set(children1) in set(children2):
return "E3"
return "(" + branch1 + branch2 + ")"
else:
_x1 = [x[0]]
x.remove(_x1[0])
for parent, child in x:
if parent == _x1[len(_x1)-1][1]:
_x1.append((parent,child))
else:
pass
branch1 = root + "(" + "(".join([k[1] for k in _x1]) + ")"*len(_x1)
return "(" + branch1 + ")"
| x = [1, 2, 5] + [3, 4]
x.sort()
a = [[1, 2], [3, 4]]
find_matrix(a)
def find_matrix(a):
n_rows = len(a)
n_cols = len(a[0])
for row in range(n_rows):
for col in range(n_cols):
if row == 0 and col == 0:
pass
elif row == 0 and col != 0:
a[row][col] += a[row][col - 1]
elif row != 0 and col == 0:
a[row][col] += a[row - 1][col]
elif row != 0 and col != 0:
a[row][col] += a[row - 1][col] + a[row][col - 1] - a[row - 1][col - 1]
else:
pass
return a
nodes = '(B,D) (D,E) (A,B) (C,F) (E,G) (A,C)'
nodes = '(B,D) (D,E) (A,C) (C,F) (E,G) (A,C)'
def s_expression(nodes):
x = nodes.split(' ')
x = [k.lstrip('(').rstrip(')') for k in x]
x = [(k[0], k[2]) if k[0] < k[2] else (k[2], k[0]) for k in x]
x.sort()
counter = dict()
for (parent, child) in x:
if parent in counter:
counter[parent] += 1
else:
counter[parent] = 1
if any([k > 2 for k in list(counter.values())]):
return 'E1'
if len(set(x)) < len(x):
return 'E2'
root = x[0][0]
if x[0][0] == x[1][0]:
root_binary = True
else:
root_binary = False
if root_binary:
_x1 = [x[0]]
x.remove(_x1[0])
_x2 = [x[0]]
x.remove(_x2[0])
for (parent, child) in x:
if parent == _x1[len(_x1) - 1][1]:
_x1.append((parent, child))
elif parent == _x2[len(_x2) - 1][1]:
_x2.append((parent, child))
else:
pass
branch1 = root + '(' + '('.join([k[1] for k in _x1]) + ')' * len(_x1)
branch2 = '(' + '('.join([k[1] for k in _x2]) + ')' * len(_x2)
children1 = [k[1] for k in _x1]
children2 = [k[1] for k in _x2]
if set(children1) in set(children2):
return 'E3'
return '(' + branch1 + branch2 + ')'
else:
_x1 = [x[0]]
x.remove(_x1[0])
for (parent, child) in x:
if parent == _x1[len(_x1) - 1][1]:
_x1.append((parent, child))
else:
pass
branch1 = root + '(' + '('.join([k[1] for k in _x1]) + ')' * len(_x1)
return '(' + branch1 + ')' |
class Solution:
def groupAnagrams(self, strs: list) -> list:
hashmap = {}
for s in strs:
key = ''.join(sorted(s))
if key in hashmap:
hashmap[key] += [s]
else:
hashmap[key] = [s]
return hashmap.values()
v = Solution().groupAnagrams(["eat", "tea", "tan", "ate", "nat", "bat"])
print(v)
| class Solution:
def group_anagrams(self, strs: list) -> list:
hashmap = {}
for s in strs:
key = ''.join(sorted(s))
if key in hashmap:
hashmap[key] += [s]
else:
hashmap[key] = [s]
return hashmap.values()
v = solution().groupAnagrams(['eat', 'tea', 'tan', 'ate', 'nat', 'bat'])
print(v) |
def plus_minus(arr):
positive, negative, zero = 0, 0, 0
for index in arr:
if index > 0:
positive += 1
elif index < 0:
negative += 1
else:
zero += 1
print(positive/len(arr))
print(negative/len(arr))
print(zero/len(arr))
arr = [-4, 3, -9, 0, 4, 1]
plus_minus(arr)
"""
0.5
0.3333333333333333
0.16666666666666666
""" | def plus_minus(arr):
(positive, negative, zero) = (0, 0, 0)
for index in arr:
if index > 0:
positive += 1
elif index < 0:
negative += 1
else:
zero += 1
print(positive / len(arr))
print(negative / len(arr))
print(zero / len(arr))
arr = [-4, 3, -9, 0, 4, 1]
plus_minus(arr)
'\n0.5\n0.3333333333333333\n0.16666666666666666\n' |
#!/usr/bin/python
# arithmetic.py
a = 10
b = 11
c = 12
add = a + b + c
sub = c - a
mult = a * b
div = c / 3
power = (a ** 2)
print (add, sub, mult, div)
print (power)
| a = 10
b = 11
c = 12
add = a + b + c
sub = c - a
mult = a * b
div = c / 3
power = a ** 2
print(add, sub, mult, div)
print(power) |
#
# LeetCode
#
# Problem - 206
# URL - https://leetcode.com/problems/reverse-linked-list/
#
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def reverseList(self, head: ListNode) -> ListNode:
ansNode = None
while (head != None):
ansNode = ListNode(head.val, ansNode)
head = head.next
return ansNode
| class Solution:
def reverse_list(self, head: ListNode) -> ListNode:
ans_node = None
while head != None:
ans_node = list_node(head.val, ansNode)
head = head.next
return ansNode |
#
# PySNMP MIB module ARISTA-NEXTHOP-GROUP-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ARISTA-NEXTHOP-GROUP-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:25:06 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
aristaMibs, = mibBuilder.importSymbols("ARISTA-SMI-MIB", "aristaMibs")
Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection, ValueSizeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection", "ValueSizeConstraint", "SingleValueConstraint")
ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance")
MibIdentifier, ModuleIdentity, Gauge32, IpAddress, iso, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, Bits, Counter32, TimeTicks, ObjectIdentity, Counter64, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "ModuleIdentity", "Gauge32", "IpAddress", "iso", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "Bits", "Counter32", "TimeTicks", "ObjectIdentity", "Counter64", "Unsigned32")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
aristaNexthopGroupMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 30065, 3, 21))
aristaNexthopGroupMIB.setRevisions(('2016-04-17 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: aristaNexthopGroupMIB.setRevisionsDescriptions(('Initial revision of the MIB module.',))
if mibBuilder.loadTexts: aristaNexthopGroupMIB.setLastUpdated('201604170000Z')
if mibBuilder.loadTexts: aristaNexthopGroupMIB.setOrganization('Arista Networks, Inc.')
if mibBuilder.loadTexts: aristaNexthopGroupMIB.setContactInfo('Arista Networks, Inc. Postal: 5453 Great America Parkway Santa Clara, CA 95054 Tel: +1 408 547-5500 E-mail: snmp@arista.com')
if mibBuilder.loadTexts: aristaNexthopGroupMIB.setDescription("This MIB contains information about NextHop Groups (NHG). General L3 routing creates routing table entries, each of which are associated with a nexthop. If multiple paths exist for a specific route, the route points to a set of nexthops (commonly referred as ECMP or Equal Cost MultiPath). Arista devices support a feature which allows customers to manually create a nexthop list, and use this list to route packets to the specified set of nexthop addresses. Customers can associate a tunnel type (GRE, for example) with the nexthop group, allowing relevant packets to be tunneled as well. The packet forwarding or routing decision happens in hardware. Nexthop group feature gives customers full control of how a route should be forwarded (tunneled or otherwise). The number of entries in the nexthop group is also determined by the user, and directly translates to the number of nexthop entries in the hardware for the specified route. Let's provide an example, looking at EOS CLI example. nexthop-group foo type ip-in-ip ttl 64 entry 0 tunnel-destination 10.1.1.1 entry 1 tunnel-destination 20.1.1.1 ! ip route 30.1.1.0/24 Nexthop-Group foo In the above configuration, any packet destined to 30.1.1.0/24 will be forwarded by the nexthop group 'foo'. Each entry inside the nexthop group specifies a particular nexthop ('tunnel destination') chosen by the customer. In this example, packets can be forwarded via either of the nexthop (traffic split equally between the 2 entries). This MIB module provides information relevant to the nexthop group feature, specifically the status of various nexthop groups configured, and traffic statistics.")
aristaNexthopGroupMibObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1))
aristaNexthopGroupMibConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 30065, 3, 21, 2))
class NexthopGroupName(TextualConvention, OctetString):
description = 'Each nexthop group configured by the user is associated with a name, by configuration.'
status = 'current'
displayHint = '255a'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 255)
class NexthopGroupType(TextualConvention, Integer32):
description = "A nexthop group is associated with a type, which determines the packet forwarding behavior. Type 'ip' refers to L3 IP routing. A route pointing to a nexthop group in this case is equivalent to multiple static route configuration entries each with a particular nexthop. Types 'gre', 'mpls', 'ip-in-ip' all refer to tunnel types. In this case a route pointing to the specified nexthop group is used to tunnel packets using the appropriate encapsulation to a tunnel destination. The encapsulation information depends on the tunnel type itself."
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))
namedValues = NamedValues(("invalid", 0), ("ipInIp", 1), ("gre", 2), ("mpls", 3), ("ip", 4), ("mplsOverGre", 5))
aristaNexthopGroupTable = MibTable((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1, 1), )
if mibBuilder.loadTexts: aristaNexthopGroupTable.setStatus('current')
if mibBuilder.loadTexts: aristaNexthopGroupTable.setDescription('This table contains information about the nexthop groups that are present in the device.')
aristaNexthopGroupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1, 1, 1), ).setIndexNames((0, "ARISTA-NEXTHOP-GROUP-MIB", "aristaNexthopGroupId"))
if mibBuilder.loadTexts: aristaNexthopGroupEntry.setStatus('current')
if mibBuilder.loadTexts: aristaNexthopGroupEntry.setDescription('A conceptual row, containing information for a specific nexthop group.')
aristaNexthopGroupId = MibTableColumn((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1, 1, 1, 1), Unsigned32())
if mibBuilder.loadTexts: aristaNexthopGroupId.setStatus('current')
if mibBuilder.loadTexts: aristaNexthopGroupId.setDescription('Unique index identifying a nexthop group.')
aristaNexthopGroupName = MibTableColumn((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1, 1, 1, 2), NexthopGroupName()).setMaxAccess("readonly")
if mibBuilder.loadTexts: aristaNexthopGroupName.setStatus('current')
if mibBuilder.loadTexts: aristaNexthopGroupName.setDescription('Unique name identifying a nexthop group.')
aristaNexthopGroupType = MibTableColumn((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1, 1, 1, 3), NexthopGroupType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: aristaNexthopGroupType.setStatus('current')
if mibBuilder.loadTexts: aristaNexthopGroupType.setDescription('The type of the nexthop group. The encapsulation information provided for each entry in the nexthop group corresponds to the type.')
aristaNexthopGroupCounterTable = MibTable((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1, 2), )
if mibBuilder.loadTexts: aristaNexthopGroupCounterTable.setStatus('current')
if mibBuilder.loadTexts: aristaNexthopGroupCounterTable.setDescription('Each nexthop group contains several entries - each entry specifies a particular nexthop through which a packet can be forwarded. There is packet and byte counter information associated with each such nexthop. This table represents the per nexthop counter information for every nexthop group.')
aristaNexthopGroupCounterEntry = MibTableRow((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1, 2, 1), ).setIndexNames((0, "ARISTA-NEXTHOP-GROUP-MIB", "aristaNexthopGroupId"), (0, "ARISTA-NEXTHOP-GROUP-MIB", "aristaNexthopGroupEntryIndex"))
if mibBuilder.loadTexts: aristaNexthopGroupCounterEntry.setStatus('current')
if mibBuilder.loadTexts: aristaNexthopGroupCounterEntry.setDescription('A conceptual row, containing counter information for every nexthop defined inside the nexthop group.')
aristaNexthopGroupEntryIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1, 2, 1, 1), Unsigned32())
if mibBuilder.loadTexts: aristaNexthopGroupEntryIndex.setStatus('current')
if mibBuilder.loadTexts: aristaNexthopGroupEntryIndex.setDescription("As described in the beginning of the MIB module each nexthop group can have multiple entries, one per 'destination' or 'nexthop'. Each entry within a nexthop group has a number or index as configured by the user. This MIB object represents the entry index within the nexthop group.")
aristaNexthopGroupCounterIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1, 2, 1, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: aristaNexthopGroupCounterIndex.setStatus('current')
if mibBuilder.loadTexts: aristaNexthopGroupCounterIndex.setDescription('For every nexthop within a nexthop group, packet and byte counters are maintained by the device. Counters can be shared by multiple such nexthops and the counter index will be the same for all of those nexthops.')
aristaNexthopGroupCounterPacketCount = MibTableColumn((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1, 2, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: aristaNexthopGroupCounterPacketCount.setStatus('current')
if mibBuilder.loadTexts: aristaNexthopGroupCounterPacketCount.setDescription('The number of packets forwarded through the specific nexthop. Note that since counters are shared with multiple nexthops, the packet count is an aggregate of packets forwarded through all the relevant nexthops.')
aristaNexthopGroupCounterByteCount = MibTableColumn((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1, 2, 1, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: aristaNexthopGroupCounterByteCount.setStatus('current')
if mibBuilder.loadTexts: aristaNexthopGroupCounterByteCount.setDescription('The byte count of packets forwarded through the specific nexthop. Note that since counters are shared with multiple nexthops, the byte count is an aggregate of packets forwarded through all the relevant nexthops.')
aristaNexthopGroupMibCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 30065, 3, 21, 2, 1))
aristaNexthopGroupMibGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 30065, 3, 21, 2, 2))
aristaNexthopGroupMibCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 30065, 3, 21, 2, 1, 1)).setObjects(("ARISTA-NEXTHOP-GROUP-MIB", "aristaNexthopGroupGroup"), ("ARISTA-NEXTHOP-GROUP-MIB", "aristaNexthopGroupCounterGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
aristaNexthopGroupMibCompliance = aristaNexthopGroupMibCompliance.setStatus('current')
if mibBuilder.loadTexts: aristaNexthopGroupMibCompliance.setDescription('The compliance statement for Arista switches that implement the ARISTA-NEXTHOP-GROUP-MIB.')
aristaNexthopGroupGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 30065, 3, 21, 2, 2, 1)).setObjects(("ARISTA-NEXTHOP-GROUP-MIB", "aristaNexthopGroupName"), ("ARISTA-NEXTHOP-GROUP-MIB", "aristaNexthopGroupType"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
aristaNexthopGroupGroup = aristaNexthopGroupGroup.setStatus('current')
if mibBuilder.loadTexts: aristaNexthopGroupGroup.setDescription('The collection of objects that provide nexthop group information in the system.')
aristaNexthopGroupCounterGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 30065, 3, 21, 2, 2, 2)).setObjects(("ARISTA-NEXTHOP-GROUP-MIB", "aristaNexthopGroupCounterIndex"), ("ARISTA-NEXTHOP-GROUP-MIB", "aristaNexthopGroupCounterPacketCount"), ("ARISTA-NEXTHOP-GROUP-MIB", "aristaNexthopGroupCounterByteCount"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
aristaNexthopGroupCounterGroup = aristaNexthopGroupCounterGroup.setStatus('current')
if mibBuilder.loadTexts: aristaNexthopGroupCounterGroup.setDescription('The collection of objects that provide counter information for every nexthop in the nexthop group.')
mibBuilder.exportSymbols("ARISTA-NEXTHOP-GROUP-MIB", aristaNexthopGroupMIB=aristaNexthopGroupMIB, PYSNMP_MODULE_ID=aristaNexthopGroupMIB, NexthopGroupName=NexthopGroupName, aristaNexthopGroupCounterIndex=aristaNexthopGroupCounterIndex, aristaNexthopGroupCounterTable=aristaNexthopGroupCounterTable, aristaNexthopGroupMibGroups=aristaNexthopGroupMibGroups, aristaNexthopGroupEntry=aristaNexthopGroupEntry, aristaNexthopGroupType=aristaNexthopGroupType, aristaNexthopGroupCounterByteCount=aristaNexthopGroupCounterByteCount, aristaNexthopGroupEntryIndex=aristaNexthopGroupEntryIndex, aristaNexthopGroupMibCompliances=aristaNexthopGroupMibCompliances, aristaNexthopGroupMibObjects=aristaNexthopGroupMibObjects, aristaNexthopGroupMibCompliance=aristaNexthopGroupMibCompliance, aristaNexthopGroupId=aristaNexthopGroupId, aristaNexthopGroupName=aristaNexthopGroupName, aristaNexthopGroupCounterGroup=aristaNexthopGroupCounterGroup, NexthopGroupType=NexthopGroupType, aristaNexthopGroupGroup=aristaNexthopGroupGroup, aristaNexthopGroupCounterEntry=aristaNexthopGroupCounterEntry, aristaNexthopGroupTable=aristaNexthopGroupTable, aristaNexthopGroupCounterPacketCount=aristaNexthopGroupCounterPacketCount, aristaNexthopGroupMibConformance=aristaNexthopGroupMibConformance)
| (arista_mibs,) = mibBuilder.importSymbols('ARISTA-SMI-MIB', 'aristaMibs')
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, constraints_union, constraints_intersection, value_size_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection', 'ValueSizeConstraint', 'SingleValueConstraint')
(object_group, notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'NotificationGroup', 'ModuleCompliance')
(mib_identifier, module_identity, gauge32, ip_address, iso, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, integer32, bits, counter32, time_ticks, object_identity, counter64, unsigned32) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibIdentifier', 'ModuleIdentity', 'Gauge32', 'IpAddress', 'iso', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Integer32', 'Bits', 'Counter32', 'TimeTicks', 'ObjectIdentity', 'Counter64', 'Unsigned32')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
arista_nexthop_group_mib = module_identity((1, 3, 6, 1, 4, 1, 30065, 3, 21))
aristaNexthopGroupMIB.setRevisions(('2016-04-17 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
aristaNexthopGroupMIB.setRevisionsDescriptions(('Initial revision of the MIB module.',))
if mibBuilder.loadTexts:
aristaNexthopGroupMIB.setLastUpdated('201604170000Z')
if mibBuilder.loadTexts:
aristaNexthopGroupMIB.setOrganization('Arista Networks, Inc.')
if mibBuilder.loadTexts:
aristaNexthopGroupMIB.setContactInfo('Arista Networks, Inc. Postal: 5453 Great America Parkway Santa Clara, CA 95054 Tel: +1 408 547-5500 E-mail: snmp@arista.com')
if mibBuilder.loadTexts:
aristaNexthopGroupMIB.setDescription("This MIB contains information about NextHop Groups (NHG). General L3 routing creates routing table entries, each of which are associated with a nexthop. If multiple paths exist for a specific route, the route points to a set of nexthops (commonly referred as ECMP or Equal Cost MultiPath). Arista devices support a feature which allows customers to manually create a nexthop list, and use this list to route packets to the specified set of nexthop addresses. Customers can associate a tunnel type (GRE, for example) with the nexthop group, allowing relevant packets to be tunneled as well. The packet forwarding or routing decision happens in hardware. Nexthop group feature gives customers full control of how a route should be forwarded (tunneled or otherwise). The number of entries in the nexthop group is also determined by the user, and directly translates to the number of nexthop entries in the hardware for the specified route. Let's provide an example, looking at EOS CLI example. nexthop-group foo type ip-in-ip ttl 64 entry 0 tunnel-destination 10.1.1.1 entry 1 tunnel-destination 20.1.1.1 ! ip route 30.1.1.0/24 Nexthop-Group foo In the above configuration, any packet destined to 30.1.1.0/24 will be forwarded by the nexthop group 'foo'. Each entry inside the nexthop group specifies a particular nexthop ('tunnel destination') chosen by the customer. In this example, packets can be forwarded via either of the nexthop (traffic split equally between the 2 entries). This MIB module provides information relevant to the nexthop group feature, specifically the status of various nexthop groups configured, and traffic statistics.")
arista_nexthop_group_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1))
arista_nexthop_group_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 30065, 3, 21, 2))
class Nexthopgroupname(TextualConvention, OctetString):
description = 'Each nexthop group configured by the user is associated with a name, by configuration.'
status = 'current'
display_hint = '255a'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 255)
class Nexthopgrouptype(TextualConvention, Integer32):
description = "A nexthop group is associated with a type, which determines the packet forwarding behavior. Type 'ip' refers to L3 IP routing. A route pointing to a nexthop group in this case is equivalent to multiple static route configuration entries each with a particular nexthop. Types 'gre', 'mpls', 'ip-in-ip' all refer to tunnel types. In this case a route pointing to the specified nexthop group is used to tunnel packets using the appropriate encapsulation to a tunnel destination. The encapsulation information depends on the tunnel type itself."
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5))
named_values = named_values(('invalid', 0), ('ipInIp', 1), ('gre', 2), ('mpls', 3), ('ip', 4), ('mplsOverGre', 5))
arista_nexthop_group_table = mib_table((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1, 1))
if mibBuilder.loadTexts:
aristaNexthopGroupTable.setStatus('current')
if mibBuilder.loadTexts:
aristaNexthopGroupTable.setDescription('This table contains information about the nexthop groups that are present in the device.')
arista_nexthop_group_entry = mib_table_row((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1, 1, 1)).setIndexNames((0, 'ARISTA-NEXTHOP-GROUP-MIB', 'aristaNexthopGroupId'))
if mibBuilder.loadTexts:
aristaNexthopGroupEntry.setStatus('current')
if mibBuilder.loadTexts:
aristaNexthopGroupEntry.setDescription('A conceptual row, containing information for a specific nexthop group.')
arista_nexthop_group_id = mib_table_column((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1, 1, 1, 1), unsigned32())
if mibBuilder.loadTexts:
aristaNexthopGroupId.setStatus('current')
if mibBuilder.loadTexts:
aristaNexthopGroupId.setDescription('Unique index identifying a nexthop group.')
arista_nexthop_group_name = mib_table_column((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1, 1, 1, 2), nexthop_group_name()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
aristaNexthopGroupName.setStatus('current')
if mibBuilder.loadTexts:
aristaNexthopGroupName.setDescription('Unique name identifying a nexthop group.')
arista_nexthop_group_type = mib_table_column((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1, 1, 1, 3), nexthop_group_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
aristaNexthopGroupType.setStatus('current')
if mibBuilder.loadTexts:
aristaNexthopGroupType.setDescription('The type of the nexthop group. The encapsulation information provided for each entry in the nexthop group corresponds to the type.')
arista_nexthop_group_counter_table = mib_table((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1, 2))
if mibBuilder.loadTexts:
aristaNexthopGroupCounterTable.setStatus('current')
if mibBuilder.loadTexts:
aristaNexthopGroupCounterTable.setDescription('Each nexthop group contains several entries - each entry specifies a particular nexthop through which a packet can be forwarded. There is packet and byte counter information associated with each such nexthop. This table represents the per nexthop counter information for every nexthop group.')
arista_nexthop_group_counter_entry = mib_table_row((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1, 2, 1)).setIndexNames((0, 'ARISTA-NEXTHOP-GROUP-MIB', 'aristaNexthopGroupId'), (0, 'ARISTA-NEXTHOP-GROUP-MIB', 'aristaNexthopGroupEntryIndex'))
if mibBuilder.loadTexts:
aristaNexthopGroupCounterEntry.setStatus('current')
if mibBuilder.loadTexts:
aristaNexthopGroupCounterEntry.setDescription('A conceptual row, containing counter information for every nexthop defined inside the nexthop group.')
arista_nexthop_group_entry_index = mib_table_column((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1, 2, 1, 1), unsigned32())
if mibBuilder.loadTexts:
aristaNexthopGroupEntryIndex.setStatus('current')
if mibBuilder.loadTexts:
aristaNexthopGroupEntryIndex.setDescription("As described in the beginning of the MIB module each nexthop group can have multiple entries, one per 'destination' or 'nexthop'. Each entry within a nexthop group has a number or index as configured by the user. This MIB object represents the entry index within the nexthop group.")
arista_nexthop_group_counter_index = mib_table_column((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1, 2, 1, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
aristaNexthopGroupCounterIndex.setStatus('current')
if mibBuilder.loadTexts:
aristaNexthopGroupCounterIndex.setDescription('For every nexthop within a nexthop group, packet and byte counters are maintained by the device. Counters can be shared by multiple such nexthops and the counter index will be the same for all of those nexthops.')
arista_nexthop_group_counter_packet_count = mib_table_column((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1, 2, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
aristaNexthopGroupCounterPacketCount.setStatus('current')
if mibBuilder.loadTexts:
aristaNexthopGroupCounterPacketCount.setDescription('The number of packets forwarded through the specific nexthop. Note that since counters are shared with multiple nexthops, the packet count is an aggregate of packets forwarded through all the relevant nexthops.')
arista_nexthop_group_counter_byte_count = mib_table_column((1, 3, 6, 1, 4, 1, 30065, 3, 21, 1, 2, 1, 4), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
aristaNexthopGroupCounterByteCount.setStatus('current')
if mibBuilder.loadTexts:
aristaNexthopGroupCounterByteCount.setDescription('The byte count of packets forwarded through the specific nexthop. Note that since counters are shared with multiple nexthops, the byte count is an aggregate of packets forwarded through all the relevant nexthops.')
arista_nexthop_group_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 30065, 3, 21, 2, 1))
arista_nexthop_group_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 30065, 3, 21, 2, 2))
arista_nexthop_group_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 30065, 3, 21, 2, 1, 1)).setObjects(('ARISTA-NEXTHOP-GROUP-MIB', 'aristaNexthopGroupGroup'), ('ARISTA-NEXTHOP-GROUP-MIB', 'aristaNexthopGroupCounterGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
arista_nexthop_group_mib_compliance = aristaNexthopGroupMibCompliance.setStatus('current')
if mibBuilder.loadTexts:
aristaNexthopGroupMibCompliance.setDescription('The compliance statement for Arista switches that implement the ARISTA-NEXTHOP-GROUP-MIB.')
arista_nexthop_group_group = object_group((1, 3, 6, 1, 4, 1, 30065, 3, 21, 2, 2, 1)).setObjects(('ARISTA-NEXTHOP-GROUP-MIB', 'aristaNexthopGroupName'), ('ARISTA-NEXTHOP-GROUP-MIB', 'aristaNexthopGroupType'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
arista_nexthop_group_group = aristaNexthopGroupGroup.setStatus('current')
if mibBuilder.loadTexts:
aristaNexthopGroupGroup.setDescription('The collection of objects that provide nexthop group information in the system.')
arista_nexthop_group_counter_group = object_group((1, 3, 6, 1, 4, 1, 30065, 3, 21, 2, 2, 2)).setObjects(('ARISTA-NEXTHOP-GROUP-MIB', 'aristaNexthopGroupCounterIndex'), ('ARISTA-NEXTHOP-GROUP-MIB', 'aristaNexthopGroupCounterPacketCount'), ('ARISTA-NEXTHOP-GROUP-MIB', 'aristaNexthopGroupCounterByteCount'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
arista_nexthop_group_counter_group = aristaNexthopGroupCounterGroup.setStatus('current')
if mibBuilder.loadTexts:
aristaNexthopGroupCounterGroup.setDescription('The collection of objects that provide counter information for every nexthop in the nexthop group.')
mibBuilder.exportSymbols('ARISTA-NEXTHOP-GROUP-MIB', aristaNexthopGroupMIB=aristaNexthopGroupMIB, PYSNMP_MODULE_ID=aristaNexthopGroupMIB, NexthopGroupName=NexthopGroupName, aristaNexthopGroupCounterIndex=aristaNexthopGroupCounterIndex, aristaNexthopGroupCounterTable=aristaNexthopGroupCounterTable, aristaNexthopGroupMibGroups=aristaNexthopGroupMibGroups, aristaNexthopGroupEntry=aristaNexthopGroupEntry, aristaNexthopGroupType=aristaNexthopGroupType, aristaNexthopGroupCounterByteCount=aristaNexthopGroupCounterByteCount, aristaNexthopGroupEntryIndex=aristaNexthopGroupEntryIndex, aristaNexthopGroupMibCompliances=aristaNexthopGroupMibCompliances, aristaNexthopGroupMibObjects=aristaNexthopGroupMibObjects, aristaNexthopGroupMibCompliance=aristaNexthopGroupMibCompliance, aristaNexthopGroupId=aristaNexthopGroupId, aristaNexthopGroupName=aristaNexthopGroupName, aristaNexthopGroupCounterGroup=aristaNexthopGroupCounterGroup, NexthopGroupType=NexthopGroupType, aristaNexthopGroupGroup=aristaNexthopGroupGroup, aristaNexthopGroupCounterEntry=aristaNexthopGroupCounterEntry, aristaNexthopGroupTable=aristaNexthopGroupTable, aristaNexthopGroupCounterPacketCount=aristaNexthopGroupCounterPacketCount, aristaNexthopGroupMibConformance=aristaNexthopGroupMibConformance) |
class Message:
def __init__(self, chat_id=""):
self.chat_id = chat_id
def set_text(self, text, parse_mode=None, disable_web_page_preview=None, disable_notification=None,
reply_to_message_id=None, reply_markup=None):
self.text = text
self.content_type = "text"
self.parse_mode = parse_mode
self.disable_web_page_preview = disable_web_page_preview
self.disable_notification = disable_notification
self.reply_to_message_id = reply_to_message_id
self.reply_markup = reply_markup
return self
def set_video(self, video, duration=None, width=None, height=None, caption=None, disable_notification=None,
reply_to_message_id=None, reply_markup=None):
self.content_type = "video"
self.video = video
self.duration = duration
self.width = width
self.height = height
self.caption = caption
self.disable_notification = disable_notification
self.reply_to_message_id = reply_to_message_id
self.reply_markup = reply_markup
return self
def set_document(self, file, caption=None, disable_notification=None, reply_to_message_id=None, reply_markup=None):
self.content_type = "document"
self.file = file
self.caption = caption
self.disable_notification = disable_notification
self.reply_to_message_id = reply_to_message_id
self.reply_markup = reply_markup
return self
def set_photo(self, photo, caption=None, disable_notification=None, reply_to_message_id=None, reply_markup=None):
self.content_type = "photo"
self.photo = photo
self.caption = caption
self.disable_notification = disable_notification
self.reply_to_message_id = reply_to_message_id
self.reply_markup = reply_markup
return self
def set_audio(self, audio, duration=None, performer=None, title=None, disable_notification=None,
reply_to_message_id=None, reply_markup=None):
self.content_type = "audio"
self.audio = audio
self.duration = duration
self.title = title
self.performer = performer
self.disable_notification = disable_notification
self.reply_to_message_id = reply_to_message_id
self.reply_markup = reply_markup
return self
def callback_query(self, callback_query_id, text=None, show_alert=None):
self.content_type = "callback_query"
self.callback_query_id = callback_query_id
self.text = text
self.show_alert = show_alert
return self
def edit_message(self, msg_identifier, text, parse_mode=None, disable_web_page_preview=None, reply_markup=None):
self.content_type = "edit_message"
self.msg_identifier = msg_identifier
self.text = text
self.parse_mode = parse_mode
self.disable_web_page_preview = disable_web_page_preview
self.reply_markup = reply_markup
return self
| class Message:
def __init__(self, chat_id=''):
self.chat_id = chat_id
def set_text(self, text, parse_mode=None, disable_web_page_preview=None, disable_notification=None, reply_to_message_id=None, reply_markup=None):
self.text = text
self.content_type = 'text'
self.parse_mode = parse_mode
self.disable_web_page_preview = disable_web_page_preview
self.disable_notification = disable_notification
self.reply_to_message_id = reply_to_message_id
self.reply_markup = reply_markup
return self
def set_video(self, video, duration=None, width=None, height=None, caption=None, disable_notification=None, reply_to_message_id=None, reply_markup=None):
self.content_type = 'video'
self.video = video
self.duration = duration
self.width = width
self.height = height
self.caption = caption
self.disable_notification = disable_notification
self.reply_to_message_id = reply_to_message_id
self.reply_markup = reply_markup
return self
def set_document(self, file, caption=None, disable_notification=None, reply_to_message_id=None, reply_markup=None):
self.content_type = 'document'
self.file = file
self.caption = caption
self.disable_notification = disable_notification
self.reply_to_message_id = reply_to_message_id
self.reply_markup = reply_markup
return self
def set_photo(self, photo, caption=None, disable_notification=None, reply_to_message_id=None, reply_markup=None):
self.content_type = 'photo'
self.photo = photo
self.caption = caption
self.disable_notification = disable_notification
self.reply_to_message_id = reply_to_message_id
self.reply_markup = reply_markup
return self
def set_audio(self, audio, duration=None, performer=None, title=None, disable_notification=None, reply_to_message_id=None, reply_markup=None):
self.content_type = 'audio'
self.audio = audio
self.duration = duration
self.title = title
self.performer = performer
self.disable_notification = disable_notification
self.reply_to_message_id = reply_to_message_id
self.reply_markup = reply_markup
return self
def callback_query(self, callback_query_id, text=None, show_alert=None):
self.content_type = 'callback_query'
self.callback_query_id = callback_query_id
self.text = text
self.show_alert = show_alert
return self
def edit_message(self, msg_identifier, text, parse_mode=None, disable_web_page_preview=None, reply_markup=None):
self.content_type = 'edit_message'
self.msg_identifier = msg_identifier
self.text = text
self.parse_mode = parse_mode
self.disable_web_page_preview = disable_web_page_preview
self.reply_markup = reply_markup
return self |
"""
Distributed under the MIT License. See LICENSE.txt for more info.
"""
# seconds after email verification will expire
EMAIL_VERIFICATION_EXPIRY = 48 * 60 * 60 | """
Distributed under the MIT License. See LICENSE.txt for more info.
"""
email_verification_expiry = 48 * 60 * 60 |
# -*- coding: utf-8 -*-
__email__ = '{{ cookiecutter.author_email }}'
__author__ = '{{ cookiecutter.author_name }}'
__version__ = '0.0.1'
| __email__ = '{{ cookiecutter.author_email }}'
__author__ = '{{ cookiecutter.author_name }}'
__version__ = '0.0.1' |
#x = "awesome"
def myfunc():
print("Python is " + x)
#myfunc()
''''''''''''''''''''''''''''''''''''
x = "awesome"
def myfunc2():
x = "fantastic"
print("Python is " + x)
myfunc2()
print("Python is " + x) | def myfunc():
print('Python is ' + x)
''
x = 'awesome'
def myfunc2():
x = 'fantastic'
print('Python is ' + x)
myfunc2()
print('Python is ' + x) |
#!/usr/bin/env python
array = [
{
'fips': '01',
'abbr': 'AL',
'name': 'Alabama',
},
{
'fips': '02',
'abbr': 'AK',
'name': 'Alaska',
},
{
'fips': '04',
'abbr': 'AZ',
'name': 'Arizona',
},
{
'fips': '05',
'abbr': 'AR',
'name': 'Arkansas',
},
{
'fips': '06',
'abbr': 'CA',
'name': 'California',
},
{
'fips': '08',
'abbr': 'CO',
'name': 'Colorado',
},
{
'fips': '09',
'abbr': 'CT',
'name': 'Connecticut',
'votesby': 'town',
},
{
'fips': '10',
'abbr': 'DE',
'name': 'Delaware',
},
{
'fips': '11',
'abbr': 'DC',
'name': 'District of Columbia',
},
{
'fips': '12',
'abbr': 'FL',
'name': 'Florida',
},
{
'fips': '13',
'abbr': 'GA',
'name': 'Georgia',
},
{
'fips': '15',
'abbr': 'HI',
'name': 'Hawaii',
},
{
'fips': '16',
'abbr': 'ID',
'name': 'Idaho',
},
{
'fips': '17',
'abbr': 'IL',
'name': 'Illinois',
},
{
'fips': '18',
'abbr': 'IN',
'name': 'Indiana',
},
{
'fips': '19',
'abbr': 'IA',
'name': 'Iowa',
},
{
'fips': '20',
'abbr': 'KS',
'name': 'Kansas',
'votesby': 'district',
},
{
'fips': '21',
'abbr': 'KY',
'name': 'Kentucky',
},
{
'fips': '22',
'abbr': 'LA',
'name': 'Louisiana',
},
{
'fips': '23',
'abbr': 'ME',
'name': 'Maine',
},
{
'fips': '24',
'abbr': 'MD',
'name': 'Maryland',
},
{
'fips': '25',
'abbr': 'MA',
'name': 'Massachusetts',
'votesby': 'town',
},
{
'fips': '26',
'abbr': 'MI',
'name': 'Michigan',
},
{
'fips': '27',
'abbr': 'MN',
'name': 'Minnesota',
},
{
'fips': '28',
'abbr': 'MS',
'name': 'Mississippi',
},
{
'fips': '29',
'abbr': 'MO',
'name': 'Missouri',
},
{
'fips': '30',
'abbr': 'MT',
'name': 'Montana',
},
{
'fips': '31',
'abbr': 'NE',
'name': 'Nebraska',
},
{
'fips': '32',
'abbr': 'NV',
'name': 'Nevada',
},
{
'fips': '33',
'abbr': 'NH',
'name': 'New Hampshire',
'votesby': 'town',
},
{
'fips': '34',
'abbr': 'NJ',
'name': 'New Jersey',
},
{
'fips': '35',
'abbr': 'NM',
'name': 'New Mexico',
},
{
'fips': '36',
'abbr': 'NY',
'name': 'New York',
},
{
'fips': '37',
'abbr': 'NC',
'name': 'North Carolina',
},
{
'fips': '38',
'abbr': 'ND',
'name': 'North Dakota',
},
{
'fips': '39',
'abbr': 'OH',
'name': 'Ohio',
},
{
'fips': '40',
'abbr': 'OK',
'name': 'Oklahoma',
},
{
'fips': '41',
'abbr': 'OR',
'name': 'Oregon',
},
{
'fips': '42',
'abbr': 'PA',
'name': 'Pennsylvania',
},
{
'fips': '44',
'abbr': 'RI',
'name': 'Rhode Island',
},
{
'fips': '45',
'abbr': 'SC',
'name': 'South Carolina',
},
{
'fips': '46',
'abbr': 'SD',
'name': 'South Dakota',
},
{
'fips': '47',
'abbr': 'TN',
'name': 'Tennessee',
},
{
'fips': '48',
'abbr': 'TX',
'name': 'Texas',
},
{
'fips': '49',
'abbr': 'UT',
'name': 'Utah',
},
{
'fips': '50',
'abbr': 'VT',
'name': 'Vermont',
'votesby': 'town',
},
{
'fips': '51',
'abbr': 'VA',
'name': 'Virginia',
},
{
'fips': '53',
'abbr': 'WA',
'name': 'Washington',
},
{
'fips': '54',
'abbr': 'WV',
'name': 'West Virginia',
},
{
'fips': '55',
'abbr': 'WI',
'name': 'Wisconsin',
},
{
'fips': '56',
'abbr': 'WY',
'name': 'Wyoming',
},
{
'fips': '72',
'abbr': 'PR',
'name': 'Puerto Rico',
},
]
byAbbr = {}
for state in array:
byAbbr[ state['abbr'] ] = state
byName = {}
for state in array:
byName[ state['name'] ] = state
| array = [{'fips': '01', 'abbr': 'AL', 'name': 'Alabama'}, {'fips': '02', 'abbr': 'AK', 'name': 'Alaska'}, {'fips': '04', 'abbr': 'AZ', 'name': 'Arizona'}, {'fips': '05', 'abbr': 'AR', 'name': 'Arkansas'}, {'fips': '06', 'abbr': 'CA', 'name': 'California'}, {'fips': '08', 'abbr': 'CO', 'name': 'Colorado'}, {'fips': '09', 'abbr': 'CT', 'name': 'Connecticut', 'votesby': 'town'}, {'fips': '10', 'abbr': 'DE', 'name': 'Delaware'}, {'fips': '11', 'abbr': 'DC', 'name': 'District of Columbia'}, {'fips': '12', 'abbr': 'FL', 'name': 'Florida'}, {'fips': '13', 'abbr': 'GA', 'name': 'Georgia'}, {'fips': '15', 'abbr': 'HI', 'name': 'Hawaii'}, {'fips': '16', 'abbr': 'ID', 'name': 'Idaho'}, {'fips': '17', 'abbr': 'IL', 'name': 'Illinois'}, {'fips': '18', 'abbr': 'IN', 'name': 'Indiana'}, {'fips': '19', 'abbr': 'IA', 'name': 'Iowa'}, {'fips': '20', 'abbr': 'KS', 'name': 'Kansas', 'votesby': 'district'}, {'fips': '21', 'abbr': 'KY', 'name': 'Kentucky'}, {'fips': '22', 'abbr': 'LA', 'name': 'Louisiana'}, {'fips': '23', 'abbr': 'ME', 'name': 'Maine'}, {'fips': '24', 'abbr': 'MD', 'name': 'Maryland'}, {'fips': '25', 'abbr': 'MA', 'name': 'Massachusetts', 'votesby': 'town'}, {'fips': '26', 'abbr': 'MI', 'name': 'Michigan'}, {'fips': '27', 'abbr': 'MN', 'name': 'Minnesota'}, {'fips': '28', 'abbr': 'MS', 'name': 'Mississippi'}, {'fips': '29', 'abbr': 'MO', 'name': 'Missouri'}, {'fips': '30', 'abbr': 'MT', 'name': 'Montana'}, {'fips': '31', 'abbr': 'NE', 'name': 'Nebraska'}, {'fips': '32', 'abbr': 'NV', 'name': 'Nevada'}, {'fips': '33', 'abbr': 'NH', 'name': 'New Hampshire', 'votesby': 'town'}, {'fips': '34', 'abbr': 'NJ', 'name': 'New Jersey'}, {'fips': '35', 'abbr': 'NM', 'name': 'New Mexico'}, {'fips': '36', 'abbr': 'NY', 'name': 'New York'}, {'fips': '37', 'abbr': 'NC', 'name': 'North Carolina'}, {'fips': '38', 'abbr': 'ND', 'name': 'North Dakota'}, {'fips': '39', 'abbr': 'OH', 'name': 'Ohio'}, {'fips': '40', 'abbr': 'OK', 'name': 'Oklahoma'}, {'fips': '41', 'abbr': 'OR', 'name': 'Oregon'}, {'fips': '42', 'abbr': 'PA', 'name': 'Pennsylvania'}, {'fips': '44', 'abbr': 'RI', 'name': 'Rhode Island'}, {'fips': '45', 'abbr': 'SC', 'name': 'South Carolina'}, {'fips': '46', 'abbr': 'SD', 'name': 'South Dakota'}, {'fips': '47', 'abbr': 'TN', 'name': 'Tennessee'}, {'fips': '48', 'abbr': 'TX', 'name': 'Texas'}, {'fips': '49', 'abbr': 'UT', 'name': 'Utah'}, {'fips': '50', 'abbr': 'VT', 'name': 'Vermont', 'votesby': 'town'}, {'fips': '51', 'abbr': 'VA', 'name': 'Virginia'}, {'fips': '53', 'abbr': 'WA', 'name': 'Washington'}, {'fips': '54', 'abbr': 'WV', 'name': 'West Virginia'}, {'fips': '55', 'abbr': 'WI', 'name': 'Wisconsin'}, {'fips': '56', 'abbr': 'WY', 'name': 'Wyoming'}, {'fips': '72', 'abbr': 'PR', 'name': 'Puerto Rico'}]
by_abbr = {}
for state in array:
byAbbr[state['abbr']] = state
by_name = {}
for state in array:
byName[state['name']] = state |
def checkstyle(name, srcs=[],
checkstyle_xml="//tools/config/src/main/resources:harness_checks.xml",):
# checkstyle_suppressions="@com_github_mihaibojin_bazel_java_rules//checkstyle:checkstyle-suppressions.xml",
# checkstyle_xpath_suppressions="@com_github_mihaibojin_bazel_java_rules//checkstyle:checkstyle-xpath-suppressions.xml",
# license_header="@com_github_mihaibojin_bazel_java_rules//checkstyle:license-header.txt"):
# """Runs Checkstyle over the specified source files.
#
# This rule runs [Checkstyle](https://github.com/checkstyle/checkstyle) on
# a given set of source files. Use `bazel build` to run the check.
#
# Args:
# name: A unique name for this rule.
# srcs: Source files to run Checkstyle against.
#
# Note that the Bazel glob() function can be used to specify which source
# files to include and which to exclude.
# license_header_file: Path to a file which holds a license header; the rule will verify
# that all source files contain it.
# visibility: The visibility of this rule.
# """
native.genrule(
name = name,
srcs = srcs,
outs = ["checkstyle.log"],
cmd = " ".join([
"java -classpath $(location @checkstyle//file)",
"-Dorg.checkstyle.google.header.file=$(location " + license_header + ")",
"-Dorg.checkstyle.google.suppressionfilter.config=$(location " + checkstyle_suppressions + ")",
"-Dorg.checkstyle.google.suppressionxpathfilter.config=$(location " + checkstyle_xpath_suppressions + ")",
"com.puppycrawl.tools.checkstyle.Main",
"-c $(location " + checkstyle_xml + ")",
"--",
"$(SRCS)",
"| tee \"$@\"",
]),
tools = [
checkstyle_xml,
"@checkstyle//file",
],
)
| def checkstyle(name, srcs=[], checkstyle_xml='//tools/config/src/main/resources:harness_checks.xml'):
native.genrule(name=name, srcs=srcs, outs=['checkstyle.log'], cmd=' '.join(['java -classpath $(location @checkstyle//file)', '-Dorg.checkstyle.google.header.file=$(location ' + license_header + ')', '-Dorg.checkstyle.google.suppressionfilter.config=$(location ' + checkstyle_suppressions + ')', '-Dorg.checkstyle.google.suppressionxpathfilter.config=$(location ' + checkstyle_xpath_suppressions + ')', 'com.puppycrawl.tools.checkstyle.Main', '-c $(location ' + checkstyle_xml + ')', '--', '$(SRCS)', '| tee "$@"']), tools=[checkstyle_xml, '@checkstyle//file']) |
class Solution:
def isPrefixOfWord(self, sentence: str, searchWord: str) -> int:
for i, w in enumerate(sentence.split(" ")):
if w.startswith(searchWord):
return i + 1
return -1
| class Solution:
def is_prefix_of_word(self, sentence: str, searchWord: str) -> int:
for (i, w) in enumerate(sentence.split(' ')):
if w.startswith(searchWord):
return i + 1
return -1 |
print(", ".join(["spam", "eggs", "ham"]))
#prints "spam, eggs, ham"
print("Hello ME".replace("ME", "world"))
#prints "Hello world"
print("This is a sentence.".startswith("This"))
# prints "True"
print("This is a sentence.".endswith("sentence."))
# prints "True"
print("This is a sentence.".upper())
# prints "THIS IS A SENTENCE."
print("AN ALL CAPS SENTENCE".lower())
#prints "an all caps sentence"
print("spam, eggs, ham".split(", "))
#prints "['spam', 'eggs', 'ham']"
| print(', '.join(['spam', 'eggs', 'ham']))
print('Hello ME'.replace('ME', 'world'))
print('This is a sentence.'.startswith('This'))
print('This is a sentence.'.endswith('sentence.'))
print('This is a sentence.'.upper())
print('AN ALL CAPS SENTENCE'.lower())
print('spam, eggs, ham'.split(', ')) |
# Write redmonster output files
#
# Tim Hutchinson, , University of Utah, April 2014
# t.hutchinson@utah.edu
#
# July 2014 - now probably defunct, replaced by redmonster.datamgr.io.py
class Output:
def __init__(self, spec=None):
if spec: self.set_filenames()
def set_filenames(self):
self.zallfile = 'spZall-%s-%s.fits' % (spec.plate, spec.mjd)
self.zbestfile = 'spZbest-%s-%s.fits' % (spec.plate, spec.mjd)
self.zlinefile = 'spZline-%s-%s.fits' % (spec.plate, spec.mjd)
self.logfile = 'spDiag1d-%s-%s.log' % (spec.plate, spec.mjd)
self.plotfile = 'spDiag1d-%s-%s.ps' % (spec.plate, spec.mjd) | class Output:
def __init__(self, spec=None):
if spec:
self.set_filenames()
def set_filenames(self):
self.zallfile = 'spZall-%s-%s.fits' % (spec.plate, spec.mjd)
self.zbestfile = 'spZbest-%s-%s.fits' % (spec.plate, spec.mjd)
self.zlinefile = 'spZline-%s-%s.fits' % (spec.plate, spec.mjd)
self.logfile = 'spDiag1d-%s-%s.log' % (spec.plate, spec.mjd)
self.plotfile = 'spDiag1d-%s-%s.ps' % (spec.plate, spec.mjd) |
class SplitterNotifier:
def __init__(self, notifiers=None):
if notifiers is None:
notifiers = []
self.notifiers = notifiers
def notify(self, notification, text, options=None):
if options is None:
options = {}
for notifier in self.notifiers:
notifier.notify(notification, text, options)
| class Splitternotifier:
def __init__(self, notifiers=None):
if notifiers is None:
notifiers = []
self.notifiers = notifiers
def notify(self, notification, text, options=None):
if options is None:
options = {}
for notifier in self.notifiers:
notifier.notify(notification, text, options) |
class Solution:
def nextPermutation(self, nums: List[int]) -> None:
"""
Do not return anything, modify nums in-place instead.
1. Find the first pos i from right such that nums[i] < nums[i+1]
2. Swap nums[i] with the smallest element larger than nums[i]
3. Sort nums[i+1:]
Edge cases:
1. If no number is found in step 1, reverse the array
2. Empty array, single element -> implicitly handled
"""
def smallestLarger(i):
target = nums[i]
left, right = i+1, len(nums)-1
ans = -1
while left <= right:
mid = left + (right-left)//2
if nums[mid] == target:
right = mid - 1
if nums[mid] > target:
ans = mid
left = mid+1
else:
right = mid-1
return ans
def reverse(begI, lastI):
while(begI<lastI):
nums[begI], nums[lastI] = nums[lastI], nums[begI]
begI += 1
lastI -= 1
for i in range(len(nums)-2, -1, -1):
if nums[i] < nums[i+1]:
x = smallestLarger(i)
nums[i], nums[x] = nums[x], nums[i]
reverse(i+1, len(nums)-1)
return
reverse(0, len(nums)-1)
| class Solution:
def next_permutation(self, nums: List[int]) -> None:
"""
Do not return anything, modify nums in-place instead.
1. Find the first pos i from right such that nums[i] < nums[i+1]
2. Swap nums[i] with the smallest element larger than nums[i]
3. Sort nums[i+1:]
Edge cases:
1. If no number is found in step 1, reverse the array
2. Empty array, single element -> implicitly handled
"""
def smallest_larger(i):
target = nums[i]
(left, right) = (i + 1, len(nums) - 1)
ans = -1
while left <= right:
mid = left + (right - left) // 2
if nums[mid] == target:
right = mid - 1
if nums[mid] > target:
ans = mid
left = mid + 1
else:
right = mid - 1
return ans
def reverse(begI, lastI):
while begI < lastI:
(nums[begI], nums[lastI]) = (nums[lastI], nums[begI])
beg_i += 1
last_i -= 1
for i in range(len(nums) - 2, -1, -1):
if nums[i] < nums[i + 1]:
x = smallest_larger(i)
(nums[i], nums[x]) = (nums[x], nums[i])
reverse(i + 1, len(nums) - 1)
return
reverse(0, len(nums) - 1) |
# -*- coding: utf-8 -*-
# Copyright 2019 Cohesity Inc.
class DiskPartition(object):
"""Implementation of the 'Disk Partition.' model.
Specifies information about each partition in a physical disk.
Attributes:
length_bytes (long|int): Specifies the length of the block in bytes.
number (long|int): Specifies a unique number of the partition within
the linear disk file.
offset_bytes (long|int): Specifies the offset of the block (in bytes)
from the beginning of the containing object such as a physical
disk or a virtual disk file.
type_uuid (string): Specifies the partition type uuid. If disk is
unpartitioned, this field is not set. If disk is MBR partitioned,
this field is set to a partition type. If disk is GPT partitioned,
this field is set to a partition type GUID.
uuid (string): Specifies the partition uuid. If disk is unpartitioned,
this field is not set. If disk is MBR partitioned, this field is
not set. If disk is GPT partitioned, this field is set to a
partition GUID.
"""
# Create a mapping from Model property names to API property names
_names = {
"length_bytes":'lengthBytes',
"number":'number',
"offset_bytes":'offsetBytes',
"type_uuid":'typeUuid',
"uuid":'uuid'
}
def __init__(self,
length_bytes=None,
number=None,
offset_bytes=None,
type_uuid=None,
uuid=None):
"""Constructor for the DiskPartition class"""
# Initialize members of the class
self.length_bytes = length_bytes
self.number = number
self.offset_bytes = offset_bytes
self.type_uuid = type_uuid
self.uuid = uuid
@classmethod
def from_dictionary(cls,
dictionary):
"""Creates an instance of this model from a dictionary
Args:
dictionary (dictionary): A dictionary representation of the object as
obtained from the deserialization of the server's response. The keys
MUST match property names in the API description.
Returns:
object: An instance of this structure class.
"""
if dictionary is None:
return None
# Extract variables from the dictionary
length_bytes = dictionary.get('lengthBytes')
number = dictionary.get('number')
offset_bytes = dictionary.get('offsetBytes')
type_uuid = dictionary.get('typeUuid')
uuid = dictionary.get('uuid')
# Return an object of this model
return cls(length_bytes,
number,
offset_bytes,
type_uuid,
uuid)
| class Diskpartition(object):
"""Implementation of the 'Disk Partition.' model.
Specifies information about each partition in a physical disk.
Attributes:
length_bytes (long|int): Specifies the length of the block in bytes.
number (long|int): Specifies a unique number of the partition within
the linear disk file.
offset_bytes (long|int): Specifies the offset of the block (in bytes)
from the beginning of the containing object such as a physical
disk or a virtual disk file.
type_uuid (string): Specifies the partition type uuid. If disk is
unpartitioned, this field is not set. If disk is MBR partitioned,
this field is set to a partition type. If disk is GPT partitioned,
this field is set to a partition type GUID.
uuid (string): Specifies the partition uuid. If disk is unpartitioned,
this field is not set. If disk is MBR partitioned, this field is
not set. If disk is GPT partitioned, this field is set to a
partition GUID.
"""
_names = {'length_bytes': 'lengthBytes', 'number': 'number', 'offset_bytes': 'offsetBytes', 'type_uuid': 'typeUuid', 'uuid': 'uuid'}
def __init__(self, length_bytes=None, number=None, offset_bytes=None, type_uuid=None, uuid=None):
"""Constructor for the DiskPartition class"""
self.length_bytes = length_bytes
self.number = number
self.offset_bytes = offset_bytes
self.type_uuid = type_uuid
self.uuid = uuid
@classmethod
def from_dictionary(cls, dictionary):
"""Creates an instance of this model from a dictionary
Args:
dictionary (dictionary): A dictionary representation of the object as
obtained from the deserialization of the server's response. The keys
MUST match property names in the API description.
Returns:
object: An instance of this structure class.
"""
if dictionary is None:
return None
length_bytes = dictionary.get('lengthBytes')
number = dictionary.get('number')
offset_bytes = dictionary.get('offsetBytes')
type_uuid = dictionary.get('typeUuid')
uuid = dictionary.get('uuid')
return cls(length_bytes, number, offset_bytes, type_uuid, uuid) |
"""
Global Tusclient exception and warning classes.
"""
class TusCommunicationError(Exception):
"""
Should be raised when communications with tus-server behaves
unexpectedly.
:Attributes:
- message (str):
Main message of the exception
- status_code (int):
Status code of response indicating an error
- response_content (str):
Content of response indicating an error
:Constructor Args:
- message (Optional[str])
- status_code (Optional[int])
- response_content (Optional[str])
"""
def __init__(self, message, status_code=None, response_content=None):
default_message = 'Communication with tus sever failed with status {}'.format(status_code)
message = message or default_message
super(TusCommunicationError, self).__init__(message)
self.status_code = status_code
self.response_content = response_content
class TusUploadFailed(TusCommunicationError):
"""Should be raised when an attempted upload fails"""
pass
| """
Global Tusclient exception and warning classes.
"""
class Tuscommunicationerror(Exception):
"""
Should be raised when communications with tus-server behaves
unexpectedly.
:Attributes:
- message (str):
Main message of the exception
- status_code (int):
Status code of response indicating an error
- response_content (str):
Content of response indicating an error
:Constructor Args:
- message (Optional[str])
- status_code (Optional[int])
- response_content (Optional[str])
"""
def __init__(self, message, status_code=None, response_content=None):
default_message = 'Communication with tus sever failed with status {}'.format(status_code)
message = message or default_message
super(TusCommunicationError, self).__init__(message)
self.status_code = status_code
self.response_content = response_content
class Tusuploadfailed(TusCommunicationError):
"""Should be raised when an attempted upload fails"""
pass |
class Solution(object):
def findUnsortedSubarray(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
if not nums or len(nums) == 0:
return 0
is_same = [a == b for a,b in zip(nums,sorted(nums))]
return 0 if all(is_same) else len(nums) - is_same[::-1].index(False) - is_same.index(False)
| class Solution(object):
def find_unsorted_subarray(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
if not nums or len(nums) == 0:
return 0
is_same = [a == b for (a, b) in zip(nums, sorted(nums))]
return 0 if all(is_same) else len(nums) - is_same[::-1].index(False) - is_same.index(False) |
x=2
def increment(number):
return number + 1
| x = 2
def increment(number):
return number + 1 |
"""**TODO**
.. autosummary::
:toctree:
Bifunctor
"""
class Bifunctor():
"""**TODO**"""
| """**TODO**
.. autosummary::
:toctree:
Bifunctor
"""
class Bifunctor:
"""**TODO**""" |
LOGIN_PHASES = [
'WaitingForAuthentication',
'WaitingForEula',
'Done',
'Disabled',
'Login',
'',
]
WAIT_FOR_LAUNCH_PHASES = [
'WaitForLaunch',
]
SUCCESS_PHASES = [
'WaitForSessionExit',
]
EULA_PHASES = [
'Eula',
]
CONSENT_REQUIRED_PHASES = [
'AgeRestriction',
]
BANNED_PHASES = [
]
ACCOUNT_ALIAS_CHANGE_PHASE = [
'AccountAlias',
]
REGION_MISSING_PHASES = [
'HomeBaseCountry',
]
| login_phases = ['WaitingForAuthentication', 'WaitingForEula', 'Done', 'Disabled', 'Login', '']
wait_for_launch_phases = ['WaitForLaunch']
success_phases = ['WaitForSessionExit']
eula_phases = ['Eula']
consent_required_phases = ['AgeRestriction']
banned_phases = []
account_alias_change_phase = ['AccountAlias']
region_missing_phases = ['HomeBaseCountry'] |
# coding=UTF-8
# ex:ts=4:sw=4:et=on
# -------------------------------------------------------------------------
# Copyright (C) 2014 by Mathijs Dumon <mathijs dot dumon at gmail dot com>
#
# mvc is a framework derived from the original pygtkmvc framework
# hosted at: <http://sourceforge.net/projects/pygtkmvc/>
#
# mvc is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# mvc is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110, USA.
# -------------------------------------------------------------------------
class ObserveMixin(object):
"""
A descriptor mixin that will make the instance observe and relieve the
objects set.
"""
def __relieve_old(self, instance, old, new):
if old is not None:
instance.relieve_model(old)
def __observe_new(self, instance, old, new):
if new is not None:
instance.observe_model(new)
def _set(self, instance, value):
old = getattr(instance, self.label)
if old != value:
self.__relieve_old(instance, old, value)
super(ObserveMixin, self)._set(instance, value)
self.__observe_new(instance, old, value)
pass
| class Observemixin(object):
"""
A descriptor mixin that will make the instance observe and relieve the
objects set.
"""
def __relieve_old(self, instance, old, new):
if old is not None:
instance.relieve_model(old)
def __observe_new(self, instance, old, new):
if new is not None:
instance.observe_model(new)
def _set(self, instance, value):
old = getattr(instance, self.label)
if old != value:
self.__relieve_old(instance, old, value)
super(ObserveMixin, self)._set(instance, value)
self.__observe_new(instance, old, value)
pass |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
'''
Class Parser parses clingo output
'''
class Parser:
next_line_facts = False
def process_facts(self, facts):
facts = facts.split(" ")
facts.sort()
return facts
def process_line(self, line, model):
line = line.replace("\n", "")
if "reading" in line.lower():
return model
elif "answer" in line.lower():
model['name'] = line
self.next_line_facts = True
elif self.next_line_facts == True:
self.next_line_facts = False
model['facts'] = self.process_facts(line)
elif "optimization" in line.lower():
model['optimization'] = line
elif "UNSATISFIABLE" in line:
raise ValueError()
return model
def process(self, lines):
output = {"optimum":False, "models": []}
clean = []
model = {}
capture = False
for line in lines:
model = self.process_line(line, model)
if line == "\n":
break
elif line == "OPTIMUM FOUND\n":
output['optimum'] = True
elif model.get("optimization"):
clean.append(model)
model = {}
output['models'] = clean
return output
def print_model(self, model):
print(model.get("name"))
for fact in model.get("facts"):
print(fact)
print()
'''
'''
def process_file(self,file_path,answers=1):
'''
DRIVER CODE
'''
try:
with open(file_path) as f:
processed = []
content = f.readlines()
parsed = self.process(content)
models = parsed.get('models')
answers_found = len(models)
for model in models[answers_found-int(answers):]:
self.print_model(model)
except ValueError:
# unsatisfiable
print(''.join(content))
except FileNotFoundError:
print("File {name} not found".format(name=file_path))
| """
Class Parser parses clingo output
"""
class Parser:
next_line_facts = False
def process_facts(self, facts):
facts = facts.split(' ')
facts.sort()
return facts
def process_line(self, line, model):
line = line.replace('\n', '')
if 'reading' in line.lower():
return model
elif 'answer' in line.lower():
model['name'] = line
self.next_line_facts = True
elif self.next_line_facts == True:
self.next_line_facts = False
model['facts'] = self.process_facts(line)
elif 'optimization' in line.lower():
model['optimization'] = line
elif 'UNSATISFIABLE' in line:
raise value_error()
return model
def process(self, lines):
output = {'optimum': False, 'models': []}
clean = []
model = {}
capture = False
for line in lines:
model = self.process_line(line, model)
if line == '\n':
break
elif line == 'OPTIMUM FOUND\n':
output['optimum'] = True
elif model.get('optimization'):
clean.append(model)
model = {}
output['models'] = clean
return output
def print_model(self, model):
print(model.get('name'))
for fact in model.get('facts'):
print(fact)
print()
'\n '
def process_file(self, file_path, answers=1):
"""
DRIVER CODE
"""
try:
with open(file_path) as f:
processed = []
content = f.readlines()
parsed = self.process(content)
models = parsed.get('models')
answers_found = len(models)
for model in models[answers_found - int(answers):]:
self.print_model(model)
except ValueError:
print(''.join(content))
except FileNotFoundError:
print('File {name} not found'.format(name=file_path)) |
def turn_right():
turn_left()
turn_left()
turn_left()
def jump():
move()
turn_left()
move()
turn_right()
move()
turn_right()
move()
turn_left()
while not at_goal():
jump()
| def turn_right():
turn_left()
turn_left()
turn_left()
def jump():
move()
turn_left()
move()
turn_right()
move()
turn_right()
move()
turn_left()
while not at_goal():
jump() |
# parsetab.py
# This file is automatically generated. Do not edit.
# pylint: disable=W,C,R
_tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'leftANDORleftPLUSMINUSleftTIMESDIVIDErightUMINUSleftLPARENRPARENAND DIVIDE FLOAT GE GT ID IE IN LE LIST LPAREN LT MINUS NE NONE NOT NUMBER OR PLUS RPAREN STR TIMES\n expr : expr PLUS expr\n | expr MINUS expr\n | expr TIMES expr\n | expr DIVIDE expr\n \n expr : expr GT expr\n | expr GE expr\n | expr IE expr\n | expr LE expr\n | expr LT expr\n | expr NE expr\n \n expr : expr OR expr\n | expr AND expr\n | NOT expr\n | expr IN expr\n \n expr : list\n \n list : LIST\n \n expr : num\n \n num : NUMBER\n \n expr : float\n \n float : FLOAT\n \n expr : str\n \n str : STR\n \n expr : none\n \n none : NONE\n \n expr : LPAREN expr RPAREN\n \n expr : MINUS expr %prec UMINUS\n '
_lr_action_items = {'NOT':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,]),'LPAREN':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,]),'MINUS':([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[2,16,2,2,-15,-17,-19,-21,-23,2,-16,-18,-20,-22,-24,2,2,2,2,2,2,2,2,2,2,2,2,2,-26,16,16,-1,-2,-3,-4,16,16,16,16,16,16,16,16,16,-25,]),'LIST':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,]),'NUMBER':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,]),'FLOAT':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,]),'STR':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,]),'NONE':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,]),'$end':([1,4,5,6,7,8,10,11,12,13,14,28,29,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[0,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,-13,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-14,-25,]),'PLUS':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[15,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,15,15,-1,-2,-3,-4,15,15,15,15,15,15,15,15,15,-25,]),'TIMES':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[17,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,17,17,17,17,-3,-4,17,17,17,17,17,17,17,17,17,-25,]),'DIVIDE':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[18,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,18,18,18,18,-3,-4,18,18,18,18,18,18,18,18,18,-25,]),'GT':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[19,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,19,19,-1,-2,-3,-4,19,19,19,19,19,19,-11,-12,19,-25,]),'GE':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[20,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,20,20,-1,-2,-3,-4,20,20,20,20,20,20,-11,-12,20,-25,]),'IE':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[21,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,21,21,-1,-2,-3,-4,21,21,21,21,21,21,-11,-12,21,-25,]),'LE':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[22,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,22,22,-1,-2,-3,-4,22,22,22,22,22,22,-11,-12,22,-25,]),'LT':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[23,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,23,23,-1,-2,-3,-4,23,23,23,23,23,23,-11,-12,23,-25,]),'NE':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[24,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,24,24,-1,-2,-3,-4,24,24,24,24,24,24,-11,-12,24,-25,]),'OR':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[25,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,25,25,-1,-2,-3,-4,25,25,25,25,25,25,-11,-12,25,-25,]),'AND':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[26,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,26,26,-1,-2,-3,-4,26,26,26,26,26,26,-11,-12,26,-25,]),'IN':([1,4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[27,-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,27,27,-1,-2,-3,-4,27,27,27,27,27,27,-11,-12,27,-25,]),'RPAREN':([4,5,6,7,8,10,11,12,13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,],[-15,-17,-19,-21,-23,-16,-18,-20,-22,-24,-26,-13,44,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-14,-25,]),}
_lr_action = {}
for _k, _v in _lr_action_items.items():
for _x,_y in zip(_v[0],_v[1]):
if not _x in _lr_action: _lr_action[_x] = {}
_lr_action[_x][_k] = _y
del _lr_action_items
_lr_goto_items = {'expr':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[1,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,]),'list':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,]),'num':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,]),'float':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,]),'str':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,]),'none':([0,2,3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,],[8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,]),}
_lr_goto = {}
for _k, _v in _lr_goto_items.items():
for _x, _y in zip(_v[0], _v[1]):
if not _x in _lr_goto: _lr_goto[_x] = {}
_lr_goto[_x][_k] = _y
del _lr_goto_items
_lr_productions = [
("S' -> expr","S'",1,None,None,None),
('expr -> expr PLUS expr','expr',3,'p_expr','demo.py',94),
('expr -> expr MINUS expr','expr',3,'p_expr','demo.py',95),
('expr -> expr TIMES expr','expr',3,'p_expr','demo.py',96),
('expr -> expr DIVIDE expr','expr',3,'p_expr','demo.py',97),
('expr -> expr GT expr','expr',3,'p_compare','demo.py',111),
('expr -> expr GE expr','expr',3,'p_compare','demo.py',112),
('expr -> expr IE expr','expr',3,'p_compare','demo.py',113),
('expr -> expr LE expr','expr',3,'p_compare','demo.py',114),
('expr -> expr LT expr','expr',3,'p_compare','demo.py',115),
('expr -> expr NE expr','expr',3,'p_compare','demo.py',116),
('expr -> expr OR expr','expr',3,'p_logic','demo.py',133),
('expr -> expr AND expr','expr',3,'p_logic','demo.py',134),
('expr -> NOT expr','expr',2,'p_logic','demo.py',135),
('expr -> expr IN expr','expr',3,'p_logic','demo.py',136),
('expr -> list','expr',1,'p_expr_list','demo.py',150),
('list -> LIST','list',1,'p_list','demo.py',157),
('expr -> num','expr',1,'p_expr_num','demo.py',163),
('num -> NUMBER','num',1,'p_num','demo.py',170),
('expr -> float','expr',1,'p_expr_float','demo.py',176),
('float -> FLOAT','float',1,'p_float','demo.py',183),
('expr -> str','expr',1,'p_expr_str','demo.py',190),
('str -> STR','str',1,'p_str','demo.py',197),
('expr -> none','expr',1,'p_expr_none','demo.py',203),
('none -> NONE','none',1,'p_none','demo.py',209),
('expr -> LPAREN expr RPAREN','expr',3,'p_group','demo.py',215),
('expr -> MINUS expr','expr',2,'p_expr_uminus','demo.py',221),
]
| _tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'leftANDORleftPLUSMINUSleftTIMESDIVIDErightUMINUSleftLPARENRPARENAND DIVIDE FLOAT GE GT ID IE IN LE LIST LPAREN LT MINUS NE NONE NOT NUMBER OR PLUS RPAREN STR TIMES\n expr : expr PLUS expr\n | expr MINUS expr\n | expr TIMES expr\n | expr DIVIDE expr\n \n expr : expr GT expr\n | expr GE expr\n | expr IE expr\n | expr LE expr\n | expr LT expr\n | expr NE expr\n \n expr : expr OR expr\n | expr AND expr\n | NOT expr\n | expr IN expr\n \n expr : list\n \n list : LIST\n \n expr : num\n \n num : NUMBER\n \n expr : float\n \n float : FLOAT\n \n expr : str\n \n str : STR\n \n expr : none\n \n none : NONE\n \n expr : LPAREN expr RPAREN\n \n expr : MINUS expr %prec UMINUS\n '
_lr_action_items = {'NOT': ([0, 2, 3, 9, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]), 'LPAREN': ([0, 2, 3, 9, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27], [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]), 'MINUS': ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], [2, 16, 2, 2, -15, -17, -19, -21, -23, 2, -16, -18, -20, -22, -24, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -26, 16, 16, -1, -2, -3, -4, 16, 16, 16, 16, 16, 16, 16, 16, 16, -25]), 'LIST': ([0, 2, 3, 9, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27], [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]), 'NUMBER': ([0, 2, 3, 9, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11]), 'FLOAT': ([0, 2, 3, 9, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27], [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12]), 'STR': ([0, 2, 3, 9, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27], [13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13]), 'NONE': ([0, 2, 3, 9, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27], [14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14]), '$end': ([1, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], [0, -15, -17, -19, -21, -23, -16, -18, -20, -22, -24, -26, -13, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -14, -25]), 'PLUS': ([1, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], [15, -15, -17, -19, -21, -23, -16, -18, -20, -22, -24, -26, 15, 15, -1, -2, -3, -4, 15, 15, 15, 15, 15, 15, 15, 15, 15, -25]), 'TIMES': ([1, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], [17, -15, -17, -19, -21, -23, -16, -18, -20, -22, -24, -26, 17, 17, 17, 17, -3, -4, 17, 17, 17, 17, 17, 17, 17, 17, 17, -25]), 'DIVIDE': ([1, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], [18, -15, -17, -19, -21, -23, -16, -18, -20, -22, -24, -26, 18, 18, 18, 18, -3, -4, 18, 18, 18, 18, 18, 18, 18, 18, 18, -25]), 'GT': ([1, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], [19, -15, -17, -19, -21, -23, -16, -18, -20, -22, -24, -26, 19, 19, -1, -2, -3, -4, 19, 19, 19, 19, 19, 19, -11, -12, 19, -25]), 'GE': ([1, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], [20, -15, -17, -19, -21, -23, -16, -18, -20, -22, -24, -26, 20, 20, -1, -2, -3, -4, 20, 20, 20, 20, 20, 20, -11, -12, 20, -25]), 'IE': ([1, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], [21, -15, -17, -19, -21, -23, -16, -18, -20, -22, -24, -26, 21, 21, -1, -2, -3, -4, 21, 21, 21, 21, 21, 21, -11, -12, 21, -25]), 'LE': ([1, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], [22, -15, -17, -19, -21, -23, -16, -18, -20, -22, -24, -26, 22, 22, -1, -2, -3, -4, 22, 22, 22, 22, 22, 22, -11, -12, 22, -25]), 'LT': ([1, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], [23, -15, -17, -19, -21, -23, -16, -18, -20, -22, -24, -26, 23, 23, -1, -2, -3, -4, 23, 23, 23, 23, 23, 23, -11, -12, 23, -25]), 'NE': ([1, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], [24, -15, -17, -19, -21, -23, -16, -18, -20, -22, -24, -26, 24, 24, -1, -2, -3, -4, 24, 24, 24, 24, 24, 24, -11, -12, 24, -25]), 'OR': ([1, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], [25, -15, -17, -19, -21, -23, -16, -18, -20, -22, -24, -26, 25, 25, -1, -2, -3, -4, 25, 25, 25, 25, 25, 25, -11, -12, 25, -25]), 'AND': ([1, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], [26, -15, -17, -19, -21, -23, -16, -18, -20, -22, -24, -26, 26, 26, -1, -2, -3, -4, 26, 26, 26, 26, 26, 26, -11, -12, 26, -25]), 'IN': ([1, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], [27, -15, -17, -19, -21, -23, -16, -18, -20, -22, -24, -26, 27, 27, -1, -2, -3, -4, 27, 27, 27, 27, 27, 27, -11, -12, 27, -25]), 'RPAREN': ([4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], [-15, -17, -19, -21, -23, -16, -18, -20, -22, -24, -26, -13, 44, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -14, -25])}
_lr_action = {}
for (_k, _v) in _lr_action_items.items():
for (_x, _y) in zip(_v[0], _v[1]):
if not _x in _lr_action:
_lr_action[_x] = {}
_lr_action[_x][_k] = _y
del _lr_action_items
_lr_goto_items = {'expr': ([0, 2, 3, 9, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27], [1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43]), 'list': ([0, 2, 3, 9, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4]), 'num': ([0, 2, 3, 9, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]), 'float': ([0, 2, 3, 9, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6]), 'str': ([0, 2, 3, 9, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]), 'none': ([0, 2, 3, 9, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27], [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8])}
_lr_goto = {}
for (_k, _v) in _lr_goto_items.items():
for (_x, _y) in zip(_v[0], _v[1]):
if not _x in _lr_goto:
_lr_goto[_x] = {}
_lr_goto[_x][_k] = _y
del _lr_goto_items
_lr_productions = [("S' -> expr", "S'", 1, None, None, None), ('expr -> expr PLUS expr', 'expr', 3, 'p_expr', 'demo.py', 94), ('expr -> expr MINUS expr', 'expr', 3, 'p_expr', 'demo.py', 95), ('expr -> expr TIMES expr', 'expr', 3, 'p_expr', 'demo.py', 96), ('expr -> expr DIVIDE expr', 'expr', 3, 'p_expr', 'demo.py', 97), ('expr -> expr GT expr', 'expr', 3, 'p_compare', 'demo.py', 111), ('expr -> expr GE expr', 'expr', 3, 'p_compare', 'demo.py', 112), ('expr -> expr IE expr', 'expr', 3, 'p_compare', 'demo.py', 113), ('expr -> expr LE expr', 'expr', 3, 'p_compare', 'demo.py', 114), ('expr -> expr LT expr', 'expr', 3, 'p_compare', 'demo.py', 115), ('expr -> expr NE expr', 'expr', 3, 'p_compare', 'demo.py', 116), ('expr -> expr OR expr', 'expr', 3, 'p_logic', 'demo.py', 133), ('expr -> expr AND expr', 'expr', 3, 'p_logic', 'demo.py', 134), ('expr -> NOT expr', 'expr', 2, 'p_logic', 'demo.py', 135), ('expr -> expr IN expr', 'expr', 3, 'p_logic', 'demo.py', 136), ('expr -> list', 'expr', 1, 'p_expr_list', 'demo.py', 150), ('list -> LIST', 'list', 1, 'p_list', 'demo.py', 157), ('expr -> num', 'expr', 1, 'p_expr_num', 'demo.py', 163), ('num -> NUMBER', 'num', 1, 'p_num', 'demo.py', 170), ('expr -> float', 'expr', 1, 'p_expr_float', 'demo.py', 176), ('float -> FLOAT', 'float', 1, 'p_float', 'demo.py', 183), ('expr -> str', 'expr', 1, 'p_expr_str', 'demo.py', 190), ('str -> STR', 'str', 1, 'p_str', 'demo.py', 197), ('expr -> none', 'expr', 1, 'p_expr_none', 'demo.py', 203), ('none -> NONE', 'none', 1, 'p_none', 'demo.py', 209), ('expr -> LPAREN expr RPAREN', 'expr', 3, 'p_group', 'demo.py', 215), ('expr -> MINUS expr', 'expr', 2, 'p_expr_uminus', 'demo.py', 221)] |
DEFINITIONS={
"cc_clone_detection_big_clone_bench": {
"class_name": "CodeXGlueCCCloneDetectionBigCloneBench",
"data_dir_name": "dataset",
"dataset_type": "Code-Code",
"description": "CodeXGLUE Clone-detection-BigCloneBench dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/Clone-detection-BigCloneBench",
"dir_name": "Clone-detection-BigCloneBench",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/Clone-detection-BigCloneBench/dataset/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/Clone-detection-BigCloneBench/dataset/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/Clone-detection-BigCloneBench/dataset/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/Clone-detection-BigCloneBench/dataset/data.jsonl"
],
"name": "cc_clone_detection_big_clone_bench",
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/Clone-detection-BigCloneBench",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/Clone-detection-BigCloneBench/dataset"
},
"cc_clone_detection_poj_104": {
"class_name": "CodeXGlueCCCloneDetectionPOJ104",
"data_dir_name": "dataset",
"dataset_type": "Code-Code",
"description": "CodeXGLUE Clone-detection-POJ-104 dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/Clone-detection-POJ-104",
"dir_name": "Clone-detection-POJ-104",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/Clone-detection-POJ-104/dataset/programs.tar.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/Clone-detection-POJ-104/dataset/preprocess.py"
],
"name": "cc_clone_detection_poj_104",
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/Clone-detection-POJ-104",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/Clone-detection-POJ-104/dataset"
},
"cc_cloze_testing_all_go": {
"class_name": "CodeXGlueCCClozeTestingAll",
"data_dir_name": "data/cloze-all/go",
"dataset_type": "Code-Code",
"description": "CodeXGLUE ClozeTesting-all dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all",
"dir_name": "ClozeTesting-all",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-all/data/cloze-all/go/clozeTest.json"
],
"name": "cc_cloze_testing_all",
"parameters": {
"language": "go"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-all/data/cloze-all/go"
},
"cc_cloze_testing_all_java": {
"class_name": "CodeXGlueCCClozeTestingAll",
"data_dir_name": "data/cloze-all/java",
"dataset_type": "Code-Code",
"description": "CodeXGLUE ClozeTesting-all dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all",
"dir_name": "ClozeTesting-all",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-all/data/cloze-all/java/clozeTest.json"
],
"name": "cc_cloze_testing_all",
"parameters": {
"language": "java"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-all/data/cloze-all/java"
},
"cc_cloze_testing_all_javascript": {
"class_name": "CodeXGlueCCClozeTestingAll",
"data_dir_name": "data/cloze-all/javascript",
"dataset_type": "Code-Code",
"description": "CodeXGLUE ClozeTesting-all dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all",
"dir_name": "ClozeTesting-all",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-all/data/cloze-all/javascript/clozeTest.json"
],
"name": "cc_cloze_testing_all",
"parameters": {
"language": "javascript"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-all/data/cloze-all/javascript"
},
"cc_cloze_testing_all_php": {
"class_name": "CodeXGlueCCClozeTestingAll",
"data_dir_name": "data/cloze-all/php",
"dataset_type": "Code-Code",
"description": "CodeXGLUE ClozeTesting-all dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all",
"dir_name": "ClozeTesting-all",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-all/data/cloze-all/php/clozeTest.json"
],
"name": "cc_cloze_testing_all",
"parameters": {
"language": "php"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-all/data/cloze-all/php"
},
"cc_cloze_testing_all_python": {
"class_name": "CodeXGlueCCClozeTestingAll",
"data_dir_name": "data/cloze-all/python",
"dataset_type": "Code-Code",
"description": "CodeXGLUE ClozeTesting-all dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all",
"dir_name": "ClozeTesting-all",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-all/data/cloze-all/python/clozeTest.json"
],
"name": "cc_cloze_testing_all",
"parameters": {
"language": "python"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-all/data/cloze-all/python"
},
"cc_cloze_testing_all_ruby": {
"class_name": "CodeXGlueCCClozeTestingAll",
"data_dir_name": "data/cloze-all/ruby",
"dataset_type": "Code-Code",
"description": "CodeXGLUE ClozeTesting-all dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all",
"dir_name": "ClozeTesting-all",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-all/data/cloze-all/ruby/clozeTest.json"
],
"name": "cc_cloze_testing_all",
"parameters": {
"language": "ruby"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-all/data/cloze-all/ruby"
},
"cc_cloze_testing_maxmin_go": {
"class_name": "CodeXGlueCCClozeTestingMaxmin",
"data_dir_name": "data/cloze-maxmin/go",
"dataset_type": "Code-Code",
"description": "CodeXGLUE ClozeTesting-maxmin dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin",
"dir_name": "ClozeTesting-maxmin",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/go/clozeTest.json"
],
"name": "cc_cloze_testing_maxmin",
"parameters": {
"language": "go"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/go"
},
"cc_cloze_testing_maxmin_java": {
"class_name": "CodeXGlueCCClozeTestingMaxmin",
"data_dir_name": "data/cloze-maxmin/java",
"dataset_type": "Code-Code",
"description": "CodeXGLUE ClozeTesting-maxmin dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin",
"dir_name": "ClozeTesting-maxmin",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/java/clozeTest.json"
],
"name": "cc_cloze_testing_maxmin",
"parameters": {
"language": "java"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/java"
},
"cc_cloze_testing_maxmin_javascript": {
"class_name": "CodeXGlueCCClozeTestingMaxmin",
"data_dir_name": "data/cloze-maxmin/javascript",
"dataset_type": "Code-Code",
"description": "CodeXGLUE ClozeTesting-maxmin dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin",
"dir_name": "ClozeTesting-maxmin",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/javascript/clozeTest.json"
],
"name": "cc_cloze_testing_maxmin",
"parameters": {
"language": "javascript"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/javascript"
},
"cc_cloze_testing_maxmin_php": {
"class_name": "CodeXGlueCCClozeTestingMaxmin",
"data_dir_name": "data/cloze-maxmin/php",
"dataset_type": "Code-Code",
"description": "CodeXGLUE ClozeTesting-maxmin dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin",
"dir_name": "ClozeTesting-maxmin",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/php/clozeTest.json"
],
"name": "cc_cloze_testing_maxmin",
"parameters": {
"language": "php"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/php"
},
"cc_cloze_testing_maxmin_python": {
"class_name": "CodeXGlueCCClozeTestingMaxmin",
"data_dir_name": "data/cloze-maxmin/python",
"dataset_type": "Code-Code",
"description": "CodeXGLUE ClozeTesting-maxmin dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin",
"dir_name": "ClozeTesting-maxmin",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/python/clozeTest.json"
],
"name": "cc_cloze_testing_maxmin",
"parameters": {
"language": "python"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/python"
},
"cc_cloze_testing_maxmin_ruby": {
"class_name": "CodeXGlueCCClozeTestingMaxmin",
"data_dir_name": "data/cloze-maxmin/ruby",
"dataset_type": "Code-Code",
"description": "CodeXGLUE ClozeTesting-maxmin dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin",
"dir_name": "ClozeTesting-maxmin",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/ruby/clozeTest.json"
],
"name": "cc_cloze_testing_maxmin",
"parameters": {
"language": "ruby"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/ruby"
},
"cc_code_completion_line_java": {
"class_name": "CodeXGlueCCCodeCompletionLine",
"data_dir_name": "dataset/javaCorpus/line_completion",
"dataset_type": "Code-Code",
"description": "CodeXGLUE CodeCompletion-line dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/CodeCompletion-line",
"dir_name": "CodeCompletion-line",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/CodeCompletion-line/dataset/javaCorpus/line_completion/test.json"
],
"name": "cc_code_completion_line",
"parameters": {
"language": "java",
"original_language_name": "javaCorpus"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/CodeCompletion-line",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/CodeCompletion-line/dataset/javaCorpus/line_completion"
},
"cc_code_completion_line_python": {
"class_name": "CodeXGlueCCCodeCompletionLine",
"data_dir_name": "dataset/py150/line_completion",
"dataset_type": "Code-Code",
"description": "CodeXGLUE CodeCompletion-line dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/CodeCompletion-line",
"dir_name": "CodeCompletion-line",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/CodeCompletion-line/dataset/py150/line_completion/test.json"
],
"name": "cc_code_completion_line",
"parameters": {
"language": "python",
"original_language_name": "py150"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/CodeCompletion-line",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/CodeCompletion-line/dataset/py150/line_completion"
},
"cc_code_completion_token_java": {
"class_name": "CodeXGlueCCCodeCompletionTokenJava",
"data_dir_name": "dataset/javaCorpus",
"dataset_type": "Code-Code",
"description": "CodeXGLUE CodeCompletion-token dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/CodeCompletion-token",
"dir_name": "CodeCompletion-token",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/CodeCompletion-token/dataset/javaCorpus/preprocess.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/CodeCompletion-token/dataset/javaCorpus/download.sh"
],
"name": "cc_code_completion_token",
"parameters": {
"language": "java",
"original_language_name": "javaCorpus"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/CodeCompletion-token",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/CodeCompletion-token/dataset/javaCorpus"
},
"cc_code_completion_token_python": {
"class_name": "CodeXGlueCCCodeCompletionTokenPython",
"data_dir_name": "dataset/py150",
"dataset_type": "Code-Code",
"description": "CodeXGLUE CodeCompletion-token dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/CodeCompletion-token",
"dir_name": "CodeCompletion-token",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/CodeCompletion-token/dataset/py150/preprocess.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/CodeCompletion-token/dataset/py150/download_and_extract.sh"
],
"name": "cc_code_completion_token",
"parameters": {
"language": "python",
"original_language_name": "py150"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/CodeCompletion-token",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/CodeCompletion-token/dataset/py150"
},
"cc_code_refinement_medium": {
"class_name": "CodeXGlueCCCodeRefinement",
"data_dir_name": "data",
"dataset_type": "Code-Code",
"description": "CodeXGLUE code-refinement dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/code-refinement",
"dir_name": "code-refinement",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/train.buggy-fixed.buggy",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/test.buggy-fixed.fixed",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/train.buggy-fixed.fixed",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/test.buggy-fixed.buggy",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/valid.buggy-fixed.buggy",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/valid.buggy-fixed.fixed",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/train.buggy-fixed.buggy",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/test.buggy-fixed.fixed",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/train.buggy-fixed.fixed",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/test.buggy-fixed.buggy",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/valid.buggy-fixed.buggy",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/valid.buggy-fixed.fixed"
],
"name": "cc_code_refinement",
"parameters": {
"size": "medium"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/code-refinement",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/code-refinement/data"
},
"cc_code_refinement_small": {
"class_name": "CodeXGlueCCCodeRefinement",
"data_dir_name": "data",
"dataset_type": "Code-Code",
"description": "CodeXGLUE code-refinement dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/code-refinement",
"dir_name": "code-refinement",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/train.buggy-fixed.buggy",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/test.buggy-fixed.fixed",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/train.buggy-fixed.fixed",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/test.buggy-fixed.buggy",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/valid.buggy-fixed.buggy",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/valid.buggy-fixed.fixed",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/train.buggy-fixed.buggy",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/test.buggy-fixed.fixed",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/train.buggy-fixed.fixed",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/test.buggy-fixed.buggy",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/valid.buggy-fixed.buggy",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/valid.buggy-fixed.fixed"
],
"name": "cc_code_refinement",
"parameters": {
"size": "small"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/code-refinement",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/code-refinement/data"
},
"cc_code_to_code_trans": {
"class_name": "CodeXGlueCCCodeToCodeTrans",
"data_dir_name": "data",
"dataset_type": "Code-Code",
"description": "CodeXGLUE code-to-code-trans dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/code-to-code-trans",
"dir_name": "code-to-code-trans",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-to-code-trans/data/train.java-cs.txt.java",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-to-code-trans/data/train.java-cs.txt.cs",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-to-code-trans/data/test.java-cs.txt.java",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-to-code-trans/data/valid.java-cs.txt.java",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-to-code-trans/data/test.java-cs.txt.cs",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-to-code-trans/data/valid.java-cs.txt.cs"
],
"name": "cc_code_to_code_trans",
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/code-to-code-trans",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/code-to-code-trans/data"
},
"cc_defect_detection": {
"class_name": "CodeXGlueCCDefectDetection",
"data_dir_name": "dataset",
"dataset_type": "Code-Code",
"description": "CodeXGLUE Defect-detection dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/Defect-detection",
"dir_name": "Defect-detection",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/Defect-detection/dataset/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/Defect-detection/dataset/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/Defect-detection/dataset/preprocess.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/Defect-detection/dataset/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/Defect-detection/dataset/function.json"
],
"name": "cc_defect_detection",
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/Defect-detection",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/Defect-detection/dataset"
},
"ct_code_to_text_go": {
"class_name": "CodeXGlueCTCodeToText",
"data_dir_name": ".",
"dataset_type": "Code-Text",
"description": "CodeXGLUE code-to-text dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Text/code-to-text",
"dir_name": "code-to-text",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/README.md",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset.zip",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/evaluator.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/reference.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/predictions.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python.zip",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_dedupe_definitions_v2.pkl",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/preprocess.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_licenses.pkl",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/test/python_test_0.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/valid/python_valid_0.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_7.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_10.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_1.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_9.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_4.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_8.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_3.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_13.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_6.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_0.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_12.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_11.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_2.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_5.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/bleu.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/model.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/run.py"
],
"name": "ct_code_to_text",
"parameters": {
"language": "go"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Text/code-to-text",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Text/code-to-text"
},
"ct_code_to_text_java": {
"class_name": "CodeXGlueCTCodeToText",
"data_dir_name": ".",
"dataset_type": "Code-Text",
"description": "CodeXGLUE code-to-text dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Text/code-to-text",
"dir_name": "code-to-text",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/README.md",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset.zip",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/evaluator.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/reference.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/predictions.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python.zip",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_dedupe_definitions_v2.pkl",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/preprocess.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_licenses.pkl",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/test/python_test_0.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/valid/python_valid_0.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_7.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_10.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_1.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_9.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_4.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_8.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_3.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_13.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_6.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_0.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_12.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_11.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_2.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_5.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/bleu.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/model.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/run.py"
],
"name": "ct_code_to_text",
"parameters": {
"language": "java"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Text/code-to-text",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Text/code-to-text"
},
"ct_code_to_text_javascript": {
"class_name": "CodeXGlueCTCodeToText",
"data_dir_name": ".",
"dataset_type": "Code-Text",
"description": "CodeXGLUE code-to-text dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Text/code-to-text",
"dir_name": "code-to-text",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/README.md",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset.zip",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/evaluator.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/reference.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/predictions.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python.zip",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_dedupe_definitions_v2.pkl",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/preprocess.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_licenses.pkl",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/test/python_test_0.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/valid/python_valid_0.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_7.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_10.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_1.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_9.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_4.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_8.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_3.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_13.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_6.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_0.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_12.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_11.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_2.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_5.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/bleu.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/model.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/run.py"
],
"name": "ct_code_to_text",
"parameters": {
"language": "javascript"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Text/code-to-text",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Text/code-to-text"
},
"ct_code_to_text_php": {
"class_name": "CodeXGlueCTCodeToText",
"data_dir_name": ".",
"dataset_type": "Code-Text",
"description": "CodeXGLUE code-to-text dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Text/code-to-text",
"dir_name": "code-to-text",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/README.md",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset.zip",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/evaluator.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/reference.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/predictions.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python.zip",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_dedupe_definitions_v2.pkl",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/preprocess.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_licenses.pkl",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/test/python_test_0.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/valid/python_valid_0.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_7.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_10.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_1.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_9.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_4.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_8.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_3.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_13.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_6.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_0.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_12.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_11.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_2.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_5.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/bleu.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/model.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/run.py"
],
"name": "ct_code_to_text",
"parameters": {
"language": "php"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Text/code-to-text",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Text/code-to-text"
},
"ct_code_to_text_python": {
"class_name": "CodeXGlueCTCodeToText",
"data_dir_name": ".",
"dataset_type": "Code-Text",
"description": "CodeXGLUE code-to-text dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Text/code-to-text",
"dir_name": "code-to-text",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/README.md",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset.zip",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/evaluator.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/reference.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/predictions.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python.zip",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_dedupe_definitions_v2.pkl",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/preprocess.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_licenses.pkl",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/test/python_test_0.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/valid/python_valid_0.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_7.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_10.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_1.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_9.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_4.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_8.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_3.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_13.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_6.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_0.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_12.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_11.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_2.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_5.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/bleu.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/model.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/run.py"
],
"name": "ct_code_to_text",
"parameters": {
"language": "python"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Text/code-to-text",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Text/code-to-text"
},
"ct_code_to_text_ruby": {
"class_name": "CodeXGlueCTCodeToText",
"data_dir_name": ".",
"dataset_type": "Code-Text",
"description": "CodeXGLUE code-to-text dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Text/code-to-text",
"dir_name": "code-to-text",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/README.md",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset.zip",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/evaluator.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/reference.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/predictions.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python.zip",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_dedupe_definitions_v2.pkl",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/preprocess.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_licenses.pkl",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/test/python_test_0.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/valid/python_valid_0.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_7.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_10.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_1.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_9.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_4.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_8.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_3.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_13.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_6.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_0.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_12.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_11.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_2.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_5.jsonl.gz",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/test.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/bleu.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/model.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/run.py"
],
"name": "ct_code_to_text",
"parameters": {
"language": "ruby"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Text/code-to-text",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Text/code-to-text"
},
"tc_nl_code_search_adv": {
"class_name": "CodeXGlueTCNLCodeSearchAdv",
"data_dir_name": ".",
"dataset_type": "Text-Code",
"description": "CodeXGLUE NL-code-search-Adv dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Text-Code/NL-code-search-Adv",
"dir_name": "NL-code-search-Adv",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/NL-code-search-Adv/README.md",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/NL-code-search-Adv/dataset.zip",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/NL-code-search-Adv/evaluator/test.jsonl",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/NL-code-search-Adv/evaluator/evaluator.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/NL-code-search-Adv/evaluator/predictions.jsonl",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/NL-code-search-Adv/code/model.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/NL-code-search-Adv/code/run.py"
],
"name": "tc_nl_code_search_adv",
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Text-Code/NL-code-search-Adv",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Text-Code/NL-code-search-Adv"
},
"tc_nl_code_search_web_query": {
"class_name": "CodeXGlueTCNLCodeSearchWebQuery",
"data_dir_name": "data",
"dataset_type": "Text-Code",
"description": "CodeXGLUE NL-code-search-WebQuery dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Text-Code/NL-code-search-WebQuery",
"dir_name": "NL-code-search-WebQuery",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/NL-code-search-WebQuery/data/valid.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/NL-code-search-WebQuery/data/preprocess.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/NL-code-search-WebQuery/data/train.txt",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/NL-code-search-WebQuery/data/test_webquery.json"
],
"name": "tc_nl_code_search_web_query",
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Text-Code/NL-code-search-WebQuery",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Text-Code/NL-code-search-WebQuery/data"
},
"tc_text_to_code": {
"class_name": "CodeXGlueTCTextToCode",
"data_dir_name": "dataset",
"dataset_type": "Text-Code",
"description": "CodeXGLUE text-to-code dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Text-Code/text-to-code",
"dir_name": "text-to-code",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/text-to-code/dataset/concode/train.json",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/text-to-code/dataset/concode/test.json",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/text-to-code/dataset/concode/dev.json"
],
"name": "tc_text_to_code",
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Text-Code/text-to-code",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Text-Code/text-to-code/dataset"
},
"tt_text_to_text_da_en": {
"class_name": "CodeXGlueTTTextToText",
"data_dir_name": "data",
"dataset_type": "Text-Text",
"description": "CodeXGLUE text-to-text dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Text-Text/text-to-text",
"dir_name": "text-to-text",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/preprocessing.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/da-en.test.da",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/da-en.test.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/lv-en.test.lv",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/zh-en.test.zh",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/no-en.test.no",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/zh-en.test.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/lv-en.test.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/no-en.test.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/da-en.dev.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/lv-en.dev.lv",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/lv-en.dev.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/zh-en.dev.zh",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/no-en.dev.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/zh-en.dev.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/da-en.dev.da",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/no-en.dev.no",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/da-en.train.da",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/lv-en.train.lv",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/no-en.train.no",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/zh-en.train.zh",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/no-en.train.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/zh-en.train.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/lv-en.train.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/da-en.train.en"
],
"name": "tt_text_to_text",
"parameters": {
"natural_language_pair": "da-en"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Text-Text/text-to-text",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Text-Text/text-to-text/data"
},
"tt_text_to_text_lv_en": {
"class_name": "CodeXGlueTTTextToText",
"data_dir_name": "data",
"dataset_type": "Text-Text",
"description": "CodeXGLUE text-to-text dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Text-Text/text-to-text",
"dir_name": "text-to-text",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/preprocessing.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/da-en.test.da",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/da-en.test.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/lv-en.test.lv",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/zh-en.test.zh",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/no-en.test.no",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/zh-en.test.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/lv-en.test.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/no-en.test.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/da-en.dev.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/lv-en.dev.lv",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/lv-en.dev.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/zh-en.dev.zh",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/no-en.dev.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/zh-en.dev.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/da-en.dev.da",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/no-en.dev.no",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/da-en.train.da",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/lv-en.train.lv",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/no-en.train.no",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/zh-en.train.zh",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/no-en.train.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/zh-en.train.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/lv-en.train.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/da-en.train.en"
],
"name": "tt_text_to_text",
"parameters": {
"natural_language_pair": "lv-en"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Text-Text/text-to-text",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Text-Text/text-to-text/data"
},
"tt_text_to_text_no_en": {
"class_name": "CodeXGlueTTTextToText",
"data_dir_name": "data",
"dataset_type": "Text-Text",
"description": "CodeXGLUE text-to-text dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Text-Text/text-to-text",
"dir_name": "text-to-text",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/preprocessing.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/da-en.test.da",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/da-en.test.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/lv-en.test.lv",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/zh-en.test.zh",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/no-en.test.no",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/zh-en.test.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/lv-en.test.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/no-en.test.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/da-en.dev.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/lv-en.dev.lv",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/lv-en.dev.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/zh-en.dev.zh",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/no-en.dev.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/zh-en.dev.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/da-en.dev.da",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/no-en.dev.no",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/da-en.train.da",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/lv-en.train.lv",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/no-en.train.no",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/zh-en.train.zh",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/no-en.train.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/zh-en.train.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/lv-en.train.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/da-en.train.en"
],
"name": "tt_text_to_text",
"parameters": {
"natural_language_pair": "no-en"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Text-Text/text-to-text",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Text-Text/text-to-text/data"
},
"tt_text_to_text_zh_en": {
"class_name": "CodeXGlueTTTextToText",
"data_dir_name": "data",
"dataset_type": "Text-Text",
"description": "CodeXGLUE text-to-text dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Text-Text/text-to-text",
"dir_name": "text-to-text",
"files": [
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/preprocessing.py",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/da-en.test.da",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/da-en.test.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/lv-en.test.lv",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/zh-en.test.zh",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/no-en.test.no",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/zh-en.test.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/lv-en.test.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/no-en.test.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/da-en.dev.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/lv-en.dev.lv",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/lv-en.dev.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/zh-en.dev.zh",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/no-en.dev.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/zh-en.dev.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/da-en.dev.da",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/no-en.dev.no",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/da-en.train.da",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/lv-en.train.lv",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/no-en.train.no",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/zh-en.train.zh",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/no-en.train.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/zh-en.train.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/lv-en.train.en",
"/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/da-en.train.en"
],
"name": "tt_text_to_text",
"parameters": {
"natural_language_pair": "zh-en"
},
"project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Text-Text/text-to-text",
"raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Text-Text/text-to-text/data"
}
} | definitions = {'cc_clone_detection_big_clone_bench': {'class_name': 'CodeXGlueCCCloneDetectionBigCloneBench', 'data_dir_name': 'dataset', 'dataset_type': 'Code-Code', 'description': 'CodeXGLUE Clone-detection-BigCloneBench dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/Clone-detection-BigCloneBench', 'dir_name': 'Clone-detection-BigCloneBench', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/Clone-detection-BigCloneBench/dataset/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/Clone-detection-BigCloneBench/dataset/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/Clone-detection-BigCloneBench/dataset/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/Clone-detection-BigCloneBench/dataset/data.jsonl'], 'name': 'cc_clone_detection_big_clone_bench', 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/Clone-detection-BigCloneBench', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/Clone-detection-BigCloneBench/dataset'}, 'cc_clone_detection_poj_104': {'class_name': 'CodeXGlueCCCloneDetectionPOJ104', 'data_dir_name': 'dataset', 'dataset_type': 'Code-Code', 'description': 'CodeXGLUE Clone-detection-POJ-104 dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/Clone-detection-POJ-104', 'dir_name': 'Clone-detection-POJ-104', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/Clone-detection-POJ-104/dataset/programs.tar.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/Clone-detection-POJ-104/dataset/preprocess.py'], 'name': 'cc_clone_detection_poj_104', 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/Clone-detection-POJ-104', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/Clone-detection-POJ-104/dataset'}, 'cc_cloze_testing_all_go': {'class_name': 'CodeXGlueCCClozeTestingAll', 'data_dir_name': 'data/cloze-all/go', 'dataset_type': 'Code-Code', 'description': 'CodeXGLUE ClozeTesting-all dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all', 'dir_name': 'ClozeTesting-all', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-all/data/cloze-all/go/clozeTest.json'], 'name': 'cc_cloze_testing_all', 'parameters': {'language': 'go'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-all/data/cloze-all/go'}, 'cc_cloze_testing_all_java': {'class_name': 'CodeXGlueCCClozeTestingAll', 'data_dir_name': 'data/cloze-all/java', 'dataset_type': 'Code-Code', 'description': 'CodeXGLUE ClozeTesting-all dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all', 'dir_name': 'ClozeTesting-all', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-all/data/cloze-all/java/clozeTest.json'], 'name': 'cc_cloze_testing_all', 'parameters': {'language': 'java'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-all/data/cloze-all/java'}, 'cc_cloze_testing_all_javascript': {'class_name': 'CodeXGlueCCClozeTestingAll', 'data_dir_name': 'data/cloze-all/javascript', 'dataset_type': 'Code-Code', 'description': 'CodeXGLUE ClozeTesting-all dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all', 'dir_name': 'ClozeTesting-all', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-all/data/cloze-all/javascript/clozeTest.json'], 'name': 'cc_cloze_testing_all', 'parameters': {'language': 'javascript'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-all/data/cloze-all/javascript'}, 'cc_cloze_testing_all_php': {'class_name': 'CodeXGlueCCClozeTestingAll', 'data_dir_name': 'data/cloze-all/php', 'dataset_type': 'Code-Code', 'description': 'CodeXGLUE ClozeTesting-all dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all', 'dir_name': 'ClozeTesting-all', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-all/data/cloze-all/php/clozeTest.json'], 'name': 'cc_cloze_testing_all', 'parameters': {'language': 'php'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-all/data/cloze-all/php'}, 'cc_cloze_testing_all_python': {'class_name': 'CodeXGlueCCClozeTestingAll', 'data_dir_name': 'data/cloze-all/python', 'dataset_type': 'Code-Code', 'description': 'CodeXGLUE ClozeTesting-all dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all', 'dir_name': 'ClozeTesting-all', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-all/data/cloze-all/python/clozeTest.json'], 'name': 'cc_cloze_testing_all', 'parameters': {'language': 'python'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-all/data/cloze-all/python'}, 'cc_cloze_testing_all_ruby': {'class_name': 'CodeXGlueCCClozeTestingAll', 'data_dir_name': 'data/cloze-all/ruby', 'dataset_type': 'Code-Code', 'description': 'CodeXGLUE ClozeTesting-all dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all', 'dir_name': 'ClozeTesting-all', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-all/data/cloze-all/ruby/clozeTest.json'], 'name': 'cc_cloze_testing_all', 'parameters': {'language': 'ruby'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-all', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-all/data/cloze-all/ruby'}, 'cc_cloze_testing_maxmin_go': {'class_name': 'CodeXGlueCCClozeTestingMaxmin', 'data_dir_name': 'data/cloze-maxmin/go', 'dataset_type': 'Code-Code', 'description': 'CodeXGLUE ClozeTesting-maxmin dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin', 'dir_name': 'ClozeTesting-maxmin', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/go/clozeTest.json'], 'name': 'cc_cloze_testing_maxmin', 'parameters': {'language': 'go'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/go'}, 'cc_cloze_testing_maxmin_java': {'class_name': 'CodeXGlueCCClozeTestingMaxmin', 'data_dir_name': 'data/cloze-maxmin/java', 'dataset_type': 'Code-Code', 'description': 'CodeXGLUE ClozeTesting-maxmin dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin', 'dir_name': 'ClozeTesting-maxmin', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/java/clozeTest.json'], 'name': 'cc_cloze_testing_maxmin', 'parameters': {'language': 'java'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/java'}, 'cc_cloze_testing_maxmin_javascript': {'class_name': 'CodeXGlueCCClozeTestingMaxmin', 'data_dir_name': 'data/cloze-maxmin/javascript', 'dataset_type': 'Code-Code', 'description': 'CodeXGLUE ClozeTesting-maxmin dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin', 'dir_name': 'ClozeTesting-maxmin', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/javascript/clozeTest.json'], 'name': 'cc_cloze_testing_maxmin', 'parameters': {'language': 'javascript'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/javascript'}, 'cc_cloze_testing_maxmin_php': {'class_name': 'CodeXGlueCCClozeTestingMaxmin', 'data_dir_name': 'data/cloze-maxmin/php', 'dataset_type': 'Code-Code', 'description': 'CodeXGLUE ClozeTesting-maxmin dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin', 'dir_name': 'ClozeTesting-maxmin', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/php/clozeTest.json'], 'name': 'cc_cloze_testing_maxmin', 'parameters': {'language': 'php'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/php'}, 'cc_cloze_testing_maxmin_python': {'class_name': 'CodeXGlueCCClozeTestingMaxmin', 'data_dir_name': 'data/cloze-maxmin/python', 'dataset_type': 'Code-Code', 'description': 'CodeXGLUE ClozeTesting-maxmin dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin', 'dir_name': 'ClozeTesting-maxmin', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/python/clozeTest.json'], 'name': 'cc_cloze_testing_maxmin', 'parameters': {'language': 'python'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/python'}, 'cc_cloze_testing_maxmin_ruby': {'class_name': 'CodeXGlueCCClozeTestingMaxmin', 'data_dir_name': 'data/cloze-maxmin/ruby', 'dataset_type': 'Code-Code', 'description': 'CodeXGLUE ClozeTesting-maxmin dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin', 'dir_name': 'ClozeTesting-maxmin', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/ruby/clozeTest.json'], 'name': 'cc_cloze_testing_maxmin', 'parameters': {'language': 'ruby'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/ClozeTesting-maxmin', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/ClozeTesting-maxmin/data/cloze-maxmin/ruby'}, 'cc_code_completion_line_java': {'class_name': 'CodeXGlueCCCodeCompletionLine', 'data_dir_name': 'dataset/javaCorpus/line_completion', 'dataset_type': 'Code-Code', 'description': 'CodeXGLUE CodeCompletion-line dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/CodeCompletion-line', 'dir_name': 'CodeCompletion-line', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/CodeCompletion-line/dataset/javaCorpus/line_completion/test.json'], 'name': 'cc_code_completion_line', 'parameters': {'language': 'java', 'original_language_name': 'javaCorpus'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/CodeCompletion-line', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/CodeCompletion-line/dataset/javaCorpus/line_completion'}, 'cc_code_completion_line_python': {'class_name': 'CodeXGlueCCCodeCompletionLine', 'data_dir_name': 'dataset/py150/line_completion', 'dataset_type': 'Code-Code', 'description': 'CodeXGLUE CodeCompletion-line dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/CodeCompletion-line', 'dir_name': 'CodeCompletion-line', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/CodeCompletion-line/dataset/py150/line_completion/test.json'], 'name': 'cc_code_completion_line', 'parameters': {'language': 'python', 'original_language_name': 'py150'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/CodeCompletion-line', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/CodeCompletion-line/dataset/py150/line_completion'}, 'cc_code_completion_token_java': {'class_name': 'CodeXGlueCCCodeCompletionTokenJava', 'data_dir_name': 'dataset/javaCorpus', 'dataset_type': 'Code-Code', 'description': 'CodeXGLUE CodeCompletion-token dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/CodeCompletion-token', 'dir_name': 'CodeCompletion-token', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/CodeCompletion-token/dataset/javaCorpus/preprocess.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/CodeCompletion-token/dataset/javaCorpus/download.sh'], 'name': 'cc_code_completion_token', 'parameters': {'language': 'java', 'original_language_name': 'javaCorpus'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/CodeCompletion-token', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/CodeCompletion-token/dataset/javaCorpus'}, 'cc_code_completion_token_python': {'class_name': 'CodeXGlueCCCodeCompletionTokenPython', 'data_dir_name': 'dataset/py150', 'dataset_type': 'Code-Code', 'description': 'CodeXGLUE CodeCompletion-token dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/CodeCompletion-token', 'dir_name': 'CodeCompletion-token', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/CodeCompletion-token/dataset/py150/preprocess.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/CodeCompletion-token/dataset/py150/download_and_extract.sh'], 'name': 'cc_code_completion_token', 'parameters': {'language': 'python', 'original_language_name': 'py150'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/CodeCompletion-token', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/CodeCompletion-token/dataset/py150'}, 'cc_code_refinement_medium': {'class_name': 'CodeXGlueCCCodeRefinement', 'data_dir_name': 'data', 'dataset_type': 'Code-Code', 'description': 'CodeXGLUE code-refinement dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/code-refinement', 'dir_name': 'code-refinement', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/train.buggy-fixed.buggy', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/test.buggy-fixed.fixed', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/train.buggy-fixed.fixed', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/test.buggy-fixed.buggy', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/valid.buggy-fixed.buggy', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/valid.buggy-fixed.fixed', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/train.buggy-fixed.buggy', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/test.buggy-fixed.fixed', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/train.buggy-fixed.fixed', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/test.buggy-fixed.buggy', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/valid.buggy-fixed.buggy', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/valid.buggy-fixed.fixed'], 'name': 'cc_code_refinement', 'parameters': {'size': 'medium'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/code-refinement', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/code-refinement/data'}, 'cc_code_refinement_small': {'class_name': 'CodeXGlueCCCodeRefinement', 'data_dir_name': 'data', 'dataset_type': 'Code-Code', 'description': 'CodeXGLUE code-refinement dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/code-refinement', 'dir_name': 'code-refinement', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/train.buggy-fixed.buggy', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/test.buggy-fixed.fixed', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/train.buggy-fixed.fixed', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/test.buggy-fixed.buggy', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/valid.buggy-fixed.buggy', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/small/valid.buggy-fixed.fixed', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/train.buggy-fixed.buggy', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/test.buggy-fixed.fixed', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/train.buggy-fixed.fixed', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/test.buggy-fixed.buggy', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/valid.buggy-fixed.buggy', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-refinement/data/medium/valid.buggy-fixed.fixed'], 'name': 'cc_code_refinement', 'parameters': {'size': 'small'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/code-refinement', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/code-refinement/data'}, 'cc_code_to_code_trans': {'class_name': 'CodeXGlueCCCodeToCodeTrans', 'data_dir_name': 'data', 'dataset_type': 'Code-Code', 'description': 'CodeXGLUE code-to-code-trans dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/code-to-code-trans', 'dir_name': 'code-to-code-trans', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-to-code-trans/data/train.java-cs.txt.java', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-to-code-trans/data/train.java-cs.txt.cs', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-to-code-trans/data/test.java-cs.txt.java', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-to-code-trans/data/valid.java-cs.txt.java', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-to-code-trans/data/test.java-cs.txt.cs', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/code-to-code-trans/data/valid.java-cs.txt.cs'], 'name': 'cc_code_to_code_trans', 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/code-to-code-trans', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/code-to-code-trans/data'}, 'cc_defect_detection': {'class_name': 'CodeXGlueCCDefectDetection', 'data_dir_name': 'dataset', 'dataset_type': 'Code-Code', 'description': 'CodeXGLUE Defect-detection dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/Defect-detection', 'dir_name': 'Defect-detection', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/Defect-detection/dataset/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/Defect-detection/dataset/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/Defect-detection/dataset/preprocess.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/Defect-detection/dataset/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Code/Defect-detection/dataset/function.json'], 'name': 'cc_defect_detection', 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/Defect-detection', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Code/Defect-detection/dataset'}, 'ct_code_to_text_go': {'class_name': 'CodeXGlueCTCodeToText', 'data_dir_name': '.', 'dataset_type': 'Code-Text', 'description': 'CodeXGLUE code-to-text dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Text/code-to-text', 'dir_name': 'code-to-text', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/README.md', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset.zip', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/evaluator.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/reference.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/predictions.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python.zip', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_dedupe_definitions_v2.pkl', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/preprocess.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_licenses.pkl', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/test/python_test_0.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/valid/python_valid_0.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_7.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_10.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_1.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_9.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_4.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_8.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_3.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_13.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_6.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_0.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_12.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_11.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_2.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_5.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/bleu.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/model.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/run.py'], 'name': 'ct_code_to_text', 'parameters': {'language': 'go'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Text/code-to-text', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Text/code-to-text'}, 'ct_code_to_text_java': {'class_name': 'CodeXGlueCTCodeToText', 'data_dir_name': '.', 'dataset_type': 'Code-Text', 'description': 'CodeXGLUE code-to-text dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Text/code-to-text', 'dir_name': 'code-to-text', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/README.md', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset.zip', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/evaluator.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/reference.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/predictions.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python.zip', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_dedupe_definitions_v2.pkl', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/preprocess.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_licenses.pkl', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/test/python_test_0.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/valid/python_valid_0.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_7.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_10.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_1.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_9.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_4.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_8.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_3.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_13.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_6.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_0.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_12.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_11.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_2.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_5.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/bleu.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/model.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/run.py'], 'name': 'ct_code_to_text', 'parameters': {'language': 'java'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Text/code-to-text', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Text/code-to-text'}, 'ct_code_to_text_javascript': {'class_name': 'CodeXGlueCTCodeToText', 'data_dir_name': '.', 'dataset_type': 'Code-Text', 'description': 'CodeXGLUE code-to-text dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Text/code-to-text', 'dir_name': 'code-to-text', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/README.md', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset.zip', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/evaluator.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/reference.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/predictions.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python.zip', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_dedupe_definitions_v2.pkl', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/preprocess.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_licenses.pkl', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/test/python_test_0.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/valid/python_valid_0.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_7.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_10.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_1.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_9.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_4.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_8.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_3.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_13.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_6.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_0.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_12.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_11.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_2.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_5.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/bleu.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/model.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/run.py'], 'name': 'ct_code_to_text', 'parameters': {'language': 'javascript'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Text/code-to-text', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Text/code-to-text'}, 'ct_code_to_text_php': {'class_name': 'CodeXGlueCTCodeToText', 'data_dir_name': '.', 'dataset_type': 'Code-Text', 'description': 'CodeXGLUE code-to-text dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Text/code-to-text', 'dir_name': 'code-to-text', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/README.md', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset.zip', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/evaluator.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/reference.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/predictions.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python.zip', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_dedupe_definitions_v2.pkl', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/preprocess.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_licenses.pkl', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/test/python_test_0.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/valid/python_valid_0.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_7.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_10.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_1.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_9.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_4.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_8.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_3.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_13.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_6.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_0.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_12.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_11.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_2.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_5.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/bleu.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/model.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/run.py'], 'name': 'ct_code_to_text', 'parameters': {'language': 'php'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Text/code-to-text', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Text/code-to-text'}, 'ct_code_to_text_python': {'class_name': 'CodeXGlueCTCodeToText', 'data_dir_name': '.', 'dataset_type': 'Code-Text', 'description': 'CodeXGLUE code-to-text dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Text/code-to-text', 'dir_name': 'code-to-text', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/README.md', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset.zip', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/evaluator.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/reference.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/predictions.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python.zip', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_dedupe_definitions_v2.pkl', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/preprocess.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_licenses.pkl', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/test/python_test_0.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/valid/python_valid_0.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_7.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_10.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_1.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_9.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_4.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_8.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_3.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_13.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_6.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_0.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_12.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_11.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_2.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_5.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/bleu.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/model.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/run.py'], 'name': 'ct_code_to_text', 'parameters': {'language': 'python'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Text/code-to-text', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Text/code-to-text'}, 'ct_code_to_text_ruby': {'class_name': 'CodeXGlueCTCodeToText', 'data_dir_name': '.', 'dataset_type': 'Code-Text', 'description': 'CodeXGLUE code-to-text dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Text/code-to-text', 'dir_name': 'code-to-text', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/README.md', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset.zip', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/evaluator.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/reference.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/evaluator/predictions.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python.zip', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_dedupe_definitions_v2.pkl', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/preprocess.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python_licenses.pkl', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/go/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/test/python_test_0.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/valid/python_valid_0.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_7.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_10.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_1.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_9.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_4.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_8.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_3.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_13.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_6.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_0.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_12.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_11.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_2.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/python/final/jsonl/train/python_train_5.jsonl.gz', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/java/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/ruby/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/php/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/test.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/dataset_back/javascript/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/bleu.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/model.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Code-Text/code-to-text/code/run.py'], 'name': 'ct_code_to_text', 'parameters': {'language': 'ruby'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Code-Text/code-to-text', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Code-Text/code-to-text'}, 'tc_nl_code_search_adv': {'class_name': 'CodeXGlueTCNLCodeSearchAdv', 'data_dir_name': '.', 'dataset_type': 'Text-Code', 'description': 'CodeXGLUE NL-code-search-Adv dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Text-Code/NL-code-search-Adv', 'dir_name': 'NL-code-search-Adv', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/NL-code-search-Adv/README.md', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/NL-code-search-Adv/dataset.zip', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/NL-code-search-Adv/evaluator/test.jsonl', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/NL-code-search-Adv/evaluator/evaluator.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/NL-code-search-Adv/evaluator/predictions.jsonl', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/NL-code-search-Adv/code/model.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/NL-code-search-Adv/code/run.py'], 'name': 'tc_nl_code_search_adv', 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Text-Code/NL-code-search-Adv', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Text-Code/NL-code-search-Adv'}, 'tc_nl_code_search_web_query': {'class_name': 'CodeXGlueTCNLCodeSearchWebQuery', 'data_dir_name': 'data', 'dataset_type': 'Text-Code', 'description': 'CodeXGLUE NL-code-search-WebQuery dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Text-Code/NL-code-search-WebQuery', 'dir_name': 'NL-code-search-WebQuery', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/NL-code-search-WebQuery/data/valid.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/NL-code-search-WebQuery/data/preprocess.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/NL-code-search-WebQuery/data/train.txt', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/NL-code-search-WebQuery/data/test_webquery.json'], 'name': 'tc_nl_code_search_web_query', 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Text-Code/NL-code-search-WebQuery', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Text-Code/NL-code-search-WebQuery/data'}, 'tc_text_to_code': {'class_name': 'CodeXGlueTCTextToCode', 'data_dir_name': 'dataset', 'dataset_type': 'Text-Code', 'description': 'CodeXGLUE text-to-code dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Text-Code/text-to-code', 'dir_name': 'text-to-code', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/text-to-code/dataset/concode/train.json', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/text-to-code/dataset/concode/test.json', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Code/text-to-code/dataset/concode/dev.json'], 'name': 'tc_text_to_code', 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Text-Code/text-to-code', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Text-Code/text-to-code/dataset'}, 'tt_text_to_text_da_en': {'class_name': 'CodeXGlueTTTextToText', 'data_dir_name': 'data', 'dataset_type': 'Text-Text', 'description': 'CodeXGLUE text-to-text dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Text-Text/text-to-text', 'dir_name': 'text-to-text', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/preprocessing.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/da-en.test.da', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/da-en.test.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/lv-en.test.lv', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/zh-en.test.zh', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/no-en.test.no', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/zh-en.test.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/lv-en.test.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/no-en.test.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/da-en.dev.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/lv-en.dev.lv', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/lv-en.dev.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/zh-en.dev.zh', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/no-en.dev.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/zh-en.dev.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/da-en.dev.da', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/no-en.dev.no', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/da-en.train.da', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/lv-en.train.lv', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/no-en.train.no', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/zh-en.train.zh', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/no-en.train.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/zh-en.train.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/lv-en.train.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/da-en.train.en'], 'name': 'tt_text_to_text', 'parameters': {'natural_language_pair': 'da-en'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Text-Text/text-to-text', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Text-Text/text-to-text/data'}, 'tt_text_to_text_lv_en': {'class_name': 'CodeXGlueTTTextToText', 'data_dir_name': 'data', 'dataset_type': 'Text-Text', 'description': 'CodeXGLUE text-to-text dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Text-Text/text-to-text', 'dir_name': 'text-to-text', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/preprocessing.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/da-en.test.da', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/da-en.test.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/lv-en.test.lv', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/zh-en.test.zh', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/no-en.test.no', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/zh-en.test.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/lv-en.test.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/no-en.test.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/da-en.dev.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/lv-en.dev.lv', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/lv-en.dev.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/zh-en.dev.zh', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/no-en.dev.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/zh-en.dev.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/da-en.dev.da', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/no-en.dev.no', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/da-en.train.da', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/lv-en.train.lv', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/no-en.train.no', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/zh-en.train.zh', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/no-en.train.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/zh-en.train.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/lv-en.train.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/da-en.train.en'], 'name': 'tt_text_to_text', 'parameters': {'natural_language_pair': 'lv-en'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Text-Text/text-to-text', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Text-Text/text-to-text/data'}, 'tt_text_to_text_no_en': {'class_name': 'CodeXGlueTTTextToText', 'data_dir_name': 'data', 'dataset_type': 'Text-Text', 'description': 'CodeXGLUE text-to-text dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Text-Text/text-to-text', 'dir_name': 'text-to-text', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/preprocessing.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/da-en.test.da', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/da-en.test.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/lv-en.test.lv', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/zh-en.test.zh', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/no-en.test.no', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/zh-en.test.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/lv-en.test.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/no-en.test.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/da-en.dev.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/lv-en.dev.lv', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/lv-en.dev.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/zh-en.dev.zh', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/no-en.dev.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/zh-en.dev.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/da-en.dev.da', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/no-en.dev.no', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/da-en.train.da', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/lv-en.train.lv', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/no-en.train.no', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/zh-en.train.zh', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/no-en.train.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/zh-en.train.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/lv-en.train.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/da-en.train.en'], 'name': 'tt_text_to_text', 'parameters': {'natural_language_pair': 'no-en'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Text-Text/text-to-text', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Text-Text/text-to-text/data'}, 'tt_text_to_text_zh_en': {'class_name': 'CodeXGlueTTTextToText', 'data_dir_name': 'data', 'dataset_type': 'Text-Text', 'description': 'CodeXGLUE text-to-text dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Text-Text/text-to-text', 'dir_name': 'text-to-text', 'files': ['/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/preprocessing.py', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/da-en.test.da', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/da-en.test.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/lv-en.test.lv', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/zh-en.test.zh', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/no-en.test.no', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/zh-en.test.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/lv-en.test.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/test/no-en.test.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/da-en.dev.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/lv-en.dev.lv', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/lv-en.dev.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/zh-en.dev.zh', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/no-en.dev.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/zh-en.dev.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/da-en.dev.da', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/dev/no-en.dev.no', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/da-en.train.da', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/lv-en.train.lv', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/no-en.train.no', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/zh-en.train.zh', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/no-en.train.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/zh-en.train.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/lv-en.train.en', '/home/lagunas/devel/external/datasets-sprint/CodeXGLUE/Text-Text/text-to-text/data/train/da-en.train.en'], 'name': 'tt_text_to_text', 'parameters': {'natural_language_pair': 'zh-en'}, 'project_url': 'https://github.com/madlag/CodeXGLUE/tree/main/Text-Text/text-to-text', 'raw_url': 'https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Text-Text/text-to-text/data'}} |
"""
"""
def get_daily_quote():
return 'q:gdq'
| """
"""
def get_daily_quote():
return 'q:gdq' |
##################################
# import_file.json #
##################################
attributes = {
"type": "array",
"items": {
"type": "object",
"properties": {"id": {"type": "integer"}, "groupId": {"type": "integer"}},
"required": ["id", "groupId"],
},
}
bbox = {
"$id": "https://darwin.v7labs.com/schemas/supperannotate/bounding_box",
"description": "Schema of a Bounding Box",
"title": "Bounding Box",
"default": {
"type": "bbox",
"points": {"x1": 1223.1, "x2": 1420.2, "y1": 607.3, "y2": 1440,},
"classId": 1,
"attributes": [],
},
"examples": [
{
"type": "bbox",
"points": {"x1": 587.5, "x2": 1420.2, "y1": 607.3, "y2": 1440,},
"classId": 1,
"attributes": [{"id": 1, "groupId": 2}],
}
],
"type": "object",
"properties": {
"attributes": attributes,
"classId": {"type": "integer"},
"type": {"enum": ["bbox"]},
"points": {
"type": "object",
"properties": {
"x1": {"type": "number",},
"x2": {"type": "number",},
"y1": {"type": "number",},
"y2": {"type": "number",},
},
"required": ["x1", "x2", "y1", "y2"],
},
},
"required": ["points", "type", "classId", "attributes"],
}
polygon = {
"$id": "https://darwin.v7labs.com/schemas/supperannotate/polygon",
"description": "Schema of a Polygon",
"title": "Polygon",
"default": {"type": "polygon", "points": [1, 2, 3, 4], "classId": 1},
"examples": [
{"type": "polygon", "points": [1, 2, 3, 4], "classId": 1, "attributes": [{"id": 1, "groupId": 2}]},
{"type": "polygon", "points": [], "classId": 1, "attributes": []},
],
"type": "object",
"properties": {
"attributes": attributes,
"classId": {"type": "integer"},
"points": {"type": "array", "items": {"type": "number"}},
"type": {"enum": ["polygon"]},
},
"required": ["points", "type", "classId", "attributes"],
}
polyline = {
"$id": "https://darwin.v7labs.com/schemas/supperannotate/polyline",
"description": "Schema of a Polyline",
"title": "Polyline",
"default": {"type": "polyline", "points": [1, 2, 3, 4], "classId": 1},
"examples": [
{"type": "polyline", "points": [1, 2, 3, 4], "classId": 1, "attributes": [{"id": 1, "groupId": 2}]},
{"type": "polyline", "points": [], "classId": 1, "attributes": []},
],
"type": "object",
"properties": {
"attributes": attributes,
"classId": {"type": "integer"},
"points": {"type": "array", "items": {"type": "number"}},
"type": {"enum": ["polyline"]},
},
"required": ["points", "type", "classId", "attributes"],
}
cuboid = {
"$id": "https://darwin.v7labs.com/schemas/supperannotate/cuboid",
"description": "Schema of a Cuboid",
"title": "Cuboid",
"default": {
"type": "cuboid",
"points": {
"f1": {"x": 1223.1, "y": 587.5},
"f2": {"x": 1540.3, "y": 1420.2},
"r1": {"x": 1286.2, "y": 607.3},
"r2": {"x": 1603.4, "y": 1440},
},
"classId": 1,
"attributes": [{"id": 1, "groupId": 2}],
},
"examples": [
{
"type": "cuboid",
"points": {
"f1": {"x": 1223.1, "y": 587.5},
"f2": {"x": 1540.3, "y": 1420.2},
"r1": {"x": 1286.2, "y": 607.3},
"r2": {"x": 1603.4, "y": 1440},
},
"classId": 1,
"attributes": [],
}
],
"type": "object",
"properties": {
"attributes": attributes,
"classId": {"type": "integer"},
"type": {"enum": ["cuboid"]},
"points": {
"type": "object",
"properties": {
"f1": {
"type": "object",
"properties": {"x": {"type": "number"}, "y": {"type": "number"}},
"required": ["x", "y"],
},
"f2": {
"type": "object",
"properties": {"x": {"type": "number"}, "y": {"type": "number"}},
"required": ["x", "y"],
},
"r1": {
"type": "object",
"properties": {"x": {"type": "number"}, "y": {"type": "number"}},
"required": ["x", "y"],
},
"r2": {
"type": "object",
"properties": {"x": {"type": "number"}, "y": {"type": "number"}},
"required": ["x", "y"],
},
},
"required": ["f1", "f2", "r1", "r2"],
},
},
"required": ["points", "type", "classId", "attributes"],
}
ellipse = {
"$id": "https://darwin.v7labs.com/schemas/supperannotate/ellipse",
"description": "Schema of an Ellipse",
"title": "Ellipse",
"default": {
"type": "ellipse",
"cx": 377.46,
"cy": 806.18,
"rx": 316.36,
"ry": 134.18,
"angle": 0,
"classId": 1,
"attributes": [],
},
"examples": [
{
"type": "ellipse",
"cx": 377.46,
"cy": 806.18,
"rx": 316.36,
"ry": 134.18,
"angle": 14.66,
"classId": 1,
"attributes": [{"id": 1, "groupId": 2}],
}
],
"type": "object",
"properties": {
"attributes": attributes,
"classId": {"type": "integer"},
"cx": {"type": "number"},
"cy": {"type": "number"},
"rx": {"type": "number"},
"ry": {"type": "number"},
"angle": {"type": "number"},
"type": {"enum": ["ellipse"]},
},
"required": ["cx", "cy", "rx", "ry", "angle", "type", "classId", "attributes"],
}
point = {
"$id": "https://darwin.v7labs.com/schemas/supperannotate/point",
"description": "Schema of a Point",
"title": "Point",
"default": {"type": "point", "x": 1.2, "y": 2.5, "classId": 1, "attributes": []},
"examples": [
{"type": "point", "x": 1.2, "y": 2.5, "classId": 1, "attributes": []},
{"type": "point", "x": 0, "y": 1, "classId": 2, "attributes": [{"id": 1, "groupId": 2}]},
],
"type": "object",
"properties": {
"attributes": attributes,
"classId": {"type": "integer"},
"x": {"type": "number"},
"y": {"type": "number"},
"type": {"enum": ["point"]},
},
"required": ["x", "y", "type", "classId", "attributes"],
}
superannotate_export = {
"type": "object",
"required": ["instances", "metadata", "tags"],
"properties": {
"instances": {"type": "array", "items": {"oneOf": [point, ellipse, cuboid, polygon, bbox, polyline]},},
"metadata": {"type": "object", "required": ["name"], "properties": {"name": {"type": "string"}}},
"tags": {"type": "array", "items": {"type": "string"}},
},
}
##################################
# classes.json #
##################################
attribute_groups = {
"type": "array",
"items": {
"type": "object",
"required": ["id", "name", "attributes"],
"properties": {
"id": {"type": "integer"},
"name": {"type": "string"},
"attributes": {
"type": "array",
"itmes": {
"type": "object",
"required": ["id", "name"],
"properties": {"id": {"type": "integer"}, "name": {"type": "string"}},
},
},
},
},
}
classes_export = {
"type": "array",
"items": {
"type": "object",
"required": ["name", "id", "attribute_groups"],
"properties": {"name": {"type": "string"}, "id": {"type": "integer"}, "attribute_groups": attribute_groups},
},
}
| attributes = {'type': 'array', 'items': {'type': 'object', 'properties': {'id': {'type': 'integer'}, 'groupId': {'type': 'integer'}}, 'required': ['id', 'groupId']}}
bbox = {'$id': 'https://darwin.v7labs.com/schemas/supperannotate/bounding_box', 'description': 'Schema of a Bounding Box', 'title': 'Bounding Box', 'default': {'type': 'bbox', 'points': {'x1': 1223.1, 'x2': 1420.2, 'y1': 607.3, 'y2': 1440}, 'classId': 1, 'attributes': []}, 'examples': [{'type': 'bbox', 'points': {'x1': 587.5, 'x2': 1420.2, 'y1': 607.3, 'y2': 1440}, 'classId': 1, 'attributes': [{'id': 1, 'groupId': 2}]}], 'type': 'object', 'properties': {'attributes': attributes, 'classId': {'type': 'integer'}, 'type': {'enum': ['bbox']}, 'points': {'type': 'object', 'properties': {'x1': {'type': 'number'}, 'x2': {'type': 'number'}, 'y1': {'type': 'number'}, 'y2': {'type': 'number'}}, 'required': ['x1', 'x2', 'y1', 'y2']}}, 'required': ['points', 'type', 'classId', 'attributes']}
polygon = {'$id': 'https://darwin.v7labs.com/schemas/supperannotate/polygon', 'description': 'Schema of a Polygon', 'title': 'Polygon', 'default': {'type': 'polygon', 'points': [1, 2, 3, 4], 'classId': 1}, 'examples': [{'type': 'polygon', 'points': [1, 2, 3, 4], 'classId': 1, 'attributes': [{'id': 1, 'groupId': 2}]}, {'type': 'polygon', 'points': [], 'classId': 1, 'attributes': []}], 'type': 'object', 'properties': {'attributes': attributes, 'classId': {'type': 'integer'}, 'points': {'type': 'array', 'items': {'type': 'number'}}, 'type': {'enum': ['polygon']}}, 'required': ['points', 'type', 'classId', 'attributes']}
polyline = {'$id': 'https://darwin.v7labs.com/schemas/supperannotate/polyline', 'description': 'Schema of a Polyline', 'title': 'Polyline', 'default': {'type': 'polyline', 'points': [1, 2, 3, 4], 'classId': 1}, 'examples': [{'type': 'polyline', 'points': [1, 2, 3, 4], 'classId': 1, 'attributes': [{'id': 1, 'groupId': 2}]}, {'type': 'polyline', 'points': [], 'classId': 1, 'attributes': []}], 'type': 'object', 'properties': {'attributes': attributes, 'classId': {'type': 'integer'}, 'points': {'type': 'array', 'items': {'type': 'number'}}, 'type': {'enum': ['polyline']}}, 'required': ['points', 'type', 'classId', 'attributes']}
cuboid = {'$id': 'https://darwin.v7labs.com/schemas/supperannotate/cuboid', 'description': 'Schema of a Cuboid', 'title': 'Cuboid', 'default': {'type': 'cuboid', 'points': {'f1': {'x': 1223.1, 'y': 587.5}, 'f2': {'x': 1540.3, 'y': 1420.2}, 'r1': {'x': 1286.2, 'y': 607.3}, 'r2': {'x': 1603.4, 'y': 1440}}, 'classId': 1, 'attributes': [{'id': 1, 'groupId': 2}]}, 'examples': [{'type': 'cuboid', 'points': {'f1': {'x': 1223.1, 'y': 587.5}, 'f2': {'x': 1540.3, 'y': 1420.2}, 'r1': {'x': 1286.2, 'y': 607.3}, 'r2': {'x': 1603.4, 'y': 1440}}, 'classId': 1, 'attributes': []}], 'type': 'object', 'properties': {'attributes': attributes, 'classId': {'type': 'integer'}, 'type': {'enum': ['cuboid']}, 'points': {'type': 'object', 'properties': {'f1': {'type': 'object', 'properties': {'x': {'type': 'number'}, 'y': {'type': 'number'}}, 'required': ['x', 'y']}, 'f2': {'type': 'object', 'properties': {'x': {'type': 'number'}, 'y': {'type': 'number'}}, 'required': ['x', 'y']}, 'r1': {'type': 'object', 'properties': {'x': {'type': 'number'}, 'y': {'type': 'number'}}, 'required': ['x', 'y']}, 'r2': {'type': 'object', 'properties': {'x': {'type': 'number'}, 'y': {'type': 'number'}}, 'required': ['x', 'y']}}, 'required': ['f1', 'f2', 'r1', 'r2']}}, 'required': ['points', 'type', 'classId', 'attributes']}
ellipse = {'$id': 'https://darwin.v7labs.com/schemas/supperannotate/ellipse', 'description': 'Schema of an Ellipse', 'title': 'Ellipse', 'default': {'type': 'ellipse', 'cx': 377.46, 'cy': 806.18, 'rx': 316.36, 'ry': 134.18, 'angle': 0, 'classId': 1, 'attributes': []}, 'examples': [{'type': 'ellipse', 'cx': 377.46, 'cy': 806.18, 'rx': 316.36, 'ry': 134.18, 'angle': 14.66, 'classId': 1, 'attributes': [{'id': 1, 'groupId': 2}]}], 'type': 'object', 'properties': {'attributes': attributes, 'classId': {'type': 'integer'}, 'cx': {'type': 'number'}, 'cy': {'type': 'number'}, 'rx': {'type': 'number'}, 'ry': {'type': 'number'}, 'angle': {'type': 'number'}, 'type': {'enum': ['ellipse']}}, 'required': ['cx', 'cy', 'rx', 'ry', 'angle', 'type', 'classId', 'attributes']}
point = {'$id': 'https://darwin.v7labs.com/schemas/supperannotate/point', 'description': 'Schema of a Point', 'title': 'Point', 'default': {'type': 'point', 'x': 1.2, 'y': 2.5, 'classId': 1, 'attributes': []}, 'examples': [{'type': 'point', 'x': 1.2, 'y': 2.5, 'classId': 1, 'attributes': []}, {'type': 'point', 'x': 0, 'y': 1, 'classId': 2, 'attributes': [{'id': 1, 'groupId': 2}]}], 'type': 'object', 'properties': {'attributes': attributes, 'classId': {'type': 'integer'}, 'x': {'type': 'number'}, 'y': {'type': 'number'}, 'type': {'enum': ['point']}}, 'required': ['x', 'y', 'type', 'classId', 'attributes']}
superannotate_export = {'type': 'object', 'required': ['instances', 'metadata', 'tags'], 'properties': {'instances': {'type': 'array', 'items': {'oneOf': [point, ellipse, cuboid, polygon, bbox, polyline]}}, 'metadata': {'type': 'object', 'required': ['name'], 'properties': {'name': {'type': 'string'}}}, 'tags': {'type': 'array', 'items': {'type': 'string'}}}}
attribute_groups = {'type': 'array', 'items': {'type': 'object', 'required': ['id', 'name', 'attributes'], 'properties': {'id': {'type': 'integer'}, 'name': {'type': 'string'}, 'attributes': {'type': 'array', 'itmes': {'type': 'object', 'required': ['id', 'name'], 'properties': {'id': {'type': 'integer'}, 'name': {'type': 'string'}}}}}}}
classes_export = {'type': 'array', 'items': {'type': 'object', 'required': ['name', 'id', 'attribute_groups'], 'properties': {'name': {'type': 'string'}, 'id': {'type': 'integer'}, 'attribute_groups': attribute_groups}}} |
s = list(map(int, input().split()))
for i in range(1, len(s)):
if s[i] > s[i - 1]:
print(s[i], end=' ')
| s = list(map(int, input().split()))
for i in range(1, len(s)):
if s[i] > s[i - 1]:
print(s[i], end=' ') |
class Solution:
def climbStairs(self, n: int) -> int:
if(n==1):
return 1
dp = [0] * (n+1)
dp[1] = 1
dp[2] = 2
for i in range(3,n+1):
dp[i] = dp[i-1] + dp[i-2]
return dp[n]
| class Solution:
def climb_stairs(self, n: int) -> int:
if n == 1:
return 1
dp = [0] * (n + 1)
dp[1] = 1
dp[2] = 2
for i in range(3, n + 1):
dp[i] = dp[i - 1] + dp[i - 2]
return dp[n] |
num1 = int(input("Please input num1: "))
num2 = int(input("Please input num2: "))
num3 = int(input("Please input num3: "))
num4 = int(input("Please input num4: "))
num5 = int(input("Please input num5: "))
num6 = int(input("Please input num6: "))
s = num1 + num2 + num3 + num4 + num5 + num6
print("sum: {}".format(s)) | num1 = int(input('Please input num1: '))
num2 = int(input('Please input num2: '))
num3 = int(input('Please input num3: '))
num4 = int(input('Please input num4: '))
num5 = int(input('Please input num5: '))
num6 = int(input('Please input num6: '))
s = num1 + num2 + num3 + num4 + num5 + num6
print('sum: {}'.format(s)) |
q=int(input())
if(1>q or q>10):
exit
def isAnagram(par1,par2):
par1.sort()
par2.sort()
# print(len(par1))
for i in range(len(par1)):
if(par1[i]!=par2[i]):
return False
return True
def init():
strings=[]
count=0
q=int(globals()['q'])
while(q!=0):
strings.append(input())
q-=1
for string in strings:
s=list(string)
for n in range(len(s)-1): #max length-1 of a pair
for p in range(int(len(s)-n+1)):
k=p+1
par1=s[p:(p+n + 1)]
while(k<len(s)-n):
par2=s[k:(k+n + 1)]
if(isAnagram(par1,par2)):
count+=1
k+=1
print(count)
count=0
init() | q = int(input())
if 1 > q or q > 10:
exit
def is_anagram(par1, par2):
par1.sort()
par2.sort()
for i in range(len(par1)):
if par1[i] != par2[i]:
return False
return True
def init():
strings = []
count = 0
q = int(globals()['q'])
while q != 0:
strings.append(input())
q -= 1
for string in strings:
s = list(string)
for n in range(len(s) - 1):
for p in range(int(len(s) - n + 1)):
k = p + 1
par1 = s[p:p + n + 1]
while k < len(s) - n:
par2 = s[k:k + n + 1]
if is_anagram(par1, par2):
count += 1
k += 1
print(count)
count = 0
init() |
# B_R_R
# M_S_A_W
"""
Coding Problem on Exception Handling:
How to raise Error
Using try and except
"""
class DogNameError(Exception):
def __init__(self, *args,**kwargs):
Exception.__init__(self, *args,**kwargs)
try:
user_input=input("What is your dog name: ")
if any(i.isdigit()for i in user_input):
raise DogNameError
except DogNameError:
print("Dog name can not take any number in it, Sorry.")
| """
Coding Problem on Exception Handling:
How to raise Error
Using try and except
"""
class Dognameerror(Exception):
def __init__(self, *args, **kwargs):
Exception.__init__(self, *args, **kwargs)
try:
user_input = input('What is your dog name: ')
if any((i.isdigit() for i in user_input)):
raise DogNameError
except DogNameError:
print('Dog name can not take any number in it, Sorry.') |
_base_ = [
'../_base_/datasets/icip.py',
'../_base_/default_runtime.py', '../_base_/schedules/schedule_40k.py'
]
# model settings
norm_cfg = dict(type='BN', requires_grad=True)
model = dict(
type='EncoderDecoder',
pretrained=None,
backbone=dict(
type='ResNetV1c',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
dilations=(1, 1, 1, 1),
strides=(1, 2, 2, 2),
norm_cfg=norm_cfg,
norm_eval=False,
style='pytorch',
contract_dilation=True),
neck=dict(
type='FPN',
in_channels=[256, 512, 1024, 2048],
out_channels=256,
num_outs=4),
decode_head=dict(
type='FPNHead',
in_channels=[256, 256, 256, 256],
in_index=[0, 1, 2, 3],
feature_strides=[4, 8, 16, 32],
channels=128,
dropout_ratio=0.1,
num_classes=3,
norm_cfg=norm_cfg,
align_corners=False,
loss_decode=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
# model training and testing settings
train_cfg=dict(),
test_cfg=dict(mode='whole'))
log_config = dict(
interval=100,
hooks=[
dict(type='TextLoggerHook'),
dict(type='WandbLoggerHook', init_kwargs=dict(project='ICIP', entity='matlab')),
])
evaluation = dict(interval=2000, metric='mIoU') | _base_ = ['../_base_/datasets/icip.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_40k.py']
norm_cfg = dict(type='BN', requires_grad=True)
model = dict(type='EncoderDecoder', pretrained=None, backbone=dict(type='ResNetV1c', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), dilations=(1, 1, 1, 1), strides=(1, 2, 2, 2), norm_cfg=norm_cfg, norm_eval=False, style='pytorch', contract_dilation=True), neck=dict(type='FPN', in_channels=[256, 512, 1024, 2048], out_channels=256, num_outs=4), decode_head=dict(type='FPNHead', in_channels=[256, 256, 256, 256], in_index=[0, 1, 2, 3], feature_strides=[4, 8, 16, 32], channels=128, dropout_ratio=0.1, num_classes=3, norm_cfg=norm_cfg, align_corners=False, loss_decode=dict(type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)), train_cfg=dict(), test_cfg=dict(mode='whole'))
log_config = dict(interval=100, hooks=[dict(type='TextLoggerHook'), dict(type='WandbLoggerHook', init_kwargs=dict(project='ICIP', entity='matlab'))])
evaluation = dict(interval=2000, metric='mIoU') |
#
# PySNMP MIB module CISCO-ENTITY-SENSOR-EXT-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-ENTITY-SENSOR-EXT-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:57:12 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, ConstraintsIntersection, ValueRangeConstraint, ConstraintsUnion, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsIntersection", "ValueRangeConstraint", "ConstraintsUnion", "SingleValueConstraint")
ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt")
entPhysicalName, entPhysicalDescr, entPhysicalIndex = mibBuilder.importSymbols("ENTITY-MIB", "entPhysicalName", "entPhysicalDescr", "entPhysicalIndex")
EntitySensorValue, entPhySensorValue, entPhySensorType = mibBuilder.importSymbols("ENTITY-SENSOR-MIB", "EntitySensorValue", "entPhySensorValue", "entPhySensorType")
ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup")
Unsigned32, ObjectIdentity, NotificationType, IpAddress, ModuleIdentity, Counter32, Integer32, TimeTicks, Counter64, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, Bits, iso, Gauge32 = mibBuilder.importSymbols("SNMPv2-SMI", "Unsigned32", "ObjectIdentity", "NotificationType", "IpAddress", "ModuleIdentity", "Counter32", "Integer32", "TimeTicks", "Counter64", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "Bits", "iso", "Gauge32")
TruthValue, DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "DisplayString", "TextualConvention")
ciscoEntitySensorExtMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 745))
ciscoEntitySensorExtMIB.setRevisions(('2010-06-09 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: ciscoEntitySensorExtMIB.setRevisionsDescriptions(('Initial version of this MIB module.',))
if mibBuilder.loadTexts: ciscoEntitySensorExtMIB.setLastUpdated('201006100000Z')
if mibBuilder.loadTexts: ciscoEntitySensorExtMIB.setOrganization('Cisco Systems, Inc.')
if mibBuilder.loadTexts: ciscoEntitySensorExtMIB.setContactInfo('Postal: Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706 USA Tel: +1 408 526 4000 E-mail: cs-snmp@cisco.com')
if mibBuilder.loadTexts: ciscoEntitySensorExtMIB.setDescription('This MIB is extension to ENTITY-SENSOR-MIB(RFC 3433). This MIB also defines the notifications applicable for sensors reported in ENTITY-MIB(RFC 4133).')
ciscoEntitySensorExtMIBNotifs = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 745, 0))
ciscoEntitySensorExtMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 745, 1))
ciscoEntitySensorExtMIBConform = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 745, 2))
class CiscoSensorThresholdSeverity(TextualConvention, Integer32):
description = 'sensor threshold severity. Valid values are: other(1) : a severity other than those listed below. minor(10) : Minor Problem threshold. major(20) : Major Problem threshold. critical(30): Critical problem threshold. A system might shut down the sensor associated FRU automatically if the sensor value reach the critical problem threshold.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 10, 20, 30))
namedValues = NamedValues(("other", 1), ("minor", 10), ("major", 20), ("critical", 30))
class CiscoSensorThresholdRelation(TextualConvention, Integer32):
description = 'sensor threshold relational operator types. valid values are: lessThan(1): if the sensor value is less than the threshold value lessOrEqual(2): if the sensor value is less than or equal to the threshold value greaterThan(3): if the sensor value is greater than the threshold value greaterOrEqual(4): if the sensor value is greater than or equal to the threshold value equalTo(5): if the sensor value is equal to the threshold value notEqualTo(6): if the sensor value is not equal to the threshold value'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))
namedValues = NamedValues(("lessThan", 1), ("lessOrEqual", 2), ("greaterThan", 3), ("greaterOrEqual", 4), ("equalTo", 5), ("notEqualTo", 6))
ceSensorExtThresholdTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 745, 1, 1), )
if mibBuilder.loadTexts: ceSensorExtThresholdTable.setReference('ENTITY-MIB contains definition for entPhysicalTable')
if mibBuilder.loadTexts: ceSensorExtThresholdTable.setStatus('current')
if mibBuilder.loadTexts: ceSensorExtThresholdTable.setDescription('This table lists the threshold severity, relation, and comparison value, for a sensor entity listed in entPhysicalTable.')
ceSensorExtThresholdEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 745, 1, 1, 1), ).setIndexNames((0, "ENTITY-MIB", "entPhysicalIndex"), (0, "CISCO-ENTITY-SENSOR-EXT-MIB", "ceSensorExtThresholdIndex"))
if mibBuilder.loadTexts: ceSensorExtThresholdEntry.setReference('ENTITY-MIB contains definition for entPhysicalClass')
if mibBuilder.loadTexts: ceSensorExtThresholdEntry.setStatus('current')
if mibBuilder.loadTexts: ceSensorExtThresholdEntry.setDescription("An ceSensorExtThresholdTable entry describes the thresholds for a sensor: the threshold severity, the threshold value, the relation, and the evaluation of the threshold. Only entities with entPhysicalClass 'sensor' are listed in this table. For non FRU entities the entries are created by the agent at system startup and entries are never deleted by the agent. For FRU entities the entries are created at system startup if FRU is inserted at system startup, else entries are created when FRU is inserted. Entries are deleted by the agent when FRU is removed.")
ceSensorExtThresholdIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 745, 1, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295)))
if mibBuilder.loadTexts: ceSensorExtThresholdIndex.setStatus('current')
if mibBuilder.loadTexts: ceSensorExtThresholdIndex.setDescription('An index that uniquely identifies an entry in the ceSensorExtThresholdTable. This index permits the same sensor to have several different thresholds.')
ceSensorExtThresholdSeverity = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 745, 1, 1, 1, 2), CiscoSensorThresholdSeverity()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ceSensorExtThresholdSeverity.setStatus('current')
if mibBuilder.loadTexts: ceSensorExtThresholdSeverity.setDescription('This object specifies the severity of this threshold.')
ceSensorExtThresholdRelation = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 745, 1, 1, 1, 3), CiscoSensorThresholdRelation()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ceSensorExtThresholdRelation.setStatus('current')
if mibBuilder.loadTexts: ceSensorExtThresholdRelation.setDescription("This object specifies the boolean relation between sensor value (entPhySensorValue) and threshold value (ceSensorExtThresholdValue), required to trigger the alarm. in pseudo-code, the evaluation-alarm mechanism is: ... if (evaluate(entPhySensorValue, ceSensorExtThresholdRelation, ceSensorExtThresholdValue)) then if (((ceSensorExtThresholdNotifEnable == enabled) || (ceSensorExtThresholdNotifEnable == transparent)) && (ceSensorExtThresholdNotifGlobalEnable == enabled)) then raise_alarm(sensor's entPhysicalIndex); endif endif ...")
ceSensorExtThresholdValue = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 745, 1, 1, 1, 4), EntitySensorValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ceSensorExtThresholdValue.setReference('ENTITY-SENSOR-MIB contains definitions for entPhysSensorScale and entPhySensorPrecision')
if mibBuilder.loadTexts: ceSensorExtThresholdValue.setStatus('current')
if mibBuilder.loadTexts: ceSensorExtThresholdValue.setDescription('This object specifies the value of the threshold. The value of objects entPhySensorType, entPhysSensorScale and entPhySensorPrecision for this sensor entity defines how ceSensorExtThresholdValue can be displayed or intepreted by the user. entPhySensorValue can be compared with ceSensorExtThresholdValue without taking care of semantics of both objects.')
ceSensorExtThresholdEvaluation = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 745, 1, 1, 1, 5), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ceSensorExtThresholdEvaluation.setReference('ENTITY-SENSOR-MIB contains definition for entPhySensorValueUpdateRate')
if mibBuilder.loadTexts: ceSensorExtThresholdEvaluation.setStatus('current')
if mibBuilder.loadTexts: ceSensorExtThresholdEvaluation.setDescription("This object indicates the result of the most recent evaluation of the threshold. The agent will execute the below 'evaluate' function to generate the notification. 'evaluate' function returns a boolean value. evaluate(entPhySensorValue, ceSensorExtThresholdRelation, ceSensorExtThresholdValue) If evalute function returns true then ceSensorExtThresholdEvaluation is set to 'true' If evaluate function returns false then ceSensorExtThresholdEvaluation is set to 'false'. Thresholds are evaluated at the rate indicated by entPhySensorValueUpdateRate.")
ceSensorExtThresholdNotifEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 745, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2), ("transparent", 3))).clone('transparent')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ceSensorExtThresholdNotifEnable.setStatus('current')
if mibBuilder.loadTexts: ceSensorExtThresholdNotifEnable.setDescription("A control object to activate/deactivate ceSensorExtThresholdNotification. This object should hold any of the below values. enabled(1) - The notification is enabled for this entity disabled(2) - The notification is disabled for this entity transparent(3)- The notification is enabled/disabled based on ceSensorExtThresholdNotifGlobalEnable object This object controls generation of ceSensorExtThresholdNotification for this threshold. An exception to this is, if this object is set to 'transparent' then ceSensorExtThresholdNotification for this threshold is controlled by ceSensorExtThresholdNotifGlobalEnable object. This truth table explains how ceSensorExtThresholdNotifEnable is related with ceSensorExtThresholdNotifGlobalEnable to control the ceSensorExtThresholdNotification for this threshold E = enabled, D = Disabled, T = Transparent local_flag = ceSensorExtThresholdNotifEnable global_flag = ceSensorExtThresholdNotifGlobalEnable local_flag global_flag outcome_per_interface --------------------------------------------- E E E E D D D E D D D D T E E T D D")
ciscoEntSensorExtGlobalObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 745, 1, 2))
ceSensorExtThresholdNotifGlobalEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 745, 1, 2, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ceSensorExtThresholdNotifGlobalEnable.setStatus('current')
if mibBuilder.loadTexts: ceSensorExtThresholdNotifGlobalEnable.setDescription("A control object to activate/deactivate ceSensorExtThresholdNotification. This object should hold any of the below values. enabled(1) - The notification is enabled globally on the device disabled(2)- The notification is disabled globally on the device This object enables the generation of ceSensorExtThresholdNotification globally on the device. If this object value is 'disabled', then no ceSensorExtThresholdNotification will be generated on this device. If this object value is 'enabled', then whether a ceSensorExtThresholdNotification for a threshold will be generated or not depends on the instance value of ceSensorExtThresholdNotifEnable for that threshold.")
ceSensorExtThresholdNotification = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 745, 0, 1)).setObjects(("ENTITY-MIB", "entPhysicalName"), ("ENTITY-MIB", "entPhysicalDescr"), ("ENTITY-SENSOR-MIB", "entPhySensorValue"), ("ENTITY-SENSOR-MIB", "entPhySensorType"), ("CISCO-ENTITY-SENSOR-EXT-MIB", "ceSensorExtThresholdValue"))
if mibBuilder.loadTexts: ceSensorExtThresholdNotification.setStatus('current')
if mibBuilder.loadTexts: ceSensorExtThresholdNotification.setDescription('This notification is generated once each time the sensor value crosses the threshold value specified by ceSensorExtThresholdValue object.')
ciscoEntSensorExtMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 745, 2, 1))
ciscoEntSensorExtMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 745, 2, 2))
ciscoEntSensorExtMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 745, 2, 1, 1)).setObjects(("CISCO-ENTITY-SENSOR-EXT-MIB", "ciscoEntSensorExtThresholdGroup"), ("CISCO-ENTITY-SENSOR-EXT-MIB", "ciscoEntSensorExtNotificationCtrlGroup"), ("CISCO-ENTITY-SENSOR-EXT-MIB", "ciscoEntSensorExtNotificationGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoEntSensorExtMIBCompliance = ciscoEntSensorExtMIBCompliance.setStatus('current')
if mibBuilder.loadTexts: ciscoEntSensorExtMIBCompliance.setDescription('An ENTITY-MIB implementation that adds notification for sensors in the entPhysicalTable must implement this group.')
ciscoEntSensorExtThresholdGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 745, 2, 2, 1)).setObjects(("CISCO-ENTITY-SENSOR-EXT-MIB", "ceSensorExtThresholdSeverity"), ("CISCO-ENTITY-SENSOR-EXT-MIB", "ceSensorExtThresholdRelation"), ("CISCO-ENTITY-SENSOR-EXT-MIB", "ceSensorExtThresholdValue"), ("CISCO-ENTITY-SENSOR-EXT-MIB", "ceSensorExtThresholdEvaluation"), ("CISCO-ENTITY-SENSOR-EXT-MIB", "ceSensorExtThresholdNotifEnable"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoEntSensorExtThresholdGroup = ciscoEntSensorExtThresholdGroup.setStatus('current')
if mibBuilder.loadTexts: ciscoEntSensorExtThresholdGroup.setDescription('The collection of objects which are used to describe and monitor thresholds for sensors.')
ciscoEntSensorExtNotificationGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 9, 745, 2, 2, 2)).setObjects(("CISCO-ENTITY-SENSOR-EXT-MIB", "ceSensorExtThresholdNotification"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoEntSensorExtNotificationGroup = ciscoEntSensorExtNotificationGroup.setStatus('current')
if mibBuilder.loadTexts: ciscoEntSensorExtNotificationGroup.setDescription('The collection of notifications used for monitoring sensor threshold activity.')
ciscoEntSensorExtNotificationCtrlGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 745, 2, 2, 3)).setObjects(("CISCO-ENTITY-SENSOR-EXT-MIB", "ceSensorExtThresholdNotifGlobalEnable"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoEntSensorExtNotificationCtrlGroup = ciscoEntSensorExtNotificationCtrlGroup.setStatus('current')
if mibBuilder.loadTexts: ciscoEntSensorExtNotificationCtrlGroup.setDescription('The collection of objects which provide the global notification control on ceSensorExtThresholdNotification.')
mibBuilder.exportSymbols("CISCO-ENTITY-SENSOR-EXT-MIB", ciscoEntSensorExtMIBCompliance=ciscoEntSensorExtMIBCompliance, ciscoEntSensorExtGlobalObjects=ciscoEntSensorExtGlobalObjects, ceSensorExtThresholdValue=ceSensorExtThresholdValue, ciscoEntitySensorExtMIBNotifs=ciscoEntitySensorExtMIBNotifs, ciscoEntSensorExtNotificationGroup=ciscoEntSensorExtNotificationGroup, ciscoEntSensorExtThresholdGroup=ciscoEntSensorExtThresholdGroup, ciscoEntitySensorExtMIBConform=ciscoEntitySensorExtMIBConform, ciscoEntSensorExtMIBGroups=ciscoEntSensorExtMIBGroups, ceSensorExtThresholdSeverity=ceSensorExtThresholdSeverity, ciscoEntSensorExtMIBCompliances=ciscoEntSensorExtMIBCompliances, ciscoEntitySensorExtMIB=ciscoEntitySensorExtMIB, ceSensorExtThresholdNotification=ceSensorExtThresholdNotification, ceSensorExtThresholdEvaluation=ceSensorExtThresholdEvaluation, ceSensorExtThresholdNotifEnable=ceSensorExtThresholdNotifEnable, ceSensorExtThresholdIndex=ceSensorExtThresholdIndex, ceSensorExtThresholdRelation=ceSensorExtThresholdRelation, CiscoSensorThresholdSeverity=CiscoSensorThresholdSeverity, ciscoEntitySensorExtMIBObjects=ciscoEntitySensorExtMIBObjects, ceSensorExtThresholdTable=ceSensorExtThresholdTable, CiscoSensorThresholdRelation=CiscoSensorThresholdRelation, ceSensorExtThresholdNotifGlobalEnable=ceSensorExtThresholdNotifGlobalEnable, ceSensorExtThresholdEntry=ceSensorExtThresholdEntry, PYSNMP_MODULE_ID=ciscoEntitySensorExtMIB, ciscoEntSensorExtNotificationCtrlGroup=ciscoEntSensorExtNotificationCtrlGroup)
| (octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, constraints_intersection, value_range_constraint, constraints_union, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ConstraintsIntersection', 'ValueRangeConstraint', 'ConstraintsUnion', 'SingleValueConstraint')
(cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt')
(ent_physical_name, ent_physical_descr, ent_physical_index) = mibBuilder.importSymbols('ENTITY-MIB', 'entPhysicalName', 'entPhysicalDescr', 'entPhysicalIndex')
(entity_sensor_value, ent_phy_sensor_value, ent_phy_sensor_type) = mibBuilder.importSymbols('ENTITY-SENSOR-MIB', 'EntitySensorValue', 'entPhySensorValue', 'entPhySensorType')
(module_compliance, notification_group, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup', 'ObjectGroup')
(unsigned32, object_identity, notification_type, ip_address, module_identity, counter32, integer32, time_ticks, counter64, mib_scalar, mib_table, mib_table_row, mib_table_column, mib_identifier, bits, iso, gauge32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Unsigned32', 'ObjectIdentity', 'NotificationType', 'IpAddress', 'ModuleIdentity', 'Counter32', 'Integer32', 'TimeTicks', 'Counter64', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'MibIdentifier', 'Bits', 'iso', 'Gauge32')
(truth_value, display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'DisplayString', 'TextualConvention')
cisco_entity_sensor_ext_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 745))
ciscoEntitySensorExtMIB.setRevisions(('2010-06-09 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
ciscoEntitySensorExtMIB.setRevisionsDescriptions(('Initial version of this MIB module.',))
if mibBuilder.loadTexts:
ciscoEntitySensorExtMIB.setLastUpdated('201006100000Z')
if mibBuilder.loadTexts:
ciscoEntitySensorExtMIB.setOrganization('Cisco Systems, Inc.')
if mibBuilder.loadTexts:
ciscoEntitySensorExtMIB.setContactInfo('Postal: Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706 USA Tel: +1 408 526 4000 E-mail: cs-snmp@cisco.com')
if mibBuilder.loadTexts:
ciscoEntitySensorExtMIB.setDescription('This MIB is extension to ENTITY-SENSOR-MIB(RFC 3433). This MIB also defines the notifications applicable for sensors reported in ENTITY-MIB(RFC 4133).')
cisco_entity_sensor_ext_mib_notifs = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 745, 0))
cisco_entity_sensor_ext_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 745, 1))
cisco_entity_sensor_ext_mib_conform = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 745, 2))
class Ciscosensorthresholdseverity(TextualConvention, Integer32):
description = 'sensor threshold severity. Valid values are: other(1) : a severity other than those listed below. minor(10) : Minor Problem threshold. major(20) : Major Problem threshold. critical(30): Critical problem threshold. A system might shut down the sensor associated FRU automatically if the sensor value reach the critical problem threshold.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 10, 20, 30))
named_values = named_values(('other', 1), ('minor', 10), ('major', 20), ('critical', 30))
class Ciscosensorthresholdrelation(TextualConvention, Integer32):
description = 'sensor threshold relational operator types. valid values are: lessThan(1): if the sensor value is less than the threshold value lessOrEqual(2): if the sensor value is less than or equal to the threshold value greaterThan(3): if the sensor value is greater than the threshold value greaterOrEqual(4): if the sensor value is greater than or equal to the threshold value equalTo(5): if the sensor value is equal to the threshold value notEqualTo(6): if the sensor value is not equal to the threshold value'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))
named_values = named_values(('lessThan', 1), ('lessOrEqual', 2), ('greaterThan', 3), ('greaterOrEqual', 4), ('equalTo', 5), ('notEqualTo', 6))
ce_sensor_ext_threshold_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 745, 1, 1))
if mibBuilder.loadTexts:
ceSensorExtThresholdTable.setReference('ENTITY-MIB contains definition for entPhysicalTable')
if mibBuilder.loadTexts:
ceSensorExtThresholdTable.setStatus('current')
if mibBuilder.loadTexts:
ceSensorExtThresholdTable.setDescription('This table lists the threshold severity, relation, and comparison value, for a sensor entity listed in entPhysicalTable.')
ce_sensor_ext_threshold_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 745, 1, 1, 1)).setIndexNames((0, 'ENTITY-MIB', 'entPhysicalIndex'), (0, 'CISCO-ENTITY-SENSOR-EXT-MIB', 'ceSensorExtThresholdIndex'))
if mibBuilder.loadTexts:
ceSensorExtThresholdEntry.setReference('ENTITY-MIB contains definition for entPhysicalClass')
if mibBuilder.loadTexts:
ceSensorExtThresholdEntry.setStatus('current')
if mibBuilder.loadTexts:
ceSensorExtThresholdEntry.setDescription("An ceSensorExtThresholdTable entry describes the thresholds for a sensor: the threshold severity, the threshold value, the relation, and the evaluation of the threshold. Only entities with entPhysicalClass 'sensor' are listed in this table. For non FRU entities the entries are created by the agent at system startup and entries are never deleted by the agent. For FRU entities the entries are created at system startup if FRU is inserted at system startup, else entries are created when FRU is inserted. Entries are deleted by the agent when FRU is removed.")
ce_sensor_ext_threshold_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 745, 1, 1, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295)))
if mibBuilder.loadTexts:
ceSensorExtThresholdIndex.setStatus('current')
if mibBuilder.loadTexts:
ceSensorExtThresholdIndex.setDescription('An index that uniquely identifies an entry in the ceSensorExtThresholdTable. This index permits the same sensor to have several different thresholds.')
ce_sensor_ext_threshold_severity = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 745, 1, 1, 1, 2), cisco_sensor_threshold_severity()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ceSensorExtThresholdSeverity.setStatus('current')
if mibBuilder.loadTexts:
ceSensorExtThresholdSeverity.setDescription('This object specifies the severity of this threshold.')
ce_sensor_ext_threshold_relation = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 745, 1, 1, 1, 3), cisco_sensor_threshold_relation()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ceSensorExtThresholdRelation.setStatus('current')
if mibBuilder.loadTexts:
ceSensorExtThresholdRelation.setDescription("This object specifies the boolean relation between sensor value (entPhySensorValue) and threshold value (ceSensorExtThresholdValue), required to trigger the alarm. in pseudo-code, the evaluation-alarm mechanism is: ... if (evaluate(entPhySensorValue, ceSensorExtThresholdRelation, ceSensorExtThresholdValue)) then if (((ceSensorExtThresholdNotifEnable == enabled) || (ceSensorExtThresholdNotifEnable == transparent)) && (ceSensorExtThresholdNotifGlobalEnable == enabled)) then raise_alarm(sensor's entPhysicalIndex); endif endif ...")
ce_sensor_ext_threshold_value = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 745, 1, 1, 1, 4), entity_sensor_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ceSensorExtThresholdValue.setReference('ENTITY-SENSOR-MIB contains definitions for entPhysSensorScale and entPhySensorPrecision')
if mibBuilder.loadTexts:
ceSensorExtThresholdValue.setStatus('current')
if mibBuilder.loadTexts:
ceSensorExtThresholdValue.setDescription('This object specifies the value of the threshold. The value of objects entPhySensorType, entPhysSensorScale and entPhySensorPrecision for this sensor entity defines how ceSensorExtThresholdValue can be displayed or intepreted by the user. entPhySensorValue can be compared with ceSensorExtThresholdValue without taking care of semantics of both objects.')
ce_sensor_ext_threshold_evaluation = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 745, 1, 1, 1, 5), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ceSensorExtThresholdEvaluation.setReference('ENTITY-SENSOR-MIB contains definition for entPhySensorValueUpdateRate')
if mibBuilder.loadTexts:
ceSensorExtThresholdEvaluation.setStatus('current')
if mibBuilder.loadTexts:
ceSensorExtThresholdEvaluation.setDescription("This object indicates the result of the most recent evaluation of the threshold. The agent will execute the below 'evaluate' function to generate the notification. 'evaluate' function returns a boolean value. evaluate(entPhySensorValue, ceSensorExtThresholdRelation, ceSensorExtThresholdValue) If evalute function returns true then ceSensorExtThresholdEvaluation is set to 'true' If evaluate function returns false then ceSensorExtThresholdEvaluation is set to 'false'. Thresholds are evaluated at the rate indicated by entPhySensorValueUpdateRate.")
ce_sensor_ext_threshold_notif_enable = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 745, 1, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2), ('transparent', 3))).clone('transparent')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ceSensorExtThresholdNotifEnable.setStatus('current')
if mibBuilder.loadTexts:
ceSensorExtThresholdNotifEnable.setDescription("A control object to activate/deactivate ceSensorExtThresholdNotification. This object should hold any of the below values. enabled(1) - The notification is enabled for this entity disabled(2) - The notification is disabled for this entity transparent(3)- The notification is enabled/disabled based on ceSensorExtThresholdNotifGlobalEnable object This object controls generation of ceSensorExtThresholdNotification for this threshold. An exception to this is, if this object is set to 'transparent' then ceSensorExtThresholdNotification for this threshold is controlled by ceSensorExtThresholdNotifGlobalEnable object. This truth table explains how ceSensorExtThresholdNotifEnable is related with ceSensorExtThresholdNotifGlobalEnable to control the ceSensorExtThresholdNotification for this threshold E = enabled, D = Disabled, T = Transparent local_flag = ceSensorExtThresholdNotifEnable global_flag = ceSensorExtThresholdNotifGlobalEnable local_flag global_flag outcome_per_interface --------------------------------------------- E E E E D D D E D D D D T E E T D D")
cisco_ent_sensor_ext_global_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 745, 1, 2))
ce_sensor_ext_threshold_notif_global_enable = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 745, 1, 2, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('disabled')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ceSensorExtThresholdNotifGlobalEnable.setStatus('current')
if mibBuilder.loadTexts:
ceSensorExtThresholdNotifGlobalEnable.setDescription("A control object to activate/deactivate ceSensorExtThresholdNotification. This object should hold any of the below values. enabled(1) - The notification is enabled globally on the device disabled(2)- The notification is disabled globally on the device This object enables the generation of ceSensorExtThresholdNotification globally on the device. If this object value is 'disabled', then no ceSensorExtThresholdNotification will be generated on this device. If this object value is 'enabled', then whether a ceSensorExtThresholdNotification for a threshold will be generated or not depends on the instance value of ceSensorExtThresholdNotifEnable for that threshold.")
ce_sensor_ext_threshold_notification = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 745, 0, 1)).setObjects(('ENTITY-MIB', 'entPhysicalName'), ('ENTITY-MIB', 'entPhysicalDescr'), ('ENTITY-SENSOR-MIB', 'entPhySensorValue'), ('ENTITY-SENSOR-MIB', 'entPhySensorType'), ('CISCO-ENTITY-SENSOR-EXT-MIB', 'ceSensorExtThresholdValue'))
if mibBuilder.loadTexts:
ceSensorExtThresholdNotification.setStatus('current')
if mibBuilder.loadTexts:
ceSensorExtThresholdNotification.setDescription('This notification is generated once each time the sensor value crosses the threshold value specified by ceSensorExtThresholdValue object.')
cisco_ent_sensor_ext_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 745, 2, 1))
cisco_ent_sensor_ext_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 745, 2, 2))
cisco_ent_sensor_ext_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 745, 2, 1, 1)).setObjects(('CISCO-ENTITY-SENSOR-EXT-MIB', 'ciscoEntSensorExtThresholdGroup'), ('CISCO-ENTITY-SENSOR-EXT-MIB', 'ciscoEntSensorExtNotificationCtrlGroup'), ('CISCO-ENTITY-SENSOR-EXT-MIB', 'ciscoEntSensorExtNotificationGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_ent_sensor_ext_mib_compliance = ciscoEntSensorExtMIBCompliance.setStatus('current')
if mibBuilder.loadTexts:
ciscoEntSensorExtMIBCompliance.setDescription('An ENTITY-MIB implementation that adds notification for sensors in the entPhysicalTable must implement this group.')
cisco_ent_sensor_ext_threshold_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 745, 2, 2, 1)).setObjects(('CISCO-ENTITY-SENSOR-EXT-MIB', 'ceSensorExtThresholdSeverity'), ('CISCO-ENTITY-SENSOR-EXT-MIB', 'ceSensorExtThresholdRelation'), ('CISCO-ENTITY-SENSOR-EXT-MIB', 'ceSensorExtThresholdValue'), ('CISCO-ENTITY-SENSOR-EXT-MIB', 'ceSensorExtThresholdEvaluation'), ('CISCO-ENTITY-SENSOR-EXT-MIB', 'ceSensorExtThresholdNotifEnable'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_ent_sensor_ext_threshold_group = ciscoEntSensorExtThresholdGroup.setStatus('current')
if mibBuilder.loadTexts:
ciscoEntSensorExtThresholdGroup.setDescription('The collection of objects which are used to describe and monitor thresholds for sensors.')
cisco_ent_sensor_ext_notification_group = notification_group((1, 3, 6, 1, 4, 1, 9, 9, 745, 2, 2, 2)).setObjects(('CISCO-ENTITY-SENSOR-EXT-MIB', 'ceSensorExtThresholdNotification'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_ent_sensor_ext_notification_group = ciscoEntSensorExtNotificationGroup.setStatus('current')
if mibBuilder.loadTexts:
ciscoEntSensorExtNotificationGroup.setDescription('The collection of notifications used for monitoring sensor threshold activity.')
cisco_ent_sensor_ext_notification_ctrl_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 745, 2, 2, 3)).setObjects(('CISCO-ENTITY-SENSOR-EXT-MIB', 'ceSensorExtThresholdNotifGlobalEnable'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_ent_sensor_ext_notification_ctrl_group = ciscoEntSensorExtNotificationCtrlGroup.setStatus('current')
if mibBuilder.loadTexts:
ciscoEntSensorExtNotificationCtrlGroup.setDescription('The collection of objects which provide the global notification control on ceSensorExtThresholdNotification.')
mibBuilder.exportSymbols('CISCO-ENTITY-SENSOR-EXT-MIB', ciscoEntSensorExtMIBCompliance=ciscoEntSensorExtMIBCompliance, ciscoEntSensorExtGlobalObjects=ciscoEntSensorExtGlobalObjects, ceSensorExtThresholdValue=ceSensorExtThresholdValue, ciscoEntitySensorExtMIBNotifs=ciscoEntitySensorExtMIBNotifs, ciscoEntSensorExtNotificationGroup=ciscoEntSensorExtNotificationGroup, ciscoEntSensorExtThresholdGroup=ciscoEntSensorExtThresholdGroup, ciscoEntitySensorExtMIBConform=ciscoEntitySensorExtMIBConform, ciscoEntSensorExtMIBGroups=ciscoEntSensorExtMIBGroups, ceSensorExtThresholdSeverity=ceSensorExtThresholdSeverity, ciscoEntSensorExtMIBCompliances=ciscoEntSensorExtMIBCompliances, ciscoEntitySensorExtMIB=ciscoEntitySensorExtMIB, ceSensorExtThresholdNotification=ceSensorExtThresholdNotification, ceSensorExtThresholdEvaluation=ceSensorExtThresholdEvaluation, ceSensorExtThresholdNotifEnable=ceSensorExtThresholdNotifEnable, ceSensorExtThresholdIndex=ceSensorExtThresholdIndex, ceSensorExtThresholdRelation=ceSensorExtThresholdRelation, CiscoSensorThresholdSeverity=CiscoSensorThresholdSeverity, ciscoEntitySensorExtMIBObjects=ciscoEntitySensorExtMIBObjects, ceSensorExtThresholdTable=ceSensorExtThresholdTable, CiscoSensorThresholdRelation=CiscoSensorThresholdRelation, ceSensorExtThresholdNotifGlobalEnable=ceSensorExtThresholdNotifGlobalEnable, ceSensorExtThresholdEntry=ceSensorExtThresholdEntry, PYSNMP_MODULE_ID=ciscoEntitySensorExtMIB, ciscoEntSensorExtNotificationCtrlGroup=ciscoEntSensorExtNotificationCtrlGroup) |
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Get ops from program."""
def conv_op_params(blocks, current_op):
"""Getting params of conv op
Args:
blocks: BlockDesc, current block
current_op: OpDesc, current op
Returns:
(list): op name and hyperparamters
"""
tmp, res = [], []
# op_name
tmp.append('conv')
# flag_bias
if not current_op.input('Bias'):
tmp.append(0)
else:
tmp.append(1)
# flag_relu
tmp.append(int(current_op.attr('fuse_relu')))
# batch size
tmp.append(1)
# channels, height, width
in_shapes = blocks.vars[current_op.input('Input')[0]].shape
tmp = tmp + [int(in_shapes[1]), int(in_shapes[2]), int(in_shapes[3])]
# output channels
w_shapes = blocks.vars[current_op.input('Filter')[0]].shape
tmp.append(int(w_shapes[0]))
# group
tmp.append(int(current_op.attr('groups')))
# kernel size
tmp.append(int(w_shapes[2]))
if w_shapes[2] != w_shapes[3]:
res.append(int(w_shapes[3]))
# padding
paddings = current_op.attr('paddings')
tmp.append(int(paddings[0]))
if paddings[0] != paddings[1]:
res.append(int(paddings[0]))
# strides
strides = current_op.attr('strides')
tmp.append(int(strides[0]))
if strides[0] != strides[1]:
res.append(int(strides[1]))
# dilations
dilations = current_op.attr('dilations')
tmp.append(int(dilations[0]))
if dilations[0] != dilations[1]:
res.append(int(dilations[1]))
tmp = tmp + res
return tmp
def batch_norm_op_params(blocks, current_op):
"""Getting params of batch_norm op
Args:
blocks: BlockDesc, current block
current_op: OpDesc, current op
Returns:
(list): op name and hyperparamters
"""
tmp = []
# op name
tmp.append('batch_norm')
# activation type
if not current_op.attr('fuse_with_relu'):
tmp.append('None')
else:
tmp.append('relu')
# batch size
tmp.append(1)
# input channels, height, width
in_shapes = blocks.vars[current_op.input("X")[0]].shape
tmp = tmp + [int(in_shapes[1]), int(in_shapes[2]), int(in_shapes[3])]
return tmp
def eltwise_op_params(blocks, current_op):
"""Getting params of eltwise op
Args:
blocks: BlockDesc, current block
current_op: OpDesc, current op
Returns:
(list): op name and hyperparamters
"""
# op name
tmp = ['eltwise']
# elementwise type, TODO: add more ops
if current_op.type == 'elementwise_mul':
tmp.append(1)
elif current_op.type == 'elementwise_add':
tmp.append(2)
else:
tmp.append(3)
# batch size
tmp.append(1)
# input channels, height, width
in_shapes = blocks.vars[current_op.input('X')[0]].shape
while len(in_shapes) < 4:
in_shapes = in_shapes + (1, )
for i in range(1, len(in_shapes)):
tmp.append(int(in_shapes[i]))
return tmp
def activation_op_params(blocks, current_op):
"""Getting params of activation op
Args:
blocks: BlockDesc, current block
current_op: OpDesc, current op
Returns:
(list): op name and hyperparamters
"""
tmp = []
# op name
tmp.append('activation')
# activation type
tmp.append(current_op.type)
# batch size
tmp.append(1)
# input channels, height, width
in_shapes = blocks.vars[current_op.input('X')[0]].shape
while len(in_shapes) < 4:
in_shapes = in_shapes + (1, )
for i in range(1, len(in_shapes)):
tmp.append(int(in_shapes[i]))
return tmp
def pooling_op_params(blocks, current_op):
"""Getting params of pooling op
Args:
blocks: BlockDesc, current block
current_op: OpDesc, current op
Returns:
(list): op name and hyperparamters
"""
tmp, res = [], []
# op name
tmp.append('pooling')
# global pooling
tmp.append(int(current_op.attr('global_pooling')))
# batch size
tmp.append(1)
# channels, height, width
in_shapes = blocks.vars[current_op.input('X')[0]].shape
tmp = tmp + [int(in_shapes[1]), int(in_shapes[2]), int(in_shapes[3])]
# kernel size
ksize = current_op.attr('ksize')
tmp.append(int(ksize[0]))
if ksize[0] != ksize[1]:
res.append(int(ksize[1]))
# padding
paddings = current_op.attr('paddings')
tmp.append(int(paddings[0]))
if paddings[0] != paddings[1]:
res.append(int(paddings[1]))
# stride
strides = current_op.attr('strides')
tmp.append(int(strides[0]))
if strides[0] != strides[1]:
res.append(int(strides[1]))
# ceil mode
tmp.append(int(current_op.attr('ceil_mode')))
# pool type
pool_type = current_op.attr('pooling_type')
exclusive = current_op.attr('exclusive')
if pool_type == 'max' and (not exclusive):
tmp.append(1)
elif pool_type == 'avg' and (not exclusive):
tmp.append(2)
else:
tmp.append(3)
tmp = tmp + res
return tmp
def softmax_op_params(blocks, current_op):
"""Getting params of softmax op
Args:
blocks: BlockDesc, current block
current_op: OpDesc, current op
Returns:
(list): op name and hyperparamters
"""
# op name
tmp = ['softmax']
# axis
tmp.append(current_op.attr('axis'))
# batch size
tmp.append(1)
# input channels, height, width
in_shapes = blocks.vars[current_op.input('X')[0]].shape
while len(in_shapes) < 4:
in_shapes = in_shapes + (1, )
for i in range(1, len(in_shapes)):
tmp.append(int(in_shapes[i]))
return tmp
def fc_op_params(blocks, current_op):
"""Getting params of fc op
Note:
fc op is converted to conv op with 1x1 kernels
Args:
blocks: BlockDesc, current block
current_op: OpDesc, current op
Returns:
(list): op name and hyperparamters
"""
# op name
tmp = ['conv']
# flag bias
tmp.append(0)
# flag relu
tmp.append(0)
# batch size
tmp.append(1)
# input channels, height, width
channels = 1
in_shape = blocks.vars[current_op.input('X')[0]].shape
for i in range(1, len(in_shape)):
channels *= in_shape[i]
tmp = tmp + [int(channels), 1, 1]
# output channels
tmp.append(int(blocks.vars[current_op.output('Out')[0]].shape[1]))
# groups, kernel size, padding, stride, dilation
tmp = tmp + [1, 1, 0, 1, 1]
return tmp
def get_ops_from_program(program):
"""Getting ops params from a paddle program
Args:
program(Program): The program to get ops.
Returns:
(list): ops.
"""
blocks = program.global_block()
ops = []
i = 0
while i < len(blocks.ops):
current_op = blocks.ops[i]
if current_op.type in ['conv2d', 'depthwise_conv2d']:
tmp = conv_op_params(blocks, current_op)
elif current_op.type in [
'elementwise_add', 'elementwise_mul', 'elementwise_max'
]:
tmp = eltwise_op_params(blocks, current_op)
elif current_op.type in [
'relu', 'prelu', 'sigmoid', 'relu6', 'elu', 'brelu',
'leaky_relu'
]:
tmp = activation_op_params(blocks, current_op)
elif current_op.type == 'batch_norm':
tmp = batch_norm_op_params(blocks, current_op)
elif current_op.type == 'pool2d':
tmp = pooling_op_params(blocks, current_op)
elif current_op.type == 'batch_norm':
tmp = batch_norm_op_params(blocks, current_op)
elif current_op.type == 'softmax':
tmp = softmax_op_params(blocks, current_op)
elif current_op.type == 'mul':
tmp = fc_op_params(blocks, current_op)
else:
tmp = None
if tmp:
ops.append(tmp)
i += 1
return ops
| """Get ops from program."""
def conv_op_params(blocks, current_op):
"""Getting params of conv op
Args:
blocks: BlockDesc, current block
current_op: OpDesc, current op
Returns:
(list): op name and hyperparamters
"""
(tmp, res) = ([], [])
tmp.append('conv')
if not current_op.input('Bias'):
tmp.append(0)
else:
tmp.append(1)
tmp.append(int(current_op.attr('fuse_relu')))
tmp.append(1)
in_shapes = blocks.vars[current_op.input('Input')[0]].shape
tmp = tmp + [int(in_shapes[1]), int(in_shapes[2]), int(in_shapes[3])]
w_shapes = blocks.vars[current_op.input('Filter')[0]].shape
tmp.append(int(w_shapes[0]))
tmp.append(int(current_op.attr('groups')))
tmp.append(int(w_shapes[2]))
if w_shapes[2] != w_shapes[3]:
res.append(int(w_shapes[3]))
paddings = current_op.attr('paddings')
tmp.append(int(paddings[0]))
if paddings[0] != paddings[1]:
res.append(int(paddings[0]))
strides = current_op.attr('strides')
tmp.append(int(strides[0]))
if strides[0] != strides[1]:
res.append(int(strides[1]))
dilations = current_op.attr('dilations')
tmp.append(int(dilations[0]))
if dilations[0] != dilations[1]:
res.append(int(dilations[1]))
tmp = tmp + res
return tmp
def batch_norm_op_params(blocks, current_op):
"""Getting params of batch_norm op
Args:
blocks: BlockDesc, current block
current_op: OpDesc, current op
Returns:
(list): op name and hyperparamters
"""
tmp = []
tmp.append('batch_norm')
if not current_op.attr('fuse_with_relu'):
tmp.append('None')
else:
tmp.append('relu')
tmp.append(1)
in_shapes = blocks.vars[current_op.input('X')[0]].shape
tmp = tmp + [int(in_shapes[1]), int(in_shapes[2]), int(in_shapes[3])]
return tmp
def eltwise_op_params(blocks, current_op):
"""Getting params of eltwise op
Args:
blocks: BlockDesc, current block
current_op: OpDesc, current op
Returns:
(list): op name and hyperparamters
"""
tmp = ['eltwise']
if current_op.type == 'elementwise_mul':
tmp.append(1)
elif current_op.type == 'elementwise_add':
tmp.append(2)
else:
tmp.append(3)
tmp.append(1)
in_shapes = blocks.vars[current_op.input('X')[0]].shape
while len(in_shapes) < 4:
in_shapes = in_shapes + (1,)
for i in range(1, len(in_shapes)):
tmp.append(int(in_shapes[i]))
return tmp
def activation_op_params(blocks, current_op):
"""Getting params of activation op
Args:
blocks: BlockDesc, current block
current_op: OpDesc, current op
Returns:
(list): op name and hyperparamters
"""
tmp = []
tmp.append('activation')
tmp.append(current_op.type)
tmp.append(1)
in_shapes = blocks.vars[current_op.input('X')[0]].shape
while len(in_shapes) < 4:
in_shapes = in_shapes + (1,)
for i in range(1, len(in_shapes)):
tmp.append(int(in_shapes[i]))
return tmp
def pooling_op_params(blocks, current_op):
"""Getting params of pooling op
Args:
blocks: BlockDesc, current block
current_op: OpDesc, current op
Returns:
(list): op name and hyperparamters
"""
(tmp, res) = ([], [])
tmp.append('pooling')
tmp.append(int(current_op.attr('global_pooling')))
tmp.append(1)
in_shapes = blocks.vars[current_op.input('X')[0]].shape
tmp = tmp + [int(in_shapes[1]), int(in_shapes[2]), int(in_shapes[3])]
ksize = current_op.attr('ksize')
tmp.append(int(ksize[0]))
if ksize[0] != ksize[1]:
res.append(int(ksize[1]))
paddings = current_op.attr('paddings')
tmp.append(int(paddings[0]))
if paddings[0] != paddings[1]:
res.append(int(paddings[1]))
strides = current_op.attr('strides')
tmp.append(int(strides[0]))
if strides[0] != strides[1]:
res.append(int(strides[1]))
tmp.append(int(current_op.attr('ceil_mode')))
pool_type = current_op.attr('pooling_type')
exclusive = current_op.attr('exclusive')
if pool_type == 'max' and (not exclusive):
tmp.append(1)
elif pool_type == 'avg' and (not exclusive):
tmp.append(2)
else:
tmp.append(3)
tmp = tmp + res
return tmp
def softmax_op_params(blocks, current_op):
"""Getting params of softmax op
Args:
blocks: BlockDesc, current block
current_op: OpDesc, current op
Returns:
(list): op name and hyperparamters
"""
tmp = ['softmax']
tmp.append(current_op.attr('axis'))
tmp.append(1)
in_shapes = blocks.vars[current_op.input('X')[0]].shape
while len(in_shapes) < 4:
in_shapes = in_shapes + (1,)
for i in range(1, len(in_shapes)):
tmp.append(int(in_shapes[i]))
return tmp
def fc_op_params(blocks, current_op):
"""Getting params of fc op
Note:
fc op is converted to conv op with 1x1 kernels
Args:
blocks: BlockDesc, current block
current_op: OpDesc, current op
Returns:
(list): op name and hyperparamters
"""
tmp = ['conv']
tmp.append(0)
tmp.append(0)
tmp.append(1)
channels = 1
in_shape = blocks.vars[current_op.input('X')[0]].shape
for i in range(1, len(in_shape)):
channels *= in_shape[i]
tmp = tmp + [int(channels), 1, 1]
tmp.append(int(blocks.vars[current_op.output('Out')[0]].shape[1]))
tmp = tmp + [1, 1, 0, 1, 1]
return tmp
def get_ops_from_program(program):
"""Getting ops params from a paddle program
Args:
program(Program): The program to get ops.
Returns:
(list): ops.
"""
blocks = program.global_block()
ops = []
i = 0
while i < len(blocks.ops):
current_op = blocks.ops[i]
if current_op.type in ['conv2d', 'depthwise_conv2d']:
tmp = conv_op_params(blocks, current_op)
elif current_op.type in ['elementwise_add', 'elementwise_mul', 'elementwise_max']:
tmp = eltwise_op_params(blocks, current_op)
elif current_op.type in ['relu', 'prelu', 'sigmoid', 'relu6', 'elu', 'brelu', 'leaky_relu']:
tmp = activation_op_params(blocks, current_op)
elif current_op.type == 'batch_norm':
tmp = batch_norm_op_params(blocks, current_op)
elif current_op.type == 'pool2d':
tmp = pooling_op_params(blocks, current_op)
elif current_op.type == 'batch_norm':
tmp = batch_norm_op_params(blocks, current_op)
elif current_op.type == 'softmax':
tmp = softmax_op_params(blocks, current_op)
elif current_op.type == 'mul':
tmp = fc_op_params(blocks, current_op)
else:
tmp = None
if tmp:
ops.append(tmp)
i += 1
return ops |
def binary_search(array, target):
start_index = 0
end_index = len(array) - 1
while start_index <= end_index:
mid_index = (start_index + end_index) // 2 # integer division in Python 3
mid_element = array[mid_index]
if target == mid_element: # we have found the element
return mid_index
elif target < mid_element: # the target is less than mid element
end_index = mid_index - 1 # we will only search in the left half
else: # the target is greater than mid element
start_index = mid_element + 1 # we will search only in the right half
return -1
def test_function(test_case):
answer = binary_search(test_case[0], test_case[1])
if answer == test_case[2]:
print("Pass!")
else:
print("Fail!")
array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
target = 6
index = 6
test_case = [array, target, index]
test_function(test_case) | def binary_search(array, target):
start_index = 0
end_index = len(array) - 1
while start_index <= end_index:
mid_index = (start_index + end_index) // 2
mid_element = array[mid_index]
if target == mid_element:
return mid_index
elif target < mid_element:
end_index = mid_index - 1
else:
start_index = mid_element + 1
return -1
def test_function(test_case):
answer = binary_search(test_case[0], test_case[1])
if answer == test_case[2]:
print('Pass!')
else:
print('Fail!')
array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
target = 6
index = 6
test_case = [array, target, index]
test_function(test_case) |
#!/usr/bin/python3
# code_generator.py
def add_layers(layers):
return_string = '''model = tf.keras.Sequential()\n'''
for layer in layers:
if layer['type'] == 'dense':
if layer['activation_function'] is not None:
return_string += '''model.add(tf.keras.layers.Dense(units={units}, activation=\'{activation}\',
use_bias={use_bias}))\n''' \
.format(units=layer['nodes'], activation=layer['activation_function'], use_bias=layer['use_bias'])
else:
return_string += '''model.add(tf.keras.layers.Dense(units={units}, activation={activation},
use_bias={use_bias}))\n''' \
.format(units=layer['nodes'], activation=layer['activation_function'], use_bias=layer['use_bias'])
elif layer['type'] == 'input_layer':
return_string += '''model.add(tf.keras.layers.InputLayer(input_shape={input_shape})\n''' \
.format(input_shape=layer['input_shape'])
elif layer['type'] == 'flatten':
return_string += '''model.add(tf.keras.layers.Flatten())\n'''
elif layer['type'] == 'embedding':
return_string += '''model.add(tf.keras.layers.Embedding(input_dim={input_dim}, output_dim={output_dim}\n''' \
.format(input_dim=layer['input_dim'], output_dim=layer['output_dim'])
elif layer['type'] == 'dropout':
return_string += '''model.add(tf.keras.layers.Dropout(rate={rate}\n''' \
.format(rate=layer['rate'])
elif layer['type'] == 'batch_normalization':
return_string += '''model.add(tf.keras.layers.BatchNormalization(axis={axis}, momentum={momentum},
epsilon={epsilon})\n''' \
.format(axis=layer['axis'], momentum=layer['momentum'], epsilon=layer['epsilon'])
elif layer['type'] == 'conv_2d':
if layer['activation_function'] is not None:
return_string += '''model.add(tf.keras.layers.Conv2D(filters={filters}, kernel_size={kernel_size},
strides={strides}, activation=\'{activation}\', use_bias={use_bias})\n''' \
.format(filters=layer['filters'], kernel_size=layer['kernel_size'], strides=layer['strides'],
activation=layer['activation_function'], use_bias=layer['use_bias'])
else:
return_string += '''model.add(tf.keras.layers.Conv2D(filters={filters}, kernel_size={kernel_size},
strides={strides}, activation={activation}, use_bias={use_bias})\n''' \
.format(filters=layer['filters'], kernel_size=layer['kernel_size'], strides=layer['strides'],
activation=layer['activation_function'], use_bias=layer['use_bias'])
elif layer['type'] == 'max_pooling_2d':
return_string += '''model.add(tf.keras.layers.MaxPool2D(pool_size={pool_size}, strides={strides})\n''' \
.format(pool_size=layer['kernel_size'], strides=layer['strides'])
elif layer['type'] == 'average_pooling_2d':
return_string += '''model.add(tf.keras.layers.AveragePooling2D(pool_size={pool_size}, strides={strides})\n''' \
.format(pool_size=layer['kernel_size'], strides=layer['strides'])
elif layer['type'] == 'rnn':
if layer['activation_function'] is not None:
return_string += '''model.add(tf.keras.layers.SimpleRNN(units={units}, activation=\'{activation}\',
use_bias={use_bias}, dropout={dropout}, recurrent_dropout={recurrent_dropout})\n''' \
.format(units=layer['nodes'], activation=layer['activation_function'], use_bias=layer['use_bias'],
dropout=layer['dropout'], recurrent_dropout=layer['recurrent_dropout'])
else:
return_string += '''model.add(tf.keras.layers.SimpleRNN(units={units}, activation={activation},
use_bias={use_bias}, dropout={dropout}, recurrent_dropout={recurrent_dropout})\n''' \
.format(units=layer['nodes'], activation=layer['activation_function'], use_bias=layer['use_bias'],
dropout=layer['dropout'], recurrent_dropout=layer['recurrent_dropout'])
elif layer['type'] == 'lstm':
if layer['activation_function'] is None and layer['recurrent_activation'] is not None:
return_string += '''model.add(tf.keras.layers.LSTM(units={units}, activation={activation},
recurrent_activation=\'{recurrent_activation}\', use_bias={use_bias}, dropout={dropout},
recurrent_dropout={recurrent_dropout})\n''' \
.format(units=layer['nodes'], activation=layer['activation_function'],
recurrent_activation=layer['recurrent_activation_function'], use_bias=layer['use_bias'],
dropout=layer['dropout'], recurrent_dropout=layer['recurrent_dropout'])
elif layer['activation_function'] is not None and layer['recurrent_activation'] is None:
return_string += '''model.add(tf.keras.layers.LSTM(units={units}, activation=\'{activation}\',
recurrent_activation={recurrent_activation}, use_bias={use_bias}, dropout={dropout},
recurrent_dropout={recurrent_dropout})\n''' \
.format(units=layer['nodes'], activation=layer['activation_function'],
recurrent_activation=layer['recurrent_activation_function'], use_bias=layer['use_bias'],
dropout=layer['dropout'], recurrent_dropout=layer['recurrent_dropout'])
elif layer['activation_function'] is None and layer['recurrent_activation'] is None:
return_string += '''model.add(tf.keras.layers.LSTM(units={units}, activation={activation},
recurrent_activation={recurrent_activation}, use_bias={use_bias}, dropout={dropout},
recurrent_dropout={recurrent_dropout})\n''' \
.format(units=layer['nodes'], activation=layer['activation_function'],
recurrent_activation=layer['recurrent_activation_function'], use_bias=layer['use_bias'],
dropout=layer['dropout'], recurrent_dropout=layer['recurrent_dropout'])
else:
return_string += '''model.add(tf.keras.layers.LSTM(units={units}, activation=\'{activation}\',
recurrent_activation=\'{recurrent_activation}\', use_bias={use_bias}, dropout={dropout},
recurrent_dropout={recurrent_dropout})\n''' \
.format(units=layer['nodes'], activation=layer['activation_function'],
recurrent_activation=layer['recurrent_activation_function'], use_bias=layer['use_bias'],
dropout=layer['dropout'], recurrent_dropout=layer['recurrent_dropout'])
elif layer['type'] == 'gru':
if layer['activation_function'] is None and layer['recurrent_activation'] is not None:
return_string += '''model.add(tf.keras.layers.GRU(units={units}, activation={activation},
recurrent_activation=\'{recurrent_activation}\', use_bias={use_bias}, dropout={dropout},
recurrent_dropout={recurrent_dropout})\n''' \
.format(units=layer['nodes'], activation=layer['activation_function'],
recurrent_activation=layer['recurrent_activation_function'], use_bias=layer['use_bias'],
dropout=layer['dropout'], recurrent_dropout=layer['recurrent_dropout'])
elif layer['activation_function'] is not None and layer['recurrent_activation'] is None:
return_string += '''model.add(tf.keras.layers.GRU(units={units}, activation=\'{activation}\',
recurrent_activation={recurrent_activation}, use_bias={use_bias}, dropout={dropout},
recurrent_dropout={recurrent_dropout})\n''' \
.format(units=layer['nodes'], activation=layer['activation_function'],
recurrent_activation=layer['recurrent_activation_function'], use_bias=layer['use_bias'],
dropout=layer['dropout'], recurrent_dropout=layer['recurrent_dropout'])
elif layer['activation_function'] is None and layer['recurrent_activation'] is None:
return_string += '''model.add(tf.keras.layers.GRU(units={units}, activation={activation},
recurrent_activation={recurrent_activation}, use_bias={use_bias}, dropout={dropout},
recurrent_dropout={recurrent_dropout})\n''' \
.format(units=layer['nodes'], activation=layer['activation_function'],
recurrent_activation=layer['recurrent_activation_function'], use_bias=layer['use_bias'],
dropout=layer['dropout'], recurrent_dropout=layer['recurrent_dropout'])
else:
return_string += '''model.add(tf.keras.layers.GRU(units={units}, activation=\'{activation}\',
recurrent_activation=\'{recurrent_activation}\', use_bias={use_bias}, dropout={dropout},
recurrent_dropout={recurrent_dropout})\n''' \
.format(units=layer['nodes'], activation=layer['activation_function'],
recurrent_activation=layer['recurrent_activation_function'], use_bias=layer['use_bias'],
dropout=layer['dropout'], recurrent_dropout=layer['recurrent_dropout'])
return return_string
def add_compile_fit(optimizer, x_train, y_train, loss, batch_size, epochs):
if optimizer is None and loss is not None:
return_string = '''model.compile(optimizer={optimizer}, loss=\'{loss}\')\n''' \
.format(optimizer=optimizer, loss=loss)
elif optimizer is not None and loss is None:
return_string = '''model.compile(optimizer=\'{optimizer}\', loss={loss})\n''' \
.format(optimizer=optimizer, loss=loss)
elif optimizer is None and loss is None:
return_string = '''model.compile(optimizer={optimizer}, loss={loss})\n''' \
.format(optimizer=optimizer, loss=loss)
else:
return_string = '''model.compile(optimizer=\'{optimizer}\', loss={loss})\n''' \
.format(optimizer=optimizer, loss=loss)
if x_train is None or y_train is None:
return_string += '''model.fit(
# x_train,
# y_train,
batch_size={batch_size}, epochs={epochs}
)\n''' \
.format(batch_size=batch_size, epochs=epochs)
else:
return_string += '''model.fit(x_train, y_train, batch_size={batch_size}, epochs={epochs})\n''' \
.format(batch_size=batch_size, epochs=epochs)
return return_string
def generate_template(layers, loss='mse', optimizer='sgd', x_train=None, y_train=None, batch_size=32, epochs=10):
template = '''import tensorflow as tf\n'''
template += add_layers(layers)
template += add_compile_fit(optimizer, x_train, y_train, loss, batch_size, epochs)
return template
# TEST
'''layers = [{'type': 'dense',
'nodes': 10,
'activation_function': None,
'use_bias': True},
{'type': 'dense',
'nodes': 5,
'activation_function': 'relu',
'use_bias': True}]
print(generate_template(layers=layers))''' | def add_layers(layers):
return_string = 'model = tf.keras.Sequential()\n'
for layer in layers:
if layer['type'] == 'dense':
if layer['activation_function'] is not None:
return_string += "model.add(tf.keras.layers.Dense(units={units}, activation='{activation}', \n use_bias={use_bias}))\n".format(units=layer['nodes'], activation=layer['activation_function'], use_bias=layer['use_bias'])
else:
return_string += 'model.add(tf.keras.layers.Dense(units={units}, activation={activation}, \n use_bias={use_bias}))\n'.format(units=layer['nodes'], activation=layer['activation_function'], use_bias=layer['use_bias'])
elif layer['type'] == 'input_layer':
return_string += 'model.add(tf.keras.layers.InputLayer(input_shape={input_shape})\n'.format(input_shape=layer['input_shape'])
elif layer['type'] == 'flatten':
return_string += 'model.add(tf.keras.layers.Flatten())\n'
elif layer['type'] == 'embedding':
return_string += 'model.add(tf.keras.layers.Embedding(input_dim={input_dim}, output_dim={output_dim}\n'.format(input_dim=layer['input_dim'], output_dim=layer['output_dim'])
elif layer['type'] == 'dropout':
return_string += 'model.add(tf.keras.layers.Dropout(rate={rate}\n'.format(rate=layer['rate'])
elif layer['type'] == 'batch_normalization':
return_string += 'model.add(tf.keras.layers.BatchNormalization(axis={axis}, momentum={momentum}, \n epsilon={epsilon})\n'.format(axis=layer['axis'], momentum=layer['momentum'], epsilon=layer['epsilon'])
elif layer['type'] == 'conv_2d':
if layer['activation_function'] is not None:
return_string += "model.add(tf.keras.layers.Conv2D(filters={filters}, kernel_size={kernel_size}, \n strides={strides}, activation='{activation}', use_bias={use_bias})\n".format(filters=layer['filters'], kernel_size=layer['kernel_size'], strides=layer['strides'], activation=layer['activation_function'], use_bias=layer['use_bias'])
else:
return_string += 'model.add(tf.keras.layers.Conv2D(filters={filters}, kernel_size={kernel_size}, \n strides={strides}, activation={activation}, use_bias={use_bias})\n'.format(filters=layer['filters'], kernel_size=layer['kernel_size'], strides=layer['strides'], activation=layer['activation_function'], use_bias=layer['use_bias'])
elif layer['type'] == 'max_pooling_2d':
return_string += 'model.add(tf.keras.layers.MaxPool2D(pool_size={pool_size}, strides={strides})\n'.format(pool_size=layer['kernel_size'], strides=layer['strides'])
elif layer['type'] == 'average_pooling_2d':
return_string += 'model.add(tf.keras.layers.AveragePooling2D(pool_size={pool_size}, strides={strides})\n'.format(pool_size=layer['kernel_size'], strides=layer['strides'])
elif layer['type'] == 'rnn':
if layer['activation_function'] is not None:
return_string += "model.add(tf.keras.layers.SimpleRNN(units={units}, activation='{activation}', \n use_bias={use_bias}, dropout={dropout}, recurrent_dropout={recurrent_dropout})\n".format(units=layer['nodes'], activation=layer['activation_function'], use_bias=layer['use_bias'], dropout=layer['dropout'], recurrent_dropout=layer['recurrent_dropout'])
else:
return_string += 'model.add(tf.keras.layers.SimpleRNN(units={units}, activation={activation}, \n use_bias={use_bias}, dropout={dropout}, recurrent_dropout={recurrent_dropout})\n'.format(units=layer['nodes'], activation=layer['activation_function'], use_bias=layer['use_bias'], dropout=layer['dropout'], recurrent_dropout=layer['recurrent_dropout'])
elif layer['type'] == 'lstm':
if layer['activation_function'] is None and layer['recurrent_activation'] is not None:
return_string += "model.add(tf.keras.layers.LSTM(units={units}, activation={activation}, \n recurrent_activation='{recurrent_activation}', use_bias={use_bias}, dropout={dropout}, \n recurrent_dropout={recurrent_dropout})\n".format(units=layer['nodes'], activation=layer['activation_function'], recurrent_activation=layer['recurrent_activation_function'], use_bias=layer['use_bias'], dropout=layer['dropout'], recurrent_dropout=layer['recurrent_dropout'])
elif layer['activation_function'] is not None and layer['recurrent_activation'] is None:
return_string += "model.add(tf.keras.layers.LSTM(units={units}, activation='{activation}', \n recurrent_activation={recurrent_activation}, use_bias={use_bias}, dropout={dropout}, \n recurrent_dropout={recurrent_dropout})\n".format(units=layer['nodes'], activation=layer['activation_function'], recurrent_activation=layer['recurrent_activation_function'], use_bias=layer['use_bias'], dropout=layer['dropout'], recurrent_dropout=layer['recurrent_dropout'])
elif layer['activation_function'] is None and layer['recurrent_activation'] is None:
return_string += 'model.add(tf.keras.layers.LSTM(units={units}, activation={activation}, \n recurrent_activation={recurrent_activation}, use_bias={use_bias}, dropout={dropout}, \n recurrent_dropout={recurrent_dropout})\n'.format(units=layer['nodes'], activation=layer['activation_function'], recurrent_activation=layer['recurrent_activation_function'], use_bias=layer['use_bias'], dropout=layer['dropout'], recurrent_dropout=layer['recurrent_dropout'])
else:
return_string += "model.add(tf.keras.layers.LSTM(units={units}, activation='{activation}', \n recurrent_activation='{recurrent_activation}', use_bias={use_bias}, dropout={dropout}, \n recurrent_dropout={recurrent_dropout})\n".format(units=layer['nodes'], activation=layer['activation_function'], recurrent_activation=layer['recurrent_activation_function'], use_bias=layer['use_bias'], dropout=layer['dropout'], recurrent_dropout=layer['recurrent_dropout'])
elif layer['type'] == 'gru':
if layer['activation_function'] is None and layer['recurrent_activation'] is not None:
return_string += "model.add(tf.keras.layers.GRU(units={units}, activation={activation}, \n recurrent_activation='{recurrent_activation}', use_bias={use_bias}, dropout={dropout}, \n recurrent_dropout={recurrent_dropout})\n".format(units=layer['nodes'], activation=layer['activation_function'], recurrent_activation=layer['recurrent_activation_function'], use_bias=layer['use_bias'], dropout=layer['dropout'], recurrent_dropout=layer['recurrent_dropout'])
elif layer['activation_function'] is not None and layer['recurrent_activation'] is None:
return_string += "model.add(tf.keras.layers.GRU(units={units}, activation='{activation}', \n recurrent_activation={recurrent_activation}, use_bias={use_bias}, dropout={dropout}, \n recurrent_dropout={recurrent_dropout})\n".format(units=layer['nodes'], activation=layer['activation_function'], recurrent_activation=layer['recurrent_activation_function'], use_bias=layer['use_bias'], dropout=layer['dropout'], recurrent_dropout=layer['recurrent_dropout'])
elif layer['activation_function'] is None and layer['recurrent_activation'] is None:
return_string += 'model.add(tf.keras.layers.GRU(units={units}, activation={activation}, \n recurrent_activation={recurrent_activation}, use_bias={use_bias}, dropout={dropout}, \n recurrent_dropout={recurrent_dropout})\n'.format(units=layer['nodes'], activation=layer['activation_function'], recurrent_activation=layer['recurrent_activation_function'], use_bias=layer['use_bias'], dropout=layer['dropout'], recurrent_dropout=layer['recurrent_dropout'])
else:
return_string += "model.add(tf.keras.layers.GRU(units={units}, activation='{activation}', \n recurrent_activation='{recurrent_activation}', use_bias={use_bias}, dropout={dropout}, \n recurrent_dropout={recurrent_dropout})\n".format(units=layer['nodes'], activation=layer['activation_function'], recurrent_activation=layer['recurrent_activation_function'], use_bias=layer['use_bias'], dropout=layer['dropout'], recurrent_dropout=layer['recurrent_dropout'])
return return_string
def add_compile_fit(optimizer, x_train, y_train, loss, batch_size, epochs):
if optimizer is None and loss is not None:
return_string = "model.compile(optimizer={optimizer}, loss='{loss}')\n".format(optimizer=optimizer, loss=loss)
elif optimizer is not None and loss is None:
return_string = "model.compile(optimizer='{optimizer}', loss={loss})\n".format(optimizer=optimizer, loss=loss)
elif optimizer is None and loss is None:
return_string = 'model.compile(optimizer={optimizer}, loss={loss})\n'.format(optimizer=optimizer, loss=loss)
else:
return_string = "model.compile(optimizer='{optimizer}', loss={loss})\n".format(optimizer=optimizer, loss=loss)
if x_train is None or y_train is None:
return_string += 'model.fit( \n # x_train,\n # y_train,\n batch_size={batch_size}, epochs={epochs}\n )\n'.format(batch_size=batch_size, epochs=epochs)
else:
return_string += 'model.fit(x_train, y_train, batch_size={batch_size}, epochs={epochs})\n'.format(batch_size=batch_size, epochs=epochs)
return return_string
def generate_template(layers, loss='mse', optimizer='sgd', x_train=None, y_train=None, batch_size=32, epochs=10):
template = 'import tensorflow as tf\n'
template += add_layers(layers)
template += add_compile_fit(optimizer, x_train, y_train, loss, batch_size, epochs)
return template
"layers = [{'type': 'dense',\n 'nodes': 10,\n 'activation_function': None,\n 'use_bias': True},\n {'type': 'dense',\n 'nodes': 5,\n 'activation_function': 'relu',\n 'use_bias': True}]\nprint(generate_template(layers=layers))" |
#Iris Data sorted into columns
#Hugh O'Reilly 04/03/18
with open("data/iris.csv") as f: #Opens Iris data set csv file in data folder
for line in f:# loops through each line
line = line.replace(',', ' ') #replaces comma with space, code from Mohamed Noor
line = line.rstrip() #Removes nextline code on end, code from Mohamed Noor
print(line.split(',')[:]) #Splits and Prints
#each line as a list, colon separates each item in
# columns
for column in f:
print (f.read())
| with open('data/iris.csv') as f:
for line in f:
line = line.replace(',', ' ')
line = line.rstrip()
print(line.split(',')[:])
for column in f:
print(f.read()) |
#Euler Problem 5 Lowest common multiple
# Michael Garvey
# credits: https://gist.github.com/PEZ/47534
i = 1
for k in (range(1, 21)): #using range to test numbers 1 to 20
if i % k > 0:
for j in range(1, 21):
if (i*j) % k == 0:
i *= j
break
print (i) | i = 1
for k in range(1, 21):
if i % k > 0:
for j in range(1, 21):
if i * j % k == 0:
i *= j
break
print(i) |
def mergeSort(array):
print(f"Splitting the array {array}")
if len(array)>1:
mid = len(array)//2
lefthalf = array[:mid]
righthalf = array[mid:]
mergeSort(lefthalf)
mergeSort(righthalf)
i=j=k=0
while i < len(lefthalf) and j < len(righthalf):
if lefthalf[i] < righthalf[j]:
array[k]=lefthalf[i]
i=i+1
else:
array[k]=righthalf[j]
j=j+1
k=k+1
while i < len(lefthalf):
array[k]=lefthalf[i]
i=i+1
k=k+1
while j < len(righthalf):
array[k]=righthalf[j]
j=j+1
k=k+1
# print(f"List Sorting => {array}")
arr = [145,426,4333,2217,7,1,4321315,2312423434321,-5525,-5,-125688]
mergeSort(arr)
for i in range(len(arr)):
print (f"{arr[i]}", end=" "),
| def merge_sort(array):
print(f'Splitting the array {array}')
if len(array) > 1:
mid = len(array) // 2
lefthalf = array[:mid]
righthalf = array[mid:]
merge_sort(lefthalf)
merge_sort(righthalf)
i = j = k = 0
while i < len(lefthalf) and j < len(righthalf):
if lefthalf[i] < righthalf[j]:
array[k] = lefthalf[i]
i = i + 1
else:
array[k] = righthalf[j]
j = j + 1
k = k + 1
while i < len(lefthalf):
array[k] = lefthalf[i]
i = i + 1
k = k + 1
while j < len(righthalf):
array[k] = righthalf[j]
j = j + 1
k = k + 1
arr = [145, 426, 4333, 2217, 7, 1, 4321315, 2312423434321, -5525, -5, -125688]
merge_sort(arr)
for i in range(len(arr)):
(print(f'{arr[i]}', end=' '),) |
class Solution:
def storeProfit(self, profit):
print(self.profits, profit)
store_idx = -1
min = None
print(self.profits)
for i, val in enumerate(self.profits):
if min is None:
min = val
store_idx = i
if val == 0:
self.profits[i] = profit
return
elif val < min:
store_idx = i
min = val
if store_idx > -1 and profit > self.profits[store_idx]:
self.profits[store_idx] = profit
def maxProfit(self, prices):
"""
:type prices: List[int]
:rtype: int
"""
self.profits = [0, 0]
min_val = None
max_val = None
for i in prices:
# print(i, min_val, max_val, profit)
# if first, then register it is min_val
if min_val is None:
min_val = max_val = i
continue
# if greater than the previous store it as max_val, but continue
if i >= max_val:
max_val = i
# if lesser than the previous
else:
if max_val > min_val:
# calculate profit as max_val - min_val
profit = max_val - min_val
self.storeProfit(profit)
min_val = i
# store it as the new min_val
# initialize max_val
max_val = i
if max_val is not None and max_val > min_val:
profit = max_val - min_val
self.storeProfit(profit)
print(self.profits)
return sum(self.profits)
sol = Solution()
print(sol.maxProfit([7,1,5,3,6,4]))
print(sol.maxProfit([1,2,3,4,5]))
print(sol.maxProfit([7,6,4,3,1]))
print(sol.maxProfit([3,3,5,0,0,3,1,4]))
print(sol.maxProfit([6,1,3,2,4,7]))
print(sol.maxProfit([1,2,4,2,5,7,2,4,9,0])) | class Solution:
def store_profit(self, profit):
print(self.profits, profit)
store_idx = -1
min = None
print(self.profits)
for (i, val) in enumerate(self.profits):
if min is None:
min = val
store_idx = i
if val == 0:
self.profits[i] = profit
return
elif val < min:
store_idx = i
min = val
if store_idx > -1 and profit > self.profits[store_idx]:
self.profits[store_idx] = profit
def max_profit(self, prices):
"""
:type prices: List[int]
:rtype: int
"""
self.profits = [0, 0]
min_val = None
max_val = None
for i in prices:
if min_val is None:
min_val = max_val = i
continue
if i >= max_val:
max_val = i
else:
if max_val > min_val:
profit = max_val - min_val
self.storeProfit(profit)
min_val = i
max_val = i
if max_val is not None and max_val > min_val:
profit = max_val - min_val
self.storeProfit(profit)
print(self.profits)
return sum(self.profits)
sol = solution()
print(sol.maxProfit([7, 1, 5, 3, 6, 4]))
print(sol.maxProfit([1, 2, 3, 4, 5]))
print(sol.maxProfit([7, 6, 4, 3, 1]))
print(sol.maxProfit([3, 3, 5, 0, 0, 3, 1, 4]))
print(sol.maxProfit([6, 1, 3, 2, 4, 7]))
print(sol.maxProfit([1, 2, 4, 2, 5, 7, 2, 4, 9, 0])) |
"""craigslist - A Discord bot to facilitate playing Millenial Apartment Hunters"""
__version__ = '0.1.0'
__author__ = 'Rose Davidson <rose@metaclassical.com>'
__all__ = []
| """craigslist - A Discord bot to facilitate playing Millenial Apartment Hunters"""
__version__ = '0.1.0'
__author__ = 'Rose Davidson <rose@metaclassical.com>'
__all__ = [] |
# def add(num1, num2):
# # just put these initial values down to the length
# x = len(str(num1))
# y = len(str(num2))
# z = 0
# if x >= y :
# for k in range(0,x):
# z = z + int(num1/(10**x)) + int(num2/(10**x))
# else:
# for k in range(0,y):
# z = z + int(num1/(10**y)) + int(num2/(10**y))
# return z
def add(num1, num2):
# PART 1:
# Last numbers added together
x = (num1 - (int(num1/10))*10)
y = (num2 - (int(num2/10))*10)
if x == 0 and y == 0:
z = num1 + num2
elif x == 0:
z = num1 + y
elif y == 0:
z = x + num2
else:
z = x + y
# return z
# Plan is to change this into a string value and add it at the end
# PART 2:
# Last numbers added together
a = len(str(num1))-1
b = len(str(num2))-1
c = int(num1/(10**a)) + int(num2/(10**a))
f = int(num1/(10**(a-1))) + int(num2/(10**(a-1)))
return int(str(c)+str(f)+str(z))
print(add(807,337))
| def add(num1, num2):
x = num1 - int(num1 / 10) * 10
y = num2 - int(num2 / 10) * 10
if x == 0 and y == 0:
z = num1 + num2
elif x == 0:
z = num1 + y
elif y == 0:
z = x + num2
else:
z = x + y
a = len(str(num1)) - 1
b = len(str(num2)) - 1
c = int(num1 / 10 ** a) + int(num2 / 10 ** a)
f = int(num1 / 10 ** (a - 1)) + int(num2 / 10 ** (a - 1))
return int(str(c) + str(f) + str(z))
print(add(807, 337)) |
"""
shortcut to run docker remove commands
"""
def get_rmi_command(info_list):
"""
JUST USE: docker rmi $(docker images -f "dangling=true" -q)
<none> <none> 591446e60492 4 days ago 796MB
<none> <none> f2f37f4e35fa 4 days ago 1.02GB
<none> <none> ff14b547855c 4 days ago 1.02GB
"""
image_ids = []
for line in info_list.split('\n'):
items = line.split()
if items and items[0] == '<none>':
image_ids.append(items[2])
#
print('docker rmi %s' % ' '.join(image_ids))
def get_rm_command(info_list):
"""
JUST USE: docker rm $(docker ps -q -f status=exited)
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9094581ecdcf 9721cecf623c "/bin/sh -c '/bin/..." 4 days ago Exited (126) 4 days ago frosty_colden
7e3c9c8a6e4d 591446e60492 "/bin/sh -c '/bin/..." 4 days ago Exited (1) 4 days ago gallant_pare
"""
image_ids = []
for line in info_list.split('\n'):
items = line.split()
if items and items[0] != 'CONTAINER':
image_ids.append(items[1])
#
print('docker rm %s' % ' '.join(image_ids))
| """
shortcut to run docker remove commands
"""
def get_rmi_command(info_list):
"""
JUST USE: docker rmi $(docker images -f "dangling=true" -q)
<none> <none> 591446e60492 4 days ago 796MB
<none> <none> f2f37f4e35fa 4 days ago 1.02GB
<none> <none> ff14b547855c 4 days ago 1.02GB
"""
image_ids = []
for line in info_list.split('\n'):
items = line.split()
if items and items[0] == '<none>':
image_ids.append(items[2])
print('docker rmi %s' % ' '.join(image_ids))
def get_rm_command(info_list):
"""
JUST USE: docker rm $(docker ps -q -f status=exited)
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9094581ecdcf 9721cecf623c "/bin/sh -c '/bin/..." 4 days ago Exited (126) 4 days ago frosty_colden
7e3c9c8a6e4d 591446e60492 "/bin/sh -c '/bin/..." 4 days ago Exited (1) 4 days ago gallant_pare
"""
image_ids = []
for line in info_list.split('\n'):
items = line.split()
if items and items[0] != 'CONTAINER':
image_ids.append(items[1])
print('docker rm %s' % ' '.join(image_ids)) |
def _render(template, context, app):
"""Renders the template and fires the signal"""
before_render_template.send(app, template=template, context=context)
rv = template.render(context)
template_rendered.send(app, template=template, context=context)
return rv
| def _render(template, context, app):
"""Renders the template and fires the signal"""
before_render_template.send(app, template=template, context=context)
rv = template.render(context)
template_rendered.send(app, template=template, context=context)
return rv |
class HTTP404(Exception):
def __init__(self):
super(HTTP404, self).__init__()
self.code = 404
def __str__(self):
return "404: Page Not Found"
def __repr__(self):
return self.__str__()
| class Http404(Exception):
def __init__(self):
super(HTTP404, self).__init__()
self.code = 404
def __str__(self):
return '404: Page Not Found'
def __repr__(self):
return self.__str__() |
#Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate between).
#
#For example:
#Given binary tree [3,9,20,null,null,15,7],
# 3
# / \
# 9 20
# / \
# 15 7
#return its zigzag level order traversal as:
#[
# [3],
# [20,9],
# [15,7]
#]
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def zigzagLevelOrder(self, root):
"""
:type root: TreeNode
:rtype: List[List[int]]
"""
ans=[]
child=[root]
c=0
while child:
temp,temp2=[],[]
for i in child:
if i:
temp.append(i.left)
temp.append(i.right)
temp2.append(i.val)
if temp2:
if c&1:
ans.append(temp2[::-1])
else:
ans.append(temp2)
c+=1
child=temp
return ans | class Solution(object):
def zigzag_level_order(self, root):
"""
:type root: TreeNode
:rtype: List[List[int]]
"""
ans = []
child = [root]
c = 0
while child:
(temp, temp2) = ([], [])
for i in child:
if i:
temp.append(i.left)
temp.append(i.right)
temp2.append(i.val)
if temp2:
if c & 1:
ans.append(temp2[::-1])
else:
ans.append(temp2)
c += 1
child = temp
return ans |
version=''
commithash='64db13864cb1b377c8a9ab7c08e4688d3d1f94ef'
gittag_short=''
gittag_long='64db138-dirty'
git_lastmod='Mon, 15 May 2017 14:34:53 +0200'
github_url='https://github.com/plasmodic/ecto'
breathe_default_project = 'ecto'
breathe_projects = dict(ecto='/home/arnaud.duhamel/qidata/python-ecto/build/temp.linux-x86_64-2.7/ecto/doc/../api/xml')
# for debug: this is only if you build everything locally
#ecto_module_url_root = '/home/arnaud.duhamel/qidata/python-ecto/build/temp.linux-x86_64-2.7/ecto/doc/../../doc/html/'
# for release
ecto_module_url_root = 'http://plasmodic.github.com/'
intersphinx_mapping = {
'ectoimagepipeline': (ecto_module_url_root + 'ecto_image_pipeline', None),
'ectoopenni': (ecto_module_url_root + 'ecto_openni', None),
'ectoopencv': (ecto_module_url_root + 'ecto_opencv', None),
'ectopcl': (ecto_module_url_root + 'ecto_pcl', None),
'ectoros': (ecto_module_url_root + 'ecto_ros', None),
}
programoutput_path = ''.split(';')
| version = ''
commithash = '64db13864cb1b377c8a9ab7c08e4688d3d1f94ef'
gittag_short = ''
gittag_long = '64db138-dirty'
git_lastmod = 'Mon, 15 May 2017 14:34:53 +0200'
github_url = 'https://github.com/plasmodic/ecto'
breathe_default_project = 'ecto'
breathe_projects = dict(ecto='/home/arnaud.duhamel/qidata/python-ecto/build/temp.linux-x86_64-2.7/ecto/doc/../api/xml')
ecto_module_url_root = 'http://plasmodic.github.com/'
intersphinx_mapping = {'ectoimagepipeline': (ecto_module_url_root + 'ecto_image_pipeline', None), 'ectoopenni': (ecto_module_url_root + 'ecto_openni', None), 'ectoopencv': (ecto_module_url_root + 'ecto_opencv', None), 'ectopcl': (ecto_module_url_root + 'ecto_pcl', None), 'ectoros': (ecto_module_url_root + 'ecto_ros', None)}
programoutput_path = ''.split(';') |
# This problem was recently asked by Apple:
# You are given a binary tree representation of an arithmetic expression.
# In this tree, each leaf is an integer value,, and a non-leaf node is one of the four operations: '+', '-', '*', or '/'.
# Write a function that takes this tree and evaluates the expression.
class Node:
def __init__(self, val, left=None, right=None):
self.val = val
self.left = left
self.right = right
PLUS = "+"
MINUS = "-"
TIMES = "*"
DIVIDE = "/"
def evaluate(root):
# Fill this in.
if root is None:
return 0
if root.left is None and root.right is None:
return int(root.val)
l = evaluate(root.left)
r = evaluate(root.right)
if root.val == '+':
return l + r
elif root.val == '-':
return l - r
elif root.val == '*':
return l * r
elif root.val == '/':
return l / r
tree = Node(TIMES)
tree.left = Node(PLUS)
tree.left.left = Node(3)
tree.left.right = Node(2)
tree.right = Node(PLUS)
tree.right.left = Node(4)
tree.right.right = Node(5)
print (evaluate(tree))
# 45
| class Node:
def __init__(self, val, left=None, right=None):
self.val = val
self.left = left
self.right = right
plus = '+'
minus = '-'
times = '*'
divide = '/'
def evaluate(root):
if root is None:
return 0
if root.left is None and root.right is None:
return int(root.val)
l = evaluate(root.left)
r = evaluate(root.right)
if root.val == '+':
return l + r
elif root.val == '-':
return l - r
elif root.val == '*':
return l * r
elif root.val == '/':
return l / r
tree = node(TIMES)
tree.left = node(PLUS)
tree.left.left = node(3)
tree.left.right = node(2)
tree.right = node(PLUS)
tree.right.left = node(4)
tree.right.right = node(5)
print(evaluate(tree)) |
image = io.imread('../img/skimage-logo.png')
# --- assign each color channel to a different variable ---
r = image[:, :, 0]
g = image[:, :, 1]
b = image[:, :, 2]
| image = io.imread('../img/skimage-logo.png')
r = image[:, :, 0]
g = image[:, :, 1]
b = image[:, :, 2] |
#
# PySNMP MIB module MGMT-SECURITY-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/MGMT-SECURITY-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:11:54 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, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection", "ValueSizeConstraint")
quanta, switch = mibBuilder.importSymbols("QUANTA-SWITCH-MIB", "quanta", "switch")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, Counter64, iso, TimeTicks, Integer32, Unsigned32, NotificationType, IpAddress, ModuleIdentity, Bits, Gauge32, MibIdentifier, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "Counter64", "iso", "TimeTicks", "Integer32", "Unsigned32", "NotificationType", "IpAddress", "ModuleIdentity", "Bits", "Gauge32", "MibIdentifier", "Counter32")
DisplayString, TextualConvention, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention", "TruthValue")
mgmtSecurity = ModuleIdentity((1, 3, 6, 1, 4, 1, 7244, 2, 11))
if mibBuilder.loadTexts: mgmtSecurity.setLastUpdated('201108310000Z')
if mibBuilder.loadTexts: mgmtSecurity.setOrganization('Quanta Computer Inc.')
if mibBuilder.loadTexts: mgmtSecurity.setContactInfo(' Customer Support Postal: Quanta Computer Inc. 4, Wen Ming 1 St., Kuei Shan Hsiang, Tao Yuan Shien, Taiwan, R.O.C. Tel: +886 3 328 0050 E-Mail: support@quantatw.com')
if mibBuilder.loadTexts: mgmtSecurity.setDescription('The Private MIB for Security')
agentSSLConfigGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 7244, 2, 11, 1))
agentSSLAdminMode = MibScalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: agentSSLAdminMode.setStatus('current')
if mibBuilder.loadTexts: agentSSLAdminMode.setDescription('Configures whether the SSL service is enabled on this switch. The default value is disable(2).')
agentSSLSecurePort = MibScalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: agentSSLSecurePort.setStatus('current')
if mibBuilder.loadTexts: agentSSLSecurePort.setDescription('Configures the port the SSL service will respond on. The default value is 443.')
agentSSLProtocolLevel = MibScalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("ssl30", 1), ("tls10", 2), ("both", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: agentSSLProtocolLevel.setStatus('current')
if mibBuilder.loadTexts: agentSSLProtocolLevel.setDescription('Configures which protocol versions of SSL are enabled on this switch. The default value is both(3).')
agentSSLMaxSessions = MibScalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 16))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: agentSSLMaxSessions.setStatus('current')
if mibBuilder.loadTexts: agentSSLMaxSessions.setDescription('Configures the maximum number of allowable SSL sessions. The default value is 16.')
agentSSLHardTimeout = MibScalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 168))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: agentSSLHardTimeout.setStatus('current')
if mibBuilder.loadTexts: agentSSLHardTimeout.setDescription('Configures the hard timeout for SSL sessions in hours. The default value is 24 hours.')
agentSSLSoftTimeout = MibScalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 60))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: agentSSLSoftTimeout.setStatus('current')
if mibBuilder.loadTexts: agentSSLSoftTimeout.setDescription('Configures the soft (activity) timeout for SSL sessions in minutes. The default value is 5 minutes.')
agentSSLCertificatePresent = MibScalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 1, 7), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: agentSSLCertificatePresent.setStatus('current')
if mibBuilder.loadTexts: agentSSLCertificatePresent.setDescription('Boolean value indicating whether SSL certificate files exist on the device.')
agentSSLCertificateControl = MibScalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("noop", 1), ("generate", 2), ("delete", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: agentSSLCertificateControl.setStatus('current')
if mibBuilder.loadTexts: agentSSLCertificateControl.setDescription('Controls certificate generation and deletion. Always returns noop(1).')
agentSSLCertificateGenerationStatus = MibScalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 1, 9), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: agentSSLCertificateGenerationStatus.setStatus('current')
if mibBuilder.loadTexts: agentSSLCertificateGenerationStatus.setDescription('Indicates whether certificate files are currently being generated.')
agentSSHConfigGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 7244, 2, 11, 2))
agentSSHAdminMode = MibScalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 2, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: agentSSHAdminMode.setStatus('current')
if mibBuilder.loadTexts: agentSSHAdminMode.setDescription('Configures whether the SSH service is enabled on this switch. The default value is disable(2).')
agentSSHProtocolLevel = MibScalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 2, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("ssh10", 1), ("ssh20", 2), ("both", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: agentSSHProtocolLevel.setStatus('current')
if mibBuilder.loadTexts: agentSSHProtocolLevel.setDescription('Configures which protocol versions of SSH are enabled on this switch. The default value is both(3).')
agentSSHSessionsCount = MibScalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 2, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: agentSSHSessionsCount.setStatus('current')
if mibBuilder.loadTexts: agentSSHSessionsCount.setDescription('Current number of active SSH sessions on this switch.')
agentSSHMaxSessionsCount = MibScalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 2, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 5))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: agentSSHMaxSessionsCount.setStatus('current')
if mibBuilder.loadTexts: agentSSHMaxSessionsCount.setDescription('Max number of SSH sessions permitted on this switch.')
agentSSHSessionTimeout = MibScalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 2, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 160))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: agentSSHSessionTimeout.setStatus('current')
if mibBuilder.loadTexts: agentSSHSessionTimeout.setDescription('ssh idle timeout value for this switch im minutes.')
agentSSHKeysPresent = MibScalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 2, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("dsa", 1), ("rsa", 2), ("both", 3), ("none", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: agentSSHKeysPresent.setStatus('current')
if mibBuilder.loadTexts: agentSSHKeysPresent.setDescription('Indicates what key files are present on the device, if any.')
agentSSHKeyGenerationStatus = MibScalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 2, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("dsa", 1), ("rsa", 2), ("both", 3), ("none", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: agentSSHKeyGenerationStatus.setStatus('current')
if mibBuilder.loadTexts: agentSSHKeyGenerationStatus.setDescription('Indicates what key files are currently being generated, if any.')
agentSSHRSAKeyControl = MibScalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 2, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("noop", 1), ("generate", 2), ("delete", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: agentSSHRSAKeyControl.setStatus('current')
if mibBuilder.loadTexts: agentSSHRSAKeyControl.setDescription('Controls RSA key generation and deletion. Always returns noop(1).')
agentSSHDSAKeyControl = MibScalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 2, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("noop", 1), ("generate", 2), ("delete", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: agentSSHDSAKeyControl.setStatus('current')
if mibBuilder.loadTexts: agentSSHDSAKeyControl.setDescription('Controls DSA key generation and deletion. Always returns noop(1).')
mibBuilder.exportSymbols("MGMT-SECURITY-MIB", agentSSHSessionsCount=agentSSHSessionsCount, PYSNMP_MODULE_ID=mgmtSecurity, agentSSLMaxSessions=agentSSLMaxSessions, agentSSHKeyGenerationStatus=agentSSHKeyGenerationStatus, agentSSHSessionTimeout=agentSSHSessionTimeout, agentSSLCertificateControl=agentSSLCertificateControl, mgmtSecurity=mgmtSecurity, agentSSLProtocolLevel=agentSSLProtocolLevel, agentSSLCertificateGenerationStatus=agentSSLCertificateGenerationStatus, agentSSLConfigGroup=agentSSLConfigGroup, agentSSHAdminMode=agentSSHAdminMode, agentSSHRSAKeyControl=agentSSHRSAKeyControl, agentSSHKeysPresent=agentSSHKeysPresent, agentSSHConfigGroup=agentSSHConfigGroup, agentSSHMaxSessionsCount=agentSSHMaxSessionsCount, agentSSLAdminMode=agentSSLAdminMode, agentSSLSoftTimeout=agentSSLSoftTimeout, agentSSLHardTimeout=agentSSLHardTimeout, agentSSHDSAKeyControl=agentSSHDSAKeyControl, agentSSHProtocolLevel=agentSSHProtocolLevel, agentSSLSecurePort=agentSSLSecurePort, agentSSLCertificatePresent=agentSSLCertificatePresent)
| (integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, value_range_constraint, constraints_union, constraints_intersection, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection', 'ValueSizeConstraint')
(quanta, switch) = mibBuilder.importSymbols('QUANTA-SWITCH-MIB', 'quanta', 'switch')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(mib_scalar, mib_table, mib_table_row, mib_table_column, object_identity, counter64, iso, time_ticks, integer32, unsigned32, notification_type, ip_address, module_identity, bits, gauge32, mib_identifier, counter32) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ObjectIdentity', 'Counter64', 'iso', 'TimeTicks', 'Integer32', 'Unsigned32', 'NotificationType', 'IpAddress', 'ModuleIdentity', 'Bits', 'Gauge32', 'MibIdentifier', 'Counter32')
(display_string, textual_convention, truth_value) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention', 'TruthValue')
mgmt_security = module_identity((1, 3, 6, 1, 4, 1, 7244, 2, 11))
if mibBuilder.loadTexts:
mgmtSecurity.setLastUpdated('201108310000Z')
if mibBuilder.loadTexts:
mgmtSecurity.setOrganization('Quanta Computer Inc.')
if mibBuilder.loadTexts:
mgmtSecurity.setContactInfo(' Customer Support Postal: Quanta Computer Inc. 4, Wen Ming 1 St., Kuei Shan Hsiang, Tao Yuan Shien, Taiwan, R.O.C. Tel: +886 3 328 0050 E-Mail: support@quantatw.com')
if mibBuilder.loadTexts:
mgmtSecurity.setDescription('The Private MIB for Security')
agent_ssl_config_group = mib_identifier((1, 3, 6, 1, 4, 1, 7244, 2, 11, 1))
agent_ssl_admin_mode = mib_scalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
agentSSLAdminMode.setStatus('current')
if mibBuilder.loadTexts:
agentSSLAdminMode.setDescription('Configures whether the SSL service is enabled on this switch. The default value is disable(2).')
agent_ssl_secure_port = mib_scalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
agentSSLSecurePort.setStatus('current')
if mibBuilder.loadTexts:
agentSSLSecurePort.setDescription('Configures the port the SSL service will respond on. The default value is 443.')
agent_ssl_protocol_level = mib_scalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('ssl30', 1), ('tls10', 2), ('both', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
agentSSLProtocolLevel.setStatus('current')
if mibBuilder.loadTexts:
agentSSLProtocolLevel.setDescription('Configures which protocol versions of SSL are enabled on this switch. The default value is both(3).')
agent_ssl_max_sessions = mib_scalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 16))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
agentSSLMaxSessions.setStatus('current')
if mibBuilder.loadTexts:
agentSSLMaxSessions.setDescription('Configures the maximum number of allowable SSL sessions. The default value is 16.')
agent_ssl_hard_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(1, 168))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
agentSSLHardTimeout.setStatus('current')
if mibBuilder.loadTexts:
agentSSLHardTimeout.setDescription('Configures the hard timeout for SSL sessions in hours. The default value is 24 hours.')
agent_ssl_soft_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(1, 60))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
agentSSLSoftTimeout.setStatus('current')
if mibBuilder.loadTexts:
agentSSLSoftTimeout.setDescription('Configures the soft (activity) timeout for SSL sessions in minutes. The default value is 5 minutes.')
agent_ssl_certificate_present = mib_scalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 1, 7), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
agentSSLCertificatePresent.setStatus('current')
if mibBuilder.loadTexts:
agentSSLCertificatePresent.setDescription('Boolean value indicating whether SSL certificate files exist on the device.')
agent_ssl_certificate_control = mib_scalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('noop', 1), ('generate', 2), ('delete', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
agentSSLCertificateControl.setStatus('current')
if mibBuilder.loadTexts:
agentSSLCertificateControl.setDescription('Controls certificate generation and deletion. Always returns noop(1).')
agent_ssl_certificate_generation_status = mib_scalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 1, 9), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
agentSSLCertificateGenerationStatus.setStatus('current')
if mibBuilder.loadTexts:
agentSSLCertificateGenerationStatus.setDescription('Indicates whether certificate files are currently being generated.')
agent_ssh_config_group = mib_identifier((1, 3, 6, 1, 4, 1, 7244, 2, 11, 2))
agent_ssh_admin_mode = mib_scalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 2, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
agentSSHAdminMode.setStatus('current')
if mibBuilder.loadTexts:
agentSSHAdminMode.setDescription('Configures whether the SSH service is enabled on this switch. The default value is disable(2).')
agent_ssh_protocol_level = mib_scalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 2, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('ssh10', 1), ('ssh20', 2), ('both', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
agentSSHProtocolLevel.setStatus('current')
if mibBuilder.loadTexts:
agentSSHProtocolLevel.setDescription('Configures which protocol versions of SSH are enabled on this switch. The default value is both(3).')
agent_ssh_sessions_count = mib_scalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 2, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
agentSSHSessionsCount.setStatus('current')
if mibBuilder.loadTexts:
agentSSHSessionsCount.setDescription('Current number of active SSH sessions on this switch.')
agent_ssh_max_sessions_count = mib_scalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 2, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 5))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
agentSSHMaxSessionsCount.setStatus('current')
if mibBuilder.loadTexts:
agentSSHMaxSessionsCount.setDescription('Max number of SSH sessions permitted on this switch.')
agent_ssh_session_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 2, 5), integer32().subtype(subtypeSpec=value_range_constraint(1, 160))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
agentSSHSessionTimeout.setStatus('current')
if mibBuilder.loadTexts:
agentSSHSessionTimeout.setDescription('ssh idle timeout value for this switch im minutes.')
agent_ssh_keys_present = mib_scalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 2, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('dsa', 1), ('rsa', 2), ('both', 3), ('none', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
agentSSHKeysPresent.setStatus('current')
if mibBuilder.loadTexts:
agentSSHKeysPresent.setDescription('Indicates what key files are present on the device, if any.')
agent_ssh_key_generation_status = mib_scalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 2, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('dsa', 1), ('rsa', 2), ('both', 3), ('none', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
agentSSHKeyGenerationStatus.setStatus('current')
if mibBuilder.loadTexts:
agentSSHKeyGenerationStatus.setDescription('Indicates what key files are currently being generated, if any.')
agent_sshrsa_key_control = mib_scalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 2, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('noop', 1), ('generate', 2), ('delete', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
agentSSHRSAKeyControl.setStatus('current')
if mibBuilder.loadTexts:
agentSSHRSAKeyControl.setDescription('Controls RSA key generation and deletion. Always returns noop(1).')
agent_sshdsa_key_control = mib_scalar((1, 3, 6, 1, 4, 1, 7244, 2, 11, 2, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('noop', 1), ('generate', 2), ('delete', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
agentSSHDSAKeyControl.setStatus('current')
if mibBuilder.loadTexts:
agentSSHDSAKeyControl.setDescription('Controls DSA key generation and deletion. Always returns noop(1).')
mibBuilder.exportSymbols('MGMT-SECURITY-MIB', agentSSHSessionsCount=agentSSHSessionsCount, PYSNMP_MODULE_ID=mgmtSecurity, agentSSLMaxSessions=agentSSLMaxSessions, agentSSHKeyGenerationStatus=agentSSHKeyGenerationStatus, agentSSHSessionTimeout=agentSSHSessionTimeout, agentSSLCertificateControl=agentSSLCertificateControl, mgmtSecurity=mgmtSecurity, agentSSLProtocolLevel=agentSSLProtocolLevel, agentSSLCertificateGenerationStatus=agentSSLCertificateGenerationStatus, agentSSLConfigGroup=agentSSLConfigGroup, agentSSHAdminMode=agentSSHAdminMode, agentSSHRSAKeyControl=agentSSHRSAKeyControl, agentSSHKeysPresent=agentSSHKeysPresent, agentSSHConfigGroup=agentSSHConfigGroup, agentSSHMaxSessionsCount=agentSSHMaxSessionsCount, agentSSLAdminMode=agentSSLAdminMode, agentSSLSoftTimeout=agentSSLSoftTimeout, agentSSLHardTimeout=agentSSLHardTimeout, agentSSHDSAKeyControl=agentSSHDSAKeyControl, agentSSHProtocolLevel=agentSSHProtocolLevel, agentSSLSecurePort=agentSSLSecurePort, agentSSLCertificatePresent=agentSSLCertificatePresent) |
# Copyright 2019 Graphcore Ltd.
class NullContextManager(object):
def __enter__(self):
pass
def __exit__(self, *args):
pass
| class Nullcontextmanager(object):
def __enter__(self):
pass
def __exit__(self, *args):
pass |
#Global parameters module
N = 1024
K = 16
Q = 12289
POLY_BYTES = 1792
NEWHOPE_SEEDBYTES = 32
NEWHOPE_RECBYTES = 256
NEWHOPE_SENDABYTES = POLY_BYTES + NEWHOPE_SEEDBYTES
NEWHOPE_SENDBBYTES = POLY_BYTES + NEWHOPE_RECBYTES
| n = 1024
k = 16
q = 12289
poly_bytes = 1792
newhope_seedbytes = 32
newhope_recbytes = 256
newhope_sendabytes = POLY_BYTES + NEWHOPE_SEEDBYTES
newhope_sendbbytes = POLY_BYTES + NEWHOPE_RECBYTES |
# Hacked from winnt.h
DELETE = (65536)
READ_CONTROL = (131072)
WRITE_DAC = (262144)
WRITE_OWNER = (524288)
SYNCHRONIZE = (1048576)
STANDARD_RIGHTS_REQUIRED = (983040)
STANDARD_RIGHTS_READ = (READ_CONTROL)
STANDARD_RIGHTS_WRITE = (READ_CONTROL)
STANDARD_RIGHTS_EXECUTE = (READ_CONTROL)
STANDARD_RIGHTS_ALL = (2031616)
SPECIFIC_RIGHTS_ALL = (65535)
ACCESS_SYSTEM_SECURITY = (16777216)
MAXIMUM_ALLOWED = (33554432)
GENERIC_READ = (-2147483648)
GENERIC_WRITE = (1073741824)
GENERIC_EXECUTE = (536870912)
GENERIC_ALL = (268435456)
# file security permissions
FILE_READ_DATA= ( 1 )
FILE_LIST_DIRECTORY= ( 1 )
FILE_WRITE_DATA= ( 2 )
FILE_ADD_FILE= ( 2 )
FILE_APPEND_DATA= ( 4 )
FILE_ADD_SUBDIRECTORY= ( 4 )
FILE_CREATE_PIPE_INSTANCE= ( 4 )
FILE_READ_EA= ( 8 )
FILE_WRITE_EA= ( 16 )
FILE_EXECUTE= ( 32 )
FILE_TRAVERSE= ( 32 )
FILE_DELETE_CHILD= ( 64 )
FILE_READ_ATTRIBUTES= ( 128 )
FILE_WRITE_ATTRIBUTES= ( 256 )
FILE_ALL_ACCESS= (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 511)
FILE_GENERIC_READ= (STANDARD_RIGHTS_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE)
FILE_GENERIC_WRITE= (STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE)
FILE_GENERIC_EXECUTE= (STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE | SYNCHRONIZE)
SECURITY_NULL_SID_AUTHORITY = (0,0,0,0,0,0)
SECURITY_WORLD_SID_AUTHORITY = (0,0,0,0,0,1)
SECURITY_LOCAL_SID_AUTHORITY = (0,0,0,0,0,2)
SECURITY_CREATOR_SID_AUTHORITY = (0,0,0,0,0,3)
SECURITY_NON_UNIQUE_AUTHORITY = (0,0,0,0,0,4)
SECURITY_RESOURCE_MANAGER_AUTHORITY = (0,0,0,0,0,9)
SECURITY_NULL_RID = 0
SECURITY_WORLD_RID = 0
SECURITY_LOCAL_RID = 0X00000000
SECURITY_CREATOR_OWNER_RID = 0
SECURITY_CREATOR_GROUP_RID = 1
SECURITY_CREATOR_OWNER_SERVER_RID = 2
SECURITY_CREATOR_GROUP_SERVER_RID = 3
SECURITY_CREATOR_OWNER_RIGHTS_RID = 4
# NT well-known SIDs
SECURITY_NT_AUTHORITY = (0,0,0,0,0,5)
SECURITY_DIALUP_RID = 1
SECURITY_NETWORK_RID = 2
SECURITY_BATCH_RID = 3
SECURITY_INTERACTIVE_RID = 4
SECURITY_SERVICE_RID = 6
SECURITY_ANONYMOUS_LOGON_RID = 7
SECURITY_PROXY_RID = 8
SECURITY_SERVER_LOGON_RID = 9
SECURITY_LOGON_IDS_RID = 5
SECURITY_LOGON_IDS_RID_COUNT = 3
SECURITY_LOCAL_SYSTEM_RID = 18
SECURITY_NT_NON_UNIQUE = 21
SECURITY_BUILTIN_DOMAIN_RID = 32
# well-known domain relative sub-authority values (RIDs)...
DOMAIN_USER_RID_ADMIN = 500
DOMAIN_USER_RID_GUEST = 501
DOMAIN_USER_RID_KRBTGT = 502
DOMAIN_USER_RID_MAX = 999
# well-known groups ...
DOMAIN_GROUP_RID_ADMINS = 512
DOMAIN_GROUP_RID_USERS = 513
DOMAIN_GROUP_RID_GUESTS = 514
DOMAIN_GROUP_RID_COMPUTERS = 515
DOMAIN_GROUP_RID_CONTROLLERS = 516
DOMAIN_GROUP_RID_CERT_ADMINS = 517
DOMAIN_GROUP_RID_SCHEMA_ADMINS = 518
DOMAIN_GROUP_RID_ENTERPRISE_ADMINS = 519
DOMAIN_GROUP_RID_POLICY_ADMINS = 520
DOMAIN_GROUP_RID_READONLY_CONTROLLERS = 521
# well-known aliases ...
DOMAIN_ALIAS_RID_ADMINS = 544
DOMAIN_ALIAS_RID_USERS = 545
DOMAIN_ALIAS_RID_GUESTS = 546
DOMAIN_ALIAS_RID_POWER_USERS = 547
DOMAIN_ALIAS_RID_ACCOUNT_OPS = 548
DOMAIN_ALIAS_RID_SYSTEM_OPS = 549
DOMAIN_ALIAS_RID_PRINT_OPS = 550
DOMAIN_ALIAS_RID_BACKUP_OPS = 551
DOMAIN_ALIAS_RID_REPLICATOR = 552
DOMAIN_ALIAS_RID_RAS_SERVERS = 553
DOMAIN_ALIAS_RID_PREW2KCOMPACCESS = 554
DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS = 555
DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS = 556
DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS = 557
DOMAIN_ALIAS_RID_MONITORING_USERS = 558
DOMAIN_ALIAS_RID_LOGGING_USERS = 559
DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS = 560
DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS = 561
DOMAIN_ALIAS_RID_DCOM_USERS = 562
DOMAIN_ALIAS_RID_IUSERS = 568
DOMAIN_ALIAS_RID_CRYPTO_OPERATORS = 569
DOMAIN_ALIAS_RID_CACHEABLE_PRINCIPALS_GROUP = 571
DOMAIN_ALIAS_RID_NON_CACHEABLE_PRINCIPALS_GROUP = 572
DOMAIN_ALIAS_RID_EVENT_LOG_READERS_GROUP = 573
SECURITY_MANDATORY_LABEL_AUTHORITY = (0,0,0,0,0,16)
SECURITY_MANDATORY_UNTRUSTED_RID = 0x00000000
SECURITY_MANDATORY_LOW_RID = 0x00001000
SECURITY_MANDATORY_MEDIUM_RID = 0x00002000
SECURITY_MANDATORY_HIGH_RID = 0x00003000
SECURITY_MANDATORY_SYSTEM_RID = 0x00004000
SECURITY_MANDATORY_PROTECTED_PROCESS_RID = 0x00005000
SECURITY_MANDATORY_MAXIMUM_USER_RID = SECURITY_MANDATORY_SYSTEM_RID
SYSTEM_LUID = (999, 0)
ANONYMOUS_LOGON_LUID = (998, 0)
LOCALSERVICE_LUID = (997, 0)
NETWORKSERVICE_LUID = (996, 0)
IUSER_LUID = (995, 0)
# Group attributes
SE_GROUP_MANDATORY = 1
SE_GROUP_ENABLED_BY_DEFAULT = 2
SE_GROUP_ENABLED = 4
SE_GROUP_OWNER = 8
SE_GROUP_USE_FOR_DENY_ONLY = 16
SE_GROUP_INTEGRITY = 32
SE_GROUP_INTEGRITY_ENABLED = 64
SE_GROUP_RESOURCE = 536870912
SE_GROUP_LOGON_ID = -1073741824
# User attributes
# (None yet defined.)
# ACE types
ACCESS_MIN_MS_ACE_TYPE = (0)
ACCESS_ALLOWED_ACE_TYPE = (0)
ACCESS_DENIED_ACE_TYPE = (1)
SYSTEM_AUDIT_ACE_TYPE = (2)
SYSTEM_ALARM_ACE_TYPE = (3)
ACCESS_MAX_MS_V2_ACE_TYPE = (3)
ACCESS_ALLOWED_COMPOUND_ACE_TYPE = (4)
ACCESS_MAX_MS_V3_ACE_TYPE = (4)
ACCESS_MIN_MS_OBJECT_ACE_TYPE = (5)
ACCESS_ALLOWED_OBJECT_ACE_TYPE = (5)
ACCESS_DENIED_OBJECT_ACE_TYPE = (6)
SYSTEM_AUDIT_OBJECT_ACE_TYPE = (7)
SYSTEM_ALARM_OBJECT_ACE_TYPE = (8)
ACCESS_MAX_MS_OBJECT_ACE_TYPE = (8)
ACCESS_MAX_MS_V4_ACE_TYPE = (8)
ACCESS_MAX_MS_ACE_TYPE = (8)
ACCESS_ALLOWED_CALLBACK_ACE_TYPE = 9
ACCESS_DENIED_CALLBACK_ACE_TYPE = 10
ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE = 11
ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE = 12
SYSTEM_AUDIT_CALLBACK_ACE_TYPE = 13
SYSTEM_ALARM_CALLBACK_ACE_TYPE = 14
SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE = 15
SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE = 16
SYSTEM_MANDATORY_LABEL_ACE_TYPE = 17
ACCESS_MAX_MS_V5_ACE_TYPE = 17
# The following are the inherit flags that go into the AceFlags field
# of an Ace header.
OBJECT_INHERIT_ACE = 1
CONTAINER_INHERIT_ACE = 2
NO_PROPAGATE_INHERIT_ACE = 4
INHERIT_ONLY_ACE = 8
VALID_INHERIT_FLAGS = 15
SUCCESSFUL_ACCESS_ACE_FLAG = 64
FAILED_ACCESS_ACE_FLAG = 128
SE_OWNER_DEFAULTED = 1
SE_GROUP_DEFAULTED = 2
SE_DACL_PRESENT = 4
SE_DACL_DEFAULTED = 8
SE_SACL_PRESENT = 16
SE_SACL_DEFAULTED = 32
SE_SELF_RELATIVE = 32768
SE_PRIVILEGE_ENABLED_BY_DEFAULT = 1
SE_PRIVILEGE_ENABLED = 2
SE_PRIVILEGE_USED_FOR_ACCESS = -2147483648
PRIVILEGE_SET_ALL_NECESSARY = 1
# NT Defined Privileges
SE_CREATE_TOKEN_NAME = "SeCreateTokenPrivilege"
SE_ASSIGNPRIMARYTOKEN_NAME = "SeAssignPrimaryTokenPrivilege"
SE_LOCK_MEMORY_NAME = "SeLockMemoryPrivilege"
SE_INCREASE_QUOTA_NAME = "SeIncreaseQuotaPrivilege"
SE_UNSOLICITED_INPUT_NAME = "SeUnsolicitedInputPrivilege"
SE_MACHINE_ACCOUNT_NAME = "SeMachineAccountPrivilege"
SE_TCB_NAME = "SeTcbPrivilege"
SE_SECURITY_NAME = "SeSecurityPrivilege"
SE_TAKE_OWNERSHIP_NAME = "SeTakeOwnershipPrivilege"
SE_LOAD_DRIVER_NAME = "SeLoadDriverPrivilege"
SE_SYSTEM_PROFILE_NAME = "SeSystemProfilePrivilege"
SE_SYSTEMTIME_NAME = "SeSystemtimePrivilege"
SE_PROF_SINGLE_PROCESS_NAME = "SeProfileSingleProcessPrivilege"
SE_INC_BASE_PRIORITY_NAME = "SeIncreaseBasePriorityPrivilege"
SE_CREATE_PAGEFILE_NAME = "SeCreatePagefilePrivilege"
SE_CREATE_PERMANENT_NAME = "SeCreatePermanentPrivilege"
SE_BACKUP_NAME = "SeBackupPrivilege"
SE_RESTORE_NAME = "SeRestorePrivilege"
SE_SHUTDOWN_NAME = "SeShutdownPrivilege"
SE_DEBUG_NAME = "SeDebugPrivilege"
SE_AUDIT_NAME = "SeAuditPrivilege"
SE_SYSTEM_ENVIRONMENT_NAME = "SeSystemEnvironmentPrivilege"
SE_CHANGE_NOTIFY_NAME = "SeChangeNotifyPrivilege"
SE_REMOTE_SHUTDOWN_NAME = "SeRemoteShutdownPrivilege"
# Enum SECURITY_IMPERSONATION_LEVEL:
SecurityAnonymous = 0
SecurityIdentification = 1
SecurityImpersonation = 2
SecurityDelegation = 3
SECURITY_MAX_IMPERSONATION_LEVEL = SecurityDelegation
DEFAULT_IMPERSONATION_LEVEL = SecurityImpersonation
TOKEN_ASSIGN_PRIMARY = 1
TOKEN_DUPLICATE = 2
TOKEN_IMPERSONATE = 4
TOKEN_QUERY = 8
TOKEN_QUERY_SOURCE = 16
TOKEN_ADJUST_PRIVILEGES = 32
TOKEN_ADJUST_GROUPS = 64
TOKEN_ADJUST_DEFAULT = 128
TOKEN_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED |\
TOKEN_ASSIGN_PRIMARY |\
TOKEN_DUPLICATE |\
TOKEN_IMPERSONATE |\
TOKEN_QUERY |\
TOKEN_QUERY_SOURCE |\
TOKEN_ADJUST_PRIVILEGES |\
TOKEN_ADJUST_GROUPS |\
TOKEN_ADJUST_DEFAULT)
TOKEN_READ = (STANDARD_RIGHTS_READ |\
TOKEN_QUERY)
TOKEN_WRITE = (STANDARD_RIGHTS_WRITE |\
TOKEN_ADJUST_PRIVILEGES |\
TOKEN_ADJUST_GROUPS |\
TOKEN_ADJUST_DEFAULT)
TOKEN_EXECUTE = (STANDARD_RIGHTS_EXECUTE)
SidTypeUser = 1
SidTypeGroup = 2
SidTypeDomain =3
SidTypeAlias = 4
SidTypeWellKnownGroup = 5
SidTypeDeletedAccount = 6
SidTypeInvalid = 7
SidTypeUnknown = 8
SidTypeComputer = 9
SidTypeLabel = 10
# Token types
TokenPrimary = 1
TokenImpersonation = 2
# TOKEN_INFORMATION_CLASS, used with Get/SetTokenInformation
TokenUser = 1
TokenGroups = 2
TokenPrivileges = 3
TokenOwner = 4
TokenPrimaryGroup = 5
TokenDefaultDacl = 6
TokenSource = 7
TokenType = 8
TokenImpersonationLevel = 9
TokenStatistics = 10
TokenRestrictedSids = 11
TokenSessionId = 12
TokenGroupsAndPrivileges = 13
TokenSessionReference = 14
TokenSandBoxInert = 15
TokenAuditPolicy = 16
TokenOrigin = 17
TokenElevationType = 18
TokenLinkedToken = 19
TokenElevation = 20
TokenHasRestrictions = 21
TokenAccessInformation = 22
TokenVirtualizationAllowed = 23
TokenVirtualizationEnabled = 24
TokenIntegrityLevel = 25
TokenUIAccess = 26
TokenMandatoryPolicy = 27
TokenLogonSid = 28
# DirectoryService related constants.
# Generated by h2py from NtDsAPI.h
DS_BEHAVIOR_WIN2000 = 0
DS_BEHAVIOR_WIN2003_WITH_MIXED_DOMAINS = 1
DS_BEHAVIOR_WIN2003 = 2
DS_SYNCED_EVENT_NAME = "NTDSInitialSyncsCompleted"
ACTRL_DS_OPEN = 0x00000000
ACTRL_DS_CREATE_CHILD = 0x00000001
ACTRL_DS_DELETE_CHILD = 0x00000002
ACTRL_DS_LIST = 0x00000004
ACTRL_DS_SELF = 0x00000008
ACTRL_DS_READ_PROP = 0x00000010
ACTRL_DS_WRITE_PROP = 0x00000020
ACTRL_DS_DELETE_TREE = 0x00000040
ACTRL_DS_LIST_OBJECT = 0x00000080
ACTRL_DS_CONTROL_ACCESS = 0x00000100
NTDSAPI_BIND_ALLOW_DELEGATION = (0x00000001)
DS_REPSYNC_ASYNCHRONOUS_OPERATION = 0x00000001
DS_REPSYNC_WRITEABLE = 0x00000002
DS_REPSYNC_PERIODIC = 0x00000004
DS_REPSYNC_INTERSITE_MESSAGING = 0x00000008
DS_REPSYNC_ALL_SOURCES = 0x00000010
DS_REPSYNC_FULL = 0x00000020
DS_REPSYNC_URGENT = 0x00000040
DS_REPSYNC_NO_DISCARD = 0x00000080
DS_REPSYNC_FORCE = 0x00000100
DS_REPSYNC_ADD_REFERENCE = 0x00000200
DS_REPSYNC_NEVER_COMPLETED = 0x00000400
DS_REPSYNC_TWO_WAY = 0x00000800
DS_REPSYNC_NEVER_NOTIFY = 0x00001000
DS_REPSYNC_INITIAL = 0x00002000
DS_REPSYNC_USE_COMPRESSION = 0x00004000
DS_REPSYNC_ABANDONED = 0x00008000
DS_REPSYNC_INITIAL_IN_PROGRESS = 0x00010000
DS_REPSYNC_PARTIAL_ATTRIBUTE_SET = 0x00020000
DS_REPSYNC_REQUEUE = 0x00040000
DS_REPSYNC_NOTIFICATION = 0x00080000
DS_REPSYNC_ASYNCHRONOUS_REPLICA = 0x00100000
DS_REPSYNC_CRITICAL = 0x00200000
DS_REPSYNC_FULL_IN_PROGRESS = 0x00400000
DS_REPSYNC_PREEMPTED = 0x00800000
DS_REPADD_ASYNCHRONOUS_OPERATION = 0x00000001
DS_REPADD_WRITEABLE = 0x00000002
DS_REPADD_INITIAL = 0x00000004
DS_REPADD_PERIODIC = 0x00000008
DS_REPADD_INTERSITE_MESSAGING = 0x00000010
DS_REPADD_ASYNCHRONOUS_REPLICA = 0x00000020
DS_REPADD_DISABLE_NOTIFICATION = 0x00000040
DS_REPADD_DISABLE_PERIODIC = 0x00000080
DS_REPADD_USE_COMPRESSION = 0x00000100
DS_REPADD_NEVER_NOTIFY = 0x00000200
DS_REPADD_TWO_WAY = 0x00000400
DS_REPADD_CRITICAL = 0x00000800
DS_REPDEL_ASYNCHRONOUS_OPERATION = 0x00000001
DS_REPDEL_WRITEABLE = 0x00000002
DS_REPDEL_INTERSITE_MESSAGING = 0x00000004
DS_REPDEL_IGNORE_ERRORS = 0x00000008
DS_REPDEL_LOCAL_ONLY = 0x00000010
DS_REPDEL_NO_SOURCE = 0x00000020
DS_REPDEL_REF_OK = 0x00000040
DS_REPMOD_ASYNCHRONOUS_OPERATION = 0x00000001
DS_REPMOD_WRITEABLE = 0x00000002
DS_REPMOD_UPDATE_FLAGS = 0x00000001
DS_REPMOD_UPDATE_ADDRESS = 0x00000002
DS_REPMOD_UPDATE_SCHEDULE = 0x00000004
DS_REPMOD_UPDATE_RESULT = 0x00000008
DS_REPMOD_UPDATE_TRANSPORT = 0x00000010
DS_REPUPD_ASYNCHRONOUS_OPERATION = 0x00000001
DS_REPUPD_WRITEABLE = 0x00000002
DS_REPUPD_ADD_REFERENCE = 0x00000004
DS_REPUPD_DELETE_REFERENCE = 0x00000008
DS_INSTANCETYPE_IS_NC_HEAD = 0x00000001
DS_INSTANCETYPE_NC_IS_WRITEABLE = 0x00000004
DS_INSTANCETYPE_NC_COMING = 0x00000010
DS_INSTANCETYPE_NC_GOING = 0x00000020
NTDSDSA_OPT_IS_GC = ( 1 << 0 )
NTDSDSA_OPT_DISABLE_INBOUND_REPL = ( 1 << 1 )
NTDSDSA_OPT_DISABLE_OUTBOUND_REPL = ( 1 << 2 )
NTDSDSA_OPT_DISABLE_NTDSCONN_XLATE = ( 1 << 3 )
NTDSCONN_OPT_IS_GENERATED = ( 1 << 0 )
NTDSCONN_OPT_TWOWAY_SYNC = ( 1 << 1 )
NTDSCONN_OPT_OVERRIDE_NOTIFY_DEFAULT = (1 << 2 )
NTDSCONN_OPT_USE_NOTIFY = (1 << 3)
NTDSCONN_OPT_DISABLE_INTERSITE_COMPRESSION = (1 << 4)
NTDSCONN_OPT_USER_OWNED_SCHEDULE = (1 << 5)
NTDSCONN_KCC_NO_REASON = ( 0 )
NTDSCONN_KCC_GC_TOPOLOGY = ( 1 << 0 )
NTDSCONN_KCC_RING_TOPOLOGY = ( 1 << 1 )
NTDSCONN_KCC_MINIMIZE_HOPS_TOPOLOGY = ( 1 << 2 )
NTDSCONN_KCC_STALE_SERVERS_TOPOLOGY = ( 1 << 3 )
NTDSCONN_KCC_OSCILLATING_CONNECTION_TOPOLOGY = ( 1 << 4 )
NTDSCONN_KCC_INTERSITE_GC_TOPOLOGY = (1 << 5)
NTDSCONN_KCC_INTERSITE_TOPOLOGY = (1 << 6)
NTDSCONN_KCC_SERVER_FAILOVER_TOPOLOGY = (1 << 7)
NTDSCONN_KCC_SITE_FAILOVER_TOPOLOGY = (1 << 8)
NTDSCONN_KCC_REDUNDANT_SERVER_TOPOLOGY = (1 << 9)
FRSCONN_PRIORITY_MASK = 0x70000000
FRSCONN_MAX_PRIORITY = 0x8
NTDSCONN_OPT_IGNORE_SCHEDULE_MASK = (-2147483648)
NTDSSETTINGS_OPT_IS_AUTO_TOPOLOGY_DISABLED = ( 1 << 0 )
NTDSSETTINGS_OPT_IS_TOPL_CLEANUP_DISABLED = ( 1 << 1 )
NTDSSETTINGS_OPT_IS_TOPL_MIN_HOPS_DISABLED = ( 1 << 2 )
NTDSSETTINGS_OPT_IS_TOPL_DETECT_STALE_DISABLED = ( 1 << 3 )
NTDSSETTINGS_OPT_IS_INTER_SITE_AUTO_TOPOLOGY_DISABLED = ( 1 << 4 )
NTDSSETTINGS_OPT_IS_GROUP_CACHING_ENABLED = ( 1 << 5 )
NTDSSETTINGS_OPT_FORCE_KCC_WHISTLER_BEHAVIOR = ( 1 << 6 )
NTDSSETTINGS_OPT_FORCE_KCC_W2K_ELECTION = ( 1 << 7 )
NTDSSETTINGS_OPT_IS_RAND_BH_SELECTION_DISABLED = ( 1 << 8 )
NTDSSETTINGS_OPT_IS_SCHEDULE_HASHING_ENABLED = ( 1 << 9 )
NTDSSETTINGS_OPT_IS_REDUNDANT_SERVER_TOPOLOGY_ENABLED = ( 1 << 10 )
NTDSSETTINGS_DEFAULT_SERVER_REDUNDANCY = 2
NTDSTRANSPORT_OPT_IGNORE_SCHEDULES = ( 1 << 0 )
NTDSTRANSPORT_OPT_BRIDGES_REQUIRED = (1 << 1 )
NTDSSITECONN_OPT_USE_NOTIFY = ( 1 << 0 )
NTDSSITECONN_OPT_TWOWAY_SYNC = ( 1 << 1 )
NTDSSITECONN_OPT_DISABLE_COMPRESSION = ( 1 << 2 )
NTDSSITELINK_OPT_USE_NOTIFY = ( 1 << 0 )
NTDSSITELINK_OPT_TWOWAY_SYNC = ( 1 << 1 )
NTDSSITELINK_OPT_DISABLE_COMPRESSION = ( 1 << 2 )
GUID_USERS_CONTAINER_A = "a9d1ca15768811d1aded00c04fd8d5cd"
GUID_COMPUTRS_CONTAINER_A = "aa312825768811d1aded00c04fd8d5cd"
GUID_SYSTEMS_CONTAINER_A = "ab1d30f3768811d1aded00c04fd8d5cd"
GUID_DOMAIN_CONTROLLERS_CONTAINER_A = "a361b2ffffd211d1aa4b00c04fd7d83a"
GUID_INFRASTRUCTURE_CONTAINER_A = "2fbac1870ade11d297c400c04fd8d5cd"
GUID_DELETED_OBJECTS_CONTAINER_A = "18e2ea80684f11d2b9aa00c04f79f805"
GUID_LOSTANDFOUND_CONTAINER_A = "ab8153b7768811d1aded00c04fd8d5cd"
GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER_A = "22b70c67d56e4efb91e9300fca3dc1aa"
GUID_PROGRAM_DATA_CONTAINER_A = "09460c08ae1e4a4ea0f64aee7daa1e5a"
GUID_MICROSOFT_PROGRAM_DATA_CONTAINER_A = "f4be92a4c777485e878e9421d53087db"
GUID_NTDS_QUOTAS_CONTAINER_A = "6227f0af1fc2410d8e3bb10615bb5b0f"
GUID_USERS_CONTAINER_BYTE = "\xa9\xd1\xca\x15\x76\x88\x11\xd1\xad\xed\x00\xc0\x4f\xd8\xd5\xcd"
GUID_COMPUTRS_CONTAINER_BYTE = "\xaa\x31\x28\x25\x76\x88\x11\xd1\xad\xed\x00\xc0\x4f\xd8\xd5\xcd"
GUID_SYSTEMS_CONTAINER_BYTE = "\xab\x1d\x30\xf3\x76\x88\x11\xd1\xad\xed\x00\xc0\x4f\xd8\xd5\xcd"
GUID_DOMAIN_CONTROLLERS_CONTAINER_BYTE = "\xa3\x61\xb2\xff\xff\xd2\x11\xd1\xaa\x4b\x00\xc0\x4f\xd7\xd8\x3a"
GUID_INFRASTRUCTURE_CONTAINER_BYTE = "\x2f\xba\xc1\x87\x0a\xde\x11\xd2\x97\xc4\x00\xc0\x4f\xd8\xd5\xcd"
GUID_DELETED_OBJECTS_CONTAINER_BYTE = "\x18\xe2\xea\x80\x68\x4f\x11\xd2\xb9\xaa\x00\xc0\x4f\x79\xf8\x05"
GUID_LOSTANDFOUND_CONTAINER_BYTE = "\xab\x81\x53\xb7\x76\x88\x11\xd1\xad\xed\x00\xc0\x4f\xd8\xd5\xcd"
GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER_BYTE = "\x22\xb7\x0c\x67\xd5\x6e\x4e\xfb\x91\xe9\x30\x0f\xca\x3d\xc1\xaa"
GUID_PROGRAM_DATA_CONTAINER_BYTE = "\x09\x46\x0c\x08\xae\x1e\x4a\x4e\xa0\xf6\x4a\xee\x7d\xaa\x1e\x5a"
GUID_MICROSOFT_PROGRAM_DATA_CONTAINER_BYTE = "\xf4\xbe\x92\xa4\xc7\x77\x48\x5e\x87\x8e\x94\x21\xd5\x30\x87\xdb"
GUID_NTDS_QUOTAS_CONTAINER_BYTE = "\x62\x27\xf0\xaf\x1f\xc2\x41\x0d\x8e\x3b\xb1\x06\x15\xbb\x5b\x0f"
DS_REPSYNCALL_NO_OPTIONS = 0x00000000
DS_REPSYNCALL_ABORT_IF_SERVER_UNAVAILABLE = 0x00000001
DS_REPSYNCALL_SYNC_ADJACENT_SERVERS_ONLY = 0x00000002
DS_REPSYNCALL_ID_SERVERS_BY_DN = 0x00000004
DS_REPSYNCALL_DO_NOT_SYNC = 0x00000008
DS_REPSYNCALL_SKIP_INITIAL_CHECK = 0x00000010
DS_REPSYNCALL_PUSH_CHANGES_OUTWARD = 0x00000020
DS_REPSYNCALL_CROSS_SITE_BOUNDARIES = 0x00000040
DS_LIST_DSA_OBJECT_FOR_SERVER = 0
DS_LIST_DNS_HOST_NAME_FOR_SERVER = 1
DS_LIST_ACCOUNT_OBJECT_FOR_SERVER = 2
DS_ROLE_SCHEMA_OWNER = 0
DS_ROLE_DOMAIN_OWNER = 1
DS_ROLE_PDC_OWNER = 2
DS_ROLE_RID_OWNER = 3
DS_ROLE_INFRASTRUCTURE_OWNER = 4
DS_SCHEMA_GUID_NOT_FOUND = 0
DS_SCHEMA_GUID_ATTR = 1
DS_SCHEMA_GUID_ATTR_SET = 2
DS_SCHEMA_GUID_CLASS = 3
DS_SCHEMA_GUID_CONTROL_RIGHT = 4
DS_KCC_FLAG_ASYNC_OP = (1 << 0)
DS_KCC_FLAG_DAMPED = (1 << 1)
DS_EXIST_ADVISORY_MODE = (0x1)
DS_REPL_INFO_FLAG_IMPROVE_LINKED_ATTRS = (0x00000001)
DS_REPL_NBR_WRITEABLE = (0x00000010)
DS_REPL_NBR_SYNC_ON_STARTUP = (0x00000020)
DS_REPL_NBR_DO_SCHEDULED_SYNCS = (0x00000040)
DS_REPL_NBR_USE_ASYNC_INTERSITE_TRANSPORT = (0x00000080)
DS_REPL_NBR_TWO_WAY_SYNC = (0x00000200)
DS_REPL_NBR_RETURN_OBJECT_PARENTS = (0x00000800)
DS_REPL_NBR_FULL_SYNC_IN_PROGRESS = (0x00010000)
DS_REPL_NBR_FULL_SYNC_NEXT_PACKET = (0x00020000)
DS_REPL_NBR_NEVER_SYNCED = (0x00200000)
DS_REPL_NBR_PREEMPTED = (0x01000000)
DS_REPL_NBR_IGNORE_CHANGE_NOTIFICATIONS = (0x04000000)
DS_REPL_NBR_DISABLE_SCHEDULED_SYNC = (0x08000000)
DS_REPL_NBR_COMPRESS_CHANGES = (0x10000000)
DS_REPL_NBR_NO_CHANGE_NOTIFICATIONS = (0x20000000)
DS_REPL_NBR_PARTIAL_ATTRIBUTE_SET = (0x40000000)
DS_REPL_NBR_MODIFIABLE_MASK = \
( \
DS_REPL_NBR_SYNC_ON_STARTUP | \
DS_REPL_NBR_DO_SCHEDULED_SYNCS | \
DS_REPL_NBR_TWO_WAY_SYNC | \
DS_REPL_NBR_IGNORE_CHANGE_NOTIFICATIONS | \
DS_REPL_NBR_DISABLE_SCHEDULED_SYNC | \
DS_REPL_NBR_COMPRESS_CHANGES | \
DS_REPL_NBR_NO_CHANGE_NOTIFICATIONS \
)
# from enum DS_NAME_FORMAT
DS_UNKNOWN_NAME = 0
DS_FQDN_1779_NAME = 1
DS_NT4_ACCOUNT_NAME = 2
DS_DISPLAY_NAME = 3
DS_UNIQUE_ID_NAME = 6
DS_CANONICAL_NAME = 7
DS_USER_PRINCIPAL_NAME = 8
DS_CANONICAL_NAME_EX = 9
DS_SERVICE_PRINCIPAL_NAME = 10
DS_SID_OR_SID_HISTORY_NAME = 11
DS_DNS_DOMAIN_NAME = 12
DS_DOMAIN_SIMPLE_NAME = DS_USER_PRINCIPAL_NAME
DS_ENTERPRISE_SIMPLE_NAME = DS_USER_PRINCIPAL_NAME
# from enum DS_NAME_FLAGS
DS_NAME_NO_FLAGS = 0x0
DS_NAME_FLAG_SYNTACTICAL_ONLY = 0x1
DS_NAME_FLAG_EVAL_AT_DC = 0x2
DS_NAME_FLAG_GCVERIFY = 0x4
DS_NAME_FLAG_TRUST_REFERRAL = 0x8
# from enum DS_NAME_ERROR
DS_NAME_NO_ERROR = 0
DS_NAME_ERROR_RESOLVING = 1
DS_NAME_ERROR_NOT_FOUND = 2
DS_NAME_ERROR_NOT_UNIQUE = 3
DS_NAME_ERROR_NO_MAPPING = 4
DS_NAME_ERROR_DOMAIN_ONLY = 5
DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING = 6
DS_NAME_ERROR_TRUST_REFERRAL = 7
# from enum DS_SPN_NAME_TYPE
DS_SPN_DNS_HOST = 0
DS_SPN_DN_HOST = 1
DS_SPN_NB_HOST = 2
DS_SPN_DOMAIN = 3
DS_SPN_NB_DOMAIN = 4
DS_SPN_SERVICE = 5
# from enum DS_SPN_WRITE_OP
DS_SPN_ADD_SPN_OP = 0
DS_SPN_REPLACE_SPN_OP = 1
DS_SPN_DELETE_SPN_OP = 2
# Generated by h2py from DsGetDC.h
DS_FORCE_REDISCOVERY = 0x00000001
DS_DIRECTORY_SERVICE_REQUIRED = 0x00000010
DS_DIRECTORY_SERVICE_PREFERRED = 0x00000020
DS_GC_SERVER_REQUIRED = 0x00000040
DS_PDC_REQUIRED = 0x00000080
DS_BACKGROUND_ONLY = 0x00000100
DS_IP_REQUIRED = 0x00000200
DS_KDC_REQUIRED = 0x00000400
DS_TIMESERV_REQUIRED = 0x00000800
DS_WRITABLE_REQUIRED = 0x00001000
DS_GOOD_TIMESERV_PREFERRED = 0x00002000
DS_AVOID_SELF = 0x00004000
DS_ONLY_LDAP_NEEDED = 0x00008000
DS_IS_FLAT_NAME = 0x00010000
DS_IS_DNS_NAME = 0x00020000
DS_RETURN_DNS_NAME = 0x40000000
DS_RETURN_FLAT_NAME = (-2147483648)
DSGETDC_VALID_FLAGS = ( \
DS_FORCE_REDISCOVERY | \
DS_DIRECTORY_SERVICE_REQUIRED | \
DS_DIRECTORY_SERVICE_PREFERRED | \
DS_GC_SERVER_REQUIRED | \
DS_PDC_REQUIRED | \
DS_BACKGROUND_ONLY | \
DS_IP_REQUIRED | \
DS_KDC_REQUIRED | \
DS_TIMESERV_REQUIRED | \
DS_WRITABLE_REQUIRED | \
DS_GOOD_TIMESERV_PREFERRED | \
DS_AVOID_SELF | \
DS_ONLY_LDAP_NEEDED | \
DS_IS_FLAT_NAME | \
DS_IS_DNS_NAME | \
DS_RETURN_FLAT_NAME | \
DS_RETURN_DNS_NAME )
DS_INET_ADDRESS = 1
DS_NETBIOS_ADDRESS = 2
DS_PDC_FLAG = 0x00000001
DS_GC_FLAG = 0x00000004
DS_LDAP_FLAG = 0x00000008
DS_DS_FLAG = 0x00000010
DS_KDC_FLAG = 0x00000020
DS_TIMESERV_FLAG = 0x00000040
DS_CLOSEST_FLAG = 0x00000080
DS_WRITABLE_FLAG = 0x00000100
DS_GOOD_TIMESERV_FLAG = 0x00000200
DS_NDNC_FLAG = 0x00000400
DS_PING_FLAGS = 0x0000FFFF
DS_DNS_CONTROLLER_FLAG = 0x20000000
DS_DNS_DOMAIN_FLAG = 0x40000000
DS_DNS_FOREST_FLAG = (-2147483648)
DS_DOMAIN_IN_FOREST = 0x0001
DS_DOMAIN_DIRECT_OUTBOUND = 0x0002
DS_DOMAIN_TREE_ROOT = 0x0004
DS_DOMAIN_PRIMARY = 0x0008
DS_DOMAIN_NATIVE_MODE = 0x0010
DS_DOMAIN_DIRECT_INBOUND = 0x0020
DS_DOMAIN_VALID_FLAGS = ( \
DS_DOMAIN_IN_FOREST | \
DS_DOMAIN_DIRECT_OUTBOUND | \
DS_DOMAIN_TREE_ROOT | \
DS_DOMAIN_PRIMARY | \
DS_DOMAIN_NATIVE_MODE | \
DS_DOMAIN_DIRECT_INBOUND )
DS_GFTI_UPDATE_TDO = 0x1
DS_GFTI_VALID_FLAGS = 0x1
DS_ONLY_DO_SITE_NAME = 0x01
DS_NOTIFY_AFTER_SITE_RECORDS = 0x02
DS_OPEN_VALID_OPTION_FLAGS = ( DS_ONLY_DO_SITE_NAME | DS_NOTIFY_AFTER_SITE_RECORDS )
DS_OPEN_VALID_FLAGS = ( \
DS_FORCE_REDISCOVERY | \
DS_ONLY_LDAP_NEEDED | \
DS_KDC_REQUIRED | \
DS_PDC_REQUIRED | \
DS_GC_SERVER_REQUIRED | \
DS_WRITABLE_REQUIRED )
## from aclui.h
# SI_OBJECT_INFO.dwFlags
SI_EDIT_PERMS = 0x00000000
SI_EDIT_OWNER = 0x00000001
SI_EDIT_AUDITS = 0x00000002
SI_CONTAINER = 0x00000004
SI_READONLY = 0x00000008
SI_ADVANCED = 0x00000010
SI_RESET = 0x00000020
SI_OWNER_READONLY = 0x00000040
SI_EDIT_PROPERTIES = 0x00000080
SI_OWNER_RECURSE = 0x00000100
SI_NO_ACL_PROTECT = 0x00000200
SI_NO_TREE_APPLY = 0x00000400
SI_PAGE_TITLE = 0x00000800
SI_SERVER_IS_DC = 0x00001000
SI_RESET_DACL_TREE = 0x00004000
SI_RESET_SACL_TREE = 0x00008000
SI_OBJECT_GUID = 0x00010000
SI_EDIT_EFFECTIVE = 0x00020000
SI_RESET_DACL = 0x00040000
SI_RESET_SACL = 0x00080000
SI_RESET_OWNER = 0x00100000
SI_NO_ADDITIONAL_PERMISSION = 0x00200000
SI_MAY_WRITE = 0x10000000
SI_EDIT_ALL = (SI_EDIT_PERMS | SI_EDIT_OWNER | SI_EDIT_AUDITS)
SI_AUDITS_ELEVATION_REQUIRED = 0x02000000
SI_VIEW_ONLY = 0x00400000
SI_OWNER_ELEVATION_REQUIRED = 0x04000000
SI_PERMS_ELEVATION_REQUIRED = 0x01000000
# SI_ACCESS.dwFlags
SI_ACCESS_SPECIFIC = 0x00010000
SI_ACCESS_GENERAL = 0x00020000
SI_ACCESS_CONTAINER = 0x00040000
SI_ACCESS_PROPERTY = 0x00080000
# SI_PAGE_TYPE enum
SI_PAGE_PERM = 0
SI_PAGE_ADVPERM = 1
SI_PAGE_AUDIT = 2
SI_PAGE_OWNER = 3
SI_PAGE_EFFECTIVE =4
CFSTR_ACLUI_SID_INFO_LIST = "CFSTR_ACLUI_SID_INFO_LIST"
PSPCB_SI_INITDIALOG = 1025 ## WM_USER+1
| delete = 65536
read_control = 131072
write_dac = 262144
write_owner = 524288
synchronize = 1048576
standard_rights_required = 983040
standard_rights_read = READ_CONTROL
standard_rights_write = READ_CONTROL
standard_rights_execute = READ_CONTROL
standard_rights_all = 2031616
specific_rights_all = 65535
access_system_security = 16777216
maximum_allowed = 33554432
generic_read = -2147483648
generic_write = 1073741824
generic_execute = 536870912
generic_all = 268435456
file_read_data = 1
file_list_directory = 1
file_write_data = 2
file_add_file = 2
file_append_data = 4
file_add_subdirectory = 4
file_create_pipe_instance = 4
file_read_ea = 8
file_write_ea = 16
file_execute = 32
file_traverse = 32
file_delete_child = 64
file_read_attributes = 128
file_write_attributes = 256
file_all_access = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 511
file_generic_read = STANDARD_RIGHTS_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE
file_generic_write = STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE
file_generic_execute = STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE | SYNCHRONIZE
security_null_sid_authority = (0, 0, 0, 0, 0, 0)
security_world_sid_authority = (0, 0, 0, 0, 0, 1)
security_local_sid_authority = (0, 0, 0, 0, 0, 2)
security_creator_sid_authority = (0, 0, 0, 0, 0, 3)
security_non_unique_authority = (0, 0, 0, 0, 0, 4)
security_resource_manager_authority = (0, 0, 0, 0, 0, 9)
security_null_rid = 0
security_world_rid = 0
security_local_rid = 0
security_creator_owner_rid = 0
security_creator_group_rid = 1
security_creator_owner_server_rid = 2
security_creator_group_server_rid = 3
security_creator_owner_rights_rid = 4
security_nt_authority = (0, 0, 0, 0, 0, 5)
security_dialup_rid = 1
security_network_rid = 2
security_batch_rid = 3
security_interactive_rid = 4
security_service_rid = 6
security_anonymous_logon_rid = 7
security_proxy_rid = 8
security_server_logon_rid = 9
security_logon_ids_rid = 5
security_logon_ids_rid_count = 3
security_local_system_rid = 18
security_nt_non_unique = 21
security_builtin_domain_rid = 32
domain_user_rid_admin = 500
domain_user_rid_guest = 501
domain_user_rid_krbtgt = 502
domain_user_rid_max = 999
domain_group_rid_admins = 512
domain_group_rid_users = 513
domain_group_rid_guests = 514
domain_group_rid_computers = 515
domain_group_rid_controllers = 516
domain_group_rid_cert_admins = 517
domain_group_rid_schema_admins = 518
domain_group_rid_enterprise_admins = 519
domain_group_rid_policy_admins = 520
domain_group_rid_readonly_controllers = 521
domain_alias_rid_admins = 544
domain_alias_rid_users = 545
domain_alias_rid_guests = 546
domain_alias_rid_power_users = 547
domain_alias_rid_account_ops = 548
domain_alias_rid_system_ops = 549
domain_alias_rid_print_ops = 550
domain_alias_rid_backup_ops = 551
domain_alias_rid_replicator = 552
domain_alias_rid_ras_servers = 553
domain_alias_rid_prew2_kcompaccess = 554
domain_alias_rid_remote_desktop_users = 555
domain_alias_rid_network_configuration_ops = 556
domain_alias_rid_incoming_forest_trust_builders = 557
domain_alias_rid_monitoring_users = 558
domain_alias_rid_logging_users = 559
domain_alias_rid_authorizationaccess = 560
domain_alias_rid_ts_license_servers = 561
domain_alias_rid_dcom_users = 562
domain_alias_rid_iusers = 568
domain_alias_rid_crypto_operators = 569
domain_alias_rid_cacheable_principals_group = 571
domain_alias_rid_non_cacheable_principals_group = 572
domain_alias_rid_event_log_readers_group = 573
security_mandatory_label_authority = (0, 0, 0, 0, 0, 16)
security_mandatory_untrusted_rid = 0
security_mandatory_low_rid = 4096
security_mandatory_medium_rid = 8192
security_mandatory_high_rid = 12288
security_mandatory_system_rid = 16384
security_mandatory_protected_process_rid = 20480
security_mandatory_maximum_user_rid = SECURITY_MANDATORY_SYSTEM_RID
system_luid = (999, 0)
anonymous_logon_luid = (998, 0)
localservice_luid = (997, 0)
networkservice_luid = (996, 0)
iuser_luid = (995, 0)
se_group_mandatory = 1
se_group_enabled_by_default = 2
se_group_enabled = 4
se_group_owner = 8
se_group_use_for_deny_only = 16
se_group_integrity = 32
se_group_integrity_enabled = 64
se_group_resource = 536870912
se_group_logon_id = -1073741824
access_min_ms_ace_type = 0
access_allowed_ace_type = 0
access_denied_ace_type = 1
system_audit_ace_type = 2
system_alarm_ace_type = 3
access_max_ms_v2_ace_type = 3
access_allowed_compound_ace_type = 4
access_max_ms_v3_ace_type = 4
access_min_ms_object_ace_type = 5
access_allowed_object_ace_type = 5
access_denied_object_ace_type = 6
system_audit_object_ace_type = 7
system_alarm_object_ace_type = 8
access_max_ms_object_ace_type = 8
access_max_ms_v4_ace_type = 8
access_max_ms_ace_type = 8
access_allowed_callback_ace_type = 9
access_denied_callback_ace_type = 10
access_allowed_callback_object_ace_type = 11
access_denied_callback_object_ace_type = 12
system_audit_callback_ace_type = 13
system_alarm_callback_ace_type = 14
system_audit_callback_object_ace_type = 15
system_alarm_callback_object_ace_type = 16
system_mandatory_label_ace_type = 17
access_max_ms_v5_ace_type = 17
object_inherit_ace = 1
container_inherit_ace = 2
no_propagate_inherit_ace = 4
inherit_only_ace = 8
valid_inherit_flags = 15
successful_access_ace_flag = 64
failed_access_ace_flag = 128
se_owner_defaulted = 1
se_group_defaulted = 2
se_dacl_present = 4
se_dacl_defaulted = 8
se_sacl_present = 16
se_sacl_defaulted = 32
se_self_relative = 32768
se_privilege_enabled_by_default = 1
se_privilege_enabled = 2
se_privilege_used_for_access = -2147483648
privilege_set_all_necessary = 1
se_create_token_name = 'SeCreateTokenPrivilege'
se_assignprimarytoken_name = 'SeAssignPrimaryTokenPrivilege'
se_lock_memory_name = 'SeLockMemoryPrivilege'
se_increase_quota_name = 'SeIncreaseQuotaPrivilege'
se_unsolicited_input_name = 'SeUnsolicitedInputPrivilege'
se_machine_account_name = 'SeMachineAccountPrivilege'
se_tcb_name = 'SeTcbPrivilege'
se_security_name = 'SeSecurityPrivilege'
se_take_ownership_name = 'SeTakeOwnershipPrivilege'
se_load_driver_name = 'SeLoadDriverPrivilege'
se_system_profile_name = 'SeSystemProfilePrivilege'
se_systemtime_name = 'SeSystemtimePrivilege'
se_prof_single_process_name = 'SeProfileSingleProcessPrivilege'
se_inc_base_priority_name = 'SeIncreaseBasePriorityPrivilege'
se_create_pagefile_name = 'SeCreatePagefilePrivilege'
se_create_permanent_name = 'SeCreatePermanentPrivilege'
se_backup_name = 'SeBackupPrivilege'
se_restore_name = 'SeRestorePrivilege'
se_shutdown_name = 'SeShutdownPrivilege'
se_debug_name = 'SeDebugPrivilege'
se_audit_name = 'SeAuditPrivilege'
se_system_environment_name = 'SeSystemEnvironmentPrivilege'
se_change_notify_name = 'SeChangeNotifyPrivilege'
se_remote_shutdown_name = 'SeRemoteShutdownPrivilege'
security_anonymous = 0
security_identification = 1
security_impersonation = 2
security_delegation = 3
security_max_impersonation_level = SecurityDelegation
default_impersonation_level = SecurityImpersonation
token_assign_primary = 1
token_duplicate = 2
token_impersonate = 4
token_query = 8
token_query_source = 16
token_adjust_privileges = 32
token_adjust_groups = 64
token_adjust_default = 128
token_all_access = STANDARD_RIGHTS_REQUIRED | TOKEN_ASSIGN_PRIMARY | TOKEN_DUPLICATE | TOKEN_IMPERSONATE | TOKEN_QUERY | TOKEN_QUERY_SOURCE | TOKEN_ADJUST_PRIVILEGES | TOKEN_ADJUST_GROUPS | TOKEN_ADJUST_DEFAULT
token_read = STANDARD_RIGHTS_READ | TOKEN_QUERY
token_write = STANDARD_RIGHTS_WRITE | TOKEN_ADJUST_PRIVILEGES | TOKEN_ADJUST_GROUPS | TOKEN_ADJUST_DEFAULT
token_execute = STANDARD_RIGHTS_EXECUTE
sid_type_user = 1
sid_type_group = 2
sid_type_domain = 3
sid_type_alias = 4
sid_type_well_known_group = 5
sid_type_deleted_account = 6
sid_type_invalid = 7
sid_type_unknown = 8
sid_type_computer = 9
sid_type_label = 10
token_primary = 1
token_impersonation = 2
token_user = 1
token_groups = 2
token_privileges = 3
token_owner = 4
token_primary_group = 5
token_default_dacl = 6
token_source = 7
token_type = 8
token_impersonation_level = 9
token_statistics = 10
token_restricted_sids = 11
token_session_id = 12
token_groups_and_privileges = 13
token_session_reference = 14
token_sand_box_inert = 15
token_audit_policy = 16
token_origin = 17
token_elevation_type = 18
token_linked_token = 19
token_elevation = 20
token_has_restrictions = 21
token_access_information = 22
token_virtualization_allowed = 23
token_virtualization_enabled = 24
token_integrity_level = 25
token_ui_access = 26
token_mandatory_policy = 27
token_logon_sid = 28
ds_behavior_win2000 = 0
ds_behavior_win2003_with_mixed_domains = 1
ds_behavior_win2003 = 2
ds_synced_event_name = 'NTDSInitialSyncsCompleted'
actrl_ds_open = 0
actrl_ds_create_child = 1
actrl_ds_delete_child = 2
actrl_ds_list = 4
actrl_ds_self = 8
actrl_ds_read_prop = 16
actrl_ds_write_prop = 32
actrl_ds_delete_tree = 64
actrl_ds_list_object = 128
actrl_ds_control_access = 256
ntdsapi_bind_allow_delegation = 1
ds_repsync_asynchronous_operation = 1
ds_repsync_writeable = 2
ds_repsync_periodic = 4
ds_repsync_intersite_messaging = 8
ds_repsync_all_sources = 16
ds_repsync_full = 32
ds_repsync_urgent = 64
ds_repsync_no_discard = 128
ds_repsync_force = 256
ds_repsync_add_reference = 512
ds_repsync_never_completed = 1024
ds_repsync_two_way = 2048
ds_repsync_never_notify = 4096
ds_repsync_initial = 8192
ds_repsync_use_compression = 16384
ds_repsync_abandoned = 32768
ds_repsync_initial_in_progress = 65536
ds_repsync_partial_attribute_set = 131072
ds_repsync_requeue = 262144
ds_repsync_notification = 524288
ds_repsync_asynchronous_replica = 1048576
ds_repsync_critical = 2097152
ds_repsync_full_in_progress = 4194304
ds_repsync_preempted = 8388608
ds_repadd_asynchronous_operation = 1
ds_repadd_writeable = 2
ds_repadd_initial = 4
ds_repadd_periodic = 8
ds_repadd_intersite_messaging = 16
ds_repadd_asynchronous_replica = 32
ds_repadd_disable_notification = 64
ds_repadd_disable_periodic = 128
ds_repadd_use_compression = 256
ds_repadd_never_notify = 512
ds_repadd_two_way = 1024
ds_repadd_critical = 2048
ds_repdel_asynchronous_operation = 1
ds_repdel_writeable = 2
ds_repdel_intersite_messaging = 4
ds_repdel_ignore_errors = 8
ds_repdel_local_only = 16
ds_repdel_no_source = 32
ds_repdel_ref_ok = 64
ds_repmod_asynchronous_operation = 1
ds_repmod_writeable = 2
ds_repmod_update_flags = 1
ds_repmod_update_address = 2
ds_repmod_update_schedule = 4
ds_repmod_update_result = 8
ds_repmod_update_transport = 16
ds_repupd_asynchronous_operation = 1
ds_repupd_writeable = 2
ds_repupd_add_reference = 4
ds_repupd_delete_reference = 8
ds_instancetype_is_nc_head = 1
ds_instancetype_nc_is_writeable = 4
ds_instancetype_nc_coming = 16
ds_instancetype_nc_going = 32
ntdsdsa_opt_is_gc = 1 << 0
ntdsdsa_opt_disable_inbound_repl = 1 << 1
ntdsdsa_opt_disable_outbound_repl = 1 << 2
ntdsdsa_opt_disable_ntdsconn_xlate = 1 << 3
ntdsconn_opt_is_generated = 1 << 0
ntdsconn_opt_twoway_sync = 1 << 1
ntdsconn_opt_override_notify_default = 1 << 2
ntdsconn_opt_use_notify = 1 << 3
ntdsconn_opt_disable_intersite_compression = 1 << 4
ntdsconn_opt_user_owned_schedule = 1 << 5
ntdsconn_kcc_no_reason = 0
ntdsconn_kcc_gc_topology = 1 << 0
ntdsconn_kcc_ring_topology = 1 << 1
ntdsconn_kcc_minimize_hops_topology = 1 << 2
ntdsconn_kcc_stale_servers_topology = 1 << 3
ntdsconn_kcc_oscillating_connection_topology = 1 << 4
ntdsconn_kcc_intersite_gc_topology = 1 << 5
ntdsconn_kcc_intersite_topology = 1 << 6
ntdsconn_kcc_server_failover_topology = 1 << 7
ntdsconn_kcc_site_failover_topology = 1 << 8
ntdsconn_kcc_redundant_server_topology = 1 << 9
frsconn_priority_mask = 1879048192
frsconn_max_priority = 8
ntdsconn_opt_ignore_schedule_mask = -2147483648
ntdssettings_opt_is_auto_topology_disabled = 1 << 0
ntdssettings_opt_is_topl_cleanup_disabled = 1 << 1
ntdssettings_opt_is_topl_min_hops_disabled = 1 << 2
ntdssettings_opt_is_topl_detect_stale_disabled = 1 << 3
ntdssettings_opt_is_inter_site_auto_topology_disabled = 1 << 4
ntdssettings_opt_is_group_caching_enabled = 1 << 5
ntdssettings_opt_force_kcc_whistler_behavior = 1 << 6
ntdssettings_opt_force_kcc_w2_k_election = 1 << 7
ntdssettings_opt_is_rand_bh_selection_disabled = 1 << 8
ntdssettings_opt_is_schedule_hashing_enabled = 1 << 9
ntdssettings_opt_is_redundant_server_topology_enabled = 1 << 10
ntdssettings_default_server_redundancy = 2
ntdstransport_opt_ignore_schedules = 1 << 0
ntdstransport_opt_bridges_required = 1 << 1
ntdssiteconn_opt_use_notify = 1 << 0
ntdssiteconn_opt_twoway_sync = 1 << 1
ntdssiteconn_opt_disable_compression = 1 << 2
ntdssitelink_opt_use_notify = 1 << 0
ntdssitelink_opt_twoway_sync = 1 << 1
ntdssitelink_opt_disable_compression = 1 << 2
guid_users_container_a = 'a9d1ca15768811d1aded00c04fd8d5cd'
guid_computrs_container_a = 'aa312825768811d1aded00c04fd8d5cd'
guid_systems_container_a = 'ab1d30f3768811d1aded00c04fd8d5cd'
guid_domain_controllers_container_a = 'a361b2ffffd211d1aa4b00c04fd7d83a'
guid_infrastructure_container_a = '2fbac1870ade11d297c400c04fd8d5cd'
guid_deleted_objects_container_a = '18e2ea80684f11d2b9aa00c04f79f805'
guid_lostandfound_container_a = 'ab8153b7768811d1aded00c04fd8d5cd'
guid_foreignsecurityprincipals_container_a = '22b70c67d56e4efb91e9300fca3dc1aa'
guid_program_data_container_a = '09460c08ae1e4a4ea0f64aee7daa1e5a'
guid_microsoft_program_data_container_a = 'f4be92a4c777485e878e9421d53087db'
guid_ntds_quotas_container_a = '6227f0af1fc2410d8e3bb10615bb5b0f'
guid_users_container_byte = '©ÑÊ\x15v\x88\x11Ñ\xadí\x00ÀOØÕÍ'
guid_computrs_container_byte = 'ª1(%v\x88\x11Ñ\xadí\x00ÀOØÕÍ'
guid_systems_container_byte = '«\x1d0óv\x88\x11Ñ\xadí\x00ÀOØÕÍ'
guid_domain_controllers_container_byte = '£a²ÿÿÒ\x11ѪK\x00ÀOר:'
guid_infrastructure_container_byte = '/ºÁ\x87\nÞ\x11Ò\x97Ä\x00ÀOØÕÍ'
guid_deleted_objects_container_byte = '\x18âê\x80hO\x11Ò¹ª\x00ÀOyø\x05'
guid_lostandfound_container_byte = '«\x81S·v\x88\x11Ñ\xadí\x00ÀOØÕÍ'
guid_foreignsecurityprincipals_container_byte = '"·\x0cgÕnNû\x91é0\x0fÊ=Áª'
guid_program_data_container_byte = '\tF\x0c\x08®\x1eJN\xa0öJî}ª\x1eZ'
guid_microsoft_program_data_container_byte = 'ô¾\x92¤ÇwH^\x87\x8e\x94!Õ0\x87Û'
guid_ntds_quotas_container_byte = "b'ð¯\x1fÂA\r\x8e;±\x06\x15»[\x0f"
ds_repsyncall_no_options = 0
ds_repsyncall_abort_if_server_unavailable = 1
ds_repsyncall_sync_adjacent_servers_only = 2
ds_repsyncall_id_servers_by_dn = 4
ds_repsyncall_do_not_sync = 8
ds_repsyncall_skip_initial_check = 16
ds_repsyncall_push_changes_outward = 32
ds_repsyncall_cross_site_boundaries = 64
ds_list_dsa_object_for_server = 0
ds_list_dns_host_name_for_server = 1
ds_list_account_object_for_server = 2
ds_role_schema_owner = 0
ds_role_domain_owner = 1
ds_role_pdc_owner = 2
ds_role_rid_owner = 3
ds_role_infrastructure_owner = 4
ds_schema_guid_not_found = 0
ds_schema_guid_attr = 1
ds_schema_guid_attr_set = 2
ds_schema_guid_class = 3
ds_schema_guid_control_right = 4
ds_kcc_flag_async_op = 1 << 0
ds_kcc_flag_damped = 1 << 1
ds_exist_advisory_mode = 1
ds_repl_info_flag_improve_linked_attrs = 1
ds_repl_nbr_writeable = 16
ds_repl_nbr_sync_on_startup = 32
ds_repl_nbr_do_scheduled_syncs = 64
ds_repl_nbr_use_async_intersite_transport = 128
ds_repl_nbr_two_way_sync = 512
ds_repl_nbr_return_object_parents = 2048
ds_repl_nbr_full_sync_in_progress = 65536
ds_repl_nbr_full_sync_next_packet = 131072
ds_repl_nbr_never_synced = 2097152
ds_repl_nbr_preempted = 16777216
ds_repl_nbr_ignore_change_notifications = 67108864
ds_repl_nbr_disable_scheduled_sync = 134217728
ds_repl_nbr_compress_changes = 268435456
ds_repl_nbr_no_change_notifications = 536870912
ds_repl_nbr_partial_attribute_set = 1073741824
ds_repl_nbr_modifiable_mask = DS_REPL_NBR_SYNC_ON_STARTUP | DS_REPL_NBR_DO_SCHEDULED_SYNCS | DS_REPL_NBR_TWO_WAY_SYNC | DS_REPL_NBR_IGNORE_CHANGE_NOTIFICATIONS | DS_REPL_NBR_DISABLE_SCHEDULED_SYNC | DS_REPL_NBR_COMPRESS_CHANGES | DS_REPL_NBR_NO_CHANGE_NOTIFICATIONS
ds_unknown_name = 0
ds_fqdn_1779_name = 1
ds_nt4_account_name = 2
ds_display_name = 3
ds_unique_id_name = 6
ds_canonical_name = 7
ds_user_principal_name = 8
ds_canonical_name_ex = 9
ds_service_principal_name = 10
ds_sid_or_sid_history_name = 11
ds_dns_domain_name = 12
ds_domain_simple_name = DS_USER_PRINCIPAL_NAME
ds_enterprise_simple_name = DS_USER_PRINCIPAL_NAME
ds_name_no_flags = 0
ds_name_flag_syntactical_only = 1
ds_name_flag_eval_at_dc = 2
ds_name_flag_gcverify = 4
ds_name_flag_trust_referral = 8
ds_name_no_error = 0
ds_name_error_resolving = 1
ds_name_error_not_found = 2
ds_name_error_not_unique = 3
ds_name_error_no_mapping = 4
ds_name_error_domain_only = 5
ds_name_error_no_syntactical_mapping = 6
ds_name_error_trust_referral = 7
ds_spn_dns_host = 0
ds_spn_dn_host = 1
ds_spn_nb_host = 2
ds_spn_domain = 3
ds_spn_nb_domain = 4
ds_spn_service = 5
ds_spn_add_spn_op = 0
ds_spn_replace_spn_op = 1
ds_spn_delete_spn_op = 2
ds_force_rediscovery = 1
ds_directory_service_required = 16
ds_directory_service_preferred = 32
ds_gc_server_required = 64
ds_pdc_required = 128
ds_background_only = 256
ds_ip_required = 512
ds_kdc_required = 1024
ds_timeserv_required = 2048
ds_writable_required = 4096
ds_good_timeserv_preferred = 8192
ds_avoid_self = 16384
ds_only_ldap_needed = 32768
ds_is_flat_name = 65536
ds_is_dns_name = 131072
ds_return_dns_name = 1073741824
ds_return_flat_name = -2147483648
dsgetdc_valid_flags = DS_FORCE_REDISCOVERY | DS_DIRECTORY_SERVICE_REQUIRED | DS_DIRECTORY_SERVICE_PREFERRED | DS_GC_SERVER_REQUIRED | DS_PDC_REQUIRED | DS_BACKGROUND_ONLY | DS_IP_REQUIRED | DS_KDC_REQUIRED | DS_TIMESERV_REQUIRED | DS_WRITABLE_REQUIRED | DS_GOOD_TIMESERV_PREFERRED | DS_AVOID_SELF | DS_ONLY_LDAP_NEEDED | DS_IS_FLAT_NAME | DS_IS_DNS_NAME | DS_RETURN_FLAT_NAME | DS_RETURN_DNS_NAME
ds_inet_address = 1
ds_netbios_address = 2
ds_pdc_flag = 1
ds_gc_flag = 4
ds_ldap_flag = 8
ds_ds_flag = 16
ds_kdc_flag = 32
ds_timeserv_flag = 64
ds_closest_flag = 128
ds_writable_flag = 256
ds_good_timeserv_flag = 512
ds_ndnc_flag = 1024
ds_ping_flags = 65535
ds_dns_controller_flag = 536870912
ds_dns_domain_flag = 1073741824
ds_dns_forest_flag = -2147483648
ds_domain_in_forest = 1
ds_domain_direct_outbound = 2
ds_domain_tree_root = 4
ds_domain_primary = 8
ds_domain_native_mode = 16
ds_domain_direct_inbound = 32
ds_domain_valid_flags = DS_DOMAIN_IN_FOREST | DS_DOMAIN_DIRECT_OUTBOUND | DS_DOMAIN_TREE_ROOT | DS_DOMAIN_PRIMARY | DS_DOMAIN_NATIVE_MODE | DS_DOMAIN_DIRECT_INBOUND
ds_gfti_update_tdo = 1
ds_gfti_valid_flags = 1
ds_only_do_site_name = 1
ds_notify_after_site_records = 2
ds_open_valid_option_flags = DS_ONLY_DO_SITE_NAME | DS_NOTIFY_AFTER_SITE_RECORDS
ds_open_valid_flags = DS_FORCE_REDISCOVERY | DS_ONLY_LDAP_NEEDED | DS_KDC_REQUIRED | DS_PDC_REQUIRED | DS_GC_SERVER_REQUIRED | DS_WRITABLE_REQUIRED
si_edit_perms = 0
si_edit_owner = 1
si_edit_audits = 2
si_container = 4
si_readonly = 8
si_advanced = 16
si_reset = 32
si_owner_readonly = 64
si_edit_properties = 128
si_owner_recurse = 256
si_no_acl_protect = 512
si_no_tree_apply = 1024
si_page_title = 2048
si_server_is_dc = 4096
si_reset_dacl_tree = 16384
si_reset_sacl_tree = 32768
si_object_guid = 65536
si_edit_effective = 131072
si_reset_dacl = 262144
si_reset_sacl = 524288
si_reset_owner = 1048576
si_no_additional_permission = 2097152
si_may_write = 268435456
si_edit_all = SI_EDIT_PERMS | SI_EDIT_OWNER | SI_EDIT_AUDITS
si_audits_elevation_required = 33554432
si_view_only = 4194304
si_owner_elevation_required = 67108864
si_perms_elevation_required = 16777216
si_access_specific = 65536
si_access_general = 131072
si_access_container = 262144
si_access_property = 524288
si_page_perm = 0
si_page_advperm = 1
si_page_audit = 2
si_page_owner = 3
si_page_effective = 4
cfstr_aclui_sid_info_list = 'CFSTR_ACLUI_SID_INFO_LIST'
pspcb_si_initdialog = 1025 |
#Challenge 1
num = 1
while num < 11:
print(num)
num += 1
#Challenge 2
chosenNum = input('Enter a number: ')
modifier = 1
chosenNum = int(chosenNum)
for count in range(1, chosenNum, 1):
chosenNum += count
print (chosenNum)
#Challenge 3
for count in range(1500, 2701, 1):
if (count % 7 == 0 and count % 5 == 0):
print (count)
#Challenge 4
for count in range(1, 6, 1):
for num in range (1, count, 1):
print(num, end ="")
print(count)
#Challenge 5
num1 = input('Enter a number: ')
print(len(num1))
#Looping method
n=int(input("Enter a number: "))
count=0
while(n>0):
count=count+1
n=n//10
print(count)
#Challenge 6
rangeMin = int(input('Enter a range min: '))
rangeMax = int(input('Enter a range max: '))
def isprime(num):
for n in range(2,int(num**1/2)+1):
if num%n==0:
return False
return True
for integer in range(rangeMin, rangeMax + 1, 1):
if isprime(integer):
print(integer)
| num = 1
while num < 11:
print(num)
num += 1
chosen_num = input('Enter a number: ')
modifier = 1
chosen_num = int(chosenNum)
for count in range(1, chosenNum, 1):
chosen_num += count
print(chosenNum)
for count in range(1500, 2701, 1):
if count % 7 == 0 and count % 5 == 0:
print(count)
for count in range(1, 6, 1):
for num in range(1, count, 1):
print(num, end='')
print(count)
num1 = input('Enter a number: ')
print(len(num1))
n = int(input('Enter a number: '))
count = 0
while n > 0:
count = count + 1
n = n // 10
print(count)
range_min = int(input('Enter a range min: '))
range_max = int(input('Enter a range max: '))
def isprime(num):
for n in range(2, int(num ** 1 / 2) + 1):
if num % n == 0:
return False
return True
for integer in range(rangeMin, rangeMax + 1, 1):
if isprime(integer):
print(integer) |
#! /home/nsanthony/anaconda3/bin/python
num_of_primes = 10000
prime_num_count = 0
primes = [0]*num_of_primes
i = 1 #starting prime
while prime_num_count < num_of_primes:
i += 1
divisible = 1
k = 0
while k < prime_num_count:
if(i % primes[k] == 0): #modulus
divisible = 0
break
else:
k += 1
if divisible != 0:
primes[prime_num_count] = i
prime_num_count += 1
print(i)
#print(primes[prime_num_count-1]) | num_of_primes = 10000
prime_num_count = 0
primes = [0] * num_of_primes
i = 1
while prime_num_count < num_of_primes:
i += 1
divisible = 1
k = 0
while k < prime_num_count:
if i % primes[k] == 0:
divisible = 0
break
else:
k += 1
if divisible != 0:
primes[prime_num_count] = i
prime_num_count += 1
print(i) |
"""
Prime Numbers I
"""
# Check if a number input by a user is prime or not. If it is NOT a prime number, print out that it is not a prime number. If it IS a prime number, print out that it is a prime number and give an example of two of its factors. Hint: Prime numbers must be greater than 1.
# Example of output for a NON-prime:
# 12 is not a prime number
# For example, 2 x 6 = 12
# user_input = input("Enter a number to check if it's prime: ")
| """
Prime Numbers I
""" |
"Dylan Murphy"
"2018-07-13"
'Dylan Murphy 2018-07-03'
"""This Program cross checks addresses from the Petroleum spill database with addresses listed in
the PLUTO csv file. these addresses have been edited and formatted in order to properly match.
It uses a binary search algorithms to search for matching addresses given one
from the active spills in Spills.Geocoding excel file"""
class Id:
def __init__(self,borough, block, lot, numbers, spaced_numbers, letters, BBL, x, y, E_des):
self.borough = borough
self.block= block
self.lot= lot
self.numbers=numbers
self.spaced_numbers= spaced_numbers
self.letters=letters
self.BBL=BBL
self.x=x
self.y=y
self.E_des= E_des
def __repr__(self):
return repr((self.borough, self.block, self.lot, self.numbers,self.spaced_numbers, self.letters, self.BBL, self.x,self.y,self.E_des))
class Goofy:
def __init__(self,numbers, spaced_numbers, letters):
self.numbers=numbers
self.spaced_numbers= spaced_numbers
self.letters=letters
def __repr__(self):
return repr((self.numbers,self.spaced_numbers, self.letters))
def binary_search(items, desired_item, start=0, end=None,):
"""Standard Binary search program takes
Parameters:
items= a sorted list of Id objects
desired_item = a Goofy Object looking for a matching .address field in items; single looking for a match (groovy baby)
start= int value representing the index position of search section
end = end boundary of the search section; when end == start
Returns:
None = only returned if the desired_item not found in items
pos = returns the index position of desired_item if found.
"""
if end == None:
end = len(items)
if start == end:
return None
# raise ValueError("%s was not found in the list." % desired_item)
pos = (end - start) // 2 + start
if desired_item.letters == items[pos].letters:
checkfirstSpill=str(desired_item.numbers)
checkfirstAddress=str(items[pos].numbers)
# if checkfirstSpill[len(checkfirstSpill)//2:] in checkfirstAddress: # have to make sure that checkfirstspill shorter than checkfirst address
if checkfirstSpill == checkfirstAddress:
return pos
else:
i=1
while desired_item.letters==items[pos+i].letters:
checkfirstAddress=items[pos+i].numbers
if checkfirstSpill== checkfirstAddress:
print("Special case for {} with {}".format(checkfirstSpill,checkfirstAddress))
return (pos+i)
else:
i+=1
continue
else:
return
#if the next items dont match in numbers, and its been run thru to check for letter matches
#return nothing
elif desired_item.letters > items[pos].letters:
return binary_search(items, desired_item, start=(pos + 1), end=end)
else: # desired_item < items[pos]:
return binary_search(items, desired_item, start=start, end=pos)
def ReadThru(dic, key, SpillOrPluto):
"""This file takes a filename string, opens that file and reads its contents, and assigns each file the appropriate class objects.
for the spill files which have a total of three fields in their 'meat' this class is 'Goofy' while for
Parameters:
dic = dictonary object with values of filename strings
key= key in dic to retrive a specific value
Returns:
SpillObjects= list of Goofy objects from the Spill csv files.
PlutoObjects= list of Id objects from the Pluto csv files.
"""
sheet = dic.get(key)
file= open(str(sheet), 'r')
data = file.readlines()
file.close()
headers = data[0]
meat = data[1:]#just the meat of the file no headers
if SpillOrPluto=='Spill':
SpillObjects=[]
pointer = 1
for line in meat:
Drew= "line"+str(pointer)
fields=line.split(',')
i=0
for item in fields:
WhoseLine= Goofy(fields[i],fields[i+1],fields[i+2])
SpillObjects.append(WhoseLine)
pointer+=1
return SpillObjects
elif SpillOrPluto=="Pluto":
PlutoObjects=[]
pointer = 1
for line in meat:
Drew= "line"+str(pointer)
fields=line.split(',')
i=0
for item in fields:
WhoseLine= Id(fields[i],fields[i+1],fields[i+2],fields[i+3],fields[i+4],fields[i+5],fields[i+6],fields[i+7],fields[i+8],fields[i+9])
PlutoObjects.append(WhoseLine)
pointer+=1
return PlutoObjects
def WriteTo(linelist, outfile):
"""writes the matches to a CSV file with name outfile"""
file = open(str(outfile),'w')
i=0
for line in linelist:
file.write(linelist[i].borough+ ',')
file.write(linelist[i].block+ ',')
file.write(linelist[i].lot+ ',')
file.write(linelist[i].numbers+ ',')
file.write(linelist[i].spaced_numbers+ ',')
file.write(linelist[i].letters+ ',')
file.write(linelist[i].BBL+ ',')
file.write(linelist[i].x+ ',')
file.write(linelist[i].y+ ',')
file.write(linelist[i].E_des)
i+=1
file.close()
def main():
plutodict={'BK':"BK_PLUTOFormatted_DateProneData_NOExcel.csv",'BX':"BX_PLUTOFormatted_DateProneData_NOExcel.csv",'QN':"QN_PLUTOFormatted_DateProneData_NOExcel.csv",'SI':"SI_PLUTOFormatted_DateProneData_NOExcel.csv"}
spillsdict={'BK':"BrooklynSpillsFormatted_DateProneData_NOExcel.csv",'BX':"BronxSpillsFormatted_DateProneData_NOExcel.csv",'QN':"QueensSpillsFormatted_DateProneData_NOExcel.csv",'SI':"StatenIslandSpillsFormatted_DateProneData_NOExcel.csv"}
keylist= plutodict.keys()
for i in keylist:
SpillsList=ReadThru(spillsdict,i,'Spill')
PlutoList=ReadThru(plutodict,i,'Pluto')
# i=0
# for item in mylist:
# print(SpillsList[i].letters)
# i+=1
matchlist=[]
for goo in SpillsList: #goo is goofy obj were searching for matches to
matchindex=binary_search(PlutoList, goo, start=0, end=None)
if matchindex != None:
matchlist.append(matchindex)
# print(matchlist) #ok i have a match index this list has content
#is it right tho?
#fixed an error where binary search was returning any items which matched in numbers
Matches=[]
for success in matchlist:
Matches.append(PlutoList[success])
WriteTo(Matches, str(i)+"_Street_Matches.csv")
main() | """Dylan Murphy"""
'2018-07-13'
'Dylan Murphy 2018-07-03'
'This Program cross checks addresses from the Petroleum spill database with addresses listed in \nthe PLUTO csv file. these addresses have been edited and formatted in order to properly match.\nIt uses a binary search algorithms to search for matching addresses given one \nfrom the active spills in Spills.Geocoding excel file'
class Id:
def __init__(self, borough, block, lot, numbers, spaced_numbers, letters, BBL, x, y, E_des):
self.borough = borough
self.block = block
self.lot = lot
self.numbers = numbers
self.spaced_numbers = spaced_numbers
self.letters = letters
self.BBL = BBL
self.x = x
self.y = y
self.E_des = E_des
def __repr__(self):
return repr((self.borough, self.block, self.lot, self.numbers, self.spaced_numbers, self.letters, self.BBL, self.x, self.y, self.E_des))
class Goofy:
def __init__(self, numbers, spaced_numbers, letters):
self.numbers = numbers
self.spaced_numbers = spaced_numbers
self.letters = letters
def __repr__(self):
return repr((self.numbers, self.spaced_numbers, self.letters))
def binary_search(items, desired_item, start=0, end=None):
"""Standard Binary search program takes
Parameters:
items= a sorted list of Id objects
desired_item = a Goofy Object looking for a matching .address field in items; single looking for a match (groovy baby)
start= int value representing the index position of search section
end = end boundary of the search section; when end == start
Returns:
None = only returned if the desired_item not found in items
pos = returns the index position of desired_item if found.
"""
if end == None:
end = len(items)
if start == end:
return None
pos = (end - start) // 2 + start
if desired_item.letters == items[pos].letters:
checkfirst_spill = str(desired_item.numbers)
checkfirst_address = str(items[pos].numbers)
if checkfirstSpill == checkfirstAddress:
return pos
else:
i = 1
while desired_item.letters == items[pos + i].letters:
checkfirst_address = items[pos + i].numbers
if checkfirstSpill == checkfirstAddress:
print('Special case for {} with {}'.format(checkfirstSpill, checkfirstAddress))
return pos + i
else:
i += 1
continue
else:
return
elif desired_item.letters > items[pos].letters:
return binary_search(items, desired_item, start=pos + 1, end=end)
else:
return binary_search(items, desired_item, start=start, end=pos)
def read_thru(dic, key, SpillOrPluto):
"""This file takes a filename string, opens that file and reads its contents, and assigns each file the appropriate class objects.
for the spill files which have a total of three fields in their 'meat' this class is 'Goofy' while for
Parameters:
dic = dictonary object with values of filename strings
key= key in dic to retrive a specific value
Returns:
SpillObjects= list of Goofy objects from the Spill csv files.
PlutoObjects= list of Id objects from the Pluto csv files.
"""
sheet = dic.get(key)
file = open(str(sheet), 'r')
data = file.readlines()
file.close()
headers = data[0]
meat = data[1:]
if SpillOrPluto == 'Spill':
spill_objects = []
pointer = 1
for line in meat:
drew = 'line' + str(pointer)
fields = line.split(',')
i = 0
for item in fields:
whose_line = goofy(fields[i], fields[i + 1], fields[i + 2])
SpillObjects.append(WhoseLine)
pointer += 1
return SpillObjects
elif SpillOrPluto == 'Pluto':
pluto_objects = []
pointer = 1
for line in meat:
drew = 'line' + str(pointer)
fields = line.split(',')
i = 0
for item in fields:
whose_line = id(fields[i], fields[i + 1], fields[i + 2], fields[i + 3], fields[i + 4], fields[i + 5], fields[i + 6], fields[i + 7], fields[i + 8], fields[i + 9])
PlutoObjects.append(WhoseLine)
pointer += 1
return PlutoObjects
def write_to(linelist, outfile):
"""writes the matches to a CSV file with name outfile"""
file = open(str(outfile), 'w')
i = 0
for line in linelist:
file.write(linelist[i].borough + ',')
file.write(linelist[i].block + ',')
file.write(linelist[i].lot + ',')
file.write(linelist[i].numbers + ',')
file.write(linelist[i].spaced_numbers + ',')
file.write(linelist[i].letters + ',')
file.write(linelist[i].BBL + ',')
file.write(linelist[i].x + ',')
file.write(linelist[i].y + ',')
file.write(linelist[i].E_des)
i += 1
file.close()
def main():
plutodict = {'BK': 'BK_PLUTOFormatted_DateProneData_NOExcel.csv', 'BX': 'BX_PLUTOFormatted_DateProneData_NOExcel.csv', 'QN': 'QN_PLUTOFormatted_DateProneData_NOExcel.csv', 'SI': 'SI_PLUTOFormatted_DateProneData_NOExcel.csv'}
spillsdict = {'BK': 'BrooklynSpillsFormatted_DateProneData_NOExcel.csv', 'BX': 'BronxSpillsFormatted_DateProneData_NOExcel.csv', 'QN': 'QueensSpillsFormatted_DateProneData_NOExcel.csv', 'SI': 'StatenIslandSpillsFormatted_DateProneData_NOExcel.csv'}
keylist = plutodict.keys()
for i in keylist:
spills_list = read_thru(spillsdict, i, 'Spill')
pluto_list = read_thru(plutodict, i, 'Pluto')
matchlist = []
for goo in SpillsList:
matchindex = binary_search(PlutoList, goo, start=0, end=None)
if matchindex != None:
matchlist.append(matchindex)
matches = []
for success in matchlist:
Matches.append(PlutoList[success])
write_to(Matches, str(i) + '_Street_Matches.csv')
main() |
string = input().upper()
if string.count('AUGUST')>=1:
print('NOU')
else:
string = ''.join(reversed(string)).replace('A','S')
print(string) | string = input().upper()
if string.count('AUGUST') >= 1:
print('NOU')
else:
string = ''.join(reversed(string)).replace('A', 'S')
print(string) |
"""
Inline tokenizer for mistletoe.
"""
def tokenize(string, token_types):
*token_types, fallback_token = token_types
tokens = find_tokens(string, token_types, fallback_token)
token_buffer = []
if tokens:
prev = tokens[0]
for curr in tokens[1:]:
prev = eval_tokens(prev, curr, token_buffer)
token_buffer.append(prev)
return make_tokens(token_buffer, 0, len(string), string, fallback_token)
def find_tokens(string, token_types, fallback_token):
tokens = []
for token_type in token_types:
for m in token_type.find(string):
tokens.append(ParseToken(m.start(), m.end(), m, string, token_type, fallback_token))
return sorted(tokens)
def eval_tokens(x, y, token_buffer):
r = relation(x, y)
if r == 0:
token_buffer.append(x)
return y
if r == 1:
return x if x.cls.precedence >= y.cls.precedence else y
if r == 2:
x.append_child(y)
return x
return x
def eval_new_child(parent, child):
last_child = parent.children[-1]
r = relation(last_child, child)
if r == 0:
parent.children.append(child)
elif r == 1 and last_child.cls.precedence < y.cls.precedence:
parent.children[-1] = child
elif r == 2:
last_child.append_child(child)
def relation(x, y):
if x.end <= y.start:
return 0 # x preceeds y
if x.end >= y.end:
if x.parse_start <= y.start and x.parse_end >= y.end:
return 2 # x contains y
if x.parse_end <= y.start:
return 3 # ignore y
return 1 # x intersects y
def make_tokens(tokens, start, end, string, fallback_token):
result = []
prev_end = start
for token in tokens:
if token.start > prev_end:
t = fallback_token(string[prev_end:token.start])
if t is not None:
result.append(t)
t = token.make()
if t is not None:
result.append(t)
prev_end = token.end
if prev_end != end:
result.append(fallback_token(string[prev_end:end]))
return result
class ParseToken:
def __init__(self, start, end, match, string, cls, fallback_token):
self.start = start
self.end = end
self.parse_start = match.start(cls.parse_group)
self.parse_end = match.end(cls.parse_group)
self.match = match
self.string = string
self.cls = cls
self.fallback_token = fallback_token
self.children = []
def append_child(self, child):
if self.cls.parse_inner:
if not self.children:
self.children.append(child)
else:
eval_new_child(self, child)
def make(self):
if not self.cls.parse_inner:
return self.cls(self.match)
children = make_tokens(self.children, self.parse_start, self.parse_end, self.string, self.fallback_token)
token = self.cls(self.match)
token.children = children
return token
def __lt__(self, other):
return self.start < other.start
def __repr__(self):
pattern = '<ParseToken span=({},{}) parse_span=({},{}) cls={} children={}>'
return pattern.format(self.start, self.end,
self.parse_start, self.parse_end,
repr(self.cls.__name__), self.children)
| """
Inline tokenizer for mistletoe.
"""
def tokenize(string, token_types):
(*token_types, fallback_token) = token_types
tokens = find_tokens(string, token_types, fallback_token)
token_buffer = []
if tokens:
prev = tokens[0]
for curr in tokens[1:]:
prev = eval_tokens(prev, curr, token_buffer)
token_buffer.append(prev)
return make_tokens(token_buffer, 0, len(string), string, fallback_token)
def find_tokens(string, token_types, fallback_token):
tokens = []
for token_type in token_types:
for m in token_type.find(string):
tokens.append(parse_token(m.start(), m.end(), m, string, token_type, fallback_token))
return sorted(tokens)
def eval_tokens(x, y, token_buffer):
r = relation(x, y)
if r == 0:
token_buffer.append(x)
return y
if r == 1:
return x if x.cls.precedence >= y.cls.precedence else y
if r == 2:
x.append_child(y)
return x
return x
def eval_new_child(parent, child):
last_child = parent.children[-1]
r = relation(last_child, child)
if r == 0:
parent.children.append(child)
elif r == 1 and last_child.cls.precedence < y.cls.precedence:
parent.children[-1] = child
elif r == 2:
last_child.append_child(child)
def relation(x, y):
if x.end <= y.start:
return 0
if x.end >= y.end:
if x.parse_start <= y.start and x.parse_end >= y.end:
return 2
if x.parse_end <= y.start:
return 3
return 1
def make_tokens(tokens, start, end, string, fallback_token):
result = []
prev_end = start
for token in tokens:
if token.start > prev_end:
t = fallback_token(string[prev_end:token.start])
if t is not None:
result.append(t)
t = token.make()
if t is not None:
result.append(t)
prev_end = token.end
if prev_end != end:
result.append(fallback_token(string[prev_end:end]))
return result
class Parsetoken:
def __init__(self, start, end, match, string, cls, fallback_token):
self.start = start
self.end = end
self.parse_start = match.start(cls.parse_group)
self.parse_end = match.end(cls.parse_group)
self.match = match
self.string = string
self.cls = cls
self.fallback_token = fallback_token
self.children = []
def append_child(self, child):
if self.cls.parse_inner:
if not self.children:
self.children.append(child)
else:
eval_new_child(self, child)
def make(self):
if not self.cls.parse_inner:
return self.cls(self.match)
children = make_tokens(self.children, self.parse_start, self.parse_end, self.string, self.fallback_token)
token = self.cls(self.match)
token.children = children
return token
def __lt__(self, other):
return self.start < other.start
def __repr__(self):
pattern = '<ParseToken span=({},{}) parse_span=({},{}) cls={} children={}>'
return pattern.format(self.start, self.end, self.parse_start, self.parse_end, repr(self.cls.__name__), self.children) |
n_odds = -1
for i in range(0, 14, 2):
# Check for the value of i in each iteration
breakpoint()
# Bad condition
if i % 1 == 0:
n_odds += 0
print(n_odds) | n_odds = -1
for i in range(0, 14, 2):
breakpoint()
if i % 1 == 0:
n_odds += 0
print(n_odds) |
class PublicClass:
pass
class _PrivateClass:
pass
def public_function():
pass
def _private_function():
pass
| class Publicclass:
pass
class _Privateclass:
pass
def public_function():
pass
def _private_function():
pass |
test_image = plt.imread(os.path.join('test_images', 'test4.jpg'))
undistorted_img = cv2.undistort(test_image, mtx, dist)
thresh_binary = func(image)
img_size = (thresh_binary.shape[1], thresh_binary.shape[0])
width, height = img_size
offset = 200
src = np.float32([
[ 588, 446 ],
[ 691, 446 ],
[ 1126, 673 ],
[ 153 , 673 ]])
dst = np.float32([[offset, 0], [img_size[0] - offset, 0], [img_size[0] - offset, img_size[1]], [offset, img_size[1]]])
M = cv2.getPerspectiveTransform(src,dst)
Minv = cv2.getPerspectiveTransform(dst, src)
plt.figure(figsize=(10,40))
plt.subplot(1,2,1)
thresh_binary = func(image)
plt.imshow(thresh_binary, cmap='gray')
plt.title('Thresholded Binary')
plt.subplot(1,2,2)
binary_warped = cv2.warpPerspective(thresh_binary,M, (width, height))
plt.imshow(binary_warped, cmap='gray')
plt.title('Binary Warped Image') | test_image = plt.imread(os.path.join('test_images', 'test4.jpg'))
undistorted_img = cv2.undistort(test_image, mtx, dist)
thresh_binary = func(image)
img_size = (thresh_binary.shape[1], thresh_binary.shape[0])
(width, height) = img_size
offset = 200
src = np.float32([[588, 446], [691, 446], [1126, 673], [153, 673]])
dst = np.float32([[offset, 0], [img_size[0] - offset, 0], [img_size[0] - offset, img_size[1]], [offset, img_size[1]]])
m = cv2.getPerspectiveTransform(src, dst)
minv = cv2.getPerspectiveTransform(dst, src)
plt.figure(figsize=(10, 40))
plt.subplot(1, 2, 1)
thresh_binary = func(image)
plt.imshow(thresh_binary, cmap='gray')
plt.title('Thresholded Binary')
plt.subplot(1, 2, 2)
binary_warped = cv2.warpPerspective(thresh_binary, M, (width, height))
plt.imshow(binary_warped, cmap='gray')
plt.title('Binary Warped Image') |
age = 3
admission_fee = (0,25,40)
if age < 4:
print(f"Your admission fee is ${admission_fee[0]}, welcome to the park!")
elif age < 18:
print(f"Your admission fee is ${admission_fee[1]}, welcome to the park!")
else:
print(f"You're a senior so your fee is ${admission_fee[2]}, Welcome!!")
| age = 3
admission_fee = (0, 25, 40)
if age < 4:
print(f'Your admission fee is ${admission_fee[0]}, welcome to the park!')
elif age < 18:
print(f'Your admission fee is ${admission_fee[1]}, welcome to the park!')
else:
print(f"You're a senior so your fee is ${admission_fee[2]}, Welcome!!") |
# -*- coding: utf-8 -*-
"""
Spyder Editor
@author: syenpark
Python Version: 3.6
"""
decimal = int(input('Enter an integer number: '))
sign = ''
digits = []
binary = ''
if decimal < 0:
decimal *= -1
sign = '-'
while decimal:
digits.insert(0, str(decimal % 2))
decimal //= 2
print(sign + binary.join(digits)) | """
Spyder Editor
@author: syenpark
Python Version: 3.6
"""
decimal = int(input('Enter an integer number: '))
sign = ''
digits = []
binary = ''
if decimal < 0:
decimal *= -1
sign = '-'
while decimal:
digits.insert(0, str(decimal % 2))
decimal //= 2
print(sign + binary.join(digits)) |
# Copyright (c) 2019 Pavel Vavruska
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
class Map:
def __init__(self):
self.__map_base = [
[10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 14, 14, 14, 14, 14, 14],
[10, -1,000, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, -1, -1, 14],
[10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 14],
[10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 14],
[10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 14],
[10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, 12, 14, 14, -1, -1, -1, 14],
[10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, -1, -1, 14],
[10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, -1, -1, 14],
[10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, -1, -1, 14],
[10, 10, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, -1, 14, 14],
[10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, -1, -1, 14],
[10, -1, -1, -1, -1, 10, 12, 11, 11, 11, -1, -1, -1, 12, 14, -1, -1, -1, -1, 14],
[10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, -1, -1, 14],
[10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, 12, 14, 14, -1, -1, -1, 14],
[10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, -1, -1, 14],
[10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, -1, -1, 14],
[10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, -1, -1, 14],
[10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, -1, -1, 14],
[10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1,000, -1, 14],
[10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 14, 14, 14, 14, 14, 14]
]
self.__size_y = len(self.__map_base)
self.__size_x = len(self.__map_base[0])
self.__map_effects = [[0]*self.__size_y for i in range(self.__size_x)]
@property
def size_x(self):
return self.__size_x
@property
def size_y(self):
return self.__size_y
@property
def data(self):
return self.__map_base
def get_at(self, x, y):
return self.__map_base[y][x]
def set_at(self, x, y, number):
self.data[y][x] = number
def get_effect_at(self, x, y):
return self.__map_effects[y][x]
def set_effect_at(self, x, y, number):
self.__map_effects[y][x] = number
@property
def effect_data(self):
return self.__map_effects | class Map:
def __init__(self):
self.__map_base = [[10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 14, 14, 14, 14, 14, 14], [10, -1, 0, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, -1, -1, 14], [10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 14], [10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 14], [10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 14], [10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, 12, 14, 14, -1, -1, -1, 14], [10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, -1, -1, 14], [10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, -1, -1, 14], [10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, -1, -1, 14], [10, 10, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, -1, 14, 14], [10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, -1, -1, 14], [10, -1, -1, -1, -1, 10, 12, 11, 11, 11, -1, -1, -1, 12, 14, -1, -1, -1, -1, 14], [10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, -1, -1, 14], [10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, 12, 14, 14, -1, -1, -1, 14], [10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, -1, -1, 14], [10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, -1, -1, 14], [10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, -1, -1, 14], [10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, -1, -1, 14], [10, -1, -1, -1, -1, 10, 12, -1, -1, -1, -1, -1, -1, 12, 14, -1, -1, 0, -1, 14], [10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 14, 14, 14, 14, 14, 14]]
self.__size_y = len(self.__map_base)
self.__size_x = len(self.__map_base[0])
self.__map_effects = [[0] * self.__size_y for i in range(self.__size_x)]
@property
def size_x(self):
return self.__size_x
@property
def size_y(self):
return self.__size_y
@property
def data(self):
return self.__map_base
def get_at(self, x, y):
return self.__map_base[y][x]
def set_at(self, x, y, number):
self.data[y][x] = number
def get_effect_at(self, x, y):
return self.__map_effects[y][x]
def set_effect_at(self, x, y, number):
self.__map_effects[y][x] = number
@property
def effect_data(self):
return self.__map_effects |
dict={11:"th", 12:"th", 13:"th", 1:"st", 2:"nd", 3:"rd"}
def what_century(year):
year=str(year)
century=int(year[:2])+1 if year[-2:]!="00" else int(year[:2])
if century in dict:
return f"{century}{dict[century]}"
elif century%10 in dict:
return f"{century}{dict[century%10]}"
return f"{century}th" | dict = {11: 'th', 12: 'th', 13: 'th', 1: 'st', 2: 'nd', 3: 'rd'}
def what_century(year):
year = str(year)
century = int(year[:2]) + 1 if year[-2:] != '00' else int(year[:2])
if century in dict:
return f'{century}{dict[century]}'
elif century % 10 in dict:
return f'{century}{dict[century % 10]}'
return f'{century}th' |
"""
@author: Maneesh D
@date: May 15, 2017
@interpreter: Python 3.6.1
Fahrenheit to Celcius Converter
"""
fahren = float(input("Enter the temperature in Fahrenheit: "))
celcius = ((fahren - 32) * 5) / 9
print("%.2f in Degree Celcius is %.2f" % (fahren, celcius))
| """
@author: Maneesh D
@date: May 15, 2017
@interpreter: Python 3.6.1
Fahrenheit to Celcius Converter
"""
fahren = float(input('Enter the temperature in Fahrenheit: '))
celcius = (fahren - 32) * 5 / 9
print('%.2f in Degree Celcius is %.2f' % (fahren, celcius)) |
class EdgeType(Enum):
"""Enumeration of different causal edges.
Categories
----------
bidirected : str
Signifies edge is part of a "<->" edge.
arrow : str
Signifies ">", or "<" edge. That is a normal
directed edge.
circle : str
Signifies "o" endpoint. That is an uncertain edge,
meaning it could be a tail, or an arrow.
Notes
-----
The possible edges are:
->, <-, <->, o->, <-o, o-o
"""
arrow = "arrow"
circle = "circle"
bidirected = "bidirected"
class CausalGraphicalModel(nx.MultiDiGraph):
def __init__(self, incoming_graph_data=None, incoming_latent_data=None, **attr):
"""Initialize a causal graphical model.
This is a Bayesian network, where now the edges represent
causal influences. Self loops are not allowed. This graph type
inherits functionality from networkx. As such, different edge
types are enabled using the edge attribute 'type', enumerated
by `EdgeType`.
Parameters
----------
incoming_graph_data : input graph (optional, default: None)
Data to initialize directed acyclic graph. If None (default) an empty
graph is created. The data can be an edge list, or any
NetworkX graph object. If the corresponding optional Python
packages are installed the data can also be a 2D NumPy array, a
SciPy sparse matrix, or a PyGraphviz graph.
incoming_latent_data : input bidrected edge list.
Indicates which nodes are connected with a bidirected edge.
attr : keyword arguments, optional (default= no attributes)
Attributes to add to graph as key=value pairs.
See Also
--------
networkx.MultiDiGraph
Notes
-----
"""
super(CausalGraphicalModel, self).__init__(
incoming_graph_data=incoming_graph_data, **attr
)
# check if there are any repeated edges
for u in G.nodes():
for neighbor in G.neighbors(u):
if G.number_of_edges(u, neighbor) > 2:
print(u, neighbor)
# label all existing edges as "arrow types"
nx.set_edge_attributes(self, EdgeType.arrow, "type")
# add bidirected edges
for u_node, v_node in incoming_latent_data:
self.add_bidirected_edge(u_node, v_node, type="bidirected")
def add_bidirected_edge(self, u_for_edge, v_for_edge, **attr):
"""Add a bidirected edge between u and v.
The nodes u and v will be automatically added if they are
not already in the graph.
Parameters
----------
u_for_edge, v_for_edge : nodes
Nodes can be, for example, strings or numbers.
Nodes must be hashable (and not None) Python objects.
attr : keyword arguments, optional
Edge data (or labels or objects) can be assigned using
keyword arguments.
Returns
-------
The edge key assigned to the edge.
See Also
--------
nx.MultiDiGraph.add_edges_from : add a collection of edges
nx.MultiDiGraph.add_edge : add an edge
Notes
-----
...
"""
if "type" in attr:
raise ValueError('"type" cannot be a key in edge data.')
# add bidirected edge by adding a directed edge in both
# directions, and labeling the "type" as "bidirected"
key = 1
self.add_edge(u_for_edge, v_for_edge, key=key, type=EdgeType.bidirected, **attr)
self.add_edge(u_for_edge, v_for_edge, key=key, type=EdgeType.bidirected, **attr)
return key
def _get_c_components(self):
pass
def add_unobserved_common_cause(self, observed_node_names, color="gray"):
# Adding unobserved confounders
current_common_causes = self.get_common_causes(
self.treatment_name, self.outcome_name
)
create_new_common_cause = True
for node_name in current_common_causes:
if self._graph.nodes[node_name]["observed"] == "no":
create_new_common_cause = False
if create_new_common_cause:
uc_label = "Unobserved Confounders"
self._graph.add_node(
"U",
label=uc_label,
observed="no",
color=color,
style="filled",
fillcolor=color,
)
for node in self.treatment_name + self.outcome_name:
self._graph.add_edge("U", node)
self.logger.info(
'If this is observed data (not from a randomized experiment), there might always be missing confounders. Adding a node named "Unobserved Confounders" to reflect this.'
)
return self._graph
def compute_mag(self) -> nx.DiGraph:
"""Compute the MAG corresponding to the causal DAG.
The Maximal Ancestral Graph maintains all conditional
independences associated with the causal DAG and in
place of latent variables, has
Returns
-------
nx.DiGraph
_description_
"""
adj_mat = nx.adjacency_matrix(self)
# get the adjacency of the graph
mag = nx.from_numpy_matrix(adj_mat)
# loop over all nodes
for node in mag.nodes:
# then for each node, loop over the adjacent
pass
| class Edgetype(Enum):
"""Enumeration of different causal edges.
Categories
----------
bidirected : str
Signifies edge is part of a "<->" edge.
arrow : str
Signifies ">", or "<" edge. That is a normal
directed edge.
circle : str
Signifies "o" endpoint. That is an uncertain edge,
meaning it could be a tail, or an arrow.
Notes
-----
The possible edges are:
->, <-, <->, o->, <-o, o-o
"""
arrow = 'arrow'
circle = 'circle'
bidirected = 'bidirected'
class Causalgraphicalmodel(nx.MultiDiGraph):
def __init__(self, incoming_graph_data=None, incoming_latent_data=None, **attr):
"""Initialize a causal graphical model.
This is a Bayesian network, where now the edges represent
causal influences. Self loops are not allowed. This graph type
inherits functionality from networkx. As such, different edge
types are enabled using the edge attribute 'type', enumerated
by `EdgeType`.
Parameters
----------
incoming_graph_data : input graph (optional, default: None)
Data to initialize directed acyclic graph. If None (default) an empty
graph is created. The data can be an edge list, or any
NetworkX graph object. If the corresponding optional Python
packages are installed the data can also be a 2D NumPy array, a
SciPy sparse matrix, or a PyGraphviz graph.
incoming_latent_data : input bidrected edge list.
Indicates which nodes are connected with a bidirected edge.
attr : keyword arguments, optional (default= no attributes)
Attributes to add to graph as key=value pairs.
See Also
--------
networkx.MultiDiGraph
Notes
-----
"""
super(CausalGraphicalModel, self).__init__(incoming_graph_data=incoming_graph_data, **attr)
for u in G.nodes():
for neighbor in G.neighbors(u):
if G.number_of_edges(u, neighbor) > 2:
print(u, neighbor)
nx.set_edge_attributes(self, EdgeType.arrow, 'type')
for (u_node, v_node) in incoming_latent_data:
self.add_bidirected_edge(u_node, v_node, type='bidirected')
def add_bidirected_edge(self, u_for_edge, v_for_edge, **attr):
"""Add a bidirected edge between u and v.
The nodes u and v will be automatically added if they are
not already in the graph.
Parameters
----------
u_for_edge, v_for_edge : nodes
Nodes can be, for example, strings or numbers.
Nodes must be hashable (and not None) Python objects.
attr : keyword arguments, optional
Edge data (or labels or objects) can be assigned using
keyword arguments.
Returns
-------
The edge key assigned to the edge.
See Also
--------
nx.MultiDiGraph.add_edges_from : add a collection of edges
nx.MultiDiGraph.add_edge : add an edge
Notes
-----
...
"""
if 'type' in attr:
raise value_error('"type" cannot be a key in edge data.')
key = 1
self.add_edge(u_for_edge, v_for_edge, key=key, type=EdgeType.bidirected, **attr)
self.add_edge(u_for_edge, v_for_edge, key=key, type=EdgeType.bidirected, **attr)
return key
def _get_c_components(self):
pass
def add_unobserved_common_cause(self, observed_node_names, color='gray'):
current_common_causes = self.get_common_causes(self.treatment_name, self.outcome_name)
create_new_common_cause = True
for node_name in current_common_causes:
if self._graph.nodes[node_name]['observed'] == 'no':
create_new_common_cause = False
if create_new_common_cause:
uc_label = 'Unobserved Confounders'
self._graph.add_node('U', label=uc_label, observed='no', color=color, style='filled', fillcolor=color)
for node in self.treatment_name + self.outcome_name:
self._graph.add_edge('U', node)
self.logger.info('If this is observed data (not from a randomized experiment), there might always be missing confounders. Adding a node named "Unobserved Confounders" to reflect this.')
return self._graph
def compute_mag(self) -> nx.DiGraph:
"""Compute the MAG corresponding to the causal DAG.
The Maximal Ancestral Graph maintains all conditional
independences associated with the causal DAG and in
place of latent variables, has
Returns
-------
nx.DiGraph
_description_
"""
adj_mat = nx.adjacency_matrix(self)
mag = nx.from_numpy_matrix(adj_mat)
for node in mag.nodes:
pass |
class common(object):
"""description of class"""
def generateData(dat):
updateDic = {
"Cartisian.position.x":dat['Cartisian[position][x]'],
"Cartisian.position.y":dat['Cartisian[position][y]'],
"Cartisian.position.z":dat['Cartisian[position][z]'],
"Cartisian.orientation.x":dat['Cartisian[orientation][x]'],
"Cartisian.orientation.y":dat['Cartisian[orientation][y]'],
"Cartisian.orientation.z":dat['Cartisian[orientation][z]'],
"Cartisian.orientation.w":dat['Cartisian[orientation][w]'],
"FriendlyName":dat["FriendlyName"],
"Order":dat["Order"],
"Speed":dat["Speed"],
"Action":dat["Action"]
}
return updateDic
def generateData2(dat):
updateDic = {
"FriendlyName":dat["FriendlyName"],
"Order":dat["Order"],
"Speed":dat["Speed"],
"Action":dat["Action"],
"Name":dat["Name"]
}
updateDic["Cartisian"] = {}
updateDic["Cartisian"]["position"] = {}
updateDic["Cartisian"]["orientation"] = {}
updateDic["Cartisian"]["position"]["x"] = dat['Cartisian[position][x]']
updateDic["Cartisian"]["position"]["y"] = dat['Cartisian[position][y]']
updateDic["Cartisian"]["position"]["z"] = dat['Cartisian[position][z]']
updateDic["Cartisian"]["orientation"]["x"] = dat['Cartisian[orientation][x]']
updateDic["Cartisian"]["orientation"]["y"] = dat['Cartisian[orientation][y]']
updateDic["Cartisian"]["orientation"]["z"] = dat['Cartisian[orientation][z]']
updateDic["Cartisian"]["orientation"]["w"] = dat['Cartisian[orientation][w]']
return updateDic
| class Common(object):
"""description of class"""
def generate_data(dat):
update_dic = {'Cartisian.position.x': dat['Cartisian[position][x]'], 'Cartisian.position.y': dat['Cartisian[position][y]'], 'Cartisian.position.z': dat['Cartisian[position][z]'], 'Cartisian.orientation.x': dat['Cartisian[orientation][x]'], 'Cartisian.orientation.y': dat['Cartisian[orientation][y]'], 'Cartisian.orientation.z': dat['Cartisian[orientation][z]'], 'Cartisian.orientation.w': dat['Cartisian[orientation][w]'], 'FriendlyName': dat['FriendlyName'], 'Order': dat['Order'], 'Speed': dat['Speed'], 'Action': dat['Action']}
return updateDic
def generate_data2(dat):
update_dic = {'FriendlyName': dat['FriendlyName'], 'Order': dat['Order'], 'Speed': dat['Speed'], 'Action': dat['Action'], 'Name': dat['Name']}
updateDic['Cartisian'] = {}
updateDic['Cartisian']['position'] = {}
updateDic['Cartisian']['orientation'] = {}
updateDic['Cartisian']['position']['x'] = dat['Cartisian[position][x]']
updateDic['Cartisian']['position']['y'] = dat['Cartisian[position][y]']
updateDic['Cartisian']['position']['z'] = dat['Cartisian[position][z]']
updateDic['Cartisian']['orientation']['x'] = dat['Cartisian[orientation][x]']
updateDic['Cartisian']['orientation']['y'] = dat['Cartisian[orientation][y]']
updateDic['Cartisian']['orientation']['z'] = dat['Cartisian[orientation][z]']
updateDic['Cartisian']['orientation']['w'] = dat['Cartisian[orientation][w]']
return updateDic |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.