content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
class Solution:
def newInteger(self, n):
base9 = ""
while n:
base9 += str(n % 9)
n //= 9
return int(base9[::-1]) | class Solution:
def new_integer(self, n):
base9 = ''
while n:
base9 += str(n % 9)
n //= 9
return int(base9[::-1]) |
#!/usr/bin/env python
class Dog:
def identify(self):
return "jims dog"
| class Dog:
def identify(self):
return 'jims dog' |
# Time: O(n^2)
# Space: O(n)
class Solution(object):
def largestDivisibleSubset(self, nums):
"""
:type nums: List[int]
:rtype: List[int]
"""
if not nums:
return []
nums.sort()
dp = [1] * len(nums)
prev = [-1] * len(nums)
largest_idx = 0
for i in range(len(nums)):
for j in range(i):
if nums[i] % nums[j] == 0:
if dp[i] < dp[j] + 1:
dp[i] = dp[j] + 1
prev[i] = j
if dp[largest_idx] < dp[i]:
largest_idx = i
result = []
i = largest_idx
while i != -1:
result.append(nums[i])
i = prev[i]
return result[::-1]
| class Solution(object):
def largest_divisible_subset(self, nums):
"""
:type nums: List[int]
:rtype: List[int]
"""
if not nums:
return []
nums.sort()
dp = [1] * len(nums)
prev = [-1] * len(nums)
largest_idx = 0
for i in range(len(nums)):
for j in range(i):
if nums[i] % nums[j] == 0:
if dp[i] < dp[j] + 1:
dp[i] = dp[j] + 1
prev[i] = j
if dp[largest_idx] < dp[i]:
largest_idx = i
result = []
i = largest_idx
while i != -1:
result.append(nums[i])
i = prev[i]
return result[::-1] |
#
# https://rosettacode.org/wiki/Topological_sort#Python
#
###############
#
# https://codeforces.com/blog/entry/16823
#
###############
# https://www.python.org/doc/essays/graphs/
graph = {'A': ['B', 'C'],
'B': ['C', 'D'],
'C': ['D'],
'D': ['C'],
'E': ['F'],
'F': ['C']}
graph = {
'C': ['D', 'B', 'A'],
# 'C': ['A', 'B', 'D'],
'E': ['C'],
'D': ['B'],
'B': ['A'],
'A': [],
}
def find_path(graph, start, end, path=None):
if path is None:
path = []
path += [start]
if start == end:
return path
if start not in graph:
return
for node in graph[start]:
if node not in path:
new_path = find_path(graph, node, end, path)
if new_path:
return new_path
return
# https://stackoverflow.com/questions/47192626/deceptively-simple-implementation-of-topological-sorting-in-python
def iterative_topological_sort(graph, start):
seen = set()
stack = [] # path variable is gone, stack and order are new
order = [] # order will be in reverse order at first
q = [start]
while q:
v = q.pop()
if v not in seen:
seen.add(v) # no need to append to path any more
q.extend(graph[v])
while stack and v not in graph[stack[-1]]: # new stuff here!
order.append(stack.pop())
stack.append(v)
return stack + order[::-1] # new return value!
def recursive_topological_sort(graph, node):
result = []
seen = set()
def recursive_helper(node):
for neighbor in graph[node]:
if neighbor not in seen:
seen.add(neighbor)
recursive_helper(neighbor)
result.insert(0, node) # this line replaces the result.append line
recursive_helper(node)
return result
# https://codeforces.com/blog/entry/16823
def dfs(graph,s):
stack=[]
visited=[]
stack=[s]
while stack:
node=stack.pop()
if node not in visited:
visited.append(node)
stack=stack+graph[node]
return visited
print(graph)
print('****** find_path: ')
print(find_path(graph, 'E', 'A'))
print('****** iterative_topological_sort: ')
print(iterative_topological_sort(graph, 'E'))
print('****** recursive_topological_sort: ')
print(recursive_topological_sort(graph, 'E'))
print('****** codeforce dfs: ')
print(dfs(graph, 'E'))
| graph = {'A': ['B', 'C'], 'B': ['C', 'D'], 'C': ['D'], 'D': ['C'], 'E': ['F'], 'F': ['C']}
graph = {'C': ['D', 'B', 'A'], 'E': ['C'], 'D': ['B'], 'B': ['A'], 'A': []}
def find_path(graph, start, end, path=None):
if path is None:
path = []
path += [start]
if start == end:
return path
if start not in graph:
return
for node in graph[start]:
if node not in path:
new_path = find_path(graph, node, end, path)
if new_path:
return new_path
return
def iterative_topological_sort(graph, start):
seen = set()
stack = []
order = []
q = [start]
while q:
v = q.pop()
if v not in seen:
seen.add(v)
q.extend(graph[v])
while stack and v not in graph[stack[-1]]:
order.append(stack.pop())
stack.append(v)
return stack + order[::-1]
def recursive_topological_sort(graph, node):
result = []
seen = set()
def recursive_helper(node):
for neighbor in graph[node]:
if neighbor not in seen:
seen.add(neighbor)
recursive_helper(neighbor)
result.insert(0, node)
recursive_helper(node)
return result
def dfs(graph, s):
stack = []
visited = []
stack = [s]
while stack:
node = stack.pop()
if node not in visited:
visited.append(node)
stack = stack + graph[node]
return visited
print(graph)
print('****** find_path: ')
print(find_path(graph, 'E', 'A'))
print('****** iterative_topological_sort: ')
print(iterative_topological_sort(graph, 'E'))
print('****** recursive_topological_sort: ')
print(recursive_topological_sort(graph, 'E'))
print('****** codeforce dfs: ')
print(dfs(graph, 'E')) |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def maxPathSum(self, root):
"""
:type root: TreeNode
:rtype: int
"""
ans = float('-inf')
def helper(node):
nonlocal ans
if not node:
return 0
l = helper(node.left)
r = helper(node.right)
l = max(l, 0)
r = max(r, 0)
ans = max(ans, node.val + l + r)
return node.val + max(l, r)
helper(root)
return ans | class Solution:
def max_path_sum(self, root):
"""
:type root: TreeNode
:rtype: int
"""
ans = float('-inf')
def helper(node):
nonlocal ans
if not node:
return 0
l = helper(node.left)
r = helper(node.right)
l = max(l, 0)
r = max(r, 0)
ans = max(ans, node.val + l + r)
return node.val + max(l, r)
helper(root)
return ans |
def urljoin(*args):
"""
Joins given arguments into a url. Trailing but not leading slashes are
stripped for each argument.
https://stackoverflow.com/a/11326230
"""
return "/".join(map(lambda x: str(x).strip('/').rstrip('/'), args)) | def urljoin(*args):
"""
Joins given arguments into a url. Trailing but not leading slashes are
stripped for each argument.
https://stackoverflow.com/a/11326230
"""
return '/'.join(map(lambda x: str(x).strip('/').rstrip('/'), args)) |
a + b
c - d
e * f
g / h
i % j
k // l
m ** n
o | p
q & r
s ^ t
u << v
w >> x
| a + b
c - d
e * f
g / h
i % j
k // l
m ** n
o | p
q & r
s ^ t
u << v
w >> x |
def _1():
for row in range(7):
for col in range(7):
if (col==3 or row==6) or (row<3 and row+col==2):
print("*",end="")
else:
print(end=" ")
print()
| def _1():
for row in range(7):
for col in range(7):
if (col == 3 or row == 6) or (row < 3 and row + col == 2):
print('*', end='')
else:
print(end=' ')
print() |
CACHEDOPS = "cachedoperations"
SLICEBUILDERS = "slicebuilders"
GENERIC = "slicebuilder"
SUBPOPULATION = "subpopulation"
ATTACK = "attack"
AUGMENTATION = "augmentation"
TRANSFORMATION = "transformation"
CURATION = "curated"
| cachedops = 'cachedoperations'
slicebuilders = 'slicebuilders'
generic = 'slicebuilder'
subpopulation = 'subpopulation'
attack = 'attack'
augmentation = 'augmentation'
transformation = 'transformation'
curation = 'curated' |
BINANCE_SUPPORTED_QUOTE_ASSET = {
'BTC',
'ETH',
'USDT',
'BNB'
}
class SupportedQuoteAsset:
@staticmethod
def getQuoteAsset(symbol, supportedAssetMap):
for val in supportedAssetMap:
if symbol.endswith(val):
return val
return None | binance_supported_quote_asset = {'BTC', 'ETH', 'USDT', 'BNB'}
class Supportedquoteasset:
@staticmethod
def get_quote_asset(symbol, supportedAssetMap):
for val in supportedAssetMap:
if symbol.endswith(val):
return val
return None |
names:{
"000000": "Black",
"000080": "Navy Blue",
"0000C8": "Dark Blue",
"0000FF": "Blue",
"000741": "Stratos",
"001B1C": "Swamp",
"002387": "Resolution Blue",
"002900": "Deep Fir",
"002E20": "Burnham",
"002FA7": "International Klein Blue",
"003153": "Prussian Blue",
"003366": "Midnight Blue",
"003399": "Smalt",
"003532": "Deep Teal",
"003E40": "Cyprus",
"004620": "Kaitoke Green",
"0047AB": "Cobalt",
"004816": "Crusoe",
"004950": "Sherpa Blue",
"0056A7": "Endeavour",
"00581A": "Camarone",
"0066CC": "Science Blue",
"0066FF": "Blue Ribbon",
"00755E": "Tropical Rain Forest",
"0076A3": "Allports",
"007BA7": "Deep Cerulean",
"007EC7": "Lochmara",
"007FFF": "Azure Radiance",
"008080": "Teal",
"0095B6": "Bondi Blue",
"009DC4": "Pacific Blue",
"00A693": "Persian Green",
"00A86B": "Jade",
"00CC99": "Caribbean Green",
"00CCCC": "Robin's Egg Blue",
"00FF00": "Green",
"00FF7F": "Spring Green",
"00FFFF": "Cyan / Aqua",
"010D1A": "Blue Charcoal",
"011635": "Midnight",
"011D13": "Holly",
"012731": "Daintree",
"01361C": "Cardin Green",
"01371A": "County Green",
"013E62": "Astronaut Blue",
"013F6A": "Regal Blue",
"014B43": "Aqua Deep",
"015E85": "Orient",
"016162": "Blue Stone",
"016D39": "Fun Green",
"01796F": "Pine Green",
"017987": "Blue Lagoon",
"01826B": "Deep Sea",
"01A368": "Green Haze",
"022D15": "English Holly",
"02402C": "Sherwood Green",
"02478E": "Congress Blue",
"024E46": "Evening Sea",
"026395": "Bahama Blue",
"02866F": "Observatory",
"02A4D3": "Cerulean",
"03163C": "Tangaroa",
"032B52": "Green Vogue",
"036A6E": "Mosque",
"041004": "Midnight Moss",
"041322": "Black Pearl",
"042E4C": "Blue Whale",
"044022": "Zuccini",
"044259": "Teal Blue",
"051040": "Deep Cove",
"051657": "Gulf Blue",
"055989": "Venice Blue",
"056F57": "Watercourse",
"062A78": "Catalina Blue",
"063537": "Tiber",
"069B81": "Gossamer",
"06A189": "Niagara",
"073A50": "Tarawera",
"080110": "Jaguar",
"081910": "Black Bean",
"082567": "Deep Sapphire",
"088370": "Elf Green",
"08E8DE": "Bright Turquoise",
"092256": "Downriver",
"09230F": "Palm Green",
"09255D": "Madison",
"093624": "Bottle Green",
"095859": "Deep Sea Green",
"097F4B": "Salem",
"0A001C": "Black Russian",
"0A480D": "Dark Fern",
"0A6906": "Japanese Laurel",
"0A6F75": "Atoll",
"0B0B0B": "Cod Gray",
"0B0F08": "Marshland",
"0B1107": "Gordons Green",
"0B1304": "Black Forest",
"0B6207": "San Felix",
"0BDA51": "Malachite",
"0C0B1D": "Ebony",
"0C0D0F": "Woodsmoke",
"0C1911": "Racing Green",
"0C7A79": "Surfie Green",
"0C8990": "Blue Chill",
"0D0332": "Black Rock",
"0D1117": "Bunker",
"0D1C19": "Aztec",
"0D2E1C": "Bush",
"0E0E18": "Cinder",
"0E2A30": "Firefly",
"0F2D9E": "Torea Bay",
"10121D": "Vulcan",
"101405": "Green Waterloo",
"105852": "Eden",
"110C6C": "Arapawa",
"120A8F": "Ultramarine",
"123447": "Elephant",
"126B40": "Jewel",
"130000": "Diesel",
"130A06": "Asphalt",
"13264D": "Blue Zodiac",
"134F19": "Parsley",
"140600": "Nero",
"1450AA": "Tory Blue",
"151F4C": "Bunting",
"1560BD": "Denim",
"15736B": "Genoa",
"161928": "Mirage",
"161D10": "Hunter Green",
"162A40": "Big Stone",
"163222": "Celtic",
"16322C": "Timber Green",
"163531": "Gable Green",
"171F04": "Pine Tree",
"175579": "Chathams Blue",
"182D09": "Deep Forest Green",
"18587A": "Blumine",
"19330E": "Palm Leaf",
"193751": "Nile Blue",
"1959A8": "Fun Blue",
"1A1A68": "Lucky Point",
"1AB385": "Mountain Meadow",
"1B0245": "Tolopea",
"1B1035": "Haiti",
"1B127B": "Deep Koamaru",
"1B1404": "Acadia",
"1B2F11": "Seaweed",
"1B3162": "Biscay",
"1B659D": "Matisse",
"1C1208": "Crowshead",
"1C1E13": "Rangoon Green",
"1C39BB": "Persian Blue",
"1C402E": "Everglade",
"1C7C7D": "Elm",
"1D6142": "Green Pea",
"1E0F04": "Creole",
"1E1609": "Karaka",
"1E1708": "El Paso",
"1E385B": "Cello",
"1E433C": "Te Papa Green",
"1E90FF": "Dodger Blue",
"1E9AB0": "Eastern Blue",
"1F120F": "Night Rider",
"1FC2C2": "Java",
"20208D": "Jacksons Purple",
"202E54": "Cloud Burst",
"204852": "Blue Dianne",
"211A0E": "Eternity",
"220878": "Deep Blue",
"228B22": "Forest Green",
"233418": "Mallard",
"240A40": "Violet",
"240C02": "Kilamanjaro",
"242A1D": "Log Cabin",
"242E16": "Black Olive",
"24500F": "Green House",
"251607": "Graphite",
"251706": "Cannon Black",
"251F4F": "Port Gore",
"25272C": "Shark",
"25311C": "Green Kelp",
"2596D1": "Curious Blue",
"260368": "Paua",
"26056A": "Paris M",
"261105": "Wood Bark",
"261414": "Gondola",
"262335": "Steel Gray",
"26283B": "Ebony Clay",
"273A81": "Bay of Many",
"27504B": "Plantation",
"278A5B": "Eucalyptus",
"281E15": "Oil",
"283A77": "Astronaut",
"286ACD": "Mariner",
"290C5E": "Violent Violet",
"292130": "Bastille",
"292319": "Zeus",
"292937": "Charade",
"297B9A": "Jelly Bean",
"29AB87": "Jungle Green",
"2A0359": "Cherry Pie",
"2A140E": "Coffee Bean",
"2A2630": "Baltic Sea",
"2A380B": "Turtle Green",
"2A52BE": "Cerulean Blue",
"2B0202": "Sepia Black",
"2B194F": "Valhalla",
"2B3228": "Heavy Metal",
"2C0E8C": "Blue Gem",
"2C1632": "Revolver",
"2C2133": "Bleached Cedar",
"2C8C84": "Lochinvar",
"2D2510": "Mikado",
"2D383A": "Outer Space",
"2D569B": "St Tropaz",
"2E0329": "Jacaranda",
"2E1905": "Jacko Bean",
"2E3222": "Rangitoto",
"2E3F62": "Rhino",
"2E8B57": "Sea Green",
"2EBFD4": "Scooter",
"2F270E": "Onion",
"2F3CB3": "Governor Bay",
"2F519E": "Sapphire",
"2F5A57": "Spectra",
"2F6168": "Casal",
"300529": "Melanzane",
"301F1E": "Cocoa Brown",
"302A0F": "Woodrush",
"304B6A": "San Juan",
"30D5C8": "Turquoise",
"311C17": "Eclipse",
"314459": "Pickled Bluewood",
"315BA1": "Azure",
"31728D": "Calypso",
"317D82": "Paradiso",
"32127A": "Persian Indigo",
"32293A": "Blackcurrant",
"323232": "Mine Shaft",
"325D52": "Stromboli",
"327C14": "Bilbao",
"327DA0": "Astral",
"33036B": "Christalle",
"33292F": "Thunder",
"33CC99": "Shamrock",
"341515": "Tamarind",
"350036": "Mardi Gras",
"350E42": "Valentino",
"350E57": "Jagger",
"353542": "Tuna",
"354E8C": "Chambray",
"363050": "Martinique",
"363534": "Tuatara",
"363C0D": "Waiouru",
"36747D": "Ming",
"368716": "La Palma",
"370202": "Chocolate",
"371D09": "Clinker",
"37290E": "Brown Tumbleweed",
"373021": "Birch",
"377475": "Oracle",
"380474": "Blue Diamond",
"381A51": "Grape",
"383533": "Dune",
"384555": "Oxford Blue",
"384910": "Clover",
"394851": "Limed Spruce",
"396413": "Dell",
"3A0020": "Toledo",
"3A2010": "Sambuca",
"3A2A6A": "Jacarta",
"3A686C": "William",
"3A6A47": "Killarney",
"3AB09E": "Keppel",
"3B000B": "Temptress",
"3B0910": "Aubergine",
"3B1F1F": "Jon",
"3B2820": "Treehouse",
"3B7A57": "Amazon",
"3B91B4": "Boston Blue",
"3C0878": "Windsor",
"3C1206": "Rebel",
"3C1F76": "Meteorite",
"3C2005": "Dark Ebony",
"3C3910": "Camouflage",
"3C4151": "Bright Gray",
"3C4443": "Cape Cod",
"3C493A": "Lunar Green",
"3D0C02": "Bean ",
"3D2B1F": "Bistre",
"3D7D52": "Goblin",
"3E0480": "Kingfisher Daisy",
"3E1C14": "Cedar",
"3E2B23": "English Walnut",
"3E2C1C": "Black Marlin",
"3E3A44": "Ship Gray",
"3EABBF": "Pelorous",
"3F2109": "Bronze",
"3F2500": "Cola",
"3F3002": "Madras",
"3F307F": "Minsk",
"3F4C3A": "Cabbage Pont",
"3F583B": "Tom Thumb",
"3F5D53": "Mineral Green",
"3FC1AA": "Puerto Rico",
"3FFF00": "Harlequin",
"401801": "Brown Pod",
"40291D": "Cork",
"403B38": "Masala",
"403D19": "Thatch Green",
"405169": "Fiord",
"40826D": "Viridian",
"40A860": "Chateau Green",
"410056": "Ripe Plum",
"411F10":"Paco",
"412010": "Deep Oak",
"413C37": "Merlin",
"414257": "Gun Powder",
"414C7D": "East Bay",
"4169E1": "Royal Blue",
"41AA78": "Ocean Green",
"420303": "Burnt Maroon",
"423921": "Lisbon Brown",
"427977": "Faded Jade",
"431560": "Scarlet Gum",
"433120": "Iroko",
"433E37": "Armadillo",
"434C59": "River Bed",
"436A0D": "Green Leaf",
"44012D": "Barossa",
"441D00": "Morocco Brown",
"444954": "Mako",
"454936": "Kelp",
"456CAC": "San Marino",
"45B1E8": "Picton Blue",
"460B41": "Loulou",
"462425": "Crater Brown",
"465945": "Gray Asparagus",
"4682B4": "Steel Blue",
"480404": "Rustic Red",
"480607": "Bulgarian Rose",
"480656": "Clairvoyant",
"481C1C": "Cocoa Bean",
"483131": "Woody Brown",
"483C32": "Taupe",
"49170C": "Van Cleef",
"492615": "Brown Derby",
"49371B": "Metallic Bronze",
"495400": "Verdun Green",
"496679": "Blue Bayoux",
"497183": "Bismark",
"4A2A04": "Bracken",
"4A3004": "Deep Bronze",
"4A3C30": "Mondo",
"4A4244": "Tundora",
"4A444B": "Gravel",
"4A4E5A": "Trout",
"4B0082": "Pigment Indigo",
"4B5D52": "Nandor",
"4C3024": "Saddle",
"4C4F56": "Abbey",
"4D0135": "Blackberry",
"4D0A18": "Cab Sav",
"4D1E01": "Indian Tan",
"4D282D": "Cowboy",
"4D282E": "Livid Brown",
"4D3833": "Rock",
"4D3D14": "Punga",
"4D400F": "Bronzetone",
"4D5328": "Woodland",
"4E0606": "Mahogany",
"4E2A5A": "Bossanova",
"4E3B41": "Matterhorn",
"4E420C": "Bronze Olive",
"4E4562": "Mulled Wine",
"4E6649": "Axolotl",
"4E7F9E": "Wedgewood",
"4EABD1": "Shakespeare",
"4F1C70": "Honey Flower",
"4F2398": "Daisy Bush",
"4F69C6": "Indigo",
"4F7942": "Fern Green",
"4F9D5D": "Fruit Salad",
"4FA83D": "Apple",
"504351": "Mortar",
"507096": "Kashmir Blue",
"507672": "Cutty Sark",
"50C878": "Emerald",
"514649": "Emperor",
"516E3D": "Chalet Green",
"517C66": "Como",
"51808F": "Smalt Blue",
"52001F": "Castro",
"520C17": "Maroon Oak",
"523C94": "Gigas",
"533455": "Voodoo",
"534491": "Victoria",
"53824B": "Hippie Green",
"541012": "Heath",
"544333": "Judge Gray",
"54534D": "Fuscous Gray",
"549019": "Vida Loca",
"55280C": "Cioccolato",
"555B10": "Saratoga",
"556D56": "Finlandia",
"5590D9": "Havelock Blue",
"56B4BE": "Fountain Blue",
"578363": "Spring Leaves",
"583401": "Saddle Brown",
"585562": "Scarpa Flow",
"587156": "Cactus",
"589AAF": "Hippie Blue",
"591D35": "Wine Berry",
"592804": "Brown Bramble",
"593737": "Congo Brown",
"594433": "Millbrook",
"5A6E9C": "Waikawa Gray",
"5A87A0": "Horizon",
"5B3013": "Jambalaya",
"5C0120": "Bordeaux",
"5C0536": "Mulberry Wood",
"5C2E01": "Carnaby Tan",
"5C5D75": "Comet",
"5D1E0F": "Redwood",
"5D4C51": "Don Juan",
"5D5C58": "Chicago",
"5D5E37": "Verdigris",
"5D7747": "Dingley",
"5DA19F": "Breaker Bay",
"5E483E": "Kabul",
"5E5D3B": "Hemlock",
"5F3D26": "Irish Coffee",
"5F5F6E": "Mid Gray",
"5F6672": "Shuttle Gray",
"5FA777": "Aqua Forest",
"5FB3AC": "Tradewind",
"604913": "Horses Neck",
"605B73": "Smoky",
"606E68": "Corduroy",
"6093D1": "Danube",
"612718": "Espresso",
"614051": "Eggplant",
"615D30": "Costa Del Sol",
"61845F": "Glade Green",
"622F30": "Buccaneer",
"623F2D": "Quincy",
"624E9A": "Butterfly Bush",
"625119": "West Coast",
"626649": "Finch",
"639A8F": "Patina",
"63B76C": "Fern",
"6456B7": "Blue Violet",
"646077": "Dolphin",
"646463": "Storm Dust",
"646A54": "Siam",
"646E75": "Nevada",
"6495ED": "Cornflower Blue",
"64CCDB": "Viking",
"65000B": "Rosewood",
"651A14": "Cherrywood",
"652DC1": "Purple Heart",
"657220": "Fern Frond",
"65745D": "Willow Grove",
"65869F": "Hoki",
"660045": "Pompadour",
"660099": "Purple",
"66023C": "Tyrian Purple",
"661010": "Dark Tan",
"66B58F": "Silver Tree",
"66FF00": "Bright Green",
"66FF66": "Screamin' Green",
"67032D": "Black Rose",
"675FA6": "Scampi",
"676662": "Ironside Gray",
"678975": "Viridian Green",
"67A712": "Christi",
"683600": "Nutmeg Wood Finish",
"685558": "Zambezi",
"685E6E": "Salt Box",
"692545": "Tawny Port",
"692D54": "Finn",
"695F62": "Scorpion",
"697E9A": "Lynch",
"6A442E": "Spice",
"6A5D1B": "Himalaya",
"6A6051": "Soya Bean",
"6B2A14": "Hairy Heath",
"6B3FA0": "Royal Purple",
"6B4E31": "Shingle Fawn",
"6B5755": "Dorado",
"6B8BA2": "Bermuda Gray",
"6B8E23": "Olive Drab",
"6C3082": "Eminence",
"6CDAE7": "Turquoise Blue",
"6D0101": "Lonestar",
"6D5E54": "Pine Cone",
"6D6C6C": "Dove Gray",
"6D9292": "Juniper",
"6D92A1": "Gothic",
"6E0902": "Red Oxide",
"6E1D14": "Moccaccino",
"6E4826": "Pickled Bean",
"6E4B26": "Dallas",
"6E6D57": "Kokoda",
"6E7783": "Pale Sky",
"6F440C": "Cafe Royale",
"6F6A61": "Flint",
"6F8E63": "Highland",
"6F9D02": "Limeade",
"6FD0C5": "Downy",
"701C1C": "Persian Plum",
"704214": "Sepia",
"704A07": "Antique Bronze",
"704F50": "Ferra",
"706555": "Coffee",
"708090": "Slate Gray",
"711A00": "Cedar Wood Finish",
"71291D": "Metallic Copper",
"714693": "Affair",
"714AB2": "Studio",
"715D47": "Tobacco Brown",
"716338": "Yellow Metal",
"716B56": "Peat",
"716E10": "Olivetone",
"717486": "Storm Gray",
"718080": "Sirocco",
"71D9E2": "Aquamarine Blue",
"72010F": "Venetian Red",
"724A2F": "Old Copper",
"726D4E": "Go Ben",
"727B89": "Raven",
"731E8F": "Seance",
"734A12": "Raw Umber",
"736C9F": "Kimberly",
"736D58": "Crocodile",
"737829": "Crete",
"738678": "Xanadu",
"74640D": "Spicy Mustard",
"747D63": "Limed Ash",
"747D83": "Rolling Stone",
"748881": "Blue Smoke",
"749378": "Laurel",
"74C365": "Mantis",
"755A57": "Russett",
"7563A8": "Deluge",
"76395D": "Cosmic",
"7666C6": "Blue Marguerite",
"76BD17": "Lima",
"76D7EA": "Sky Blue",
"770F05": "Dark Burgundy",
"771F1F": "Crown of Thorns",
"773F1A": "Walnut",
"776F61": "Pablo",
"778120": "Pacifika",
"779E86": "Oxley",
"77DD77": "Pastel Green",
"780109": "Japanese Maple",
"782D19": "Mocha",
"782F16": "Peanut",
"78866B": "Camouflage Green",
"788A25": "Wasabi",
"788BBA": "Ship Cove",
"78A39C": "Sea Nymph",
"795D4C": "Roman Coffee",
"796878": "Old Lavender",
"796989": "Rum",
"796A78": "Fedora",
"796D62": "Sandstone",
"79DEEC": "Spray",
"7A013A": "Siren",
"7A58C1": "Fuchsia Blue",
"7A7A7A": "Boulder",
"7A89B8": "Wild Blue Yonder",
"7AC488": "De York",
"7B3801": "Red Beech",
"7B3F00": "Cinnamon",
"7B6608": "Yukon Gold",
"7B7874": "Tapa",
"7B7C94": "Waterloo ",
"7B8265": "Flax Smoke",
"7B9F80": "Amulet",
"7BA05B": "Asparagus",
"7C1C05": "Kenyan Copper",
"7C7631": "Pesto",
"7C778A": "Topaz",
"7C7B7A": "Concord",
"7C7B82": "Jumbo",
"7C881A": "Trendy Green",
"7CA1A6": "Gumbo",
"7CB0A1": "Acapulco",
"7CB7BB": "Neptune",
"7D2C14": "Pueblo",
"7DA98D": "Bay Leaf",
"7DC8F7": "Malibu",
"7DD8C6": "Bermuda",
"7E3A15": "Copper Canyon",
"7F1734": "Claret",
"7F3A02": "Peru Tan",
"7F626D": "Falcon",
"7F7589": "Mobster",
"7F76D3": "Moody Blue",
"7FFF00": "Chartreuse",
"7FFFD4": "Aquamarine",
"800000": "Maroon",
"800B47": "Rose Bud Cherry",
"801818": "Falu Red",
"80341F": "Red Robin",
"803790": "Vivid Violet",
"80461B": "Russet",
"807E79": "Friar Gray",
"808000": "Olive",
"808080": "Gray",
"80B3AE": "Gulf Stream",
"80B3C4": "Glacier",
"80CCEA": "Seagull",
"81422C": "Nutmeg",
"816E71": "Spicy Pink",
"817377": "Empress",
"819885": "Spanish Green",
"826F65": "Sand Dune",
"828685": "Gunsmoke",
"828F72": "Battleship Gray",
"831923": "Merlot",
"837050": "Shadow",
"83AA5D": "Chelsea Cucumber",
"83D0C6": "Monte Carlo",
"843179": "Plum",
"84A0A0": "Granny Smith",
"8581D9": "Chetwode Blue",
"858470": "Bandicoot",
"859FAF": "Bali Hai",
"85C4CC": "Half Baked",
"860111": "Red Devil",
"863C3C": "Lotus",
"86483C": "Ironstone",
"864D1E": "Bull Shot",
"86560A": "Rusty Nail",
"868974": "Bitter",
"86949F": "Regent Gray",
"871550": "Disco",
"87756E": "Americano",
"877C7B": "Hurricane",
"878D91": "Oslo Gray",
"87AB39": "Sushi",
"885342": "Spicy Mix",
"886221": "Kumera",
"888387": "Suva Gray",
"888D65": "Avocado",
"893456": "Camelot",
"893843": "Solid Pink",
"894367": "Cannon Pink",
"897D6D": "Makara",
"8A3324": "Burnt Umber",
"8A73D6": "True V",
"8A8360": "Clay Creek",
"8A8389": "Monsoon",
"8A8F8A": "Stack",
"8AB9F1": "Jordy Blue",
"8B00FF": "Electric Violet",
"8B0723": "Monarch",
"8B6B0B": "Corn Harvest",
"8B8470": "Olive Haze",
"8B847E": "Schooner",
"8B8680": "Natural Gray",
"8B9C90": "Mantle",
"8B9FEE": "Portage",
"8BA690": "Envy",
"8BA9A5": "Cascade",
"8BE6D8": "Riptide",
"8C055E": "Cardinal Pink",
"8C472F": "Mule Fawn",
"8C5738": "Potters Clay",
"8C6495": "Trendy Pink",
"8D0226": "Paprika",
"8D3D38": "Sanguine Brown",
"8D3F3F": "Tosca",
"8D7662": "Cement",
"8D8974": "Granite Green",
"8D90A1": "Manatee",
"8DA8CC": "Polo Blue",
"8E0000": "Red Berry",
"8E4D1E": "Rope",
"8E6F70": "Opium",
"8E775E": "Domino",
"8E8190": "Mamba",
"8EABC1": "Nepal",
"8F021C": "Pohutukawa",
"8F3E33": "El Salva",
"8F4B0E": "Korma",
"8F8176": "Squirrel",
"8FD6B4": "Vista Blue",
"900020": "Burgundy",
"901E1E": "Old Brick",
"907874": "Hemp",
"907B71": "Almond Frost",
"908D39": "Sycamore",
"92000A": "Sangria",
"924321": "Cumin",
"926F5B": "Beaver",
"928573": "Stonewall",
"928590": "Venus",
"9370DB": "Medium Purple",
"93CCEA": "Cornflower",
"93DFB8": "Algae Green",
"944747": "Copper Rust",
"948771": "Arrowtown",
"950015": "Scarlett",
"956387": "Strikemaster",
"959396": "Mountain Mist",
"960018": "Carmine",
"964B00": "Brown",
"967059": "Leather",
"9678B6": "Purple Mountain's Majesty",
"967BB6": "Lavender Purple",
"96A8A1": "Pewter",
"96BBAB": "Summer Green",
"97605D": "Au Chico",
"9771B5": "Wisteria",
"97CD2D": "Atlantis",
"983D61": "Vin Rouge",
"9874D3": "Lilac Bush",
"98777B": "Bazaar",
"98811B": "Hacienda",
"988D77": "Pale Oyster",
"98FF98": "Mint Green",
"990066": "Fresh Eggplant",
"991199": "Violet Eggplant",
"991613": "Tamarillo",
"991B07": "Totem Pole",
"996666": "Copper Rose",
"9966CC": "Amethyst",
"997A8D": "Mountbatten Pink",
"9999CC": "Blue Bell",
"9A3820": "Prairie Sand",
"9A6E61": "Toast",
"9A9577": "Gurkha",
"9AB973": "Olivine",
"9AC2B8": "Shadow Green",
"9B4703": "Oregon",
"9B9E8F": "Lemon Grass",
"9C3336": "Stiletto",
"9D5616": "Hawaiian Tan",
"9DACB7": "Gull Gray",
"9DC209": "Pistachio",
"9DE093": "Granny Smith Apple",
"9DE5FF": "Anakiwa",
"9E5302": "Chelsea Gem",
"9E5B40": "Sepia Skin",
"9EA587": "Sage",
"9EA91F": "Citron",
"9EB1CD": "Rock Blue",
"9EDEE0": "Morning Glory",
"9F381D": "Cognac",
"9F821C": "Reef Gold",
"9F9F9C": "Star Dust",
"9FA0B1": "Santas Gray",
"9FD7D3": "Sinbad",
"9FDD8C": "Feijoa",
"A02712": "Tabasco",
"A1750D": "Buttered Rum",
"A1ADB5": "Hit Gray",
"A1C50A": "Citrus",
"A1DAD7": "Aqua Island",
"A1E9DE": "Water Leaf",
"A2006D": "Flirt",
"A23B6C": "Rouge",
"A26645": "Cape Palliser",
"A2AAB3": "Gray Chateau",
"A2AEAB": "Edward",
"A3807B": "Pharlap",
"A397B4": "Amethyst Smoke",
"A3E3ED": "Blizzard Blue",
"A4A49D": "Delta",
"A4A6D3": "Wistful",
"A4AF6E": "Green Smoke",
"A50B5E": "Jazzberry Jam",
"A59B91": "Zorba",
"A5CB0C": "Bahia",
"A62F20": "Roof Terracotta",
"A65529": "Paarl",
"A68B5B": "Barley Corn",
"A69279": "Donkey Brown",
"A6A29A": "Dawn",
"A72525": "Mexican Red",
"A7882C": "Luxor Gold",
"A85307": "Rich Gold",
"A86515": "Reno Sand",
"A86B6B": "Coral Tree",
"A8989B": "Dusty Gray",
"A899E6": "Dull Lavender",
"A8A589": "Tallow",
"A8AE9C": "Bud",
"A8AF8E": "Locust",
"A8BD9F": "Norway",
"A8E3BD": "Chinook",
"A9A491": "Gray Olive",
"A9ACB6": "Aluminium",
"A9B2C3": "Cadet Blue",
"A9B497": "Schist",
"A9BDBF": "Tower Gray",
"A9BEF2": "Perano",
"A9C6C2": "Opal",
"AA375A": "Night Shadz",
"AA4203": "Fire",
"AA8B5B": "Muesli",
"AA8D6F": "Sandal",
"AAA5A9": "Shady Lady",
"AAA9CD": "Logan",
"AAABB7": "Spun Pearl",
"AAD6E6": "Regent St Blue",
"AAF0D1": "Magic Mint",
"AB0563": "Lipstick",
"AB3472": "Royal Heath",
"AB917A": "Sandrift",
"ABA0D9": "Cold Purple",
"ABA196": "Bronco",
"AC8A56": "Limed Oak",
"AC91CE": "East Side",
"AC9E22": "Lemon Ginger",
"ACA494": "Napa",
"ACA586": "Hillary",
"ACA59F": "Cloudy",
"ACACAC": "Silver Chalice",
"ACB78E": "Swamp Green",
"ACCBB1": "Spring Rain",
"ACDD4D": "Conifer",
"ACE1AF": "Celadon",
"AD781B": "Mandalay",
"ADBED1": "Casper",
"ADDFAD": "Moss Green",
"ADE6C4": "Padua",
"ADFF2F": "Green Yellow",
"AE4560": "Hippie Pink",
"AE6020": "Desert",
"AE809E": "Bouquet",
"AF4035": "Medium Carmine",
"AF4D43": "Apple Blossom",
"AF593E": "Brown Rust",
"AF8751": "Driftwood",
"AF8F2C": "Alpine",
"AF9F1C": "Lucky",
"AFA09E": "Martini",
"AFB1B8": "Bombay",
"AFBDD9": "Pigeon Post",
"B04C6A": "Cadillac",
"B05D54": "Matrix",
"B05E81": "Tapestry",
"B06608": "Mai Tai",
"B09A95": "Del Rio",
"B0E0E6": "Powder Blue",
"B0E313": "Inch Worm",
"B10000": "Bright Red",
"B14A0B": "Vesuvius",
"B1610B": "Pumpkin Skin",
"B16D52": "Santa Fe",
"B19461": "Teak",
"B1E2C1": "Fringy Flower",
"B1F4E7": "Ice Cold",
"B20931": "Shiraz",
"B2A1EA": "Biloba Flower",
"B32D29": "Tall Poppy",
"B35213": "Fiery Orange",
"B38007": "Hot Toddy",
"B3AF95": "Taupe Gray",
"B3C110": "La Rioja",
"B43332": "Well Read",
"B44668": "Blush",
"B4CFD3": "Jungle Mist",
"B57281": "Turkish Rose",
"B57EDC": "Lavender",
"B5A27F": "Mongoose",
"B5B35C": "Olive Green",
"B5D2CE": "Jet Stream",
"B5ECDF": "Cruise",
"B6316C": "Hibiscus",
"B69D98": "Thatch",
"B6B095": "Heathered Gray",
"B6BAA4": "Eagle",
"B6D1EA": "Spindle",
"B6D3BF": "Gum Leaf",
"B7410E": "Rust",
"B78E5C": "Muddy Waters",
"B7A214": "Sahara",
"B7A458": "Husk",
"B7B1B1": "Nobel",
"B7C3D0": "Heather",
"B7F0BE": "Madang",
"B81104": "Milano Red",
"B87333": "Copper",
"B8B56A": "Gimblet",
"B8C1B1": "Green Spring",
"B8C25D": "Celery",
"B8E0F9": "Sail",
"B94E48": "Chestnut",
"B95140": "Crail",
"B98D28": "Marigold",
"B9C46A": "Wild Willow",
"B9C8AC": "Rainee",
"BA0101": "Guardsman Red",
"BA450C": "Rock Spray",
"BA6F1E": "Bourbon",
"BA7F03": "Pirate Gold",
"BAB1A2": "Nomad",
"BAC7C9": "Submarine",
"BAEEF9": "Charlotte",
"BB3385": "Medium Red Violet",
"BB8983": "Brandy Rose",
"BBD009": "Rio Grande",
"BBD7C1": "Surf",
"BCC9C2": "Powder Ash",
"BD5E2E": "Tuscany",
"BD978E": "Quicksand",
"BDB1A8": "Silk",
"BDB2A1": "Malta",
"BDB3C7": "Chatelle",
"BDBBD7": "Lavender Gray",
"BDBDC6": "French Gray",
"BDC8B3": "Clay Ash",
"BDC9CE": "Loblolly",
"BDEDFD": "French Pass",
"BEA6C3": "London Hue",
"BEB5B7": "Pink Swan",
"BEDE0D": "Fuego",
"BF5500": "Rose of Sharon",
"BFB8B0": "Tide",
"BFBED8": "Blue Haze",
"BFC1C2": "Silver Sand",
"BFC921": "Key Lime Pie",
"BFDBE2": "Ziggurat",
"BFFF00": "Lime",
"C02B18": "Thunderbird",
"C04737": "Mojo",
"C08081": "Old Rose",
"C0C0C0": "Silver",
"C0D3B9": "Pale Leaf",
"C0D8B6": "Pixie Green",
"C1440E": "Tia Maria",
"C154C1": "Fuchsia Pink",
"C1A004": "Buddha Gold",
"C1B7A4": "Bison Hide",
"C1BAB0": "Tea",
"C1BECD": "Gray Suit",
"C1D7B0": "Sprout",
"C1F07C": "Sulu",
"C26B03": "Indochine",
"C2955D": "Twine",
"C2BDB6": "Cotton Seed",
"C2CAC4": "Pumice",
"C2E8E5": "Jagged Ice",
"C32148": "Maroon Flush",
"C3B091": "Indian Khaki",
"C3BFC1": "Pale Slate",
"C3C3BD": "Gray Nickel",
"C3CDE6": "Periwinkle Gray",
"C3D1D1": "Tiara",
"C3DDF9": "Tropical Blue",
"C41E3A": "Cardinal",
"C45655": "Fuzzy Wuzzy Brown",
"C45719": "Orange Roughy",
"C4C4BC": "Mist Gray",
"C4D0B0": "Coriander",
"C4F4EB": "Mint Tulip",
"C54B8C": "Mulberry",
"C59922": "Nugget",
"C5994B": "Tussock",
"C5DBCA": "Sea Mist",
"C5E17A": "Yellow Green",
"C62D42": "Brick Red",
"C6726B": "Contessa",
"C69191": "Oriental Pink",
"C6A84B": "Roti",
"C6C3B5": "Ash",
"C6C8BD": "Kangaroo",
"C6E610": "Las Palmas",
"C7031E": "Monza",
"C71585": "Red Violet",
"C7BCA2": "Coral Reef",
"C7C1FF": "Melrose",
"C7C4BF": "Cloud",
"C7C9D5": "Ghost",
"C7CD90": "Pine Glade",
"C7DDE5": "Botticelli",
"C88A65": "Antique Brass",
"C8A2C8": "Lilac",
"C8A528": "Hokey Pokey",
"C8AABF": "Lily",
"C8B568": "Laser",
"C8E3D7": "Edgewater",
"C96323": "Piper",
"C99415": "Pizza",
"C9A0DC": "Light Wisteria",
"C9B29B": "Rodeo Dust",
"C9B35B": "Sundance",
"C9B93B": "Earls Green",
"C9C0BB": "Silver Rust",
"C9D9D2": "Conch",
"C9FFA2": "Reef",
"C9FFE5": "Aero Blue",
"CA3435": "Flush Mahogany",
"CABB48": "Turmeric",
"CADCD4": "Paris White",
"CAE00D": "Bitter Lemon",
"CAE6DA": "Skeptic",
"CB8FA9": "Viola",
"CBCAB6": "Foggy Gray",
"CBD3B0": "Green Mist",
"CBDBD6": "Nebula",
"CC3333": "Persian Red",
"CC5500": "Burnt Orange",
"CC7722": "Ochre",
"CC8899": "Puce",
"CCCAA8": "Thistle Green",
"CCCCFF": "Periwinkle",
"CCFF00": "Electric Lime",
"CD5700": "Tenn",
"CD5C5C": "Chestnut Rose",
"CD8429": "Brandy Punch",
"CDF4FF": "Onahau",
"CEB98F": "Sorrell Brown",
"CEBABA": "Cold Turkey",
"CEC291": "Yuma",
"CEC7A7": "Chino",
"CFA39D": "Eunry",
"CFB53B": "Old Gold",
"CFDCCF": "Tasman",
"CFE5D2": "Surf Crest",
"CFF9F3": "Humming Bird",
"CFFAF4": "Scandal",
"D05F04": "Red Stage",
"D06DA1": "Hopbush",
"D07D12": "Meteor",
"D0BEF8": "Perfume",
"D0C0E5": "Prelude",
"D0F0C0": "Tea Green",
"D18F1B": "Geebung",
"D1BEA8": "Vanilla",
"D1C6B4": "Soft Amber",
"D1D2CA": "Celeste",
"D1D2DD": "Mischka",
"D1E231": "Pear",
"D2691E": "Hot Cinnamon",
"D27D46": "Raw Sienna",
"D29EAA": "Careys Pink",
"D2B48C": "Tan",
"D2DA97": "Deco",
"D2F6DE": "Blue Romance",
"D2F8B0": "Gossip",
"D3CBBA": "Sisal",
"D3CDC5": "Swirl",
"D47494": "Charm",
"D4B6AF": "Clam Shell",
"D4BF8D": "Straw",
"D4C4A8": "Akaroa",
"D4CD16": "Bird Flower",
"D4D7D9": "Iron",
"D4DFE2": "Geyser",
"D4E2FC": "Hawkes Blue",
"D54600": "Grenadier",
"D591A4": "Can Can",
"D59A6F": "Whiskey",
"D5D195": "Winter Hazel",
"D5F6E3": "Granny Apple",
"D69188": "My Pink",
"D6C562": "Tacha",
"D6CEF6": "Moon Raker",
"D6D6D1": "Quill Gray",
"D6FFDB": "Snowy Mint",
"D7837F": "New York Pink",
"D7C498": "Pavlova",
"D7D0FF": "Fog",
"D84437": "Valencia",
"D87C63": "Japonica",
"D8BFD8": "Thistle",
"D8C2D5": "Maverick",
"D8FCFA": "Foam",
"D94972": "Cabaret",
"D99376": "Burning Sand",
"D9B99B": "Cameo",
"D9D6CF": "Timberwolf",
"D9DCC1": "Tana",
"D9E4F5": "Link Water",
"D9F7FF": "Mabel",
"DA3287": "Cerise",
"DA5B38": "Flame Pea",
"DA6304": "Bamboo",
"DA6A41": "Red Damask",
"DA70D6": "Orchid",
"DA8A67": "Copperfield",
"DAA520": "Golden Grass",
"DAECD6": "Zanah",
"DAF4F0": "Iceberg",
"DAFAFF": "Oyster Bay",
"DB5079": "Cranberry",
"DB9690": "Petite Orchid",
"DB995E": "Di Serria",
"DBDBDB": "Alto",
"DBFFF8": "Frosted Mint",
"DC143C": "Crimson",
"DC4333": "Punch",
"DCB20C": "Galliano",
"DCB4BC": "Blossom",
"DCD747": "Wattle",
"DCD9D2": "Westar",
"DCDDCC": "Moon Mist",
"DCEDB4": "Caper",
"DCF0EA": "Swans Down",
"DDD6D5": "Swiss Coffee",
"DDF9F1": "White Ice",
"DE3163": "Cerise Red",
"DE6360": "Roman",
"DEA681": "Tumbleweed",
"DEBA13": "Gold Tips",
"DEC196": "Brandy",
"DECBC6": "Wafer",
"DED4A4": "Sapling",
"DED717": "Barberry",
"DEE5C0": "Beryl Green",
"DEF5FF": "Pattens Blue",
"DF73FF": "Heliotrope",
"DFBE6F": "Apache",
"DFCD6F": "Chenin",
"DFCFDB": "Lola",
"DFECDA": "Willow Brook",
"DFFF00": "Chartreuse Yellow",
"E0B0FF": "Mauve",
"E0B646": "Anzac",
"E0B974": "Harvest Gold",
"E0C095": "Calico",
"E0FFFF": "Baby Blue",
"E16865": "Sunglo",
"E1BC64": "Equator",
"E1C0C8": "Pink Flare",
"E1E6D6": "Periglacial Blue",
"E1EAD4": "Kidnapper",
"E1F6E8": "Tara",
"E25465": "Mandy",
"E2725B": "Terracotta",
"E28913": "Golden Bell",
"E292C0": "Shocking",
"E29418": "Dixie",
"E29CD2": "Light Orchid",
"E2D8ED": "Snuff",
"E2EBED": "Mystic",
"E2F3EC": "Apple Green",
"E30B5C": "Razzmatazz",
"E32636": "Alizarin Crimson",
"E34234": "Cinnabar",
"E3BEBE": "Cavern Pink",
"E3F5E1": "Peppermint",
"E3F988": "Mindaro",
"E47698": "Deep Blush",
"E49B0F": "Gamboge",
"E4C2D5": "Melanie",
"E4CFDE": "Twilight",
"E4D1C0": "Bone",
"E4D422": "Sunflower",
"E4D5B7": "Grain Brown",
"E4D69B": "Zombie",
"E4F6E7": "Frostee",
"E4FFD1": "Snow Flurry",
"E52B50": "Amaranth",
"E5841B": "Zest",
"E5CCC9": "Dust Storm",
"E5D7BD": "Stark White",
"E5D8AF": "Hampton",
"E5E0E1": "Bon Jour",
"E5E5E5": "Mercury",
"E5F9F6": "Polar",
"E64E03": "Trinidad",
"E6BE8A": "Gold Sand",
"E6BEA5": "Cashmere",
"E6D7B9": "Double Spanish White",
"E6E4D4": "Satin Linen",
"E6F2EA": "Harp",
"E6F8F3": "Off Green",
"E6FFE9": "Hint of Green",
"E6FFFF": "Tranquil",
"E77200": "Mango Tango",
"E7730A": "Christine",
"E79F8C": "Tonys Pink",
"E79FC4": "Kobi",
"E7BCB4": "Rose Fog",
"E7BF05": "Corn",
"E7CD8C": "Putty",
"E7ECE6": "Gray Nurse",
"E7F8FF": "Lily White",
"E7FEFF": "Bubbles",
"E89928": "Fire Bush",
"E8B9B3": "Shilo",
"E8E0D5": "Pearl Bush",
"E8EBE0": "Green White",
"E8F1D4": "Chrome White",
"E8F2EB": "Gin",
"E8F5F2": "Aqua Squeeze",
"E96E00": "Clementine",
"E97451": "Burnt Sienna",
"E97C07": "Tahiti Gold",
"E9CECD": "Oyster Pink",
"E9D75A": "Confetti",
"E9E3E3": "Ebb",
"E9F8ED": "Ottoman",
"E9FFFD": "Clear Day",
"EA88A8": "Carissma",
"EAAE69": "Porsche",
"EAB33B": "Tulip Tree",
"EAC674": "Rob Roy",
"EADAB8": "Raffia",
"EAE8D4": "White Rock",
"EAF6EE": "Panache",
"EAF6FF": "Solitude",
"EAF9F5": "Aqua Spring",
"EAFFFE": "Dew",
"EB9373": "Apricot",
"EBC2AF": "Zinnwaldite",
"ECA927": "Fuel Yellow",
"ECC54E": "Ronchi",
"ECC7EE": "French Lilac",
"ECCDB9": "Just Right",
"ECE090": "Wild Rice",
"ECEBBD": "Fall Green",
"ECEBCE": "Aths Special",
"ECF245": "Starship",
"ED0A3F": "Red Ribbon",
"ED7A1C": "Tango",
"ED9121": "Carrot Orange",
"ED989E": "Sea Pink",
"EDB381": "Tacao",
"EDC9AF": "Desert Sand",
"EDCDAB": "Pancho",
"EDDCB1": "Chamois",
"EDEA99": "Primrose",
"EDF5DD": "Frost",
"EDF5F5": "Aqua Haze",
"EDF6FF": "Zumthor",
"EDF9F1": "Narvik",
"EDFC84": "Honeysuckle",
"EE82EE": "Lavender Magenta",
"EEC1BE": "Beauty Bush",
"EED794": "Chalky",
"EED9C4": "Almond",
"EEDC82": "Flax",
"EEDEDA": "Bizarre",
"EEE3AD": "Double Colonial White",
"EEEEE8": "Cararra",
"EEEF78": "Manz",
"EEF0C8": "Tahuna Sands",
"EEF0F3": "Athens Gray",
"EEF3C3": "Tusk",
"EEF4DE": "Loafer",
"EEF6F7": "Catskill White",
"EEFDFF": "Twilight Blue",
"EEFF9A": "Jonquil",
"EEFFE2": "Rice Flower",
"EF863F": "Jaffa",
"EFEFEF": "Gallery",
"EFF2F3": "Porcelain",
"F091A9": "Mauvelous",
"F0D52D": "Golden Dream",
"F0DB7D": "Golden Sand",
"F0DC82": "Buff",
"F0E2EC": "Prim",
"F0E68C": "Khaki",
"F0EEFD": "Selago",
"F0EEFF": "Titan White",
"F0F8FF": "Alice Blue",
"F0FCEA": "Feta",
"F18200": "Gold Drop",
"F19BAB": "Wewak",
"F1E788": "Sahara Sand",
"F1E9D2": "Parchment",
"F1E9FF": "Blue Chalk",
"F1EEC1": "Mint Julep",
"F1F1F1": "Seashell",
"F1F7F2": "Saltpan",
"F1FFAD": "Tidal",
"F1FFC8": "Chiffon",
"F2552A": "Flamingo",
"F28500": "Tangerine",
"F2C3B2": "Mandys Pink",
"F2F2F2": "Concrete",
"F2FAFA": "Black Squeeze",
"F34723": "Pomegranate",
"F3AD16": "Buttercup",
"F3D69D": "New Orleans",
"F3D9DF": "Vanilla Ice",
"F3E7BB": "Sidecar",
"F3E9E5": "Dawn Pink",
"F3EDCF": "Wheatfield",
"F3FB62": "Canary",
"F3FBD4": "Orinoco",
"F3FFD8": "Carla",
"F400A1": "Hollywood Cerise",
"F4A460": "Sandy brown",
"F4C430": "Saffron",
"F4D81C": "Ripe Lemon",
"F4EBD3": "Janna",
"F4F2EE": "Pampas",
"F4F4F4": "Wild Sand",
"F4F8FF": "Zircon",
"F57584": "Froly",
"F5C85C": "Cream Can",
"F5C999": "Manhattan",
"F5D5A0": "Maize",
"F5DEB3": "Wheat",
"F5E7A2": "Sandwisp",
"F5E7E2": "Pot Pourri",
"F5E9D3": "Albescent White",
"F5EDEF": "Soft Peach",
"F5F3E5": "Ecru White",
"F5F5DC": "Beige",
"F5FB3D": "Golden Fizz",
"F5FFBE": "Australian Mint",
"F64A8A": "French Rose",
"F653A6": "Brilliant Rose",
"F6A4C9": "Illusion",
"F6F0E6": "Merino",
"F6F7F7": "Black Haze",
"F6FFDC": "Spring Sun",
"F7468A": "Violet Red",
"F77703": "Chilean Fire",
"F77FBE": "Persian Pink",
"F7B668": "Rajah",
"F7C8DA": "Azalea",
"F7DBE6": "We Peep",
"F7F2E1": "Quarter Spanish White",
"F7F5FA": "Whisper",
"F7FAF7": "Snow Drift",
"F8B853": "Casablanca",
"F8C3DF": "Chantilly",
"F8D9E9": "Cherub",
"F8DB9D": "Marzipan",
"F8DD5C": "Energy Yellow",
"F8E4BF": "Givry",
"F8F0E8": "White Linen",
"F8F4FF": "Magnolia",
"F8F6F1": "Spring Wood",
"F8F7DC": "Coconut Cream",
"F8F7FC": "White Lilac",
"F8F8F7": "Desert Storm",
"F8F99C": "Texas",
"F8FACD": "Corn Field",
"F8FDD3": "Mimosa",
"F95A61": "Carnation",
"F9BF58": "Saffron Mango",
"F9E0ED": "Carousel Pink",
"F9E4BC": "Dairy Cream",
"F9E663": "Portica",
"F9EAF3": "Amour",
"F9F8E4": "Rum Swizzle",
"F9FF8B": "Dolly",
"F9FFF6": "Sugar Cane",
"FA7814": "Ecstasy",
"FA9D5A": "Tan Hide",
"FAD3A2": "Corvette",
"FADFAD": "Peach Yellow",
"FAE600": "Turbo",
"FAEAB9": "Astra",
"FAECCC": "Champagne",
"FAF0E6": "Linen",
"FAF3F0": "Fantasy",
"FAF7D6": "Citrine White",
"FAFAFA": "Alabaster",
"FAFDE4": "Hint of Yellow",
"FAFFA4": "Milan",
"FB607F": "Brink Pink",
"FB8989": "Geraldine",
"FBA0E3": "Lavender Rose",
"FBA129": "Sea Buckthorn",
"FBAC13": "Sun",
"FBAED2": "Lavender Pink",
"FBB2A3": "Rose Bud",
"FBBEDA": "Cupid",
"FBCCE7": "Classic Rose",
"FBCEB1": "Apricot Peach",
"FBE7B2": "Banana Mania",
"FBE870": "Marigold Yellow",
"FBE96C": "Festival",
"FBEA8C": "Sweet Corn",
"FBEC5D": "Candy Corn",
"FBF9F9": "Hint of Red",
"FBFFBA": "Shalimar",
"FC0FC0": "Shocking Pink",
"FC80A5": "Tickle Me Pink",
"FC9C1D": "Tree Poppy",
"FCC01E": "Lightning Yellow",
"FCD667": "Goldenrod",
"FCD917": "Candlelight",
"FCDA98": "Cherokee",
"FCF4D0": "Double Pearl Lusta",
"FCF4DC": "Pearl Lusta",
"FCF8F7": "Vista White",
"FCFBF3": "Bianca",
"FCFEDA": "Moon Glow",
"FCFFE7": "China Ivory",
"FCFFF9": "Ceramic",
"FD0E35": "Torch Red",
"FD5B78": "Wild Watermelon",
"FD7B33": "Crusta",
"FD7C07": "Sorbus",
"FD9FA2": "Sweet Pink",
"FDD5B1": "Light Apricot",
"FDD7E4": "Pig Pink",
"FDE1DC": "Cinderella",
"FDE295": "Golden Glow",
"FDE910": "Lemon",
"FDF5E6": "Old Lace",
"FDF6D3": "Half Colonial White",
"FDF7AD": "Drover",
"FDFEB8": "Pale Prim",
"FDFFD5": "Cumulus",
"FE28A2": "Persian Rose",
"FE4C40": "Sunset Orange",
"FE6F5E": "Bittersweet",
"FE9D04": "California",
"FEA904": "Yellow Sea",
"FEBAAD": "Melon",
"FED33C": "Bright Sun",
"FED85D": "Dandelion",
"FEDB8D": "Salomie",
"FEE5AC": "Cape Honey",
"FEEBF3": "Remy",
"FEEFCE": "Oasis",
"FEF0EC": "Bridesmaid",
"FEF2C7": "Beeswax",
"FEF3D8": "Bleach White",
"FEF4CC": "Pipi",
"FEF4DB": "Half Spanish White",
"FEF4F8": "Wisp Pink",
"FEF5F1": "Provincial Pink",
"FEF7DE": "Half Dutch White",
"FEF8E2": "Solitaire",
"FEF8FF": "White Pointer",
"FEF9E3": "Off Yellow",
"FEFCED": "Orange White",
"FF0000": "Red",
"FF007F": "Rose",
"FF00CC": "Purple Pizzazz",
"FF00FF": "Magenta / Fuchsia",
"FF2400": "Scarlet",
"FF3399": "Wild Strawberry",
"FF33CC": "Razzle Dazzle Rose",
"FF355E": "Radical Red",
"FF3F34": "Red Orange",
"FF4040": "Coral Red",
"FF4D00": "Vermilion",
"FF4F00": "International Orange",
"FF6037": "Outrageous Orange",
"FF6600": "Blaze Orange",
"FF66FF": "Pink Flamingo",
"FF681F": "Orange",
"FF69B4": "Hot Pink",
"FF6B53": "Persimmon",
"FF6FFF": "Blush Pink",
"FF7034": "Burning Orange",
"FF7518": "Pumpkin",
"FF7D07": "Flamenco",
"FF7F00": "Flush Orange",
"FF7F50": "Coral",
"FF8C69": "Salmon",
"FF9000": "Pizazz",
"FF910F": "West Side",
"FF91A4": "Pink Salmon",
"FF9933": "Neon Carrot",
"FF9966": "Atomic Tangerine",
"FF9980": "Vivid Tangerine",
"FF9E2C": "Sunshade",
"FFA000": "Orange Peel",
"FFA194": "Mona Lisa",
"FFA500": "Web Orange",
"FFA6C9": "Carnation Pink",
"FFAB81": "Hit Pink",
"FFAE42": "Yellow Orange",
"FFB0AC": "Cornflower Lilac",
"FFB1B3": "Sundown",
"FFB31F": "My Sin",
"FFB555": "Texas Rose",
"FFB7D5": "Cotton Candy",
"FFB97B": "Macaroni and Cheese",
"FFBA00": "Selective Yellow",
"FFBD5F": "Koromiko",
"FFBF00": "Amber",
"FFC0A8": "Wax Flower",
"FFC0CB": "Pink",
"FFC3C0": "Your Pink",
"FFC901": "Supernova",
"FFCBA4": "Flesh",
"FFCC33": "Sunglow",
"FFCC5C": "Golden Tainoi",
"FFCC99": "Peach Orange",
"FFCD8C": "Chardonnay",
"FFD1DC": "Pastel Pink",
"FFD2B7": "Romantic",
"FFD38C": "Grandis",
"FFD700": "Gold",
"FFD800": "School bus Yellow",
"FFD8D9": "Cosmos",
"FFDB58": "Mustard",
"FFDCD6": "Peach Schnapps",
"FFDDAF": "Caramel",
"FFDDCD": "Tuft Bush",
"FFDDCF": "Watusi",
"FFDDF4": "Pink Lace",
"FFDEAD": "Navajo White",
"FFDEB3": "Frangipani",
"FFE1DF": "Pippin",
"FFE1F2": "Pale Rose",
"FFE2C5": "Negroni",
"FFE5A0": "Cream Brulee",
"FFE5B4": "Peach",
"FFE6C7": "Tequila",
"FFE772": "Kournikova",
"FFEAC8": "Sandy Beach",
"FFEAD4": "Karry",
"FFEC13": "Broom",
"FFEDBC": "Colonial White",
"FFEED8": "Derby",
"FFEFA1": "Vis Vis",
"FFEFC1": "Egg White",
"FFEFD5": "Papaya Whip",
"FFEFEC": "Fair Pink",
"FFF0DB": "Peach Cream",
"FFF0F5": "Lavender blush",
"FFF14F": "Gorse",
"FFF1B5": "Buttermilk",
"FFF1D8": "Pink Lady",
"FFF1EE": "Forget Me Not",
"FFF1F9": "Tutu",
"FFF39D": "Picasso",
"FFF3F1": "Chardon",
"FFF46E": "Paris Daisy",
"FFF4CE": "Barley White",
"FFF4DD": "Egg Sour",
"FFF4E0": "Sazerac",
"FFF4E8": "Serenade",
"FFF4F3": "Chablis",
"FFF5EE": "Seashell Peach",
"FFF5F3": "Sauvignon",
"FFF6D4": "Milk Punch",
"FFF6DF": "Varden",
"FFF6F5": "Rose White",
"FFF8D1": "Baja White",
"FFF9E2": "Gin Fizz",
"FFF9E6": "Early Dawn",
"FFFACD": "Lemon Chiffon",
"FFFAF4": "Bridal Heath",
"FFFBDC": "Scotch Mist",
"FFFBF9": "Soapstone",
"FFFC99": "Witch Haze",
"FFFCEA": "Buttery White",
"FFFCEE": "Island Spice",
"FFFDD0": "Cream",
"FFFDE6": "Chilean Heath",
"FFFDE8": "Travertine",
"FFFDF3": "Orchid White",
"FFFDF4": "Quarter Pearl Lusta",
"FFFEE1": "Half and Half",
"FFFEEC": "Apricot White",
"FFFEF0": "Rice Cake",
"FFFEF6": "Black White",
"FFFEFD": "Romance",
"FFFF00": "Yellow",
"FFFF66": "Laser Lemon",
"FFFF99": "Pale Canary",
"FFFFB4": "Portafino",
"FFFFF0": "Ivory",
"FFFFFF": "White"
}
| names: {'000000': 'Black', '000080': 'Navy Blue', '0000C8': 'Dark Blue', '0000FF': 'Blue', '000741': 'Stratos', '001B1C': 'Swamp', '002387': 'Resolution Blue', '002900': 'Deep Fir', '002E20': 'Burnham', '002FA7': 'International Klein Blue', '003153': 'Prussian Blue', '003366': 'Midnight Blue', '003399': 'Smalt', '003532': 'Deep Teal', '003E40': 'Cyprus', '004620': 'Kaitoke Green', '0047AB': 'Cobalt', '004816': 'Crusoe', '004950': 'Sherpa Blue', '0056A7': 'Endeavour', '00581A': 'Camarone', '0066CC': 'Science Blue', '0066FF': 'Blue Ribbon', '00755E': 'Tropical Rain Forest', '0076A3': 'Allports', '007BA7': 'Deep Cerulean', '007EC7': 'Lochmara', '007FFF': 'Azure Radiance', '008080': 'Teal', '0095B6': 'Bondi Blue', '009DC4': 'Pacific Blue', '00A693': 'Persian Green', '00A86B': 'Jade', '00CC99': 'Caribbean Green', '00CCCC': "Robin's Egg Blue", '00FF00': 'Green', '00FF7F': 'Spring Green', '00FFFF': 'Cyan / Aqua', '010D1A': 'Blue Charcoal', '011635': 'Midnight', '011D13': 'Holly', '012731': 'Daintree', '01361C': 'Cardin Green', '01371A': 'County Green', '013E62': 'Astronaut Blue', '013F6A': 'Regal Blue', '014B43': 'Aqua Deep', '015E85': 'Orient', '016162': 'Blue Stone', '016D39': 'Fun Green', '01796F': 'Pine Green', '017987': 'Blue Lagoon', '01826B': 'Deep Sea', '01A368': 'Green Haze', '022D15': 'English Holly', '02402C': 'Sherwood Green', '02478E': 'Congress Blue', '024E46': 'Evening Sea', '026395': 'Bahama Blue', '02866F': 'Observatory', '02A4D3': 'Cerulean', '03163C': 'Tangaroa', '032B52': 'Green Vogue', '036A6E': 'Mosque', '041004': 'Midnight Moss', '041322': 'Black Pearl', '042E4C': 'Blue Whale', '044022': 'Zuccini', '044259': 'Teal Blue', '051040': 'Deep Cove', '051657': 'Gulf Blue', '055989': 'Venice Blue', '056F57': 'Watercourse', '062A78': 'Catalina Blue', '063537': 'Tiber', '069B81': 'Gossamer', '06A189': 'Niagara', '073A50': 'Tarawera', '080110': 'Jaguar', '081910': 'Black Bean', '082567': 'Deep Sapphire', '088370': 'Elf Green', '08E8DE': 'Bright Turquoise', '092256': 'Downriver', '09230F': 'Palm Green', '09255D': 'Madison', '093624': 'Bottle Green', '095859': 'Deep Sea Green', '097F4B': 'Salem', '0A001C': 'Black Russian', '0A480D': 'Dark Fern', '0A6906': 'Japanese Laurel', '0A6F75': 'Atoll', '0B0B0B': 'Cod Gray', '0B0F08': 'Marshland', '0B1107': 'Gordons Green', '0B1304': 'Black Forest', '0B6207': 'San Felix', '0BDA51': 'Malachite', '0C0B1D': 'Ebony', '0C0D0F': 'Woodsmoke', '0C1911': 'Racing Green', '0C7A79': 'Surfie Green', '0C8990': 'Blue Chill', '0D0332': 'Black Rock', '0D1117': 'Bunker', '0D1C19': 'Aztec', '0D2E1C': 'Bush', '0E0E18': 'Cinder', '0E2A30': 'Firefly', '0F2D9E': 'Torea Bay', '10121D': 'Vulcan', '101405': 'Green Waterloo', '105852': 'Eden', '110C6C': 'Arapawa', '120A8F': 'Ultramarine', '123447': 'Elephant', '126B40': 'Jewel', '130000': 'Diesel', '130A06': 'Asphalt', '13264D': 'Blue Zodiac', '134F19': 'Parsley', '140600': 'Nero', '1450AA': 'Tory Blue', '151F4C': 'Bunting', '1560BD': 'Denim', '15736B': 'Genoa', '161928': 'Mirage', '161D10': 'Hunter Green', '162A40': 'Big Stone', '163222': 'Celtic', '16322C': 'Timber Green', '163531': 'Gable Green', '171F04': 'Pine Tree', '175579': 'Chathams Blue', '182D09': 'Deep Forest Green', '18587A': 'Blumine', '19330E': 'Palm Leaf', '193751': 'Nile Blue', '1959A8': 'Fun Blue', '1A1A68': 'Lucky Point', '1AB385': 'Mountain Meadow', '1B0245': 'Tolopea', '1B1035': 'Haiti', '1B127B': 'Deep Koamaru', '1B1404': 'Acadia', '1B2F11': 'Seaweed', '1B3162': 'Biscay', '1B659D': 'Matisse', '1C1208': 'Crowshead', '1C1E13': 'Rangoon Green', '1C39BB': 'Persian Blue', '1C402E': 'Everglade', '1C7C7D': 'Elm', '1D6142': 'Green Pea', '1E0F04': 'Creole', '1E1609': 'Karaka', '1E1708': 'El Paso', '1E385B': 'Cello', '1E433C': 'Te Papa Green', '1E90FF': 'Dodger Blue', '1E9AB0': 'Eastern Blue', '1F120F': 'Night Rider', '1FC2C2': 'Java', '20208D': 'Jacksons Purple', '202E54': 'Cloud Burst', '204852': 'Blue Dianne', '211A0E': 'Eternity', '220878': 'Deep Blue', '228B22': 'Forest Green', '233418': 'Mallard', '240A40': 'Violet', '240C02': 'Kilamanjaro', '242A1D': 'Log Cabin', '242E16': 'Black Olive', '24500F': 'Green House', '251607': 'Graphite', '251706': 'Cannon Black', '251F4F': 'Port Gore', '25272C': 'Shark', '25311C': 'Green Kelp', '2596D1': 'Curious Blue', '260368': 'Paua', '26056A': 'Paris M', '261105': 'Wood Bark', '261414': 'Gondola', '262335': 'Steel Gray', '26283B': 'Ebony Clay', '273A81': 'Bay of Many', '27504B': 'Plantation', '278A5B': 'Eucalyptus', '281E15': 'Oil', '283A77': 'Astronaut', '286ACD': 'Mariner', '290C5E': 'Violent Violet', '292130': 'Bastille', '292319': 'Zeus', '292937': 'Charade', '297B9A': 'Jelly Bean', '29AB87': 'Jungle Green', '2A0359': 'Cherry Pie', '2A140E': 'Coffee Bean', '2A2630': 'Baltic Sea', '2A380B': 'Turtle Green', '2A52BE': 'Cerulean Blue', '2B0202': 'Sepia Black', '2B194F': 'Valhalla', '2B3228': 'Heavy Metal', '2C0E8C': 'Blue Gem', '2C1632': 'Revolver', '2C2133': 'Bleached Cedar', '2C8C84': 'Lochinvar', '2D2510': 'Mikado', '2D383A': 'Outer Space', '2D569B': 'St Tropaz', '2E0329': 'Jacaranda', '2E1905': 'Jacko Bean', '2E3222': 'Rangitoto', '2E3F62': 'Rhino', '2E8B57': 'Sea Green', '2EBFD4': 'Scooter', '2F270E': 'Onion', '2F3CB3': 'Governor Bay', '2F519E': 'Sapphire', '2F5A57': 'Spectra', '2F6168': 'Casal', '300529': 'Melanzane', '301F1E': 'Cocoa Brown', '302A0F': 'Woodrush', '304B6A': 'San Juan', '30D5C8': 'Turquoise', '311C17': 'Eclipse', '314459': 'Pickled Bluewood', '315BA1': 'Azure', '31728D': 'Calypso', '317D82': 'Paradiso', '32127A': 'Persian Indigo', '32293A': 'Blackcurrant', '323232': 'Mine Shaft', '325D52': 'Stromboli', '327C14': 'Bilbao', '327DA0': 'Astral', '33036B': 'Christalle', '33292F': 'Thunder', '33CC99': 'Shamrock', '341515': 'Tamarind', '350036': 'Mardi Gras', '350E42': 'Valentino', '350E57': 'Jagger', '353542': 'Tuna', '354E8C': 'Chambray', '363050': 'Martinique', '363534': 'Tuatara', '363C0D': 'Waiouru', '36747D': 'Ming', '368716': 'La Palma', '370202': 'Chocolate', '371D09': 'Clinker', '37290E': 'Brown Tumbleweed', '373021': 'Birch', '377475': 'Oracle', '380474': 'Blue Diamond', '381A51': 'Grape', '383533': 'Dune', '384555': 'Oxford Blue', '384910': 'Clover', '394851': 'Limed Spruce', '396413': 'Dell', '3A0020': 'Toledo', '3A2010': 'Sambuca', '3A2A6A': 'Jacarta', '3A686C': 'William', '3A6A47': 'Killarney', '3AB09E': 'Keppel', '3B000B': 'Temptress', '3B0910': 'Aubergine', '3B1F1F': 'Jon', '3B2820': 'Treehouse', '3B7A57': 'Amazon', '3B91B4': 'Boston Blue', '3C0878': 'Windsor', '3C1206': 'Rebel', '3C1F76': 'Meteorite', '3C2005': 'Dark Ebony', '3C3910': 'Camouflage', '3C4151': 'Bright Gray', '3C4443': 'Cape Cod', '3C493A': 'Lunar Green', '3D0C02': 'Bean ', '3D2B1F': 'Bistre', '3D7D52': 'Goblin', '3E0480': 'Kingfisher Daisy', '3E1C14': 'Cedar', '3E2B23': 'English Walnut', '3E2C1C': 'Black Marlin', '3E3A44': 'Ship Gray', '3EABBF': 'Pelorous', '3F2109': 'Bronze', '3F2500': 'Cola', '3F3002': 'Madras', '3F307F': 'Minsk', '3F4C3A': 'Cabbage Pont', '3F583B': 'Tom Thumb', '3F5D53': 'Mineral Green', '3FC1AA': 'Puerto Rico', '3FFF00': 'Harlequin', '401801': 'Brown Pod', '40291D': 'Cork', '403B38': 'Masala', '403D19': 'Thatch Green', '405169': 'Fiord', '40826D': 'Viridian', '40A860': 'Chateau Green', '410056': 'Ripe Plum', '411F10': 'Paco', '412010': 'Deep Oak', '413C37': 'Merlin', '414257': 'Gun Powder', '414C7D': 'East Bay', '4169E1': 'Royal Blue', '41AA78': 'Ocean Green', '420303': 'Burnt Maroon', '423921': 'Lisbon Brown', '427977': 'Faded Jade', '431560': 'Scarlet Gum', '433120': 'Iroko', '433E37': 'Armadillo', '434C59': 'River Bed', '436A0D': 'Green Leaf', '44012D': 'Barossa', '441D00': 'Morocco Brown', '444954': 'Mako', '454936': 'Kelp', '456CAC': 'San Marino', '45B1E8': 'Picton Blue', '460B41': 'Loulou', '462425': 'Crater Brown', '465945': 'Gray Asparagus', '4682B4': 'Steel Blue', '480404': 'Rustic Red', '480607': 'Bulgarian Rose', '480656': 'Clairvoyant', '481C1C': 'Cocoa Bean', '483131': 'Woody Brown', '483C32': 'Taupe', '49170C': 'Van Cleef', '492615': 'Brown Derby', '49371B': 'Metallic Bronze', '495400': 'Verdun Green', '496679': 'Blue Bayoux', '497183': 'Bismark', '4A2A04': 'Bracken', '4A3004': 'Deep Bronze', '4A3C30': 'Mondo', '4A4244': 'Tundora', '4A444B': 'Gravel', '4A4E5A': 'Trout', '4B0082': 'Pigment Indigo', '4B5D52': 'Nandor', '4C3024': 'Saddle', '4C4F56': 'Abbey', '4D0135': 'Blackberry', '4D0A18': 'Cab Sav', '4D1E01': 'Indian Tan', '4D282D': 'Cowboy', '4D282E': 'Livid Brown', '4D3833': 'Rock', '4D3D14': 'Punga', '4D400F': 'Bronzetone', '4D5328': 'Woodland', '4E0606': 'Mahogany', '4E2A5A': 'Bossanova', '4E3B41': 'Matterhorn', '4E420C': 'Bronze Olive', '4E4562': 'Mulled Wine', '4E6649': 'Axolotl', '4E7F9E': 'Wedgewood', '4EABD1': 'Shakespeare', '4F1C70': 'Honey Flower', '4F2398': 'Daisy Bush', '4F69C6': 'Indigo', '4F7942': 'Fern Green', '4F9D5D': 'Fruit Salad', '4FA83D': 'Apple', '504351': 'Mortar', '507096': 'Kashmir Blue', '507672': 'Cutty Sark', '50C878': 'Emerald', '514649': 'Emperor', '516E3D': 'Chalet Green', '517C66': 'Como', '51808F': 'Smalt Blue', '52001F': 'Castro', '520C17': 'Maroon Oak', '523C94': 'Gigas', '533455': 'Voodoo', '534491': 'Victoria', '53824B': 'Hippie Green', '541012': 'Heath', '544333': 'Judge Gray', '54534D': 'Fuscous Gray', '549019': 'Vida Loca', '55280C': 'Cioccolato', '555B10': 'Saratoga', '556D56': 'Finlandia', '5590D9': 'Havelock Blue', '56B4BE': 'Fountain Blue', '578363': 'Spring Leaves', '583401': 'Saddle Brown', '585562': 'Scarpa Flow', '587156': 'Cactus', '589AAF': 'Hippie Blue', '591D35': 'Wine Berry', '592804': 'Brown Bramble', '593737': 'Congo Brown', '594433': 'Millbrook', '5A6E9C': 'Waikawa Gray', '5A87A0': 'Horizon', '5B3013': 'Jambalaya', '5C0120': 'Bordeaux', '5C0536': 'Mulberry Wood', '5C2E01': 'Carnaby Tan', '5C5D75': 'Comet', '5D1E0F': 'Redwood', '5D4C51': 'Don Juan', '5D5C58': 'Chicago', '5D5E37': 'Verdigris', '5D7747': 'Dingley', '5DA19F': 'Breaker Bay', '5E483E': 'Kabul', '5E5D3B': 'Hemlock', '5F3D26': 'Irish Coffee', '5F5F6E': 'Mid Gray', '5F6672': 'Shuttle Gray', '5FA777': 'Aqua Forest', '5FB3AC': 'Tradewind', '604913': 'Horses Neck', '605B73': 'Smoky', '606E68': 'Corduroy', '6093D1': 'Danube', '612718': 'Espresso', '614051': 'Eggplant', '615D30': 'Costa Del Sol', '61845F': 'Glade Green', '622F30': 'Buccaneer', '623F2D': 'Quincy', '624E9A': 'Butterfly Bush', '625119': 'West Coast', '626649': 'Finch', '639A8F': 'Patina', '63B76C': 'Fern', '6456B7': 'Blue Violet', '646077': 'Dolphin', '646463': 'Storm Dust', '646A54': 'Siam', '646E75': 'Nevada', '6495ED': 'Cornflower Blue', '64CCDB': 'Viking', '65000B': 'Rosewood', '651A14': 'Cherrywood', '652DC1': 'Purple Heart', '657220': 'Fern Frond', '65745D': 'Willow Grove', '65869F': 'Hoki', '660045': 'Pompadour', '660099': 'Purple', '66023C': 'Tyrian Purple', '661010': 'Dark Tan', '66B58F': 'Silver Tree', '66FF00': 'Bright Green', '66FF66': "Screamin' Green", '67032D': 'Black Rose', '675FA6': 'Scampi', '676662': 'Ironside Gray', '678975': 'Viridian Green', '67A712': 'Christi', '683600': 'Nutmeg Wood Finish', '685558': 'Zambezi', '685E6E': 'Salt Box', '692545': 'Tawny Port', '692D54': 'Finn', '695F62': 'Scorpion', '697E9A': 'Lynch', '6A442E': 'Spice', '6A5D1B': 'Himalaya', '6A6051': 'Soya Bean', '6B2A14': 'Hairy Heath', '6B3FA0': 'Royal Purple', '6B4E31': 'Shingle Fawn', '6B5755': 'Dorado', '6B8BA2': 'Bermuda Gray', '6B8E23': 'Olive Drab', '6C3082': 'Eminence', '6CDAE7': 'Turquoise Blue', '6D0101': 'Lonestar', '6D5E54': 'Pine Cone', '6D6C6C': 'Dove Gray', '6D9292': 'Juniper', '6D92A1': 'Gothic', '6E0902': 'Red Oxide', '6E1D14': 'Moccaccino', '6E4826': 'Pickled Bean', '6E4B26': 'Dallas', '6E6D57': 'Kokoda', '6E7783': 'Pale Sky', '6F440C': 'Cafe Royale', '6F6A61': 'Flint', '6F8E63': 'Highland', '6F9D02': 'Limeade', '6FD0C5': 'Downy', '701C1C': 'Persian Plum', '704214': 'Sepia', '704A07': 'Antique Bronze', '704F50': 'Ferra', '706555': 'Coffee', '708090': 'Slate Gray', '711A00': 'Cedar Wood Finish', '71291D': 'Metallic Copper', '714693': 'Affair', '714AB2': 'Studio', '715D47': 'Tobacco Brown', '716338': 'Yellow Metal', '716B56': 'Peat', '716E10': 'Olivetone', '717486': 'Storm Gray', '718080': 'Sirocco', '71D9E2': 'Aquamarine Blue', '72010F': 'Venetian Red', '724A2F': 'Old Copper', '726D4E': 'Go Ben', '727B89': 'Raven', '731E8F': 'Seance', '734A12': 'Raw Umber', '736C9F': 'Kimberly', '736D58': 'Crocodile', '737829': 'Crete', '738678': 'Xanadu', '74640D': 'Spicy Mustard', '747D63': 'Limed Ash', '747D83': 'Rolling Stone', '748881': 'Blue Smoke', '749378': 'Laurel', '74C365': 'Mantis', '755A57': 'Russett', '7563A8': 'Deluge', '76395D': 'Cosmic', '7666C6': 'Blue Marguerite', '76BD17': 'Lima', '76D7EA': 'Sky Blue', '770F05': 'Dark Burgundy', '771F1F': 'Crown of Thorns', '773F1A': 'Walnut', '776F61': 'Pablo', '778120': 'Pacifika', '779E86': 'Oxley', '77DD77': 'Pastel Green', '780109': 'Japanese Maple', '782D19': 'Mocha', '782F16': 'Peanut', '78866B': 'Camouflage Green', '788A25': 'Wasabi', '788BBA': 'Ship Cove', '78A39C': 'Sea Nymph', '795D4C': 'Roman Coffee', '796878': 'Old Lavender', '796989': 'Rum', '796A78': 'Fedora', '796D62': 'Sandstone', '79DEEC': 'Spray', '7A013A': 'Siren', '7A58C1': 'Fuchsia Blue', '7A7A7A': 'Boulder', '7A89B8': 'Wild Blue Yonder', '7AC488': 'De York', '7B3801': 'Red Beech', '7B3F00': 'Cinnamon', '7B6608': 'Yukon Gold', '7B7874': 'Tapa', '7B7C94': 'Waterloo ', '7B8265': 'Flax Smoke', '7B9F80': 'Amulet', '7BA05B': 'Asparagus', '7C1C05': 'Kenyan Copper', '7C7631': 'Pesto', '7C778A': 'Topaz', '7C7B7A': 'Concord', '7C7B82': 'Jumbo', '7C881A': 'Trendy Green', '7CA1A6': 'Gumbo', '7CB0A1': 'Acapulco', '7CB7BB': 'Neptune', '7D2C14': 'Pueblo', '7DA98D': 'Bay Leaf', '7DC8F7': 'Malibu', '7DD8C6': 'Bermuda', '7E3A15': 'Copper Canyon', '7F1734': 'Claret', '7F3A02': 'Peru Tan', '7F626D': 'Falcon', '7F7589': 'Mobster', '7F76D3': 'Moody Blue', '7FFF00': 'Chartreuse', '7FFFD4': 'Aquamarine', '800000': 'Maroon', '800B47': 'Rose Bud Cherry', '801818': 'Falu Red', '80341F': 'Red Robin', '803790': 'Vivid Violet', '80461B': 'Russet', '807E79': 'Friar Gray', '808000': 'Olive', '808080': 'Gray', '80B3AE': 'Gulf Stream', '80B3C4': 'Glacier', '80CCEA': 'Seagull', '81422C': 'Nutmeg', '816E71': 'Spicy Pink', '817377': 'Empress', '819885': 'Spanish Green', '826F65': 'Sand Dune', '828685': 'Gunsmoke', '828F72': 'Battleship Gray', '831923': 'Merlot', '837050': 'Shadow', '83AA5D': 'Chelsea Cucumber', '83D0C6': 'Monte Carlo', '843179': 'Plum', '84A0A0': 'Granny Smith', '8581D9': 'Chetwode Blue', '858470': 'Bandicoot', '859FAF': 'Bali Hai', '85C4CC': 'Half Baked', '860111': 'Red Devil', '863C3C': 'Lotus', '86483C': 'Ironstone', '864D1E': 'Bull Shot', '86560A': 'Rusty Nail', '868974': 'Bitter', '86949F': 'Regent Gray', '871550': 'Disco', '87756E': 'Americano', '877C7B': 'Hurricane', '878D91': 'Oslo Gray', '87AB39': 'Sushi', '885342': 'Spicy Mix', '886221': 'Kumera', '888387': 'Suva Gray', '888D65': 'Avocado', '893456': 'Camelot', '893843': 'Solid Pink', '894367': 'Cannon Pink', '897D6D': 'Makara', '8A3324': 'Burnt Umber', '8A73D6': 'True V', '8A8360': 'Clay Creek', '8A8389': 'Monsoon', '8A8F8A': 'Stack', '8AB9F1': 'Jordy Blue', '8B00FF': 'Electric Violet', '8B0723': 'Monarch', '8B6B0B': 'Corn Harvest', '8B8470': 'Olive Haze', '8B847E': 'Schooner', '8B8680': 'Natural Gray', '8B9C90': 'Mantle', '8B9FEE': 'Portage', '8BA690': 'Envy', '8BA9A5': 'Cascade', '8BE6D8': 'Riptide', '8C055E': 'Cardinal Pink', '8C472F': 'Mule Fawn', '8C5738': 'Potters Clay', '8C6495': 'Trendy Pink', '8D0226': 'Paprika', '8D3D38': 'Sanguine Brown', '8D3F3F': 'Tosca', '8D7662': 'Cement', '8D8974': 'Granite Green', '8D90A1': 'Manatee', '8DA8CC': 'Polo Blue', '8E0000': 'Red Berry', '8E4D1E': 'Rope', '8E6F70': 'Opium', '8E775E': 'Domino', '8E8190': 'Mamba', '8EABC1': 'Nepal', '8F021C': 'Pohutukawa', '8F3E33': 'El Salva', '8F4B0E': 'Korma', '8F8176': 'Squirrel', '8FD6B4': 'Vista Blue', '900020': 'Burgundy', '901E1E': 'Old Brick', '907874': 'Hemp', '907B71': 'Almond Frost', '908D39': 'Sycamore', '92000A': 'Sangria', '924321': 'Cumin', '926F5B': 'Beaver', '928573': 'Stonewall', '928590': 'Venus', '9370DB': 'Medium Purple', '93CCEA': 'Cornflower', '93DFB8': 'Algae Green', '944747': 'Copper Rust', '948771': 'Arrowtown', '950015': 'Scarlett', '956387': 'Strikemaster', '959396': 'Mountain Mist', '960018': 'Carmine', '964B00': 'Brown', '967059': 'Leather', '9678B6': "Purple Mountain's Majesty", '967BB6': 'Lavender Purple', '96A8A1': 'Pewter', '96BBAB': 'Summer Green', '97605D': 'Au Chico', '9771B5': 'Wisteria', '97CD2D': 'Atlantis', '983D61': 'Vin Rouge', '9874D3': 'Lilac Bush', '98777B': 'Bazaar', '98811B': 'Hacienda', '988D77': 'Pale Oyster', '98FF98': 'Mint Green', '990066': 'Fresh Eggplant', '991199': 'Violet Eggplant', '991613': 'Tamarillo', '991B07': 'Totem Pole', '996666': 'Copper Rose', '9966CC': 'Amethyst', '997A8D': 'Mountbatten Pink', '9999CC': 'Blue Bell', '9A3820': 'Prairie Sand', '9A6E61': 'Toast', '9A9577': 'Gurkha', '9AB973': 'Olivine', '9AC2B8': 'Shadow Green', '9B4703': 'Oregon', '9B9E8F': 'Lemon Grass', '9C3336': 'Stiletto', '9D5616': 'Hawaiian Tan', '9DACB7': 'Gull Gray', '9DC209': 'Pistachio', '9DE093': 'Granny Smith Apple', '9DE5FF': 'Anakiwa', '9E5302': 'Chelsea Gem', '9E5B40': 'Sepia Skin', '9EA587': 'Sage', '9EA91F': 'Citron', '9EB1CD': 'Rock Blue', '9EDEE0': 'Morning Glory', '9F381D': 'Cognac', '9F821C': 'Reef Gold', '9F9F9C': 'Star Dust', '9FA0B1': 'Santas Gray', '9FD7D3': 'Sinbad', '9FDD8C': 'Feijoa', 'A02712': 'Tabasco', 'A1750D': 'Buttered Rum', 'A1ADB5': 'Hit Gray', 'A1C50A': 'Citrus', 'A1DAD7': 'Aqua Island', 'A1E9DE': 'Water Leaf', 'A2006D': 'Flirt', 'A23B6C': 'Rouge', 'A26645': 'Cape Palliser', 'A2AAB3': 'Gray Chateau', 'A2AEAB': 'Edward', 'A3807B': 'Pharlap', 'A397B4': 'Amethyst Smoke', 'A3E3ED': 'Blizzard Blue', 'A4A49D': 'Delta', 'A4A6D3': 'Wistful', 'A4AF6E': 'Green Smoke', 'A50B5E': 'Jazzberry Jam', 'A59B91': 'Zorba', 'A5CB0C': 'Bahia', 'A62F20': 'Roof Terracotta', 'A65529': 'Paarl', 'A68B5B': 'Barley Corn', 'A69279': 'Donkey Brown', 'A6A29A': 'Dawn', 'A72525': 'Mexican Red', 'A7882C': 'Luxor Gold', 'A85307': 'Rich Gold', 'A86515': 'Reno Sand', 'A86B6B': 'Coral Tree', 'A8989B': 'Dusty Gray', 'A899E6': 'Dull Lavender', 'A8A589': 'Tallow', 'A8AE9C': 'Bud', 'A8AF8E': 'Locust', 'A8BD9F': 'Norway', 'A8E3BD': 'Chinook', 'A9A491': 'Gray Olive', 'A9ACB6': 'Aluminium', 'A9B2C3': 'Cadet Blue', 'A9B497': 'Schist', 'A9BDBF': 'Tower Gray', 'A9BEF2': 'Perano', 'A9C6C2': 'Opal', 'AA375A': 'Night Shadz', 'AA4203': 'Fire', 'AA8B5B': 'Muesli', 'AA8D6F': 'Sandal', 'AAA5A9': 'Shady Lady', 'AAA9CD': 'Logan', 'AAABB7': 'Spun Pearl', 'AAD6E6': 'Regent St Blue', 'AAF0D1': 'Magic Mint', 'AB0563': 'Lipstick', 'AB3472': 'Royal Heath', 'AB917A': 'Sandrift', 'ABA0D9': 'Cold Purple', 'ABA196': 'Bronco', 'AC8A56': 'Limed Oak', 'AC91CE': 'East Side', 'AC9E22': 'Lemon Ginger', 'ACA494': 'Napa', 'ACA586': 'Hillary', 'ACA59F': 'Cloudy', 'ACACAC': 'Silver Chalice', 'ACB78E': 'Swamp Green', 'ACCBB1': 'Spring Rain', 'ACDD4D': 'Conifer', 'ACE1AF': 'Celadon', 'AD781B': 'Mandalay', 'ADBED1': 'Casper', 'ADDFAD': 'Moss Green', 'ADE6C4': 'Padua', 'ADFF2F': 'Green Yellow', 'AE4560': 'Hippie Pink', 'AE6020': 'Desert', 'AE809E': 'Bouquet', 'AF4035': 'Medium Carmine', 'AF4D43': 'Apple Blossom', 'AF593E': 'Brown Rust', 'AF8751': 'Driftwood', 'AF8F2C': 'Alpine', 'AF9F1C': 'Lucky', 'AFA09E': 'Martini', 'AFB1B8': 'Bombay', 'AFBDD9': 'Pigeon Post', 'B04C6A': 'Cadillac', 'B05D54': 'Matrix', 'B05E81': 'Tapestry', 'B06608': 'Mai Tai', 'B09A95': 'Del Rio', 'B0E0E6': 'Powder Blue', 'B0E313': 'Inch Worm', 'B10000': 'Bright Red', 'B14A0B': 'Vesuvius', 'B1610B': 'Pumpkin Skin', 'B16D52': 'Santa Fe', 'B19461': 'Teak', 'B1E2C1': 'Fringy Flower', 'B1F4E7': 'Ice Cold', 'B20931': 'Shiraz', 'B2A1EA': 'Biloba Flower', 'B32D29': 'Tall Poppy', 'B35213': 'Fiery Orange', 'B38007': 'Hot Toddy', 'B3AF95': 'Taupe Gray', 'B3C110': 'La Rioja', 'B43332': 'Well Read', 'B44668': 'Blush', 'B4CFD3': 'Jungle Mist', 'B57281': 'Turkish Rose', 'B57EDC': 'Lavender', 'B5A27F': 'Mongoose', 'B5B35C': 'Olive Green', 'B5D2CE': 'Jet Stream', 'B5ECDF': 'Cruise', 'B6316C': 'Hibiscus', 'B69D98': 'Thatch', 'B6B095': 'Heathered Gray', 'B6BAA4': 'Eagle', 'B6D1EA': 'Spindle', 'B6D3BF': 'Gum Leaf', 'B7410E': 'Rust', 'B78E5C': 'Muddy Waters', 'B7A214': 'Sahara', 'B7A458': 'Husk', 'B7B1B1': 'Nobel', 'B7C3D0': 'Heather', 'B7F0BE': 'Madang', 'B81104': 'Milano Red', 'B87333': 'Copper', 'B8B56A': 'Gimblet', 'B8C1B1': 'Green Spring', 'B8C25D': 'Celery', 'B8E0F9': 'Sail', 'B94E48': 'Chestnut', 'B95140': 'Crail', 'B98D28': 'Marigold', 'B9C46A': 'Wild Willow', 'B9C8AC': 'Rainee', 'BA0101': 'Guardsman Red', 'BA450C': 'Rock Spray', 'BA6F1E': 'Bourbon', 'BA7F03': 'Pirate Gold', 'BAB1A2': 'Nomad', 'BAC7C9': 'Submarine', 'BAEEF9': 'Charlotte', 'BB3385': 'Medium Red Violet', 'BB8983': 'Brandy Rose', 'BBD009': 'Rio Grande', 'BBD7C1': 'Surf', 'BCC9C2': 'Powder Ash', 'BD5E2E': 'Tuscany', 'BD978E': 'Quicksand', 'BDB1A8': 'Silk', 'BDB2A1': 'Malta', 'BDB3C7': 'Chatelle', 'BDBBD7': 'Lavender Gray', 'BDBDC6': 'French Gray', 'BDC8B3': 'Clay Ash', 'BDC9CE': 'Loblolly', 'BDEDFD': 'French Pass', 'BEA6C3': 'London Hue', 'BEB5B7': 'Pink Swan', 'BEDE0D': 'Fuego', 'BF5500': 'Rose of Sharon', 'BFB8B0': 'Tide', 'BFBED8': 'Blue Haze', 'BFC1C2': 'Silver Sand', 'BFC921': 'Key Lime Pie', 'BFDBE2': 'Ziggurat', 'BFFF00': 'Lime', 'C02B18': 'Thunderbird', 'C04737': 'Mojo', 'C08081': 'Old Rose', 'C0C0C0': 'Silver', 'C0D3B9': 'Pale Leaf', 'C0D8B6': 'Pixie Green', 'C1440E': 'Tia Maria', 'C154C1': 'Fuchsia Pink', 'C1A004': 'Buddha Gold', 'C1B7A4': 'Bison Hide', 'C1BAB0': 'Tea', 'C1BECD': 'Gray Suit', 'C1D7B0': 'Sprout', 'C1F07C': 'Sulu', 'C26B03': 'Indochine', 'C2955D': 'Twine', 'C2BDB6': 'Cotton Seed', 'C2CAC4': 'Pumice', 'C2E8E5': 'Jagged Ice', 'C32148': 'Maroon Flush', 'C3B091': 'Indian Khaki', 'C3BFC1': 'Pale Slate', 'C3C3BD': 'Gray Nickel', 'C3CDE6': 'Periwinkle Gray', 'C3D1D1': 'Tiara', 'C3DDF9': 'Tropical Blue', 'C41E3A': 'Cardinal', 'C45655': 'Fuzzy Wuzzy Brown', 'C45719': 'Orange Roughy', 'C4C4BC': 'Mist Gray', 'C4D0B0': 'Coriander', 'C4F4EB': 'Mint Tulip', 'C54B8C': 'Mulberry', 'C59922': 'Nugget', 'C5994B': 'Tussock', 'C5DBCA': 'Sea Mist', 'C5E17A': 'Yellow Green', 'C62D42': 'Brick Red', 'C6726B': 'Contessa', 'C69191': 'Oriental Pink', 'C6A84B': 'Roti', 'C6C3B5': 'Ash', 'C6C8BD': 'Kangaroo', 'C6E610': 'Las Palmas', 'C7031E': 'Monza', 'C71585': 'Red Violet', 'C7BCA2': 'Coral Reef', 'C7C1FF': 'Melrose', 'C7C4BF': 'Cloud', 'C7C9D5': 'Ghost', 'C7CD90': 'Pine Glade', 'C7DDE5': 'Botticelli', 'C88A65': 'Antique Brass', 'C8A2C8': 'Lilac', 'C8A528': 'Hokey Pokey', 'C8AABF': 'Lily', 'C8B568': 'Laser', 'C8E3D7': 'Edgewater', 'C96323': 'Piper', 'C99415': 'Pizza', 'C9A0DC': 'Light Wisteria', 'C9B29B': 'Rodeo Dust', 'C9B35B': 'Sundance', 'C9B93B': 'Earls Green', 'C9C0BB': 'Silver Rust', 'C9D9D2': 'Conch', 'C9FFA2': 'Reef', 'C9FFE5': 'Aero Blue', 'CA3435': 'Flush Mahogany', 'CABB48': 'Turmeric', 'CADCD4': 'Paris White', 'CAE00D': 'Bitter Lemon', 'CAE6DA': 'Skeptic', 'CB8FA9': 'Viola', 'CBCAB6': 'Foggy Gray', 'CBD3B0': 'Green Mist', 'CBDBD6': 'Nebula', 'CC3333': 'Persian Red', 'CC5500': 'Burnt Orange', 'CC7722': 'Ochre', 'CC8899': 'Puce', 'CCCAA8': 'Thistle Green', 'CCCCFF': 'Periwinkle', 'CCFF00': 'Electric Lime', 'CD5700': 'Tenn', 'CD5C5C': 'Chestnut Rose', 'CD8429': 'Brandy Punch', 'CDF4FF': 'Onahau', 'CEB98F': 'Sorrell Brown', 'CEBABA': 'Cold Turkey', 'CEC291': 'Yuma', 'CEC7A7': 'Chino', 'CFA39D': 'Eunry', 'CFB53B': 'Old Gold', 'CFDCCF': 'Tasman', 'CFE5D2': 'Surf Crest', 'CFF9F3': 'Humming Bird', 'CFFAF4': 'Scandal', 'D05F04': 'Red Stage', 'D06DA1': 'Hopbush', 'D07D12': 'Meteor', 'D0BEF8': 'Perfume', 'D0C0E5': 'Prelude', 'D0F0C0': 'Tea Green', 'D18F1B': 'Geebung', 'D1BEA8': 'Vanilla', 'D1C6B4': 'Soft Amber', 'D1D2CA': 'Celeste', 'D1D2DD': 'Mischka', 'D1E231': 'Pear', 'D2691E': 'Hot Cinnamon', 'D27D46': 'Raw Sienna', 'D29EAA': 'Careys Pink', 'D2B48C': 'Tan', 'D2DA97': 'Deco', 'D2F6DE': 'Blue Romance', 'D2F8B0': 'Gossip', 'D3CBBA': 'Sisal', 'D3CDC5': 'Swirl', 'D47494': 'Charm', 'D4B6AF': 'Clam Shell', 'D4BF8D': 'Straw', 'D4C4A8': 'Akaroa', 'D4CD16': 'Bird Flower', 'D4D7D9': 'Iron', 'D4DFE2': 'Geyser', 'D4E2FC': 'Hawkes Blue', 'D54600': 'Grenadier', 'D591A4': 'Can Can', 'D59A6F': 'Whiskey', 'D5D195': 'Winter Hazel', 'D5F6E3': 'Granny Apple', 'D69188': 'My Pink', 'D6C562': 'Tacha', 'D6CEF6': 'Moon Raker', 'D6D6D1': 'Quill Gray', 'D6FFDB': 'Snowy Mint', 'D7837F': 'New York Pink', 'D7C498': 'Pavlova', 'D7D0FF': 'Fog', 'D84437': 'Valencia', 'D87C63': 'Japonica', 'D8BFD8': 'Thistle', 'D8C2D5': 'Maverick', 'D8FCFA': 'Foam', 'D94972': 'Cabaret', 'D99376': 'Burning Sand', 'D9B99B': 'Cameo', 'D9D6CF': 'Timberwolf', 'D9DCC1': 'Tana', 'D9E4F5': 'Link Water', 'D9F7FF': 'Mabel', 'DA3287': 'Cerise', 'DA5B38': 'Flame Pea', 'DA6304': 'Bamboo', 'DA6A41': 'Red Damask', 'DA70D6': 'Orchid', 'DA8A67': 'Copperfield', 'DAA520': 'Golden Grass', 'DAECD6': 'Zanah', 'DAF4F0': 'Iceberg', 'DAFAFF': 'Oyster Bay', 'DB5079': 'Cranberry', 'DB9690': 'Petite Orchid', 'DB995E': 'Di Serria', 'DBDBDB': 'Alto', 'DBFFF8': 'Frosted Mint', 'DC143C': 'Crimson', 'DC4333': 'Punch', 'DCB20C': 'Galliano', 'DCB4BC': 'Blossom', 'DCD747': 'Wattle', 'DCD9D2': 'Westar', 'DCDDCC': 'Moon Mist', 'DCEDB4': 'Caper', 'DCF0EA': 'Swans Down', 'DDD6D5': 'Swiss Coffee', 'DDF9F1': 'White Ice', 'DE3163': 'Cerise Red', 'DE6360': 'Roman', 'DEA681': 'Tumbleweed', 'DEBA13': 'Gold Tips', 'DEC196': 'Brandy', 'DECBC6': 'Wafer', 'DED4A4': 'Sapling', 'DED717': 'Barberry', 'DEE5C0': 'Beryl Green', 'DEF5FF': 'Pattens Blue', 'DF73FF': 'Heliotrope', 'DFBE6F': 'Apache', 'DFCD6F': 'Chenin', 'DFCFDB': 'Lola', 'DFECDA': 'Willow Brook', 'DFFF00': 'Chartreuse Yellow', 'E0B0FF': 'Mauve', 'E0B646': 'Anzac', 'E0B974': 'Harvest Gold', 'E0C095': 'Calico', 'E0FFFF': 'Baby Blue', 'E16865': 'Sunglo', 'E1BC64': 'Equator', 'E1C0C8': 'Pink Flare', 'E1E6D6': 'Periglacial Blue', 'E1EAD4': 'Kidnapper', 'E1F6E8': 'Tara', 'E25465': 'Mandy', 'E2725B': 'Terracotta', 'E28913': 'Golden Bell', 'E292C0': 'Shocking', 'E29418': 'Dixie', 'E29CD2': 'Light Orchid', 'E2D8ED': 'Snuff', 'E2EBED': 'Mystic', 'E2F3EC': 'Apple Green', 'E30B5C': 'Razzmatazz', 'E32636': 'Alizarin Crimson', 'E34234': 'Cinnabar', 'E3BEBE': 'Cavern Pink', 'E3F5E1': 'Peppermint', 'E3F988': 'Mindaro', 'E47698': 'Deep Blush', 'E49B0F': 'Gamboge', 'E4C2D5': 'Melanie', 'E4CFDE': 'Twilight', 'E4D1C0': 'Bone', 'E4D422': 'Sunflower', 'E4D5B7': 'Grain Brown', 'E4D69B': 'Zombie', 'E4F6E7': 'Frostee', 'E4FFD1': 'Snow Flurry', 'E52B50': 'Amaranth', 'E5841B': 'Zest', 'E5CCC9': 'Dust Storm', 'E5D7BD': 'Stark White', 'E5D8AF': 'Hampton', 'E5E0E1': 'Bon Jour', 'E5E5E5': 'Mercury', 'E5F9F6': 'Polar', 'E64E03': 'Trinidad', 'E6BE8A': 'Gold Sand', 'E6BEA5': 'Cashmere', 'E6D7B9': 'Double Spanish White', 'E6E4D4': 'Satin Linen', 'E6F2EA': 'Harp', 'E6F8F3': 'Off Green', 'E6FFE9': 'Hint of Green', 'E6FFFF': 'Tranquil', 'E77200': 'Mango Tango', 'E7730A': 'Christine', 'E79F8C': 'Tonys Pink', 'E79FC4': 'Kobi', 'E7BCB4': 'Rose Fog', 'E7BF05': 'Corn', 'E7CD8C': 'Putty', 'E7ECE6': 'Gray Nurse', 'E7F8FF': 'Lily White', 'E7FEFF': 'Bubbles', 'E89928': 'Fire Bush', 'E8B9B3': 'Shilo', 'E8E0D5': 'Pearl Bush', 'E8EBE0': 'Green White', 'E8F1D4': 'Chrome White', 'E8F2EB': 'Gin', 'E8F5F2': 'Aqua Squeeze', 'E96E00': 'Clementine', 'E97451': 'Burnt Sienna', 'E97C07': 'Tahiti Gold', 'E9CECD': 'Oyster Pink', 'E9D75A': 'Confetti', 'E9E3E3': 'Ebb', 'E9F8ED': 'Ottoman', 'E9FFFD': 'Clear Day', 'EA88A8': 'Carissma', 'EAAE69': 'Porsche', 'EAB33B': 'Tulip Tree', 'EAC674': 'Rob Roy', 'EADAB8': 'Raffia', 'EAE8D4': 'White Rock', 'EAF6EE': 'Panache', 'EAF6FF': 'Solitude', 'EAF9F5': 'Aqua Spring', 'EAFFFE': 'Dew', 'EB9373': 'Apricot', 'EBC2AF': 'Zinnwaldite', 'ECA927': 'Fuel Yellow', 'ECC54E': 'Ronchi', 'ECC7EE': 'French Lilac', 'ECCDB9': 'Just Right', 'ECE090': 'Wild Rice', 'ECEBBD': 'Fall Green', 'ECEBCE': 'Aths Special', 'ECF245': 'Starship', 'ED0A3F': 'Red Ribbon', 'ED7A1C': 'Tango', 'ED9121': 'Carrot Orange', 'ED989E': 'Sea Pink', 'EDB381': 'Tacao', 'EDC9AF': 'Desert Sand', 'EDCDAB': 'Pancho', 'EDDCB1': 'Chamois', 'EDEA99': 'Primrose', 'EDF5DD': 'Frost', 'EDF5F5': 'Aqua Haze', 'EDF6FF': 'Zumthor', 'EDF9F1': 'Narvik', 'EDFC84': 'Honeysuckle', 'EE82EE': 'Lavender Magenta', 'EEC1BE': 'Beauty Bush', 'EED794': 'Chalky', 'EED9C4': 'Almond', 'EEDC82': 'Flax', 'EEDEDA': 'Bizarre', 'EEE3AD': 'Double Colonial White', 'EEEEE8': 'Cararra', 'EEEF78': 'Manz', 'EEF0C8': 'Tahuna Sands', 'EEF0F3': 'Athens Gray', 'EEF3C3': 'Tusk', 'EEF4DE': 'Loafer', 'EEF6F7': 'Catskill White', 'EEFDFF': 'Twilight Blue', 'EEFF9A': 'Jonquil', 'EEFFE2': 'Rice Flower', 'EF863F': 'Jaffa', 'EFEFEF': 'Gallery', 'EFF2F3': 'Porcelain', 'F091A9': 'Mauvelous', 'F0D52D': 'Golden Dream', 'F0DB7D': 'Golden Sand', 'F0DC82': 'Buff', 'F0E2EC': 'Prim', 'F0E68C': 'Khaki', 'F0EEFD': 'Selago', 'F0EEFF': 'Titan White', 'F0F8FF': 'Alice Blue', 'F0FCEA': 'Feta', 'F18200': 'Gold Drop', 'F19BAB': 'Wewak', 'F1E788': 'Sahara Sand', 'F1E9D2': 'Parchment', 'F1E9FF': 'Blue Chalk', 'F1EEC1': 'Mint Julep', 'F1F1F1': 'Seashell', 'F1F7F2': 'Saltpan', 'F1FFAD': 'Tidal', 'F1FFC8': 'Chiffon', 'F2552A': 'Flamingo', 'F28500': 'Tangerine', 'F2C3B2': 'Mandys Pink', 'F2F2F2': 'Concrete', 'F2FAFA': 'Black Squeeze', 'F34723': 'Pomegranate', 'F3AD16': 'Buttercup', 'F3D69D': 'New Orleans', 'F3D9DF': 'Vanilla Ice', 'F3E7BB': 'Sidecar', 'F3E9E5': 'Dawn Pink', 'F3EDCF': 'Wheatfield', 'F3FB62': 'Canary', 'F3FBD4': 'Orinoco', 'F3FFD8': 'Carla', 'F400A1': 'Hollywood Cerise', 'F4A460': 'Sandy brown', 'F4C430': 'Saffron', 'F4D81C': 'Ripe Lemon', 'F4EBD3': 'Janna', 'F4F2EE': 'Pampas', 'F4F4F4': 'Wild Sand', 'F4F8FF': 'Zircon', 'F57584': 'Froly', 'F5C85C': 'Cream Can', 'F5C999': 'Manhattan', 'F5D5A0': 'Maize', 'F5DEB3': 'Wheat', 'F5E7A2': 'Sandwisp', 'F5E7E2': 'Pot Pourri', 'F5E9D3': 'Albescent White', 'F5EDEF': 'Soft Peach', 'F5F3E5': 'Ecru White', 'F5F5DC': 'Beige', 'F5FB3D': 'Golden Fizz', 'F5FFBE': 'Australian Mint', 'F64A8A': 'French Rose', 'F653A6': 'Brilliant Rose', 'F6A4C9': 'Illusion', 'F6F0E6': 'Merino', 'F6F7F7': 'Black Haze', 'F6FFDC': 'Spring Sun', 'F7468A': 'Violet Red', 'F77703': 'Chilean Fire', 'F77FBE': 'Persian Pink', 'F7B668': 'Rajah', 'F7C8DA': 'Azalea', 'F7DBE6': 'We Peep', 'F7F2E1': 'Quarter Spanish White', 'F7F5FA': 'Whisper', 'F7FAF7': 'Snow Drift', 'F8B853': 'Casablanca', 'F8C3DF': 'Chantilly', 'F8D9E9': 'Cherub', 'F8DB9D': 'Marzipan', 'F8DD5C': 'Energy Yellow', 'F8E4BF': 'Givry', 'F8F0E8': 'White Linen', 'F8F4FF': 'Magnolia', 'F8F6F1': 'Spring Wood', 'F8F7DC': 'Coconut Cream', 'F8F7FC': 'White Lilac', 'F8F8F7': 'Desert Storm', 'F8F99C': 'Texas', 'F8FACD': 'Corn Field', 'F8FDD3': 'Mimosa', 'F95A61': 'Carnation', 'F9BF58': 'Saffron Mango', 'F9E0ED': 'Carousel Pink', 'F9E4BC': 'Dairy Cream', 'F9E663': 'Portica', 'F9EAF3': 'Amour', 'F9F8E4': 'Rum Swizzle', 'F9FF8B': 'Dolly', 'F9FFF6': 'Sugar Cane', 'FA7814': 'Ecstasy', 'FA9D5A': 'Tan Hide', 'FAD3A2': 'Corvette', 'FADFAD': 'Peach Yellow', 'FAE600': 'Turbo', 'FAEAB9': 'Astra', 'FAECCC': 'Champagne', 'FAF0E6': 'Linen', 'FAF3F0': 'Fantasy', 'FAF7D6': 'Citrine White', 'FAFAFA': 'Alabaster', 'FAFDE4': 'Hint of Yellow', 'FAFFA4': 'Milan', 'FB607F': 'Brink Pink', 'FB8989': 'Geraldine', 'FBA0E3': 'Lavender Rose', 'FBA129': 'Sea Buckthorn', 'FBAC13': 'Sun', 'FBAED2': 'Lavender Pink', 'FBB2A3': 'Rose Bud', 'FBBEDA': 'Cupid', 'FBCCE7': 'Classic Rose', 'FBCEB1': 'Apricot Peach', 'FBE7B2': 'Banana Mania', 'FBE870': 'Marigold Yellow', 'FBE96C': 'Festival', 'FBEA8C': 'Sweet Corn', 'FBEC5D': 'Candy Corn', 'FBF9F9': 'Hint of Red', 'FBFFBA': 'Shalimar', 'FC0FC0': 'Shocking Pink', 'FC80A5': 'Tickle Me Pink', 'FC9C1D': 'Tree Poppy', 'FCC01E': 'Lightning Yellow', 'FCD667': 'Goldenrod', 'FCD917': 'Candlelight', 'FCDA98': 'Cherokee', 'FCF4D0': 'Double Pearl Lusta', 'FCF4DC': 'Pearl Lusta', 'FCF8F7': 'Vista White', 'FCFBF3': 'Bianca', 'FCFEDA': 'Moon Glow', 'FCFFE7': 'China Ivory', 'FCFFF9': 'Ceramic', 'FD0E35': 'Torch Red', 'FD5B78': 'Wild Watermelon', 'FD7B33': 'Crusta', 'FD7C07': 'Sorbus', 'FD9FA2': 'Sweet Pink', 'FDD5B1': 'Light Apricot', 'FDD7E4': 'Pig Pink', 'FDE1DC': 'Cinderella', 'FDE295': 'Golden Glow', 'FDE910': 'Lemon', 'FDF5E6': 'Old Lace', 'FDF6D3': 'Half Colonial White', 'FDF7AD': 'Drover', 'FDFEB8': 'Pale Prim', 'FDFFD5': 'Cumulus', 'FE28A2': 'Persian Rose', 'FE4C40': 'Sunset Orange', 'FE6F5E': 'Bittersweet', 'FE9D04': 'California', 'FEA904': 'Yellow Sea', 'FEBAAD': 'Melon', 'FED33C': 'Bright Sun', 'FED85D': 'Dandelion', 'FEDB8D': 'Salomie', 'FEE5AC': 'Cape Honey', 'FEEBF3': 'Remy', 'FEEFCE': 'Oasis', 'FEF0EC': 'Bridesmaid', 'FEF2C7': 'Beeswax', 'FEF3D8': 'Bleach White', 'FEF4CC': 'Pipi', 'FEF4DB': 'Half Spanish White', 'FEF4F8': 'Wisp Pink', 'FEF5F1': 'Provincial Pink', 'FEF7DE': 'Half Dutch White', 'FEF8E2': 'Solitaire', 'FEF8FF': 'White Pointer', 'FEF9E3': 'Off Yellow', 'FEFCED': 'Orange White', 'FF0000': 'Red', 'FF007F': 'Rose', 'FF00CC': 'Purple Pizzazz', 'FF00FF': 'Magenta / Fuchsia', 'FF2400': 'Scarlet', 'FF3399': 'Wild Strawberry', 'FF33CC': 'Razzle Dazzle Rose', 'FF355E': 'Radical Red', 'FF3F34': 'Red Orange', 'FF4040': 'Coral Red', 'FF4D00': 'Vermilion', 'FF4F00': 'International Orange', 'FF6037': 'Outrageous Orange', 'FF6600': 'Blaze Orange', 'FF66FF': 'Pink Flamingo', 'FF681F': 'Orange', 'FF69B4': 'Hot Pink', 'FF6B53': 'Persimmon', 'FF6FFF': 'Blush Pink', 'FF7034': 'Burning Orange', 'FF7518': 'Pumpkin', 'FF7D07': 'Flamenco', 'FF7F00': 'Flush Orange', 'FF7F50': 'Coral', 'FF8C69': 'Salmon', 'FF9000': 'Pizazz', 'FF910F': 'West Side', 'FF91A4': 'Pink Salmon', 'FF9933': 'Neon Carrot', 'FF9966': 'Atomic Tangerine', 'FF9980': 'Vivid Tangerine', 'FF9E2C': 'Sunshade', 'FFA000': 'Orange Peel', 'FFA194': 'Mona Lisa', 'FFA500': 'Web Orange', 'FFA6C9': 'Carnation Pink', 'FFAB81': 'Hit Pink', 'FFAE42': 'Yellow Orange', 'FFB0AC': 'Cornflower Lilac', 'FFB1B3': 'Sundown', 'FFB31F': 'My Sin', 'FFB555': 'Texas Rose', 'FFB7D5': 'Cotton Candy', 'FFB97B': 'Macaroni and Cheese', 'FFBA00': 'Selective Yellow', 'FFBD5F': 'Koromiko', 'FFBF00': 'Amber', 'FFC0A8': 'Wax Flower', 'FFC0CB': 'Pink', 'FFC3C0': 'Your Pink', 'FFC901': 'Supernova', 'FFCBA4': 'Flesh', 'FFCC33': 'Sunglow', 'FFCC5C': 'Golden Tainoi', 'FFCC99': 'Peach Orange', 'FFCD8C': 'Chardonnay', 'FFD1DC': 'Pastel Pink', 'FFD2B7': 'Romantic', 'FFD38C': 'Grandis', 'FFD700': 'Gold', 'FFD800': 'School bus Yellow', 'FFD8D9': 'Cosmos', 'FFDB58': 'Mustard', 'FFDCD6': 'Peach Schnapps', 'FFDDAF': 'Caramel', 'FFDDCD': 'Tuft Bush', 'FFDDCF': 'Watusi', 'FFDDF4': 'Pink Lace', 'FFDEAD': 'Navajo White', 'FFDEB3': 'Frangipani', 'FFE1DF': 'Pippin', 'FFE1F2': 'Pale Rose', 'FFE2C5': 'Negroni', 'FFE5A0': 'Cream Brulee', 'FFE5B4': 'Peach', 'FFE6C7': 'Tequila', 'FFE772': 'Kournikova', 'FFEAC8': 'Sandy Beach', 'FFEAD4': 'Karry', 'FFEC13': 'Broom', 'FFEDBC': 'Colonial White', 'FFEED8': 'Derby', 'FFEFA1': 'Vis Vis', 'FFEFC1': 'Egg White', 'FFEFD5': 'Papaya Whip', 'FFEFEC': 'Fair Pink', 'FFF0DB': 'Peach Cream', 'FFF0F5': 'Lavender blush', 'FFF14F': 'Gorse', 'FFF1B5': 'Buttermilk', 'FFF1D8': 'Pink Lady', 'FFF1EE': 'Forget Me Not', 'FFF1F9': 'Tutu', 'FFF39D': 'Picasso', 'FFF3F1': 'Chardon', 'FFF46E': 'Paris Daisy', 'FFF4CE': 'Barley White', 'FFF4DD': 'Egg Sour', 'FFF4E0': 'Sazerac', 'FFF4E8': 'Serenade', 'FFF4F3': 'Chablis', 'FFF5EE': 'Seashell Peach', 'FFF5F3': 'Sauvignon', 'FFF6D4': 'Milk Punch', 'FFF6DF': 'Varden', 'FFF6F5': 'Rose White', 'FFF8D1': 'Baja White', 'FFF9E2': 'Gin Fizz', 'FFF9E6': 'Early Dawn', 'FFFACD': 'Lemon Chiffon', 'FFFAF4': 'Bridal Heath', 'FFFBDC': 'Scotch Mist', 'FFFBF9': 'Soapstone', 'FFFC99': 'Witch Haze', 'FFFCEA': 'Buttery White', 'FFFCEE': 'Island Spice', 'FFFDD0': 'Cream', 'FFFDE6': 'Chilean Heath', 'FFFDE8': 'Travertine', 'FFFDF3': 'Orchid White', 'FFFDF4': 'Quarter Pearl Lusta', 'FFFEE1': 'Half and Half', 'FFFEEC': 'Apricot White', 'FFFEF0': 'Rice Cake', 'FFFEF6': 'Black White', 'FFFEFD': 'Romance', 'FFFF00': 'Yellow', 'FFFF66': 'Laser Lemon', 'FFFF99': 'Pale Canary', 'FFFFB4': 'Portafino', 'FFFFF0': 'Ivory', 'FFFFFF': 'White'} |
class RenderTargetType:
""" This stores the possible types of targets beeing able
to be attached to a RenderTarget. Python does not support
enums (yet) so this is a class. """
Color = "color"
Depth = "depth"
Aux0 = "aux0"
Aux1 = "aux1"
Aux2 = "aux2"
Aux3 = "aux3"
All = ["depth","color", "aux0", "aux1", "aux2", "aux3"]
| class Rendertargettype:
""" This stores the possible types of targets beeing able
to be attached to a RenderTarget. Python does not support
enums (yet) so this is a class. """
color = 'color'
depth = 'depth'
aux0 = 'aux0'
aux1 = 'aux1'
aux2 = 'aux2'
aux3 = 'aux3'
all = ['depth', 'color', 'aux0', 'aux1', 'aux2', 'aux3'] |
"""
Subarray Sum Equals K
Given an array of integers nums and an integer k, return the total number of continuous subarrays whose sum equals to k.
Example 1:
Input: nums = [1,1,1], k = 2
Output: 2
Example 2:
Input: nums = [1,2,3], k = 3
Output: 2
Constraints:
1 <= nums.length <= 2 * 104
-1000 <= nums[i] <= 1000
-107 <= k <= 107
"""
class Solution:
def subarraySum(self, nums: List[int], k: int) -> int:
ref = {0:1}
add = 0
count = 0
for num in nums:
add += num
if add-k in ref:
count += ref[add-k]
ref[add]=ref.get(add, 0) + 1
return count | """
Subarray Sum Equals K
Given an array of integers nums and an integer k, return the total number of continuous subarrays whose sum equals to k.
Example 1:
Input: nums = [1,1,1], k = 2
Output: 2
Example 2:
Input: nums = [1,2,3], k = 3
Output: 2
Constraints:
1 <= nums.length <= 2 * 104
-1000 <= nums[i] <= 1000
-107 <= k <= 107
"""
class Solution:
def subarray_sum(self, nums: List[int], k: int) -> int:
ref = {0: 1}
add = 0
count = 0
for num in nums:
add += num
if add - k in ref:
count += ref[add - k]
ref[add] = ref.get(add, 0) + 1
return count |
###### Config for test
###: Variables
ggtrace_cpu = [
"data/formatted/", # pd.readfilepath
[1], # usecols trong pd
False, # multi_output
None, # output_idx
"cpu/", # path_save_result
]
ggtrace_ram = [
"data/formatted/", # pd.readfilepath
[2], # usecols trong pd
False, # multi_output
None, # output_idx
"ram/", # path_save_result
]
ggtrace_multi_cpu = [
"data/formatted/", # pd.readfilepath
[1, 2], # usecols trong pd
False, # multi_output
0, # output_idx
"multi_cpu/", # path_save_result
]
ggtrace_multi_ram = [
"data/formatted/", # pd.readfilepath
[1, 2], # usecols trong pd
False, # multi_output
1, # output_idx
"multi_ram/", # path_save_result
]
giang1 = [
"data/formatted/giang/", # pd.readfilepath
[3], # usecols trong pd
False, # multi_output
None, # output_idx
"giang1/", # path_save_result
]
######################## Paras according to the paper
####: FLNN
flnn_paras = {
"sliding_window": [2, 3, 4, 5],
"expand_function": [0], # 0:chebyshev, 1:legendre, 2:laguerre, 3:powerseries, 4:trigonometric
"activation": ["elu", "tanh"],
"epoch": [1500],
"learning_rate": [0.025], # 100 -> 900
"batch_size": [64], # 0.85 -> 0.97
"beta": [0.90] # 0.005 -> 0.10
}
####: MLNN-1HL
mlnn1hl_paras_final = {
"sliding_window": [2, 5, 10],
"expand_function": [None],
"hidden_sizes" : [[5] ],
"activations": [("elu", "elu")], # 0: elu, 1:relu, 2:tanh, 3:sigmoid
"learning_rate": [0.01],
"epoch": [1000],
"batch_size": [128],
"optimizer": ["adam"], # GradientDescentOptimizer, AdamOptimizer, AdagradOptimizer, AdadeltaOptimizer
"loss": ["mse"]
}
####: MLNN-1HL
mlnn2hl_paras_final = {
"sliding_window": [2, 5, 10],
"expand_function": [None],
"hidden_sizes" : [[5, 3] ],
"activations": [("elu", "elu", "elu")], # 0: elu, 1:relu, 2:tanh, 3:sigmoid
"learning_rate": [0.0001],
"epoch": [2000],
"batch_size": [128],
"optimizer": ["adam"], # GradientDescentOptimizer, AdamOptimizer, AdagradOptimizer, AdadeltaOptimizer
"loss": ["mse"]
}
# ========================== Hybrid FLNN =================================
#### : FL-GANN
flgann_giang1_paras = {
"sliding_window": [2, 3, 5, 10],
"expand_function": [0, 1, 2, 3, 4], # 0:chebyshev, 1:legendre, 2:laguerre, 3:powerseries, 4:trigonometric
"activation": ["elu", "tanh"], # 0: elu, 1:relu, 2:tanh, 3:sigmoid
"train_valid_rate": [(0.6, 0.4)],
"epoch": [700],
"pop_size": [250], # 100 -> 900
"pc": [0.95], # 0.85 -> 0.97
"pm": [0.025], # 0.005 -> 0.10
"domain_range": [(-1, 1)] # lower and upper bound
}
####: LSTM-1HL
lstm1hl_giang1_paras = {
"sliding_window": [2, 3, 5, 10],
"expand_function": [None], # 0:chebyshev, 1:legendre, 2:laguerre, 3:powerseries, 4:trigonometric
"hidden_sizes" : [[5], [10] ],
"activations": [("elu", "elu")], # 0: elu, 1:relu, 2:tanh, 3:sigmoid
"learning_rate": [0.0001],
"epoch": [1000],
"batch_size": [128],
"optimizer": ["adam"], # GradientDescentOptimizer, AdamOptimizer, AdagradOptimizer, AdadeltaOptimizer
"loss": ["mse"],
"dropouts": [[0.2]]
}
#### : FL-GANN
flgann_paras = {
"sliding_window": [2],
"expand_function": [0], # 0:chebyshev, 1:legendre, 2:laguerre, 3:powerseries, 4:trigonometric
"activation": ["elu", "tanh"], # 0: elu, 1:relu, 2:tanh, 3:sigmoid
"train_valid_rate": [(0.6, 0.4)],
"epoch": [10],
"pop_size": [200], # 100 -> 900
"pc": [0.95], # 0.85 -> 0.97
"pm": [0.025], # 0.005 -> 0.10
"domain_range": [(-1, 1)] # lower and upper bound
}
#### : DE-MLNN
fldenn_paras = {
"sliding_window": [2],
"expand_function": [0], # 0:chebyshev, 1:legendre, 2:laguerre, 3:powerseries, 4:trigonometric
"activation": ["elu", "tanh"], # 0: elu, 1:relu, 2:tanh, 3:sigmoid
"train_valid_rate": [(0.6, 0.4)],
"epoch": [20],
"pop_size": [200], # 10 * problem_size
"wf": [0.8], # Weighting factor
"cr": [0.9], # Crossover rate
"domain_range": [(-1, 1)] # lower and upper bound
}
#### : PSO-FLNN
flpsonn_paras = {
"sliding_window": [2, 5, 10],
"expand_function": [0], # 0:chebyshev, 1:legendre, 2:laguerre, 3:powerseries, 4:trigonometric
"activation": ["elu", "tanh"], # 0: elu, 1:relu, 2:tanh, 3:sigmoid
"train_valid_rate": [(0.6, 0.4)],
"epoch": [50],
"pop_size": [200], # 100 -> 900
"w_minmax": [(0.4, 0.9)], # [0-1] -> [0.4-0.9] Trong luong cua con chim
"c_minmax": [(1.2, 1.2)], # [(1.2, 1.2), (0.8, 2.0), (1.6, 0.6)] # [0-2] Muc do anh huong cua local va global
# r1, r2 : random theo tung vong lap
# delta(t) = 1 (do do: x(sau) = x(truoc) + van_toc
"domain_range": [(-1, 1)] # lower and upper bound
}
#### : BFO-FLNN
flbfonn_paras = {
"sliding_window": [2],
"expand_function": [0], # 0:chebyshev, 1:legendre, 2:laguerre, 3:powerseries, 4:trigonometric
"activation": ["elu"], # 0: elu, 1:relu, 2:tanh, 3:sigmoid
"train_valid_rate": [(0.6, 0.4)],
"pop_size": [50],
"Ci": [0.01], # step_size
"Ped": [0.25], # p_eliminate
"Ns": [2], # swim_length
"Ned": [6], # elim_disp_steps
"Nre": [2], # repro_steps
"Nc": [30], # chem_steps
"attract_repel": [(0.1, 0.2, 0.1, 10)], # [ d_attr, w_attr, h_repel, w_repel ]
"domain_range": [(-1, 1)] # lower and upper bound
}
#### : ABFOLS-FLNN
flabfolsnn_paras = {
"sliding_window": [2],
"expand_function": [0], # 0:chebyshev, 1:legendre, 2:laguerre, 3:powerseries, 4:trigonometric
"activation": ["elu"], # 0: elu, 1:relu, 2:tanh, 3:sigmoid
"train_valid_rate": [(0.6, 0.4)],
"epoch": [100],
"pop_size": [200], # 100 -> 900
"Ci": [(0.1, 0.00001)], # C_s (start), C_e (end) -=> step size # step size in BFO
"Ped": [0.25], # p_eliminate
"Ns": [4], # swim_length
"N_minmax": [(3, 40)], # (Dead threshold value, split threshold value) -> N_adapt, N_split
"domain_range": [(-1, 1)] # lower and upper bound
}
#### : CSO-FLNN
flcsonn_paras = {
"sliding_window": [2],
"expand_function": [0], # 0:chebyshev, 1:legendre, 2:laguerre, 3:powerseries, 4:trigonometric
"activation": ["elu"], # 0: elu, 1:relu, 2:tanh, 3:sigmoid
"train_valid_rate": [(0.6, 0.4)],
"epoch": [100],
"pop_size": [200], # 100 -> 900
"mixture_ratio": [0.15], #
"smp": [10], # seeking memory pool, 10 clones (greater is better but more need time training)
"spc": [True], # self-position considering
"cdc": [0.8], # counts of dimension to change (greater is better)
"srd": [0.01], # seeking range of the selected dimension (lower is better but slow searching domain)
"w_minmax": [(0.4, 0.9)], # same in PSO
"c1": [0.4], # same in PSO
"selected_strategy": [0], # 0: best fitness, 1: tournament, 2: roulette wheel, 3: random (decrease by quality)
"domain_range": [(-1, 1)] # lower and upper bound
}
#### : ABC-FLNN
flabcnn_paras = {
"sliding_window": [2],
"expand_function": [0], # 0:chebyshev, 1:legendre, 2:laguerre, 3:powerseries, 4:trigonometric
"activation": ["elu"], # 0: elu, 1:relu, 2:tanh, 3:sigmoid
"train_valid_rate": [(0.6, 0.4)],
"epoch": [100],
"pop_size": [200], # 100 -> 900
"couple_bees": [(16, 4)], # number of bees which provided for good location and other location
"patch_variables": [(5.0, 0.985)], # patch_variables = patch_variables * patch_factor (0.985)
"sites": [(3, 1)], # 3 bees (employeeed bees, onlookers and scouts), 1 good partition
"domain_range": [(-1, 1)] # lower and upper bound
}
| ggtrace_cpu = ['data/formatted/', [1], False, None, 'cpu/']
ggtrace_ram = ['data/formatted/', [2], False, None, 'ram/']
ggtrace_multi_cpu = ['data/formatted/', [1, 2], False, 0, 'multi_cpu/']
ggtrace_multi_ram = ['data/formatted/', [1, 2], False, 1, 'multi_ram/']
giang1 = ['data/formatted/giang/', [3], False, None, 'giang1/']
flnn_paras = {'sliding_window': [2, 3, 4, 5], 'expand_function': [0], 'activation': ['elu', 'tanh'], 'epoch': [1500], 'learning_rate': [0.025], 'batch_size': [64], 'beta': [0.9]}
mlnn1hl_paras_final = {'sliding_window': [2, 5, 10], 'expand_function': [None], 'hidden_sizes': [[5]], 'activations': [('elu', 'elu')], 'learning_rate': [0.01], 'epoch': [1000], 'batch_size': [128], 'optimizer': ['adam'], 'loss': ['mse']}
mlnn2hl_paras_final = {'sliding_window': [2, 5, 10], 'expand_function': [None], 'hidden_sizes': [[5, 3]], 'activations': [('elu', 'elu', 'elu')], 'learning_rate': [0.0001], 'epoch': [2000], 'batch_size': [128], 'optimizer': ['adam'], 'loss': ['mse']}
flgann_giang1_paras = {'sliding_window': [2, 3, 5, 10], 'expand_function': [0, 1, 2, 3, 4], 'activation': ['elu', 'tanh'], 'train_valid_rate': [(0.6, 0.4)], 'epoch': [700], 'pop_size': [250], 'pc': [0.95], 'pm': [0.025], 'domain_range': [(-1, 1)]}
lstm1hl_giang1_paras = {'sliding_window': [2, 3, 5, 10], 'expand_function': [None], 'hidden_sizes': [[5], [10]], 'activations': [('elu', 'elu')], 'learning_rate': [0.0001], 'epoch': [1000], 'batch_size': [128], 'optimizer': ['adam'], 'loss': ['mse'], 'dropouts': [[0.2]]}
flgann_paras = {'sliding_window': [2], 'expand_function': [0], 'activation': ['elu', 'tanh'], 'train_valid_rate': [(0.6, 0.4)], 'epoch': [10], 'pop_size': [200], 'pc': [0.95], 'pm': [0.025], 'domain_range': [(-1, 1)]}
fldenn_paras = {'sliding_window': [2], 'expand_function': [0], 'activation': ['elu', 'tanh'], 'train_valid_rate': [(0.6, 0.4)], 'epoch': [20], 'pop_size': [200], 'wf': [0.8], 'cr': [0.9], 'domain_range': [(-1, 1)]}
flpsonn_paras = {'sliding_window': [2, 5, 10], 'expand_function': [0], 'activation': ['elu', 'tanh'], 'train_valid_rate': [(0.6, 0.4)], 'epoch': [50], 'pop_size': [200], 'w_minmax': [(0.4, 0.9)], 'c_minmax': [(1.2, 1.2)], 'domain_range': [(-1, 1)]}
flbfonn_paras = {'sliding_window': [2], 'expand_function': [0], 'activation': ['elu'], 'train_valid_rate': [(0.6, 0.4)], 'pop_size': [50], 'Ci': [0.01], 'Ped': [0.25], 'Ns': [2], 'Ned': [6], 'Nre': [2], 'Nc': [30], 'attract_repel': [(0.1, 0.2, 0.1, 10)], 'domain_range': [(-1, 1)]}
flabfolsnn_paras = {'sliding_window': [2], 'expand_function': [0], 'activation': ['elu'], 'train_valid_rate': [(0.6, 0.4)], 'epoch': [100], 'pop_size': [200], 'Ci': [(0.1, 1e-05)], 'Ped': [0.25], 'Ns': [4], 'N_minmax': [(3, 40)], 'domain_range': [(-1, 1)]}
flcsonn_paras = {'sliding_window': [2], 'expand_function': [0], 'activation': ['elu'], 'train_valid_rate': [(0.6, 0.4)], 'epoch': [100], 'pop_size': [200], 'mixture_ratio': [0.15], 'smp': [10], 'spc': [True], 'cdc': [0.8], 'srd': [0.01], 'w_minmax': [(0.4, 0.9)], 'c1': [0.4], 'selected_strategy': [0], 'domain_range': [(-1, 1)]}
flabcnn_paras = {'sliding_window': [2], 'expand_function': [0], 'activation': ['elu'], 'train_valid_rate': [(0.6, 0.4)], 'epoch': [100], 'pop_size': [200], 'couple_bees': [(16, 4)], 'patch_variables': [(5.0, 0.985)], 'sites': [(3, 1)], 'domain_range': [(-1, 1)]} |
# pylint: disable-msg=R0903
"""check use of super"""
__revision__ = None
class Aaaa:
"""old style"""
def hop(self):
"""hop"""
super(Aaaa, self).hop()
def __init__(self):
super(Aaaa, self).__init__()
class NewAaaa(object):
"""old style"""
def hop(self):
"""hop"""
super(NewAaaa, self).hop()
def __init__(self):
super(object, self).__init__()
| """check use of super"""
__revision__ = None
class Aaaa:
"""old style"""
def hop(self):
"""hop"""
super(Aaaa, self).hop()
def __init__(self):
super(Aaaa, self).__init__()
class Newaaaa(object):
"""old style"""
def hop(self):
"""hop"""
super(NewAaaa, self).hop()
def __init__(self):
super(object, self).__init__() |
competitor1 = int(input())
competitor2 = int(input())
competitor3 = int(input())
sum_sec = competitor1 + competitor2 + competitor3
minutes = sum_sec // 60
sec = sum_sec % 60
if sec < 10:
print(f"{minutes}:0{sec}")
else:
print(f"{minutes}:{sec}") | competitor1 = int(input())
competitor2 = int(input())
competitor3 = int(input())
sum_sec = competitor1 + competitor2 + competitor3
minutes = sum_sec // 60
sec = sum_sec % 60
if sec < 10:
print(f'{minutes}:0{sec}')
else:
print(f'{minutes}:{sec}') |
def extractUntunedTranslation(item):
"""
"""
title = item['title'].replace(' III(', ' vol 3 (').replace(' III:', ' vol 3:').replace(' II:', ' vol 2:').replace(' I:', ' vol 1:').replace(' IV:', ' vol 4:').replace(
' V:', ' vol 5:')
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(title)
if not (chp or vol) or 'preview' in item['title'].lower():
return None
tagmap = [
('meg and seron', 'Meg and Seron', 'translated'),
('kino\'s journey', 'Kino\'s Journey', 'translated'),
]
for tagname, name, tl_type in tagmap:
if tagname in item['tags']:
return buildReleaseMessageWithType(item, name, vol, chp, frag=frag, postfix=postfix, tl_type=tl_type)
if 'meg and seron' in item['tags'] and chp and vol:
return buildReleaseMessageWithType(item, 'Meg and Seron', vol, chp, frag=frag, postfix=postfix)
if 'lillia and treize' in item['tags'] and chp and vol:
return buildReleaseMessageWithType(item, 'Lillia to Treize', vol, chp, frag=frag, postfix=postfix)
return False | def extract_untuned_translation(item):
"""
"""
title = item['title'].replace(' III(', ' vol 3 (').replace(' III:', ' vol 3:').replace(' II:', ' vol 2:').replace(' I:', ' vol 1:').replace(' IV:', ' vol 4:').replace(' V:', ' vol 5:')
(vol, chp, frag, postfix) = extract_vol_chapter_fragment_postfix(title)
if not (chp or vol) or 'preview' in item['title'].lower():
return None
tagmap = [('meg and seron', 'Meg and Seron', 'translated'), ("kino's journey", "Kino's Journey", 'translated')]
for (tagname, name, tl_type) in tagmap:
if tagname in item['tags']:
return build_release_message_with_type(item, name, vol, chp, frag=frag, postfix=postfix, tl_type=tl_type)
if 'meg and seron' in item['tags'] and chp and vol:
return build_release_message_with_type(item, 'Meg and Seron', vol, chp, frag=frag, postfix=postfix)
if 'lillia and treize' in item['tags'] and chp and vol:
return build_release_message_with_type(item, 'Lillia to Treize', vol, chp, frag=frag, postfix=postfix)
return False |
class Solution:
def toLowerCase(self, string):
return string.lower()
| class Solution:
def to_lower_case(self, string):
return string.lower() |
# Rouge Highlighter token test - Generic Traceback
def test():
print(unknown_test_var)
test()
| def test():
print(unknown_test_var)
test() |
# -*- coding: utf-8 -*-
"""
Created on Mon Dec 9 16:12:01 2019
@author: NOTEBOOK
"""
def main():
purchase = float(input("Enter the total amount of purchase: "))
tax(purchase)
def tax(pur):
sales_tax = pur * 0.04
county_tax = pur * 0.02
total_tax = sales_tax + county_tax
total = pur + total_tax
print("Purchase = $",format(pur,',.2f'), sep= '')
print("state tax = $",format(sales_tax,',.2f'), sep ='')
print("County tax = $",format(county_tax,',.2f'), sep ='')
print("Total tax = $",format(total_tax,',.2f'), sep = '')
print("Grand Total = $", format(total, ',.2f'), sep = '')
main()
| """
Created on Mon Dec 9 16:12:01 2019
@author: NOTEBOOK
"""
def main():
purchase = float(input('Enter the total amount of purchase: '))
tax(purchase)
def tax(pur):
sales_tax = pur * 0.04
county_tax = pur * 0.02
total_tax = sales_tax + county_tax
total = pur + total_tax
print('Purchase = $', format(pur, ',.2f'), sep='')
print('state tax = $', format(sales_tax, ',.2f'), sep='')
print('County tax = $', format(county_tax, ',.2f'), sep='')
print('Total tax = $', format(total_tax, ',.2f'), sep='')
print('Grand Total = $', format(total, ',.2f'), sep='')
main() |
# -*- coding: utf-8 -*-
"""
1466. Reorder Routes to Make All Paths Lead to the City Zero
There are n cities numbered from 0 to n-1 and n-1 roads such that there is only one way to travel
between two different cities (this network form a tree). Last year, The ministry of transport decided to
orient the roads in one direction because they are too narrow.
Roads are represented by connections where connections[i] = [a, b] represents a road from city a to b.
This year, there will be a big event in the capital (city 0), and many people want to travel to this city.
Your task consists of reorienting some roads such that each city can visit the city 0.
Return the minimum number of edges changed.
It's guaranteed that each city can reach the city 0 after reorder.
Constraints:
2 <= n <= 5 * 10^4
connections.length == n-1
connections[i].length == 2
0 <= connections[i][0], connections[i][1] <= n-1
connections[i][0] != connections[i][1]
"""
class Solution:
def minReorder(self, n, connections) -> int:
res = 0
remain_set = set(range(n - 1))
target_set = {0}
while target_set:
new_remain_set = set()
new_target_set = set()
for index in remain_set:
from_city, to_city = connections[index]
if to_city in target_set:
new_target_set.add(from_city)
elif from_city in target_set:
new_target_set.add(to_city)
res += 1
else:
new_remain_set.add(index)
remain_set = new_remain_set
target_set = new_target_set
return res
| """
1466. Reorder Routes to Make All Paths Lead to the City Zero
There are n cities numbered from 0 to n-1 and n-1 roads such that there is only one way to travel
between two different cities (this network form a tree). Last year, The ministry of transport decided to
orient the roads in one direction because they are too narrow.
Roads are represented by connections where connections[i] = [a, b] represents a road from city a to b.
This year, there will be a big event in the capital (city 0), and many people want to travel to this city.
Your task consists of reorienting some roads such that each city can visit the city 0.
Return the minimum number of edges changed.
It's guaranteed that each city can reach the city 0 after reorder.
Constraints:
2 <= n <= 5 * 10^4
connections.length == n-1
connections[i].length == 2
0 <= connections[i][0], connections[i][1] <= n-1
connections[i][0] != connections[i][1]
"""
class Solution:
def min_reorder(self, n, connections) -> int:
res = 0
remain_set = set(range(n - 1))
target_set = {0}
while target_set:
new_remain_set = set()
new_target_set = set()
for index in remain_set:
(from_city, to_city) = connections[index]
if to_city in target_set:
new_target_set.add(from_city)
elif from_city in target_set:
new_target_set.add(to_city)
res += 1
else:
new_remain_set.add(index)
remain_set = new_remain_set
target_set = new_target_set
return res |
# err_raise.py
def foo(s):
n = int(s)
if n == 0:
raise ValueError('invalid value: %s' % s)
return 10 / n
def bar():
try:
foo('0')
except ValueError as e:
print('ValueError!')
bar()
| def foo(s):
n = int(s)
if n == 0:
raise value_error('invalid value: %s' % s)
return 10 / n
def bar():
try:
foo('0')
except ValueError as e:
print('ValueError!')
bar() |
# Search in Rotated Sorted Array II 81
# ttungl@gmail.com
class Solution(object):
def search(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: bool
"""
# use binary search
# tricky part is to increase the left until left=mid and nums[mid]!=nums[left]
# runtime: 32ms
left, right = 0, len(nums)-1
while left <= right:
mid = left + (right-left)/2
if nums[mid] == target:
return True
# tricky line!!
while left < mid and nums[mid] == nums[left]: left+=1
if nums[mid] >= nums[left]:
if nums[mid] > target >= nums[left]:
right = mid - 1
else:
left = mid + 1
else:
if nums[mid] < target <= nums[right]:
left = mid + 1
else:
right = mid - 1
return False
| class Solution(object):
def search(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: bool
"""
(left, right) = (0, len(nums) - 1)
while left <= right:
mid = left + (right - left) / 2
if nums[mid] == target:
return True
while left < mid and nums[mid] == nums[left]:
left += 1
if nums[mid] >= nums[left]:
if nums[mid] > target >= nums[left]:
right = mid - 1
else:
left = mid + 1
elif nums[mid] < target <= nums[right]:
left = mid + 1
else:
right = mid - 1
return False |
# -*- coding: utf-8 -*-
# @Time: 2020/4/13 18:49
# @Author: GraceKoo
# @File: 96_unique-binary-search-trees.py
# @Desc: https://leetcode-cn.com/problems/unique-binary-search-trees/
class Solution:
def numTrees(self, n: int) -> int:
if n < 0:
return 0
dp = [0 for _ in range(n + 1)]
dp[0] = 1
dp[1] = 1
for i in range(2, n + 1):
for j in range(i):
dp[i] += dp[j] * dp[i - j - 1]
return dp[-1]
so = Solution()
print(so.numTrees(3))
| class Solution:
def num_trees(self, n: int) -> int:
if n < 0:
return 0
dp = [0 for _ in range(n + 1)]
dp[0] = 1
dp[1] = 1
for i in range(2, n + 1):
for j in range(i):
dp[i] += dp[j] * dp[i - j - 1]
return dp[-1]
so = solution()
print(so.numTrees(3)) |
class Load:
elapsedTime = 0
powerUsage = 0.0
csvName = ""
id = 0
isBackgroundLoad = None
def __init__(self, elapsed_time, power_usage, csv_path):
self.elapsedTime = int(elapsed_time)
self.powerUsage = float(power_usage)
self.csvName = csv_path.split("\\")[-1] # csvName currently depends on file path (!!)
self.id = int(self.csvName.split(".")[0])
self.isBackgroundLoad = "back" in self.csvName
def __str__(self):
return "elapsedTime %r, powerUsage %r, csvName %r, id %r, isBackgroundLoad %r" %\
(self.elapsedTime, self.powerUsage, self.csvName, self.id, self.isBackgroundLoad)
| class Load:
elapsed_time = 0
power_usage = 0.0
csv_name = ''
id = 0
is_background_load = None
def __init__(self, elapsed_time, power_usage, csv_path):
self.elapsedTime = int(elapsed_time)
self.powerUsage = float(power_usage)
self.csvName = csv_path.split('\\')[-1]
self.id = int(self.csvName.split('.')[0])
self.isBackgroundLoad = 'back' in self.csvName
def __str__(self):
return 'elapsedTime %r, powerUsage %r, csvName %r, id %r, isBackgroundLoad %r' % (self.elapsedTime, self.powerUsage, self.csvName, self.id, self.isBackgroundLoad) |
# -*- coding: utf-8 -*-
# Copyright (c) 2014-2019 Dontnod Entertainment
# 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.
''' Nimp subcommands declarations '''
__all__ = [
'build',
'check',
'commandlet',
'dev',
'download_fileset',
'fileset',
'p4',
'package',
'run',
'symbol_server',
'update_symbol_server',
'upload',
'upload_fileset',
]
| """ Nimp subcommands declarations """
__all__ = ['build', 'check', 'commandlet', 'dev', 'download_fileset', 'fileset', 'p4', 'package', 'run', 'symbol_server', 'update_symbol_server', 'upload', 'upload_fileset'] |
def count1(x):
count = 0
for i in range(len(x)):
if x[i:i + 2] == 'ba':
count += 1
return count
def main():
print(count1('baba'))
print(count1('aba'))
print(count1('baaabab'))
print(count1('abc'))
print(count1('goodbye'))
print(count1('a'))
print(count1('ba'))
if __name__ == '__main__':
main()
| def count1(x):
count = 0
for i in range(len(x)):
if x[i:i + 2] == 'ba':
count += 1
return count
def main():
print(count1('baba'))
print(count1('aba'))
print(count1('baaabab'))
print(count1('abc'))
print(count1('goodbye'))
print(count1('a'))
print(count1('ba'))
if __name__ == '__main__':
main() |
def name_match(name, strict=True):
"""
Perform a GBIF name matching using the species and genus names
Parameters
----------
species_name: str
name of the species to request more information
genus_name: str
name of the genus of the species
strict: boolean
define if the mathing need to be performed with the strict
option (True) or not (False)
Returns
-------
message: dict
dictionary with the information returned by the GBIF matching service
"""
base_string = 'http://api.gbif.org/v1/species/match?'
request_parameters = {'strict': strict, 'name': name} # use strict matching(!)
message = requests.get(base_string, params=request_parameters).json()
return message | def name_match(name, strict=True):
"""
Perform a GBIF name matching using the species and genus names
Parameters
----------
species_name: str
name of the species to request more information
genus_name: str
name of the genus of the species
strict: boolean
define if the mathing need to be performed with the strict
option (True) or not (False)
Returns
-------
message: dict
dictionary with the information returned by the GBIF matching service
"""
base_string = 'http://api.gbif.org/v1/species/match?'
request_parameters = {'strict': strict, 'name': name}
message = requests.get(base_string, params=request_parameters).json()
return message |
_SERVICES = ["xcube_gen", "xcube_serve", "xcube_geodb"]
def get_services():
return _SERVICES
| _services = ['xcube_gen', 'xcube_serve', 'xcube_geodb']
def get_services():
return _SERVICES |
def min_fee(print_page_list):
sum_ = 0
prev = 0
for i in sorted(print_page_list):
sum_ += (prev + i)
prev += i
return sum_
if __name__ == "__main__":
print(min_fee([6, 11, 4, 1]))
print(min_fee([3, 2, 1]))
print(min_fee([3, 1, 4, 3, 2]))
print(min_fee([8, 4, 2, 3, 9, 23, 6, 8]))
| def min_fee(print_page_list):
sum_ = 0
prev = 0
for i in sorted(print_page_list):
sum_ += prev + i
prev += i
return sum_
if __name__ == '__main__':
print(min_fee([6, 11, 4, 1]))
print(min_fee([3, 2, 1]))
print(min_fee([3, 1, 4, 3, 2]))
print(min_fee([8, 4, 2, 3, 9, 23, 6, 8])) |
SCREEN_WIDTH = 640
SCREEN_HEIGHT = 480
NUMBER_OF_POINTS = 4
POINT_WIDTH = 4.0
CIRCLE_BORDER_WIDTH = 1
SWEEP_LINE_OFFSET = 0.001 | screen_width = 640
screen_height = 480
number_of_points = 4
point_width = 4.0
circle_border_width = 1
sweep_line_offset = 0.001 |
"""
Given a string, your task is to replace each of its characters by the next one in the
English alphabet; i.e. replace a with b, replace b with c, etc (z would be replaced by a).
Example
For inputString = "crazy", the output should be alphabeticShift(inputString) = "dsbaz".
"""
def alphabeticShift(inputString):
alphabet_list = list('abcdefghijklmnopqrstuvwxyzabc')
output_string = []
for letter in inputString:
if letter == 'z':
output_string.append('a')
else:
letter_index = alphabet_list.index(letter) + 1
output_string.append(alphabet_list[letter_index])
new_word = "".join(output_string)
return new_word | """
Given a string, your task is to replace each of its characters by the next one in the
English alphabet; i.e. replace a with b, replace b with c, etc (z would be replaced by a).
Example
For inputString = "crazy", the output should be alphabeticShift(inputString) = "dsbaz".
"""
def alphabetic_shift(inputString):
alphabet_list = list('abcdefghijklmnopqrstuvwxyzabc')
output_string = []
for letter in inputString:
if letter == 'z':
output_string.append('a')
else:
letter_index = alphabet_list.index(letter) + 1
output_string.append(alphabet_list[letter_index])
new_word = ''.join(output_string)
return new_word |
'''
The array-form of an integer num is an array representing its digits in left to right order.
For example, for num = 1321, the array form is [1,3,2,1].
Given num, the array-form of an integer, and an integer k, return the array-form of the integer num + k.
Example 1:
Input: num = [1,2,0,0], k = 34
Output: [1,2,3,4]
Explanation: 1200 + 34 = 1234
Example 2:
Input: num = [2,7,4], k = 181
Output: [4,5,5]
Explanation: 274 + 181 = 455
Example 3:
Input: num = [2,1,5], k = 806
Output: [1,0,2,1]
Explanation: 215 + 806 = 1021
Constraints:
1 <= num.length <= 104
0 <= num[i] <= 9
num does not contain any leading zeros except for the zero itself.
1 <= k <= 104
'''
class Solution:
def addToArrayForm(self, num: List[int], k: int) -> List[int]:
s = ""
for val in num:
s+=str(val)
s = str(int(s) + k)
num.clear()
for char in s:
num.append(int(char))
return num
| """
The array-form of an integer num is an array representing its digits in left to right order.
For example, for num = 1321, the array form is [1,3,2,1].
Given num, the array-form of an integer, and an integer k, return the array-form of the integer num + k.
Example 1:
Input: num = [1,2,0,0], k = 34
Output: [1,2,3,4]
Explanation: 1200 + 34 = 1234
Example 2:
Input: num = [2,7,4], k = 181
Output: [4,5,5]
Explanation: 274 + 181 = 455
Example 3:
Input: num = [2,1,5], k = 806
Output: [1,0,2,1]
Explanation: 215 + 806 = 1021
Constraints:
1 <= num.length <= 104
0 <= num[i] <= 9
num does not contain any leading zeros except for the zero itself.
1 <= k <= 104
"""
class Solution:
def add_to_array_form(self, num: List[int], k: int) -> List[int]:
s = ''
for val in num:
s += str(val)
s = str(int(s) + k)
num.clear()
for char in s:
num.append(int(char))
return num |
"""
Put a list of postgres supported functions
"""
pgf = (
"round", "min",
)
| """
Put a list of postgres supported functions
"""
pgf = ('round', 'min') |
"""
Simple DXF Export by Simon Greenwold.
Press the 'R' key to export a DXF file.
"""
add_library('dxf') # import processing.dxf.*
record = False
def setup():
size(400, 400, P3D)
noStroke()
sphereDetail(12)
def draw():
global record
if record:
beginRaw(DXF, "output.dxf") # Start recording to the file
lights()
background(0)
translate(width / 3, height / 3, -200)
rotateZ(map(mouseY, 0, height, 0, PI))
rotateY(map(mouseX, 0, width, 0, HALF_PI))
for y in range(-2, 2):
for x in range(-2, 2):
for z in range(-2, 2):
pushMatrix()
translate(120 * x, 120 * y, -120 * z)
sphere(30)
popMatrix()
if record:
endRaw()
record = False # Stop recording to the file
def keyPressed():
global record
if key == 'R' or key == 'r':
# Press R to save the file
record = True
| """
Simple DXF Export by Simon Greenwold.
Press the 'R' key to export a DXF file.
"""
add_library('dxf')
record = False
def setup():
size(400, 400, P3D)
no_stroke()
sphere_detail(12)
def draw():
global record
if record:
begin_raw(DXF, 'output.dxf')
lights()
background(0)
translate(width / 3, height / 3, -200)
rotate_z(map(mouseY, 0, height, 0, PI))
rotate_y(map(mouseX, 0, width, 0, HALF_PI))
for y in range(-2, 2):
for x in range(-2, 2):
for z in range(-2, 2):
push_matrix()
translate(120 * x, 120 * y, -120 * z)
sphere(30)
pop_matrix()
if record:
end_raw()
record = False
def key_pressed():
global record
if key == 'R' or key == 'r':
record = True |
def convert_sample_to_shot_coQA(sample, with_knowledge=None):
prefix = f"{sample['meta']}\n"
for turn in sample["dialogue"]:
prefix += f"Q: {turn[0]}" +"\n"
if turn[1] == "":
prefix += f"A:"
return prefix
else:
prefix += f"A: {turn[1]}" +"\n"
return prefix
| def convert_sample_to_shot_co_qa(sample, with_knowledge=None):
prefix = f"{sample['meta']}\n"
for turn in sample['dialogue']:
prefix += f'Q: {turn[0]}' + '\n'
if turn[1] == '':
prefix += f'A:'
return prefix
else:
prefix += f'A: {turn[1]}' + '\n'
return prefix |
# Definition for a binary tree node.
class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution(object):
def bstFromPreorder(self, preorder):
"""
:type preorder: List[int]
:rtype: TreeNode
"""
if not preorder:
return None
root = TreeNode(preorder[0])
for n in preorder[1:]:
self.insert(root, root, n)
return root
def insert(self, parent, node, n):
if node is None:
if n < parent.val:
parent.left = TreeNode(n)
else:
parent.right = TreeNode(n)
return
if n < node.val:
self.insert(node, node.left, n)
else:
self.insert(node, node.right, n)
def test_bst_from_preorder():
root = Solution().bstFromPreorder([8, 5, 1, 7, 10, 12])
assert 8 == root.val
assert 5 == root.left.val
assert 10 == root.right.val
assert 1 == root.left.left.val
assert 7 == root.left.right.val
assert 12 == root.right.right.val
| class Treenode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution(object):
def bst_from_preorder(self, preorder):
"""
:type preorder: List[int]
:rtype: TreeNode
"""
if not preorder:
return None
root = tree_node(preorder[0])
for n in preorder[1:]:
self.insert(root, root, n)
return root
def insert(self, parent, node, n):
if node is None:
if n < parent.val:
parent.left = tree_node(n)
else:
parent.right = tree_node(n)
return
if n < node.val:
self.insert(node, node.left, n)
else:
self.insert(node, node.right, n)
def test_bst_from_preorder():
root = solution().bstFromPreorder([8, 5, 1, 7, 10, 12])
assert 8 == root.val
assert 5 == root.left.val
assert 10 == root.right.val
assert 1 == root.left.left.val
assert 7 == root.left.right.val
assert 12 == root.right.right.val |
def ensureUtf(s, encoding='utf8'):
"""Converts input to unicode if necessary.
If `s` is bytes, it will be decoded using the `encoding` parameters.
This function is used for preprocessing /source/ and /filename/ arguments
to the builtin function `compile`.
"""
# In Python2, str == bytes.
# In Python3, bytes remains unchanged, but str means unicode
# while unicode is not defined anymore
if type(s) == bytes:
return s.decode(encoding, 'ignore')
else:
return s
| def ensure_utf(s, encoding='utf8'):
"""Converts input to unicode if necessary.
If `s` is bytes, it will be decoded using the `encoding` parameters.
This function is used for preprocessing /source/ and /filename/ arguments
to the builtin function `compile`.
"""
if type(s) == bytes:
return s.decode(encoding, 'ignore')
else:
return s |
#!/usr/bin/python
# encoding: utf-8
"""
@author: liaozhicheng.cn@163.com
@date: 2016/7/24
""" | """
@author: liaozhicheng.cn@163.com
@date: 2016/7/24
""" |
class File:
def criar(nomeArquivo):
nomeArquivo = input('NOME DO ARQUIVO= ')
arquivo = open(nomeArquivo,'x')
arquivo.close
def escrever(texto):
nomeArquivo = input('NOME DO ARQUIVO= ')
arquivo = open(nomeArquivo,'w')
file = File()
file.criar()
file.escrever(input()) | class File:
def criar(nomeArquivo):
nome_arquivo = input('NOME DO ARQUIVO= ')
arquivo = open(nomeArquivo, 'x')
arquivo.close
def escrever(texto):
nome_arquivo = input('NOME DO ARQUIVO= ')
arquivo = open(nomeArquivo, 'w')
file = file()
file.criar()
file.escrever(input()) |
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 14 14:44:48 2020
@author: marcu
"""
| """
Created on Tue Apr 14 14:44:48 2020
@author: marcu
""" |
#---------------------------------------------------------------
# QUEUE (V2)
#---------------------------------------------------------------
# V0
class Queue(object):
def __init__(self, limit = 10):
self.queue = []
self.front = None
self.rear = None
self.limit = limit
self.size = 0
def __str__(self):
return ' '.join([str(i) for i in self.queue])
# to check if queue is empty
def isEmpty(self):
return self.size <= 0
# to add an element from the rear end of the queue
def enqueue(self, data):
if self.size >= self.limit:
return -1 # queue overflow
else:
"""
BEWARE OF IT
-> the queue is in "inverse" order to the array which is the way we implement here in python
i.e.
q = [1,2,3]
but the q is start from 1, end at 3 actually
e.g.
dequeue <---- 1, 2 ,3 <---- enqueue
"""
self.queue.append(data)
# assign the rear as size of the queue and front as 0
if self.front is None:
self.front = self.rear = 0
else:
self.rear = self.size
self.size += 1
# to pop an element from the front end of the queue
def dequeue(self):
if self.isEmpty():
return -1 # queue underflow
else:
"""
BEWARE OF IT
x = [1,2,3]
x.pop(0)
-> x = [2,3]
"""
self.queue.pop(0)
self.size -= 1
if self.size == 0:
self.front = self.rear = 0
else:
self.rear = self.size - 1
def getSize(self):
return self.size
# V1
# https://github.com/yennanliu/Data-Structures-using-Python/blob/master/Queue/Queue.py
class Queue(object):
def __init__(self, limit = 10):
self.queue = []
self.front = None
self.rear = None
self.limit = limit
self.size = 0
def __str__(self):
return ' '.join([str(i) for i in self.queue])
# to check if queue is empty
def isEmpty(self):
return self.size <= 0
# to add an element from the rear end of the queue
def enqueue(self, data):
if self.size >= self.limit:
return -1 # queue overflow
else:
self.queue.append(data)
# assign the rear as size of the queue and front as 0
if self.front is None:
self.front = self.rear = 0
else:
self.rear = self.size
self.size += 1
# to pop an element from the front end of the queue
def dequeue(self):
if self.isEmpty():
return -1 # queue underflow
else:
self.queue.pop(0)
self.size -= 1
if self.size == 0:
self.front = self.rear = 0
else:
self.rear = self.size - 1
def getSize(self):
return self.size
# if __name__ == '__main__':
# myQueue = Queue()
# for i in range(10):
# myQueue.enqueue(i)
# print(myQueue)
# print(('Queue Size:',myQueue.getSize()))
# myQueue.dequeue()
# print(myQueue)
# print(('Queue Size:',myQueue.getSize())) | class Queue(object):
def __init__(self, limit=10):
self.queue = []
self.front = None
self.rear = None
self.limit = limit
self.size = 0
def __str__(self):
return ' '.join([str(i) for i in self.queue])
def is_empty(self):
return self.size <= 0
def enqueue(self, data):
if self.size >= self.limit:
return -1
else:
'\n BEWARE OF IT\n -> the queue is in "inverse" order to the array which is the way we implement here in python \n i.e. \n q = [1,2,3]\n but the q is start from 1, end at 3 actually \n e.g.\n dequeue <---- 1, 2 ,3 <---- enqueue \n '
self.queue.append(data)
if self.front is None:
self.front = self.rear = 0
else:
self.rear = self.size
self.size += 1
def dequeue(self):
if self.isEmpty():
return -1
else:
'\n BEWARE OF IT \n x = [1,2,3]\n x.pop(0)\n -> x = [2,3]\n '
self.queue.pop(0)
self.size -= 1
if self.size == 0:
self.front = self.rear = 0
else:
self.rear = self.size - 1
def get_size(self):
return self.size
class Queue(object):
def __init__(self, limit=10):
self.queue = []
self.front = None
self.rear = None
self.limit = limit
self.size = 0
def __str__(self):
return ' '.join([str(i) for i in self.queue])
def is_empty(self):
return self.size <= 0
def enqueue(self, data):
if self.size >= self.limit:
return -1
else:
self.queue.append(data)
if self.front is None:
self.front = self.rear = 0
else:
self.rear = self.size
self.size += 1
def dequeue(self):
if self.isEmpty():
return -1
else:
self.queue.pop(0)
self.size -= 1
if self.size == 0:
self.front = self.rear = 0
else:
self.rear = self.size - 1
def get_size(self):
return self.size |
def count_sevens(*args):
return args.count(7)
nums = [90,1,35,67,89,20,3,1,2,3,4,5,6,9,34,46,57,68,79,12,23,34,55,1,90,54,34,76,8,23,34,45,56,67,78,12,23,34,45,56,67,768,23,4,5,6,7,8,9,12,34,14,15,16,17,11,7,11,8,4,6,2,5,8,7,10,12,13,14,15,7,8,7,7,345,23,34,45,56,67,1,7,3,6,7,2,3,4,5,6,7,8,9,8,7,6,5,4,2,1,2,3,4,5,6,7,8,9,0,9,8,7,8,7,6,5,4,3,2,1,7]
result1 = count_sevens(1, 4, 7)
result2 = count_sevens(*nums) | def count_sevens(*args):
return args.count(7)
nums = [90, 1, 35, 67, 89, 20, 3, 1, 2, 3, 4, 5, 6, 9, 34, 46, 57, 68, 79, 12, 23, 34, 55, 1, 90, 54, 34, 76, 8, 23, 34, 45, 56, 67, 78, 12, 23, 34, 45, 56, 67, 768, 23, 4, 5, 6, 7, 8, 9, 12, 34, 14, 15, 16, 17, 11, 7, 11, 8, 4, 6, 2, 5, 8, 7, 10, 12, 13, 14, 15, 7, 8, 7, 7, 345, 23, 34, 45, 56, 67, 1, 7, 3, 6, 7, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 9, 8, 7, 8, 7, 6, 5, 4, 3, 2, 1, 7]
result1 = count_sevens(1, 4, 7)
result2 = count_sevens(*nums) |
class WebSocketDefine:
# Uri = "wss://dstream.binance.com/ws"
# testnet
Uri = "wss://dstream.binancefuture.com/ws"
# testnet new spec
# Uri = "wss://sdstream.binancefuture.com/ws"
class RestApiDefine:
# Url = "https://dapi.binance.com"
# testnet
Url = "https://testnet.binancefuture.com"
| class Websocketdefine:
uri = 'wss://dstream.binancefuture.com/ws'
class Restapidefine:
url = 'https://testnet.binancefuture.com' |
"""
CLI tool to introspect flake8 plugins and their codes.
"""
__version__ = '0.1.1'
| """
CLI tool to introspect flake8 plugins and their codes.
"""
__version__ = '0.1.1' |
class NullLogger:
level_name = None
def remove(self, handler_id=None): # pragma: no cover
pass
def add(self, sink, **kwargs): # pragma: no cover
pass
def disable(self, name): # pragma: no cover
pass
def enable(self, name): # pragma: no cover
pass
def critical(self, __message, *args, **kwargs): # pragma: no cover
pass
def debug(self, __message, *args, **kwargs): # pragma: no cover
pass
def error(self, __message, *args, **kwargs): # pragma: no cover
pass
def exception(self, __message, *args, **kwargs): # pragma: no cover
pass
def info(self, __message, *args, **kwargs): # pragma: no cover
pass
def log(self, __level, __message, *args, **kwargs): # pragma: no cover
pass
def success(self, __message, *args, **kwargs): # pragma: no cover
pass
def trace(self, __message, *args, **kwargs): # pragma: no cover
pass
def warning(self, __message, *args, **kwargs): # pragma: no cover
pass
| class Nulllogger:
level_name = None
def remove(self, handler_id=None):
pass
def add(self, sink, **kwargs):
pass
def disable(self, name):
pass
def enable(self, name):
pass
def critical(self, __message, *args, **kwargs):
pass
def debug(self, __message, *args, **kwargs):
pass
def error(self, __message, *args, **kwargs):
pass
def exception(self, __message, *args, **kwargs):
pass
def info(self, __message, *args, **kwargs):
pass
def log(self, __level, __message, *args, **kwargs):
pass
def success(self, __message, *args, **kwargs):
pass
def trace(self, __message, *args, **kwargs):
pass
def warning(self, __message, *args, **kwargs):
pass |
"""Custom exceptions."""
class MFilesException(Exception):
"""M-Files base exception."""
| """Custom exceptions."""
class Mfilesexception(Exception):
"""M-Files base exception.""" |
class SomeCls():
""" class SomeCls """
def __init__(self):
pass
def returns_true(self):
""" returns_true """
return True
| class Somecls:
""" class SomeCls """
def __init__(self):
pass
def returns_true(self):
""" returns_true """
return True |
# ------------------------------------------------------------------------------
# CONFIG (Change propriately)
# ------------------------------------------------------------------------------
# Required
token = "please input"
post_channel_id = "please input"
target_days = 1 # The target range is the sum of days, hours, and minutes. If all zero, 1 day is set as default.
target_hours = 0 # The target range is the sum of days, hours, and minutes. If all zero, 1 day is set as default.
target_minutes = 0 # The target range is the sum of days, hours, and minutes. If all zero, 1 day is set as default.
tz_hours = +9
tz_name = "JST"
# Not Required
exclude_channel_id = ["if needed, please input"] # When two or more, like this ["one", "tow"]
exclude_users_id = ["if needed, please input"] # When two or more, like this ["one", "tow"]
exclude_message_subtype = ["if needed, please input"] # When two or more, like this ["channel_join", "channel_leave", "bot_message"]
# ------------------------------------------------------------------------------
| token = 'please input'
post_channel_id = 'please input'
target_days = 1
target_hours = 0
target_minutes = 0
tz_hours = +9
tz_name = 'JST'
exclude_channel_id = ['if needed, please input']
exclude_users_id = ['if needed, please input']
exclude_message_subtype = ['if needed, please input'] |
def facto(a):
fact=1
while(a>0):
fact*=a
a-=1
return fact
| def facto(a):
fact = 1
while a > 0:
fact *= a
a -= 1
return fact |
def is_prime(n: int) -> bool:
if n < 2:
return False
elif n == 2:
return True
for i in range(2, n):
if n % i == 0:
return False
return True
if __name__ == '__main__':
m = int(input())
n = int(input())
prime_sum = 0
prime_min = None
for i in range(m, n + 1):
if is_prime(i) is True:
if prime_min is None:
prime_min = i
prime_sum += i
print(f'{prime_sum}\n{prime_min}' if prime_sum > 0 else -1)
| def is_prime(n: int) -> bool:
if n < 2:
return False
elif n == 2:
return True
for i in range(2, n):
if n % i == 0:
return False
return True
if __name__ == '__main__':
m = int(input())
n = int(input())
prime_sum = 0
prime_min = None
for i in range(m, n + 1):
if is_prime(i) is True:
if prime_min is None:
prime_min = i
prime_sum += i
print(f'{prime_sum}\n{prime_min}' if prime_sum > 0 else -1) |
# pyOCD debugger
# Copyright (c) 2018-2020 Arm Limited
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
class Error(RuntimeError):
"""@brief Parent of all errors pyOCD can raise"""
pass
class InternalError(Error):
"""@brief Internal consistency or logic error.
This error indicates that something has happened that shouldn't be possible.
"""
pass
class TimeoutError(Error):
"""@brief Any sort of timeout"""
pass
class TargetSupportError(Error):
"""@brief Error related to target support"""
pass
class ProbeError(Error):
"""@brief Error communicating with the debug probe"""
pass
class ProbeDisconnected(ProbeError):
"""@brief The connection to the debug probe was lost"""
pass
class TargetError(Error):
"""@brief An error that happens on the target"""
pass
class DebugError(TargetError):
"""@brief Error controlling target debug resources"""
pass
class CoreRegisterAccessError(DebugError):
"""@brief Failure to read or write a core register."""
pass
class TransferError(DebugError):
"""@brief Error ocurred with a transfer over SWD or JTAG"""
pass
class TransferTimeoutError(TransferError):
"""@brief An SWD or JTAG timeout occurred"""
pass
class TransferFaultError(TransferError):
"""@brief A memory fault occurred.
This exception class is extended to optionally record the start address and an optional length of the
attempted memory access that caused the fault. The address and length, if available, will be included
in the description of the exception when it is converted to a string.
Positional arguments passed to the constructor are passed through to the superclass'
constructor, and thus operate like any other standard exception class. Keyword arguments of
'fault_address' and 'length' can optionally be passed to the constructor to initialize the fault
start address and length. Alternatively, the corresponding property setters can be used after
the exception is created.
"""
def __init__(self, *args, **kwargs):
super(TransferFaultError, self).__init__(*args)
self._address = kwargs.get('fault_address', None)
self._length = kwargs.get('length', None)
@property
def fault_address(self):
return self._address
@fault_address.setter
def fault_address(self, addr):
self._address = addr
@property
def fault_end_address(self):
return (self._address + self._length - 1) if (self._length is not None) else self._address
@property
def fault_length(self):
return self._length
@fault_length.setter
def fault_length(self, length):
self._length = length
def __str__(self):
desc = "Memory transfer fault"
if self.args:
if len(self.args) == 1:
desc += " (" + str(self.args[0]) + ")"
else:
desc += " " + str(self.args) + ""
if self._address is not None:
desc += " @ 0x%08x" % self._address
if self._length is not None:
desc += "-0x%08x" % self.fault_end_address
return desc
class FlashFailure(TargetError):
"""@brief Exception raised when flashing fails for some reason.
Positional arguments passed to the constructor are passed through to the superclass'
constructor, and thus operate like any other standard exception class. The flash address that
failed and/or result code from the algorithm can optionally be recorded in the exception, if
passed to the constructor as 'address' and 'result_code' keyword arguments.
"""
def __init__(self, *args, **kwargs):
super(FlashFailure, self).__init__(*args)
self._address = kwargs.get('address', None)
self._result_code = kwargs.get('result_code', None)
@property
def address(self):
return self._address
@property
def result_code(self):
return self._result_code
def __str__(self):
desc = super(FlashFailure, self).__str__()
parts = []
if self.address is not None:
parts.append("address 0x%08x" % self.address)
if self.result_code is not None:
parts.append("result code 0x%x" % self.result_code)
if parts:
if desc:
desc += " "
desc += "(%s)" % ("; ".join(parts))
return desc
class FlashEraseFailure(FlashFailure):
"""@brief An attempt to erase flash failed. """
pass
class FlashProgramFailure(FlashFailure):
"""@brief An attempt to program flash failed. """
pass
class CommandError(Error):
"""@brief Raised when a command encounters an error."""
pass
| class Error(RuntimeError):
"""@brief Parent of all errors pyOCD can raise"""
pass
class Internalerror(Error):
"""@brief Internal consistency or logic error.
This error indicates that something has happened that shouldn't be possible.
"""
pass
class Timeouterror(Error):
"""@brief Any sort of timeout"""
pass
class Targetsupporterror(Error):
"""@brief Error related to target support"""
pass
class Probeerror(Error):
"""@brief Error communicating with the debug probe"""
pass
class Probedisconnected(ProbeError):
"""@brief The connection to the debug probe was lost"""
pass
class Targeterror(Error):
"""@brief An error that happens on the target"""
pass
class Debugerror(TargetError):
"""@brief Error controlling target debug resources"""
pass
class Coreregisteraccesserror(DebugError):
"""@brief Failure to read or write a core register."""
pass
class Transfererror(DebugError):
"""@brief Error ocurred with a transfer over SWD or JTAG"""
pass
class Transfertimeouterror(TransferError):
"""@brief An SWD or JTAG timeout occurred"""
pass
class Transferfaulterror(TransferError):
"""@brief A memory fault occurred.
This exception class is extended to optionally record the start address and an optional length of the
attempted memory access that caused the fault. The address and length, if available, will be included
in the description of the exception when it is converted to a string.
Positional arguments passed to the constructor are passed through to the superclass'
constructor, and thus operate like any other standard exception class. Keyword arguments of
'fault_address' and 'length' can optionally be passed to the constructor to initialize the fault
start address and length. Alternatively, the corresponding property setters can be used after
the exception is created.
"""
def __init__(self, *args, **kwargs):
super(TransferFaultError, self).__init__(*args)
self._address = kwargs.get('fault_address', None)
self._length = kwargs.get('length', None)
@property
def fault_address(self):
return self._address
@fault_address.setter
def fault_address(self, addr):
self._address = addr
@property
def fault_end_address(self):
return self._address + self._length - 1 if self._length is not None else self._address
@property
def fault_length(self):
return self._length
@fault_length.setter
def fault_length(self, length):
self._length = length
def __str__(self):
desc = 'Memory transfer fault'
if self.args:
if len(self.args) == 1:
desc += ' (' + str(self.args[0]) + ')'
else:
desc += ' ' + str(self.args) + ''
if self._address is not None:
desc += ' @ 0x%08x' % self._address
if self._length is not None:
desc += '-0x%08x' % self.fault_end_address
return desc
class Flashfailure(TargetError):
"""@brief Exception raised when flashing fails for some reason.
Positional arguments passed to the constructor are passed through to the superclass'
constructor, and thus operate like any other standard exception class. The flash address that
failed and/or result code from the algorithm can optionally be recorded in the exception, if
passed to the constructor as 'address' and 'result_code' keyword arguments.
"""
def __init__(self, *args, **kwargs):
super(FlashFailure, self).__init__(*args)
self._address = kwargs.get('address', None)
self._result_code = kwargs.get('result_code', None)
@property
def address(self):
return self._address
@property
def result_code(self):
return self._result_code
def __str__(self):
desc = super(FlashFailure, self).__str__()
parts = []
if self.address is not None:
parts.append('address 0x%08x' % self.address)
if self.result_code is not None:
parts.append('result code 0x%x' % self.result_code)
if parts:
if desc:
desc += ' '
desc += '(%s)' % '; '.join(parts)
return desc
class Flasherasefailure(FlashFailure):
"""@brief An attempt to erase flash failed. """
pass
class Flashprogramfailure(FlashFailure):
"""@brief An attempt to program flash failed. """
pass
class Commanderror(Error):
"""@brief Raised when a command encounters an error."""
pass |
"""TRUTH TABLE GENERATOR
by ANTHONY CURTIS ADLER"""
left_mark = '('
right_mark = ')'
def contains (phrase,chars):
"""Returns TRUE if <phrase> contains ANY one of <chars>"""
for x in chars:
if x in phrase:
return True
return False
def bracketed (phrase):
"""Returns TRUE if <phrase> is encompassed by a left bracket and a right bracket
at the same hierarchical level"""
level = 0
left_point = None
right_point = None
for count,char in enumerate(phrase):
if char == left_mark:
if level == 0:
left_point = count
level+=1
if char == right_mark:
level-=1
if level == 0:
right_point = count
if not (left_point is None) and (not right_point is None) and left_point == 0 and right_point == len(phrase)-1:
return True
return False
def all_boolean (phrase):
"""Returns TRUE if all elements of <phrase> are boolean"""
if not isinstance(phrase,list):
return False
for x in phrase:
if not isinstance(x,bool):
return False
return True
def split_into_phrases (phrase):
"""Inputs a string and returns a list containing elemenets, split according to parsing rules.
IF the list is of elements to be combined with AND, then no header.
If the list if of elements to be combined with OR, then '@' at the head of the list.
"""
if not contains(phrase,left_mark+right_mark):
#For a phrase without parantheses
if '|' in phrase:
return ['@']+[x for x in phrase.split('|')]
elif '&' in phrase:
return [x for x in phrase.split('&')]
#If the phrase contains parantheses.
phrase = list (phrase)
#convert string into a list of chars
level = 0
found = False # if one of the operators is found in the phrase
for operator in ['|','&']:
level = 0 # reset level
if not found:
for x,char in enumerate(phrase):
if char == left_mark:
level += 1
if char == right_mark:
level -=1
# level indicates level within hierarchy established by parantheses
if level == 0 and x+1 < len(phrase) and phrase[x+1] == operator:
phrase[x+1] = '!@'+operator+'@!'
found = True
break
if '!@&@!' in phrase:
# For AND
phrases = ''.join(phrase).split('!@&@!')
elif '!@|@!' in phrase:
# For OR
phrases = ['@']+''.join(phrase).split('!@|@!')
return [x for x in phrases]
def all_is_P (phrase,predicate_function=None):
"""Returns TRUE if <predicate_function> is TRUE of
every element in <phrase>"""
returnvalue = True
for x in phrase:
if not predicate_function(x):
returnvalue = False
return returnvalue
def all_is_None (phrase):
"""Returns TRUE if all elements in <phrase> is null"""
phrase = [x for x in phrase if not x is None]
return phrase == []
def some_is_None (phrase):
"""Returns TRUE if some elements in <phrase> are none"""
for x in phrase:
if x is None:
return False
return True
def is_simple (phrase):
"""Returns TRUE if <phrase> is a simple name, i.e. a variable"""
return not contains(phrase,left_mark+right_mark+'&|')
def is_set (phrase):
"""Returns TRUE if <phrase> is boolean."""
return isinstance(phrase,set)
def and_sum (phrase):
"""Returns TRUE iff every element in <phrase> is TRUE"""
if len(phrase) > 0:
total = set(phrase[0])
else:
total = set()
for x in phrase:
total = total.intersection(x)
return total
def or_sum (phrase):
"""Returns TRUE iff one element in <phrase> is TRUE"""
total = set()
for x in phrase:
total = total.union(x)
return total
def heading_count(phrase,char='~'):
"""Returns the number of negating prefixes in <phrase> and the <phrase> shorn of prefixes."""
count = 0
for x in phrase:
if x != char:
break
count+=1
return count,phrase[count:]
def parse (phrase):
"""The primary recursive parsing function"""
if isinstance(phrase,str):
phrase = phrase.strip()
#If the phrase is a string
if is_simple(phrase):
#EXITS the recursion
if phrase[0:2] == '~~':
return phrase[2:]
#Eliminates negations that cancel each other
return phrase
elif bracketed(phrase):
#Eliminate top-level parantheses
return parse(phrase[1:-1])
elif phrase[0] == '~':
#If the phrase begins with a negating prefix...
negations,phrase = heading_count(phrase)
if bracketed(phrase):
#If the negated phrase is bracketed
if negations % 2 == 1:
subphrase = split_into_phrases(phrase[1:-1])
if subphrase[0] != '@':
#De Morgan's Law
return parse(['@']+['~'+x for x in subphrase])
else:
#De Morgan's Law
return parse(['~'+x for x in subphrase[1:]])
else:
return parse(phrase[1:-1])
return parse(split_into_phrases((negations%2)*'~'+phrase))
else:
return parse(split_into_phrases(phrase))
# IF the phrase is a list
if all_is_P(phrase,predicate_function=is_simple):
#If every terms of the phrase list is simple...
#This prepares for EXIT from recursion
return [parse(x) for x in phrase]
return parse([parse(x) for x in phrase])
def extract_lists (phrase):
"""IF <phrase> = [ITEM1,ITEM2,[LIST1,LIST2]] yields
[ITEM1,ITEM2,LIST1,LIST2]"""
def list_of_lists (phrase):
# TRUE if every element of <phrase> is a list
for x in phrase:
if not isinstance(x,list):
return False
return True
def some_lists (phrase):
# True if some elements of <phrase> are lists.
for x in phrase:
if isinstance(x,list):
return True
return False
def extract (x):
# Recursive function to extract lists.
returnlist = []
if not isinstance(x,list):
returnlist = x
elif not some_lists(x):
returnlist = x
elif not list_of_lists(x):
returnlist = x
else:
# For a list composed of lists
for y in x:
if isinstance(y,list) and not list_of_lists(y):
returnlist.append(extract(y))
else:
for z in y:
# Extracts elements of a list of lists into the containing list
returnlist.append((extract(z)))
return returnlist
return extract(phrase)
def no_or_clauses (phrase):
""" Returns TRUE if <phrase> contains no OR lists."""
for x in phrase:
if isinstance(x,list) and x[0] == '@':
return False
return True
def enter (phrase,universe=None):
"""Enters the truth value of <phrase> into <universe>.
"""
negations, phrase = heading_count(phrase)
value = {0:True,
1:False}[negations % 2]
if phrase not in universe:
universe[phrase] = value
else:
# If there is a contradiction, return NULL
if universe[phrase] != value:
return None
return True
def multiply (phrase):
"""Recursive function to combine AND or OR lists.
The PRODUCT of OR lists is used to generate the TRUTH TABLE.
"""
if not isinstance(phrase,list):
return phrase
if no_or_clauses(phrase):
# IF there are only AND lists at the top level
return [multiply(x) for x in phrase]
else:
# For a combination of AND and OR lists
and_clauses = []
or_clauses = []
for x in phrase:
# DIVIDES into AND and OR lists
if isinstance(x,list) and x[0]=='@':
or_clauses.append(x)
else:
and_clauses.append(x)
multiplied_phrases = [and_clauses]
for x in or_clauses:
# Produces the product of two OR lists.
# [A,B][C,D] = [[A,C],[A,D],[B,C],[B,D]]
new_phrases = []
for y in x[1:]:
for z in list(multiplied_phrases):
if not isinstance(z,list):
new_phrases.append([z,y])
else:
new_phrases.append(z+[y])
multiplied_phrases = [multiply(x) for x in new_phrases]
return extract_lists(multiplied_phrases)
def interpret (phrase,universe=None):
"""Recursive function interpreting LIST of AND and OR lists containing BOOLEAN values to
yield a BOOLEAN value.
<universe> is the dictionary representing the true facts with reference to which the
value of <phrase> will be calculated."""
if phrase is None:
return phrase
elif isinstance(phrase,str):
phrase = phrase.strip()
if phrase=='@':
return '@'
if phrase in universe:
return universe[phrase]
else:
return set()
elif isinstance(phrase,set):
return phrase
elif all_is_P(phrase,predicate_function=is_set) or (phrase[0]=='@' and all_is_P(phrase[1:],predicate_function=is_set)):
# If an AND or OR LIST, return TRUE or FALSE for the list.
if phrase[0]=='@':
return or_sum(phrase[1:])
else:
return and_sum(phrase)
if isinstance(phrase,str):
phrase = [phrase]
#Eliminate null elements.
return interpret([interpret(x,universe=universe) for x in phrase],universe=universe)
#Recursively calls function.
def get_variables (phrase):
"""Get all variables from a phrase."""
for char in left_mark+right_mark+'&|':
phrase = phrase.replace(char,' ')
phrase = phrase.split(' ')
phrase = list(set([x for x in phrase if x]))
return phrase
def generate_truth_tables (variables):
"""Generates list for the entered variables.
V1,V2 => ['@',V1,~V1]*['@',V2,~V2] => [[V1,V2],[V1,~V2],[~V1,V2],[~V1,~V2]]
This list represents all the possible values for the given variables.
"""
variable_pairs = []
for x in variables:
variable_pairs.append(['@',x,'~'+x])
return multiply(variable_pairs)
def populate_universe (phrase):
"""Returns a universe populated with truth values.
"""
new_universe = {}
for x in phrase:
enter(x,new_universe)
return new_universe
def generate_truth_universes(phrase):
"""Returns a list of universes corresponding to possible
values of variables."""
universe_list = []
for x in generate_truth_tables(get_variables(phrase)):
universe_list.append((x,populate_universe(x)))
return universe_list
def truth_table (phrase):
"""Print out the truth table for <phrase>
"""
return_text = []
phrase = format_input(phrase)
universes = generate_truth_universes(phrase)
# Generate the universes
for counter, x in enumerate(universes):
universe = x[1]
row = sorted(x[0],key=lambda x:x.replace('~',''))
result = interpret(parse(phrase),universe=universe)
# the values of the rows in the truth table
# determined by interpreting PHRASE in the
# given universe
header = ''
rank = left_mark+str(counter)+right_mark
rank = rank + ((len(str(len(universes)))+2)-len(rank))*' '
for r in row:
header+=('~' not in r)*' '+r+' '
return_text.append(rank+': '+header+ ' | ' + str(result))
max_length = max([len(x) for x in return_text])
final_text = ''
for x in return_text:
if x != '_':
final_text += x+(max_length-len(x))*' '+'\n'
else:
final_text += '_'*max_length+'\n'
return final_text
##print(ENTERSCRIPT)
##
##while True:
##
## try:
##
## print(truth_table(input('?')))
## except:
## print('INVALID INPUT')
##
##
| """TRUTH TABLE GENERATOR
by ANTHONY CURTIS ADLER"""
left_mark = '('
right_mark = ')'
def contains(phrase, chars):
"""Returns TRUE if <phrase> contains ANY one of <chars>"""
for x in chars:
if x in phrase:
return True
return False
def bracketed(phrase):
"""Returns TRUE if <phrase> is encompassed by a left bracket and a right bracket
at the same hierarchical level"""
level = 0
left_point = None
right_point = None
for (count, char) in enumerate(phrase):
if char == left_mark:
if level == 0:
left_point = count
level += 1
if char == right_mark:
level -= 1
if level == 0:
right_point = count
if not left_point is None and (not right_point is None) and (left_point == 0) and (right_point == len(phrase) - 1):
return True
return False
def all_boolean(phrase):
"""Returns TRUE if all elements of <phrase> are boolean"""
if not isinstance(phrase, list):
return False
for x in phrase:
if not isinstance(x, bool):
return False
return True
def split_into_phrases(phrase):
"""Inputs a string and returns a list containing elemenets, split according to parsing rules.
IF the list is of elements to be combined with AND, then no header.
If the list if of elements to be combined with OR, then '@' at the head of the list.
"""
if not contains(phrase, left_mark + right_mark):
if '|' in phrase:
return ['@'] + [x for x in phrase.split('|')]
elif '&' in phrase:
return [x for x in phrase.split('&')]
phrase = list(phrase)
level = 0
found = False
for operator in ['|', '&']:
level = 0
if not found:
for (x, char) in enumerate(phrase):
if char == left_mark:
level += 1
if char == right_mark:
level -= 1
if level == 0 and x + 1 < len(phrase) and (phrase[x + 1] == operator):
phrase[x + 1] = '!@' + operator + '@!'
found = True
break
if '!@&@!' in phrase:
phrases = ''.join(phrase).split('!@&@!')
elif '!@|@!' in phrase:
phrases = ['@'] + ''.join(phrase).split('!@|@!')
return [x for x in phrases]
def all_is_p(phrase, predicate_function=None):
"""Returns TRUE if <predicate_function> is TRUE of
every element in <phrase>"""
returnvalue = True
for x in phrase:
if not predicate_function(x):
returnvalue = False
return returnvalue
def all_is__none(phrase):
"""Returns TRUE if all elements in <phrase> is null"""
phrase = [x for x in phrase if not x is None]
return phrase == []
def some_is__none(phrase):
"""Returns TRUE if some elements in <phrase> are none"""
for x in phrase:
if x is None:
return False
return True
def is_simple(phrase):
"""Returns TRUE if <phrase> is a simple name, i.e. a variable"""
return not contains(phrase, left_mark + right_mark + '&|')
def is_set(phrase):
"""Returns TRUE if <phrase> is boolean."""
return isinstance(phrase, set)
def and_sum(phrase):
"""Returns TRUE iff every element in <phrase> is TRUE"""
if len(phrase) > 0:
total = set(phrase[0])
else:
total = set()
for x in phrase:
total = total.intersection(x)
return total
def or_sum(phrase):
"""Returns TRUE iff one element in <phrase> is TRUE"""
total = set()
for x in phrase:
total = total.union(x)
return total
def heading_count(phrase, char='~'):
"""Returns the number of negating prefixes in <phrase> and the <phrase> shorn of prefixes."""
count = 0
for x in phrase:
if x != char:
break
count += 1
return (count, phrase[count:])
def parse(phrase):
"""The primary recursive parsing function"""
if isinstance(phrase, str):
phrase = phrase.strip()
if is_simple(phrase):
if phrase[0:2] == '~~':
return phrase[2:]
return phrase
elif bracketed(phrase):
return parse(phrase[1:-1])
elif phrase[0] == '~':
(negations, phrase) = heading_count(phrase)
if bracketed(phrase):
if negations % 2 == 1:
subphrase = split_into_phrases(phrase[1:-1])
if subphrase[0] != '@':
return parse(['@'] + ['~' + x for x in subphrase])
else:
return parse(['~' + x for x in subphrase[1:]])
else:
return parse(phrase[1:-1])
return parse(split_into_phrases(negations % 2 * '~' + phrase))
else:
return parse(split_into_phrases(phrase))
if all_is_p(phrase, predicate_function=is_simple):
return [parse(x) for x in phrase]
return parse([parse(x) for x in phrase])
def extract_lists(phrase):
"""IF <phrase> = [ITEM1,ITEM2,[LIST1,LIST2]] yields
[ITEM1,ITEM2,LIST1,LIST2]"""
def list_of_lists(phrase):
for x in phrase:
if not isinstance(x, list):
return False
return True
def some_lists(phrase):
for x in phrase:
if isinstance(x, list):
return True
return False
def extract(x):
returnlist = []
if not isinstance(x, list):
returnlist = x
elif not some_lists(x):
returnlist = x
elif not list_of_lists(x):
returnlist = x
else:
for y in x:
if isinstance(y, list) and (not list_of_lists(y)):
returnlist.append(extract(y))
else:
for z in y:
returnlist.append(extract(z))
return returnlist
return extract(phrase)
def no_or_clauses(phrase):
""" Returns TRUE if <phrase> contains no OR lists."""
for x in phrase:
if isinstance(x, list) and x[0] == '@':
return False
return True
def enter(phrase, universe=None):
"""Enters the truth value of <phrase> into <universe>.
"""
(negations, phrase) = heading_count(phrase)
value = {0: True, 1: False}[negations % 2]
if phrase not in universe:
universe[phrase] = value
elif universe[phrase] != value:
return None
return True
def multiply(phrase):
"""Recursive function to combine AND or OR lists.
The PRODUCT of OR lists is used to generate the TRUTH TABLE.
"""
if not isinstance(phrase, list):
return phrase
if no_or_clauses(phrase):
return [multiply(x) for x in phrase]
else:
and_clauses = []
or_clauses = []
for x in phrase:
if isinstance(x, list) and x[0] == '@':
or_clauses.append(x)
else:
and_clauses.append(x)
multiplied_phrases = [and_clauses]
for x in or_clauses:
new_phrases = []
for y in x[1:]:
for z in list(multiplied_phrases):
if not isinstance(z, list):
new_phrases.append([z, y])
else:
new_phrases.append(z + [y])
multiplied_phrases = [multiply(x) for x in new_phrases]
return extract_lists(multiplied_phrases)
def interpret(phrase, universe=None):
"""Recursive function interpreting LIST of AND and OR lists containing BOOLEAN values to
yield a BOOLEAN value.
<universe> is the dictionary representing the true facts with reference to which the
value of <phrase> will be calculated."""
if phrase is None:
return phrase
elif isinstance(phrase, str):
phrase = phrase.strip()
if phrase == '@':
return '@'
if phrase in universe:
return universe[phrase]
else:
return set()
elif isinstance(phrase, set):
return phrase
elif all_is_p(phrase, predicate_function=is_set) or (phrase[0] == '@' and all_is_p(phrase[1:], predicate_function=is_set)):
if phrase[0] == '@':
return or_sum(phrase[1:])
else:
return and_sum(phrase)
if isinstance(phrase, str):
phrase = [phrase]
return interpret([interpret(x, universe=universe) for x in phrase], universe=universe)
def get_variables(phrase):
"""Get all variables from a phrase."""
for char in left_mark + right_mark + '&|':
phrase = phrase.replace(char, ' ')
phrase = phrase.split(' ')
phrase = list(set([x for x in phrase if x]))
return phrase
def generate_truth_tables(variables):
"""Generates list for the entered variables.
V1,V2 => ['@',V1,~V1]*['@',V2,~V2] => [[V1,V2],[V1,~V2],[~V1,V2],[~V1,~V2]]
This list represents all the possible values for the given variables.
"""
variable_pairs = []
for x in variables:
variable_pairs.append(['@', x, '~' + x])
return multiply(variable_pairs)
def populate_universe(phrase):
"""Returns a universe populated with truth values.
"""
new_universe = {}
for x in phrase:
enter(x, new_universe)
return new_universe
def generate_truth_universes(phrase):
"""Returns a list of universes corresponding to possible
values of variables."""
universe_list = []
for x in generate_truth_tables(get_variables(phrase)):
universe_list.append((x, populate_universe(x)))
return universe_list
def truth_table(phrase):
"""Print out the truth table for <phrase>
"""
return_text = []
phrase = format_input(phrase)
universes = generate_truth_universes(phrase)
for (counter, x) in enumerate(universes):
universe = x[1]
row = sorted(x[0], key=lambda x: x.replace('~', ''))
result = interpret(parse(phrase), universe=universe)
header = ''
rank = left_mark + str(counter) + right_mark
rank = rank + (len(str(len(universes))) + 2 - len(rank)) * ' '
for r in row:
header += ('~' not in r) * ' ' + r + ' '
return_text.append(rank + ': ' + header + ' | ' + str(result))
max_length = max([len(x) for x in return_text])
final_text = ''
for x in return_text:
if x != '_':
final_text += x + (max_length - len(x)) * ' ' + '\n'
else:
final_text += '_' * max_length + '\n'
return final_text |
def get_cityscapes_palette(num_cls=19):
""" Returns the color map for visualizing the segmentation mask.
Args:
num_cls: Number of classes
Returns:
The color map
"""
palette = [0] * (num_cls * 3)
palette[0:3] = (128, 64, 128) # 0: 'road'
palette[3:6] = (244, 35,232) # 1 'sidewalk'
palette[6:9] = (70, 70, 70) # 2''building'
palette[9:12] = (102,102,156) # 3 wall
palette[12:15] = (190,153,153) # 4 fence
palette[15:18] = (153,153,153) # 5 pole
palette[18:21] = (250,170, 30) # 6 'traffic light'
palette[21:24] = (220,220, 0) # 7 'traffic sign'
palette[24:27] = (107,142, 35) # 8 'vegetation'
palette[27:30] = (152,251,152) # 9 'terrain'
palette[30:33] = ( 70,130,180) # 10 sky
palette[33:36] = (220, 20, 60) # 11 person
palette[36:39] = (255, 0, 0) # 12 rider
palette[39:42] = (0, 0, 142) # 13 car
palette[42:45] = (0, 0, 70) # 14 truck
palette[45:48] = (0, 60,100) # 15 bus
palette[48:51] = (0, 80,100) # 16 train
palette[51:54] = (0, 0,230) # 17 'motorcycle'
palette[54:57] = (119, 11, 32) # 18 'bicycle'
palette[57:60] = (105, 105, 105)
return palette
def get_gene_palette(num_cls=182): #Ref: CCNet
""" Returns the color map for visualizing the segmentation mask.
Args:
num_cls: Number of classes
Returns:
The color map
"""
n = num_cls
palette = [0] * (n * 3)
for j in range(0, n):
lab = j
palette[j * 3 + 0] = 0
palette[j * 3 + 1] = 0
palette[j * 3 + 2] = 0
i = 0
while lab:
palette[j * 3 + 0] |= (((lab >> 0) & 1) << (7 - i))
palette[j * 3 + 1] |= (((lab >> 1) & 1) << (7 - i))
palette[j * 3 + 2] |= (((lab >> 2) & 1) << (7 - i))
i += 1
lab >>= 3
return palette
def get_palette(dataset):
if dataset == 'cityscapes':
palette = get_cityscapes_palette(19)
elif dataset == 'pascal_context':
palette = get_gene_palette(num_cls=59)
else:
raise RuntimeError("unkonw dataset :{}".format(dataset))
return palette
| def get_cityscapes_palette(num_cls=19):
""" Returns the color map for visualizing the segmentation mask.
Args:
num_cls: Number of classes
Returns:
The color map
"""
palette = [0] * (num_cls * 3)
palette[0:3] = (128, 64, 128)
palette[3:6] = (244, 35, 232)
palette[6:9] = (70, 70, 70)
palette[9:12] = (102, 102, 156)
palette[12:15] = (190, 153, 153)
palette[15:18] = (153, 153, 153)
palette[18:21] = (250, 170, 30)
palette[21:24] = (220, 220, 0)
palette[24:27] = (107, 142, 35)
palette[27:30] = (152, 251, 152)
palette[30:33] = (70, 130, 180)
palette[33:36] = (220, 20, 60)
palette[36:39] = (255, 0, 0)
palette[39:42] = (0, 0, 142)
palette[42:45] = (0, 0, 70)
palette[45:48] = (0, 60, 100)
palette[48:51] = (0, 80, 100)
palette[51:54] = (0, 0, 230)
palette[54:57] = (119, 11, 32)
palette[57:60] = (105, 105, 105)
return palette
def get_gene_palette(num_cls=182):
""" Returns the color map for visualizing the segmentation mask.
Args:
num_cls: Number of classes
Returns:
The color map
"""
n = num_cls
palette = [0] * (n * 3)
for j in range(0, n):
lab = j
palette[j * 3 + 0] = 0
palette[j * 3 + 1] = 0
palette[j * 3 + 2] = 0
i = 0
while lab:
palette[j * 3 + 0] |= (lab >> 0 & 1) << 7 - i
palette[j * 3 + 1] |= (lab >> 1 & 1) << 7 - i
palette[j * 3 + 2] |= (lab >> 2 & 1) << 7 - i
i += 1
lab >>= 3
return palette
def get_palette(dataset):
if dataset == 'cityscapes':
palette = get_cityscapes_palette(19)
elif dataset == 'pascal_context':
palette = get_gene_palette(num_cls=59)
else:
raise runtime_error('unkonw dataset :{}'.format(dataset))
return palette |
# Define variables a and b. Read values a and b from console and calculate:
# a + b
# a - b
# a * b
# a / b
# a**b.
# Output obtained results.
a = int(input("Enter the first number : "))
b = int(input("Enter the second number : "))
print(a + b)
print(a - b)
print(a * b)
print(a / b)
print(a**b)
print(a%b)
print(a//b)
print(a**b**a) | a = int(input('Enter the first number : '))
b = int(input('Enter the second number : '))
print(a + b)
print(a - b)
print(a * b)
print(a / b)
print(a ** b)
print(a % b)
print(a // b)
print(a ** b ** a) |
"""
Initialize amr_kdtree
"""
| """
Initialize amr_kdtree
""" |
def validate_pin(pin):
if pin.isdigit() and (len(str(pin)) == 4 or len(str(pin)) == 6):
return True
else:
return False; | def validate_pin(pin):
if pin.isdigit() and (len(str(pin)) == 4 or len(str(pin)) == 6):
return True
else:
return False |
class FizzBuzz():
fizz, buzz = 'Fizz', 'Buzz'
@staticmethod
def is_mod_three_true(number):
return number % 3 == 0
@staticmethod
def is_mod_five_true(number):
return number % 5 == 0
def is_mod_three_and_five_true(self, number):
return self.is_mod_five_true(number) and self.is_mod_three_true(number)
def evaluate(self, number):
if not isinstance(number, int):
raise OurCustomException
if self.is_mod_three_and_five_true(number):
return "{}{}".format(self.fizz, self.buzz)
if self.is_mod_three_true(number):
return self.fizz
elif self.is_mod_five_true(number):
return self.buzz
else:
return number
class OurCustomException(Exception):
print("Custom Exception")
| class Fizzbuzz:
(fizz, buzz) = ('Fizz', 'Buzz')
@staticmethod
def is_mod_three_true(number):
return number % 3 == 0
@staticmethod
def is_mod_five_true(number):
return number % 5 == 0
def is_mod_three_and_five_true(self, number):
return self.is_mod_five_true(number) and self.is_mod_three_true(number)
def evaluate(self, number):
if not isinstance(number, int):
raise OurCustomException
if self.is_mod_three_and_five_true(number):
return '{}{}'.format(self.fizz, self.buzz)
if self.is_mod_three_true(number):
return self.fizz
elif self.is_mod_five_true(number):
return self.buzz
else:
return number
class Ourcustomexception(Exception):
print('Custom Exception') |
# https://leetcode.com/problems/find-pivot-index
class Solution:
def pivotIndex(self, nums):
if not nums:
return -1
l_sum = 0
r_sum = sum(nums) - nums[0]
if l_sum == r_sum:
return 0
for i in range(1, len(nums)):
r_sum -= nums[i]
l_sum += nums[i - 1]
if r_sum == l_sum:
return i
return -1
| class Solution:
def pivot_index(self, nums):
if not nums:
return -1
l_sum = 0
r_sum = sum(nums) - nums[0]
if l_sum == r_sum:
return 0
for i in range(1, len(nums)):
r_sum -= nums[i]
l_sum += nums[i - 1]
if r_sum == l_sum:
return i
return -1 |
DATABASE_ENGINE = 'sqlite3'
INSTALLED_APPS = 'yui_loader',
MIDDLEWARE_CLASSES = 'yui_loader.middleware.YUIIncludeMiddleware',
ROOT_URLCONF = 'yui_loader.tests.urls'
YUI_INCLUDE_BASE = '/js/yui/'
| database_engine = 'sqlite3'
installed_apps = ('yui_loader',)
middleware_classes = ('yui_loader.middleware.YUIIncludeMiddleware',)
root_urlconf = 'yui_loader.tests.urls'
yui_include_base = '/js/yui/' |
params = {
# Train
"n_epochs": 200,
"learning_rate": 1e-4,
"adam_beta_1": 0.9,
"adam_beta_2": 0.999,
"adam_epsilon": 1e-8,
"clip_grad_value": 5.0,
"evaluate_span": 50,
"checkpoint_span": 50,
# Early-stopping
"no_improve_epochs": 50,
# Model
"model": "model-mod-8",
"n_rnn_layers": 1,
"n_rnn_units": 128,
"sampling_rate": 100.0,
"input_size": 3000,
"n_classes": 5,
"l2_weight_decay": 1e-3,
# Dataset
"dataset": "sleepedf",
"data_dir": "./data/sleepedf/sleep-cassette/eeg_fpz_cz",
"n_folds": 20,
"n_subjects": 20,
# Data Augmentation
"augment_seq": True,
"augment_signal_full": True,
"weighted_cross_ent": True,
}
train = params.copy()
train.update({
"seq_length": 20,
"batch_size": 15,
})
predict = params.copy()
predict.update({
"batch_size": 1,
"seq_length": 1,
})
| params = {'n_epochs': 200, 'learning_rate': 0.0001, 'adam_beta_1': 0.9, 'adam_beta_2': 0.999, 'adam_epsilon': 1e-08, 'clip_grad_value': 5.0, 'evaluate_span': 50, 'checkpoint_span': 50, 'no_improve_epochs': 50, 'model': 'model-mod-8', 'n_rnn_layers': 1, 'n_rnn_units': 128, 'sampling_rate': 100.0, 'input_size': 3000, 'n_classes': 5, 'l2_weight_decay': 0.001, 'dataset': 'sleepedf', 'data_dir': './data/sleepedf/sleep-cassette/eeg_fpz_cz', 'n_folds': 20, 'n_subjects': 20, 'augment_seq': True, 'augment_signal_full': True, 'weighted_cross_ent': True}
train = params.copy()
train.update({'seq_length': 20, 'batch_size': 15})
predict = params.copy()
predict.update({'batch_size': 1, 'seq_length': 1}) |
name = "ping"
def ping():
print("pong!")
| name = 'ping'
def ping():
print('pong!') |
'''
Problem Statement : Lapindromes
Link : https://www.codechef.com/LRNDSA01/problems/LAPIN
score : accepted
'''
for _ in range(int(input())):
string = input()
mid = len(string)//2
first_half = None
second_half = None
if len(string)%2==0:
first_half = string[:mid]
second_half = string[mid:]
else:
first_half = string[:mid]
second_half = string[mid+1:]
lapindrome = True
char_first = set(first_half)
char_second = set(second_half)
if char_first == char_second:
for ch in first_half:
count_first = first_half.count(ch)
count_second = second_half.count(ch)
if count_first != count_second:
lapindrome = False
break
else:
lapindrome = False
if lapindrome:
print("YES")
else:
print("NO")
| """
Problem Statement : Lapindromes
Link : https://www.codechef.com/LRNDSA01/problems/LAPIN
score : accepted
"""
for _ in range(int(input())):
string = input()
mid = len(string) // 2
first_half = None
second_half = None
if len(string) % 2 == 0:
first_half = string[:mid]
second_half = string[mid:]
else:
first_half = string[:mid]
second_half = string[mid + 1:]
lapindrome = True
char_first = set(first_half)
char_second = set(second_half)
if char_first == char_second:
for ch in first_half:
count_first = first_half.count(ch)
count_second = second_half.count(ch)
if count_first != count_second:
lapindrome = False
break
else:
lapindrome = False
if lapindrome:
print('YES')
else:
print('NO') |
pid_yaw = rm_ctrl.PIDCtrl()
pid_pitch = rm_ctrl.PIDCtrl()
person_info = None
def start():
global person_info
global pid_yaw
global pid_pitch
global pit_chassis
robot_ctrl.set_mode(rm_define.robot_mode_chassis_follow)
# Enable person detection
vision_ctrl.enable_detection(rm_define.vision_detection_people)
# Allow chassis movement whilst programm is running
chassis_ctrl.enable_stick_overlay()
# TODO: Change parameters
pid_yaw.set_ctrl_params(115, 0, 5)
pid_pitch.set_ctrl_params(85, 0, 3)
gimbal_ctrl.set_rotate_speed(30)
while True:
person_info = vision_ctrl.get_people_detection_info()
print(person_info)
# if person is detected move gimbal so the person is in the center
if person_info[0] != 0:
X_mid = person_info[1]
Y_mid = person_info[2]
pid_yaw.set_error(X_mid - 0.5)
pid_pitch.set_error(0.5 - Y_mid)
gimbal_ctrl.rotate_with_speed(pid_yaw.get_output(), pid_pitch.get_output())
time.sleep(0.05)
else:
gimbal_ctrl.stop()
time.sleep(0.05)
| pid_yaw = rm_ctrl.PIDCtrl()
pid_pitch = rm_ctrl.PIDCtrl()
person_info = None
def start():
global person_info
global pid_yaw
global pid_pitch
global pit_chassis
robot_ctrl.set_mode(rm_define.robot_mode_chassis_follow)
vision_ctrl.enable_detection(rm_define.vision_detection_people)
chassis_ctrl.enable_stick_overlay()
pid_yaw.set_ctrl_params(115, 0, 5)
pid_pitch.set_ctrl_params(85, 0, 3)
gimbal_ctrl.set_rotate_speed(30)
while True:
person_info = vision_ctrl.get_people_detection_info()
print(person_info)
if person_info[0] != 0:
x_mid = person_info[1]
y_mid = person_info[2]
pid_yaw.set_error(X_mid - 0.5)
pid_pitch.set_error(0.5 - Y_mid)
gimbal_ctrl.rotate_with_speed(pid_yaw.get_output(), pid_pitch.get_output())
time.sleep(0.05)
else:
gimbal_ctrl.stop()
time.sleep(0.05) |
"""Possible average samples."""
AVERAGE_1 = 0
"""Average of 1 sample."""
AVERAGE_2 = 1
"""Average of 2 samples."""
AVERAGE_4 = 2
"""Average of 4 samples."""
AVERAGE_8 = 3
"""Average of 8 samples."""
| """Possible average samples."""
average_1 = 0
'Average of 1 sample.'
average_2 = 1
'Average of 2 samples.'
average_4 = 2
'Average of 4 samples.'
average_8 = 3
'Average of 8 samples.' |
n, x, y = map(int, input().split())
a = list(map(int, input().split()))
for d, ad in enumerate(a):
inf = ad + 1
l = max(0, d - x)
l_min = min(a[l:d]) if l < d else inf
r = min(n - 1, d + y)
r_min = min(a[d + 1: r + 1]) if d < r else inf
if ad < min(l_min, r_min):
print(d + 1)
break
| (n, x, y) = map(int, input().split())
a = list(map(int, input().split()))
for (d, ad) in enumerate(a):
inf = ad + 1
l = max(0, d - x)
l_min = min(a[l:d]) if l < d else inf
r = min(n - 1, d + y)
r_min = min(a[d + 1:r + 1]) if d < r else inf
if ad < min(l_min, r_min):
print(d + 1)
break |
"""Main module."""
def main():
print('package')
| """Main module."""
def main():
print('package') |
PATH_DATA = "data/"
URI_CSV = f"{PATH_DATA}Dades_meteorol_giques_de_la_XEMA.csv"
URI_DELTA = f"{PATH_DATA}weather_data.delta"
URI_DELTA_PART = f"{PATH_DATA}weather_data_partition.delta"
URI_STATIONS = f"{PATH_DATA}Metadades_estacions_meteorol_giques_autom_tiques.csv"
URI_VARS = f"{PATH_DATA}Metadades_variables_meteorol_giques.csv"
| path_data = 'data/'
uri_csv = f'{PATH_DATA}Dades_meteorol_giques_de_la_XEMA.csv'
uri_delta = f'{PATH_DATA}weather_data.delta'
uri_delta_part = f'{PATH_DATA}weather_data_partition.delta'
uri_stations = f'{PATH_DATA}Metadades_estacions_meteorol_giques_autom_tiques.csv'
uri_vars = f'{PATH_DATA}Metadades_variables_meteorol_giques.csv' |
MAX_DEPTH = 40
def gcd(a, b):
while b != 0:
t = b
b = a % b
a = t
return a
def play(a, b, turn_a, depth):
if depth == 0 or (a == 1 or b == 1):
if a == 1 and b == 1:
return 0
else:
if a == 1:
r = 2
elif b == 1:
r = 1
else:
r = -1
return r
g = gcd(a, b)
if turn_a:
if g == 1:
b -= 1
else:
p1, p2 = b / g, b - 1
b = None
for p in p1, p2:
r = play(a, p, False, depth - 1)
if r == -1:
b = p1
elif r == 1:
b = p
break
if b is None:
return 2
else:
if g == 1:
a -= 1
else:
p1, p2 = a / g, a - 1
a = None
for p in p1, p2:
r = play(p, b, True, depth - 1)
if r == -1:
a = p1
if r == 2:
a = p
break
if a is None:
return 1
return play(a, b, not turn_a, depth - 1)
def main():
m = ['Draw', 'Arjit', 'Chandu Don']
t = int(input())
while t > 0:
a, b = map(int, input().split())
print(m[play(a, b, True, MAX_DEPTH)])
t -= 1
main()
| max_depth = 40
def gcd(a, b):
while b != 0:
t = b
b = a % b
a = t
return a
def play(a, b, turn_a, depth):
if depth == 0 or (a == 1 or b == 1):
if a == 1 and b == 1:
return 0
else:
if a == 1:
r = 2
elif b == 1:
r = 1
else:
r = -1
return r
g = gcd(a, b)
if turn_a:
if g == 1:
b -= 1
else:
(p1, p2) = (b / g, b - 1)
b = None
for p in (p1, p2):
r = play(a, p, False, depth - 1)
if r == -1:
b = p1
elif r == 1:
b = p
break
if b is None:
return 2
elif g == 1:
a -= 1
else:
(p1, p2) = (a / g, a - 1)
a = None
for p in (p1, p2):
r = play(p, b, True, depth - 1)
if r == -1:
a = p1
if r == 2:
a = p
break
if a is None:
return 1
return play(a, b, not turn_a, depth - 1)
def main():
m = ['Draw', 'Arjit', 'Chandu Don']
t = int(input())
while t > 0:
(a, b) = map(int, input().split())
print(m[play(a, b, True, MAX_DEPTH)])
t -= 1
main() |
#SQL Server details
SQL_HOST = 'localhost'
SQL_USERNAME = 'root'
SQL_PASSWORD = ''
#Mongo Server details
MONGO_HOST = 'localhost'
#Cache details - whether to call a URL once an ingestion script is finished
RESET_CACHE = False
RESET_CACHE_URL = 'http://example.com/visualization_reload/'
#Fab - configuration for deploying to a remote server
FAB_HOSTS = []
FAB_GITHUB_URL = 'https://github.com/UQ-UQx/optimus_ingestor.git'
FAB_REMOTE_PATH = '/file/to/your/deployment/location'
#Ignored services
IGNORE_SERVICES = ['extract_sample', 'eventcount', 'daily_count']
#File output
OUTPUT_DIRECTORY = '/tmp'
DATA_PATHS = ['/data/']
EXPORT_PATH = '/Volumes/VMs/export'
#The server where the course information is found
SERVER_URL = 'http://dashboard.ceit.uq.edu.au'
CLICKSTREAM_PREFIX = 'uqx-edx-events-'
DBSTATE_PREFIX = 'UQx-' | sql_host = 'localhost'
sql_username = 'root'
sql_password = ''
mongo_host = 'localhost'
reset_cache = False
reset_cache_url = 'http://example.com/visualization_reload/'
fab_hosts = []
fab_github_url = 'https://github.com/UQ-UQx/optimus_ingestor.git'
fab_remote_path = '/file/to/your/deployment/location'
ignore_services = ['extract_sample', 'eventcount', 'daily_count']
output_directory = '/tmp'
data_paths = ['/data/']
export_path = '/Volumes/VMs/export'
server_url = 'http://dashboard.ceit.uq.edu.au'
clickstream_prefix = 'uqx-edx-events-'
dbstate_prefix = 'UQx-' |
def info():
print("Library By : Nishant Singh\n")
def show():
print("Hello Guys !!\n Its a sample fun() for Suprath Technologies.\n")
| def info():
print('Library By : Nishant Singh\n')
def show():
print('Hello Guys !!\n Its a sample fun() for Suprath Technologies.\n') |
def interpret(instruction_set, max_iterations=500):
""" Runs the instruction set in a virtual machine. Returns the printed path. """
def make_dir(from_byte):
if from_byte < 64:
return 'U'
elif from_byte < 128:
return 'R'
elif from_byte < 192:
return 'D'
else:
return 'L'
# prepare the memory, the instruction pointer, and the result
ip = 0
memory = list(instruction_set)
result = []
for iteration in range(max_iterations):
# get the instruction and the pointer
byte = memory[ip]
instruction = byte >> 6
pointer = byte & int('00111111', 2)
# bind the pointer to the memory
pointer %= len(memory)
# evaluate the instruction
if instruction == 0:
# increase byte
memory[pointer] = 0 if memory[pointer] >= 255 else memory[pointer] + 1
elif instruction == 1:
# decrease byte
memory[pointer] = 255 if memory[pointer] <= 0 else memory[pointer] - 1
elif instruction == 2:
# jump to byte
ip = pointer
elif instruction == 3:
# print direction
result.append(make_dir(memory[pointer]))
# move to the next byte, or to the start if out of range
# only move if we did not jump
if instruction != 2:
ip += 1
if ip >= len(memory):
ip = 0
return result
| def interpret(instruction_set, max_iterations=500):
""" Runs the instruction set in a virtual machine. Returns the printed path. """
def make_dir(from_byte):
if from_byte < 64:
return 'U'
elif from_byte < 128:
return 'R'
elif from_byte < 192:
return 'D'
else:
return 'L'
ip = 0
memory = list(instruction_set)
result = []
for iteration in range(max_iterations):
byte = memory[ip]
instruction = byte >> 6
pointer = byte & int('00111111', 2)
pointer %= len(memory)
if instruction == 0:
memory[pointer] = 0 if memory[pointer] >= 255 else memory[pointer] + 1
elif instruction == 1:
memory[pointer] = 255 if memory[pointer] <= 0 else memory[pointer] - 1
elif instruction == 2:
ip = pointer
elif instruction == 3:
result.append(make_dir(memory[pointer]))
if instruction != 2:
ip += 1
if ip >= len(memory):
ip = 0
return result |
#!/usr/bin/python
# -*- coding: utf-8 -*-
def getlist():
liststr = """
115img.com
2mdn.net
360doc.com
360buyimg.com
51buy.com
acfun.com
acfun.tv
acg.tv
acgvideo.com
adnxs.com
adroll.com
adsame.com
adsonar.com
adtechus.com
alipayobjects.com
appgame.com
atdmt.com
betrad.com
bilibili.com
bilibili.tv
bluekai.com
cctv.com
cnbeta.com
compete.com
doc88.com
douban.fm
doubanio.com
doubleclick.net
ebay.com
fastcdn.com
ftchinese.com
gamesville.com
gtimg.com
harrenmedianetwork.com
homeinns.com
iask.com
icson.com
ifeng.com
img.cctvpic.com
imqq.com
imrworldwide.com
invitemedia.com
ipinyou.com
irs01.com
irs01.net
iteye.com
jandan.net
jing.fm
jysq.net
kandian.com
ku6cdn.com
ku6img.com
kuaidi100.com
kuaidi100.net
lashou.com
lashouimg.com
legolas-media.com
logmein.com
lxdns.com
lycos.com
lygo.com
mathtag.com
mediaplex.com
mediav.com
miaozhen.com
microsoft.com
mlt01.com
mm111.net
mmstat.com
mookie1.com
mosso.com
netease.com
newsmth.net
nipic.com
oadz.com
oeeee.com
oschina.net
paypal.com
pengyou.com
pixlr.com
ppstream.com
pubmatic.com
qiniucdn.com
qq.com
qstatic.com
quantserve.com
renren.com
rrimg.com
rtbidder.net
scanscout.com
scorecardresearch.com
serving-sys.com
sina.com
sinaedge.com
sinaimg.com
sinahk.net
sinajs.com
snyu.com
staticsdo.com
tanx.com
tdimg.com
tremormedia.com
v2ex.com
vizu.com
williamlong.info
wrating.com
yieldmanager.com
ykimg.com
youshang.com
zdmimg.com
zhibo8.com
zhimg.com
zoopda.com
zuoche.com
"""
return set(liststr.splitlines(False))
| def getlist():
liststr = '\n115img.com\n2mdn.net\n360doc.com\n360buyimg.com\n51buy.com\nacfun.com\nacfun.tv\nacg.tv\nacgvideo.com\nadnxs.com\nadroll.com\nadsame.com\nadsonar.com\nadtechus.com\nalipayobjects.com\nappgame.com\natdmt.com\nbetrad.com\nbilibili.com\nbilibili.tv\nbluekai.com\ncctv.com\ncnbeta.com\ncompete.com\ndoc88.com\ndouban.fm\ndoubanio.com\ndoubleclick.net\nebay.com\nfastcdn.com\nftchinese.com\ngamesville.com\ngtimg.com\nharrenmedianetwork.com\nhomeinns.com\niask.com\nicson.com\nifeng.com\nimg.cctvpic.com\nimqq.com\nimrworldwide.com\ninvitemedia.com\nipinyou.com\nirs01.com\nirs01.net\niteye.com\njandan.net\njing.fm\njysq.net\nkandian.com\nku6cdn.com\nku6img.com\nkuaidi100.com\nkuaidi100.net\nlashou.com\nlashouimg.com\nlegolas-media.com\nlogmein.com\nlxdns.com\nlycos.com\nlygo.com\nmathtag.com\nmediaplex.com\nmediav.com\nmiaozhen.com\nmicrosoft.com\nmlt01.com\nmm111.net\nmmstat.com\nmookie1.com\nmosso.com\nnetease.com\nnewsmth.net\nnipic.com\noadz.com\noeeee.com\noschina.net\npaypal.com\npengyou.com\npixlr.com\nppstream.com\npubmatic.com\nqiniucdn.com\nqq.com\nqstatic.com\nquantserve.com\nrenren.com\nrrimg.com\nrtbidder.net\nscanscout.com\nscorecardresearch.com\nserving-sys.com\nsina.com\nsinaedge.com\nsinaimg.com\nsinahk.net\nsinajs.com\nsnyu.com\nstaticsdo.com\ntanx.com\ntdimg.com\ntremormedia.com\nv2ex.com\nvizu.com\nwilliamlong.info\nwrating.com\nyieldmanager.com\nykimg.com\nyoushang.com\nzdmimg.com\nzhibo8.com\nzhimg.com\nzoopda.com\nzuoche.com\n'
return set(liststr.splitlines(False)) |
MYSQL_SERVER=""
MYSQL_USER=""
MYSQL_PASS=""
MYSQL_DB=""
UPLOAD_REQUEST_URL=""
| mysql_server = ''
mysql_user = ''
mysql_pass = ''
mysql_db = ''
upload_request_url = '' |
"""Module to provider installer interface.
.. moduleauthor:: Xiaodong Wang <xiaodongwang@huawei.com>
"""
class Installer(object):
"""Interface for installer."""
NAME = 'installer'
def __init__(self):
raise NotImplementedError(
'%s is not implemented' % self.__class__.__name__)
def __repr__(self):
return '%s[%s]' % (self.__class__.__name__, self.NAME)
def sync(self, **kwargs):
"""virtual method to sync installer."""
pass
def reinstall_host(self, hostid, config, **kwargs):
"""virtual method to reinstall specific host."""
pass
def get_global_config(self, **kwargs):
"""virtual method to get global config."""
return {}
def clean_cluster_config(self, clusterid, config, **kwargs):
"""virtual method to clean cluster config.
:param clusterid: the id of the cluster to cleanup.
:type clusterid: int
:param config: cluster configuration to cleanup.
:type config: dict
"""
pass
def get_cluster_config(self, clusterid, **kwargs):
"""virtual method to get cluster config.
:param clusterid: the id of the cluster to get configuration.
:type clusterid: int
:returns: cluster configuration as dict.
"""
return {}
def clean_host_config(self, hostid, config, **kwargs):
"""virtual method to clean host config.
:param hostid: the id of the host to cleanup.
:type hostid: int
:param config: host configuration to cleanup.
:type config: dict
"""
pass
def get_host_config(self, hostid, **kwargs):
"""virtual method to get host config.
:param hostid: the id of host to get configuration.
:type hostid: int
:returns: host configuration as dict.
"""
return {}
def clean_host_configs(self, host_configs, **kwargs):
"""Wrapper method to clean hosts' configs.
:param host_configs: dict of host id to host configuration as dict
"""
for hostid, host_config in host_configs.items():
self.clean_host_config(hostid, host_config, **kwargs)
def get_host_configs(self, hostids, **kwargs):
"""Wrapper method get hosts' configs.
:param hostids: ids of the hosts' configuration.
:type hostids: list of int
:returns: dict of host id to host configuration as dict.
"""
host_configs = {}
for hostid in hostids:
host_configs[hostid] = self.get_host_config(hostid, **kwargs)
return host_configs
def update_global_config(self, config, **kwargs):
"""virtual method to update global config.
:param config: global configuration.
:type config: dict
"""
pass
def update_cluster_config(self, clusterid, config, **kwargs):
"""virtual method to update cluster config.
:param clusterid: the id of the cluster to update the configuration.
:type clusterid: int
:param config: cluster configuration to update.
:type config: dict
"""
pass
def update_host_config(self, hostid, config, **kwargs):
"""virtual method to update host config.
:param hostid: the id of host to update host configuration.
:type hostid: int
:param config: host configuration to update.
:type config: dict
"""
pass
def update_host_configs(self, host_configs, **kwargs):
"""Wrapper method to updaet hosts' configs.
:param host_configs: dict of host id to host configuration as dict
"""
for hostid, config in host_configs.items():
self.update_host_config(hostid, config, **kwargs)
| """Module to provider installer interface.
.. moduleauthor:: Xiaodong Wang <xiaodongwang@huawei.com>
"""
class Installer(object):
"""Interface for installer."""
name = 'installer'
def __init__(self):
raise not_implemented_error('%s is not implemented' % self.__class__.__name__)
def __repr__(self):
return '%s[%s]' % (self.__class__.__name__, self.NAME)
def sync(self, **kwargs):
"""virtual method to sync installer."""
pass
def reinstall_host(self, hostid, config, **kwargs):
"""virtual method to reinstall specific host."""
pass
def get_global_config(self, **kwargs):
"""virtual method to get global config."""
return {}
def clean_cluster_config(self, clusterid, config, **kwargs):
"""virtual method to clean cluster config.
:param clusterid: the id of the cluster to cleanup.
:type clusterid: int
:param config: cluster configuration to cleanup.
:type config: dict
"""
pass
def get_cluster_config(self, clusterid, **kwargs):
"""virtual method to get cluster config.
:param clusterid: the id of the cluster to get configuration.
:type clusterid: int
:returns: cluster configuration as dict.
"""
return {}
def clean_host_config(self, hostid, config, **kwargs):
"""virtual method to clean host config.
:param hostid: the id of the host to cleanup.
:type hostid: int
:param config: host configuration to cleanup.
:type config: dict
"""
pass
def get_host_config(self, hostid, **kwargs):
"""virtual method to get host config.
:param hostid: the id of host to get configuration.
:type hostid: int
:returns: host configuration as dict.
"""
return {}
def clean_host_configs(self, host_configs, **kwargs):
"""Wrapper method to clean hosts' configs.
:param host_configs: dict of host id to host configuration as dict
"""
for (hostid, host_config) in host_configs.items():
self.clean_host_config(hostid, host_config, **kwargs)
def get_host_configs(self, hostids, **kwargs):
"""Wrapper method get hosts' configs.
:param hostids: ids of the hosts' configuration.
:type hostids: list of int
:returns: dict of host id to host configuration as dict.
"""
host_configs = {}
for hostid in hostids:
host_configs[hostid] = self.get_host_config(hostid, **kwargs)
return host_configs
def update_global_config(self, config, **kwargs):
"""virtual method to update global config.
:param config: global configuration.
:type config: dict
"""
pass
def update_cluster_config(self, clusterid, config, **kwargs):
"""virtual method to update cluster config.
:param clusterid: the id of the cluster to update the configuration.
:type clusterid: int
:param config: cluster configuration to update.
:type config: dict
"""
pass
def update_host_config(self, hostid, config, **kwargs):
"""virtual method to update host config.
:param hostid: the id of host to update host configuration.
:type hostid: int
:param config: host configuration to update.
:type config: dict
"""
pass
def update_host_configs(self, host_configs, **kwargs):
"""Wrapper method to updaet hosts' configs.
:param host_configs: dict of host id to host configuration as dict
"""
for (hostid, config) in host_configs.items():
self.update_host_config(hostid, config, **kwargs) |
# -*- coding: utf-8 -*-
__author__ = 'Erik Castro'
__email__ = 'erik@erikcastro.net'
__version__ = '0.1.0'
| __author__ = 'Erik Castro'
__email__ = 'erik@erikcastro.net'
__version__ = '0.1.0' |
"""Connect to Robin Hood Print Message"""
#statment 1
connect_to_RobinHood_statment = "Hello, {fname} as of date {profile_time} account {profile_acct} has {profile_cash} in settled cash to trade. Algo Bot is engaging and connecting. Please monitor the system from time to time and message Michael Carrier at 815-355-7345 for any information on your account and bot system."
"""Logging off Robin Hood Print Message"""
#statment 2
logging_off_RobinHood__statment = 'System is logging off. At this time your current portfolio cash is {profile_cash} and your {position} Crypto'
#statment 3
watchmen_statment = " Algo is running strategy {fname}, scanning for conditions . Once the volatility hits a specific threshold for n times, trades will be placed onced ema crossovers occur. ***Summary*** \n Strategy : {fname} \n Current Asset : TODO \n Current Price : TODO \n Current Volatility : {volatility} \n Current Volatility Queue : {queue} \n Current Fast EMA: {fast} \n Current Slow EMA: {slow} \n Current Delta EMA : \n"
cancel_statment = """
'Cancelling Last Trade , Algo will reattempt to repurchase but manaual oversight is encouraged as this may be due to run away volatility """
| """Connect to Robin Hood Print Message"""
connect_to__robin_hood_statment = 'Hello, {fname} as of date {profile_time} account {profile_acct} has {profile_cash} in settled cash to trade. Algo Bot is engaging and connecting. Please monitor the system from time to time and message Michael Carrier at 815-355-7345 for any information on your account and bot system.'
'Logging off Robin Hood Print Message'
logging_off__robin_hood__statment = 'System is logging off. At this time your current portfolio cash is {profile_cash} and your {position} Crypto'
watchmen_statment = ' Algo is running strategy {fname}, scanning for conditions . Once the volatility hits a specific threshold for n times, trades will be placed onced ema crossovers occur. ***Summary*** \n Strategy : {fname} \n Current Asset : TODO \n Current Price : TODO \n Current Volatility : {volatility} \n Current Volatility Queue : {queue} \n Current Fast EMA: {fast} \n Current Slow EMA: {slow} \n Current Delta EMA : \n'
cancel_statment = "\n'Cancelling Last Trade , Algo will reattempt to repurchase but manaual oversight is encouraged as this may be due to run away volatility " |
numbers = [12, 4, 9, 10, 7]
total = 0
for num in numbers:
total = total + num
print("total: {}".format(total))
avg = total / len(numbers)
print("average: {}".format(avg))
| numbers = [12, 4, 9, 10, 7]
total = 0
for num in numbers:
total = total + num
print('total: {}'.format(total))
avg = total / len(numbers)
print('average: {}'.format(avg)) |
# 029 - Write a Python program to print out a set containing all the colors from color_list_1 which are not present in color_list_2.
colorInfo_1 = {
"White", "Black", "Red",
}
colorInfo_2 = {
"Red", "Green",
}
print(colorInfo_1 - colorInfo_2) | color_info_1 = {'White', 'Black', 'Red'}
color_info_2 = {'Red', 'Green'}
print(colorInfo_1 - colorInfo_2) |
class Tag(object):
def __init__(self, name, action):
self.name = name
self.action = action
| class Tag(object):
def __init__(self, name, action):
self.name = name
self.action = action |
class Conta():
def __init__(self,name,id,balance):
self.name = name
self.id = id
self.balance = balance
self.extract_list = []
def trasnfer(self, value):
self.balance-=value
self.extract_list.append(['trasnfer', value])
def deposit(self,value):
self.balance+=value
self.extract_list.append(['deposit', value])
def extract(self):
print(self.extract_list)
def painel(self):
print("######################")
print("## Nome:", self.name,"##")
print("## Id:", self.id,"##")
print("## balance:", self.balance,"##") | class Conta:
def __init__(self, name, id, balance):
self.name = name
self.id = id
self.balance = balance
self.extract_list = []
def trasnfer(self, value):
self.balance -= value
self.extract_list.append(['trasnfer', value])
def deposit(self, value):
self.balance += value
self.extract_list.append(['deposit', value])
def extract(self):
print(self.extract_list)
def painel(self):
print('######################')
print('## Nome:', self.name, '##')
print('## Id:', self.id, '##')
print('## balance:', self.balance, '##') |
def get_IoU(confusion_matrix, label):
assert (
label > 0 and label < 7
), f"The given label {label} has to be between 1 and 6."
if confusion_matrix[label - 1, :].sum() == 0:
return None
# There are -1 everywhere since "Unclassified" is not counted.
return confusion_matrix[label - 1, label - 1] / (
confusion_matrix[label - 1, :].sum()
+ confusion_matrix[:, label - 1].sum()
- confusion_matrix[label - 1, label - 1]
)
| def get__io_u(confusion_matrix, label):
assert label > 0 and label < 7, f'The given label {label} has to be between 1 and 6.'
if confusion_matrix[label - 1, :].sum() == 0:
return None
return confusion_matrix[label - 1, label - 1] / (confusion_matrix[label - 1, :].sum() + confusion_matrix[:, label - 1].sum() - confusion_matrix[label - 1, label - 1]) |
set1 = {10, 20, 30, 40, 50}
set2 = {30, 40, 50, 60, 70}
set3 = set1.union(set2)
print(set3)
# set3 = {70, 40, 10, 50, 20, 60, 30}
# set1 y set2 se mantienen igual | set1 = {10, 20, 30, 40, 50}
set2 = {30, 40, 50, 60, 70}
set3 = set1.union(set2)
print(set3) |
def oriNumb(ori):
if(ori=='r'):
return 0
elif(ori=='d'):
return 1
elif(ori=='l'):
return 2
elif(ori=='u'):
return 3
def numbOri(numb):
if(numb==0):
return 'r'
elif(numb==1):
return 'd'
elif(numb==2):
return 'l'
elif(numb==3):
return 'u'
def desloc(x,y,ori):
des=1
if(ori=='r'):
return (x+des,y)
elif(ori=='l'):
return (x-des,y)
elif(ori=='u'):
return (x,y-des)
elif (ori=='d'):
return (x,y+des)
def calcTag(lastori,ori):
resp=oriNumb(ori)-oriNumb(lastori)
if((lastori=='u' and ori=='r')):
resp=1
elif((lastori=='r' and ori=='u')):
resp=-1
return resp | def ori_numb(ori):
if ori == 'r':
return 0
elif ori == 'd':
return 1
elif ori == 'l':
return 2
elif ori == 'u':
return 3
def numb_ori(numb):
if numb == 0:
return 'r'
elif numb == 1:
return 'd'
elif numb == 2:
return 'l'
elif numb == 3:
return 'u'
def desloc(x, y, ori):
des = 1
if ori == 'r':
return (x + des, y)
elif ori == 'l':
return (x - des, y)
elif ori == 'u':
return (x, y - des)
elif ori == 'd':
return (x, y + des)
def calc_tag(lastori, ori):
resp = ori_numb(ori) - ori_numb(lastori)
if lastori == 'u' and ori == 'r':
resp = 1
elif lastori == 'r' and ori == 'u':
resp = -1
return resp |
mult_dict = {}
pow_dict = {}
def solution(n, m):
mult_dict[(m, m)] = 1
for i in range(1, m+1):
mult_dict[(m, m-i)] = mult_dict[(m, m-i+1)] * (m-i+1) % 1000000007
for i in range(m+1, 2*n-m+1):
mult_dict[(i, m)] = mult_dict[(i-1, m)] * i % 1000000007
mult_dict[(2*n-m, 2*n-m)] = 1
for i in range(2*n-m+1, 2*n+1):
mult_dict[(i, 2*n-m)] = mult_dict[(i-1, 2*n-m)] * i % 1000000007
for i in range(m+1):
buf = mult_dict[(2 * n - i, 2 * n - m)] * mult_dict[(2 * n - m, m)] % 1000000007
mult_dict[(2 * n - i, m-i)] = buf * mult_dict[(m, m-i)] % 1000000007
pow_dict[0] = 1
for i in range(1, m+1):
pow_dict[i] = pow_dict[i-1]*2 % 1000000007
positive = True
result = 0
for i in range(m+1):
buf = pow_dict[i] * mult_dict[(m, i)] % 1000000007
buf = buf * mult_dict[(2*n-i, m-i)] % 1000000007
result += (1 if positive else -1) * buf
result %= 1000000007
positive = not positive
return result
inFile = open("C-large-practice.in", "r")
outFile = open("C.out", "w")
T = int(inFile.readline())
for i in range(T):
print(i)
N, M = map(lambda x: int(x), inFile.readline().split())
outFile.write(f'Case #{i+1}: {solution(N, M)}\n')
inFile.close()
outFile.close()
| mult_dict = {}
pow_dict = {}
def solution(n, m):
mult_dict[m, m] = 1
for i in range(1, m + 1):
mult_dict[m, m - i] = mult_dict[m, m - i + 1] * (m - i + 1) % 1000000007
for i in range(m + 1, 2 * n - m + 1):
mult_dict[i, m] = mult_dict[i - 1, m] * i % 1000000007
mult_dict[2 * n - m, 2 * n - m] = 1
for i in range(2 * n - m + 1, 2 * n + 1):
mult_dict[i, 2 * n - m] = mult_dict[i - 1, 2 * n - m] * i % 1000000007
for i in range(m + 1):
buf = mult_dict[2 * n - i, 2 * n - m] * mult_dict[2 * n - m, m] % 1000000007
mult_dict[2 * n - i, m - i] = buf * mult_dict[m, m - i] % 1000000007
pow_dict[0] = 1
for i in range(1, m + 1):
pow_dict[i] = pow_dict[i - 1] * 2 % 1000000007
positive = True
result = 0
for i in range(m + 1):
buf = pow_dict[i] * mult_dict[m, i] % 1000000007
buf = buf * mult_dict[2 * n - i, m - i] % 1000000007
result += (1 if positive else -1) * buf
result %= 1000000007
positive = not positive
return result
in_file = open('C-large-practice.in', 'r')
out_file = open('C.out', 'w')
t = int(inFile.readline())
for i in range(T):
print(i)
(n, m) = map(lambda x: int(x), inFile.readline().split())
outFile.write(f'Case #{i + 1}: {solution(N, M)}\n')
inFile.close()
outFile.close() |
def odd_or_even(number: int):
if (number % 2) == 0:
return "Even"
else:
return "Odd"
if __name__ == "__main__":
while True:
number = int(input("Number: "))
print(odd_or_even(number))
| def odd_or_even(number: int):
if number % 2 == 0:
return 'Even'
else:
return 'Odd'
if __name__ == '__main__':
while True:
number = int(input('Number: '))
print(odd_or_even(number)) |
#
# PySNMP MIB module HH3C-L2ISOLATE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HH3C-L2ISOLATE-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:27:40 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ConstraintsIntersection, ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsUnion")
hh3cCommon, = mibBuilder.importSymbols("HH3C-OID-MIB", "hh3cCommon")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
Integer32, Gauge32, TimeTicks, NotificationType, Bits, MibIdentifier, Counter32, ObjectIdentity, Counter64, Unsigned32, ModuleIdentity, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "Gauge32", "TimeTicks", "NotificationType", "Bits", "MibIdentifier", "Counter32", "ObjectIdentity", "Counter64", "Unsigned32", "ModuleIdentity", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress")
TextualConvention, MacAddress, RowStatus, DisplayString, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "MacAddress", "RowStatus", "DisplayString", "TruthValue")
hh3cL2Isolate = ModuleIdentity((1, 3, 6, 1, 4, 1, 25506, 2, 103))
hh3cL2Isolate.setRevisions(('2009-05-06 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: hh3cL2Isolate.setRevisionsDescriptions(('Initial version',))
if mibBuilder.loadTexts: hh3cL2Isolate.setLastUpdated('200905060000Z')
if mibBuilder.loadTexts: hh3cL2Isolate.setOrganization('Hangzhou H3C Technologies Co., Ltd.')
if mibBuilder.loadTexts: hh3cL2Isolate.setContactInfo('Platform Team H3C Technologies Co., Ltd. Hai-Dian District Beijing P.R. China http://www.h3c.com Zip: 100085')
if mibBuilder.loadTexts: hh3cL2Isolate.setDescription('The MIB module is used for l2 isolation.')
hh3cL2IsolateObject = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 103, 1))
hh3cL2IsolateEnableTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 103, 1, 1), )
if mibBuilder.loadTexts: hh3cL2IsolateEnableTable.setStatus('current')
if mibBuilder.loadTexts: hh3cL2IsolateEnableTable.setDescription('A table for enabling/disabling layer-2-isolate for VLAN.')
hh3cL2IsolateEnableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 103, 1, 1, 1), ).setIndexNames((0, "HH3C-L2ISOLATE-MIB", "hh3cL2IsolateVLANIndex"))
if mibBuilder.loadTexts: hh3cL2IsolateEnableEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cL2IsolateEnableEntry.setDescription('An entry for enabling/disabling layer-2-isolate for VLAN.')
hh3cL2IsolateVLANIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 103, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4094)))
if mibBuilder.loadTexts: hh3cL2IsolateVLANIndex.setStatus('current')
if mibBuilder.loadTexts: hh3cL2IsolateVLANIndex.setDescription('Represents index of VLAN for layer-2-isolate.')
hh3cL2IsolateEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 103, 1, 1, 1, 2), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cL2IsolateEnable.setStatus('current')
if mibBuilder.loadTexts: hh3cL2IsolateEnable.setDescription('Represents the layer-2-isolate status of VLAN.')
hh3cL2IsolatePermitMACTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 103, 1, 2), )
if mibBuilder.loadTexts: hh3cL2IsolatePermitMACTable.setStatus('current')
if mibBuilder.loadTexts: hh3cL2IsolatePermitMACTable.setDescription('A table represents the permitting MAC address for the specific VLAN.')
hh3cL2IsolatePermitMACEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 103, 1, 2, 1), ).setIndexNames((0, "HH3C-L2ISOLATE-MIB", "hh3cL2IsolateVLANIndex"), (0, "HH3C-L2ISOLATE-MIB", "hh3cL2IsoLatePermitMAC"))
if mibBuilder.loadTexts: hh3cL2IsolatePermitMACEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cL2IsolatePermitMACEntry.setDescription('Each entry represents the permitting MAC address for the specific VLAN.')
hh3cL2IsoLatePermitMAC = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 103, 1, 2, 1, 1), MacAddress())
if mibBuilder.loadTexts: hh3cL2IsoLatePermitMAC.setStatus('current')
if mibBuilder.loadTexts: hh3cL2IsoLatePermitMAC.setDescription('Represents the MAC address permitted in the VLAN.')
hh3cL2IsoLatePermitMACRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 103, 1, 2, 1, 2), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: hh3cL2IsoLatePermitMACRowStatus.setStatus('current')
if mibBuilder.loadTexts: hh3cL2IsoLatePermitMACRowStatus.setDescription('RowStatus. Three actions are used: active, CreateAndGo, destroy.')
mibBuilder.exportSymbols("HH3C-L2ISOLATE-MIB", hh3cL2IsoLatePermitMACRowStatus=hh3cL2IsoLatePermitMACRowStatus, hh3cL2IsolatePermitMACEntry=hh3cL2IsolatePermitMACEntry, PYSNMP_MODULE_ID=hh3cL2Isolate, hh3cL2IsolatePermitMACTable=hh3cL2IsolatePermitMACTable, hh3cL2IsolateEnable=hh3cL2IsolateEnable, hh3cL2IsolateObject=hh3cL2IsolateObject, hh3cL2IsolateEnableTable=hh3cL2IsolateEnableTable, hh3cL2IsoLatePermitMAC=hh3cL2IsoLatePermitMAC, hh3cL2Isolate=hh3cL2Isolate, hh3cL2IsolateVLANIndex=hh3cL2IsolateVLANIndex, hh3cL2IsolateEnableEntry=hh3cL2IsolateEnableEntry)
| (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, constraints_intersection, value_size_constraint, single_value_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsUnion')
(hh3c_common,) = mibBuilder.importSymbols('HH3C-OID-MIB', 'hh3cCommon')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(integer32, gauge32, time_ticks, notification_type, bits, mib_identifier, counter32, object_identity, counter64, unsigned32, module_identity, iso, mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address) = mibBuilder.importSymbols('SNMPv2-SMI', 'Integer32', 'Gauge32', 'TimeTicks', 'NotificationType', 'Bits', 'MibIdentifier', 'Counter32', 'ObjectIdentity', 'Counter64', 'Unsigned32', 'ModuleIdentity', 'iso', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress')
(textual_convention, mac_address, row_status, display_string, truth_value) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'MacAddress', 'RowStatus', 'DisplayString', 'TruthValue')
hh3c_l2_isolate = module_identity((1, 3, 6, 1, 4, 1, 25506, 2, 103))
hh3cL2Isolate.setRevisions(('2009-05-06 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
hh3cL2Isolate.setRevisionsDescriptions(('Initial version',))
if mibBuilder.loadTexts:
hh3cL2Isolate.setLastUpdated('200905060000Z')
if mibBuilder.loadTexts:
hh3cL2Isolate.setOrganization('Hangzhou H3C Technologies Co., Ltd.')
if mibBuilder.loadTexts:
hh3cL2Isolate.setContactInfo('Platform Team H3C Technologies Co., Ltd. Hai-Dian District Beijing P.R. China http://www.h3c.com Zip: 100085')
if mibBuilder.loadTexts:
hh3cL2Isolate.setDescription('The MIB module is used for l2 isolation.')
hh3c_l2_isolate_object = mib_identifier((1, 3, 6, 1, 4, 1, 25506, 2, 103, 1))
hh3c_l2_isolate_enable_table = mib_table((1, 3, 6, 1, 4, 1, 25506, 2, 103, 1, 1))
if mibBuilder.loadTexts:
hh3cL2IsolateEnableTable.setStatus('current')
if mibBuilder.loadTexts:
hh3cL2IsolateEnableTable.setDescription('A table for enabling/disabling layer-2-isolate for VLAN.')
hh3c_l2_isolate_enable_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25506, 2, 103, 1, 1, 1)).setIndexNames((0, 'HH3C-L2ISOLATE-MIB', 'hh3cL2IsolateVLANIndex'))
if mibBuilder.loadTexts:
hh3cL2IsolateEnableEntry.setStatus('current')
if mibBuilder.loadTexts:
hh3cL2IsolateEnableEntry.setDescription('An entry for enabling/disabling layer-2-isolate for VLAN.')
hh3c_l2_isolate_vlan_index = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 103, 1, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4094)))
if mibBuilder.loadTexts:
hh3cL2IsolateVLANIndex.setStatus('current')
if mibBuilder.loadTexts:
hh3cL2IsolateVLANIndex.setDescription('Represents index of VLAN for layer-2-isolate.')
hh3c_l2_isolate_enable = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 103, 1, 1, 1, 2), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cL2IsolateEnable.setStatus('current')
if mibBuilder.loadTexts:
hh3cL2IsolateEnable.setDescription('Represents the layer-2-isolate status of VLAN.')
hh3c_l2_isolate_permit_mac_table = mib_table((1, 3, 6, 1, 4, 1, 25506, 2, 103, 1, 2))
if mibBuilder.loadTexts:
hh3cL2IsolatePermitMACTable.setStatus('current')
if mibBuilder.loadTexts:
hh3cL2IsolatePermitMACTable.setDescription('A table represents the permitting MAC address for the specific VLAN.')
hh3c_l2_isolate_permit_mac_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25506, 2, 103, 1, 2, 1)).setIndexNames((0, 'HH3C-L2ISOLATE-MIB', 'hh3cL2IsolateVLANIndex'), (0, 'HH3C-L2ISOLATE-MIB', 'hh3cL2IsoLatePermitMAC'))
if mibBuilder.loadTexts:
hh3cL2IsolatePermitMACEntry.setStatus('current')
if mibBuilder.loadTexts:
hh3cL2IsolatePermitMACEntry.setDescription('Each entry represents the permitting MAC address for the specific VLAN.')
hh3c_l2_iso_late_permit_mac = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 103, 1, 2, 1, 1), mac_address())
if mibBuilder.loadTexts:
hh3cL2IsoLatePermitMAC.setStatus('current')
if mibBuilder.loadTexts:
hh3cL2IsoLatePermitMAC.setDescription('Represents the MAC address permitted in the VLAN.')
hh3c_l2_iso_late_permit_mac_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 103, 1, 2, 1, 2), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
hh3cL2IsoLatePermitMACRowStatus.setStatus('current')
if mibBuilder.loadTexts:
hh3cL2IsoLatePermitMACRowStatus.setDescription('RowStatus. Three actions are used: active, CreateAndGo, destroy.')
mibBuilder.exportSymbols('HH3C-L2ISOLATE-MIB', hh3cL2IsoLatePermitMACRowStatus=hh3cL2IsoLatePermitMACRowStatus, hh3cL2IsolatePermitMACEntry=hh3cL2IsolatePermitMACEntry, PYSNMP_MODULE_ID=hh3cL2Isolate, hh3cL2IsolatePermitMACTable=hh3cL2IsolatePermitMACTable, hh3cL2IsolateEnable=hh3cL2IsolateEnable, hh3cL2IsolateObject=hh3cL2IsolateObject, hh3cL2IsolateEnableTable=hh3cL2IsolateEnableTable, hh3cL2IsoLatePermitMAC=hh3cL2IsoLatePermitMAC, hh3cL2Isolate=hh3cL2Isolate, hh3cL2IsolateVLANIndex=hh3cL2IsolateVLANIndex, hh3cL2IsolateEnableEntry=hh3cL2IsolateEnableEntry) |
class Solution:
# @param {integer} numRows
# @return {integer[][]}
def getRow(self, numRows):
return self.generateResult(numRows+1)
def generateResult(self, numRows):
if numRows == 0:
return []
if numRows == 1:
return [1]
elif numRows == 2:
return [1,1]
else:
result = self.generateResult(numRows-1)
cur = [result[0]]
for i in range(1, len(result)):
cur.append( result[i-1] + result[i])
cur.append(result[numRows-2])
return cur
| class Solution:
def get_row(self, numRows):
return self.generateResult(numRows + 1)
def generate_result(self, numRows):
if numRows == 0:
return []
if numRows == 1:
return [1]
elif numRows == 2:
return [1, 1]
else:
result = self.generateResult(numRows - 1)
cur = [result[0]]
for i in range(1, len(result)):
cur.append(result[i - 1] + result[i])
cur.append(result[numRows - 2])
return cur |
##
print("Hello Kimbo!")
| print('Hello Kimbo!') |
# The "real" article entry point
# Maybe this has external (AWS) dependencies)
class Article:
def __init__(self):
pass
def get_article(self, idx):
return {
"id": idx,
"title": "The real title"
} | class Article:
def __init__(self):
pass
def get_article(self, idx):
return {'id': idx, 'title': 'The real title'} |
def test_passwd_file(host):
passwd = host.file("/etc/passwd")
assert passwd.contains("root")
assert passwd.user == "root"
assert passwd.group == "root"
assert passwd.mode == 0o644
def test_nginx_config_file(host):
nginx = host.run("sudo nginx -t")
assert nginx.succeedd | def test_passwd_file(host):
passwd = host.file('/etc/passwd')
assert passwd.contains('root')
assert passwd.user == 'root'
assert passwd.group == 'root'
assert passwd.mode == 420
def test_nginx_config_file(host):
nginx = host.run('sudo nginx -t')
assert nginx.succeedd |
# coding: utf8
def maze_twisty_trampolines_v1(s):
"""A Maze of Twisty Trampolines, All Alike ---."""
steps = 0
cursor = 0
maze = s[:]
l = len(maze)
while True:
if cursor < 0 or cursor >= l:
break
instruction = maze[cursor]
maze[cursor] += 1
cursor += instruction
steps += 1
return steps
def maze_twisty_trampolines_v2(s):
"""A Maze of Twisty Trampolines, All Alike ---."""
steps = 0
cursor = 0
maze = s[:]
l = len(maze)
while True:
if cursor < 0 or cursor >= l:
break
instruction = maze[cursor]
if instruction >= 3:
maze[cursor] -= 1
else:
maze[cursor] += 1
cursor += instruction
steps += 1
return steps
if __name__ == '__main__':
with open('input.txt', 'r') as f:
test = list(map(int, f.read().strip().split('\n')))
print('Solution of Day 5 Part One: {0}'.format(maze_twisty_trampolines_v1(test)))
print('Solution of Day 5 Part Two: {0}'.format(maze_twisty_trampolines_v2(test)))
| def maze_twisty_trampolines_v1(s):
"""A Maze of Twisty Trampolines, All Alike ---."""
steps = 0
cursor = 0
maze = s[:]
l = len(maze)
while True:
if cursor < 0 or cursor >= l:
break
instruction = maze[cursor]
maze[cursor] += 1
cursor += instruction
steps += 1
return steps
def maze_twisty_trampolines_v2(s):
"""A Maze of Twisty Trampolines, All Alike ---."""
steps = 0
cursor = 0
maze = s[:]
l = len(maze)
while True:
if cursor < 0 or cursor >= l:
break
instruction = maze[cursor]
if instruction >= 3:
maze[cursor] -= 1
else:
maze[cursor] += 1
cursor += instruction
steps += 1
return steps
if __name__ == '__main__':
with open('input.txt', 'r') as f:
test = list(map(int, f.read().strip().split('\n')))
print('Solution of Day 5 Part One: {0}'.format(maze_twisty_trampolines_v1(test)))
print('Solution of Day 5 Part Two: {0}'.format(maze_twisty_trampolines_v2(test))) |
#!/user/bin/python
# coding: utf8
class Larvae(Ant):
"""docstring for Larvae"""
def __init__(self, arg):
super().__init__(arg)
self.arg = arg
| class Larvae(Ant):
"""docstring for Larvae"""
def __init__(self, arg):
super().__init__(arg)
self.arg = arg |
def summation(num):
if num == 0:
return 0
return num + summation(num - 1)
def summation1(num):
return sum(range(num + 1))
# Name (time in ns) Min Max Mean StdDev Median IQR Outliers OPS (Mops/s) Rounds Iterations
# ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# test1 159.7404 (1.0) 739.0976 (1.0) 185.8774 (1.0) 42.3062 (1.0) 178.8139 (1.0) 9.5367 (1.0) 2478;2804 5.3799 (1.0) 49933 100
# test 228.8818 (1.43) 1,029.9683 (1.39) 252.6062 (1.36) 53.0119 (1.25) 240.8028 (1.35) 19.0735 (2.00) 2253;2300 3.9587 (0.74) 39946 100
| def summation(num):
if num == 0:
return 0
return num + summation(num - 1)
def summation1(num):
return sum(range(num + 1)) |
# Autogenerated file for Dot Matrix
# Add missing from ... import const
_JD_SERVICE_CLASS_DOT_MATRIX = const(0x110d154b)
_JD_DOT_MATRIX_VARIANT_LED = const(0x1)
_JD_DOT_MATRIX_VARIANT_BRAILLE = const(0x2)
_JD_DOT_MATRIX_REG_DOTS = const(JD_REG_VALUE)
_JD_DOT_MATRIX_REG_BRIGHTNESS = const(JD_REG_INTENSITY)
_JD_DOT_MATRIX_REG_ROWS = const(0x181)
_JD_DOT_MATRIX_REG_COLUMNS = const(0x182)
_JD_DOT_MATRIX_REG_VARIANT = const(JD_REG_VARIANT) | _jd_service_class_dot_matrix = const(286070091)
_jd_dot_matrix_variant_led = const(1)
_jd_dot_matrix_variant_braille = const(2)
_jd_dot_matrix_reg_dots = const(JD_REG_VALUE)
_jd_dot_matrix_reg_brightness = const(JD_REG_INTENSITY)
_jd_dot_matrix_reg_rows = const(385)
_jd_dot_matrix_reg_columns = const(386)
_jd_dot_matrix_reg_variant = const(JD_REG_VARIANT) |
'''
File name: p3_utils.py
Author:
Date:
'''
| """
File name: p3_utils.py
Author:
Date:
""" |
# Generate the Fibonacci list, stopping at given value
def maxFibonacciValue(n):
fib = [1, 2]
for i in range(2, int(n)):
if(fib[i-1] + fib[i-2] > int(n)):
break
else:
fib.append(fib[i-1] + fib[i-2])
return fib
# Calculate even-valued sum
def evenFibonacciNumbers(n):
sum = 0
for value in maxFibonacciValue(n):
if(value % 2 == 0):
sum += value
return sum
if __name__ == "__main__":
n = input("Enter a max fibonacci value n: ")
print("\nSum of even-valued fibonacci terms below {:,}".format(int(n)))
print("{:,}".format(evenFibonacciNumbers(n))) | def max_fibonacci_value(n):
fib = [1, 2]
for i in range(2, int(n)):
if fib[i - 1] + fib[i - 2] > int(n):
break
else:
fib.append(fib[i - 1] + fib[i - 2])
return fib
def even_fibonacci_numbers(n):
sum = 0
for value in max_fibonacci_value(n):
if value % 2 == 0:
sum += value
return sum
if __name__ == '__main__':
n = input('Enter a max fibonacci value n: ')
print('\nSum of even-valued fibonacci terms below {:,}'.format(int(n)))
print('{:,}'.format(even_fibonacci_numbers(n))) |
S = ["nwc10_hallway", "nwc1003b_danino", "nwc10", "nwc10m", "nwc8", "nwc7", "nwc4",
"outOfLab", "nwc1008", "nwc1006", "nwc1007", "nwc1009", "nwc1010", "nwc1003g",
"nwc1003g_a", "nwc1003g_b", "nwc1003g_c", "nwc1003b_a", "nwc1003b_b", "nwc1003b_c",
"nwc1003b_t", "nwc1003a", "nwc1003b", "nwc1001l", "nwc1000m_a1", "nwc1000m_a2",
"nwc1000m_a3", "nwc1000m_a4", "nwc1000m_a5", "nwc1000m_a6", "nwc1000m_a7", "nwc1000m_a8"] | s = ['nwc10_hallway', 'nwc1003b_danino', 'nwc10', 'nwc10m', 'nwc8', 'nwc7', 'nwc4', 'outOfLab', 'nwc1008', 'nwc1006', 'nwc1007', 'nwc1009', 'nwc1010', 'nwc1003g', 'nwc1003g_a', 'nwc1003g_b', 'nwc1003g_c', 'nwc1003b_a', 'nwc1003b_b', 'nwc1003b_c', 'nwc1003b_t', 'nwc1003a', 'nwc1003b', 'nwc1001l', 'nwc1000m_a1', 'nwc1000m_a2', 'nwc1000m_a3', 'nwc1000m_a4', 'nwc1000m_a5', 'nwc1000m_a6', 'nwc1000m_a7', 'nwc1000m_a8'] |
class Solution(object):
def maxProfit(self, prices):
"""
:type prices: List[int]
:rtype: int
"""
# we need the best profit and its range in prices (the 1st transaction)
profit1, l, r = self.maxProfit_1(prices)
# then we consider other cases where we can make the additional profit (the 2nd transaction)
profits=[]
# we calculate the profit right of the range of "profit1"
profits.append(self.maxProfit_1(prices[r:]))
# we calculate the profit left of the range of "profit1"
profits.append(self.maxProfit_1(prices[:l]))
# we calculate the maximum price retreat(short trade) inside the range of "profit1"
profits.append(self.maxProfit_1(prices[l:r+1][::-1]))
# we choose the biggest among "profits" as the 2nd transaction
profit2=max([profit[0] for profit in profits])
return profit1+profit2
def maxProfit_1(self, prices):
"""
:type prices: List[int]
:rtype: int
"""
# we just need to do a little modification of the last solution
# we use mstart and mend to record the index of the best profit
mstart, bi, b, mend, m = 0, 0, prices[0] if prices else 0, 0, 0
for i,x in enumerate(prices):
if x<b:
b=x
bi=i
if x>b:
if x-b>m:
m=x-b
mstart=bi
mend=i
return m,mstart, mend | class Solution(object):
def max_profit(self, prices):
"""
:type prices: List[int]
:rtype: int
"""
(profit1, l, r) = self.maxProfit_1(prices)
profits = []
profits.append(self.maxProfit_1(prices[r:]))
profits.append(self.maxProfit_1(prices[:l]))
profits.append(self.maxProfit_1(prices[l:r + 1][::-1]))
profit2 = max([profit[0] for profit in profits])
return profit1 + profit2
def max_profit_1(self, prices):
"""
:type prices: List[int]
:rtype: int
"""
(mstart, bi, b, mend, m) = (0, 0, prices[0] if prices else 0, 0, 0)
for (i, x) in enumerate(prices):
if x < b:
b = x
bi = i
if x > b:
if x - b > m:
m = x - b
mstart = bi
mend = i
return (m, mstart, mend) |
class Support(Object):
def __init__(self, name, ux = 1, uy = 1, uz = 1, rx = 1, ry = 1, rz = 1):
self.name = name
self.ux = ux
self.uy = uy
self.uz = uz
self.rx = rx
self.ry = ry
self.rz = rz
| class Support(Object):
def __init__(self, name, ux=1, uy=1, uz=1, rx=1, ry=1, rz=1):
self.name = name
self.ux = ux
self.uy = uy
self.uz = uz
self.rx = rx
self.ry = ry
self.rz = rz |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.