content
stringlengths 7
1.05M
|
---|
'''
Desenvolva um programa que leia o comprimento de três retas e diga ao usuário se elas
podem ou não formar um triângulo.
'''
reta1 = float(input('Digite o comprimento da primeira reta: '))
reta2 = float(input('Digite o comprimento da segunda reta: '))
reta3 = float(input('Digite o comprimento da terceira reta: '))
if reta1 < 0 or reta2 < 0 or reta3 < 0:
print('\nValor Inválido!')
print('Não EXISTE medida de lado NEGATIVA!')
else:
if reta1 + reta2 > reta3 and reta1 + reta3 > reta2 and reta2 + reta3 > reta1:
print('\nAs três retas podem formar triângulo!')
else:
print('\nAs três retas NÃO podem formar triângulo!') |
# POKEMING - GON'NA CATCH 'EM ALL
# -- A simple hack 'n slash game in console
# -- This class is handles all utility related things
class Utility:
# This allows to see important message of the game
def pause(message):
print(message)
input('Press any key to continue.') |
str1 = "Python"
str2 = "Python"
print("\nMemory location of str1 =", hex(id(str1)))
print("Memory location of str2 =", hex(id(str2)))
print() |
config = dict()
config['fixed_cpu_frequency'] = "@ 3700 MHz"
config['frequency'] = 3.7e9
config['maxflops_sisd'] = 2
config['maxflops_sisd_fma'] = 4
config['maxflops_simd'] = 16
config['maxflops_simd_fma'] = 32
config['roofline_beta'] = 64 # According to WikiChip (Skylake)
config['figure_size'] = (20,9)
config['save_folder'] = '../all_plots/' |
class Location:
def __init__(self, location_id, borough, zone, lat, lng):
self.location_id = location_id
self.borough = borough
self.zone = zone
self.lat = lat
self.lng = lng
@property
def json(self):
return {
"location_id": self.location_id,
"borough": self.borough,
"zone": self.zone,
"lat": self.lat,
"lng": self.lng
}
Locations = [
Location(1, "EWR", "Newark Airport", 40.6895314, -74.1744624),
Location(2, "Queens", "Jamaica Bay", 40.6056632, -73.8713099),
Location(3, "Bronx", "Allerton/Pelham Gardens", 40.8627726, -73.84343919999999),
Location(4, "Manhattan", "Alphabet City", 40.7258428, -73.9774916),
Location(5, "Staten Island", "Arden Heights", 40.556413, -74.1735044),
Location(6, "Staten Island", "Arrochar/Fort Wadsworth", 40.6012117, -74.0579185),
Location(7, "Queens", "Astoria", 40.7643574, -73.92346189999999),
Location(8, "Queens", "Astoria Park", 40.7785364, -73.92283359999999),
Location(9, "Queens", "Auburndale", 40.7577672, -73.78339609999999),
Location(10, "Queens", "Baisley Park", 40.6737751, -73.786025),
Location(11, "Brooklyn", "Bath Beach", 40.6038852, -74.0062078),
Location(12, "Manhattan", "Battery Park", 40.703141, -74.0159996),
Location(13, "Manhattan", "Battery Park City", 40.7115786, -74.0158441),
Location(14, "Brooklyn", "Bay Ridge", 40.6263732, -74.0298767),
Location(15, "Queens", "Bay Terrace/Fort Totten", 40.7920899, -73.7760996),
Location(16, "Queens", "Bayside", 40.7585569, -73.7654367),
Location(17, "Brooklyn", "Bedford", 40.6872176, -73.9417735),
Location(18, "Bronx", "Bedford Park", 40.8700999, -73.8856912),
Location(19, "Queens", "Bellerose", 40.7361769, -73.7137365),
Location(20, "Bronx", "Belmont", 40.8534507, -73.88936819999999),
Location(21, "Brooklyn", "Bensonhurst East", 40.6139307, -73.9921833),
Location(22, "Brooklyn", "Bensonhurst West", 40.6139307, -73.9921833),
Location(23, "Staten Island", "Bloomfield/Emerson Hill", 40.6074525, -74.0963115),
Location(24, "Manhattan", "Bloomingdale", 40.7988958, -73.9697795),
Location(25, "Brooklyn", "Boerum Hill", 40.6848689, -73.9844722),
Location(26, "Brooklyn", "Borough Park", 40.6350319, -73.9921028),
Location(27, "Queens", "Breezy Point/Fort Tilden/Riis Beach", 40.5597687, -73.88761509999999),
Location(28, "Queens", "Briarwood/Jamaica Hills", 40.7109315, -73.81356099999999),
Location(29, "Brooklyn", "Brighton Beach", 40.5780706, -73.9596565),
Location(30, "Queens", "Broad Channel", 40.6158335, -73.8213213),
Location(31, "Bronx", "Bronx Park", 40.8608544, -73.8706278),
Location(32, "Bronx", "Bronxdale", 40.8474697, -73.8599132),
Location(33, "Brooklyn", "Brooklyn Heights", 40.6959294, -73.9955523),
Location(34, "Brooklyn", "Brooklyn Navy Yard", 40.7025634, -73.9697795),
Location(35, "Brooklyn", "Brownsville", 40.665214, -73.9125304),
Location(36, "Brooklyn", "Bushwick North", 40.6957755, -73.9170604),
Location(37, "Brooklyn", "Bushwick South", 40.7043655, -73.9383476),
Location(38, "Queens", "Cambria Heights", 40.692158, -73.7330753),
Location(39, "Brooklyn", "Canarsie", 40.6402325, -73.9060579),
Location(40, "Brooklyn", "Carroll Gardens", 40.6795331, -73.9991637),
Location(41, "Manhattan", "Central Harlem", 40.8089419, -73.9482305),
Location(42, "Manhattan", "Central Harlem North", 40.8142585, -73.9426617),
Location(43, "Manhattan", "Central Park", 40.7812199, -73.9665138),
Location(44, "Staten Island", "Charleston/Tottenville", 40.5083408, -74.23554039999999),
Location(45, "Manhattan", "Chinatown", 40.7157509, -73.9970307),
Location(46, "Bronx", "City Island", 40.8468202, -73.7874983),
Location(47, "Bronx", "Claremont/Bathgate", 40.84128339999999, -73.9001573),
Location(48, "Manhattan", "Clinton East", 40.7637581, -73.9918181),
Location(49, "Brooklyn", "Clinton Hill", 40.6896834, -73.9661144),
Location(50, "Manhattan", "Clinton West", 40.7628785, -73.9940134),
Location(51, "Bronx", "Co-Op City", 40.8738889, -73.82944440000001),
Location(52, "Brooklyn", "Cobble Hill", 40.686536, -73.9962255),
Location(53, "Queens", "College Point", 40.786395, -73.8389657),
Location(54, "Brooklyn", "Columbia Street", 40.6775239, -74.00634409999999),
Location(55, "Brooklyn", "Coney Island", 40.5755438, -73.9707016),
Location(56, "Queens", "Corona", 40.7449859, -73.8642613),
Location(57, "Queens", "Corona", 40.7449859, -73.8642613),
Location(58, "Bronx", "Country Club", 40.8391667, -73.8197222),
Location(59, "Bronx", "Crotona Park", 40.8400367, -73.8953489),
Location(60, "Bronx", "Crotona Park East", 40.8365344, -73.8933509),
Location(61, "Brooklyn", "Crown Heights North", 40.6694022, -73.9422324),
Location(62, "Brooklyn", "Crown Heights South", 40.6694022, -73.9422324),
Location(63, "Brooklyn", "Cypress Hills", 40.6836873, -73.87963309999999),
Location(64, "Queens", "Douglaston", 40.76401509999999, -73.7433727),
Location(65, "Brooklyn", "Downtown Brooklyn/MetroTech", 40.6930987, -73.98566339999999),
Location(66, "Brooklyn", "DUMBO/Vinegar Hill", 40.70371859999999, -73.98226830000002),
Location(67, "Brooklyn", "Dyker Heights", 40.6214932, -74.00958399999999),
Location(68, "Manhattan", "East Chelsea", 40.7465004, -74.00137370000002),
Location(69, "Bronx", "East Concourse/Concourse Village", 40.8255863, -73.9184388),
Location(70, "Queens", "East Elmhurst", 40.7737505, -73.8713099),
Location(71, "Brooklyn", "East Flatbush/Farragut", 40.63751329999999, -73.9280797),
Location(72, "Brooklyn", "East Flatbush/Remsen Village", 40.6511399, -73.9181602),
Location(73, "Queens", "East Flushing", 40.7540534, -73.8086418),
Location(74, "Manhattan", "East Harlem North", 40.7957399, -73.93892129999999),
Location(75, "Manhattan", "East Harlem South", 40.7957399, -73.93892129999999),
Location(76, "Brooklyn", "East New York", 40.6590529, -73.8759245),
Location(77, "Brooklyn", "East New York/Pennsylvania Avenue", 40.65845729999999, -73.8904498),
Location(78, "Bronx", "East Tremont", 40.8453781, -73.8909693),
Location(79, "Manhattan", "East Village", 40.7264773, -73.98153370000001),
Location(80, "Brooklyn", "East Williamsburg", 40.7141953, -73.9316461),
Location(81, "Bronx", "Eastchester", 40.8859837, -73.82794710000002),
Location(82, "Queens", "Elmhurst", 40.737975, -73.8801301),
Location(83, "Queens", "Elmhurst/Maspeth", 40.7294018, -73.9065883),
Location(84, "Staten Island", "Eltingville/Annadale/Prince's Bay", 40.52899439999999, -74.197644),
Location(85, "Brooklyn", "Erasmus", 40.649649, -73.95287379999999),
Location(86, "Queens", "Far Rockaway", 40.5998931, -73.74484369999999),
Location(87, "Manhattan", "Financial District North", 40.7077143, -74.00827869999999),
Location(88, "Manhattan", "Financial District South", 40.705123, -74.0049259),
Location(89, "Brooklyn", "Flatbush/Ditmas Park", 40.6414876, -73.9593998),
Location(90, "Manhattan", "Flatiron", 40.740083, -73.9903489),
Location(91, "Brooklyn", "Flatlands", 40.6232714, -73.9321664),
Location(92, "Queens", "Flushing", 40.7674987, -73.833079),
Location(93, "Queens", "Flushing Meadows-Corona Park", 40.7400275, -73.8406953),
Location(94, "Bronx", "Fordham South", 40.8592667, -73.8984694),
Location(95, "Queens", "Forest Hills", 40.718106, -73.8448469),
Location(96, "Queens", "Forest Park/Highland Park", 40.6960418, -73.8663024),
Location(97, "Brooklyn", "Fort Greene", 40.6920638, -73.97418739999999),
Location(98, "Queens", "Fresh Meadows", 40.7335179, -73.7801447),
Location(99, "Staten Island", "Freshkills Park", 40.5772365, -74.1858183),
Location(100, "Manhattan", "Garment District", 40.7547072, -73.9916342),
Location(101, "Queens", "Glen Oaks", 40.7471504, -73.7118223),
Location(102, "Queens", "Glendale", 40.7016662, -73.8842219),
Location(103, "Manhattan", "Governor's Island/Ellis Island/Liberty Island", 40.6892494, -74.04450039999999),
Location(104, "Manhattan", "Governor's Island/Ellis Island/Liberty Island", 40.6892494, -74.04450039999999),
Location(105, "Manhattan", "Governor's Island/Ellis Island/Liberty Island", 40.6892494, -74.04450039999999),
Location(106, "Brooklyn", "Gowanus", 40.6751161, -73.9879753),
Location(107, "Manhattan", "Gramercy", 40.7367783, -73.9844722),
Location(108, "Brooklyn", "Gravesend", 40.5918636, -73.9768653),
Location(109, "Staten Island", "Great Kills", 40.5543273, -74.156292),
Location(110, "Staten Island", "Great Kills Park", 40.5492367, -74.1238486),
Location(111, "Brooklyn", "Green-Wood Cemetery", 40.6579777, -73.9940634),
Location(112, "Brooklyn", "Greenpoint", 40.7304701, -73.95150319999999),
Location(113, "Manhattan", "Greenwich Village North", 40.7335719, -74.0027418),
Location(114, "Manhattan", "Greenwich Village South", 40.7335719, -74.0027418),
Location(115, "Staten Island", "Grymes Hill/Clifton", 40.6189726, -74.0784785),
Location(116, "Manhattan", "Hamilton Heights", 40.8252793, -73.94761390000001),
Location(117, "Queens", "Hammels/Arverne", 40.5880813, -73.81199289999999),
Location(118, "Staten Island", "Heartland Village/Todt Hill", 40.5975007, -74.10189749999999),
Location(119, "Bronx", "Highbridge", 40.836916, -73.9271294),
Location(120, "Manhattan", "Highbridge Park", 40.8537599, -73.9257492),
Location(121, "Queens", "Hillcrest/Pomonok", 40.732341, -73.81077239999999),
Location(122, "Queens", "Hollis", 40.7112203, -73.762495),
Location(123, "Brooklyn", "Homecrest", 40.6004787, -73.9565551),
Location(124, "Queens", "Howard Beach", 40.6571222, -73.8429989),
Location(125, "Manhattan", "Hudson Sq", 40.7265834, -74.0074731),
Location(126, "Bronx", "Hunts Point", 40.8094385, -73.8803315),
Location(127, "Manhattan", "Inwood", 40.8677145, -73.9212019),
Location(128, "Manhattan", "Inwood Hill Park", 40.8722007, -73.9255549),
Location(129, "Queens", "Jackson Heights", 40.7556818, -73.8830701),
Location(130, "Queens", "Jamaica", 40.702677, -73.7889689),
Location(131, "Queens", "Jamaica Estates", 40.7179512, -73.783822),
Location(132, "Queens", "JFK Airport", 40.6413111, -73.77813909999999),
Location(133, "Brooklyn", "Kensington", 40.63852019999999, -73.97318729999999),
Location(134, "Queens", "Kew Gardens", 40.705695, -73.8272029),
Location(135, "Queens", "Kew Gardens Hills", 40.724707, -73.8207618),
Location(136, "Bronx", "Kingsbridge Heights", 40.8711235, -73.8976328),
Location(137, "Manhattan", "Kips Bay", 40.74232920000001, -73.9800645),
Location(138, "Queens", "LaGuardia Airport", 40.7769271, -73.8739659),
Location(139, "Queens", "Laurelton", 40.67764, -73.7447853),
Location(140, "Manhattan", "Lenox Hill East", 40.7662315, -73.9602312),
Location(141, "Manhattan", "Lenox Hill West", 40.7662315, -73.9602312),
Location(142, "Manhattan", "Lincoln Square East", 40.7741769, -73.98491179999999),
Location(143, "Manhattan", "Lincoln Square West", 40.7741769, -73.98491179999999),
Location(144, "Manhattan", "Little Italy/NoLiTa", 40.7230413, -73.99486069999999),
Location(145, "Queens", "Long Island City/Hunters Point", 40.7485587, -73.94964639999999),
Location(146, "Queens", "Long Island City/Queens Plaza", 40.7509846, -73.9402762),
Location(147, "Bronx", "Longwood", 40.8248438, -73.8915875),
Location(148, "Manhattan", "Lower East Side", 40.715033, -73.9842724),
Location(149, "Brooklyn", "Madison", 40.60688529999999, -73.947958),
Location(150, "Brooklyn", "Manhattan Beach", 40.57815799999999, -73.93892129999999),
Location(151, "Manhattan", "Manhattan Valley", 40.7966989, -73.9684247),
Location(152, "Manhattan", "Manhattanville", 40.8169443, -73.9558333),
Location(153, "Manhattan", "Marble Hill", 40.8761173, -73.9102628),
Location(154, "Brooklyn", "Marine Park/Floyd Bennett Field", 40.58816030000001, -73.8969745),
Location(155, "Brooklyn", "Marine Park/Mill Basin", 40.6055157, -73.9348698),
Location(156, "Staten Island", "Mariners Harbor", 40.63677010000001, -74.1587547),
Location(157, "Queens", "Maspeth", 40.7294018, -73.9065883),
Location(158, "Manhattan", "Meatpacking/West Village West", 40.7342331, -74.0100622),
Location(159, "Bronx", "Melrose South", 40.824545, -73.9104143),
Location(160, "Queens", "Middle Village", 40.717372, -73.87425),
Location(161, "Manhattan", "Midtown Center", 40.7314658, -73.9970956),
Location(162, "Manhattan", "Midtown East", 40.7571432, -73.9718815),
Location(163, "Manhattan", "Midtown North", 40.7649516, -73.9851039),
Location(164, "Manhattan", "Midtown South", 40.7521795, -73.9875438),
Location(165, "Brooklyn", "Midwood", 40.6204388, -73.95997779999999),
Location(166, "Manhattan", "Morningside Heights", 40.8105443, -73.9620581),
Location(167, "Bronx", "Morrisania/Melrose", 40.824545, -73.9104143),
Location(168, "Bronx", "Mott Haven/Port Morris", 40.8022025, -73.9166051),
Location(169, "Bronx", "Mount Hope", 40.8488863, -73.9051185),
Location(170, "Manhattan", "Murray Hill", 40.7478792, -73.9756567),
Location(171, "Queens", "Murray Hill-Queens", 40.7634996, -73.8073261),
Location(172, "Staten Island", "New Dorp/Midland Beach", 40.5739937, -74.1159755),
Location(173, "Queens", "North Corona", 40.7543725, -73.8669188),
Location(174, "Bronx", "Norwood", 40.8810341, -73.878486),
Location(175, "Queens", "Oakland Gardens", 40.7408584, -73.758241),
Location(176, "Staten Island", "Oakwood", 40.563994, -74.1159754),
Location(177, "Brooklyn", "Ocean Hill", 40.6782737, -73.9108212),
Location(178, "Brooklyn", "Ocean Parkway South", 40.61287799999999, -73.96838620000001),
Location(179, "Queens", "Old Astoria", 40.7643574, -73.92346189999999),
Location(180, "Queens", "Ozone Park", 40.6794072, -73.8507279),
Location(181, "Brooklyn", "Park Slope", 40.6710672, -73.98142279999999),
Location(182, "Bronx", "Parkchester", 40.8382522, -73.8566087),
Location(183, "Bronx", "Pelham Bay", 40.8505556, -73.83333329999999),
Location(184, "Bronx", "Pelham Bay Park", 40.8670144, -73.81006339999999),
Location(185, "Bronx", "Pelham Parkway", 40.8553279, -73.8639594),
Location(186, "Manhattan", "Penn Station/Madison Sq West", 40.7505045, -73.9934387),
Location(187, "Staten Island", "Port Richmond", 40.63549140000001, -74.1254641),
Location(188, "Brooklyn", "Prospect-Lefferts Gardens", 40.6592355, -73.9533895),
Location(189, "Brooklyn", "Prospect Heights", 40.6774196, -73.9668408),
Location(190, "Brooklyn", "Prospect Park", 40.6602037, -73.9689558),
Location(191, "Queens", "Queens Village", 40.7156628, -73.7419017),
Location(192, "Queens", "Queensboro Hill", 40.7429383, -73.8251741),
Location(193, "Queens", "Queensbridge/Ravenswood", 40.7556711, -73.9456723),
Location(194, "Manhattan", "Randalls Island", 40.7932271, -73.92128579999999),
Location(195, "Brooklyn", "Red Hook", 40.6733676, -74.00831889999999),
Location(196, "Queens", "Rego Park", 40.72557219999999, -73.8624893),
Location(197, "Queens", "Richmond Hill", 40.6958108, -73.8272029),
Location(198, "Queens", "Ridgewood", 40.7043986, -73.9018292),
Location(199, "Bronx", "Rikers Island", 40.79312770000001, -73.88601),
Location(200, "Bronx", "Riverdale/North Riverdale/Fieldston", 40.89961830000001, -73.9088276),
Location(201, "Queens", "Rockaway Park", 40.57978629999999, -73.8372237),
Location(202, "Manhattan", "Roosevelt Island", 40.76050310000001, -73.9509934),
Location(203, "Queens", "Rosedale", 40.6584068, -73.7389596),
Location(204, "Staten Island", "Rossville/Woodrow", 40.5434385, -74.19764409999999),
Location(205, "Queens", "Saint Albans", 40.6895283, -73.76436880000001),
Location(206, "Staten Island", "Saint George/New Brighton", 40.6404369, -74.090226),
Location(207, "Queens", "Saint Michaels Cemetery/Woodside", 40.7646761, -73.89850419999999),
Location(208, "Bronx", "Schuylerville/Edgewater Park", 40.8235967, -73.81029269999999),
Location(209, "Manhattan", "Seaport", 40.70722629999999, -74.0027431),
Location(210, "Brooklyn", "Sheepshead Bay", 40.5953955, -73.94575379999999),
Location(211, "Manhattan", "SoHo", 40.723301, -74.0029883),
Location(212, "Bronx", "Soundview/Bruckner", 40.8247566, -73.8710929),
Location(213, "Bronx", "Soundview/Castle Hill", 40.8176831, -73.8507279),
Location(214, "Staten Island", "South Beach/Dongan Hills", 40.5903824, -74.06680759999999),
Location(215, "Queens", "South Jamaica", 40.6808594, -73.7919103),
Location(216, "Queens", "South Ozone Park", 40.6764003, -73.8124984),
Location(217, "Brooklyn", "South Williamsburg", 40.7043921, -73.9565551),
Location(218, "Queens", "Springfield Gardens North", 40.6715916, -73.779798),
Location(219, "Queens", "Springfield Gardens South", 40.6715916, -73.779798),
Location(220, "Bronx", "Spuyten Duyvil/Kingsbridge", 40.8833912, -73.9051185),
Location(221, "Staten Island", "Stapleton", 40.6264929, -74.07764139999999),
Location(222, "Brooklyn", "Starrett City", 40.6484272, -73.88236119999999),
Location(223, "Queens", "Steinway", 40.7745459, -73.9037477),
Location(224, "Manhattan", "Stuy Town/Peter Cooper Village", 40.7316903, -73.9778494),
Location(225, "Brooklyn", "Stuyvesant Heights", 40.6824166, -73.9319933),
Location(226, "Queens", "Sunnyside", 40.7432759, -73.9196324),
Location(227, "Brooklyn", "Sunset Park East", 40.65272, -74.00933479999999),
Location(228, "Brooklyn", "Sunset Park West", 40.65272, -74.00933479999999),
Location(229, "Manhattan", "Sutton Place/Turtle Bay North", 40.7576281, -73.961698),
Location(230, "Manhattan", "Times Sq/Theatre District", 40.759011, -73.9844722),
Location(231, "Manhattan", "TriBeCa/Civic Center", 40.71625299999999, -74.0122396),
Location(232, "Manhattan", "Two Bridges/Seward Park", 40.7149056, -73.98924699999999),
Location(233, "Manhattan", "UN/Turtle Bay South", 40.7571432, -73.9718815),
Location(234, "Manhattan", "Union Sq", 40.7358633, -73.9910835),
Location(235, "Bronx", "University Heights/Morris Heights", 40.8540855, -73.9198498),
Location(236, "Manhattan", "Upper East Side North", 40.7600931, -73.9598414),
Location(237, "Manhattan", "Upper East Side South", 40.7735649, -73.9565551),
Location(238, "Manhattan", "Upper West Side North", 40.7870106, -73.9753676),
Location(239, "Manhattan", "Upper West Side South", 40.7870106, -73.9753676),
Location(240, "Bronx", "Van Cortlandt Park", 40.8972233, -73.8860668),
Location(241, "Bronx", "Van Cortlandt Village", 40.8837203, -73.89313899999999),
Location(242, "Bronx", "Van Nest/Morris Park", 40.8459682, -73.8625946),
Location(243, "Manhattan", "Washington Heights North", 40.852476, -73.9342996),
Location(244, "Manhattan", "Washington Heights South", 40.8417082, -73.9393554),
Location(245, "Staten Island", "West Brighton", 40.6270298, -74.10931409999999),
Location(246, "Manhattan", "West Chelsea/Hudson Yards", 40.7542535, -74.0023331),
Location(247, "Bronx", "West Concourse", 40.8316761, -73.9227554),
Location(248, "Bronx", "West Farms/Bronx River", 40.8430609, -73.8816001),
Location(249, "Manhattan", "West Village", 40.73468, -74.0047554),
Location(250, "Bronx", "Westchester Village/Unionport", 40.8340447, -73.8531349),
Location(251, "Staten Island", "Westerleigh", 40.616296, -74.1386767),
Location(252, "Queens", "Whitestone", 40.7920449, -73.8095574),
Location(253, "Queens", "Willets Point", 40.7606911, -73.840436),
Location(254, "Bronx", "Williamsbridge/Olinville", 40.8787602, -73.85283559999999),
Location(255, "Brooklyn", "Williamsburg (North Side)", 40.71492, -73.9528472),
Location(256, "Brooklyn", "Williamsburg (South Side)", 40.70824229999999, -73.9571487),
Location(257, "Brooklyn", "Windsor Terrace", 40.6539346, -73.9756567),
Location(258, "Queens", "Woodhaven", 40.6901366, -73.8566087),
Location(259, "Bronx", "Woodlawn/Wakefield", 40.8955885, -73.8627133),
Location(260, "Queens", "Woodside", 40.7532952, -73.9068973),
Location(261, "Manhattan", "World Trade Center", 40.7118011, -74.0131196),
Location(262, "Manhattan", "Yorkville East", 40.7762231, -73.94920789999999),
Location(263, "Manhattan", "Yorkville West", 40.7762231, -73.94920789999999)
]
|
# By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.
#
# What is the 10 001st prime number?
primes = []
for i in range(2, 100):
if len(primes) == 10001:
break
x = list(map(lambda y: i % y == 0, range(2,i)))
if sum(x) == False:
primes.append(i)
print(i)
print(primes[-1] , "Len: ", len(primes))
# x = list(map(lambda y: i % y == 0, range(2,i)))
|
# Converts a given temperature from Celsius to Fahrenheit
# Prompt user for Celsius temperature
degreesCelsius = float(input('\nEnter the temperature in Celsius: '))
# Calculate and display the converted
# temperature in Fahrenheit
degreesFahrenheit = ((9.0 / 5.0) * degreesCelsius) + 32
print('Fahrenheit equivalent: ', format(degreesFahrenheit, ',.1f'), '\n', sep='') |
#Refaça o DESAFIO 035 dos triângulos, acrescentando o recurso de mostrar que tipo de triângulo será formado:
#- EQUILÁTERO: todos os lados iguais
#- ISÓSCELES: dois lados iguais, um diferente
#- ESCALENO: todos os lados diferentes
print('-' * 20, 'Programa Analisador de Triângulos', '-' * 20)
seg1 = float(input('Digite o valor do primeiro segmento: '))
seg2 = float(input('Digite o valor do segundo segmento: '))
seg3 = float(input('Digite o valor do terceiro segmento: '))
if seg1 < seg2 + seg3 and seg2 < seg1 + seg3 and seg3 < seg1 + seg2:
if seg1 == seg2 and seg3: # outra possibilidade --> seg1 == seg2 == seg3:
print('Os segmentos PODEM formar um triângulo do tipo EQUILÁTERO!')
elif seg1 != seg2 != seg3 != seg1:
print('Os segmentos acima PODEM formar um triângulo do tipo ESCALENO!')
else:
print('Os segmentos acima PODEM formar um triângulo do tipo ISÓSCELES!')
else:
print('Os segmentos NÃO PODEM formar um triângulo!')
|
class Solution:
def subtractProductAndSum(self, n: int) -> int:
x = n
add = 0
mul = 1
while x > 0 :
add += x%10
mul *= x%10
x = x//10
return mul - add
|
"""Helper initialising functions
"""
#pylint: disable=I0011, C0321, C0301, C0103, C0325, R0902, R0913, no-member, E0213
def init_fuel_tech_p_by(all_enduses_with_fuels, nr_of_fueltypes):
"""Helper function to define stocks for all enduse and fueltype
Parameters
----------
all_enduses_with_fuels : dict
Provided fuels
nr_of_fueltypes : int
Nr of fueltypes
Returns
-------
fuel_tech_p_by : dict
"""
fuel_tech_p_by = {}
for enduse in all_enduses_with_fuels:
fuel_tech_p_by[enduse] = dict.fromkeys(range(nr_of_fueltypes), {})
return fuel_tech_p_by
def dict_zero(first_level_keys):
"""Initialise a dictionary with one level
Parameters
----------
first_level_keys : list
First level data
Returns
-------
one_level_dict : dict
dictionary
"""
one_level_dict = dict.fromkeys(first_level_keys, 0) # set zero as argument
return one_level_dict
def service_type_tech_by_p(lu_fueltypes, fuel_tech_p_by):
"""Initialise dict and fill with zeros
Parameters
----------
lu_fueltypes : dict
Look-up dictionary
fuel_tech_p_by : dict
Fuel fraction per technology for base year
Return
-------
service_fueltype_tech_by_p : dict
Fraction of service per fueltype and technology for base year
"""
service_fueltype_tech_by_p = {}
for fueltype_int in lu_fueltypes.values():
service_fueltype_tech_by_p[fueltype_int] = dict.fromkeys(fuel_tech_p_by[fueltype_int].keys(), 0)
return service_fueltype_tech_by_p
|
# Implementation of Shell Sort algorithm in Python
def shellSort(arr):
interval = 1
# Initializes interval
while (interval < (len(arr) // 3)):
interval = (interval * 3) + 1
while (interval > 0):
for i in range(interval, len(arr)):
# Select val to be inserted
val = arr[i]
j = i
# Shift element right
while ((j > interval - 1) and (arr[j - interval] >= val)):
arr[j] = arr[j - interval]
j -= interval
# Insert val at hole position
arr[j] = val
# Calculate interval
interval = (interval - 1) / 3
l = [4, 1, 2, 5, 3]
print("Initial list: " + str(l))
shellSort(l)
print("Sorted list: " + str(l))
|
'''
给定一个包含红色、白色和蓝色,一共 n 个元素的数组,原地对它们进行排序,使得相同颜色的元素相邻,并按照红色、白色、蓝色顺序排列。
此题中,我们使用整数 0、 1 和 2 分别表示红色、白色和蓝色。
注意:
不能使用代码库中的排序函数来解决这道题。
示例:
输入: [2,0,2,1,1,0]
输出: [0,0,1,1,2,2]
进阶:
一个直观的解决方案是使用计数排序的两趟扫描算法。
首先,迭代计算出0、1 和 2 元素的个数,然后按照0、1、2的排序,重写当前数组。
你能想出一个仅使用常数空间的一趟扫描算法吗?
来源:力扣(LeetCode)
链接:https://leetcode-cn.com/problems/sort-colors
'''
class Solution:
def sortColors(self, nums: List[int]) -> None:
"""
Do not return anything, modify nums in-place instead.
"""
n = len(nums)
ptr = 0
for i in range(n):
if nums[i] == 0:
nums[i],nums[ptr] = nums[ptr],nums[i]
ptr += 1
for i in range(ptr,n):
if nums[i] == 1:
nums[i],nums[ptr] = nums[ptr],nums[i]
ptr +=1
|
"""Classes implementing the descriptor protocol."""
__all__ = ("classproperty",)
class classproperty:
"""Like the builtin :py:func:`property` but takes a single classmethod.
Essentially, it allows you to use a property on a class itself- not
just on its instances.
Used like this:
>>> from snakeoil.descriptors import classproperty
>>> class foo:
...
... @classproperty
... def test(cls):
... print("invoked")
... return True
>>> foo.test
invoked
True
>>> foo().test
invoked
True
"""
def __init__(self, getter):
self.getter = getter
def __get__(self, instance, owner):
return self.getter(owner)
|
TASK_STATUS = [
('TD', 'To Do'),
('IP', 'In Progress'),
('QA', 'Testing'),
('DO', 'Done'),
]
TASK_PRIORITY = [
('ME', 'Medium'),
('HI', 'Highest'),
('HG', 'High'),
('LO', 'Lowest'),
]
|
def main():
total = 0
for i in range(0, 1000):
if i % 3 == 0:
total += i
elif i % 5 == 0:
total += i
print(total)
if __name__ == '__main__':
main()
|
class BaseTransform:
def transform_s(self, s, training=True):
return s
def transform_batch(self, batch, training=True):
return batch
def write_logs(self, logger):
pass
|
elements = {
'em': '',
'blockquote': '<br/>'
}
|
def rate_diff_percentage(previous_rate, current_rate, percentage=False):
diff_percentage = (current_rate - previous_rate) / previous_rate
if percentage:
return diff_percentage * 100
return diff_percentage |
# Assume that we execute the following assignment statements
# width = 17
# height = 12.0
width = 17
height = 12.0
value_1 = width // 2
value_2 = width / 2.0
value_3 = height / 3
value_4 = 1 + 2 * 5
print(f"value_1 is {value_1} and it's type is {type(value_1)}")
print(f"value_2 is {value_2} and it's type is {type(value_2)}")
print(f"value_3 is {value_3} and it's type is {type(value_3)}")
print(f"value_4 is {value_4} and it's type is {type(value_4)}")
|
# 执行用时 : 68 ms
# 内存消耗 : 16.6 MB
# 方案:哨兵结点 sentinel,插入在head结点之前
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
def removeElements(self, head: ListNode, val: int) -> ListNode:
# 哨兵结点 sentinel,插入在head结点之前
sentinel = ListNode(0)
sentinel.next = head
# 初始化两个指针 curr 和 prev
prev, curr = sentinel, head
while curr:
if curr.val == val:
prev.next = curr.next
else:
prev = curr
# 遍历下一个元素
curr = curr.next
return sentinel.next
|
"""
2338. 긴자리 계산
작성자: xCrypt0r
언어: Python 3
사용 메모리: 29,380 KB
소요 시간: 72 ms
해결 날짜: 2020년 9월 13일
"""
def main():
A, B = int(input()), int(input())
print(A + B, A - B, A * B, sep='\n')
if __name__ == '__main__':
main()
|
class Solution:
def mostVisited(self, n: int, rounds: List[int]) -> List[int]:
start, end = rounds[0], rounds[-1]
if end >= start:
return list(range(start, end + 1))
else:
return list(range(1, end + 1)) + list(range(start, n + 1))
|
"""
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2010 Nathanael C. Fritz
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
"""
__all__ = ['xep_0004', 'xep_0012', 'xep_0030', 'xep_0033', 'xep_0045',
'xep_0050', 'xep_0085', 'xep_0092', 'xep_0199', 'gmail_notify',
'xep_0060', 'xep_0202']
|
class Solution(object):
def reverseVowels(self, s):
"""
:type s: str
:rtype: str
"""
vowels = set("aeiouAEIOU")
s = list(s)
i = 0
j = len(s) - 1
while i < j:
while i < j and s[i] not in vowels:
i += 1
while i < j and s[j] not in vowels:
j -= 1
if i < j:
s[i], s[j] = s[j], s[i]
i += 1
j -= 1
return ''.join(s) |
__author__ = 'Evan Cordell'
__copyright__ = 'Copyright 2012-2015 Localmed, Inc.'
__version__ = "0.1.6"
__version_info__ = tuple(__version__.split('.'))
__short_version__ = __version__
|
# -*- coding: utf-8 -*-
# Copyright (c) 2013 Australian Government, Department of the Environment
#
# 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.
'''
base 64 encoded gif images for the GUI buttons
'''
class app_img:
format='gif'
data='''R0lGODlhEAAQAOeRACcLIiAbCSAjCjMdMzsfMjUkGUcmRjwwJ0YqRj4xJVwoUFguRkU2MS0/LzQ8
PC8/LzM+QTJCMDJCQTpCQCxIME1CIXQyYW48KTpLO1REPEpKSktKS01KSkpLSkxLTE1LS0VNUDtS
PD9PT0tMTExMTE1MTUxNTU1NTU5NTUFUQFFOTkZRU1BPTU9QUUVTVF9PO1JUVVRVSnlNMEVeRlZX
W1ZYVVZYWF5XVFBdUkpfX2RZXIZMgVtdX11eX1tfW1xfW1tfXqZEkFtgW2NfYWZgW2tdal9iXk9m
Z19iYk9pTqZIn5lNlU1rTp1XOF9lZVxnXF5oXlNrZ59eM1FzU1dyVcVItJJmSl5ycq1Wp1t0cLlU
tWB1eF52dmKBY12DX9RWwGN/f+RSzaVzTdNbxmaEhLlzRdFhs2WJZWeJZmOMZ7Z2UXGGhm2IiGqJ
iKV+VmuKimyKi26Ojm2ScnGQkGuWb22Wb3OTk+xp2+dr5eF73Pl154SfoMKYeIampoimptiYbPuB
8viD8I2sq/KJ7pOtrZGuruebbpGvr/+I/Ja1tdqrf9i3i/iweviwhP+zhf/Hif/Lpf//////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////yH5BAEKAP8ALAAAAAAQABAA
AAjRAP8JHEiwoMGBGk6MOChQgwYgEnJwcdGjoAYbIo5EyQIGjh02axyYIOjkSqI4bci8mdPnECEk
Ggi2WFHIj6A9WyDQgEFiYIcfKR5MAMHDhJAQTCLUIGgEQ5cZDZKgqUMnDRUfMQVu8ADFi5wzUyjg
KLEh6z8PCAZhGfIEBQALZgAtMUCwyI48Y6roQRToThglAzYMZEFkgRY8X4Io0CEgBkENByDxYUAg
QAU3jB6JKUBQxYtFigw5avSnjBQZN8wKTGBFTZMLGRwy/Mfhg2qCAQEAOw=='''
class shp_img:
format='gif'
data='''R0lGODlhEAAQAMIFABAQEIBnII+HgLS0pfDwsC8gIC8gIC8gICH5BAEKAAcALAAAAAAQABAAAAND
eLrcJzBKqcQIN+MtwAvTNHTPSJwoQAigxwpouo4urZ7364I4cM8kC0x20n2GRGEtJGl9NFBMkBny
HHzYrNbB7XoXCQA7'''
class dir_img:
format='gif',
data='''R0lGODlhEAAQAMZUABAQEB8QEB8YEC8gIC8vIEA4ME9IQF9IIFpTSWBXQHBfUFBoj3NlRoBnII9v
IIBwUGB3kH93YIZ5UZ94IJB/YIqAcLB/EI+IcICHn4+HgMCHEI6Oe4CPn4+PgMCQANCHEJ+PgICX
r9CQANCQEJ+XgJKanaCgkK+fgJykoaKjo7CgkKimk+CfIKKoo6uoleCgMLCnkNCnUKuwpLSvkrSv
mfCoMLWyn7+wkM+vcLS0pfCwML+4kPC3QNDAgM+/kPDAQP+/UODIgP/IUODQoP/QUPDQgP/QYP/P
cPDYgP/XYP/XcP/YgPDgkP/ggP/gkPDnoP/noPDwoPDwsP/woP//////////////////////////
////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////yH5
BAEKAH8ALAAAAAAQABAAAAe1gH+Cg4SFhoQyHBghKIeEECV/ORwtEDYwmJg0hikLCzBDUlJTUCoz
hZ4LKlGjUFBKJiQkIB0XgypPpFBLSb2+toImT643N5gnJ7IgIBkXJExQQTBN1NVNSkoxFc9OMDtK
vkZEQjwvDC4gSNJNR0lGRkI/PDoNEn8gRTA+Su9CQPM1PhxY8SdDj2nw4umowWJEAwSCLqjAIaKi
Bw0WLExwcGBDRAoRHihIYKAAgQECAARwxFJQIAA7'''
class xls_img:
format='gif'
data='''R0lGODlhEAAQAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/AP//AAAA//8A/wD/
/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBm
AABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/AAD/
MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMzmTMzzDMz/zNmADNmMzNm
ZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPMADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/
mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZm
zGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/mWb/zGb/
/5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lmAJlmM5lmZplmmZlmzJlm/5mZ
AJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnMmZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwA
M8wAZswAmcwAzMwA/8wzAMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZ
ZsyZmcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM/8AZv8A
mf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9mmf9mzP9m//+ZAP+ZM/+ZZv+Zmf+Z
zP+Z///MAP/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP///ywAAAAAEAAQAAAIngBfuUKF
ipBBg4MS9umTJYsrBAheSZwokGBBhwgeaNzIUSOhLKgydhz5EdWrB4oOelT5kdDJLwgUKRpEKOUX
Gtpannzw5ZVNQje15czicmNPg1lwCtW5EeirQV+IEtI2iOjOmh9dQc2SimqWQa4efGzYcGZUr4NQ
ddSWimwWr33UahRKly61qn0Iza1rl9qXKVIPIkyY8Mtft4gTTwkIADs='''
class xsl_img:
format='gif'
data='''R0lGODdhEAAQAOMPAAAAAAAAgAAAmQAA/zNmmQCAgDNm/zOZAIaGhjOZ/zPM/8DAwKbK8DP///Hx
8f///ywBAAAADwAQAAAEWBDJSeW76Or9Vn4f5zzOAp5kOo5AC2QOMxaFQcrP+zDCUzyNROAhkL14
pEJDcQiMijqkIXEYDIsOXWwU6N5Yn5VKpSWYz2fwRcwmldFo9bidhc3Hrrw+HwEAOw=='''
class log_img:
format='gif'
data='''R0lGODlhEAAQAIQQAG9s0oJ5eatyP6tycpePj6ulP6ulctWeOaulpdWentXSOcvHx9XS0v/MzP//
zP///y8gIC8gIC8gIC8gIC8gIC8gIC8gIC8gIC8gIC8gIC8gIC8gIC8gIC8gIC8gIC8gICH5BAEK
ABAALAAAAAAQABAAAAViICSOUNMwjEOOhyIUyhAbzMoAgJAQi9EjtRGAIXgUjw9CUDR8OJ9OJakJ
fUqFjCSBZ11CqNWkt7ndLqLjbFg8zZa5bOw6znSfoVfm3clYIP5eEH4EAQFlCAsrEH2ICygoJCEA
Ow=='''
|
def is_true(a,b,c,d,e,f,g):
if a>10:
print(10) |
"""
Sliding window
Given a string S, return the number of substrings of length K with no
repeated characters.
Example 1:
Input: S = "havefunonleetcode", K = 5 Output: 6 Explanation: There are 6
substrings they are : 'havef','avefu','vefun','efuno','etcod','tcode'.
counter havefunonleetcode
IDEA:
1) for each letter in the string setup a counter and
2) update unique counter each time when counter[let] hits 0, 1 or 2 (magic numbers)
aaabac
|||
123
0) a:3 unique=0
1) a:2 b:1 unique=1
2) a:2 b:1 unique=1
3) a:2 b:1 c:1 unique=1+2=3
"""
class Solution1100:
pass
|
#~ Copyright 2014 Wieger Wesselink.
#~ Distributed under the Boost Software License, Version 1.0.
#~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
def read_text(filename):
with open(filename, 'r') as f:
return f.read()
def write_text(filename, text):
with open(filename, 'w') as f:
f.write(text)
|
def is_descending(input_list: list, step: int = -1) -> bool:
r"""llogic.is_descending(input_list[, step])
This function returns True if the input list is descending with a fixed
step, otherwise it returns False. Usage:
>>> alist = [3, 2, 1, 0]
>>> llogic.is_descending(alist)
True
The final value can be other than zero:
>>> alist = [12, 11, 10]
>>> llogic.is_descending(alist)
True
The list can also have negative elements:
>>> alist = [2, 1, 0, -1, -2]
>>> llogic.is_descending(alist)
True
It will return False if the list is not ascending:
>>> alist = [6, 5, 9, 2]
>>> llogic.is_descending(alist)
False
By default, the function uses steps of size 1 so the list below is not
considered as ascending:
>>> alist = [7, 5, 3, 1]
>>> llogic.is_descending(alist)
False
But the user can set the step argument to any value less than one:
>>> alist = [7, 5, 3, 1]
>>> step = -2
>>> llogic.is_descending(alist, step)
True
"""
if not isinstance(input_list, list):
raise TypeError('\'input_list\' must be \'list\'')
if not isinstance(step, int):
raise TypeError('\'step\' must be \'int\'')
if step > 1:
raise ValueError('\'step\' must be < 0')
aux_list = list(range(max(input_list), min(input_list)-1, step))
return input_list == aux_list
|
class Solution:
'''
格雷编码是一个二进制数字系统,在该系统中,两个连续的数值仅有一个位数的差异。
给定一个代表编码总位数的非负整数 n,打印其格雷编码序列。格雷编码序列必须以 0 开头。
输入: 2
输出: [0,1,3,2]
解释: 00 - 0, 01 - 1, 11 - 3, 10 - 2
'''
def grayCode(self, n: int):
# 观察连续数值对应的格雷编码序列对应的关系
# 追加二进制位到首位, 0: 数值仍为前一个数组的值, 1: 前一个数组的每个元素 + 2的(n-1)次幂
ans, cnt = [0], 0
while cnt < n:
ad = 2**cnt
tmp = list(map(lambda x: x ^ ad, ans))
tmp.reverse()
ans += tmp
cnt += 1
return ans
def grayCodeF(self, n: int):
''''
关键是搞清楚格雷编码的生成过程, G(i) = i ^ (i/2);
如 n = 3:
G(0) = 000
G(1) = 1 ^ 0 = 001 ^ 000 = 001
G(2) = 2 ^ 1 = 010 ^ 001 = 011
G(3) = 3 ^ 1 = 011 ^ 001 = 010
G(4) = 4 ^ 2 = 100 ^ 010 = 110
G(5) = 5 ^ 2 = 101 ^ 010 = 111
G(6) = 6 ^ 3 = 110 ^ 011 = 101
G(7) = 7 ^ 3 = 111 ^ 011 = 100
'''
return [i ^ i >> 1 for i in range(2**n)]
s = Solution()
print(s.grayCode(3))
|
class FeatureRegistration:
def __init__(self, key, failoverVariant, variants=[]):
"""docstring for __init__"""
self.key = key
self.failoverVariant = failoverVariant
self.variants = [v.toJSON() for v in variants]
def toJSON(self):
"""docstring for toJSON"""
self.__dict__
class Variant:
def __init__(self, key, name):
"""docstring for __init__"""
self.key = key
self.name = name
def toJSON(self):
"""docstring for toJSON"""
self.__dict__
|
_base_ = "./resnest50d_AugCosyAAEGray_BG05_visib10_mlBCE_DoubleMask_ycbvPbr100e_SO_01_02MasterChefCan.py"
OUTPUT_DIR = (
"output/gdrn/ycbvPbrSO/resnest50d_AugCosyAAEGray_BG05_visib10_mlBCE_DoubleMask_ycbvPbr100e_SO/09_10PottedMeatCan"
)
DATASETS = dict(TRAIN=("ycbv_010_potted_meat_can_train_pbr",))
|
# https://leetcode.com/problems/palindrome-partitioning/
class Solution(object):
def partition(self, s):
"""
:type s: str
:rtype: List[List[str]]
"""
|
"""Information for the outgoing response
code - the HTTP response code (default is "200 Ok")
headers - a list of key/value pairs used for the WSGI start_response
"""
code = None
headers = []
def add_header(key, value):
"""Helper function to append (key, value) to the list of response headers"""
headers.append( (key, value) )
# Eventually add cookie support?
|
jog = {}
#pegando dados
jog['Nome do jogador'] = str(input('Digite o nome do jogador: ')).strip().title()
jog['Total partidas'] = int(input('Quantas partidas jogou: '))
#lista de gol
gols = []
#Quantos gols em cada partida
for i in range(0, jog['Total partidas']):
gols.append(int(input(f'Quantos gols na partida {i}°: ')))
#total de gol
totGols = 0
for g in gols:
totGols += g
#print(totGols)
#adicionando dicionario
jog['Total gols'] = totGols
jog['Gols em partidas'] = gols
#print(jog)
#Mostrando resultados
print(f'O jogador: {jog["Nome do jogador"]}, jogou {jog["Total partidas"]} partidas e '
f'marcou ao todo no campeonato {jog["Total gols"]} gols')
print('Partidas:')
for pos, v in enumerate(gols):
print(f'Partida {pos}: {v} gols')
'''
Esse programa vai analisar informações de um jogador
Primeiro criamos um dicionário vazio, jog, e pedimos interações ao usuário como nome e total de partidas
É criado uma lista vazia chamada gols, e assim entra no loop for para saber quantos gols em cada partida, usando o limite de 0 e o valor de total de partidas
Para cada loop a lista gols da append() no valor
Assim é criado uma variavel de controle totGols zerada, e dentro do loop for, onde g iria rodar sobre gols
Onde totGols iria incrimentar g, somando todos os gols
Em seguida adicionamos ao dicionário, com o indice total de gols e gols em partidas, pelo totGols e gols respectivamente
No print será mostrado os resultados, e por fim um loop com pos e v rodando sobre o enumarete() de gols para mostrar cada gols nas partidas
'''
|
# -*- coding: utf-8 -*-
# __author__= "Ruda"
# Date: 2018/10/16
'''
import os
from rongcloud import RongCloud
app_key = os.environ['APP_KEY']
app_secret = os.environ['APP_SECRET']
rcloud = RongCloud(app_key, app_secret)
r = rcloud.User.getToken(userId='userid1', name='username', portraitUri='http://www.rongcloud.cn/images/logo.png')
print(r)
{'token': 'P9YNVZ2cMQwwaADiNDVrtRZKF+J2pVPOWSNlYMA1yA1g49pxjZs58n4FEufsH9XMCHTk6nHR6unQTuRgD8ZS/nlbkcv6ll4x', 'userId': 'userid1', 'code': 200}
r = rcloud.Message.publishPrivate(
fromUserId='userId1',
toUserId={"userId2","userid3","userId4"},
objectName='RC:VcMsg',
content='{"content":"hello","extra":"helloExtra","duration":20}',
pushContent='thisisapush',
pushData='{"pushData":"hello"}',
count='4',
verifyBlacklist='0',
isPersisted='0',
isCounted='0')
print(r)
{'code': 200}
'''
'''
More:
https://github.com/rongcloud/server-sdk-python
''' |
'''
If the child is currently on the nth step,
then there are three possibilites as to how
it reached there:
1. Reached (n-3)th step and hopped 3 steps in one time
2. Reached (n-2)th step and hopped 2 steps in one time
3. Reached (n-1)th step and hopped 2 steps in one time
The total number of possibilities is the sum of these 3
'''
def count_possibilities(n, store):
if store[n]!=0:
return
count_possibilities(n-1, store)
count_possibilities(n-2, store)
count_possibilities(n-3, store)
store[n]=store[n-1]+store[n-2]+store[n-3]
n=int(input())
store=[0 for i in range(n+1)] # Stores the number of possibilites for every i<n
store[0]=0
store[1]=1
store[2]=2
store[3]=4
count_possibilities(n, store)
print(store[n])
|
class Solution:
def runningSum(self, nums: List[int]) -> List[int]:
for index in range(1, len(nums)):
nums[index] = nums[index - 1] + nums[index]
return nums
|
class PrefabError(Exception):
pass
class HashAlgorithmNotFound(PrefabError):
pass
class ImageAccessError(PrefabError):
pass
class ImageBuildError(PrefabError):
pass
class ImageNotFoundError(PrefabError):
pass
class ImagePushError(PrefabError):
pass
class ImageValidationError(PrefabError):
pass
class InvalidConfigError(PrefabError):
pass
class TargetCyclicError(PrefabError):
pass
class TargetNotFoundError(PrefabError):
pass
|
class Opt:
def __init__(self):
self.dataset = "fashion200k"
self.dataset_path = "./dataset/Fashion200k"
self.batch_size = 32
self.embed_dim = 512
self.hashing = False
self.retrieve_by_random = True |
# Two children, Lily and Ron, want to share a chocolate bar. Each of the squares has an integer on it.
# Lily decides to share a contiguous segment of the bar selected such that:
# The length of the segment matches Ron's birth month, and,
# The sum of the integers on the squares is equal to his birth day.
# Determine how many ways she can divide the chocolate.
# int s[n]: the numbers on each of the squares of chocolate
# int d: Ron's birth day
# int m: Ron's birth month
# Two children
def birthday(s, d, m):
# Write your code here
numberDiveded = 0
numberIteration = len(s)-(m-1)
if(numberIteration == 0):
numberIteration = 1
for k in range(0, numberIteration):
newArray = s[k:k+m]
sumArray = sum(newArray)
if sumArray == d:
numberDiveded += 1
return numberDiveded
s = '2 5 1 3 4 4 3 5 1 1 2 1 4 1 3 3 4 2 1'
caracteres = '18 7'
array = list(map(int, s.split()))
caracteresList = list(map(int, caracteres.split()))
print(birthday(array, caracteresList[0], caracteresList[1]))
|
N = int(input())
entry = [input().split() for _ in range(N)]
phoneBook = {name: number for name, number in entry}
while True:
try:
name = input()
if name in phoneBook:
print(f"{name}={phoneBook[name]}")
else:
print("Not found")
except:
break
|
pet = {
"name":"Doggo",
"animal":"dog",
"species":"labrador",
"age":"5"
}
class Pet(object):
def __init__(self, name, age, animal):
self.name = name
self.age = age
self.animal = animal
self.hungry = False
self.mood= "happy"
def eat(self):
print("> %s is eating..." % self.name)
if self.is_hungry:
self.is_hungry = False
else:
print("> %s may have eaten too much." % self.name)
self.mood = "lethargic "
my_pet= Pet("Fido", 3, "dog")
my_pet.is_hungry= True
print("is my pet hungry? %s"% my_pet.is_hungry)
my_pet.eat()
print("how about now? %s" % my_pet.is_hungry)
print ("My pet is feeling %s" % my_pet.mood)
|
resposta = 'S'
soma = quant = media = maior = menor = 0
while resposta in 'Ss':
n = int(input('Digite um número: '))
soma += n
quant += 1
if quant == 1:
maior = menor = n
else:
if n > maior:
maior = n
elif n < menor:
menor = n
resposta = str(input('Quer continuar? [S/N]: ')).upper().strip()[0]
media = soma / quant
print('Você digitou {} números e a soma foi de {} e media de {}.'.format(quant, soma, media))
print('O maior número {} e o menor número {}.'.format(maior, menor))
|
# Definition for binary tree with next pointer.
class TreeLinkNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
self.next = None
class Solution:
# @param root, a tree link node
# @return nothing
def connect(self, root):
node = root
current = None
candidate = None
next_start = None
if node is None:
return
while node is not None:
# loop through nodes in this level, assigning nexts
# assumption: previous level (node's level)
# has all nexts assigned correctly
# assign left's next to right if applicable
if node.left is not None:
# tells loop where to start for next level
if next_start is None:
next_start = node.left
if node.right is not None:
node.left.next = node.right
current = node.right
else:
current = node.left
else:
if node.right is not None:
if next_start is None:
next_start = node.right
current = node.right
else:
node = node.next
continue
while candidate is None:
node = node.next
if node is None:
break
if node.left is None:
if node.right is None:
continue
else:
candidate = node.right
else:
candidate = node.left
current.next = candidate
candidate = None
# end of inner loop, through nodes in a level
if node is None:
node = next_start
next_start = None
|
# AUTOGENERATED BY NBDEV! DO NOT EDIT!
__all__ = ["index", "modules", "custom_doc_links", "git_url"]
index = {"get_device": "00_basics.ipynb",
"settings_template": "00_basics.ipynb",
"read_settings": "00_basics.ipynb",
"DEVICE": "00_basics.ipynb",
"settings": "00_basics.ipynb",
"DATA_STORE": "00_basics.ipynb",
"LOG_STORE": "00_basics.ipynb",
"MODEL_STORE": "00_basics.ipynb",
"EXPERIMENT_STORE": "00_basics.ipynb",
"PATH_1K": "00_basics.ipynb",
"PATH_10K": "00_basics.ipynb",
"PATH_20K": "00_basics.ipynb",
"PATH_100K": "00_basics.ipynb",
"FILENAMES": "00_basics.ipynb",
"SYNTHEA_DATAGEN_DATES": "00_basics.ipynb",
"CONDITIONS": "00_basics.ipynb",
"LOG_NUMERICALIZE_EXCEP": "00_basics.ipynb",
"read_raw_ehrdata": "01_preprocessing_clean.ipynb",
"split_patients": "01_preprocessing_clean.ipynb",
"split_ehr_dataset": "01_preprocessing_clean.ipynb",
"cleanup_pts": "01_preprocessing_clean.ipynb",
"cleanup_obs": "01_preprocessing_clean.ipynb",
"cleanup_algs": "01_preprocessing_clean.ipynb",
"cleanup_crpls": "01_preprocessing_clean.ipynb",
"cleanup_meds": "01_preprocessing_clean.ipynb",
"cleanup_img": "01_preprocessing_clean.ipynb",
"cleanup_procs": "01_preprocessing_clean.ipynb",
"cleanup_cnds": "01_preprocessing_clean.ipynb",
"cleanup_immns": "01_preprocessing_clean.ipynb",
"cleanup_dataset": "01_preprocessing_clean.ipynb",
"extract_ys": "01_preprocessing_clean.ipynb",
"insert_age": "01_preprocessing_clean.ipynb",
"clean_raw_ehrdata": "01_preprocessing_clean.ipynb",
"load_cleaned_ehrdata": "01_preprocessing_clean.ipynb",
"load_ehr_vocabcodes": "01_preprocessing_clean.ipynb",
"EhrVocab": "02_preprocessing_vocab.ipynb",
"ObsVocab": "02_preprocessing_vocab.ipynb",
"EhrVocabList": "02_preprocessing_vocab.ipynb",
"get_all_emb_dims": "02_preprocessing_vocab.ipynb",
"collate_codes_offsts": "03_preprocessing_transform.ipynb",
"get_codenums_offsts": "03_preprocessing_transform.ipynb",
"get_demographics": "03_preprocessing_transform.ipynb",
"Patient": "03_preprocessing_transform.ipynb",
"get_pckl_dir": "03_preprocessing_transform.ipynb",
"PatientList": "03_preprocessing_transform.ipynb",
"cpu_cnt": "03_preprocessing_transform.ipynb",
"create_all_ptlists": "03_preprocessing_transform.ipynb",
"preprocess_ehr_dataset": "03_preprocessing_transform.ipynb",
"EHRDataSplits": "04_data.ipynb",
"LabelEHRData": "04_data.ipynb",
"EHRDataset": "04_data.ipynb",
"EHRData": "04_data.ipynb",
"accuracy": "05_metrics.ipynb",
"null_accuracy": "05_metrics.ipynb",
"ROC": "05_metrics.ipynb",
"MultiLabelROC": "05_metrics.ipynb",
"plot_rocs": "05_metrics.ipynb",
"plot_train_valid_rocs": "05_metrics.ipynb",
"auroc_score": "05_metrics.ipynb",
"auroc_ci": "05_metrics.ipynb",
"save_to_checkpoint": "06_learn.ipynb",
"load_from_checkpoint": "06_learn.ipynb",
"get_loss_fn": "06_learn.ipynb",
"RunHistory": "06_learn.ipynb",
"train": "06_learn.ipynb",
"evaluate": "06_learn.ipynb",
"fit": "06_learn.ipynb",
"predict": "06_learn.ipynb",
"plot_loss": "06_learn.ipynb",
"plot_losses": "06_learn.ipynb",
"plot_aurocs": "06_learn.ipynb",
"plot_train_valid_aurocs": "06_learn.ipynb",
"plot_fit_results": "06_learn.ipynb",
"summarize_prediction": "06_learn.ipynb",
"count_parameters": "06_learn.ipynb",
"dropout_mask": "07_models.ipynb",
"InputDropout": "07_models.ipynb",
"linear_layer": "07_models.ipynb",
"create_linear_layers": "07_models.ipynb",
"init_lstm": "07_models.ipynb",
"EHR_LSTM": "07_models.ipynb",
"init_cnn": "07_models.ipynb",
"conv_layer": "07_models.ipynb",
"EHR_CNN": "07_models.ipynb",
"get_data": "08_experiment.ipynb",
"get_optimizer": "08_experiment.ipynb",
"get_model": "08_experiment.ipynb",
"Experiment": "08_experiment.ipynb"}
modules = ["basics.py",
"preprocessing/clean.py",
"preprocessing/vocab.py",
"preprocessing/transform.py",
"data.py",
"metrics.py",
"learn.py",
"models.py",
"experiment.py"]
doc_url = "https://corazonlabs.github.io/lemonpie/"
git_url = "https://github.com/corazonlabs/lemonpie/tree/main/"
def custom_doc_links(name): return None
|
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Turkey - Accounting',
'version': '1.0',
'category': 'Localization',
'description': """
Türkiye için Tek düzen hesap planı şablonu Odoo Modülü.
==========================================================
Bu modül kurulduktan sonra, Muhasebe yapılandırma sihirbazı çalışır
* Sihirbaz sizden hesap planı şablonu, planın kurulacağı şirket, banka hesap
bilgileriniz, ilgili para birimi gibi bilgiler isteyecek.
""",
'author': 'Ahmet Altınışık, Can Tecim',
'maintainer':'https://launchpad.net/~openerp-turkey, http://www.cantecim.com',
'depends': [
'account',
],
'data': [
'data/l10n_tr_chart_data.xml',
'data/account.account.template.csv',
'data/l10n_tr_chart_post_data.xml',
'data/account_data.xml',
'data/account_tax_template_data.xml',
'data/account_chart_template_data.xml',
],
'license': 'LGPL-3',
}
|
class Solution:
def canArrange(self, arr: List[int], k: int) -> bool:
"""Hash table.
Running time: O(n) where n == len(arr).
"""
d = collections.defaultdict(int)
for a in arr:
d[a % k] += 1
for key, v in d.items():
if key == 0 and v % 2 == 1:
return False
elif key != 0 and v != d[k - key]:
return False
return True
|
# Define a procedure, fibonacci, that takes a natural number as its input, and
# returns the value of that fibonacci number.
# Two Base Cases:
# fibonacci(0) => 0
# fibonacci(1) => 1
# Recursive Case:
# n > 1 : fibonacci(n) => fibonacci(n-1) + fibonacci(n-2)
def fibonacci(n):
return n if n == 0 or n == 1 else fibonacci(n-1) + fibonacci(n-2)
print (fibonacci(0))
#>>> 0
print (fibonacci(1))
#>>> 1
print (fibonacci(15))
#>>> 610 |
#!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
@file : __init__.py.py
@Time : 2020/11/12 13:37
@Author: Tao.Xu
@Email : tao.xu2008@outlook.com
"""
"""
phoronix-test-suite: Main for Performance Test
===================
https://github.com/phoronix-test-suite/phoronix-test-suite
The Phoronix Test Suite is the most comprehensive testing and
benchmarking platform available for Linux, Solaris, macOS, Windows,
and BSD operating systems.
"""
if __name__ == '__main__':
pass
|
errorFound = False
def hasError():
global errorFound
return errorFound
def clearError():
global errorFound
errorFound = False
def error(message, lineNo = 0):
report(lineNo, "", message)
def report(lineNo, where, message):
global errorFound
errorFound = True
if lineNo == 0:
print("Error {1}: {2}".format(lineNo, where, message))
else:
print("[Line {0}] Error {1}: {2}".format(lineNo, where, message)) |
"""
模板语言:
{{ 变量 }}
{% 代码段 %}
{% 一个参数时:变量|过滤器, Book.id | add: 1 <= 2 当前id+1来和2比较
两个参数时:变量|过滤器:参数 %}, 过滤器最多只能传2个参数,过滤器用来对传入的变量进行修改
{% if book.name|length > 4 %} 管道|符号的左右不能有多余的空格,否则报错,其次并不是name.length而是通过管道来过滤
{{ book.pub_date|date:'Y年m月j日' }} 日期的转换管道
"""
"""
CSRF 跨站请求伪造, 盗用别人的信息,以你的名义进行恶意请求
比如:服务器返回一个表单进行转账操作,再把转账信息返回给服务器。
需要判断发送转账信息请求的客户端是不是刚才获取表单界面的客户端,防止回送请求的修改,和返回页面的修改(表单地址被修改为黑客地址,信息丢失)
防止CSRF需要服务器做安全验证
"""
"""
验证码主要用来防止暴力请求,原理就是请求页面之前生成一个动态不同的验证码写入到session中
用户登录的时候,会拿着填写的验证码和session中的验证码比较进行验证
""" |
# -*- coding:utf-8 -*-
# /usr/bin/env python
"""
Author: Albert King
date: 2019/10/20 10:58
contact: jindaxiang@163.com
desc: 外汇配置文件
"""
# headers
SHORT_HEADERS = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36'
}
# url
FX_SPOT_URL = "http://www.chinamoney.com.cn/r/cms/www/chinamoney/data/fx/rfx-sp-quot.json"
FX_SWAP_URL = "http://www.chinamoney.com.cn/r/cms/www/chinamoney/data/fx/rfx-sw-quot.json"
FX_PAIR_URL = "http://www.chinamoney.com.cn/r/cms/www/chinamoney/data/fx/cpair-quot.json"
# payload
SPOT_PAYLOAD = {
"t": {}
}
|
dia = int(input('Dia = '))
mes = str(input('Mês = '))
ano = int(input('Ano = '))
print('Você nasceu no dia {} de {} de {}. Correto?' .format(dia, mes, ano))
|
class AnythingType(set):
def __contains__(self, other):
return True
def intersection(self, other):
return other
def union(self, other):
return self
def __str__(self):
return '*'
def __repr__(self):
return "Anything"
Anything = AnythingType()
|
allct_dat = {
"TYR": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']],
"INTX,KFORM":['INT', '1'],
"HD2":{'torsion': 180.0, 'tree': 'E', 'NC': 16, 'NB': 19, 'NA': 21, 'I': 22, 'angle': 120.0, 'blen': 1.09, 'charge': 0.064, 'type': 'HC'},
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"OH":{'torsion': 180.0, 'tree': 'S', 'NC': 12, 'NB': 14, 'NA': 16, 'I': 17, 'angle': 120.0, 'blen': 1.36, 'charge': -0.528, 'type': 'OH'},
"HD1":{'torsion': 0.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 12, 'I': 13, 'angle': 120.0, 'blen': 1.09, 'charge': 0.064, 'type': 'HC'},
"HE1":{'torsion': 180.0, 'tree': 'E', 'NC': 11, 'NB': 12, 'NA': 14, 'I': 15, 'angle': 120.0, 'blen': 1.09, 'charge': 0.102, 'type': 'HC'},
"HE2":{'torsion': 180.0, 'tree': 'E', 'NC': 14, 'NB': 16, 'NA': 19, 'I': 20, 'angle': 120.0, 'blen': 1.09, 'charge': 0.102, 'type': 'HC'},
"CD2":{'torsion': 0.0, 'tree': 'S', 'NC': 14, 'NB': 16, 'NA': 19, 'I': 21, 'angle': 120.0, 'blen': 1.4, 'charge': -0.002, 'type': 'CA'},
"NAMRES":'TYROSINE COO- ANION',
"CD1":{'torsion': 180.0, 'tree': 'B', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 120.0, 'blen': 1.4, 'charge': -0.002, 'type': 'CA'},
"atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'CD1', 'HD1', 'CE1', 'HE1', 'CZ', 'OH', 'HH', 'CE2', 'HE2', 'CD2', 'HD2', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"CE1":{'torsion': 180.0, 'tree': 'B', 'NC': 8, 'NB': 11, 'NA': 12, 'I': 14, 'angle': 120.0, 'blen': 1.4, 'charge': -0.264, 'type': 'CA'},
"CE2":{'torsion': 0.0, 'tree': 'B', 'NC': 12, 'NB': 14, 'NA': 16, 'I': 19, 'angle': 120.0, 'blen': 1.4, 'charge': -0.264, 'type': 'CA'},
"HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'},
"HH":{'torsion': 0.0, 'tree': 'E', 'NC': 14, 'NB': 16, 'NA': 17, 'I': 18, 'angle': 113.0, 'blen': 0.96, 'charge': 0.334, 'type': 'HO'},
"CZ":{'torsion': 0.0, 'tree': 'B', 'NC': 11, 'NB': 12, 'NA': 14, 'I': 16, 'angle': 120.0, 'blen': 1.4, 'charge': 0.462, 'type': 'C'},
"H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'},
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'},
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 23, 'I': 24, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CG":{'torsion': 180.0, 'tree': 'S', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 109.47, 'blen': 1.51, 'charge': -0.03, 'type': 'CA'},
"CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'},
"CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.098, 'type': 'CT'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 23, 'I': 25, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"loopList":[['CG', 'CD2']],
"CUT":['0.00000'],
"C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 23, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'},
},
"ASN": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'OD1', 'ND2', 'HD21', 'HD22', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"ND2":{'torsion': 180.0, 'tree': 'B', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 13, 'angle': 116.6, 'blen': 1.335, 'charge': -0.867, 'type': 'N'},
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 16, 'I': 17, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.086, 'type': 'CT'},
"impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O'], ['CB', 'ND2', 'CG', 'OD1'], ['CG', 'HD21', 'ND2', 'HD22']],
"HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'},
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'},
"INTX,KFORM":['INT', '1'],
"CG":{'torsion': 180.0, 'tree': 'B', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 111.1, 'blen': 1.522, 'charge': 0.675, 'type': 'C'},
"CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'},
"H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'},
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"HD21":{'torsion': 180.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 13, 'I': 14, 'angle': 119.8, 'blen': 1.01, 'charge': 0.344, 'type': 'H'},
"OD1":{'torsion': 0.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 120.5, 'blen': 1.229, 'charge': -0.47, 'type': 'O'},
"HD22":{'torsion': 0.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 13, 'I': 15, 'angle': 119.8, 'blen': 1.01, 'charge': 0.344, 'type': 'H'},
"CUT":['0.00000'],
"C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 16, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 16, 'I': 18, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"NAMRES":'ASPARAGINE COO- ANION',
},
"CYS": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'SG', 'HSG', 'LP1', 'LP2', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"SG":{'torsion': 180.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 116.0, 'blen': 1.81, 'charge': 0.827, 'type': 'SH'},
"LP1":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 13, 'angle': 96.7, 'blen': 0.679, 'charge': -0.481, 'type': 'LP'},
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 15, 'I': 16, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.06, 'type': 'CT'},
"impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']],
"HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'},
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'},
"INTX,KFORM":['INT', '1'],
"LP2":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 14, 'angle': 96.7, 'blen': 0.679, 'charge': -0.481, 'type': 'LP'},
"CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'},
"H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'},
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"HSG":{'torsion': 180.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 96.0, 'blen': 1.33, 'charge': 0.135, 'type': 'HS'},
"CUT":['0.00000'],
"C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 15, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 15, 'I': 17, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"NAMRES":'CYSTEINE COO- ANION',
},
"ARG": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.056, 'type': 'HC'},
"HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.056, 'type': 'HC'},
"impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O'], ['NE', 'NH1', 'CZ', 'NH2'], ['CD', 'CZ', 'NE', 'HE'], ['CZ', 'HH12', 'NH1', 'HH11'], ['CZ', 'HH22', 'NH2', 'HH21']],
"HH11":{'torsion': 0.0, 'tree': 'E', 'NC': 17, 'NB': 19, 'NA': 20, 'I': 21, 'angle': 119.8, 'blen': 1.01, 'charge': 0.361, 'type': 'H3'},
"HH12":{'torsion': 180.0, 'tree': 'E', 'NC': 17, 'NB': 19, 'NA': 20, 'I': 22, 'angle': 119.8, 'blen': 1.01, 'charge': 0.361, 'type': 'H3'},
"HH21":{'torsion': 0.0, 'tree': 'E', 'NC': 17, 'NB': 19, 'NA': 23, 'I': 24, 'angle': 119.8, 'blen': 1.01, 'charge': 0.361, 'type': 'H3'},
"HH22":{'torsion': 180.0, 'tree': 'E', 'NC': 17, 'NB': 19, 'NA': 23, 'I': 25, 'angle': 119.8, 'blen': 1.01, 'charge': 0.361, 'type': 'H3'},
"INTX,KFORM":['INT', '1'],
"NE":{'torsion': 180.0, 'tree': 'B', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 17, 'angle': 111.0, 'blen': 1.48, 'charge': -0.324, 'type': 'N2'},
"HG2":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 109.5, 'blen': 1.09, 'charge': 0.074, 'type': 'HC'},
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'},
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"HD2":{'torsion': 300.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 15, 'angle': 109.5, 'blen': 1.09, 'charge': 0.133, 'type': 'HC'},
"HD3":{'torsion': 60.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 16, 'angle': 109.5, 'blen': 1.09, 'charge': 0.133, 'type': 'HC'},
"NAMRES":'ARGININE COO- ANION',
"HE":{'torsion': 0.0, 'tree': 'E', 'NC': 11, 'NB': 14, 'NA': 17, 'I': 18, 'angle': 118.5, 'blen': 1.01, 'charge': 0.269, 'type': 'H3'},
"atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'HG2', 'HG3', 'CD', 'HD2', 'HD3', 'NE', 'HE', 'CZ', 'NH1', 'HH11', 'HH12', 'NH2', 'HH21', 'HH22', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"NH2":{'torsion': 180.0, 'tree': 'B', 'NC': 14, 'NB': 17, 'NA': 19, 'I': 23, 'angle': 118.0, 'blen': 1.33, 'charge': -0.624, 'type': 'N2'},
"HG3":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 13, 'angle': 109.5, 'blen': 1.09, 'charge': 0.074, 'type': 'HC'},
"NH1":{'torsion': 0.0, 'tree': 'B', 'NC': 14, 'NB': 17, 'NA': 19, 'I': 20, 'angle': 122.0, 'blen': 1.33, 'charge': -0.624, 'type': 'N2'},
"HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'},
"CZ":{'torsion': 180.0, 'tree': 'B', 'NC': 11, 'NB': 14, 'NA': 17, 'I': 19, 'angle': 123.0, 'blen': 1.33, 'charge': 0.76, 'type': 'CA'},
"H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'},
"CD":{'torsion': 180.0, 'tree': '3', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 14, 'angle': 109.47, 'blen': 1.525, 'charge': -0.228, 'type': 'CT'},
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 26, 'I': 27, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CG":{'torsion': 180.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 109.47, 'blen': 1.525, 'charge': -0.103, 'type': 'CT'},
"CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'},
"CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.08, 'type': 'CT'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 26, 'I': 28, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CUT":['0.00000'],
"C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 26, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'},
},
"LEU": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.033, 'type': 'HC'},
"HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.033, 'type': 'HC'},
"impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']],
"INTX,KFORM":['INT', '1'],
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"NAMRES":'LEUCINE COO- ANION',
"HG":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 109.5, 'blen': 1.09, 'charge': 0.031, 'type': 'HC'},
"atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'HG', 'CD1', 'HD11', 'HD12', 'HD13', 'CD2', 'HD21', 'HD22', 'HD23', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"HD11":{'torsion': 60.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 13, 'I': 14, 'angle': 109.5, 'blen': 1.09, 'charge': 0.034, 'type': 'HC'},
"HD12":{'torsion': 180.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 13, 'I': 15, 'angle': 109.5, 'blen': 1.09, 'charge': 0.034, 'type': 'HC'},
"HD13":{'torsion': 300.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 13, 'I': 16, 'angle': 109.5, 'blen': 1.09, 'charge': 0.034, 'type': 'HC'},
"CD2":{'torsion': 180.0, 'tree': '3', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 17, 'angle': 109.47, 'blen': 1.525, 'charge': -0.107, 'type': 'CT'},
"CD1":{'torsion': 60.0, 'tree': '3', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 13, 'angle': 109.47, 'blen': 1.525, 'charge': -0.107, 'type': 'CT'},
"HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'},
"H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'},
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'},
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 21, 'I': 22, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CG":{'torsion': 180.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 109.47, 'blen': 1.525, 'charge': -0.01, 'type': 'CT'},
"CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'},
"CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.061, 'type': 'CT'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 21, 'I': 23, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"HD21":{'torsion': 60.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 17, 'I': 18, 'angle': 109.5, 'blen': 1.09, 'charge': 0.034, 'type': 'HC'},
"HD23":{'torsion': 300.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 17, 'I': 20, 'angle': 109.5, 'blen': 1.09, 'charge': 0.034, 'type': 'HC'},
"HD22":{'torsion': 180.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 17, 'I': 19, 'angle': 109.5, 'blen': 1.09, 'charge': 0.034, 'type': 'HC'},
"CUT":['0.00000'],
"C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 21, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'},
},
"HID": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"NE2":{'torsion': 0.0, 'tree': 'S', 'NC': 11, 'NB': 12, 'NA': 14, 'I': 16, 'angle': 109.0, 'blen': 1.31, 'charge': -0.502, 'type': 'NB'},
"ND1":{'torsion': 180.0, 'tree': 'B', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 122.0, 'blen': 1.39, 'charge': -0.146, 'type': 'NA'},
"impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O'], ['CG', 'CE1', 'ND1', 'HD1']],
"CE1":{'torsion': 180.0, 'tree': 'B', 'NC': 8, 'NB': 11, 'NA': 12, 'I': 14, 'angle': 108.0, 'blen': 1.32, 'charge': 0.241, 'type': 'CR'},
"INTX,KFORM":['INT', '1'],
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"HD1":{'torsion': 0.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 12, 'I': 13, 'angle': 126.0, 'blen': 1.01, 'charge': 0.228, 'type': 'H'},
"NAMRES":'HISTIDINE DELTAH COO- ANION',
"HE":{'torsion': 180.0, 'tree': 'E', 'NC': 11, 'NB': 12, 'NA': 14, 'I': 15, 'angle': 120.0, 'blen': 1.09, 'charge': 0.036, 'type': 'HC'},
"HD":{'torsion': 180.0, 'tree': 'E', 'NC': 14, 'NB': 16, 'NA': 17, 'I': 18, 'angle': 120.0, 'blen': 1.09, 'charge': 0.018, 'type': 'HC'},
"atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'ND1', 'HD1', 'CE1', 'HE', 'NE2', 'CD2', 'HD', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"CD2":{'torsion': 0.0, 'tree': 'S', 'NC': 12, 'NB': 14, 'NA': 16, 'I': 17, 'angle': 110.0, 'blen': 1.36, 'charge': 0.195, 'type': 'CV'},
"HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'},
"H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'},
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'},
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 19, 'I': 20, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CG":{'torsion': 180.0, 'tree': 'S', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 115.0, 'blen': 1.51, 'charge': -0.032, 'type': 'CC'},
"CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'},
"CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.098, 'type': 'CT'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 19, 'I': 21, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"loopList":[['CG', 'CD2']],
"CUT":['0.00000'],
"C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 19, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'},
},
"HIE": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"NE2":{'torsion': 0.0, 'tree': 'B', 'NC': 11, 'NB': 12, 'NA': 13, 'I': 15, 'angle': 109.0, 'blen': 1.31, 'charge': -0.146, 'type': 'NA'},
"ND1":{'torsion': 180.0, 'tree': 'S', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 122.0, 'blen': 1.39, 'charge': -0.502, 'type': 'NB'},
"impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O'], ['CE1', 'CD2', 'NE2', 'HE2']],
"CE1":{'torsion': 180.0, 'tree': 'B', 'NC': 8, 'NB': 11, 'NA': 12, 'I': 13, 'angle': 108.0, 'blen': 1.32, 'charge': 0.241, 'type': 'CR'},
"INTX,KFORM":['INT', '1'],
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"HE2":{'torsion': 180.0, 'tree': 'E', 'NC': 12, 'NB': 13, 'NA': 15, 'I': 16, 'angle': 125.0, 'blen': 1.01, 'charge': 0.228, 'type': 'H'},
"NAMRES":'HISTIDINE EPSILON-H COO- ANION',
"HE":{'torsion': 180.0, 'tree': 'E', 'NC': 11, 'NB': 12, 'NA': 13, 'I': 14, 'angle': 120.0, 'blen': 1.09, 'charge': 0.036, 'type': 'HC'},
"HD":{'torsion': 180.0, 'tree': 'E', 'NC': 13, 'NB': 15, 'NA': 17, 'I': 18, 'angle': 120.0, 'blen': 1.09, 'charge': 0.114, 'type': 'HC'},
"atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'ND1', 'CE1', 'HE', 'NE2', 'HE2', 'CD2', 'HD', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"CD2":{'torsion': 0.0, 'tree': 'S', 'NC': 12, 'NB': 13, 'NA': 15, 'I': 17, 'angle': 110.0, 'blen': 1.36, 'charge': -0.184, 'type': 'CW'},
"HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'},
"H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'},
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'},
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 19, 'I': 20, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CG":{'torsion': 180.0, 'tree': 'S', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 115.0, 'blen': 1.51, 'charge': 0.251, 'type': 'CC'},
"CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'},
"CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.098, 'type': 'CT'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 19, 'I': 21, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"loopList":[['CG', 'CD2']],
"CUT":['0.00000'],
"C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 19, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'},
},
"MET": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.027, 'type': 'HC'},
"HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.027, 'type': 'HC'},
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 21, 'I': 22, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']],
"SD":{'torsion': 180.0, 'tree': '3', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 14, 'angle': 110.0, 'blen': 1.81, 'charge': 0.737, 'type': 'S'},
"LP1":{'torsion': 60.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 15, 'angle': 96.7, 'blen': 0.679, 'charge': -0.381, 'type': 'LP'},
"HG3":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 13, 'angle': 109.5, 'blen': 1.09, 'charge': 0.0652, 'type': 'HC'},
"HG2":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 109.5, 'blen': 1.09, 'charge': 0.0652, 'type': 'HC'},
"INTX,KFORM":['INT', '1'],
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"HE3":{'torsion': 300.0, 'tree': 'E', 'NC': 11, 'NB': 14, 'NA': 17, 'I': 20, 'angle': 109.5, 'blen': 1.09, 'charge': 0.0652, 'type': 'HC'},
"HE2":{'torsion': 180.0, 'tree': 'E', 'NC': 11, 'NB': 14, 'NA': 17, 'I': 19, 'angle': 109.5, 'blen': 1.09, 'charge': 0.0652, 'type': 'HC'},
"HE1":{'torsion': 60.0, 'tree': 'E', 'NC': 11, 'NB': 14, 'NA': 17, 'I': 18, 'angle': 109.5, 'blen': 1.09, 'charge': 0.0652, 'type': 'HC'},
"NAMRES":'METHIONINE COO- ANION',
"atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'HG2', 'HG3', 'SD', 'LP1', 'LP2', 'CE', 'HE1', 'HE2', 'HE3', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'},
"H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'},
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'},
"CE":{'torsion': 180.0, 'tree': '3', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 17, 'angle': 100.0, 'blen': 1.78, 'charge': -0.134, 'type': 'CT'},
"CG":{'torsion': 180.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 109.47, 'blen': 1.525, 'charge': -0.054, 'type': 'CT'},
"CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'},
"CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.151, 'type': 'CT'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 21, 'I': 23, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"LP2":{'torsion': 300.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 16, 'angle': 96.7, 'blen': 0.679, 'charge': -0.381, 'type': 'LP'},
"CUT":['0.00000'],
"C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 21, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'},
},
"IDBGEN,IREST,ITYPF":['1', '1', '201'],
"ALA": { "HB2":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"HB3":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB1', 'HB2', 'HB3', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"HB1":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 12, 'I': 13, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.098, 'type': 'CT'},
"impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']],
"HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'},
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'},
"INTX,KFORM":['INT', '1'],
"CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'},
"H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'},
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"CUT":['0.00000'],
"C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 12, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 12, 'I': 14, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"NAMRES":'ALANINE COO- ANION',
},
"PHE": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']],
"INTX,KFORM":['INT', '1'],
"HD2":{'torsion': 180.0, 'tree': 'E', 'NC': 16, 'NB': 18, 'NA': 20, 'I': 21, 'angle': 120.0, 'blen': 1.09, 'charge': 0.058, 'type': 'HC'},
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"HD1":{'torsion': 0.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 12, 'I': 13, 'angle': 120.0, 'blen': 1.09, 'charge': 0.058, 'type': 'HC'},
"HE1":{'torsion': 180.0, 'tree': 'E', 'NC': 11, 'NB': 12, 'NA': 14, 'I': 15, 'angle': 120.0, 'blen': 1.09, 'charge': 0.063, 'type': 'HC'},
"HE2":{'torsion': 180.0, 'tree': 'E', 'NC': 14, 'NB': 16, 'NA': 18, 'I': 19, 'angle': 120.0, 'blen': 1.09, 'charge': 0.063, 'type': 'HC'},
"CD2":{'torsion': 0.0, 'tree': 'S', 'NC': 14, 'NB': 16, 'NA': 18, 'I': 20, 'angle': 120.0, 'blen': 1.4, 'charge': -0.069, 'type': 'CA'},
"NAMRES":'PHENYLALANINE COO- ANION',
"CD1":{'torsion': 180.0, 'tree': 'B', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 120.0, 'blen': 1.4, 'charge': -0.069, 'type': 'CA'},
"atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'CD1', 'HD1', 'CE1', 'HE1', 'CZ', 'HZ', 'CE2', 'HE2', 'CD2', 'HD2', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"CE1":{'torsion': 180.0, 'tree': 'B', 'NC': 8, 'NB': 11, 'NA': 12, 'I': 14, 'angle': 120.0, 'blen': 1.4, 'charge': -0.059, 'type': 'CA'},
"CE2":{'torsion': 0.0, 'tree': 'B', 'NC': 12, 'NB': 14, 'NA': 16, 'I': 18, 'angle': 120.0, 'blen': 1.4, 'charge': -0.059, 'type': 'CA'},
"HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'},
"CZ":{'torsion': 0.0, 'tree': 'B', 'NC': 11, 'NB': 12, 'NA': 14, 'I': 16, 'angle': 120.0, 'blen': 1.4, 'charge': -0.065, 'type': 'CA'},
"H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'},
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'},
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 22, 'I': 23, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CG":{'torsion': 180.0, 'tree': 'S', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 115.0, 'blen': 1.51, 'charge': 0.055, 'type': 'CA'},
"CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'},
"CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.098, 'type': 'CT'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 22, 'I': 24, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"loopList":[['CG', 'CD2']],
"CUT":['0.00000'],
"C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 22, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'},
"HZ":{'torsion': 180.0, 'tree': 'E', 'NC': 12, 'NB': 14, 'NA': 16, 'I': 17, 'angle': 120.0, 'blen': 1.09, 'charge': 0.062, 'type': 'HC'},
},
"CYX": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.0495, 'type': 'HC'},
"HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.0495, 'type': 'HC'},
"atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'SG', 'LP1', 'LP2', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"SG":{'torsion': 180.0, 'tree': 'B', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 116.0, 'blen': 1.81, 'charge': 0.824, 'type': 'S'},
"LP1":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 96.7, 'blen': 0.679, 'charge': -0.4045, 'type': 'LP'},
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 14, 'I': 15, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.098, 'type': 'CT'},
"impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']],
"HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'},
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'},
"INTX,KFORM":['INT', '1'],
"LP2":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 13, 'angle': 96.7, 'blen': 0.679, 'charge': -0.4045, 'type': 'LP'},
"CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'},
"H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'},
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"CUT":['0.00000'],
"C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 14, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 14, 'I': 16, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"NAMRES":'CYSTINE(S-S BRIDGE) COO- ANION',
},
"PRO": { "HB2":{'torsion': 136.3, 'tree': 'E', 'NC': 5, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 109.5, 'blen': 1.09, 'charge': 0.061, 'type': 'HC'},
"HB3":{'torsion': 256.3, 'tree': 'E', 'NC': 5, 'NB': 8, 'NA': 11, 'I': 13, 'angle': 109.5, 'blen': 1.09, 'charge': 0.061, 'type': 'HC'},
"impropTors":[['CA', 'OXT', 'C', 'O'], ['-M', 'CA', 'N', 'CD']],
"INTX,KFORM":['INT', '1'],
"HG3":{'torsion': 98.0, 'tree': 'E', 'NC': 4, 'NB': 5, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.063, 'type': 'HC'},
"HG2":{'torsion': 218.0, 'tree': 'E', 'NC': 4, 'NB': 5, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.063, 'type': 'HC'},
"CD":{'torsion': 356.1, 'tree': '3', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 126.1, 'blen': 1.458, 'charge': -0.012, 'type': 'CT'},
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"loopList":[['CA', 'CB']],
"HD2":{'torsion': 80.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 5, 'I': 6, 'angle': 109.5, 'blen': 1.09, 'charge': 0.06, 'type': 'HC'},
"HD3":{'torsion': 320.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 5, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.06, 'type': 'HC'},
"NAMRES":'PROLINE COO- ANION',
"atNameList":['N', 'CD', 'HD2', 'HD3', 'CG', 'HG2', 'HG3', 'CB', 'HB2', 'HB3', 'CA', 'HA', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"HA":{'torsion': 81.1, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 14, 'I': 15, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'},
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 117.0, 'blen': 1.337, 'charge': -0.229, 'type': 'N'},
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 14, 'NA': 16, 'I': 17, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CG":{'torsion': 200.1, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 5, 'I': 8, 'angle': 103.2, 'blen': 1.5, 'charge': -0.121, 'type': 'CT'},
"CA":{'torsion': 175.2, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 14, 'angle': 120.6, 'blen': 1.451, 'charge': 0.035, 'type': 'CT'},
"CB":{'torsion': 338.3, 'tree': 'B', 'NC': 4, 'NB': 5, 'NA': 8, 'I': 11, 'angle': 106.0, 'blen': 1.51, 'charge': -0.115, 'type': 'CT'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 14, 'NA': 16, 'I': 18, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CUT":['0.00000'],
"C":{'torsion': 0.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 14, 'I': 16, 'angle': 111.1, 'blen': 1.522, 'charge': 0.438, 'type': 'C'},
},
"LYS": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"HZ2":{'torsion': 180.0, 'tree': 'E', 'NC': 14, 'NB': 17, 'NA': 20, 'I': 22, 'angle': 109.47, 'blen': 1.01, 'charge': 0.294, 'type': 'H3'},
"HZ3":{'torsion': 300.0, 'tree': 'E', 'NC': 14, 'NB': 17, 'NA': 20, 'I': 23, 'angle': 109.47, 'blen': 1.01, 'charge': 0.294, 'type': 'H3'},
"impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']],
"HZ1":{'torsion': 60.0, 'tree': 'E', 'NC': 14, 'NB': 17, 'NA': 20, 'I': 21, 'angle': 109.47, 'blen': 1.01, 'charge': 0.294, 'type': 'H3'},
"NZ":{'torsion': 180.0, 'tree': '3', 'NC': 11, 'NB': 14, 'NA': 17, 'I': 20, 'angle': 109.47, 'blen': 1.47, 'charge': -0.138, 'type': 'N3'},
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 24, 'I': 25, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"INTX,KFORM":['INT', '1'],
"HG3":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 13, 'angle': 109.5, 'blen': 1.09, 'charge': 0.116, 'type': 'HC'},
"HG2":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 109.5, 'blen': 1.09, 'charge': 0.116, 'type': 'HC'},
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'},
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"HE3":{'torsion': 60.0, 'tree': 'E', 'NC': 11, 'NB': 14, 'NA': 17, 'I': 19, 'angle': 109.5, 'blen': 1.09, 'charge': 0.098, 'type': 'HC'},
"HE2":{'torsion': 300.0, 'tree': 'E', 'NC': 11, 'NB': 14, 'NA': 17, 'I': 18, 'angle': 109.5, 'blen': 1.09, 'charge': 0.098, 'type': 'HC'},
"HD2":{'torsion': 300.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 15, 'angle': 109.5, 'blen': 1.09, 'charge': 0.122, 'type': 'HC'},
"HD3":{'torsion': 60.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 16, 'angle': 109.5, 'blen': 1.09, 'charge': 0.122, 'type': 'HC'},
"NAMRES":'LYSINE COO- ANION',
"atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'HG2', 'HG3', 'CD', 'HD2', 'HD3', 'CE', 'HE2', 'HE3', 'NZ', 'HZ1', 'HZ2', 'HZ3', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'},
"H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'},
"CD":{'torsion': 180.0, 'tree': '3', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 14, 'angle': 109.47, 'blen': 1.525, 'charge': -0.18, 'type': 'CT'},
"CE":{'torsion': 180.0, 'tree': '3', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 17, 'angle': 109.47, 'blen': 1.525, 'charge': -0.038, 'type': 'CT'},
"CG":{'torsion': 180.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 109.47, 'blen': 1.525, 'charge': -0.16, 'type': 'CT'},
"CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'},
"CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.098, 'type': 'CT'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 24, 'I': 26, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CUT":['0.00000'],
"C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 24, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'},
},
"NAMDBF":'db4.dat',
"SER": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.119, 'type': 'HC'},
"HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.119, 'type': 'HC'},
"HG":{'torsion': 180.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 109.47, 'blen': 0.96, 'charge': 0.31, 'type': 'HO'},
"atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'OG', 'HG', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 13, 'I': 14, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': 0.018, 'type': 'CT'},
"impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']],
"OG":{'torsion': 180.0, 'tree': 'S', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 109.47, 'blen': 1.43, 'charge': -0.55, 'type': 'OH'},
"HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'},
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'},
"INTX,KFORM":['INT', '1'],
"CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'},
"H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'},
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"CUT":['0.00000'],
"C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 13, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 13, 'I': 15, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"NAMRES":'SERINE COO- ANION',
},
"ASP": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.071, 'type': 'HC'},
"HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.071, 'type': 'HC'},
"atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'OD1', 'OD2', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 14, 'I': 15, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.398, 'type': 'CT'},
"impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O'], ['CB', 'OD1', 'CG', 'OD2']],
"HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'},
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'},
"INTX,KFORM":['INT', '1'],
"CG":{'torsion': 180.0, 'tree': 'B', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 109.47, 'blen': 1.527, 'charge': 0.714, 'type': 'C'},
"CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'},
"H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'},
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"OD2":{'torsion': 270.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 13, 'angle': 117.2, 'blen': 1.26, 'charge': -0.721, 'type': 'O2'},
"OD1":{'torsion': 90.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 117.2, 'blen': 1.26, 'charge': -0.721, 'type': 'O2'},
"CUT":['0.00000'],
"C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 14, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 14, 'I': 16, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"NAMRES":'ASPARTIC ACID COO- ANION',
},
"GLN": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"NE2":{'torsion': 180.0, 'tree': 'B', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 16, 'angle': 116.6, 'blen': 1.335, 'charge': -0.867, 'type': 'N'},
"impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O'], ['CG', 'NE2', 'CD', 'OE1'], ['CD', 'HE21', 'NE2', 'HE22']],
"INTX,KFORM":['INT', '1'],
"HG3":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 13, 'angle': 109.5, 'blen': 1.09, 'charge': 0.057, 'type': 'HC'},
"HG2":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 109.5, 'blen': 1.09, 'charge': 0.057, 'type': 'HC'},
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'},
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'},
"NAMRES":'GLUTAMINE COO- ANION',
"atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'HG2', 'HG3', 'CD', 'OE1', 'NE2', 'HE21', 'HE22', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"HE21":{'torsion': 180.0, 'tree': 'E', 'NC': 11, 'NB': 14, 'NA': 16, 'I': 17, 'angle': 119.8, 'blen': 1.01, 'charge': 0.344, 'type': 'H'},
"HE22":{'torsion': 0.0, 'tree': 'E', 'NC': 11, 'NB': 14, 'NA': 16, 'I': 18, 'angle': 119.8, 'blen': 1.01, 'charge': 0.344, 'type': 'H'},
"HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'},
"H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'},
"CD":{'torsion': 180.0, 'tree': 'B', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 14, 'angle': 111.1, 'blen': 1.522, 'charge': 0.675, 'type': 'C'},
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 19, 'I': 20, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CG":{'torsion': 180.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 109.47, 'blen': 1.525, 'charge': -0.102, 'type': 'CT'},
"OE1":{'torsion': 0.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 15, 'angle': 120.5, 'blen': 1.229, 'charge': -0.47, 'type': 'O'},
"CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.098, 'type': 'CT'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 19, 'I': 21, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CUT":['0.00000'],
"C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 19, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'},
},
"GLU": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.092, 'type': 'HC'},
"HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.092, 'type': 'HC'},
"impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O'], ['CG', 'OE1', 'CD', 'OE2']],
"INTX,KFORM":['INT', '1'],
"HG3":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 13, 'angle': 109.5, 'blen': 1.09, 'charge': 0.071, 'type': 'HC'},
"HG2":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 109.5, 'blen': 1.09, 'charge': 0.071, 'type': 'HC'},
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'},
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'},
"OE2":{'torsion': 270.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 16, 'angle': 117.2, 'blen': 1.26, 'charge': -0.721, 'type': 'O2'},
"NAMRES":'GLUTAMIC ACID COO- ANION',
"atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'HG2', 'HG3', 'CD', 'OE1', 'OE2', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'},
"H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'},
"CD":{'torsion': 180.0, 'tree': 'B', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 14, 'angle': 109.47, 'blen': 1.527, 'charge': 0.714, 'type': 'C'},
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 17, 'I': 18, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CG":{'torsion': 180.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 109.47, 'blen': 1.51, 'charge': -0.398, 'type': 'CT'},
"OE1":{'torsion': 90.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 15, 'angle': 117.2, 'blen': 1.26, 'charge': -0.721, 'type': 'O2'},
"CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.184, 'type': 'CT'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 17, 'I': 19, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CUT":['0.00000'],
"C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 17, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'},
},
"TRP": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 26, 'I': 28, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"HZ2":{'torsion': 0.0, 'tree': 'E', 'NC': 14, 'NB': 16, 'NA': 17, 'I': 18, 'angle': 120.0, 'blen': 1.09, 'charge': 0.084, 'type': 'HC'},
"HZ3":{'torsion': 180.0, 'tree': 'E', 'NC': 17, 'NB': 19, 'NA': 21, 'I': 22, 'angle': 120.0, 'blen': 1.09, 'charge': 0.057, 'type': 'HC'},
"impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O'], ['CD1', 'CE2', 'NE1', 'HE1'], ['CE2', 'CH2', 'CZ2', 'HZ2'], ['CZ2', 'CZ3', 'CH2', 'HH2'], ['CH2', 'CE3', 'CZ3', 'HZ3'], ['CZ3', 'CD2', 'CE3', 'HE3']],
"CH2":{'torsion': 180.0, 'tree': 'B', 'NC': 14, 'NB': 16, 'NA': 17, 'I': 19, 'angle': 116.0, 'blen': 1.39, 'charge': -0.077, 'type': 'CA'},
"CZ3":{'torsion': 0.0, 'tree': 'B', 'NC': 16, 'NB': 17, 'NA': 19, 'I': 21, 'angle': 121.0, 'blen': 1.35, 'charge': -0.066, 'type': 'CA'},
"NE1":{'torsion': 180.0, 'tree': 'B', 'NC': 8, 'NB': 11, 'NA': 12, 'I': 14, 'angle': 107.0, 'blen': 1.43, 'charge': -0.352, 'type': 'NA'},
"INTX,KFORM":['INT', '1'],
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"HE3":{'torsion': 180.0, 'tree': 'E', 'NC': 19, 'NB': 21, 'NA': 23, 'I': 24, 'angle': 120.0, 'blen': 1.09, 'charge': 0.086, 'type': 'HC'},
"HD1":{'torsion': 0.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 12, 'I': 13, 'angle': 120.0, 'blen': 1.09, 'charge': 0.093, 'type': 'HC'},
"HE1":{'torsion': 180.0, 'tree': 'E', 'NC': 11, 'NB': 12, 'NA': 14, 'I': 15, 'angle': 125.5, 'blen': 1.01, 'charge': 0.271, 'type': 'H'},
"NAMRES":'TRYPTOPHAN COO- ANION',
"CD1":{'torsion': 180.0, 'tree': 'B', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 127.0, 'blen': 1.34, 'charge': 0.044, 'type': 'CW'},
"atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'CD1', 'HD1', 'NE1', 'HE1', 'CE2', 'CZ2', 'HZ2', 'CH2', 'HH2', 'CZ3', 'HZ3', 'CE3', 'HE3', 'CD2', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"CD2":{'torsion': 0.0, 'tree': 'E', 'NC': 19, 'NB': 21, 'NA': 23, 'I': 25, 'angle': 117.0, 'blen': 1.4, 'charge': 0.146, 'type': 'CB'},
"CE2":{'torsion': 0.0, 'tree': 'S', 'NC': 11, 'NB': 12, 'NA': 14, 'I': 16, 'angle': 109.0, 'blen': 1.31, 'charge': 0.154, 'type': 'CN'},
"CE3":{'torsion': 0.0, 'tree': 'B', 'NC': 17, 'NB': 19, 'NA': 21, 'I': 23, 'angle': 122.0, 'blen': 1.41, 'charge': -0.173, 'type': 'CA'},
"HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'},
"H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'},
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'},
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 26, 'I': 27, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CG":{'torsion': 180.0, 'tree': 'S', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 115.0, 'blen': 1.51, 'charge': -0.135, 'type': 'C*'},
"CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'},
"CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.098, 'type': 'CT'},
"CZ2":{'torsion': 180.0, 'tree': 'B', 'NC': 12, 'NB': 14, 'NA': 16, 'I': 17, 'angle': 128.0, 'blen': 1.4, 'charge': -0.168, 'type': 'CA'},
"loopList":[['CG', 'CD2'], ['CE2', 'CD2']],
"CUT":['0.00000'],
"C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 26, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'},
"HH2":{'torsion': 180.0, 'tree': 'E', 'NC': 16, 'NB': 17, 'NA': 19, 'I': 20, 'angle': 120.0, 'blen': 1.09, 'charge': 0.074, 'type': 'HC'},
},
"GLY": { "HA3":{'torsion': 60.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 109.5, 'blen': 1.09, 'charge': 0.032, 'type': 'HC'},
"atNameList":['N', 'H', 'CA', 'HA2', 'HA3', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"HA2":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.032, 'type': 'HC'},
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 9, 'I': 10, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']],
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'},
"INTX,KFORM":['INT', '1'],
"CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'},
"H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'},
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"CUT":['0.00000'],
"C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 9, 'angle': 110.4, 'blen': 1.522, 'charge': 0.524, 'type': 'C'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 9, 'I': 11, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"NAMRES":'GLYCINE COO- ANION',
},
"THR": { "atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB', 'CG2', 'HG21', 'HG22', 'HG23', 'OG1', 'HG1', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"HG23":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 10, 'I': 13, 'angle': 109.5, 'blen': 1.09, 'charge': 0.065, 'type': 'HC'},
"HB":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.082, 'type': 'HC'},
"HG22":{'torsion': 180.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 10, 'I': 12, 'angle': 109.5, 'blen': 1.09, 'charge': 0.065, 'type': 'HC'},
"CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': 0.17, 'type': 'CT'},
"HG1":{'torsion': 180.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 14, 'I': 15, 'angle': 109.47, 'blen': 0.96, 'charge': 0.31, 'type': 'HO'},
"HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'},
"impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']],
"HG21":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 10, 'I': 11, 'angle': 109.5, 'blen': 1.09, 'charge': 0.065, 'type': 'HC'},
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'},
"INTX,KFORM":['INT', '1'],
"OG1":{'torsion': 60.0, 'tree': 'S', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 14, 'angle': 109.47, 'blen': 1.43, 'charge': -0.55, 'type': 'OH'},
"CG2":{'torsion': 300.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.47, 'blen': 1.525, 'charge': -0.191, 'type': 'CT'},
"CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'},
"H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'},
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 16, 'I': 17, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CUT":['0.00000'],
"C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 16, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 16, 'I': 18, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"NAMRES":'THREONINE COO- ANION',
},
"HIP": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.086, 'type': 'HC'},
"HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.086, 'type': 'HC'},
"NE2":{'torsion': 0.0, 'tree': 'B', 'NC': 11, 'NB': 12, 'NA': 14, 'I': 16, 'angle': 109.0, 'blen': 1.31, 'charge': -0.058, 'type': 'NA'},
"ND1":{'torsion': 180.0, 'tree': 'B', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 122.0, 'blen': 1.39, 'charge': -0.058, 'type': 'NA'},
"impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O'], ['CG', 'CE1', 'ND1', 'HD1'], ['CE1', 'CD2', 'NE2', 'HE2']],
"CE1":{'torsion': 180.0, 'tree': 'B', 'NC': 8, 'NB': 11, 'NA': 12, 'I': 14, 'angle': 108.0, 'blen': 1.32, 'charge': 0.114, 'type': 'CR'},
"INTX,KFORM":['INT', '1'],
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"HD1":{'torsion': 0.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 12, 'I': 13, 'angle': 126.0, 'blen': 1.01, 'charge': 0.306, 'type': 'H'},
"HE2":{'torsion': 180.0, 'tree': 'E', 'NC': 12, 'NB': 14, 'NA': 16, 'I': 17, 'angle': 125.0, 'blen': 1.01, 'charge': 0.306, 'type': 'H'},
"NAMRES":'HISTIDINE PLUS COO-',
"HE":{'torsion': 180.0, 'tree': 'E', 'NC': 11, 'NB': 12, 'NA': 14, 'I': 15, 'angle': 120.0, 'blen': 1.09, 'charge': 0.158, 'type': 'HC'},
"HD":{'torsion': 180.0, 'tree': 'E', 'NC': 14, 'NB': 16, 'NA': 18, 'I': 19, 'angle': 120.0, 'blen': 1.09, 'charge': 0.153, 'type': 'HC'},
"atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'ND1', 'HD1', 'CE1', 'HE', 'NE2', 'HE2', 'CD2', 'HD', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"CD2":{'torsion': 0.0, 'tree': 'S', 'NC': 12, 'NB': 14, 'NA': 16, 'I': 18, 'angle': 110.0, 'blen': 1.36, 'charge': -0.037, 'type': 'CW'},
"HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'},
"H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'},
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'},
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 20, 'I': 21, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CG":{'torsion': 180.0, 'tree': 'S', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 115.0, 'blen': 1.51, 'charge': 0.058, 'type': 'CC'},
"CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'},
"CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.098, 'type': 'CT'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 20, 'I': 22, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"loopList":[['CG', 'CD2']],
"CUT":['0.00000'],
"C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 20, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'},
},
"VAL": { "HG22":{'torsion': 180.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 14, 'I': 16, 'angle': 109.5, 'blen': 1.09, 'charge': 0.031, 'type': 'HC'},
"HG23":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 14, 'I': 17, 'angle': 109.5, 'blen': 1.09, 'charge': 0.031, 'type': 'HC'},
"HG21":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 14, 'I': 15, 'angle': 109.5, 'blen': 1.09, 'charge': 0.031, 'type': 'HC'},
"impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']],
"HG13":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 10, 'I': 13, 'angle': 109.5, 'blen': 1.09, 'charge': 0.031, 'type': 'HC'},
"HG12":{'torsion': 180.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 10, 'I': 12, 'angle': 109.5, 'blen': 1.09, 'charge': 0.031, 'type': 'HC'},
"HG11":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 10, 'I': 11, 'angle': 109.5, 'blen': 1.09, 'charge': 0.031, 'type': 'HC'},
"INTX,KFORM":['INT', '1'],
"CG2":{'torsion': 180.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 14, 'angle': 109.47, 'blen': 1.525, 'charge': -0.091, 'type': 'CT'},
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"CG1":{'torsion': 60.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.47, 'blen': 1.525, 'charge': -0.091, 'type': 'CT'},
"NAMRES":'VALINE COO- ANION',
"atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB', 'CG1', 'HG11', 'HG12', 'HG13', 'CG2', 'HG21', 'HG22', 'HG23', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"HB":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.024, 'type': 'HC'},
"HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'},
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'},
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 18, 'I': 19, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'},
"CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'},
"CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.012, 'type': 'CT'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 18, 'I': 20, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CUT":['0.00000'],
"C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 18, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'},
},
"ILE": { "HG22":{'torsion': 180.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 10, 'I': 12, 'angle': 109.5, 'blen': 1.09, 'charge': 0.029, 'type': 'HC'},
"HG23":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 10, 'I': 13, 'angle': 109.5, 'blen': 1.09, 'charge': 0.029, 'type': 'HC'},
"HG21":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 10, 'I': 11, 'angle': 109.5, 'blen': 1.09, 'charge': 0.029, 'type': 'HC'},
"HD13":{'torsion': 300.0, 'tree': 'E', 'NC': 8, 'NB': 14, 'NA': 17, 'I': 20, 'angle': 109.5, 'blen': 1.09, 'charge': 0.028, 'type': 'HC'},
"HG13":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 14, 'I': 16, 'angle': 109.5, 'blen': 1.09, 'charge': 0.027, 'type': 'HC'},
"HG12":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 14, 'I': 15, 'angle': 109.5, 'blen': 1.09, 'charge': 0.027, 'type': 'HC'},
"INTX,KFORM":['INT', '1'],
"CG2":{'torsion': 60.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.47, 'blen': 1.525, 'charge': -0.085, 'type': 'CT'},
"IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'],
"CG1":{'torsion': 180.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 14, 'angle': 109.47, 'blen': 1.525, 'charge': -0.049, 'type': 'CT'},
"NAMRES":'ISOLEUCINE COO- ANION',
"atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB', 'CG2', 'HG21', 'HG22', 'HG23', 'CG1', 'HG12', 'HG13', 'CD1', 'HD11', 'HD12', 'HD13', 'C', 'O', 'OXT'],
"DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']],
"HD11":{'torsion': 60.0, 'tree': 'E', 'NC': 8, 'NB': 14, 'NA': 17, 'I': 18, 'angle': 109.5, 'blen': 1.09, 'charge': 0.028, 'type': 'HC'},
"HD12":{'torsion': 180.0, 'tree': 'E', 'NC': 8, 'NB': 14, 'NA': 17, 'I': 19, 'angle': 109.5, 'blen': 1.09, 'charge': 0.028, 'type': 'HC'},
"HB":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.022, 'type': 'HC'},
"CD1":{'torsion': 180.0, 'tree': '3', 'NC': 6, 'NB': 8, 'NA': 14, 'I': 17, 'angle': 109.47, 'blen': 1.525, 'charge': -0.085, 'type': 'CT'},
"HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'},
"N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'},
"O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 21, 'I': 22, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'},
"CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'},
"CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 109.47, 'blen': 1.525, 'charge': -0.012, 'type': 'CT'},
"OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 21, 'I': 23, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'},
"CUT":['0.00000'],
"C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 21, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'},
"impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']],
},
"filename":'allct.in',
} |
def kelime_sayisi(string):
counter = 1
for i in range(0,len(string)):
if string[i] == ' ':
counter += 1
return counter
cumle = input("Cumlenizi giriniz : ")
print("Cumlenizdeki kelime sayisi = {}".format(kelime_sayisi(cumle))) |
class Solution:
def paintHouse(self, cost:list, houses:int, colors:int)->int:
if houses == 0: # no houses to paint
return 0
if colors == 0: # no colors to paint houses
return 0
dp = [[0]*colors for _ in range(houses)]
dp[0] = cost[0]
for i in range(1, houses):
MINCOST = 1000000007
for j in range(colors):
for k in range(colors):
if j != k:
MINCOST = min(MINCOST, dp[i-1][k])
dp[i][j] = cost[i][j] + MINCOST
return min(dp[n-1])
if __name__ == "__main__":
cost = [[1, 5, 7, 2, 1, 4],
[5, 8, 4, 3, 6, 1],
[3, 2, 9, 7, 2, 3],
[1, 2, 4, 9, 1, 7]]
n, k = len(cost), len(cost[0])
print(Solution().paintHouse(cost, n, k)) |
'''
Created on Dec 21, 2014
@author: Ben
'''
def create_new_default(directory: str, dest: dict, param: dict):
'''
Creates new default parameter file based on parameter settings
'''
with open(directory, 'w') as new_default:
new_default.write(
'''TARGET DESTINATION = {}
SAVE DESTINATION = {}
SAVE DESTINATION2 = {}
SAVE STARTUP DEST1 = {}
SAVE STARTUP DEST2 = {}
SAVE TYPE DEST1 = {}
SAVE TYPE DEST2 = {}
'''.format(dest['target'], dest['save'], dest['save2'],
param["dest1_save_on_start"], param["dest2_save_on_start"],
param["save_dest1"], param["save_dest2"])
)
|
class Solution(object):
def intToRoman(self, num):
"""
数字到罗马数字的转换
:type num: int
:rtype: str
"""
dic = ["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]
nums = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]#两个数组,从高到低
res = ""
for st, n in zip(dic, nums):#zip函数同时调用两个数组
res += st * int(num / n)#计算num中含有多少个字母,从高到低
num %= n#取余降低一位后继续计算
return res |
"""Exceptions for Renault API."""
class RenaultException(Exception): # noqa: N818
"""Base exception for Renault API errors."""
pass
class NotAuthenticatedException(RenaultException): # noqa: N818
"""You are not authenticated, or authentication has expired."""
pass
|
def grayscale(image):
for row in range(image.shape[0]):
for col in range(image.shape[1]):
avg = sum(image[row][col][i] for i in range(3)) // 3
image[row][col] = [avg for _ in range(3)]
|
def get_cross_sum(n):
start = 1
total = 1
for i in range(1, n):
step = i * 2
start = start + step
total += start * 4 + step * 6
start = start + step * 3
return total
print(get_cross_sum(501)) |
# -*- coding: utf-8 -*-
"""
Created on Sat Oct 10 15:31:57 2020
@author: Tarun Jaiswal
"""
dictone = {
"bookname": "Recursion Sutras",
"subject": "Recursion",
"author": "Champak Roy"
}
dicttwo = dict(dictone)
print(dicttwo) |
class Analyser:
def __init__(self, callbacks, notifiers, state):
self.cbs = callbacks
self.state = state
self.notifiers = notifiers
def on_begin_analyse(self, timestamp):
pass
def on_end_analyse(self, timestamp):
pass
def analyse(self, event):
event_name = event.name
# for 'perf' tool
split_event_name = event.name.split(':')
if len(split_event_name) > 1:
event_name = split_event_name[1].strip()
if event_name in self.cbs:
self.cbs[event_name](event)
elif (event_name.startswith('sys_enter') or \
event_name.startswith('syscall_entry_')) and \
'syscall_entry' in self.cbs:
self.cbs['syscall_entry'](event)
elif (event_name.startswith('sys_exit') or \
event_name.startswith('syscall_exit_')) and \
'syscall_exit' in self.cbs:
self.cbs['syscall_exit'](event)
def notify(self, notification_id, **kwargs):
if notification_id in self.notifiers:
self.notifiers[notification_id](**kwargs)
|
def retorno():
resp=input('Deseja executar o programa novamente?[s/n] ')
if(resp=='S' or resp=='s'):
verificar()
else:
print('Processo finalizado com sucesso!')
pass
def cabecalho(titulo):
print('-'*30)
print(' '*9+titulo+' '*15)
print('-'*30)
pass
def mensagem_erro():
print('Dados inseridos são invalidos!')
pass
def verificar():
try:
cabecalho('Progressão PA')
num=int(input('Digite o primeiro termo: '))
numPA=int(input('Digite sua razão PA: '))
except:
mensagem_erro()
retorno()
else:
cont=1
loop=1
rept=1
contagem=0
while loop!=0:
if(rept==1):
while cont<=10:
if(cont>=10):
print('{} -> PAUSA\n'.format(num),end='')
else:
print('{} -> '.format(num),end='')
cont+=1
num+=numPA
contagem+=1
rept+=1
loop=int(input('Quantos termos deseja mostrar a mais? '))
if(loop<=0):
print('Progressão finalizada com {} termos mostrados'.format(contagem))
break
else:
cont=1
while cont<=loop:
if(cont>=loop):
print('{} -> PAUSA\n'.format(num),end='')
else:
print('{} -> '.format(num),end='')
cont+=1
num+=numPA
contagem+=1
rept+=1
loop=int(input('Quantos termos deseja mostrar a mais? '))
if(loop<=0):
print('Progressão finalizada com {} termos mostrados'.format(contagem))
break
retorno()
pass
verificar() |
GOV_AIRPORTS = {
"Antananarivo/Ivato": "big",
"Antsiranana/Diego": "small",
"Fianarantsoa": "small",
"Tolagnaro/Ft. Dauphin": "small",
"Mahajanga": "medium",
"Mananjary": "small",
"Nosy Be": "medium",
"Morondava": "small",
"Sainte Marie": "small",
"Sambava": "small",
"Toamasina": "small",
"Toliary": "small",
}
|
def fibonacci(n):
fibonacci = np.zeros(10, dtype=np.int32)
fibonacci_pow = np.zeros(10, dtype=np.int32)
fibonacci[0] = 0
fibonacci[1] = 1
for i in np.arange(2, 10):
fibonacci[i] = fibonacci[i - 1] + fibonacci[i - 2]
fibonacci[i] = int(fibonacci[i])
print(fibonacci)
for i in np.arange(10):
fibonacci_pow[i] = np.power(int(fibonacci[i]), int(n))
print(fibonacci_pow)
print(np.vstack((fibonacci, fibonacci_pow)))
np.savetxt("myfibonaccis.txt", np.hstack((fibonacci, fibonacci_pow)), fmt="%u")
def main(n):
fibonacci(n)
if __name__ == "__main__":
INPUT = sys.argv[1]
print(INPUT)
main(INPUT) |
# Copyright (c) 2020 NVIDIA Corporation
# 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.
"""Convert a .mesh file (fTetWild format) to .tet (IsaacGym format)."""
def convert_mesh_to_tet(mesh_file_path, tet_output_path):
"""Convert a .mesh file to a .tet file."""
mesh_file = open(mesh_file_path, "r")
tet_output = open(tet_output_path, "w")
mesh_lines = list(mesh_file)
mesh_lines = [line.strip('\n') for line in mesh_lines]
vertices_start = mesh_lines.index('Vertices')
num_vertices = mesh_lines[vertices_start + 1]
vertices = mesh_lines[vertices_start + 2:vertices_start + 2
+ int(num_vertices)]
tetrahedra_start = mesh_lines.index('Tetrahedra')
num_tetrahedra = mesh_lines[tetrahedra_start + 1]
tetrahedra = mesh_lines[tetrahedra_start + 2:tetrahedra_start + 2
+ int(num_tetrahedra)]
print("# Vertices, # Tetrahedra:", num_vertices, num_tetrahedra)
# Write to tet output
tet_output.write("# Tetrahedral mesh generated using\n\n")
tet_output.write("# " + num_vertices + " vertices\n")
for v in vertices:
tet_output.write("v " + v + "\n")
tet_output.write("\n")
tet_output.write("# " + num_tetrahedra + " tetrahedra\n")
for t in tetrahedra:
line = t.split(' 0')[0]
line = line.split(" ")
line = [str(int(k) - 1) for k in line]
l_text = ' '.join(line)
tet_output.write("t " + l_text + "\n")
if __name__ == "__main__":
convert_mesh_to_tet(
"path/to/mesh",
"path/to/tet")
|
def split_in_three(data_real, data_fake):
min_v = min(data_fake.min(), data_real.min())
max_v = max(data_fake.max(), data_real.max())
tercio = (max_v - min_v) / 3
# Calculate 1/3
th_one = min_v + tercio
# Calculate 2/3
th_two = max_v - tercio
first_f, second_f, third_f = split_data(th_one, th_two, data_fake)
first_r, second_r, third_r = split_data(th_one, th_two, data_real)
total_f = len(data_fake)
fake = [first_f/total_f, second_f/total_f, third_f/total_f]
total_r = len(data_real)
real = [first_r/total_r, second_r/total_r, third_r/total_r]
return fake, real
def split_data(th_one, th_two, data):
first = 0
second = 0
third = 0
for i in data:
if i <= th_one:
third += 1
elif i >= th_two:
first += 1
else:
second +=1
return first, second, third |
class Solution(object):
def missingNumber(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
nums_set = set(nums)
full_length = len(nums) + 1
for num in range(full_length):
if num not in nums_set:
return num |
# O Departamento Estadual de Meteorologia lhe contratou para desenvolver um programa que leia as um conjunto indeterminado de temperaturas, e informe ao final a menor e a maior temperaturas informadas, bem como a média das temperaturas.
temperaturas = []
while True:
graus = float(input("Digite a temperatura em graus (tecle 0 para parar): "))
temperaturas.append(graus)
media = sum(temperaturas) / len(temperaturas)
if graus == 0:
temperaturas.pop()
print("A maior temperatura registrada: {}°C".format(max(temperaturas)))
print("A menor temperatura registrada: {}°C".format(min(temperaturas)))
print("A temperatura média registrada: {}°C".format(media))
break |
"""Below Python Programme demonstrate rpartition
functions in a string"""
string = "Python is fun"
# 'is' separator is found
print(string.rpartition('is '))
# 'not' separator is not found
print(string.rpartition('not '))
string = "Python is fun, isn't it"
# splits at last occurence of 'is'
print(string.rpartition('is'))
|
data = (
'Mie ', # 0x00
'Xu ', # 0x01
'Mang ', # 0x02
'Chi ', # 0x03
'Ge ', # 0x04
'Xuan ', # 0x05
'Yao ', # 0x06
'Zi ', # 0x07
'He ', # 0x08
'Ji ', # 0x09
'Diao ', # 0x0a
'Cun ', # 0x0b
'Tong ', # 0x0c
'Ming ', # 0x0d
'Hou ', # 0x0e
'Li ', # 0x0f
'Tu ', # 0x10
'Xiang ', # 0x11
'Zha ', # 0x12
'Xia ', # 0x13
'Ye ', # 0x14
'Lu ', # 0x15
'A ', # 0x16
'Ma ', # 0x17
'Ou ', # 0x18
'Xue ', # 0x19
'Yi ', # 0x1a
'Jun ', # 0x1b
'Chou ', # 0x1c
'Lin ', # 0x1d
'Tun ', # 0x1e
'Yin ', # 0x1f
'Fei ', # 0x20
'Bi ', # 0x21
'Qin ', # 0x22
'Qin ', # 0x23
'Jie ', # 0x24
'Bu ', # 0x25
'Fou ', # 0x26
'Ba ', # 0x27
'Dun ', # 0x28
'Fen ', # 0x29
'E ', # 0x2a
'Han ', # 0x2b
'Ting ', # 0x2c
'Hang ', # 0x2d
'Shun ', # 0x2e
'Qi ', # 0x2f
'Hong ', # 0x30
'Zhi ', # 0x31
'Shen ', # 0x32
'Wu ', # 0x33
'Wu ', # 0x34
'Chao ', # 0x35
'Ne ', # 0x36
'Xue ', # 0x37
'Xi ', # 0x38
'Chui ', # 0x39
'Dou ', # 0x3a
'Wen ', # 0x3b
'Hou ', # 0x3c
'Ou ', # 0x3d
'Wu ', # 0x3e
'Gao ', # 0x3f
'Ya ', # 0x40
'Jun ', # 0x41
'Lu ', # 0x42
'E ', # 0x43
'Ge ', # 0x44
'Mei ', # 0x45
'Ai ', # 0x46
'Qi ', # 0x47
'Cheng ', # 0x48
'Wu ', # 0x49
'Gao ', # 0x4a
'Fu ', # 0x4b
'Jiao ', # 0x4c
'Hong ', # 0x4d
'Chi ', # 0x4e
'Sheng ', # 0x4f
'Ne ', # 0x50
'Tun ', # 0x51
'Fu ', # 0x52
'Yi ', # 0x53
'Dai ', # 0x54
'Ou ', # 0x55
'Li ', # 0x56
'Bai ', # 0x57
'Yuan ', # 0x58
'Kuai ', # 0x59
'[?] ', # 0x5a
'Qiang ', # 0x5b
'Wu ', # 0x5c
'E ', # 0x5d
'Shi ', # 0x5e
'Quan ', # 0x5f
'Pen ', # 0x60
'Wen ', # 0x61
'Ni ', # 0x62
'M ', # 0x63
'Ling ', # 0x64
'Ran ', # 0x65
'You ', # 0x66
'Di ', # 0x67
'Zhou ', # 0x68
'Shi ', # 0x69
'Zhou ', # 0x6a
'Tie ', # 0x6b
'Xi ', # 0x6c
'Yi ', # 0x6d
'Qi ', # 0x6e
'Ping ', # 0x6f
'Zi ', # 0x70
'Gu ', # 0x71
'Zi ', # 0x72
'Wei ', # 0x73
'Xu ', # 0x74
'He ', # 0x75
'Nao ', # 0x76
'Xia ', # 0x77
'Pei ', # 0x78
'Yi ', # 0x79
'Xiao ', # 0x7a
'Shen ', # 0x7b
'Hu ', # 0x7c
'Ming ', # 0x7d
'Da ', # 0x7e
'Qu ', # 0x7f
'Ju ', # 0x80
'Gem ', # 0x81
'Za ', # 0x82
'Tuo ', # 0x83
'Duo ', # 0x84
'Pou ', # 0x85
'Pao ', # 0x86
'Bi ', # 0x87
'Fu ', # 0x88
'Yang ', # 0x89
'He ', # 0x8a
'Zha ', # 0x8b
'He ', # 0x8c
'Hai ', # 0x8d
'Jiu ', # 0x8e
'Yong ', # 0x8f
'Fu ', # 0x90
'Que ', # 0x91
'Zhou ', # 0x92
'Wa ', # 0x93
'Ka ', # 0x94
'Gu ', # 0x95
'Ka ', # 0x96
'Zuo ', # 0x97
'Bu ', # 0x98
'Long ', # 0x99
'Dong ', # 0x9a
'Ning ', # 0x9b
'Tha ', # 0x9c
'Si ', # 0x9d
'Xian ', # 0x9e
'Huo ', # 0x9f
'Qi ', # 0xa0
'Er ', # 0xa1
'E ', # 0xa2
'Guang ', # 0xa3
'Zha ', # 0xa4
'Xi ', # 0xa5
'Yi ', # 0xa6
'Lie ', # 0xa7
'Zi ', # 0xa8
'Mie ', # 0xa9
'Mi ', # 0xaa
'Zhi ', # 0xab
'Yao ', # 0xac
'Ji ', # 0xad
'Zhou ', # 0xae
'Ge ', # 0xaf
'Shuai ', # 0xb0
'Zan ', # 0xb1
'Xiao ', # 0xb2
'Ke ', # 0xb3
'Hui ', # 0xb4
'Kua ', # 0xb5
'Huai ', # 0xb6
'Tao ', # 0xb7
'Xian ', # 0xb8
'E ', # 0xb9
'Xuan ', # 0xba
'Xiu ', # 0xbb
'Wai ', # 0xbc
'Yan ', # 0xbd
'Lao ', # 0xbe
'Yi ', # 0xbf
'Ai ', # 0xc0
'Pin ', # 0xc1
'Shen ', # 0xc2
'Tong ', # 0xc3
'Hong ', # 0xc4
'Xiong ', # 0xc5
'Chi ', # 0xc6
'Wa ', # 0xc7
'Ha ', # 0xc8
'Zai ', # 0xc9
'Yu ', # 0xca
'Di ', # 0xcb
'Pai ', # 0xcc
'Xiang ', # 0xcd
'Ai ', # 0xce
'Hen ', # 0xcf
'Kuang ', # 0xd0
'Ya ', # 0xd1
'Da ', # 0xd2
'Xiao ', # 0xd3
'Bi ', # 0xd4
'Yue ', # 0xd5
'[?] ', # 0xd6
'Hua ', # 0xd7
'Sasou ', # 0xd8
'Kuai ', # 0xd9
'Duo ', # 0xda
'[?] ', # 0xdb
'Ji ', # 0xdc
'Nong ', # 0xdd
'Mou ', # 0xde
'Yo ', # 0xdf
'Hao ', # 0xe0
'Yuan ', # 0xe1
'Long ', # 0xe2
'Pou ', # 0xe3
'Mang ', # 0xe4
'Ge ', # 0xe5
'E ', # 0xe6
'Chi ', # 0xe7
'Shao ', # 0xe8
'Li ', # 0xe9
'Na ', # 0xea
'Zu ', # 0xeb
'He ', # 0xec
'Ku ', # 0xed
'Xiao ', # 0xee
'Xian ', # 0xef
'Lao ', # 0xf0
'Bo ', # 0xf1
'Zhe ', # 0xf2
'Zha ', # 0xf3
'Liang ', # 0xf4
'Ba ', # 0xf5
'Mie ', # 0xf6
'Le ', # 0xf7
'Sui ', # 0xf8
'Fou ', # 0xf9
'Bu ', # 0xfa
'Han ', # 0xfb
'Heng ', # 0xfc
'Geng ', # 0xfd
'Shuo ', # 0xfe
'Ge ', # 0xff
)
|
divisor = int(input())
bound = int(input())
for num in range(bound, 0, -1):
if num % divisor == 0:
print(num)
break
|
cities = [
'Budapest',
'Debrecen',
'Miskolc',
'Szeged',
'Pecs',
'Zuglo',
'Gyor',
'Nyiregyhaza',
'Kecskemet',
'Szekesfehervar',
'Szombathely',
'Jozsefvaros',
'Paradsasvar',
'Szolnok',
'Tatabanya',
'Kaposvar',
'Bekescsaba',
'Erd',
'Veszprem',
'Erzsebetvaros',
'Zalaegerszeg',
'Kispest',
'Sopron',
'Eger',
'Nagykanizsa',
'Dunaujvaros',
'Hodmezovasarhely',
'Salgotarjan',
'Cegled',
'Ozd',
'Baja',
'Vac',
'Szekszard',
'Papa',
'Gyongyos',
'Kazincbarcika',
'Godollo',
'Gyula',
'Hajduboszormeny',
'Kiskunfelegyhaza',
'Ajka',
'Oroshaza',
'Mosonmagyarovar',
'Dunakeszi',
'Kiskunhalas',
'Esztergom',
'Jaszbereny',
'Komlo',
'Nagykoros',
'Mako',
'Budaors',
'Szigetszentmiklos',
'Tata',
'Szentendre',
'Hajduszoboszlo',
'Siofok',
'Torokszentmiklos',
'Hatvan',
'Karcag',
'Gyal',
'Monor',
'Keszthely',
'Varpalota',
'Bekes',
'Dombovar',
'Paks',
'Oroszlany',
'Komarom',
'Vecses',
'Mezotur',
'Mateszalka',
'Mohacs',
'Csongrad',
'Kalocsa',
'Kisvarda',
'Szarvas',
'Satoraljaujhely',
'Hajdunanas',
'Balmazujvaros',
'Mezokovesd',
'Tapolca',
'Szazhalombatta',
'Balassagyarmat',
'Tiszaujvaros',
'Dunaharaszti',
'Fot',
'Dabas',
'Abony',
'Berettyoujfalu',
'Puspokladany',
'God',
'Sarvar',
'Gyomaendrod',
'Kiskoros',
'Pomaz',
'Mor',
'Sarospatak',
'Batonyterenye',
'Bonyhad',
'Gyomro',
'Tiszavasvari',
'Ujfeherto',
'Nyirbator',
'Sarbogard',
'Nagykata',
'Budakeszi',
'Pecel',
'Pilisvorosvar',
'Sajoszentpeter',
'Szigethalom',
'Balatonfured',
'Hajduhadhaz',
'Kisujszallas',
'Dorog',
'Kormend',
'Marcali',
'Barcs',
'Tolna',
'Tiszafured',
'Kiskunmajsa',
'Tiszafoldvar',
'Albertirsa',
'Nagyatad',
'Tiszakecske',
'Toeroekbalint',
'Koszeg',
'Celldomolk',
'Heves',
'Mezobereny',
'Szigetvar',
'Pilis',
'Veresegyhaz',
'Bicske',
'Edeleny',
'Lajosmizse',
'Kistarcsa',
'Hajdusamson',
'Csorna',
'Nagykallo',
'Isaszeg',
'Sarkad',
'Kapuvar',
'Ullo',
'Siklos',
'Toekoel',
'Maglod',
'Paszto',
'Szerencs',
'Turkeve',
'Szeghalom',
'Kerepes',
'Jaszapati',
'Janoshalma',
'Tamasi',
'Kunszentmarton',
'Hajdudorog',
'Vasarosnameny',
'Solymar',
'Rackeve',
'Derecske',
'Kecel',
'Nadudvar',
'Ocsa',
'Dunafoldvar',
'Fehergyarmat',
'Kiskunlachaza',
'Kunszentmiklos',
'Szentgotthard',
'Devavanya',
'Biatorbagy',
'Kunhegyes',
'Lenti',
'Ercsi',
'Balatonalmadi',
'Polgar',
'Tura',
'Suelysap',
'Fuzesabony',
'Jaszarokszallas',
'Gardony',
'Tarnok',
'Nyiradony',
'Zalaszentgrot',
'Sandorfalva',
'Soltvadkert',
'Nyergesujfalu',
'Bacsalmas',
'Csomor',
'Putnok',
'Veszto',
'Kistelek',
'Zirc',
'Halasztelek',
'Mindszent',
'Acs',
'Enying',
'Letavertes',
'Nyirtelek',
'Szentlorinc',
'Felsozsolca',
'Solt',
'Fegyvernek',
'Nagyecsed',
'Encs',
'Ibrany',
'Mezokovacshaza',
'Ujszasz',
'Bataszek',
'Balkany',
'Sumeg',
'Tapioszecso',
'Szabadszallas',
'Battonya',
'Polgardi',
'Mezocsat',
'Totkomlos',
'Piliscsaba',
'Szecseny',
'Fuzesgyarmat',
'Kaba',
'Pusztaszabolcs',
'Teglas',
'Mezohegyes',
'Jaszladany',
'Tapioszele',
'Aszod',
'Diosd',
'Taksony',
'Tiszalok',
'Izsak',
'Komadi',
'Lorinci',
'Alsozsolca',
'Kartal',
'Dunavarsany',
'Erdokertes',
'Janossomorja',
'Kerekegyhaza',
'Balatonboglar',
'Szikszo',
'Domsod',
'Nagyhalasz',
'Kisber',
'Kunmadaras',
'Berhida',
'Kondoros',
'Melykut',
'Jaszkiser',
'Csurgo',
'Csorvas',
'Nagyszenas',
'Ujkigyos',
'Tapioszentmarton',
'Tat',
'Egyek',
'Tiszaluc',
'Orbottyan',
'Rakoczifalva',
'Hosszupalyi',
'Paty',
'Elek',
'Vamospercs',
'Morahalom',
'Bugyi',
'Emod',
'Labatlan',
'Csakvar',
'Algyo',
'Kenderes',
'Csenger',
'Fonyod',
'Rakamaz',
'Martonvasar',
'Devecser',
'Orkeny',
'Tokaj',
'Tiszaalpar',
'Kemecse',
'Korosladany'
]
|
def read_file(test = True):
if test:
filename = '../tests/day1.txt'
else:
filename = '../input/day1.txt'
with open(filename) as file:
temp = list()
for line in file:
temp.append(line.strip())
return temp
def puzzle1():
temp = read_file(False)[0]
floor = 0
for char in temp:
if char == '(':
floor += 1
elif char == ')':
floor -= 1
else:
raise ValueError
print(floor)
def puzzle2():
temp = read_file(False)[0]
floor = 0
for i, char in enumerate(temp, start = 1):
if char == '(':
floor += 1
elif char == ')':
floor -= 1
else:
raise ValueError
if floor == -1:
break
print(i)
puzzle1()
puzzle2() |
"""
The key is to use a set to remember if we seen the node or not.
Next, think about how we are going to *remove* the duplicate node?
The answer is to simply link the previous node to the next node.
So we need to keep a pointer `prev` on the previous node as we iterate the linked list.
So, the solution.
Create a set `seen`. #[1]
Point pointer `prev` on the first node. `cuur` on the second.
Now we iterate trough the linked list.
* For every node, we add its value to `seen`. Move `prev` and `curr` forward. #[2]
* If we seen the node, we *remove* the `curr` node. Then move the curr forward. #[3]
Return the `head`
"""
class Solution(object):
def deleteDuplicates(self, head):
if head is None or head.next is None: return head
prev = head
curr = head.next
seen = set() #[1]
seen.add(prev.val)
while curr:
if curr.val not in seen: #[2]
seen.add(curr.val)
curr = curr.next
prev = prev.next
else: #[3]
prev.next = curr.next #remove
curr = curr.next
return head
|
def firstDuplicate(a):
number_frequencies, number_indices, duplicate_index = {}, {}, {}
# Iterate through list and increment frequency count
# if number not in dict. Also, note the index asscoiated
# with the value
for i in range(len(a)):
if a[i] not in number_frequencies:
number_frequencies[a[i]] = 1
number_indices[a[i]] = i
elif a[i] in number_frequencies:
if number_frequencies[a[i]] < 2:
number_frequencies[a[i]] += 1
number_indices[a[i]] = i
for number in number_frequencies:
if number_frequencies[number] == 2:
duplicate_index[number] = number_indices[number]
if not duplicate_index:
return -1
else:
minimal_index_key = min(duplicate_index, key=duplicate_index.get)
return minimal_index_key
|
"""
CONFIGURATION FILE
This is being developed for the MF2C Project: http://www.mf2c-project.eu/
Copyright: Roi Sucasas Font, Atos Research and Innovation, 2017.
This code is licensed under an Apache 2.0 license. Please, refer to the LICENSE.TXT file for more information
Created on 18 oct. 2018
@author: Roi Sucasas - ATOS
"""
#!/usr/bin/python
dic = { "VERSION": "1.3.10",
# USER MANAGEMENT MODULE MODE: "DEFAULT", "MF2C" , "STANDALONE"
"UM_MODE": "MF2C",
# CIMI
"CIMI_URL": "http://cimi:8201/api",
"DEVICE_USER": "rsucasas",
# SERVER - REST API
"SERVER_PORT": 46300,
"HOST_IP": "localhost",
"API_DOC_URL": "/api/v2/um",
# working dir: "C://TMP/tmp/mf2c/um/" "/tmp/mf2c/um/"
"UM_WORKING_DIR_VOLUME": "/tmp/mf2c/um/",
# db
"DB_SHARING_MODEL": "dbt1",
"DB_USER_PROFILE": "dbt2",
# VERIFY_SSL controls whether we verify the server's TLS certificate or not
"VERIFY_SSL": False,
# for testing the interaction with the lifecycle management
"ENABLE_ASSESSMENT": True,
# CIMI RESOURCES managed by this component
"CIMI_PROFILES": "user-profile",
"CIMI_SHARING_MODELS": "sharing-model",
"SERVICE_CONSUMER": True,
"RESOURCE_CONTRIBUTOR": True,
"MAX_APPS": 2,
"BATTERY_LIMIT": 50,
"GPS_ALLOWED": True,
"MAX_CPU_USAGE": 50,
"MAX_MEM_USAGE": 50,
"MAX_STO_USAGE": 50,
"MAX_BANDWITH_USAGE": 50,
# URLs / ports from other components:
# LIFECYCLE
"URL_PM_LIFECYCLE": "http://lifecycle:46000/api/v2/lm"
}
# APPS RUNNING
APPS_RUNNING = 0 |
#
# PySNMP MIB module IANA-MALLOC-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/IANA-MALLOC-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:50:25 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")
ValueRangeConstraint, ConstraintsIntersection, SingleValueConstraint, ConstraintsUnion, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsIntersection", "SingleValueConstraint", "ConstraintsUnion", "ValueSizeConstraint")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
Integer32, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, NotificationType, TimeTicks, mib_2, ObjectIdentity, Bits, Counter64, Gauge32, Unsigned32, ModuleIdentity, Counter32, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "NotificationType", "TimeTicks", "mib-2", "ObjectIdentity", "Bits", "Counter64", "Gauge32", "Unsigned32", "ModuleIdentity", "Counter32", "IpAddress")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
ianaMallocMIB = ModuleIdentity((1, 3, 6, 1, 2, 1, 102))
ianaMallocMIB.setRevisions(('2014-05-22 00:00', '2003-01-27 12:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: ianaMallocMIB.setRevisionsDescriptions(('Updated contact info.', 'Initial version.',))
if mibBuilder.loadTexts: ianaMallocMIB.setLastUpdated('201405220000Z')
if mibBuilder.loadTexts: ianaMallocMIB.setOrganization('IANA')
if mibBuilder.loadTexts: ianaMallocMIB.setContactInfo(' Internet Assigned Numbers Authority Internet Corporation for Assigned Names and Numbers 12025 Waterfront Drive, Suite 300 Los Angeles, CA 90094-2536 Phone: +1 310-301-5800 EMail: iana&iana.org')
if mibBuilder.loadTexts: ianaMallocMIB.setDescription('This MIB module defines the IANAscopeSource and IANAmallocRangeSource textual conventions for use in MIBs which need to identify ways of learning multicast scope and range information. Any additions or changes to the contents of this MIB module require either publication of an RFC, or Designated Expert Review as defined in the Guidelines for Writing IANA Considerations Section document. The Designated Expert will be selected by the IESG Area Director(s) of the Transport Area.')
class IANAscopeSource(TextualConvention, Integer32):
description = 'The source of multicast scope information.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))
namedValues = NamedValues(("other", 1), ("manual", 2), ("local", 3), ("mzap", 4), ("madcap", 5))
class IANAmallocRangeSource(TextualConvention, Integer32):
description = 'The source of multicast address allocation range information.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("other", 1), ("manual", 2), ("local", 3))
mibBuilder.exportSymbols("IANA-MALLOC-MIB", IANAmallocRangeSource=IANAmallocRangeSource, IANAscopeSource=IANAscopeSource, ianaMallocMIB=ianaMallocMIB, PYSNMP_MODULE_ID=ianaMallocMIB)
|
"""
1208. Get Equal Substrings Within Budget
Straight forward. Asked the max len, so count the max each time.
"""
class Solution:
def equalSubstring(self, s: str, t: str, maxCost: int) -> int:
cost = 0
window_start = 0
result = 0
for window_end in range(len(s)):
cost += abs(ord(s[window_end]) - ord(t[window_end]))
if cost > maxCost:
cost -= abs(ord(s[window_start]) - ord(t[window_start]))
window_start += 1
result = max(result, window_end - window_start+1)
return result |
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
""" OpenERP core exceptions.
This module defines a few exception types. Those types are understood by the
RPC layer. Any other exception type bubbling until the RPC layer will be
treated as a 'Server error'.
"""
class Warning(Exception):
pass
class AccessDenied(Exception):
""" Login/password error. No message, no traceback. """
def __init__(self):
super(AccessDenied, self).__init__('Access denied.')
self.traceback = ('', '', '')
class AccessError(Exception):
""" Access rights error. """
class DeferredException(Exception):
""" Exception object holding a traceback for asynchronous reporting.
Some RPC calls (database creation and report generation) happen with
an initial request followed by multiple, polling requests. This class
is used to store the possible exception occuring in the thread serving
the first request, and is then sent to a polling request.
('Traceback' is misleading, this is really a exc_info() triple.)
"""
def __init__(self, msg, tb):
self.message = msg
self.traceback = tb
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
class File:
@staticmethod
def tail(self, file_path, lines=10):
with open(file_path, 'rb') as f:
total_lines_wanted = lines
block_size = 1024
f.seek(0, 2)
block_end_byte = f.tell()
lines_to_go = total_lines_wanted
block_number = -1
blocks = []
while lines_to_go > 0 and block_end_byte > 0:
if block_end_byte - block_size > 0:
f.seek(block_number * block_size, 2)
block = f.read(block_size)
else:
f.seek(0, 0)
block = f.read(block_end_byte)
lines_found = block.count(b'\n')
lines_to_go -= lines_found
block_end_byte -= block_size
block_number -= 1
blocks.append(block)
all_read_text = b''.join(blocks)
lines_found = all_read_text.count(b'\n')
if lines_found > total_lines_wanted:
return all_read_text.split(b'\n')[-total_lines_wanted:][:-1]
else:
return all_read_text.split(b'\n')[-lines_found:] |
"""Reverse stack is using a list where the top is at the beginning instead of at the end."""
class Reverse_Stack:
def __init__(self):
self.items = []
def is_empty(self): # test to see whether the stack is empty.
return self.items == []
def push(self, item): # adds a new item to the base of the stack.
self.items.insert(0, item)
def pop(self): # removes the base item from the stack.
return self.items.pop(0)
def peek(self): # return the base item from the stack.
return self.items[0]
def size(self): # returns the number of items on the stack.
return len(self.items)
s = Reverse_Stack()
print(s.is_empty())
s.push(4)
s.push("Dog")
print(s.peek())
s.push("Cat")
print(s.size())
print(s.is_empty())
s.pop()
print(s.peek())
print(s.size())
|
class Solution:
def isStrobogrammatic(self, num: str) -> bool:
strobogrammatic = {
'1': '1',
'0': '0',
'6': '9',
'9': '6',
'8': '8'
}
for idx, digit in enumerate(num):
if digit not in strobogrammatic or strobogrammatic[digit] != num[len(num) - idx -1]:
return False
return True
|
class Solution(object):
def dfs(self,stones,graph,curpos,lastjump):
if curpos==stones[-1]:
return True
# since the jump need based on lastjump
# only forward,get rid of the stay at the same pos
rstart=max(curpos+lastjump-1,curpos+1)
rend=min(curpos+lastjump+1,stones[-1])+1
for nextpos in xrange(rstart,rend):
if nextpos in graph and self.dfs(stones,graph,nextpos,nextpos-curpos):
return True
return False
def canCross(self, stones):
"""
:type stones: List[int]
:rtype: bool
"""
if not stones:
return True
if stones[1]!=1:
return False
graph={val:idx for idx,val in enumerate(stones)}
return self.dfs(stones,graph,1,1)
|
def check_candidate(a, candidate, callback_when_different, *args, **kwargs):
control_result = None
candidate_result = None
control_exception = None
candidate_exception = None
reason = None
try:
control_result = a(*args, **kwargs)
except BaseException as e:
control_exception = e
try:
candidate_result = candidate(*args, **kwargs)
if control_exception is not None:
reason = 'old code raised, new did not'
elif control_result != candidate_result:
reason = 'different results'
except BaseException as e:
candidate_exception = e
if control_exception is None:
reason = 'new code raised, old did not'
else:
if type(control_exception) != type(candidate_exception):
reason = 'new and old both raised exception, but different types'
elif control_exception.args != candidate_exception.args:
reason = 'new and old both raised exception, but with different data'
if reason is not None:
callback_when_different(
control_result=control_result,
candidate_result=candidate_result,
control_exception=control_exception,
candidate_exception=candidate_exception,
reason=reason,
)
if control_exception is not None:
raise control_exception
return control_result
|
n = int(input()) % 8
if n == 0:
print(2)
elif n <= 5:
print(n)
else:
print(10 - n)
|
"""
A fixed-capacity queue implemented as circular queue.
Queue can become full.
* enqueue is O(1)
* dequeue is O(1)
"""
class Queue:
"""
Implementation of a Queue using a circular buffer.
"""
def __init__(self, size):
self.size = size
self.storage = [None] * size
self.first = 0
self.last = 0
self.N = 0
def is_empty(self):
"""
Determine if queue is empty.
"""
return self.N == 0
def is_full(self):
"""
Determine if queue is full.
"""
return self.N == self.size
def enqueue(self, item):
"""
Enqueue new item to end of queue.
"""
if self.is_full():
raise RuntimeError('Queue is full')
self.storage[self.last] = item
self.N += 1
self.last = (self.last + 1) % self.size
def dequeue(self):
"""
Remove and return first item from queue.
"""
if self.is_empty():
raise RuntimeError('Queue is empty')
val = self.storage[self.first]
self.N -= 1
self.first = (self.first + 1) % self.size
return val
|
def área(larg, comp):
a = larg * comp
print(f'A área de um terreno {larg}x{comp} é de {a}m²')
print('Controle de Terrenos')
print('--------------------')
l = float(input('Largura (m): '))
c = float(input('Comprimento (m): '))
área(l, c)
|
"""
A simple script for numbering nUp tickets for the print shop.
"""
def numbering_main() -> None:
"""
Gets numbering sequences for nUp ticket numbering.
Gets the total number of tickets requested along with now many will fit on a
sheet (n_up) as well as the starting ticket number and prints the ticket
number groupings to the console.
"""
print('[ Ticket Numbering Assist ]'.center(40))
# Get ticket, sheet and numbering info
total_requested = int(input('\n How many tickets do you need in total?: '))
n_up = int(input(' How many tickets will fit on a sheet?: '))
starting_number = int(input(' What number should we start with?: '))
# Do math & round up if needed
total_sheets = total_requested // n_up
final_tickets = total_requested
if total_requested % n_up > 0:
total_sheets += 1
final_tickets = total_sheets * n_up
# Print totals to the console
print('\n Final totals...')
print(f' Total tickets Printed: {final_tickets}')
print(f' Tickets per sheet: {n_up}')
print(f' Total Sheets needed: {total_sheets}\n')
print(' Here are your numbers...\n')
# Get ending ticket number and set initial display number
ending_number = starting_number + total_sheets - 1
display_number = 1
# Display to console
for i in range(n_up):
print(
f' #{display_number:2}: Starting Number - {starting_number:4} | Ending Number - {ending_number:4}')
starting_number = ending_number + 1
ending_number = starting_number + total_sheets - 1
display_number += 1
input('\n Press ENTER to return...')
if __name__ == '__main__':
numbering_main()
|
def arg_to_step(arg):
if isinstance(arg, str):
return {'run': arg}
else:
return dict(zip(['run', 'parameters', 'cache'], arg))
def steps(*args):
return [arg_to_step(arg) for arg in args]
|
#inputFile = 'sand.407'
inputFile = 'sand.407'
outputFile= 'sand.out'
def joinLine():
pass
with open(inputFile) as OF:
lines = OF.readlines()
print(lines[0:3])
|
class MergeSort:
def __init__(self, lst):
self.lst = lst
def mergeSort(self, a):
midPoint = len(a) // 2
if a[len(a) - 1] < a[0]:
left = self.mergeSort(a[:midPoint])
right = self.mergeSort(a[midPoint:])
return self.merge(left, right)
else:
return a
def merge(self, left, right):
output = list()
leftCount, rightCount = 0, 0
while leftCount < len(left) or rightCount < len(right):
if leftCount < len(left) and rightCount < len(right):
if left[leftCount] < right[rightCount]:
output.append(left[leftCount])
leftCount += 1
else:
output.append(right[rightCount])
rightCount += 1
if leftCount == len(left) and rightCount < right(right):
output.append(right[rightCount])
rightCount += 1
elif leftCount < len(left) and rightCount == len(right):
output.append(left[leftCount])
leftCount += 1
return output
def sort(self):
temp = self.mergeSort(self.lst)
self.lst = temp
def show(self):
return self.lst
if __name__ == "__main__":
i = MergeSort([5, 4, 3, 2, 1])
i.sort()
print(i.show())
|
'''
There are two sorted arrays nums1 and nums2 of size m and n respectively.
Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).
You may assume nums1 and nums2 cannot be both empty.
'''
### Nature: the meaning of MEDIAN, is that, the number of elements less than it,
### is equal to that is more than it.
### len(left) == len(right)
### It is NOT important that if these two parts are sorted.
## Time: O(log(min(m, n))), Space: O(1) --> we need fixed number of variables
# Iterative approach
# Central logics: there exists i, j where i+j = (m+n+1) // 2 AND
# A[i-1] (leftmax of A) < B[j] (rightmin of B) AND B[j-1] < A[i]
# (in general, all left <= all right)
def findMedianSortedArrays(nums1, nums2):
m, n = len(nums1), len(nums2)
# To ensure j will not be negative
if m > n:
m, n = n, m
nums1, nums2 = nums2, nums1
# (m+n+1) plus 1 makes sure i & j are the minimums of the right part, AND
# that j-1 (which is left max) will not be negative
imin, imax, half = 0, m, (m+n+1) / 2
while imin <= imax: # This will directly handle edge cases like len(A) == 0 etc
i = (imin+imax) / 2
j = half - i
# case one: i hasn't exceeded array 1 and is too small
if i < m and nums2[j-1] > nums1[i]:
imin = i+1
# case two: i-1 hasn't exceeded the smallest and i is too big
elif i > 0 and nums1[i-1] > nums2[j]:
imax = i-1
# case three: i is perfect
else:
# edge case 1:
# all nums in nums1 is bigger than nums2
if i == 0:
max_of_left = nums2[j-1] # j-1 >= 0 is ensured
# edge case 2:
# the opposite, AND m==n or m=n-1
elif j == 0:
max_of_left = nums1[m-1]
# general case:
else:
max_of_left = max(nums1[i-1], nums2[j-1])
if (m+n) % 2 == 1:
return max_of_left
# edge case: when A[i] would be out of index bound
if i == m:
min_of_right = nums2[j]
# edge case: when B[j] would be out of index bound
elif j == n:
min_of_right = nums1[i]
else:
min_of_right = min(nums1[i], nums2[j])
return (max_of_left + min_of_right) / 2.0
|
# Copyright 2019 The SQLNet Company GmbH
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
"""
This module contains the loss functions for the getml library.
"""
# ------------------------------------------------------------------------------
class _LossFunction(object):
"""
Base class. Should not ever be directly initialized!
"""
def __init__(self):
self.thisptr = dict()
self.thisptr["type_"] = "none"
# ------------------------------------------------------------------------------
class CrossEntropyLoss(_LossFunction):
"""
Cross entropy function.
Recommended loss function for classification problems.
"""
def __init__(self):
super(CrossEntropyLoss, self).__init__()
self.thisptr["type_"] = "CrossEntropyLoss"
# ------------------------------------------------------------------------------
class SquareLoss(_LossFunction):
"""
Square loss function.
Recommended loss function for regression problems.
"""
def __init__(self):
super(SquareLoss, self).__init__()
self.thisptr["type_"] = "SquareLoss"
# ------------------------------------------------------------------------------
|
def container_image_is_external(biocontainers, app):
"""
Return a boolean: is this container going to be run
using an external URL (quay.io/biocontainers),
or is it going to use a local, named Docker image?
"""
d = biocontainers[app]
if (('use_local' in d) and (d['use_local'] is True)):
# This container does not use an external url
return False
else:
# This container uses a quay.io url
return True
def container_image_name(biocontainers, app):
"""
Get the name of a container image for app,
using params dictionary biocontainers.
Verification:
- Check that the user provides 'local' if 'use_local' is True
- Check that the user provides both 'quayurl' and 'version'
"""
if container_image_is_external(biocontainers,app):
try:
qurl = biocontainers[k]['quayurl']
qvers = biocontainers[k]['version']
quayurls.append(qurl + ":" + qvers)
return quayurls
except KeyError:
err = "Error: quay.io URL for %s biocontainer "%(k)
err += "could not be determined"
raise Exception(err)
else:
try:
return biocontainers[app]['local']
except KeyError:
err = "Error: the parameters provided specify a local "
err += "container image should be used for %s, but none "%(app)
err += "was specified using the 'local' key."
raise Exception(err)
|
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def hasPathSum(self, root: 'TreeNode', sum: 'int') -> 'bool':
if not root:
return False
def helper(node,val):
if not node:
return False
val -= node.val
if node.left is None and node.right is None:
return val == 0
return helper(node.left, val) or helper(node.right, val)
return helper(root,sum)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.