content
stringlengths 7
1.05M
|
---|
#moveable_player
class MoveablePlayer:
def __init__(self, x=2, y=2, dir="FORWARD", color="170"):
self.x = x
self.y = y
self.direction = dir
self.color = color
|
# =============================================================================================
#
# =============================================================================================
#
# 2 16 20 3 4 21 # GPIO Pin number
# | | | | | |
# -----|-----|-----|-----|-----|-----|-----
# 12 11 10 9 8 7 # Display Pin number
# 1 a f 2 3 b # Segment/Digit Identifier
#
#
# e d h c g 4 # Segment/Digit Identifier
# 1 2 3 4 5 6 # Display Pin number
# -----|-----|-----|-----|-----|-----|-----
# 5 6 13 19 20 17 # GPIO Pin number
#
digits = [2,3,4,17]
One = [2]
Two = [3]
Three = [4]
Four = [17]
|
# -*- coding: utf-8 -*-
class Trial(object):
'''
Created Fri 2 Aug 2013 - ajl
Last edited: Sun 4 Aug 2013 - ajl
This class contains all variables and methods associated with a single trial
'''
def __init__(self, trialid = 0, staircaseid = 0,
condition = 0, stimval = 0, interval = 1):
''' Constructor '''
self._TrialID = trialid;
self._StaircaseID = staircaseid;
self._Condition = condition;
self._Stimval = stimval;
self._Interval = interval;
self._Response = None;
self._ReactionTime = None;
# show the values of this specific trial
def __str__(self):
return '#%2.f \t %2.f \t %2.f' % (self._TrialID, self._StaircaseID, self._Stimval);
# s = '[ #%2.f ] \t (%.f) \t\t Stim(%4.f) \t Interval(%.f) \t Resp(%.f)' % \
# (self._TrialID+1, self._Condition, self._Stimval, self._Interval, self._Response)
''' Fields or properties '''
@property
def Response(self):
return self._Response;
@Response.setter
def Response(self, value):
self._Response = value;
''' Methods '''
# returns the name of the current condition
def GetConditionName(self):
# this is really quite awkward
return
|
## Q2: What is the time complexity of
## O(n), porque es un for de i=n hasta i=1
# Algoritmo
# for (i = n; i > 0; i--) { # n
# statement; # 1
# }
n = 5
for i in range(n, 0, -1): # n
print(i); # 1 |
# pylint: disable=redefined-outer-name,protected-access
# pylint: disable=missing-function-docstring,missing-module-docstring,missing-class-docstring
def test_can_construct_author(author):
assert isinstance(author.name, str)
assert isinstance(author.url, str)
assert isinstance(author.github_url, str)
assert isinstance(author.github_avatar_url, str)
assert str(author) == author.name
assert repr(author) == author.name
assert author._repr_html_(width="21x", height="22px") == (
'<a href="https://github.com/holoviz/" title="Author: panel" target="_blank">'
'<img application="https://avatars2.githubusercontent.com/u/51678735" alt="panel" '
'style="border-radius: 50%;width: 21x;height: 22px;vertical-align: text-bottom;">'
"</img></a>"
)
|
# ------------------------------------------------------------------------------
# Program: The LDAR Simulator (LDAR-Sim)
# File: LDAR-Sim input mapper sample
# Purpose: Example input mapper
#
# Copyright (C) 2018-2021 Intelligent Methane Monitoring and Management System (IM3S) Group
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the MIT License as published
# by the Free Software Foundation, version 3.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# MIT License for more details.
# You should have received a copy of the MIT License
# along with this program. If not, see <https://opensource.org/licenses/MIT>.
#
# ------------------------------------------------------------------------------
def input_mapper_v1(parameters):
"""Function to perform all input mapping from version 1.0 parameter files to presently compliant
parameter files. This is necessary to ensure reverse compatibility - to allow older parameter
files to run properly.
**** THIS IS AN EXAMPLE FILE THAT IS PROVIDED AS A TEMPLATE ****
This function is a series of hooks that fall into several categories:
1) Construction hooks: these hooks construct newer parameters from older parameters. This is
necessary if parameters were depreciated in the newest version of the model, but relied upon in
older versions. For example, newer versions of the program may simply allow specification of a
start and end date, but not include specification of the number of timesteps. To allow this, a
construction hook could create start and end date from the number of timesteps using any
necessary rules to maintain compatibility.
2) Destruction hooks: these hooks destruct parameters that are no longer in the default set of
parameters in the model. To continue the above example, if the present version of the model
does not use number of timesteps, and the number of timesteps is no longer specified in the
default parameter file - that key should be removed. The issue here is without destruction of
depreciated parameters - this parameter file will fail validation. Of course, destruction must
be called AFTER construction so the information in the depreciated parameters is used to map
to the new parameters before being deleted!
3) Recalculation hooks: these hooks recalculate variables or map the values. For example, if
the units have changed, but the key has not - these hooks are necessary to recalculate the new
units to be compliant with the present version of the model. If the older version of the model
had a spelling mistake in a string specification, this type of hook would map the parameters.
Several examples:
# map a old spelling mistake properly - the present version of LDAR Sim has corrected the
# spelling mistake but old parameter files continue to use the misspelled value
if parameters['calculation_method'] == 'categoricle':
parameters['calculation_method'] = 'categorical'
# map the leak rate parameter from one unit to another, the newest version uses a different
# unit, where 0.003332 is the conversion factor
parameters['leak_rate] = parameters['leak_rate'] * 0.003332
4) Key-change hooks: these hooks change the key name to a new key name to map the old name to
the new name.
:param parameters = a dictionary of parameters that must be mapped to a compliant version
:return returns a model compliant parameter file dictionary and global parameter file (see notes
in code).
In cases where the global parameters are not returned, the global parameters are returned as an
empty dictionary
"""
# ----------------------------------------------------------------------------------------------
# 1. Construction hooks
# NOTES: Version 1.0 parameter files used to create global parameters by pulling some parameters
# from the P_ref program. Thus, this function returns global parameters as well as the
# parameters dictionary under analysis. There were no global parameters in v1.0. They
# were defined inline in the code.
# Version 1.0 files are all program files
# if 'parameter_level' not in parameters:
# parameters['parameter_level'] = 'program'
# Set version
# if 'version' not in parameters:
# parameters['version'] = '1.0'
# Check if this is P_ref, if so, mine the global parameters
mined_global_parameters = {}
# parameters_to_make_global = ['n_simulations', 'timesteps', 'start_year', 'weather_file',
# 'print_from_simulations', 'write_data']
# if parameters['program_name'] == 'P_ref':
# for i in parameters_to_make_global:
# mined_global_parameters[i] = parameters[i]
# Construct a programs key
# mined_global_parameters['programs'] = []
# ----------------------------------------------------------------------------------------------
# 2. Destruction hooks
# Delete the parameters that are now globals from this program definition - these do nothing
# for i in parameters_to_make_global:
# _ = parameters.pop(i)
# ----------------------------------------------------------------------------------------------
# 3. Recalculation hooks
pass
# ----------------------------------------------------------------------------------------------
# 4. Key-change hooks
pass
return(parameters, mined_global_parameters)
|
#%% VARIABLES
'Variables'
# var1 = 10
# var2 = "Hello World"
# var3 = None
# var4 = 3.5
# if 0:
# print ("hello world 0") #el 0 fnciona como Falsey
# if 1:
# print ("hello world 1") #el 1 funciona como Truthy
# x1 = 100
# x2 = 20
# x3 = -5
# y = x1 + x2 + x3
# z = x1 - x2 * x3
# w = (x1+x2+x3) - (x1-x2*x3)
# num = 23
# data = True
# var = 40.0
# res1 = num + data
# res2 = data/var
# res3 = num*var
# num = 23
# data = False
# var = 40.0
# res1 = num + data
# res2 = data/var
# res3 = num*var
# result = 70
# data = False
# value = '158'
# var1 = result*data
# var2 = data+value
# var3 = result/value
# result = 5
# value = '158'
# location = 'payunia'
# name = 'Mike '
# phrase = 'needs a coffee'
# full_phrase = name + phrase
# extended_phrase = full_phrase + ' urgente!'
# subnet = '192.168.0'
# host = '34'
# ip = subnet + '.' + host
# message = 'IP address: ' + ip
#%% ACTIVIDADES
'Actividad 1'
a = 50
b = 6
c = 8
d = 2*a + 1/(b-5*c)
d1 = ((a*b+c)/(2-a) + ((a*b+c)/(2-a) + 2)/(c+b)) * (1 + (a*b+c)/(2-a))
'Actividad 2'
# word0 = 'Life'
# word1 = 'ocean'
# word2 = 'up'
# word3 = 'down'
# word4 = word0 + ' is like the ' + word1 + ", it goes " + word2 +\
# " and " + word3
word0 ='Mars'
word1 = 'Earth'
word2 = 'round'
word3 = 'round'
word4 = word0 + ' is like the ' + word1 + ", it goes " + word2 +\
" and " + word3 |
# Given inorder and postorder traversal of a tree, construct the binary tree.
# Note:
# You may assume that duplicates do not exist in the tree.
# For example, given
# inorder = [9,3,15,20,7]
# postorder = [9,15,7,20,3]
# Return the following binary tree:
# 3
# / \
# 9 20
# / \
# 15 7
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def buildTree(self, inorder, postorder):
"""
:type inorder: List[int]
:type postorder: List[int]
:rtype: TreeNode
"""
if not inorder or not postorder or len(inorder) == 0 or len(postorder) == 0:
return None
else:
index = inorder.index(postorder[-1])
root = TreeNode(inorder[index])
root.left = self.buildTree(inorder[:index], postorder[:index])
root.right = self.buildTree(inorder[index+1:], postorder[index:-1])
return root
# Time:O(n)
# Space: O(n)
# Difficulty: medium
|
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS-IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
""" Help text and other strings used in the Drive module. """
__author__ = [
'[email protected] (Nick Retallack)',
]
SERVICE_ACCOUNT_JSON_DESCRIPTION = """
Create a service account in Google App Engine and paste the JSON here.
"""
SERVICE_ACCOUNT_JSON_PARSE_FAILURE = """
The JSON is invalid. Make sure you copy the whole thing including any curly
braces. Do not use the P12 format."""
SERVICE_ACCOUNT_JSON_MISSING_FIELDS = """
The JSON is valid but it doesn't look like a service account key. Try creating a
new "Service account key" in the Credentials section of the developer console.
You can only download this JSON when you first create the key. You can't use
the "Download JSON" button later as this will not include the key."""
SYNC_FREQUENCY_DESCRIPTION = """
The document will be checked for changes in Google Drive this often.
"""
AVAILABILITY_DESCRIPTION = """
Synced items default to the availability of the course, but may also be
restricted to admins (Private) or open to the public (Public).
"""
SHARE_PERMISSION_ERROR = """
You do not have permission to share this file.
"""
SHARE_UNKNOWN_ERROR = """
An unknown error occurred when sharing this file. Check your Drive or Google
API configuration or try again.
"""
SHARE_META_ERROR = """
File shared, but Drive API failed to fetch metadata. Please try again or check
your Drive configuration.
"""
TIMEOUT_ERROR = """
Google Drive timed out. Please try again.
"""
|
#Ler 80 números e informar quantos estão no intervalo entre 10 (inclusive) e 150 (inclusive).
nums = []
quantia = str(input("Quantos números você deseja inserir (deixe em branco para 80)? "))
def addNumber():
newNumber = int(input("Insira o Número: "))
if newNumber >= 10 and newNumber <= 150:
nums.append(newNumber)
if quantia:
for i in range(int(quantia)):
addNumber()
else:
for i in range(80):
addNumber()
print("No intervalo, houveram %d números. Sendo eles: " % len(nums) + str(nums)) |
# Time: O(m * n)
# Space: O(1)
class Solution(object):
def findDiagonalOrder(self, matrix):
"""
:type matrix: List[List[int]]
:rtype: List[int]
"""
if not matrix or not matrix[0]:
return []
result = []
row, col, d = 0, 0, 0
dirs = [(-1, 1), (1, -1)]
for i in range(len(matrix) * len(matrix[0])):
result.append(matrix[row][col])
row += dirs[d][0]
col += dirs[d][1]
if row >= len(matrix):
row = len(matrix) - 1
col += 2
d = 1 - d
elif col >= len(matrix[0]):
col = len(matrix[0]) - 1
row += 2
d = 1 - d
elif row < 0:
row = 0
d = 1 - d
elif col < 0:
col = 0
d = 1 - d
return result
|
class PingPacket:
def __init__(self):
self.type = "PING"
self.serial = 0
def read(self, reader):
self.serial = reader.readInt32()
|
n = int(input())
for teste in range(n):
m = int(input())
lista = [int(x) for x in input().split()]
impares = []
for x in lista:
if x%2 == 1:
impares.append(x)
impares.sort()
laercio = []
while len(impares) > 0:
laercio.append(impares.pop())
impares.reverse()
print(*laercio)
|
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
class ProjectFailed(object):
def __init__(self, message):
self.valid = False
self.message = message
|
"""Define nodejs and yarn dependencies"""
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "a09edc4ba3931a856a5ac6836f248c302d55055d35d36e390a0549799c33145b",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.0.0/rules_nodejs-5.0.0.tar.gz"],
)
|
# encoding: utf-8
# =========================================================================
# ©2017-2018 北京国美云服科技有限公司
# -------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this work except in compliance with the License.
# You may obtain a copy of the License in the LICENSE file, or 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 ACL(object):
def __init__(self, bucket=None, acl=None):
"""
@param bucket - The bucket
@param acl - The access control list of the bucket
"""
self.bucket = bucket
self.acl = acl or []
self.grants = []
for item in self.acl:
grantee = item["grantee"]
if grantee["type"] == "user":
grant = Grant(
permission=item["permission"],
type=grantee["type"],
id=grantee["id"],
name=grantee["name"]
)
else:
grant = Grant(
permission=item["permission"],
type=grantee["type"],
name=grantee["name"]
)
self.add_grant(grant)
def add_grant(self, grant):
self.grants.append(grant)
def __repr__(self):
return str(self.grants)
class Grant(object):
def __init__(self, permission, type, id=None, name=None):
"""
@param permission - The grant permission
@param type - The grantee type
@param id - The grantee user id
@param name - The grantee name
"""
self.permission = permission
self.type = type
self.id = id
self.name = name
def __repr__(self):
if self.type== "user":
args = (self.id, self.permission)
else:
args = (self.name, self.permission)
return "<Grantee: %s, Permission: %s>" % args
def to_dict(self):
if self.type == "user":
grantee = {
"type": self.type,
"id": self.id,
"name": self.name or ""
}
else:
grantee = {
"type": self.type,
"name": self.name
}
return {
"grantee": grantee,
"permission": self.permission
}
|
class Matrix:
def __init__(self, *args, **kwargs):
if len(args) > 0:
if isinstance(args[0], Matrix):
m = args[0].copy()
else:
m = {'vals': [], 'w': 0, 'h': 0}
self.vals = m.vals
self.w = m.w
self.h = m.h
def copy(self):
new_m = Matrix()
for i in self.vals:
new_m.vals.append(i)
new_m.w = self.w
new_m.h = self.h
return new_m
@property
def width(self):
return self.w
@property
def height(self):
return self.h
def value_at(self, row, col):
return self.vals[row*self.w + col]
def at(self, row, col):
return self.value_at(row, col)
def row(self, pos):
return [self.vals[pos*self.w + i] for i in range(self.w)]
@property
def rows(self):
return [self.row(i) for i in range(self.h)]
def col(self, pos):
return [self.vals[i*self.w + pos] for i in range(self.h)]
@property
def cols(self):
return [self.col(i) for i in range(self.w)]
@staticmethod
def _isnumeric(i):
return isinstance(i, float) or isinstance(i, int)
def _add(self, r, p, q, *args):
r = len(args) if r <= 0 else r
for i in range(r):
try:
if self._isnumeric(args[i]):
self.vals.insert(i*(p + 1) + self.w*q, args[i])
except IndexError:
self.vals.insert(i*(p + 1) + self.w*q, 0)
return r
def addrow(self, *args):
self.w = self._add(self.w, 0, self.h, *args)
self.h += 1
def addcol(self, *args):
self.h = self._add(self.h, self.w, 1, *args)
self.w += 1
def _fill(self, val, pos, r, lt, p, q, addfunc):
if self._isnumeric(val):
if pos < lt:
for i in range(self.w):
self.vals[pos*p + i*q] = val
else:
addfunc(*[val for _ in range(r)])
def rowfill(self, val, pos):
self._fill(val, pos, self.w, self.h, self.w, 1, self.addrow)
def colfill(self, val, pos):
self._fill(val, pos, self.h, self.w, 1, self.w, self.addcol)
def removerow(self, pos):
if self.h > 0 and pos < self.h:
for _ in range(self.w):
self.vals.pop(self.w*pos)
self.h -= 1
if self.h == 0:
self.w = 0
def removecol(self, pos):
if self.w > 0 and pos < self.w:
pos %= self.w
for i in range(self.h):
self.vals.pop(i*(self.w-1) + pos)
self.w -= 1
if self.w == 0:
self.h = 0
def __add__(self, other):
new_m = Matrix()
def __mul__(self, other):
new_m = Matrix()
for col in other.cols:
s = [sum([self.at(l, i)*c for i, c in enumerate(col)]) for l in range(self.h)]
print(s)
#new_m.addcol()
return new_m
@property
def det(self):
if self.w * self.h == 1:
return self.vals[0]
if (self.w, self.h) == (2,2):
return self.at(0, 0)*self.at(1, 1) - self.at(0, 1)*self.at(1, 0)
d = 0
for i in range(self.h):
for j in range(self.w):
b = [[y for y in (x[:j] + x[j+1:])] for x in self.cols[:i] + self.cols[i+1:]]
d += det(val) if (i+j)%2 == 0 else -det(val)
return d
def __len__(self):
return self.w * self.h
def __repr__(self):
if (self.w, self.h) == (0, 0):
return "()"
res = ""
for i, val in enumerate(self.vals):
end = "\n" if (i+1)%self.w == 0 else "\t"
res += f"{val}{end}"
return res
def __str__(self):
return self.__repr__() |
#
# @lc app=leetcode id=67 lang=python3
#
# [67] Add Binary
#
# @lc code=start
class Solution:
def addBinary(self, a: str, b: str) -> str:
m = len(a)
n = len(b)
i = m - 1
j = n - 1
extra = 0
res = ''
while i >=0 or j >= 0:
if i < 0:
x = int(b[j]) + extra
elif j < 0:
x = int(a[i]) + extra
else:
x = int(a[i]) + int(b[j]) + extra
extra = x // 2
res = str(x%2) + res
i -= 1
j -= 1
if extra:
return str(extra) + res
else:
return res
tests = [
('11', '1', '100'),
('1010', '1011', '10101')
]
# @lc code=end
|
#
# @lc app=leetcode id=136 lang=python3
#
# [136] Single Number
#
# https://leetcode.com/problems/single-number/description/
#
# algorithms
# Easy (60.26%)
# Likes: 3294
# Dislikes: 128
# Total Accepted: 600.9K
# Total Submissions: 961.2K
# Testcase Example: '[2,2,1]'
#
# Given a non-empty array of integers, every element appears twice except for
# one. Find that single one.
#
# Note:
#
# Your algorithm should have a linear runtime complexity. Could you implement
# it without using extra memory?
#
# Example 1:
#
#
# Input: [2,2,1]
# Output: 1
#
#
# Example 2:
#
#
# Input: [4,1,2,1,2]
# Output: 4
#
#
#
# @lc code=start
class Solution:
def singleNumber(self, nums: List[int]) -> int:
res = 0
for num in nums:
res = res ^ num
return res
# @lc code=end
|
def test():
# if an assertion fails, the message will be displayed
# --> must have the output in a comment
assert "Mean: 5.0" in __solution__, "Did you record the correct program output as a comment?"
# --> must have the output in a comment
assert "Mean: 4.0" in __solution__, "Did you record the correct program output as a comment?"
# --> must have the first function call
assert "mean(numbers_one)" in __solution__, "Did you call the mean function with numbers_one as input?"
# --> must have the second function call
assert "mean(numbers_two)" in __solution__, "Did you call the mean function with numbers_two as input?"
# --> must not have a TODO marker in the solution
assert "TODO" not in __solution__, "Did you remove the TODO marker when finished?"
# display a congratulations for a correct solution
__msg__.good("Well done!")
|
# 17. Distinct strings in the first column
# Find distinct strings (a set of strings) of the first column of the file. Confirm the result by using cut, sort, and uniq commands.
def removeDuplicates(list):
newList = []
for i in list:
if not(i in newList):
newList.append(i)
return newList
with open('popular-names.txt') as f:
firstColumn = []
lines = f.readlines()
for i in lines:
lineArray = i.split('\t')
firstColumn.append(lineArray[0])
size = len(removeDuplicates(firstColumn))
print(f'There are {size} set of strings')
f.close |
name = input("Enter your name: ")
date = input("Enter a date: ")
adjective = input("Enter an adjective: ")
noun = input("Enter a noun: ")
verb = input("Enter a verb in past tense: ")
adverb = input("Enter an adverb: ")
adjective = input("Enter another adjective: ")
noun = input("Enter another noun: ")
noun = input("Enter another noun: ")
adjective = input("Enter another adjective: ")
verb = input("Enter a verb: ")
adverb = input("Enter another adverb: ")
verb = input("Enter another verb in past tense: ")
adjective = input("Enter another adjective: ")
print("Name: " + name + " Date: " + date )
print("Today I went to the zoo. I saw a " + adjective + " " + noun + " jumping up and down in its tree.")
print("He " + verb + " " + adverb + " through the large tunnel that led to its " + adjective + " " + noun + ".")
print("I got some peanuts and passed them through the cage to a gigantic gray " + noun + " towering above my head.")
print("Feeding the animals made me hungry. I went to get a " + adjective + " scoop of ice cream. It filled my stomach.")
print("Afterwards I had to " + verb + " " + adverb + " to catch our bus.")
print("When I got home I " + verb + " my mom for a " + adjective + " day at the zoo.")
|
input=__import__('sys').stdin.readline
n,m=map(int,input().split());g=[list(input()) for _ in range(n)];c=[[0]*m for _ in range(n)]
q=__import__('collections').deque();q.append((0,0));c[0][0]=1
while q:
x,y=q.popleft()
for nx,ny in (x+1,y),(x-1,y),(x,y+1),(x,y-1):
if 0<=nx<n and 0<=ny<m and g[nx][ny]=='1' and c[nx][ny]==0:
c[nx][ny]=c[x][y]+1
q.append((nx,ny))
print(c[n-1][m-1])
|
##============================ ea_config_ex_1.py ================================
# Some of the input parameters and options in order to select the settings of the
# evolutionary algorithm are given here for the minimization of the De Jong’s fifth
# function or Shekel’s foxholes using Genetic Algorithms.
EA_type = 'GA'
pop_size = 80
n_gen = 200
mut_rate = -1
n_gen_var = 15
cross_rate = 0.7
tour_sel_param = 0.8
|
# normalize data 0-1
def normalize(data):
normalized = []
for i in range(len(data[0])):
col_min = min([item[i] for item in data])
col_max = max([item[i] for item in data])
for q, item in enumerate([item[i] for item in data]):
if len(normalized) > q:
normalized[q].append((item - col_min) / (col_max - col_min))
else:
normalized.append([])
normalized[q].append((item - col_min) / (col_max - col_min))
return normalized
|
'''
You are given a linked list with one pointer of each node pointing to the next node just like the usual.
Every node, however, also has a second pointer that can point to any node in the list.
Now write a program to deep copy this list.
Solution 1:
First backup all the nodes' next pointers node to another array.
next_backup = [node1, node2, node3 ... None]
Meaning next_backup[0] = node[0].next = node1.
Note that these are just references.
Now just deep-copy the original linked list, only considering the next pointers.
While copying (or after it), point
`original_0.next = copy_0`
and
`copy_0.random = original_0`
Now, while traversing the copy list, set the random pointers of copies correctly:
copy.random = copy.random.random.next
Now, traverse the original list and fix back the next pointers using the next_backup array.
Total complexity -> O(n+n+n) = O(n)
Space complexity = O(n)
SOLUTION 2:
We can also do it in space complexity O(1).
This is actually easier to understand. ;)
For every node original_i, make a copy of it just in front of it.
For example, if original_0.next = original_1, then now it will become
`original_0.next = copy_0`
`copy_0.next = original_1`
Now, set the random pointers of copies:
`copy_i.random = original_i.random.next`
We can do this because we know that the copy of a node is just after the original.
Now, fix the next pointers of all the nodes:
original_i.next = original_i.next.next
copy_i.next = copy_i.next.next
Time complexity = O(n)
Space complexity = O(1)
'''
|
class PointCloudObject(RhinoObject):
# no doc
def DuplicatePointCloudGeometry(self):
""" DuplicatePointCloudGeometry(self: PointCloudObject) -> PointCloud """
pass
PointCloudGeometry=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: PointCloudGeometry(self: PointCloudObject) -> PointCloud
"""
|
'''
Kattis - lineup
Compare list with the sorted version of the list.
Time: O(n log n), Space: O(n)
'''
n = int(input())
arr = [input() for _ in range(n)]
if arr == sorted(arr):
print("INCREASING")
elif arr == sorted(arr, reverse=True):
print("DECREASING")
else:
print("NEITHER") |
"""
quick_sort.py
Implementation of quick sort on a list and returns a sorted list.
Quick Sort Overview:
------------------------
Uses partitioning to recursively divide and sort the list
Time Complexity: O(n**2) worst case
Space Complexity: O(n**2) this version
Stable: No
Psuedo Code: CLRS. Introduction to Algorithms. 3rd ed.
"""
def sort(seq):
if len(seq) < 1:
return seq
else:
pivot = seq[0]
left = sort([x for x in seq[1:] if x < pivot])
right = sort([x for x in seq[1:] if x >= pivot])
return left + [pivot] + right
|
somaidade = 0
mediaidade = 0
nomehomem = ''
idadehomem = 0
totmulher20 = 0
''' Desenvolva um programa que leia o nome, idade e sexo de 4 pessoas. No final do programa, mostre: a média de idade do grupo, qual é o nome do homem mais velho e quantas mulheres têm menos de 20 anos.'''
for p in range (1,5):
print('=========== {}° PESSOA ==============='.format(p))
nome = str(input('Escreva o seu nome: '))
idade = int(input('Escreva a sua idade: '))
sexo = str(input(' Sexo: [F/M]: '))
somaidade += idade
mediaidade = somaidade / 4
if p == 1 and sexo in 'Mm':
nomehomem = nome
idadehomem = idade
if sexo in 'mM' and idade > idadehomem:
idadehomem = idade
nomehomem = nome
if sexo in 'fF' and idade < 20:
totmulher20+= 1
print (' A idade do homem mais velho é {} e o seu nome é {}'.format(idadehomem, nomehomem))
print(' A media de idade do grupo é de {}.'.format(mediaidade))
print (' O total de mulher com menos de 20 anos é {}.'.format(totmulher20))
|
# coding=utf-8
def test_method(param):
"""
Should not show up
:param param: any param
:return: None
"""
return None
|
#program to find the single element appears once in a list where every element
# appears four times except for one.
class Solution_once:
def singleNumber(self, arr):
ones, twos = 0, 0
for x in arr:
ones, twos = (ones ^ x) & ~twos, (ones & x) | (twos & ~x)
assert twos == 0
return ones
class Solution_twice:
def single_number(arr):
ones, twos, threes = 0, 0, 0
for x in arr:
ones, twos, threes = (~x & ones) | (x & ~ones & ~twos & ~threes), (~x & twos) | (x & ones), (~x & threes) | (x & twos)
return twos
if __name__ == "__main__":
print(Solution_once().singleNumber([1, 1, 1, 2, 2, 2, 3]))
print(Solution_once().singleNumber([5, 3, 0, 3, 5, 5, 3]))
|
'''
Given a collection of numbers that might contain duplicates, return all possible unique permutations.
For example,
[1,1,2] have the following unique permutations:
[1,1,2], [1,2,1], and [2,1,1].
'''
class Solution(object):
def permuteUnique(self, nums):
"""
:type nums: List[int]
:rtype: List[List[int]]
"""
result = []
nums.sort()
self.get_permute([], nums, result)
return result
def get_permute(self, current, num, result):
if not num:
result.append(current + [])
return
for i, v in enumerate(num):
if i - 1 >= 0 and num[i] == num[i - 1]:
continue
current.append(num[i])
self.get_permute(current, num[:i] + num[i + 1:], result)
current.pop()
if __name__ == "__main__":
assert Solution().permuteUnique([1, 2, 1]) == [[1, 1, 2], [1, 2, 1], [2, 1, 1]] |
class Bank:
def __init__(self,owner,balance):
self.owner=owner
self.balance=balance
def deposit(self,d):
self.balance=d+self.balance
print("amount : {}".format(d))
print("deposit accepted!!")
return self.balance
def withdraw(self,w):
if w>self.balance:
print("amount has exceeded the limit!!")
print('balance : {}'.format(self.balance))
else:
self.balance= self.balance-w
print("amount withdrawn : {}".format(w))
print("withdrawal completed!!")
return self.balance
def __str__(self):
return (f"Account owner : {self.owner} \nAccount balance : {self.balance}")
|
dt = input('coloque uma data no formato dd/mm/aaaa : ')
try:
if dt[2] == '/' and dt[5] == '/':
dia = int(dt[0]+dt[1])
mes = int(dt[3]+dt[4])
if dia > 31 or mes > 12:
print('invalido, dia ou mes errados')
else:
print(' a data {} é valida !'.format(dt))
except:
print(' a data é invalida !') |
"""
Various constants used to build bazel-diff
"""
DEFAULT_JVM_EXTERNAL_TAG = "3.3"
RULES_JVM_EXTERNAL_SHA = "d85951a92c0908c80bd8551002d66cb23c3434409c814179c0ff026b53544dab"
BUILD_PROTO_MESSAGE_SHA = "50b79faec3c4154bed274371de5678b221165e38ab59c6167cc94b922d9d9152"
BAZEL_DIFF_MAVEN_ARTIFACTS = [
"junit:junit:4.12",
"org.mockito:mockito-core:3.3.3",
"info.picocli:picocli:jar:4.3.2",
"com.google.code.gson:gson:jar:2.8.6",
"com.google.guava:guava:29.0-jre"
]
|
#
# @lc app=leetcode id=206 lang=python3
#
# [206] Reverse Linked List
#
# https://leetcode.com/problems/reverse-linked-list/description/
#
# algorithms
# Easy (65.21%)
# Likes: 6441
# Dislikes: 123
# Total Accepted: 1.3M
# Total Submissions: 2M
# Testcase Example: '[1,2,3,4,5]'
#
# Given the head of a singly linked list, reverse the list, and return the
# reversed list.
#
#
# Example 1:
#
#
# Input: head = [1,2,3,4,5]
# Output: [5,4,3,2,1]
#
#
# Example 2:
#
#
# Input: head = [1,2]
# Output: [2,1]
#
#
# Example 3:
#
#
# Input: head = []
# Output: []
#
#
#
# Constraints:
#
#
# The number of nodes in the list is the range [0, 5000].
# -5000 <= Node.val <= 5000
#
#
#
# Follow up: A linked list can be reversed either iteratively or recursively.
# Could you implement both?
#
#
# @lc code=start
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
# class Solution:
# def reverseList(self, head: ListNode) -> ListNode:
# rever_tail = ListNode()
# curr = rever_tail
# while head != None:
# curr.val = head.val
# new_node = ListNode()
# new_node.next = curr
# curr = new_node
# head = head.next
# return curr.next
class Solution:
def reverseList(self, head: ListNode) -> ListNode:
prev = None
curr = head
while curr:
next = curr.next
curr.next = prev
prev = curr
curr = next
return prev
# @lc code=end
|
# Bubble Sort
#
# Time Complexity: O(n*log(n))
# Space Complexity: O(1)
class Solution:
def bubbleSort(self, array: [int]) -> [int]:
dirty = False
for i in range(len(array)):
for j in range(0, len(array) - 1 - i):
if array[j] > array[j + 1]:
dirty = True
array[j], array[j + 1] = array[j + 1], array[j]
if not dirty:
break
dirty = False
return array |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
*****************************************
Author: zhlinh
Email: [email protected]
Version: 0.0.1
Created Time: 2016-03-07
Last_modify: 2016-03-07
******************************************
'''
'''
Given a **singly linked list** where elements are
sorted in ascending order, convert it to a height balanced BST.
'''
# Definition for singly-linked list.
class ListNode(object):
def __init__(self, x):
self.val = x
self.next = None
# 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 sortedListToBST(self, head):
"""
:type head: ListNode
:rtype: TreeNode
"""
p = head
n = 0
while p:
p = p.next
n += 1
self.cur = head
return self.helper(n)
def helper(self, n):
if n <= 0:
return None
root = TreeNode(0)
root.left = self.helper(n // 2)
root.val = self.cur.val
self.cur = self.cur.next
root.right = self.helper(n - (n // 2) - 1)
return root
|
# -*- coding: utf-8 -*-
"""
repoclone.exceptions
-----------------------
All exceptions used in the repoclone code base are defined here.
"""
class RepocloneException(Exception):
"""
Base exception class. All Cookiecutter-specific exceptions should subclass
this class.
"""
|
inputFile = str(input("Input file"))
f = open(inputFile,"r")
data = f.readlines()
f.close()
runningFuelSum = 0
for line in data:
line = line.replace("\n","")
mass = int(line)
fuelNeeded = (mass//3)-2
runningFuelSum += fuelNeeded
while(fuelNeeded > 0):
fuelNeeded = (fuelNeeded//3)-2
if(fuelNeeded>=0):
runningFuelSum += fuelNeeded
print(runningFuelSum) |
class Settings:
def __init__(self):
self.screen_width, self.screen_height = 800, 300
self.bg_color = (225, 225, 225) |
class Solution:
def sortColors(self, nums: List[int]) -> None:
zero = -1
one = -1
two = -1
for num in nums:
if num == 0:
two += 1
one += 1
zero += 1
nums[two] = 2
nums[one] = 1
nums[zero] = 0
elif num == 1:
two += 1
one += 1
nums[two] = 2
nums[one] = 1
else:
two += 1
nums[two] = 2
|
"""This problem was asked by Two Sigma.
You’re tracking stock price at a given instance of time.
Implement an API with the following functions: add(), update(), remove(),
which adds/updates/removes a datapoint for the stock price you are tracking.
The data is given as (timestamp, price), where timestamp is specified in unix
epoch time.
Also, provide max(), min(), and average() functions that give the max/min/average
of all values seen thus far.
""" |
"""
dictionary unpacking => It unpacks a dictionary as named arguments to a function.
"""
class User:
def __init__(self, username, password):
self.username = username
self.password = password
@classmethod
def from_dict(cls, data):
return cls(data['username'], data['password'])
def __repr__(self):
return f"<User {self.username} with password {self.password}>"
users = [
{'username': 'kamran', 'password': '123'},
{'username': 'ali', 'password': '123'}
]
user_objects = [ User.from_dict(u) for u in users ]
## With Dictionary Unpacking
class User2:
def __init__(self, username, password):
self.username = username
self.password = password
# @classmethod
# def from_dict(cls, data):
# return cls(data['username'], data['password'])
def __repr__(self):
return f"<User2 {self.username} with password {self.password}>"
users = [
{'username': 'kamran', 'password': '123'},
{'username': 'ali', 'password': '123'}
]
## It unpacks a dictionary as named arguments to a function. In this case it's username and password.
# So username is data['username']
# Basically it is equivalent to "user_objects_with_unpacking = [ User2(username=u['username'], password=u['password']) for u in users ] "
# It's important because dictionary may not be in order. And remember named arguments can be jumbled up and that's fine.
user_objects_with_unpacking = [ User2(**u) for u in users ]
print(user_objects_with_unpacking)
# if data is in form of tuple
users_tuple = [
('kamran', '123'),
('ali', '123')
]
user_objects_from_tuples = [User2(*u) for u in users_tuple] |
'''
* Concatenação: operadores e métodos
* Repositório: Lógica de Programação e Algoritmos em Python
* GitHub: @michelelozada
'''
# 1 - Operador +
nome = 'Denzel' + ' ' + 'Washington'
profissao = 'ator e produtor norte-americano'
print(nome) # Denzel Washington
print(nome + ', ' + profissao) # Denzel Washington, ator e produtor norte-americano
# 2 - Operador +=
s1 = 'hidro'
s2 = 'elétrica'
s1 += s2
print(s1) # hidroelétrica
# 3 - Operador *
frase = ('Vamos sentir saudades. Volte logo' + '!' * 3)
print(frase) # Vamos sentir saudades. Volte logo!!!
# 4 - Método str()
print('No ' + str(6) + 'º dia do evento, apenas ' + str(25) + '% dos convidados participaram dos ' + str(10) + ' seminários.')
# No 6º dia do evento, apenas 25% dos convidados participaram dos 10 seminários.
# 5- Método format()
name = 'Luísa Dias'
age = 18
grade = 9.5
print('Aluno(a): {}. Idade: {}. Nota: {}'.format(name,age,grade))
# Aluno(a): Luísa Dias. Idade: 18. Nota: 9.5
print(f'Aluno(a): {name}. Idade: {age}. Nota: {grade}') # Disponível a partir da versão 3.6 do Python!
# Aluno(a): Luísa Dias. Idade: 18. Nota: 9.5
# 3.2 - Método join()
bandasAnos80 = ['The Cure', 'The Smiths', 'New Order', 'Joy Division']
s = ' - '.join(bandasAnos80)
print(s)
|
# an ex. of how you might use a list in practice
colors = ["green", "red", "blue"]
guess = input("Please guess a color:")
if guess in colors:
print ("You guessed correctly!")
else:
print ("Negative! Try again please.")
|
# Do not edit this file directly.
# It was auto-generated by: code/programs/reflexivity/reflexive_refresh
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
def backwardCpp():
http_archive(
name="backward_cpp" ,
build_file="//bazel/deps/backward_cpp:build.BUILD" ,
sha256="16ea32d5337735ed3e7eacd71d90596a89bc648c557bb6007c521a2cb6b073cc" ,
strip_prefix="backward-cpp-aa3f253efc7281148e9159eda52b851339fe949e" ,
urls = [
"https://github.com/Unilang/backward-cpp/archive/aa3f253efc7281148e9159eda52b851339fe949e.tar.gz",
],
)
|
'''
Largest product in a grid
Problem 11
In the 20×20 grid below, four numbers along a diagonal line have been marked in red.
08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08
49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00
81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65
52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91
22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80
24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50
32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70
67 26 20 68 02 62 12 20 95 63 94 39 63 08 40 91 66 49 94 21
24 55 58 05 66 73 99 26 97 17 78 78 96 83 14 88 34 89 63 72
21 36 23 09 75 00 76 44 20 45 35 14 00 61 33 97 34 31 33 95
78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92
16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57
86 56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58
19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04 89 55 40
04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33 27 98 66
88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69
04 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36
20 69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 04 36 16
20 73 35 29 78 31 90 01 74 31 49 71 48 86 81 16 23 57 05 54
01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48
The product of these numbers is 26 × 63 × 78 × 14 = 1788696.
What is the greatest product of four adjacent numbers in the same direction (up, down, left, right, or diagonally) in the 20×20 grid? '''
a = []
f = open('P011.txt', 'r')
for line in f:
temp1 = list(line.split(" "))
temp2 = [int(i) for i in temp1]
# print(temp2)
a.append(temp2)
f.close()
print("file is read")
max_p = 0
# go right
for line in a:
for i in range(0, 17):
p = line[i] * line[i + 1] * line[i + 2] * line[i + 3]
if p > max_p:
max_p = p
print("scanned every line . So far max_p is:", max_p)
# go down
for j in range(0, 20):
for i in range(0, 17):
p = a[i][j] * a[i + 1][j] * a[i + 2][j] * a[i + 3][j]
if p > max_p:
max_p = p
print("scanned every column . So far max_p is:", max_p)
# Go Forward diagnal
for i in range(0, 17):
for j in range(0, 17):
p = a[i][j] * a[i + 1][j + 1] * a[i + 2][j + 2] * a[i + 3][j + 3]
if p > max_p:
max_p = p
print("scanned forward diagonally . So far max_p is:", max_p)
# Go backward diagnal
for i in range(0, 17):
for j in range(3, 20):
p = a[i][j] * a[i + 1][j - 1] * a[i + 2][j - 2] * a[i + 3][j - 3]
if p > max_p:
max_p = p
print("scanned backward diagonally . So far max_p is:", max_p)
|
print('~'*30)
print('BANCOS AVORIK')
print('~'*30)
nt50 = nt20 = nt10 = nt1 = 0
saque = int(input('Quantos R$ deseja sacar?\n'))
resto = saque
while True:
if resto > 50:
nt50 = resto // 50
resto = resto % 50
print(f'{nt50} nota(s) de R$ 50.')
if resto > 20:
nt20 = resto // 20
resto = resto % 20
print(f'{nt20} nota(s) de R$ 20.')
if resto > 10:
nt10 = resto // 10
resto = resto % 10
print(f'{nt10} nota(s) de R$ 10.')
if resto > 1:
nt1 = resto // 1
resto = resto % 1
print(f'{nt1} nota(s) de R$ 1.')
if resto == 0:
break
print('Fim') |
s = set(r"""~!@#$%^&*()_+|`-=\{}[]:";'<>?,./ """)
while True:
up = True
low = True
digit = True
special = True
a = input()
b = input()
t = len(a)
if a != b:
print('Password settings are not consistent.')
elif a == 'END':
break
else:
if not 8 <= t <= 12:
print('Password should contain 8 to 12 characters.')
continue
for char in a:
if up and char.isupper():
up = False
if low and char.islower():
low = False
if digit and char.isdigit():
digit = False
if special and char in s:
special = False
if up:
print(
'Password should contain at least one upper-case alphabetical character.')
continue
if low:
print(
'Password should contain at least one lower-case alphabetical character.')
continue
if digit:
print('Password should contain at least one number.')
continue
if special:
print('Password should contain at least one special character.')
continue
if a == a[::-1]:
print('Symmetric password is not allowed.')
continue
close = False
for i in range(3, 7):
j = 0
k = 0
while j < t:
if k >= i:
k = 0
if a[j] != a[k]:
break
j += 1
k += 1
else:
print('Circular password is not allowed.')
break
else:
print('Password is valid.')
|
"""Modules for integration between Sans-I/O protocols and I/O drivers.
Modules:
_trio: integration between Sans-I/O protocols and trio I/O.
"""
|
ButtonA, ButtonB, ButtonSelect, ButtonStart, ButtonUp, ButtonDown, ButtonLeft, ButtonRight = range(8)
class Controller:
def __init__(self):
self.buttons = [False for _ in range(8)]
self.index = 0
self.strobe = 0
def set_buttons(self, buttons):
self.buttons = buttons
def read(self):
value = 0
if self.index < 8 and self.buttons[self.index]:
value = 1
self.index += 1
if self.strobe & 1 == 1:
self.index = 0
return value
def write(self, value):
self.strobe = value
if self.strobe & 1 == 1:
self.index = 0 |
userid_country = {
60: ("US", "United States", "アメリカ合衆国"),
71: ("CL", "Chile", "チリ"),
95: ("CL", "Chile", "チリ"),
95: ("BR", "Brazil", "ブラジル"),
95: ("PE", "Peru", "ペルー"),
95: ("PT", "Portugal", "ポルトガル"),
170: ("US", "United States", "アメリカ合衆国"),
219: ("CN", "China", "中華人民共和国"),
219: ("PH", "Philippines", "フィリピン"),
238: ("BR", "Brazil", "ブラジル"),
266: ("TR", "Turkey", "トルコ"),
331: ("TH", "Thailand", "タイ"),
367: ("MY", "Malaysia", "マレーシア"),
376: ("ID", "Indonesia", "インドネシア"),
419: ("GB", "United Kingdom", "イギリス"),
419: ("MY", "Malaysia", "マレーシア"),
422: ("US", "United States", "アメリカ合衆国"),
527: ("PT", "Portugal", "ポルトガル"),
539: ("ID", "Indonesia", "インドネシア"),
565: ("TH", "Thailand", "タイ"),
626: ("CN", "China", "中華人民共和国"),
653: ("US", "United States", "アメリカ合衆国"),
653: ("GB", "United Kingdom", "イギリス"),
779: ("KR", "Korea", "韓国"),
793: ("MY", "Malaysia", "マレーシア"),
1107: ("MY", "Malaysia", "マレーシア"),
1109: ("TH", "Thailand", "タイ"),
1224: ("TH", "Thailand", "タイ"),
1247: ("MY", "Malaysia", "マレーシア"),
1478: ("DE", "Germany", "ドイツ"),
1523: ("CN", "China", "中華人民共和国"),
1523: ("VE", "Venezuela","ベネズエラ"),
1546: ("KR", "Korea", "韓国"),
1658: ("TH", "Thailand", "タイ"),
1659: ("TH", "Thailand", "タイ"),
1887: ("US", "United States", "アメリカ合衆国"),
1887: ("ID", "Indonesia", "インドネシア"),
2019: ("TR", "Turkey", "トルコ"),
2070: ("MY", "Malaysia", "マレーシア"),
2189: ("US", "United States", "アメリカ合衆国"),
2189: ("CN", "China", "中華人民共和国"),
2283: ("MY", "Malaysia", "マレーシア"),
2288: ("TH", "Thailand", "タイ"),
2426: ("MY", "Malaysia", "マレーシア"),
2440: ("CA", "Canada", "カナダ"),
2440: ("TH", "Thailand", "タイ"),
2550: ("MY", "Malaysia", "マレーシア"),
2584: ("TH", "Thailand", "タイ"),
2650: ("US", "United States", "アメリカ合衆国"),
2729: ("BR", "Brazil", "ブラジル"),
2769: ("TH", "Thailand", "タイ"),
2769: ("JP", "Japan", "日本"),
2877: ("SG", "Singapore", "シンガポール"),
2877: ("MY", "Malaysia", "マレーシア"),
2932: ("ES", "Spain", "スペイン"),
2942: ("TH", "Thailand", "タイ"),
3042: ("TH", "Thailand", "タイ"),
3203: ("KR", "Korea", "韓国"),
3242: ("MY", "Malaysia", "マレーシア"),
3250: ("IN", "India", "インド"),
3372: ("TH", "Thailand", "タイ"),
3378: ("BR", "Brazil", "ブラジル"),
3520: ("MY", "Malaysia", "マレーシア"),
3524: ("US", "United States", "アメリカ合衆国"),
3525: ("ID", "Indonesia", "インドネシア"),
3559: ("SG", "Singapore", "シンガポール"),
3559: ("MY", "Malaysia", "マレーシア"),
3579: ("MY", "Malaysia", "マレーシア"),
3594: ("ES", "Spain", "スペイン"),
3659: ("ID", "Indonesia", "インドネシア"),
3670: ("US", "United States", "アメリカ合衆国"),
3670: ("ID", "Indonesia", "インドネシア"),
3680: ("ID", "Indonesia", "インドネシア"),
3703: ("BR", "Brazil", "ブラジル"),
3830: ("US", "United States", "アメリカ合衆国"),
4033: ("US", "United States", "アメリカ合衆国"),
4037: ("US", "United States", "アメリカ合衆国"),
4037: ("ID", "Indonesia", "インドネシア"),
4037: ("CA", "Canada", "カナダ"),
4037: ("TR", "Turkey", "トルコ"),
4037: ("HU", "Hungary", "ハンガリー"),
4037: ("RU", "Russian Federation", "ロシア連邦"),
4140: ("US", "United States", "アメリカ合衆国"),
4243: ("AU", "Australia", "オーストラリア"),
4414: ("ID", "Indonesia", "インドネシア"),
4599: ("TH", "Thailand", "タイ"),
4678: ("SG", "Singapore", "シンガポール"),
4757: ("PH", "Philippines", "フィリピン"),
4862: ("ID", "Indonesia", "インドネシア"),
4988: ("US", "United States", "アメリカ合衆国"),
4988: ("CN", "China", "中華人民共和国"),
5033: ("ID", "Indonesia", "インドネシア"),
5041: ("TH", "Thailand", "タイ"),
5042: ("KR", "Korea", "韓国"),
5163: ("MY", "Malaysia", "マレーシア"),
5231: ("DE", "Germany", "ドイツ"),
5249: ("TH", "Thailand", "タイ"),
5294: ("DE", "Germany", "ドイツ"),
5408: ("MY", "Malaysia", "マレーシア"),
5499: ("TH", "Thailand", "タイ"),
5499: ("BE", "Belgium", "ベルギー"),
5545: ("TH", "Thailand", "タイ"),
5564: ("US", "United States", "アメリカ合衆国"),
5575: ("MY", "Malaysia", "マレーシア"),
5694: ("TH", "Thailand", "タイ"),
5710: ("US", "United States", "アメリカ合衆国"),
5839: ("KR", "Korea", "韓国"),
5848: ("BR", "Brazil", "ブラジル"),
6002: ("TH", "Thailand", "タイ"),
6112: ("CN", "China", "中華人民共和国"),
6277: ("MY", "Malaysia", "マレーシア"),
6351: ("ID", "Indonesia", "インドネシア"),
6369: ("EC", "Ecuador", "エクアドル"),
6369: ("BR", "Brazil", "ブラジル"),
6384: ("ID", "Indonesia", "インドネシア"),
6672: ("ID", "Indonesia", "インドネシア"),
6672: ("BR", "Brazil", "ブラジル"),
6798: ("TH", "Thailand", "タイ"),
6833: ("US", "United States", "アメリカ合衆国"),
6848: ("TH", "Thailand", "タイ"),
7207: ("SA", "Saudi Arabia", "サウジアラビア"),
7357: ("KR", "Korea", "韓国"),
7599: ("JP", "Japan", "日本"),
7599: ("RU", "Russian Federation", "ロシア連邦"),
7705: ("RU", "Russian Federation", "ロシア連邦"),
7782: ("KR", "Korea", "韓国"),
7877: ("KR", "Korea", "韓国"),
7886: ("ID", "Indonesia", "インドネシア"),
7888: ("SG", "Singapore", "シンガポール"),
8106: ("MY", "Malaysia", "マレーシア"),
8139: ("SG", "Singapore", "シンガポール"),
8165: ("ID", "Indonesia", "インドネシア"),
8234: ("TH", "Thailand", "タイ"),
8330: ("TH", "Thailand", "タイ"),
8434: ("TH", "Thailand", "タイ"),
8435: ("ID", "Indonesia", "インドネシア"),
8468: ("PT", "Portugal", "ポルトガル"),
8478: ("TH", "Thailand", "タイ"),
8544: ("PH", "Philippines", "フィリピン"),
8568: ("AU", "Australia", "オーストラリア"),
8568: ("SG", "Singapore", "シンガポール"),
8784: ("TR", "Turkey", "トルコ"),
8853: ("US", "United States", "アメリカ合衆国"),
8859: ("TH", "Thailand", "タイ"),
8859: ("PH", "Philippines", "フィリピン"),
9222: ("TH", "Thailand", "タイ"),
9425: ("TH", "Thailand", "タイ"),
9566: ("ID", "Indonesia", "インドネシア"),
9566: ("JP", "Japan", "日本"),
9605: ("BE", "Belgium", "ベルギー"),
9606: ("ID", "Indonesia", "インドネシア"),
9613: ("TH", "Thailand", "タイ"),
9618: ("KR", "Korea", "韓国"),
9661: ("US", "United States", "アメリカ合衆国"),
9886: ("ID", "Indonesia", "インドネシア"),
9887: ("US", "United States", "アメリカ合衆国"),
9887: ("ID", "Indonesia", "インドネシア"),
10046: ("ID", "Indonesia", "インドネシア"),
10256: ("US", "United States", "アメリカ合衆国"),
10267: ("TH", "Thailand", "タイ"),
10333: ("CN", "China", "中華人民共和国"),
10386: ("TH", "Thailand", "タイ"),
10475: ("US", "United States", "アメリカ合衆国"),
10475: ("JP", "Japan", "日本"),
10553: ("BR", "Brazil", "ブラジル"),
10667: ("TH", "Thailand", "タイ"),
10781: ("US", "United States", "アメリカ合衆国"),
10868: ("US", "United States", "アメリカ合衆国"),
10868: ("GR", "Greece", "ギリシャ"),
10868: ("CO", "Colombia", "コロンビア"),
10868: ("SE", "Sweden", "スウェーデン"),
10868: ("TR", "Turkey", "トルコ"),
10915: ("US", "United States", "アメリカ合衆国"),
10995: ("BR", "Brazil", "ブラジル"),
11002: ("CN", "China", "中華人民共和国"),
11069: ("KR", "Korea", "韓国"),
11130: ("TH", "Thailand", "タイ"),
11130: ("JP", "Japan", "日本"),
11226: ("ID", "Indonesia", "インドネシア"),
11289: ("TH", "Thailand", "タイ"),
11358: ("SG", "Singapore", "シンガポール"),
11546: ("SG", "Singapore", "シンガポール"),
11593: ("TH", "Thailand", "タイ"),
11870: ("KR", "Korea", "韓国"),
12103: ("NL", "Netherlands", "オランダ"),
12309: ("US", "United States", "アメリカ合衆国"),
12319: ("PH", "Philippines", "フィリピン"),
12426: ("TH", "Thailand", "タイ"),
12438: ("US", "United States", "アメリカ合衆国"),
12515: ("MY", "Malaysia", "マレーシア"),
12600: ("UA", "Ukraine", "ウクライナ"),
12646: ("US", "United States", "アメリカ合衆国"),
12913: ("KR", "Korea", "韓国"),
13046: ("KR", "Korea", "韓国"),
13432: ("TH", "Thailand", "タイ"),
13681: ("ID", "Indonesia", "インドネシア"),
13681: ("MY", "Malaysia", "マレーシア"),
13795: ("TH", "Thailand", "タイ"),
13827: ("ID", "Indonesia", "インドネシア"),
13890: ("US", "United States", "アメリカ合衆国"),
13890: ("IT", "Italy", "イタリア"),
14142: ("KR", "Korea", "韓国"),
14155: ("ID", "Indonesia", "インドネシア"),
14307: ("MY", "Malaysia", "マレーシア"),
14314: ("US", "United States", "アメリカ合衆国"),
14449: ("US", "United States", "アメリカ合衆国"),
14664: ("BR", "Brazil", "ブラジル"),
14885: ("KR", "Korea", "韓国"),
14930: ("KR", "Korea", "韓国"),
15059: ("BR", "Brazil", "ブラジル"),
15068: ("BR", "Brazil", "ブラジル"),
15161: ("US", "United States", "アメリカ合衆国"),
15186: ("CN", "China", "中華人民共和国"),
15293: ("US", "United States", "アメリカ合衆国"),
15293: ("AE", "United Arab Emirates", "アラブ首長国連邦"),
15293: ("RU", "Russian Federation", "ロシア連邦"),
15356: ("TH", "Thailand", "タイ"),
15413: ("CN", "China", "中華人民共和国"),
15497: ("US", "United States", "アメリカ合衆国"),
15642: ("MY", "Malaysia", "マレーシア"),
15722: ("MY", "Malaysia", "マレーシア"),
15880: ("TH", "Thailand", "タイ"),
16207: ("TH", "Thailand", "タイ"),
16257: ("KR", "Korea", "韓国"),
16262: ("CO", "Colombia", "コロンビア"),
16376: ("TH", "Thailand", "タイ"),
16382: ("MY", "Malaysia", "マレーシア"),
16546: ("KR", "Korea", "韓国"),
16673: ("KR", "Korea", "韓国"),
16673: ("JP", "Japan", "日本"),
16780: ("TH", "Thailand", "タイ"),
16866: ("US", "United States", "アメリカ合衆国"),
17079: ("ID", "Indonesia", "インドネシア"),
17146: ("TH", "Thailand", "タイ"),
17148: ("IT", "Italy", "イタリア"),
17168: ("DE", "Germany", "ドイツ"),
17168: ("HU", "Hungary", "ハンガリー"),
17257: ("US", "United States", "アメリカ合衆国"),
17348: ("MY", "Malaysia", "マレーシア"),
17398: ("MX", "Mexico", "メキシコ"),
17594: ("ID", "Indonesia", "インドネシア"),
17603: ("PH", "Philippines", "フィリピン"),
18301: ("MY", "Malaysia", "マレーシア"),
18335: ("PH", "Philippines", "フィリピン"),
18617: ("MX", "Mexico", "メキシコ"),
18695: ("TH", "Thailand", "タイ"),
18704: ("ID", "Indonesia", "インドネシア"),
18742: ("KR", "Korea", "韓国"),
18810: ("US", "United States", "アメリカ合衆国"),
18810: ("GB", "United Kingdom", "イギリス"),
18968: ("TH", "Thailand", "タイ"),
19143: ("ID", "Indonesia", "インドネシア"),
19149: ("MY", "Malaysia", "マレーシア"),
19276: ("TH", "Thailand", "タイ"),
19284: ("TH", "Thailand", "タイ"),
19565: ("US", "United States", "アメリカ合衆国"),
19738: ("TH", "Thailand", "タイ"),
19784: ("MY", "Malaysia", "マレーシア"),
19821: ("FR", "France", "フランス"),
19931: ("CN", "China", "中華人民共和国"),
19931: ("JP", "Japan", "日本"),
19975: ("TH", "Thailand", "タイ"),
19981: ("TH", "Thailand", "タイ"),
20031: ("QA", "Qatar", "カタール"),
20031: ("HU", "Hungary", "ハンガリー"),
20149: ("TH", "Thailand", "タイ"),
20181: ("TH", "Thailand", "タイ"),
20258: ("IT", "Italy", "イタリア"),
20416: ("TH", "Thailand", "タイ"),
20501: ("US", "United States", "アメリカ合衆国"),
20516: ("KR", "Korea", "韓国"),
20766: ("BR", "Brazil", "ブラジル"),
20787: ("TH", "Thailand", "タイ"),
21200: ("TH", "Thailand", "タイ"),
21200: ("JP", "Japan", "日本"),
21609: ("TH", "Thailand", "タイ"),
21743: ("AE", "United Arab Emirates", "アラブ首長国連邦"),
21942: ("ID", "Indonesia", "インドネシア"),
22136: ("RU", "Russian Federation", "ロシア連邦"),
22338: ("MY", "Malaysia", "マレーシア"),
22439: ("TH", "Thailand", "タイ"),
22657: ("TH", "Thailand", "タイ"),
22668: ("MY", "Malaysia", "マレーシア"),
22982: ("TR", "Turkey", "トルコ"),
23624: ("KR", "Korea", "韓国"),
23681: ("US", "United States", "アメリカ合衆国"),
23681: ("GB", "United Kingdom", "イギリス"),
23681: ("BR", "Brazil", "ブラジル"),
23864: ("TH", "Thailand", "タイ"),
24120: ("KR", "Korea", "韓国"),
24515: ("KR", "Korea", "韓国"),
24543: ("ID", "Indonesia", "インドネシア"),
24643: ("TH", "Thailand", "タイ"),
24806: ("CN", "China", "中華人民共和国"),
24936: ("TH", "Thailand", "タイ"),
24974: ("AU", "Australia", "オーストラリア"),
24974: ("MY", "Malaysia", "マレーシア"),
25252: ("US", "United States", "アメリカ合衆国"),
25452: ("MY", "Malaysia", "マレーシア"),
25539: ("TH", "Thailand", "タイ"),
26283: ("CL", "Chile", "チリ"),
26486: ("TH", "Thailand", "タイ"),
26520: ("ID", "Indonesia", "インドネシア"),
26595: ("US", "United States", "アメリカ合衆国"),
26595: ("TH", "Thailand", "タイ"),
26595: ("BR", "Brazil", "ブラジル"),
26595: ("VN", "Viet Nam", "ベトナム"),
26595: ("PE", "Peru", "ペルー"),
26977: ("US", "United States", "アメリカ合衆国"),
27349: ("KR", "Korea", "韓国"),
27390: ("IL", "Israel", "イスラエル"),
27646: ("MY", "Malaysia", "マレーシア"),
27693: ("SG", "Singapore", "シンガポール"),
27868: ("MY", "Malaysia", "マレーシア"),
27974: ("MY", "Malaysia", "マレーシア"),
28356: ("KR", "Korea", "韓国"),
29051: ("TR", "Turkey", "トルコ"),
29093: ("KR", "Korea", "韓国"),
29099: ("TR", "Turkey", "トルコ"),
29462: ("SG", "Singapore", "シンガポール"),
29462: ("MY", "Malaysia", "マレーシア"),
29474: ("TH", "Thailand", "タイ"),
29567: ("VN", "Viet Nam", "ベトナム"),
29633: ("TH", "Thailand", "タイ"),
29672: ("KR", "Korea", "韓国"),
29694: ("PH", "Philippines", "フィリピン"),
30208: ("SE", "Sweden", "スウェーデン"),
30303: ("ID", "Indonesia", "インドネシア"),
30394: ("BR", "Brazil", "ブラジル"),
30543: ("MY", "Malaysia", "マレーシア"),
30713: ("TH", "Thailand", "タイ"),
30734: ("MY", "Malaysia", "マレーシア"),
30917: ("MY", "Malaysia", "マレーシア"),
30931: ("MY", "Malaysia", "マレーシア"),
31188: ("ID", "Indonesia", "インドネシア"),
31387: ("GB", "United Kingdom", "イギリス"),
31840: ("KR", "Korea", "韓国"),
31972: ("MX", "Mexico", "メキシコ"),
32512: ("JP", "Japan", "日本"),
32512: ("MY", "Malaysia", "マレーシア"),
32542: ("TH", "Thailand", "タイ"),
32588: ("US", "United States", "アメリカ合衆国"),
32712: ("TH", "Thailand", "タイ"),
33169: ("CL", "Chile", "チリ"),
33429: ("RU", "Russian Federation", "ロシア連邦"),
33529: ("TH", "Thailand", "タイ"),
33636: ("BR", "Brazil", "ブラジル"),
33778: ("ID", "Indonesia", "インドネシア"),
34011: ("GR", "Greece", "ギリシャ"),
34305: ("MY", "Malaysia", "マレーシア"),
34320: ("MY", "Malaysia", "マレーシア"),
34596: ("BR", "Brazil", "ブラジル"),
34755: ("ID", "Indonesia", "インドネシア"),
34862: ("MY", "Malaysia", "マレーシア"),
34997: ("ID", "Indonesia", "インドネシア"),
35067: ("BR", "Brazil", "ブラジル"),
35078: ("TH", "Thailand", "タイ"),
35203: ("MY", "Malaysia", "マレーシア"),
35834: ("KR", "Korea", "韓国"),
35853: ("TH", "Thailand", "タイ"),
35888: ("TH", "Thailand", "タイ"),
36162: ("ID", "Indonesia", "インドネシア"),
36306: ("ID", "Indonesia", "インドネシア"),
36478: ("CN", "China", "中華人民共和国"),
36630: ("JM", "Jamaica", "ジャマイカ"),
36715: ("MX", "Mexico", "メキシコ"),
36806: ("CA", "Canada", "カナダ"),
36989: ("MY", "Malaysia", "マレーシア"),
37136: ("MY", "Malaysia", "マレーシア"),
37352: ("DE", "Germany", "ドイツ"),
37636: ("SG", "Singapore", "シンガポール"),
37636: ("MY", "Malaysia", "マレーシア"),
37646: ("ID", "Indonesia", "インドネシア"),
37646: ("CN", "China", "中華人民共和国"),
37683: ("SG", "Singapore", "シンガポール"),
37683: ("MY", "Malaysia", "マレーシア"),
37712: ("PH", "Philippines", "フィリピン"),
37802: ("SG", "Singapore", "シンガポール"),
37848: ("MY", "Malaysia", "マレーシア"),
37976: ("CN", "China", "中華人民共和国"),
38155: ("MY", "Malaysia", "マレーシア"),
38839: ("US", "United States", "アメリカ合衆国"),
38839: ("ID", "Indonesia", "インドネシア"),
39071: ("KR", "Korea", "韓国"),
39132: ("TH", "Thailand", "タイ"),
39484: ("MY", "Malaysia", "マレーシア"),
39497: ("TH", "Thailand", "タイ"),
39715: ("ID", "Indonesia", "インドネシア"),
39752: ("MY", "Malaysia", "マレーシア"),
39760: ("KR", "Korea", "韓国"),
40047: ("TH", "Thailand", "タイ"),
40134: ("TH", "Thailand", "タイ"),
40183: ("MY", "Malaysia", "マレーシア"),
40569: ("TH", "Thailand", "タイ"),
40725: ("KR", "Korea", "韓国"),
40744: ("US", "United States", "アメリカ合衆国"),
40831: ("TH", "Thailand", "タイ"),
40991: ("SG", "Singapore", "シンガポール"),
40991: ("MY", "Malaysia", "マレーシア"),
41069: ("MY", "Malaysia", "マレーシア"),
41086: ("TH", "Thailand", "タイ"),
41330: ("TH", "Thailand", "タイ"),
41368: ("CN", "China", "中華人民共和国"),
41427: ("US", "United States", "アメリカ合衆国"),
41456: ("ID", "Indonesia", "インドネシア"),
41666: ("KR", "Korea", "韓国"),
42299: ("TH", "Thailand", "タイ"),
42358: ("FR", "France", "フランス"),
42399: ("BR", "Brazil", "ブラジル"),
42667: ("TH", "Thailand", "タイ"),
42902: ("TH", "Thailand", "タイ"),
42936: ("KR", "Korea", "韓国"),
43499: ("US", "United States", "アメリカ合衆国"),
43499: ("BR", "Brazil", "ブラジル"),
43835: ("US", "United States", "アメリカ合衆国"),
44270: ("MY", "Malaysia", "マレーシア"),
44986: ("MY", "Malaysia", "マレーシア"),
45043: ("MY", "Malaysia", "マレーシア"),
45167: ("KR", "Korea", "韓国"),
45449: ("TH", "Thailand", "タイ"),
45662: ("GB", "United Kingdom", "イギリス"),
45662: ("CN", "China", "中華人民共和国"),
45684: ("TH", "Thailand", "タイ"),
45774: ("TH", "Thailand", "タイ"),
46555: ("KR", "Korea", "韓国"),
46599: ("JP", "Japan", "日本"),
46599: ("PH", "Philippines", "フィリピン"),
46633: ("TR", "Turkey", "トルコ"),
46887: ("ID", "Indonesia", "インドネシア"),
47297: ("US", "United States", "アメリカ合衆国"),
47535: ("BR", "Brazil", "ブラジル"),
47686: ("TH", "Thailand", "タイ"),
48006: ("TH", "Thailand", "タイ"),
48163: ("ID", "Indonesia", "インドネシア"),
48456: ("US", "United States", "アメリカ合衆国"),
48846: ("TH", "Thailand", "タイ"),
49199: ("TH", "Thailand", "タイ"),
49270: ("GB", "United Kingdom", "イギリス"),
49520: ("IL", "Israel", "イスラエル"),
49570: ("KR", "Korea", "韓国"),
49607: ("TH", "Thailand", "タイ"),
49639: ("IN", "India", "インド"),
49875: ("MY", "Malaysia", "マレーシア"),
50118: ("TH", "Thailand", "タイ"),
50153: ("ID", "Indonesia", "インドネシア"),
50167: ("US", "United States", "アメリカ合衆国"),
50605: ("US", "United States", "アメリカ合衆国"),
50643: ("SG", "Singapore", "シンガポール"),
50816: ("US", "United States", "アメリカ合衆国"),
50828: ("MY", "Malaysia", "マレーシア"),
50931: ("TH", "Thailand", "タイ"),
51095: ("TR", "Turkey", "トルコ"),
51300: ("TH", "Thailand", "タイ"),
51305: ("SG", "Singapore", "シンガポール"),
51305: ("MY", "Malaysia", "マレーシア"),
51644: ("MY", "Malaysia", "マレーシア"),
51808: ("CN", "China", "中華人民共和国"),
51879: ("TH", "Thailand", "タイ"),
52026: ("RU", "Russian Federation", "ロシア連邦"),
52084: ("BR", "Brazil", "ブラジル"),
52432: ("MY", "Malaysia", "マレーシア"),
52477: ("SG", "Singapore", "シンガポール"),
52782: ("TH", "Thailand", "タイ"),
53152: ("ID", "Indonesia", "インドネシア"),
53232: ("ID", "Indonesia", "インドネシア"),
53232: ("DE", "Germany", "ドイツ"),
53625: ("ID", "Indonesia", "インドネシア"),
53673: ("ID", "Indonesia", "インドネシア"),
53743: ("ID", "Indonesia", "インドネシア"),
53913: ("KR", "Korea", "韓国"),
53989: ("FI", "Finland", "フィンランド"),
54137: ("TH", "Thailand", "タイ"),
54169: ("SG", "Singapore", "シンガポール"),
54169: ("MY", "Malaysia", "マレーシア"),
54762: ("MY", "Malaysia", "マレーシア"),
54875: ("TH", "Thailand", "タイ"),
54930: ("US", "United States", "アメリカ合衆国"),
55093: ("ID", "Indonesia", "インドネシア"),
55338: ("MY", "Malaysia", "マレーシア"),
55964: ("CL", "Chile", "チリ"),
55995: ("TH", "Thailand", "タイ"),
56128: ("KR", "Korea", "韓国"),
56357: ("ID", "Indonesia", "インドネシア"),
56458: ("TH", "Thailand", "タイ"),
56460: ("RU", "Russian Federation", "ロシア連邦"),
56829: ("ID", "Indonesia", "インドネシア"),
56897: ("US", "United States", "アメリカ合衆国"),
56935: ("ID", "Indonesia", "インドネシア"),
56947: ("CN", "China", "中華人民共和国"),
56948: ("ID", "Indonesia", "インドネシア"),
57114: ("TH", "Thailand", "タイ"),
57388: ("MX", "Mexico", "メキシコ"),
57484: ("ID", "Indonesia", "インドネシア"),
57723: ("BR", "Brazil", "ブラジル"),
57982: ("MY", "Malaysia", "マレーシア"),
58013: ("US", "United States", "アメリカ合衆国"),
58336: ("PH", "Philippines", "フィリピン"),
58485: ("CN", "China", "中華人民共和国"),
59037: ("ID", "Indonesia", "インドネシア"),
59178: ("ID", "Indonesia", "インドネシア"),
59315: ("US", "United States", "アメリカ合衆国"),
59618: ("MX", "Mexico", "メキシコ"),
59775: ("ID", "Indonesia", "インドネシア"),
59790: ("MY", "Malaysia", "マレーシア"),
60092: ("MX", "Mexico", "メキシコ"),
60100: ("ID", "Indonesia", "インドネシア"),
60296: ("US", "United States", "アメリカ合衆国"),
60939: ("US", "United States", "アメリカ合衆国"),
61467: ("TH", "Thailand", "タイ"),
61526: ("TH", "Thailand", "タイ"),
61859: ("US", "United States", "アメリカ合衆国"),
62410: ("ID", "Indonesia", "インドネシア"),
62423: ("CA", "Canada", "カナダ"),
62521: ("CL", "Chile", "チリ"),
62613: ("ID", "Indonesia", "インドネシア"),
62825: ("CN", "China", "中華人民共和国"),
62862: ("TH", "Thailand", "タイ"),
63009: ("BE", "Belgium", "ベルギー"),
63224: ("TH", "Thailand", "タイ"),
63225: ("MY", "Malaysia", "マレーシア"),
63254: ("TH", "Thailand", "タイ"),
63804: ("TH", "Thailand", "タイ"),
63804: ("JP", "Japan", "日本"),
64150: ("SG", "Singapore", "シンガポール"),
64287: ("PT", "Portugal", "ポルトガル"),
64392: ("CN", "China", "中華人民共和国"),
64452: ("US", "United States", "アメリカ合衆国"),
64520: ("TH", "Thailand", "タイ"),
64694: ("AR", "Argentina", "アルゼンチン"),
64842: ("ID", "Indonesia", "インドネシア"),
65339: ("ID", "Indonesia", "インドネシア"),
65343: ("CN", "China", "中華人民共和国"),
65547: ("VN", "Viet Nam", "ベトナム"),
65821: ("US", "United States", "アメリカ合衆国"),
66468: ("KR", "Korea", "韓国"),
66578: ("MY", "Malaysia", "マレーシア"),
67081: ("SG", "Singapore", "シンガポール"),
67081: ("MY", "Malaysia", "マレーシア"),
67717: ("US", "United States", "アメリカ合衆国"),
67717: ("CN", "China", "中華人民共和国"),
67776: ("GB", "United Kingdom", "イギリス"),
68352: ("TH", "Thailand", "タイ"),
68789: ("ID", "Indonesia", "インドネシア"),
68908: ("CO", "Colombia", "コロンビア"),
68956: ("MY", "Malaysia", "マレーシア"),
68981: ("ES", "Spain", "スペイン"),
69006: ("KR", "Korea", "韓国"),
69299: ("ID", "Indonesia", "インドネシア"),
69368: ("ID", "Indonesia", "インドネシア"),
69542: ("TH", "Thailand", "タイ"),
69659: ("MY", "Malaysia", "マレーシア"),
70219: ("CN", "China", "中華人民共和国"),
70835: ("CN", "China", "中華人民共和国"),
71213: ("TH", "Thailand", "タイ"),
71213: ("JP", "Japan", "日本"),
71213: ("RU", "Russian Federation", "ロシア連邦"),
71232: ("TH", "Thailand", "タイ"),
71441: ("CN", "China", "中華人民共和国"),
71476: ("SG", "Singapore", "シンガポール"),
72728: ("PH", "Philippines", "フィリピン"),
72915: ("MY", "Malaysia", "マレーシア"),
73264: ("US", "United States", "アメリカ合衆国"),
73293: ("TH", "Thailand", "タイ"),
73436: ("GB", "United Kingdom", "イギリス"),
73670: ("ID", "Indonesia", "インドネシア"),
73847: ("AU", "Australia", "オーストラリア"),
74458: ("US", "United States", "アメリカ合衆国"),
75710: ("CN", "China", "中華人民共和国"),
75832: ("TH", "Thailand", "タイ"),
75863: ("TH", "Thailand", "タイ"),
75877: ("TH", "Thailand", "タイ"),
76004: ("MY", "Malaysia", "マレーシア"),
76173: ("KR", "Korea", "韓国"),
76450: ("BR", "Brazil", "ブラジル"),
76729: ("US", "United States", "アメリカ合衆国"),
77080: ("KR", "Korea", "韓国"),
77344: ("ID", "Indonesia", "インドネシア"),
77344: ("MY", "Malaysia", "マレーシア"),
77624: ("GB", "United Kingdom", "イギリス"),
77827: ("BR", "Brazil", "ブラジル"),
78139: ("PY", "Paraguay", "パラグアイ"),
78639: ("MY", "Malaysia", "マレーシア"),
78734: ("CA", "Canada", "カナダ"),
78778: ("KR", "Korea", "韓国"),
78825: ("TH", "Thailand", "タイ"),
79551: ("TH", "Thailand", "タイ"),
79583: ("MY", "Malaysia", "マレーシア"),
79797: ("MY", "Malaysia", "マレーシア"),
81031: ("TH", "Thailand", "タイ"),
81579: ("ID", "Indonesia", "インドネシア"),
82814: ("US", "United States", "アメリカ合衆国"),
82814: ("CA", "Canada", "カナダ"),
82814: ("BE", "Belgium", "ベルギー"),
82890: ("MY", "Malaysia", "マレーシア"),
83138: ("CL", "Chile", "チリ"),
83337: ("MY", "Malaysia", "マレーシア"),
83452: ("TH", "Thailand", "タイ"),
83615: ("TH", "Thailand", "タイ"),
83717: ("TH", "Thailand", "タイ"),
83780: ("MY", "Malaysia", "マレーシア"),
83986: ("GR", "Greece", "ギリシャ"),
83986: ("JP", "Japan", "日本"),
84098: ("US", "United States", "アメリカ合衆国"),
84098: ("PH", "Philippines", "フィリピン"),
85014: ("CN", "China", "中華人民共和国"),
85195: ("MY", "Malaysia", "マレーシア"),
85326: ("MY", "Malaysia", "マレーシア"),
85501: ("PH", "Philippines", "フィリピン"),
85701: ("MY", "Malaysia", "マレーシア"),
85732: ("TH", "Thailand", "タイ"),
85752: ("TH", "Thailand", "タイ"),
86024: ("MY", "Malaysia", "マレーシア"),
86573: ("MY", "Malaysia", "マレーシア"),
86644: ("ID", "Indonesia", "インドネシア"),
86730: ("SG", "Singapore", "シンガポール"),
86730: ("MY", "Malaysia", "マレーシア"),
86736: ("ES", "Spain", "スペイン"),
86846: ("TH", "Thailand", "タイ"),
87463: ("ID", "Indonesia", "インドネシア"),
88187: ("ID", "Indonesia", "インドネシア"),
88871: ("ID", "Indonesia", "インドネシア"),
88963: ("TH", "Thailand", "タイ"),
89493: ("KR", "Korea", "韓国"),
89527: ("ID", "Indonesia", "インドネシア"),
90114: ("TH", "Thailand", "タイ"),
90172: ("CA", "Canada", "カナダ"),
90300: ("CA", "Canada", "カナダ"),
90427: ("TH", "Thailand", "タイ"),
90712: ("ID", "Indonesia", "インドネシア"),
90892: ("KR", "Korea", "韓国"),
91089: ("TN", "Tunisia", "チュニジア"),
91089: ("FR", "France", "フランス"),
91324: ("PH", "Philippines", "フィリピン"),
91385: ("TH", "Thailand", "タイ"),
91388: ("PH", "Philippines", "フィリピン"),
91857: ("MY", "Malaysia", "マレーシア"),
92152: ("KR", "Korea", "韓国"),
92413: ("MY", "Malaysia", "マレーシア"),
92607: ("TH", "Thailand", "タイ"),
92708: ("ID", "Indonesia", "インドネシア"),
93546: ("ID", "Indonesia", "インドネシア"),
94200: ("TH", "Thailand", "タイ"),
94237: ("TR", "Turkey", "トルコ"),
94637: ("TH", "Thailand", "タイ"),
95120: ("TH", "Thailand", "タイ"),
95307: ("US", "United States", "アメリカ合衆国"),
95445: ("TR", "Turkey", "トルコ"),
95779: ("ES", "Spain", "スペイン"),
96069: ("TR", "Turkey", "トルコ"),
97118: ("TH", "Thailand", "タイ"),
97952: ("TH", "Thailand", "タイ"),
98150: ("TH", "Thailand", "タイ"),
98180: ("TH", "Thailand", "タイ"),
98281: ("CL", "Chile", "チリ"),
98555: ("TH", "Thailand", "タイ"),
98595: ("TH", "Thailand", "タイ"),
98704: ("MY", "Malaysia", "マレーシア"),
98776: ("SG", "Singapore", "シンガポール"),
98855: ("TH", "Thailand", "タイ"),
99901: ("SE", "Sweden", "スウェーデン"),
100053: ("TH", "Thailand", "タイ"),
100194: ("TH", "Thailand", "タイ"),
100362: ("ID", "Indonesia", "インドネシア"),
100788: ("SG", "Singapore", "シンガポール"),
100880: ("TH", "Thailand", "タイ"),
100893: ("US", "United States", "アメリカ合衆国"),
100893: ("CN", "China", "中華人民共和国"),
103091: ("ID", "Indonesia", "インドネシア"),
103152: ("TH", "Thailand", "タイ"),
103476: ("ID", "Indonesia", "インドネシア"),
103918: ("US", "United States", "アメリカ合衆国"),
104086: ("ES", "Spain", "スペイン"),
104251: ("US", "United States", "アメリカ合衆国"),
104393: ("RU", "Russian Federation", "ロシア連邦"),
104605: ("CN", "China", "中華人民共和国"),
105360: ("UY", "Uruguay", "ウルグアイ"),
105595: ("TH", "Thailand", "タイ"),
106430: ("AR", "Argentina", "アルゼンチン"),
107720: ("ID", "Indonesia", "インドネシア"),
107736: ("TH", "Thailand", "タイ"),
108034: ("TH", "Thailand", "タイ"),
108114: ("AE", "United Arab Emirates", "アラブ首長国連邦"),
108114: ("PH", "Philippines", "フィリピン"),
108494: ("TH", "Thailand", "タイ"),
108653: ("TH", "Thailand", "タイ"),
108952: ("TH", "Thailand", "タイ"),
108972: ("GB", "United Kingdom", "イギリス"),
109185: ("TH", "Thailand", "タイ"),
109281: ("TH", "Thailand", "タイ"),
109321: ("MY", "Malaysia", "マレーシア"),
109949: ("ID", "Indonesia", "インドネシア"),
110605: ("TH", "Thailand", "タイ"),
110665: ("ID", "Indonesia", "インドネシア"),
110966: ("TH", "Thailand", "タイ"),
111181: ("PH", "Philippines", "フィリピン"),
111241: ("SG", "Singapore", "シンガポール"),
111241: ("MY", "Malaysia", "マレーシア"),
111575: ("TH", "Thailand", "タイ"),
111777: ("TH", "Thailand", "タイ"),
112124: ("ID", "Indonesia", "インドネシア"),
112133: ("TH", "Thailand", "タイ"),
112542: ("TH", "Thailand", "タイ"),
112834: ("DE", "Germany", "ドイツ"),
113104: ("RU", "Russian Federation", "ロシア連邦"),
114349: ("ID", "Indonesia", "インドネシア"),
114592: ("ID", "Indonesia", "インドネシア"),
114787: ("MY", "Malaysia", "マレーシア"),
114864: ("KR", "Korea", "韓国"),
114907: ("MY", "Malaysia", "マレーシア"),
115185: ("CA", "Canada", "カナダ"),
116268: ("PH", "Philippines", "フィリピン"),
117015: ("US", "United States", "アメリカ合衆国"),
117408: ("MY", "Malaysia", "マレーシア"),
117557: ("ID", "Indonesia", "インドネシア"),
117731: ("ID", "Indonesia", "インドネシア"),
118292: ("PH", "Philippines", "フィリピン"),
118306: ("TH", "Thailand", "タイ"),
118306: ("JP", "Japan", "日本"),
118435: ("SG", "Singapore", "シンガポール"),
118551: ("TH", "Thailand", "タイ"),
119167: ("TH", "Thailand", "タイ"),
119683: ("TH", "Thailand", "タイ"),
119795: ("ID", "Indonesia", "インドネシア"),
121031: ("US", "United States", "アメリカ合衆国"),
121108: ("ID", "Indonesia", "インドネシア"),
121455: ("KR", "Korea", "韓国"),
122107: ("KR", "Korea", "韓国"),
122403: ("MY", "Malaysia", "マレーシア"),
122452: ("BR", "Brazil", "ブラジル"),
122456: ("ID", "Indonesia", "インドネシア"),
122543: ("IT", "Italy", "イタリア"),
122599: ("ID", "Indonesia", "インドネシア"),
122616: ("MY", "Malaysia", "マレーシア"),
123243: ("MY", "Malaysia", "マレーシア"),
123615: ("US", "United States", "アメリカ合衆国"),
123753: ("MY", "Malaysia", "マレーシア"),
123898: ("TH", "Thailand", "タイ"),
123991: ("KR", "Korea", "韓国"),
124023: ("ID", "Indonesia", "インドネシア"),
124376: ("TH", "Thailand", "タイ"),
124431: ("MY", "Malaysia", "マレーシア"),
125256: ("TH", "Thailand", "タイ"),
125627: ("TH", "Thailand", "タイ"),
126155: ("ID", "Indonesia", "インドネシア"),
126372: ("TH", "Thailand", "タイ"),
126836: ("ID", "Indonesia", "インドネシア"),
127350: ("RU", "Russian Federation", "ロシア連邦"),
127489: ("ID", "Indonesia", "インドネシア"),
128187: ("TH", "Thailand", "タイ"),
128351: ("US", "United States", "アメリカ合衆国"),
128541: ("IN", "India", "インド"),
128968: ("SG", "Singapore", "シンガポール"),
130018: ("CN", "China", "中華人民共和国"),
130098: ("TH", "Thailand", "タイ"),
130363: ("CN", "China", "中華人民共和国"),
130369: ("KR", "Korea", "韓国"),
130905: ("TH", "Thailand", "タイ"),
131534: ("TH", "Thailand", "タイ"),
132500: ("GB", "United Kingdom", "イギリス"),
132549: ("PY", "Paraguay", "パラグアイ"),
132638: ("CN", "China", "中華人民共和国"),
132659: ("CN", "China", "中華人民共和国"),
132773: ("TR", "Turkey", "トルコ"),
132852: ("ID", "Indonesia", "インドネシア"),
132852: ("SG", "Singapore", "シンガポール"),
132852: ("MY", "Malaysia", "マレーシア"),
132902: ("MX", "Mexico", "メキシコ"),
132929: ("MY", "Malaysia", "マレーシア"),
133119: ("TH", "Thailand", "タイ"),
133232: ("RU", "Russian Federation", "ロシア連邦"),
133239: ("US", "United States", "アメリカ合衆国"),
133845: ("ID", "Indonesia", "インドネシア"),
133845: ("SG", "Singapore", "シンガポール"),
133888: ("NL", "Netherlands", "オランダ"),
134415: ("TH", "Thailand", "タイ"),
135470: ("TH", "Thailand", "タイ"),
135478: ("ID", "Indonesia", "インドネシア"),
135646: ("CN", "China", "中華人民共和国"),
136308: ("US", "United States", "アメリカ合衆国"),
136766: ("KR", "Korea", "韓国"),
137406: ("TH", "Thailand", "タイ"),
137425: ("ID", "Indonesia", "インドネシア"),
137653: ("KR", "Korea", "韓国"),
137853: ("PH", "Philippines", "フィリピン"),
138239: ("TH", "Thailand", "タイ"),
138703: ("MY", "Malaysia", "マレーシア"),
138836: ("TH", "Thailand", "タイ"),
138901: ("BR", "Brazil", "ブラジル"),
139727: ("MY", "Malaysia", "マレーシア"),
140414: ("TH", "Thailand", "タイ"),
140689: ("ID", "Indonesia", "インドネシア"),
140811: ("TH", "Thailand", "タイ"),
141230: ("MY", "Malaysia", "マレーシア"),
141302: ("US", "United States", "アメリカ合衆国"),
141302: ("DE", "Germany", "ドイツ"),
141419: ("US", "United States", "アメリカ合衆国"),
141586: ("KR", "Korea", "韓国"),
142155: ("GR", "Greece", "ギリシャ"),
142155: ("DE", "Germany", "ドイツ"),
143279: ("US", "United States", "アメリカ合衆国"),
143485: ("ID", "Indonesia", "インドネシア"),
143508: ("PH", "Philippines", "フィリピン"),
143993: ("TH", "Thailand", "タイ"),
144601: ("NL", "Netherlands", "オランダ"),
144601: ("BE", "Belgium", "ベルギー"),
144753: ("BR", "Brazil", "ブラジル"),
145930: ("TR", "Turkey", "トルコ"),
146352: ("MY", "Malaysia", "マレーシア"),
146775: ("ID", "Indonesia", "インドネシア"),
147131: ("MY", "Malaysia", "マレーシア"),
147283: ("TH", "Thailand", "タイ"),
147371: ("ID", "Indonesia", "インドネシア"),
147491: ("RU", "Russian Federation", "ロシア連邦"),
147536: ("UA", "Ukraine", "ウクライナ"),
147950: ("PH", "Philippines", "フィリピン"),
147981: ("BR", "Brazil", "ブラジル"),
148755: ("ID", "Indonesia", "インドネシア"),
148841: ("ID", "Indonesia", "インドネシア"),
148854: ("KR", "Korea", "韓国"),
149024: ("TH", "Thailand", "タイ"),
149031: ("MY", "Malaysia", "マレーシア"),
149151: ("PH", "Philippines", "フィリピン"),
150541: ("SG", "Singapore", "シンガポール"),
151365: ("SG", "Singapore", "シンガポール"),
151830: ("US", "United States", "アメリカ合衆国"),
152094: ("FR", "France", "フランス"),
152209: ("ID", "Indonesia", "インドネシア"),
152267: ("KR", "Korea", "韓国"),
152353: ("ID", "Indonesia", "インドネシア"),
152353: ("MY", "Malaysia", "マレーシア"),
152393: ("MY", "Malaysia", "マレーシア"),
152735: ("TH", "Thailand", "タイ"),
152894: ("MY", "Malaysia", "マレーシア"),
153107: ("ID", "Indonesia", "インドネシア"),
153393: ("TH", "Thailand", "タイ"),
153700: ("MY", "Malaysia", "マレーシア"),
154516: ("IT", "Italy", "イタリア"),
154569: ("TH", "Thailand", "タイ"),
154686: ("TH", "Thailand", "タイ"),
154774: ("ID", "Indonesia", "インドネシア"),
155802: ("SE", "Sweden", "スウェーデン"),
156087: ("ID", "Indonesia", "インドネシア"),
156352: ("SG", "Singapore", "シンガポール"),
156650: ("KR", "Korea", "韓国"),
156802: ("ID", "Indonesia", "インドネシア"),
157048: ("MY", "Malaysia", "マレーシア"),
157606: ("TH", "Thailand", "タイ"),
157780: ("ID", "Indonesia", "インドネシア"),
158367: ("US", "United States", "アメリカ合衆国"),
159762: ("TH", "Thailand", "タイ"),
160450: ("TH", "Thailand", "タイ"),
160601: ("MY", "Malaysia", "マレーシア"),
161429: ("TH", "Thailand", "タイ"),
162014: ("KR", "Korea", "韓国"),
162932: ("ID", "Indonesia", "インドネシア"),
163294: ("KR", "Korea", "韓国"),
163294: ("MY", "Malaysia", "マレーシア"),
163692: ("US", "United States", "アメリカ合衆国"),
163692: ("NL", "Netherlands", "オランダ"),
163742: ("ID", "Indonesia", "インドネシア"),
163961: ("US", "United States", "アメリカ合衆国"),
164039: ("TH", "Thailand", "タイ"),
164063: ("TH", "Thailand", "タイ"),
164275: ("ID", "Indonesia", "インドネシア"),
164777: ("ID", "Indonesia", "インドネシア"),
165084: ("ID", "Indonesia", "インドネシア"),
165860: ("TH", "Thailand", "タイ"),
165908: ("TH", "Thailand", "タイ"),
166115: ("MY", "Malaysia", "マレーシア"),
166542: ("TH", "Thailand", "タイ"),
166585: ("ID", "Indonesia", "インドネシア"),
166797: ("RU", "Russian Federation", "ロシア連邦"),
167307: ("ID", "Indonesia", "インドネシア"),
167823: ("US", "United States", "アメリカ合衆国"),
168377: ("ID", "Indonesia", "インドネシア"),
168518: ("MY", "Malaysia", "マレーシア"),
169079: ("MY", "Malaysia", "マレーシア"),
169083: ("KR", "Korea", "韓国"),
169091: ("MY", "Malaysia", "マレーシア"),
169716: ("TH", "Thailand", "タイ"),
170510: ("AU", "Australia", "オーストラリア"),
171577: ("SG", "Singapore", "シンガポール"),
171940: ("ID", "Indonesia", "インドネシア"),
172148: ("TH", "Thailand", "タイ"),
172222: ("ID", "Indonesia", "インドネシア"),
172891: ("ID", "Indonesia", "インドネシア"),
173137: ("MY", "Malaysia", "マレーシア"),
174407: ("SG", "Singapore", "シンガポール"),
174662: ("TH", "Thailand", "タイ"),
174894: ("US", "United States", "アメリカ合衆国"),
175196: ("ID", "Indonesia", "インドネシア"),
175928: ("MY", "Malaysia", "マレーシア"),
179331: ("US", "United States", "アメリカ合衆国"),
179453: ("TH", "Thailand", "タイ"),
180811: ("BR", "Brazil", "ブラジル"),
180929: ("TH", "Thailand", "タイ"),
181027: ("BR", "Brazil", "ブラジル"),
181256: ("KR", "Korea", "韓国"),
181629: ("TH", "Thailand", "タイ"),
181814: ("US", "United States", "アメリカ合衆国"),
181844: ("GB", "United Kingdom", "イギリス"),
182324: ("TR", "Turkey", "トルコ"),
183289: ("TH", "Thailand", "タイ"),
183557: ("PH", "Philippines", "フィリピン"),
184455: ("TH", "Thailand", "タイ"),
184651: ("MY", "Malaysia", "マレーシア"),
184678: ("US", "United States", "アメリカ合衆国"),
185855: ("TH", "Thailand", "タイ"),
185880: ("MY", "Malaysia", "マレーシア"),
186987: ("FR", "France", "フランス"),
187032: ("MY", "Malaysia", "マレーシア"),
187777: ("ID", "Indonesia", "インドネシア"),
188046: ("ID", "Indonesia", "インドネシア"),
188274: ("MY", "Malaysia", "マレーシア"),
188281: ("TH", "Thailand", "タイ"),
188396: ("TH", "Thailand", "タイ"),
189455: ("KR", "Korea", "韓国"),
190761: ("TH", "Thailand", "タイ"),
191437: ("CL", "Chile", "チリ"),
191778: ("ID", "Indonesia", "インドネシア"),
192447: ("KR", "Korea", "韓国"),
193111: ("MY", "Malaysia", "マレーシア"),
193229: ("US", "United States", "アメリカ合衆国"),
193353: ("MY", "Malaysia", "マレーシア"),
193581: ("GB", "United Kingdom", "イギリス"),
194052: ("CN", "China", "中華人民共和国"),
194136: ("TR", "Turkey", "トルコ"),
194393: ("TH", "Thailand", "タイ"),
194879: ("MY", "Malaysia", "マレーシア"),
195416: ("TH", "Thailand", "タイ"),
195780: ("BE", "Belgium", "ベルギー"),
197002: ("US", "United States", "アメリカ合衆国"),
197243: ("ID", "Indonesia", "インドネシア"),
198279: ("MY", "Malaysia", "マレーシア"),
198535: ("ID", "Indonesia", "インドネシア"),
198752: ("TH", "Thailand", "タイ"),
199126: ("KR", "Korea", "韓国"),
199564: ("TH", "Thailand", "タイ"),
199790: ("MX", "Mexico", "メキシコ"),
200005: ("PY", "Paraguay", "パラグアイ"),
200451: ("KW", "Kuwait", "クウェート"),
201397: ("MY", "Malaysia", "マレーシア"),
201618: ("CN", "China", "中華人民共和国"),
201786: ("KR", "Korea", "韓国"),
201902: ("US", "United States", "アメリカ合衆国"),
202296: ("KR", "Korea", "韓国"),
202607: ("DO", "Dominican Republic", "ドミニカ共和国"),
203001: ("TH", "Thailand", "タイ"),
203227: ("TH", "Thailand", "タイ"),
203298: ("TH", "Thailand", "タイ"),
204068: ("TH", "Thailand", "タイ"),
204376: ("TH", "Thailand", "タイ"),
204376: ("JP", "Japan", "日本"),
205345: ("ID", "Indonesia", "インドネシア"),
205385: ("TH", "Thailand", "タイ"),
205803: ("RU", "Russian Federation", "ロシア連邦"),
206615: ("ID", "Indonesia", "インドネシア"),
206755: ("IT", "Italy", "イタリア"),
206943: ("NL", "Netherlands", "オランダ"),
206976: ("SG", "Singapore", "シンガポール"),
206976: ("MY", "Malaysia", "マレーシア"),
207337: ("KR", "Korea", "韓国"),
207380: ("TH", "Thailand", "タイ"),
207933: ("TH", "Thailand", "タイ"),
208037: ("SG", "Singapore", "シンガポール"),
209019: ("TH", "Thailand", "タイ"),
209305: ("TH", "Thailand", "タイ"),
209747: ("NL", "Netherlands", "オランダ"),
209775: ("IT", "Italy", "イタリア"),
209874: ("TH", "Thailand", "タイ"),
210099: ("ID", "Indonesia", "インドネシア"),
210978: ("PH", "Philippines", "フィリピン"),
212227: ("US", "United States", "アメリカ合衆国"),
212758: ("ID", "Indonesia", "インドネシア"),
213001: ("TH", "Thailand", "タイ"),
213512: ("ID", "Indonesia", "インドネシア"),
215541: ("US", "United States", "アメリカ合衆国"),
216078: ("TR", "Turkey", "トルコ"),
216108: ("TH", "Thailand", "タイ"),
216458: ("TH", "Thailand", "タイ"),
216658: ("US", "United States", "アメリカ合衆国"),
217107: ("CA", "Canada", "カナダ"),
217910: ("TH", "Thailand", "タイ"),
218421: ("MY", "Malaysia", "マレーシア"),
218744: ("SG", "Singapore", "シンガポール"),
219663: ("MY", "Malaysia", "マレーシア"),
219804: ("TH", "Thailand", "タイ"),
220111: ("MY", "Malaysia", "マレーシア"),
220992: ("KR", "Korea", "韓国"),
221577: ("TH", "Thailand", "タイ"),
222112: ("KR", "Korea", "韓国"),
222401: ("MY", "Malaysia", "マレーシア"),
222638: ("PH", "Philippines", "フィリピン"),
224441: ("SG", "Singapore", "シンガポール"),
224441: ("MY", "Malaysia", "マレーシア"),
224554: ("ID", "Indonesia", "インドネシア"),
225326: ("TH", "Thailand", "タイ"),
225745: ("PH", "Philippines", "フィリピン"),
226178: ("CN", "China", "中華人民共和国"),
228287: ("ID", "Indonesia", "インドネシア"),
229783: ("TH", "Thailand", "タイ"),
230429: ("IT", "Italy", "イタリア"),
230985: ("KR", "Korea", "韓国"),
231034: ("MY", "Malaysia", "マレーシア"),
231602: ("SA", "Saudi Arabia", "サウジアラビア"),
232544: ("TH", "Thailand", "タイ"),
232551: ("ID", "Indonesia", "インドネシア"),
234153: ("AU", "Australia", "オーストラリア"),
234484: ("KR", "Korea", "韓国"),
235078: ("SG", "Singapore", "シンガポール"),
235546: ("TH", "Thailand", "タイ"),
236967: ("GB", "United Kingdom", "イギリス"),
237582: ("TH", "Thailand", "タイ"),
237662: ("KR", "Korea", "韓国"),
238122: ("ID", "Indonesia", "インドネシア"),
238326: ("KR", "Korea", "韓国"),
240750: ("ID", "Indonesia", "インドネシア"),
240865: ("TH", "Thailand", "タイ"),
241264: ("PH", "Philippines", "フィリピン"),
241650: ("KR", "Korea", "韓国"),
241719: ("TH", "Thailand", "タイ"),
241817: ("MY", "Malaysia", "マレーシア"),
242278: ("ID", "Indonesia", "インドネシア"),
242361: ("LK", "Sri Lanka", "スリランカ"),
243628: ("TH", "Thailand", "タイ"),
244599: ("SG", "Singapore", "シンガポール"),
244599: ("DE", "Germany", "ドイツ"),
244851: ("ID", "Indonesia", "インドネシア"),
246485: ("MY", "Malaysia", "マレーシア"),
246737: ("TR", "Turkey", "トルコ"),
247464: ("TH", "Thailand", "タイ"),
248754: ("CN", "China", "中華人民共和国"),
249891: ("US", "United States", "アメリカ合衆国"),
250146: ("US", "United States", "アメリカ合衆国"),
250768: ("ID", "Indonesia", "インドネシア"),
251103: ("AE", "United Arab Emirates", "アラブ首長国連邦"),
251784: ("AU", "Australia", "オーストラリア"),
251814: ("ID", "Indonesia", "インドネシア"),
253036: ("ID", "Indonesia", "インドネシア"),
254403: ("ID", "Indonesia", "インドネシア"),
254715: ("SG", "Singapore", "シンガポール"),
254715: ("MY", "Malaysia", "マレーシア"),
256374: ("MY", "Malaysia", "マレーシア"),
259280: ("ID", "Indonesia", "インドネシア"),
259304: ("BR", "Brazil", "ブラジル"),
259326: ("TH", "Thailand", "タイ"),
259351: ("TH", "Thailand", "タイ"),
259785: ("GB", "United Kingdom", "イギリス"),
259804: ("MY", "Malaysia", "マレーシア"),
259925: ("TH", "Thailand", "タイ"),
259971: ("PH", "Philippines", "フィリピン"),
260285: ("TH", "Thailand", "タイ"),
261060: ("ID", "Indonesia", "インドネシア"),
261072: ("CN", "China", "中華人民共和国"),
261296: ("TR", "Turkey", "トルコ"),
262882: ("ID", "Indonesia", "インドネシア"),
263182: ("MY", "Malaysia", "マレーシア"),
263876: ("PH", "Philippines", "フィリピン"),
264241: ("MY", "Malaysia", "マレーシア"),
264332: ("MY", "Malaysia", "マレーシア"),
264932: ("US", "United States", "アメリカ合衆国"),
265291: ("CL", "Chile", "チリ"),
266460: ("TR", "Turkey", "トルコ")
}
# print(userid_country[263876][2])
|
# wordCalculator.py
# A program to calculate the number of words in a sentence
# by Tung Nguyen
def main():
# declare program function:
print("This program calculates the number of words in a sentence.")
print()
# prompt user to input the sentence:
sentence = input("Enter a phrase: ")
# split the sentence into a list that contains words
listWord = sentence.split()
# count the number of words inside the list
countWord = len(listWord)
# print out the number of words as the result
print()
print("Number of words:", countWord)
main() |
"""Result - Data structure for a result."""
# Is prediction before game is played, then actual once game ahs been played
# Return the outcome Briers score, home/away goals scored, Predictions if available, and actual
# result if game has been played
class Result:
"""Result - Data structure for a result."""
def __init__(self, status='SCHEDULED', home_team_goals_scored=0, away_team_goals_scored=0):
"""
Construct a Result object.
Parameters
----------
status : str, optional
The status of the result of the result. SCHEDULED or FINISHED. Defaults to SCHEDULED
home_team_goals_scored : int, optional
The number of goals scored by the home team. Defaults to 0.
away_team_goals_scored : int, optional
The number of goals scored by the away team. Defaults to 0.
"""
self._status = status # TODO: Can we use an enum?
self._home_team_goals_scored = home_team_goals_scored
self._away_team_goals_scored = away_team_goals_scored
def __eq__(self, other):
"""
Override the __eq__ method for the Result class to allow for object value comparison.
Parameters
----------
other : footy.domain.Result.Result
The result object to compare to.
Returns
-------
bool
True/False if the values in the two objects are equal.
"""
return (
self.__class__ == other.__class__ and
self._status == other._status and
self._home_team_goals_scored == other._home_team_goals_scored and
self._away_team_goals_scored == other._away_team_goals_scored
)
@property
def status(self):
"""
Getter method for property status.
Returns
-------
str
The value of property status.
"""
return self._status
@status.setter
def status(self, status):
"""
Getter method for property status.
Parameters
----------
status : str
The value you wish to set the status property to.
"""
self._status = status
@property
def home_team_goals_scored(self):
"""
Getter method for property home_team_goals_scored.
Returns
-------
int
The value of property home_team_goals_scored.
"""
return self._home_team_goals_scored
@home_team_goals_scored.setter
def home_team_goals_scored(self, home_team_goals_scored):
"""
Getter method for property home_team_goals_scored.
Parameters
----------
home_team_goals_scored : int
The value you wish to set the home_team_goals_scored property to.
"""
self._home_team_goals_scored = home_team_goals_scored
@property
def away_team_goals_scored(self):
"""
Getter method for property away_team_goals_scored.
Returns
-------
int
The value of property away_team_goals_scored.
"""
return self._away_team_goals_scored
@away_team_goals_scored.setter
def away_team_goals_scored(self, away_team_goals_scored):
"""
Getter method for property away_team_goals_scored.
Parameters
----------
away_team_goals_scored : int
The value you wish to set the away_team_goals_scored property to.
"""
self._away_team_goals_scored = away_team_goals_scored
|
cargo = input().lower().strip()
tempo = int(input())
salarioAtual = float(input())
if salarioAtual < 1039:
print('Salário inválido!')
else:
if cargo == 'gerente':
if tempo <= 3:
reajuste = salarioAtual * 0.12
elif tempo <= 6:
reajuste = salarioAtual * 0.13
else:
reajuste = salarioAtual * 0.15
elif cargo == 'engenheiro':
if tempo <= 3:
reajuste = salarioAtual * 0.07
elif tempo <= 6:
reajuste = salarioAtual * 0.11
else:
reajuste = salarioAtual * 0.14
else:
reajuste = salarioAtual * 0.05
#Trecho chamado apenas se salarioAtual >= 1039
salarioReajustado = salarioAtual + reajuste
print(f'{reajuste:.2f}')
print(f'{salarioReajustado:.2f}')
|
"""
Author: Ao Wang
Date: 08/12/19
Description: Caesar cipher encryption and decryption, also a reverse encryption
"""
# The function reverses the string parameter
def reverse(plain_text):
cipher_text = ""
for letter in range(len(plain_text)):
# starts at the end of the string, -1 and moves its way to the left
cipher_text += plain_text[-1-letter]
return cipher_text
# The function encrypts the text with a certain key
def caesar_cipher(plain_text, key):
cipher_text = ""
# loops through each letter of the text
for letter in plain_text:
# checks if letter is uppercase or lowercase and in the alphabet
# if not add it as any other character
if letter.isupper() and (ord(letter) >= ord("A") and ord(letter) <= ord("Z")):
cipher_text += chr((ord(letter) + key - ord("A")) % 26 + ord("A"))
elif letter.islower and (ord(letter) >= ord("a") and ord(letter) <= ord("z")):
cipher_text += chr((ord(letter) + key - ord("a")) % 26 + ord("a"))
else:
cipher_text += letter
return cipher_text
# The function returns a dictionary that counts the frequency of the alphabet
def letter_count(text):
letter_dict = {}
text = text.upper()
for letter in text:
# makes sure that spaces are not counted
if not " " in letter:
if not letter in letter_dict.keys():
letter_dict[letter] = 1
else:
letter_dict[letter] += 1
return letter_dict
# The function decrypts the cipher by finding the most frequent letter
def decrypt(cipher_text):
alphabet = []
# storing alphabet in list
for letter in range(26):
alphabet.append(chr(ord("A")+letter))
letter_dict = letter_count(cipher_text)
high = 0
high_key = ""
# get the most frequent letter
for keys in letter_dict.keys():
if letter_dict.get(keys) > high:
high = letter_dict.get(keys)
high_key = keys
# gets the key by finding where the most frequent letter is in the alphabet and subtract it
# where E is in the alphabet (the most frequent letter)
break_key = alphabet.index(high_key) - alphabet.index("E")
# if key is negative, add 26
if break_key <= 0:
break_key = break_key + 26
print("The key is: " + str(break_key))
# 26 - by the key reverses the effect of the cipher
# 26 - key + key = 26 nullifies the effect of the cipher
return caesar_cipher(cipher_text, 26 - break_key)
# The function prints out all the possibilities of the cipher by testing keys from 0-25
def brute_force(cipher_text):
for key in range(26):
print(caesar_cipher(cipher_text, key))
print("Welcome to the Caesar Cipher/Breaker!")
choice = input("Would you like to encrypt (e) or decrypt (d): ")
print()
if(choice == "e"):
text = input("What would you like to encrypt?: ")
key = int(input("What is the key?: "))
print()
print("Plaintext: " + text)
print("Ciphertext: " + caesar_cipher(text, key))
elif(choice == "d"):
text = input("What would you like to decrypt?: ")
print("Ciphertext: " + text)
print("Plaintext: " + decrypt(text))
else:
print("Oops there seems to be an error")
print()
# testing
with open("caesar.txt","r") as file:
f = file.read()
brute_force("Gdkkn sgdqd H gnod xnt zqd njzx")
print()
print(caesar_cipher("Hello there I hope you are okay", -1))
print()
print(decrypt("Gdkkn sgdqd H gnod xnt zqd njzx"))
print()
print(decrypt(f))
|
class LexHelper:
offset = 0
def get_max_linespan(self, p):
defSpan = [1e60, -1]
mSpan = [1e60, -1]
for sp in range(0, len(p)):
csp = p.linespan(sp)
if csp[0] == 0 and csp[1] == 0:
if hasattr(p[sp], "linespan"):
csp = p[sp].linespan
else:
continue
if csp is None or len(csp) != 2:
continue
if csp[0] == 0 and csp[1] == 0:
continue
if csp[0] < mSpan[0]:
mSpan[0] = csp[0]
if csp[1] > mSpan[1]:
mSpan[1] = csp[1]
if defSpan == mSpan:
return (0, 0)
return tuple([mSpan[0] - self.offset, mSpan[1] - self.offset])
def get_max_lexspan(self, p):
defSpan = [1e60, -1]
mSpan = [1e60, -1]
for sp in range(0, len(p)):
csp = p.lexspan(sp)
if csp[0] == 0 and csp[1] == 0:
if hasattr(p[sp], "lexspan"):
csp = p[sp].lexspan
else:
continue
if csp is None or len(csp) != 2:
continue
if csp[0] == 0 and csp[1] == 0:
continue
if csp[0] < mSpan[0]:
mSpan[0] = csp[0]
if csp[1] > mSpan[1]:
mSpan[1] = csp[1]
if defSpan == mSpan:
return (0, 0)
return tuple([mSpan[0] - self.offset, mSpan[1] - self.offset])
def set_parse_object(self, dst, p):
dst.setLexData(
linespan=self.get_max_linespan(p),
lexspan=self.get_max_lexspan(p))
dst.setLexObj(p)
class Base(object):
parent = None
lexspan = None
linespan = None
def v(self, obj, visitor):
if obj is None:
return
elif hasattr(obj, "accept"):
obj.accept(visitor)
elif isinstance(obj, list):
for s in obj:
self.v(s, visitor)
pass
pass
@staticmethod
def p(obj, parent):
if isinstance(obj, list):
for s in obj:
Base.p(s, parent)
if hasattr(obj, "parent"):
obj.parent = parent
# Lexical unit - contains lexspan and linespan for later analysis.
class LU(Base):
def __init__(self, p, idx):
self.p = p
self.idx = idx
self.pval = p[idx]
self.lexspan = p.lexspan(idx)
self.linespan = p.linespan(idx)
# If string is in the value (raw value) and start and stop lexspan is the same, add real span
# obtained by string length.
if isinstance(self.pval, str) \
and self.lexspan is not None \
and self.lexspan[0] == self.lexspan[1] \
and self.lexspan[0] != 0:
self.lexspan = tuple(
[self.lexspan[0], self.lexspan[0] + len(self.pval)])
super(LU, self).__init__()
@staticmethod
def i(p, idx):
if isinstance(p[idx], LU):
return p[idx]
if isinstance(p[idx], str):
return LU(p, idx)
return p[idx]
def describe(self):
return "LU(%s,%s)" % (self.pval, self.lexspan)
def __str__(self):
return self.pval
def __repr__(self):
return self.describe()
def accept(self, visitor):
self.v(self.pval, visitor)
def __iter__(self):
for x in self.pval:
yield x
# Base node
class SourceElement(Base):
'''
A SourceElement is the base class for all elements that occur in a Protocol Buffers
file parsed by plyproto.
'''
def __init__(self, linespan=[], lexspan=[], p=None):
super(SourceElement, self).__init__()
self._fields = [] # ['linespan', 'lexspan']
self.linespan = linespan
self.lexspan = lexspan
self.p = p
def __repr__(self):
equals = ("{0}={1!r}".format(k, getattr(self, k))
for k in self._fields)
args = ", ".join(equals)
return "{0}({1})".format(self.__class__.__name__, args)
def __eq__(self, other):
try:
return self.__dict__ == other.__dict__
except AttributeError:
return False
def __ne__(self, other):
return not self == other
def setLexData(self, linespan, lexspan):
self.linespan = linespan
self.lexspan = lexspan
def setLexObj(self, p):
self.p = p
def accept(self, visitor):
pass
class Visitor(object):
def __init__(self, verbose=False):
self.verbose = verbose
def __getattr__(self, name):
if not name.startswith('visit_'):
raise AttributeError(
'name must start with visit_ but was {}'.format(name))
def f(element):
if self.verbose:
msg = 'unimplemented call to {}; ignoring ({})'
print(msg.format(name, element))
return True
return f
# visitor.visit_PackageStatement(self)
# visitor.visit_ImportStatement(self)
# visitor.visit_OptionStatement(self)
# visitor.visit_FieldDirective(self)
# visitor.visit_FieldType(self)
# visitor.visit_FieldDefinition(self)
# visitor.visit_EnumFieldDefinition(self)
# visitor.visit_EnumDefinition(self)
# visitor.visit_MessageDefinition(self)
# visitor.visit_MessageExtension(self)
# visitor.visit_MethodDefinition(self)
# visitor.visit_ServiceDefinition(self)
# visitor.visit_ExtensionsDirective(self)
# visitor.visit_Literal(self)
# visitor.visit_Name(self)
# visitor.visit_Proto(self)
# visitor.visit_LU(self)
|
settings = {}
settings['version'] = "0.1"
settings['port'] = 36000
settings['product'] = "MOPIDY-PLEX"
settings['debug_registration'] = False
settings['debug_httpd'] = False
settings['host'] = ""
settings['token'] = None
|
# = atribuição, == comparação
car='panamera'
print(car=='panamera')
car='audi'
print(car=='panamera') |
def is_leap(year):
if year >= 1900 and year <= pow(10,5):
leap = False
if year%4 == 0:
if year%100 == 0:
if year%400 == 0:
leap = True
else:
leap = False
else:
leap = True
return leap
else:
return 'Enter valid year!'
if __name__ == '__main__':
year = int(input())
print(is_leap(year)) |
# Copyright 2017 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Rule for bundling Docker images into a tarball."""
load(":label.bzl", _string_to_label="string_to_label")
load(":layers.bzl",
_assemble_image="assemble",
_get_layers="get_from_target",
_incr_load="incremental_load",
_layer_tools="tools")
load(":list.bzl", "reverse")
def _docker_bundle_impl(ctx):
"""Implementation for the docker_bundle rule."""
# Compute the set of layers from the image_targes.
image_target_dict = _string_to_label(
ctx.attr.image_targets, ctx.attr.image_target_strings)
seen_names = []
layers = []
for image in ctx.attr.image_targets:
# TODO(mattmoor): Add support for naked tarballs.
for layer in _get_layers(ctx, image):
if layer["name"].path in seen_names:
continue
seen_names.append(layer["name"].path)
layers.append(layer)
images = dict()
for unresolved_tag in ctx.attr.images:
# Allow users to put make variables into the tag name.
tag = ctx.expand_make_variables("images", unresolved_tag, {})
target = ctx.attr.images[unresolved_tag]
target = image_target_dict[target]
images[tag] = _get_layers(ctx, target)[0]
_incr_load(ctx, layers, images, ctx.outputs.executable)
_assemble_image(ctx, reverse(layers), {
# Create a new dictionary with the same keyspace that
# points to the name of the layer.
k: images[k]["name"]
for k in images
}, ctx.outputs.out)
runfiles = ctx.runfiles(
files = ([l["name"] for l in layers] +
[l["id"] for l in layers] +
[l["layer"] for l in layers]))
return struct(runfiles = runfiles,
files = depset())
docker_bundle_ = rule(
implementation = _docker_bundle_impl,
attrs = {
"images": attr.string_dict(),
# Implicit dependencies.
"image_targets": attr.label_list(allow_files=True),
"image_target_strings": attr.string_list(),
} + _layer_tools,
outputs = {
"out": "%{name}.tar",
},
executable = True)
# Produces a new docker image tarball compatible with 'docker load', which
# contains the N listed 'images', each aliased with their key.
#
# Example:
# docker_bundle(
# name = "foo",
# images = {
# "ubuntu:latest": ":blah",
# "foo.io/bar:canary": "//baz:asdf",
# }
# )
def docker_bundle(**kwargs):
"""Package several docker images into a single tarball.
Args:
**kwargs: See above.
"""
for reserved in ["image_targets", "image_target_strings"]:
if reserved in kwargs:
fail("reserved for internal use by docker_bundle macro", attr=reserved)
if "images" in kwargs:
kwargs["image_targets"] = kwargs["images"].values()
kwargs["image_target_strings"] = kwargs["images"].values()
docker_bundle_(**kwargs)
|
def test_load_case(case_obj, adapter):
## GIVEN a database with no cases
assert adapter.case_collection.find_one() is None
## WHEN loading a case
adapter._add_case(case_obj)
## THEN assert that the case have been loaded with correct info
assert adapter.case_collection.find_one()
def test_load_case_rank_model_version(case_obj, adapter):
## GIVEN a database with no cases
assert adapter.case_collection.find_one() is None
## WHEN loading a case
adapter._add_case(case_obj)
## THEN assert that the case have been loaded with rank_model
loaded_case = adapter.case_collection.find_one({"_id": case_obj["_id"]})
assert loaded_case["rank_model_version"] == case_obj["rank_model_version"]
assert loaded_case["sv_rank_model_version"] == case_obj["sv_rank_model_version"]
def test_load_case_limsid(case_obj, adapter):
"""Test loading a case with lims_id"""
## GIVEN a database with no cases
assert adapter.case_collection.find_one() is None
## WHEN loading a case
adapter._add_case(case_obj)
## THEN assert that the case have been loaded with lims id
loaded_case = adapter.case_collection.find_one({"_id": case_obj["_id"]})
assert loaded_case["lims_id"] == case_obj["lims_id"]
|
'''
Leia um valor inteiro entre 1 e 12, inclusive. Correspondente a este valor, deve ser apresentado como resposta o mês
do ano por extenso, em inglês, com a primeira letra maiúscula.
Entrada = A entrada contém um único valor inteiro.
Saída = Imprima por extenso o nome do mês correspondente ao número existente na entrada, com a primeira letra em maiúscula.
Exemplo de Entrada Exemplo de Saídanu
4 April
'''
meses = {1:'January', 2: 'February', 3: 'March', 4: 'April', 5: 'May', 6: 'June',
7: 'July', 8: 'August', 9: 'September', 10: 'October', 11: 'November', 12: 'December'}
mes = int(input())
if mes in meses.keys():
print(meses[mes]) |
def threshold_distance_mask(r, h):
return r < h
|
load("@bazel_tools//tools/build_defs/repo:jvm.bzl", "jvm_maven_import_external")
_default_server_urls = ["https://repo.maven.apache.org/maven2/",
"https://mvnrepository.com/artifact",
"https://maven-central.storage.googleapis.com",
"http://gitblit.github.io/gitblit-maven",
"https://repository.mulesoft.org/nexus/content/repositories/public/",]
def safe_exodus_maven_import_external(name, artifact, **kwargs):
if native.existing_rule(name) == None:
exodus_maven_import_external(
name = name,
artifact = artifact,
**kwargs
)
def exodus_maven_import_external(name, artifact, **kwargs):
fetch_sources = kwargs.get("srcjar_sha256") != None
exodus_maven_import_external_sources(name, artifact, fetch_sources, **kwargs)
def exodus_snapshot_maven_import_external(name, artifact, **kwargs):
exodus_maven_import_external_sources(name, artifact, True, **kwargs)
def exodus_maven_import_external_sources(name, artifact, fetch_sources, **kwargs):
jvm_maven_import_external(
name = name,
artifact = artifact,
licenses = ["notice"], # Apache 2.0
fetch_sources = fetch_sources,
server_urls = _default_server_urls,
**kwargs
) |
#!/usr/bin/env python
"""
Definitions of classes to work with molecular data.
The mol_info_table class is used to store and manipulated
information about a molecule.
The mol_xyz_table class is used to store and manipulated
the xyz coodinate of a molecule.
The functions defined here are basically wrappers to
MySQL execution lines.
Each function returns a MySQL command that should be
executed by the calling routine.
"""
__author__="Pablo Baudin"
__email__="[email protected]"
mol_info = "mol_info"
mol_xyz = "mol_xyz"
sql_idd = 'int unsigned NOT NULL auto_increment'
sql_int = 'int NOT NULL'
sql_str = 'varchar(4) NOT NULL'
sql_flt = 'double(40,20) NOT NULL'
sql_txt = 'text NOT NULL'
# functions in common between the two types of tables
# ---------------------------------------------------
def mysql_add_row(table):
headers = table.headers[1][0]
code = '%s'
for (lab, typ) in table.headers[2:]:
headers += ', {0}'.format(lab)
code += ', %s'
return "INSERT INTO {0.name} ({1}) VALUES ({2}) ".format(table, headers, code)
def mysql_create_table(table):
line = "CREATE TABLE {0.name} ( ".format(table)
for (lab, typ) in table.headers:
line += "{0} {1}, ".format(lab, typ)
# add primary key:
line += 'PRIMARY KEY (id) ) '
return line
# ---------------------------------------------------
class mol_info_table(object):
""" handle the main database table mol_info"""
def __init__(self):
self.name = mol_info
self.headers = [
('id', sql_idd),
('name', sql_txt),
('chem_name', sql_txt),
('note', sql_txt),
('charge', sql_int),
('natoms', sql_int),
('natom_types', sql_int)
]
self.ncol = len(self.headers)
def create_table(self):
return mysql_create_table(self)
def find_duplicates(self, chem_name):
return 'SELECT id, name FROM {0.name} WHERE chem_name = "{1}"'.format(self, chem_name)
def get_col(self, headers):
s = ', '.join(headers)
return "SELECT {0} FROM {1.name}".format(s, self)
def get_row(self, idd):
return "SELECT * FROM {0.name} WHERE id = {1}".format(self, idd)
def add_row(self):
return mysql_add_row(self)
def delete_row(self, idd):
return "DELETE FROM {0.name} WHERE id={1}".format(self, idd)
def update(self, col, new, idd):
return 'UPDATE {0} SET {1}="{2}" WHERE id={3}'.format(self.name, col, new, idd)
class mol_xyz_table(object):
""" handle the coordinate database table mol_xyz"""
def __init__(self, idd):
self.idd = idd
self.name = "_".join( [mol_xyz, str(self.idd)] )
self.headers = [
('id', sql_idd),
('labels', sql_txt),
('charge', sql_int),
('xvals', sql_flt),
('yvals', sql_flt),
('zvals', sql_flt),
]
self.ncol = len(self.headers)
def create_table(self):
return mysql_create_table(self)
def get_table(self):
return "SELECT * FROM {0.name} ORDER BY charge DESC".format(self)
def delete_table(self):
return "DROP TABLE IF EXISTS {0.name}".format(self)
def add_row(self):
return mysql_add_row(self)
|
class OptionsStub(object):
def __init__(self):
self.debug = True
self.guess_summary = False
self.guess_description = False
self.tracking = None
self.username = None
self.password = None
self.repository_url = None
self.disable_proxy = False
self.summary = None
self.description = None
|
# Copyright 2019 AUI, Inc. Washington DC, USA
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
########################
def ddijoin(xds1, xds2):
"""
.. todo::
This function is not yet implemented
Concatenate together two Visibility Datasets of compatible shape
Parameters
----------
xds1 : xarray.core.dataset.Dataset
first Visibility Dataset to join
xds2 : xarray.core.dataset.Dataset
second Visibility Dataset to join
Returns
-------
xarray.core.dataset.Dataset
New Visibility Dataset with combined contents
"""
return {}
|
# Attempt I: 贪心的思路,方法错。维护一个静态dict不能保证每次remove后余下的序列仍保持有序。
# class Solution:
# def findMinArrowShots(self, points):
# """
# :type points: List[List[int]]
# :rtype: int
# """
# left = 10000
# right = -10000
# for i in range(len(points)):
# left = min(left, points[i][0])
# right = max(right, points[i][1])
# poi_dic = dict()
# poi_dic_len = dict()
# count = 0
# for j in range(len(points)):
# for x in range(points[j][0], points[j][1]+1):
# if x in poi_dic:
# poi_dic[x].append(points[j])
# else:
# poi_dic[x] = [points[j]]
# for key in poi_dic:
# poi_dic_len[key] = len(poi_dic[key])
# arror = self.sort_by_value(poi_dic_len)
# print(arror)
# for y in arror:
# if not points:
# return count
# intersect = False
# for n in points:
# if n in poi_dic[y]:
# intersect = True
# break
# if intersect:
# count += 1
# for m in poi_dic[y]:
# try:
# points.remove(m)
# except:
# pass
# def sort_by_value(self, d):
# items=d.items()
# backitems=[[v[1], v[0]] for v in items]
# backitems = sorted(backitems, reverse=True)
# return [backitems[i][1] for i in range(len(backitems))]
# Attempt II:AC
class Solution:
def findMinArrowShots(self, points):
"""
:type points: List[List[int]]
:rtype: int
"""
if not points:
return 0
points = sorted(points, key=lambda Interval: Interval[0])
count = 1
ref = points[0]
for i in range(1, len(points)):
if points[i][0] > ref[1]:
count += 1
ref = points[i]
else:
if points[i][1] < ref[1]:
ref = [points[i][0], points[i][1]]
return count
|
"""__init__.py - A command-line utility that checks for best practices in Jinja2.
"""
NAME = 'j2lint'
VERSION = '0.1'
DESCRIPTION = __doc__
__author__ = "Arista Networks"
__license__ = "MIT"
__version__ = VERSION
|
def binary_search(S, left, right, key):
# Find smallest element that's >= key
while left <= right:
# find midpoint
mid = left + (right - left) // 2
# if element found move lower.
if S[mid] >= key:
right = mid - 1
else:
left = mid + 1
# smallest element is left index.
return left
def len_of_lis(A):
"""
Computing the Longest Increasing Subsequence
O(nlogn) Time
O(n) Space
"""
# error handling for empty list.
if len(A) < 1:
return 0
# create subsequence list.
subseq = [0] * len(A)
# set to initial sequence element.
subseq[0] = A[0]
# create sequence index for adding elements.
seqIdx = 0
# iterate through the input sequence
for i in range(1, len(A)):
# Append to subsequence - basically new LIS.
if A[i] > subseq[seqIdx]:
seqIdx += 1
subseq[seqIdx] = A[i]
# Replace start of sequence
elif A[i] < subseq[0]:
subseq[0] = A[i]
else:
# binary search through the subsequence
# to find and replace the smallest element
# with A[i]
idxToReplace = binary_search(subseq, 0, seqIdx, A[i])
subseq[idxToReplace] = A[i]
# Longest subsequence is the length of subseq
return seqIdx + 1
"""
1
0 8 4 12 2 10 6 14 1 9 5 13 3 11 7 15
Output : 6
"""
#T = int(input("Number Test Cases = "))
#for idx in range(T):
A = [int(i) for i in input("Sequence ").split()]
print("Output: ", len_of_lis(A))
|
class Solution:
def searchInsert(self, nums, target: int) -> int:
"""
二分法查找,若目标不存在,则返回它将会被按顺序插入的位置。
"""
low = 0
high = len(nums) - 1
while low <= high:
mid = int((low + high) / 2)
if target == nums[mid]:
return mid
elif target < nums[mid]:
high = mid - 1
else:
low = mid + 1
return low
if __name__ == '__main__':
solution = Solution()
nums = [1, 3, 5, 6]
target = 2
print(solution.searchInsert(nums, target))
|
service_dict = {
'NetworkService':{
'getTargetsWithRelationshipTypeForResourceById':{},
'getTargetsByRelationshipForSourceId':{},
'getSourcesWithThisTargetByRelationshipCount':{},
'deleteResource':{},
'getSourceURIWithThisTargetByRelatiobnshipForResourceId':{},
'getAllAttachmentOnlyResourceIDs':{},
'getNamesAndAliases':{},
'containsDirectMemberByNameOrAlias':{},
'getTargetsWithRelationshipTypeForResource':{},
'getReverseRelationshipsOfThisAndParents':{},
'getPersonalResourceRoots':{},
'getESMVersion':{},
'getResourceByName':{},
'hasXPermission':{},
'findAllIds':{},
'addRelationship':{},
'getReverseRelationshipsOfParents':{},
'getResourcesReferencePages':{},
'containsDirectMemberByName':{},
'getTargetsAsURIByRelationshipForSourceId':{},
'hasWritePermission':{},
'deleteResources':{},
'resolveRelationship':{},
'getAllPathsToRoot':{},
'getResourcesWithVisibilityToUsers':{},
'getReferencePages':{},
'findAll':{},
'getExclusivelyDependentResources':{},
'getAllowedUserTypes':{},
'getResourcesByNameSafely':{},
'getResourcesByNames':{},
'getSourceURIWithThisTargetByRelatiobnship':{},
'getRelationshipsOfParents':{},
'getMetaGroupID':{},
'isValidResourceID':{},
'getServiceMajorVersion':{},
'hasReverseRelationship':{},
'containsDirectMemberByName1':{},
'getChildNamesAndAliases':{},
'getResourcesByIds':{},
'getResourceTypesVisibleToUsers':{},
'update':{},
'getRelationshipsOfThisAndParents':{},
'getPersonalAndSharedResourceRoots':{},
'getSourcesWithThisTargetByRelationship':{},
'containsDirectMemberByNameOrAlias1':{},
'hasReadPermission':{},
'copyResourceIntoGroup':{},
'deleteByLocalId':{},
'getDependentResourceIDsForResourceId':{},
'getResourceIfModified':{},
'findById':{},
'getSourcesWithThisTargetByRelationshipForResourceId':{},
'getSourcesWithThisTargetByACLRelationship':{},
'delete':{},
'getAllPathsToRootAsStrings':{},
'loadAdditional':{},
'insertResource':{},
'insertResources':{},
'getAllUnassignedResourceIDs':{},
'getEnabledResourceIDs':{},
'getSourceURIWithThisTargetByRelationship':{},
'getResourceById':{},
'updateACLForResourceById':{},
'getCorruptedResources':{},
'unloadAdditional':{},
'isDisabled':{},
'getTargetsAsURIByRelationship':{},
'updateResources':{},
'deleteByUUID':{},
'getTargetsByRelationship':{},
'getSourceURIWithThisTargetByRelationshipForResourceId':{},
'getTargetsByRelationshipCount':{},
'getPersonalGroup':{},
'findByUUID':{},
'resetState':{},
'insert':{},
'getServiceMinorVersion':{},
},
'ViewerConfigurationService':{
'getTargetsWithRelationshipTypeForResourceById':{},
'getTargetsByRelationshipForSourceId':{},
'getSourcesWithThisTargetByRelationshipCount':{},
'deleteResource':{},
'getSourceURIWithThisTargetByRelatiobnshipForResourceId':{},
'getAllAttachmentOnlyResourceIDs':{},
'getNamesAndAliases':{},
'containsDirectMemberByNameOrAlias':{},
'getTargetsWithRelationshipTypeForResource':{},
'getReverseRelationshipsOfThisAndParents':{},
'getPersonalResourceRoots':{},
'getESMVersion':{},
'getResourceByName':{},
'hasXPermission':{},
'findAllIds':{},
'addRelationship':{},
'getReverseRelationshipsOfParents':{},
'getResourcesReferencePages':{},
'containsDirectMemberByName':{},
'getTargetsAsURIByRelationshipForSourceId':{},
'hasWritePermission':{},
'deleteResources':{},
'resolveRelationship':{},
'getAllPathsToRoot':{},
'getResourcesWithVisibilityToUsers':{},
'getReferencePages':{},
'findAll':{},
'getExclusivelyDependentResources':{},
'getAllowedUserTypes':{},
'getResourcesByNameSafely':{},
'getResourcesByNames':{},
'getSourceURIWithThisTargetByRelatiobnship':{},
'getRelationshipsOfParents':{},
'getMetaGroupID':{},
'isValidResourceID':{},
'getServiceMajorVersion':{},
'hasReverseRelationship':{},
'containsDirectMemberByName1':{},
'getChildNamesAndAliases':{},
'getResourcesByIds':{},
'getResourceTypesVisibleToUsers':{},
'update':{},
'getRelationshipsOfThisAndParents':{},
'getPersonalAndSharedResourceRoots':{},
'getSourcesWithThisTargetByRelationship':{},
'containsDirectMemberByNameOrAlias1':{},
'hasReadPermission':{},
'copyResourceIntoGroup':{},
'deleteByLocalId':{},
'getDependentResourceIDsForResourceId':{},
'getResourceIfModified':{},
'findById':{},
'getSourcesWithThisTargetByRelationshipForResourceId':{},
'getSourcesWithThisTargetByACLRelationship':{},
'delete':{},
'getAllPathsToRootAsStrings':{},
'loadAdditional':{},
'insertResource':{},
'insertResources':{},
'getEnabledResourceIDs':{},
'getAllUnassignedResourceIDs':{},
'getSourceURIWithThisTargetByRelationship':{},
'getResourceById':{},
'updateACLForResourceById':{},
'getCorruptedResources':{},
'unloadAdditional':{},
'isDisabled':{},
'getTargetsAsURIByRelationship':{},
'updateResources':{},
'deleteByUUID':{},
'getTargetsByRelationship':{},
'getSourceURIWithThisTargetByRelationshipForResourceId':{},
'getTargetsByRelationshipCount':{},
'getPersonalGroup':{},
'getViewerConfigurationIfNewer':{},
'findByUUID':{},
'resetState':{},
'insert':{},
'getServiceMinorVersion':{},
},
'DashboardService':{
'getTargetsWithRelationshipTypeForResourceById':{},
'getTargetsByRelationshipForSourceId':{},
'getDataMonitorDataIfNewer':{},
'getSourcesWithThisTargetByRelationshipCount':{},
'deleteResource':{},
'getSourceURIWithThisTargetByRelatiobnshipForResourceId':{},
'getAllAttachmentOnlyResourceIDs':{},
'getNamesAndAliases':{},
'containsDirectMemberByNameOrAlias':{},
'getTargetsWithRelationshipTypeForResource':{},
'getReverseRelationshipsOfThisAndParents':{},
'getPersonalResourceRoots':{},
'getESMVersion':{},
'getResourceByName':{},
'hasXPermission':{},
'findAllIds':{},
'addRelationship':{},
'getReverseRelationshipsOfParents':{},
'getResourcesReferencePages':{},
'containsDirectMemberByName':{},
'getTargetsAsURIByRelationshipForSourceId':{},
'hasWritePermission':{},
'deleteResources':{},
'resolveRelationship':{},
'getAllPathsToRoot':{},
'getResourcesWithVisibilityToUsers':{},
'getReferencePages':{},
'findAll':{},
'getExclusivelyDependentResources':{},
'getAllowedUserTypes':{},
'getDashboardIfNewer':{},
'getResourcesByNameSafely':{},
'getResourcesByNames':{},
'getSourceURIWithThisTargetByRelatiobnship':{},
'getRelationshipsOfParents':{},
'getMetaGroupID':{},
'isValidResourceID':{},
'getServiceMajorVersion':{},
'hasReverseRelationship':{},
'containsDirectMemberByName1':{},
'getChildNamesAndAliases':{},
'getResourcesByIds':{},
'getResourceTypesVisibleToUsers':{},
'update':{},
'getRelationshipsOfThisAndParents':{},
'getPersonalAndSharedResourceRoots':{},
'getSourcesWithThisTargetByRelationship':{},
'containsDirectMemberByNameOrAlias1':{},
'hasReadPermission':{},
'copyResourceIntoGroup':{},
'getDependentResourceIDsForResourceId':{},
'deleteByLocalId':{},
'getResourceIfModified':{},
'findById':{},
'getSourcesWithThisTargetByRelationshipForResourceId':{},
'getSourcesWithThisTargetByACLRelationship':{},
'delete':{},
'getAllPathsToRootAsStrings':{},
'loadAdditional':{},
'insertResource':{},
'insertResources':{},
'getEnabledResourceIDs':{},
'getAllUnassignedResourceIDs':{},
'getSourceURIWithThisTargetByRelationship':{},
'getResourceById':{},
'updateACLForResourceById':{},
'getCorruptedResources':{},
'unloadAdditional':{},
'isDisabled':{},
'getTargetsAsURIByRelationship':{},
'updateResources':{},
'deleteByUUID':{},
'getTargetsByRelationship':{},
'getSourceURIWithThisTargetByRelationshipForResourceId':{},
'getTargetsByRelationshipCount':{},
'getPersonalGroup':{},
'findByUUID':{},
'resetState':{},
'insert':{},
'getDataMonitorDatasIfNewer':{},
'getServiceMinorVersion':{},
},
'DataMonitorQoSService':{
'disableQoSConstraintsOnDM':{},
'enableQoSConstraintsOnDM':{},
},
'DrilldownService':{
'getTargetsWithRelationshipTypeForResourceById':{},
'getTargetsByRelationshipForSourceId':{},
'getSourcesWithThisTargetByRelationshipCount':{},
'deleteResource':{},
'getSourceURIWithThisTargetByRelatiobnshipForResourceId':{},
'getAllAttachmentOnlyResourceIDs':{},
'getNamesAndAliases':{},
'containsDirectMemberByNameOrAlias':{},
'getTargetsWithRelationshipTypeForResource':{},
'getReverseRelationshipsOfThisAndParents':{},
'getPersonalResourceRoots':{},
'getESMVersion':{},
'getResourceByName':{},
'hasXPermission':{},
'findAllIds':{},
'addRelationship':{},
'getReverseRelationshipsOfParents':{},
'getResourcesReferencePages':{},
'containsDirectMemberByName':{},
'getTargetsAsURIByRelationshipForSourceId':{},
'hasWritePermission':{},
'deleteResources':{},
'resolveRelationship':{},
'getAllPathsToRoot':{},
'getResourcesWithVisibilityToUsers':{},
'getReferencePages':{},
'findAll':{},
'getExclusivelyDependentResources':{},
'getAllowedUserTypes':{},
'getResourcesByNameSafely':{},
'getResourcesByNames':{},
'getSourceURIWithThisTargetByRelatiobnship':{},
'getRelationshipsOfParents':{},
'getMetaGroupID':{},
'isValidResourceID':{},
'getServiceMajorVersion':{},
'hasReverseRelationship':{},
'containsDirectMemberByName1':{},
'getChildNamesAndAliases':{},
'getResourcesByIds':{},
'getResourceTypesVisibleToUsers':{},
'update':{},
'getRelationshipsOfThisAndParents':{},
'getPersonalAndSharedResourceRoots':{},
'getSourcesWithThisTargetByRelationship':{},
'containsDirectMemberByNameOrAlias1':{},
'hasReadPermission':{},
'copyResourceIntoGroup':{},
'deleteByLocalId':{},
'getDependentResourceIDsForResourceId':{},
'getResourceIfModified':{},
'findById':{},
'getSourcesWithThisTargetByRelationshipForResourceId':{},
'getSourcesWithThisTargetByACLRelationship':{},
'delete':{},
'getAllPathsToRootAsStrings':{},
'loadAdditional':{},
'insertResource':{},
'insertResources':{},
'getAllUnassignedResourceIDs':{},
'getEnabledResourceIDs':{},
'getSourceURIWithThisTargetByRelationship':{},
'getResourceById':{},
'updateACLForResourceById':{},
'getCorruptedResources':{},
'unloadAdditional':{},
'isDisabled':{},
'getTargetsAsURIByRelationship':{},
'updateResources':{},
'deleteByUUID':{},
'getTargetsByRelationship':{},
'getSourceURIWithThisTargetByRelationshipForResourceId':{},
'getTargetsByRelationshipCount':{},
'getPersonalGroup':{},
'findByUUID':{},
'resetState':{},
'insert':{},
'getServiceMinorVersion':{},
},
'PortletService':{
'getTargetsWithRelationshipTypeForResourceById':{},
'getTargetsByRelationshipForSourceId':{},
'getSourcesWithThisTargetByRelationshipCount':{},
'deleteResource':{},
'getSourceURIWithThisTargetByRelatiobnshipForResourceId':{},
'getAllAttachmentOnlyResourceIDs':{},
'getNamesAndAliases':{},
'containsDirectMemberByNameOrAlias':{},
'getTargetsWithRelationshipTypeForResource':{},
'getReverseRelationshipsOfThisAndParents':{},
'getPersonalResourceRoots':{},
'getESMVersion':{},
'getResourceByName':{},
'hasXPermission':{},
'findAllIds':{},
'addRelationship':{},
'getReverseRelationshipsOfParents':{},
'getResourcesReferencePages':{},
'containsDirectMemberByName':{},
'getTargetsAsURIByRelationshipForSourceId':{},
'hasWritePermission':{},
'deleteResources':{},
'resolveRelationship':{},
'getAllPathsToRoot':{},
'getResourcesWithVisibilityToUsers':{},
'getReferencePages':{},
'findAll':{},
'getExclusivelyDependentResources':{},
'getAllowedUserTypes':{},
'getResourcesByNameSafely':{},
'getResourcesByNames':{},
'getSourceURIWithThisTargetByRelatiobnship':{},
'getRelationshipsOfParents':{},
'getMetaGroupID':{},
'isValidResourceID':{},
'getServiceMajorVersion':{},
'hasReverseRelationship':{},
'containsDirectMemberByName1':{},
'getChildNamesAndAliases':{},
'getResourcesByIds':{},
'getResourceTypesVisibleToUsers':{},
'update':{},
'getRelationshipsOfThisAndParents':{},
'getPersonalAndSharedResourceRoots':{},
'getSourcesWithThisTargetByRelationship':{},
'containsDirectMemberByNameOrAlias1':{},
'hasReadPermission':{},
'copyResourceIntoGroup':{},
'deleteByLocalId':{},
'getDependentResourceIDsForResourceId':{},
'getResourceIfModified':{},
'findById':{},
'getSourcesWithThisTargetByRelationshipForResourceId':{},
'getSourcesWithThisTargetByACLRelationship':{},
'delete':{},
'getAllPathsToRootAsStrings':{},
'loadAdditional':{},
'insertResource':{},
'insertResources':{},
'getAllUnassignedResourceIDs':{},
'getEnabledResourceIDs':{},
'getSourceURIWithThisTargetByRelationship':{},
'getResourceById':{},
'updateACLForResourceById':{},
'getCorruptedResources':{},
'unloadAdditional':{},
'isDisabled':{},
'getTargetsAsURIByRelationship':{},
'updateResources':{},
'deleteByUUID':{},
'getTargetsByRelationship':{},
'getSourceURIWithThisTargetByRelationshipForResourceId':{},
'getTargetsByRelationshipCount':{},
'getPersonalGroup':{},
'findByUUID':{},
'resetState':{},
'insert':{},
'getServiceMinorVersion':{},
},
'QueryService':{
'getTargetsWithRelationshipTypeForResourceById':{},
'getTargetsByRelationshipForSourceId':{},
'getSourcesWithThisTargetByRelationshipCount':{},
'deleteResource':{},
'getSourceURIWithThisTargetByRelatiobnshipForResourceId':{},
'getAllAttachmentOnlyResourceIDs':{},
'getNamesAndAliases':{},
'containsDirectMemberByNameOrAlias':{},
'getTargetsWithRelationshipTypeForResource':{},
'getReverseRelationshipsOfThisAndParents':{},
'getPersonalResourceRoots':{},
'getQuerySessionID':{},
'getESMVersion':{},
'getResourceByName':{},
'hasXPermission':{},
'findAllIds':{},
'addRelationship':{},
'getReverseRelationshipsOfParents':{},
'getResourcesReferencePages':{},
'containsDirectMemberByName':{},
'getTargetsAsURIByRelationshipForSourceId':{},
'hasWritePermission':{},
'deleteResources':{},
'resolveRelationship':{},
'getQuerySQL':{},
'getAllPathsToRoot':{},
'getResourcesWithVisibilityToUsers':{},
'getReferencePages':{},
'findAll':{},
'getExclusivelyDependentResources':{},
'getAllowedUserTypes':{},
'getResourcesByNameSafely':{},
'getResourcesByNames':{},
'getSourceURIWithThisTargetByRelatiobnship':{},
'getRelationshipsOfParents':{},
'getMetaGroupID':{},
'isValidResourceID':{},
'getServiceMajorVersion':{},
'hasReverseRelationship':{},
'containsDirectMemberByName1':{},
'getChildNamesAndAliases':{},
'getResourcesByIds':{},
'getResourceTypesVisibleToUsers':{},
'update':{},
'getRelationshipsOfThisAndParents':{},
'getPersonalAndSharedResourceRoots':{},
'getSourcesWithThisTargetByRelationship':{},
'containsDirectMemberByNameOrAlias1':{},
'hasReadPermission':{},
'copyResourceIntoGroup':{},
'getDependentResourceIDsForResourceId':{},
'deleteByLocalId':{},
'getResourceIfModified':{},
'findById':{},
'getSourcesWithThisTargetByRelationshipForResourceId':{},
'getSourcesWithThisTargetByACLRelationship':{},
'delete':{},
'getAllPathsToRootAsStrings':{},
'loadAdditional':{},
'insertResource':{},
'insertResources':{},
'getEnabledResourceIDs':{},
'getAllUnassignedResourceIDs':{},
'getSourceURIWithThisTargetByRelationship':{},
'getResourceById':{},
'updateACLForResourceById':{},
'getCorruptedResources':{},
'unloadAdditional':{},
'isDisabled':{},
'getTargetsAsURIByRelationship':{},
'updateResources':{},
'deleteByUUID':{},
'getTargetsByRelationship':{},
'getSourceURIWithThisTargetByRelationshipForResourceId':{},
'getTargetsByRelationshipCount':{},
'getPersonalGroup':{},
'findByUUID':{},
'resetState':{},
'insert':{},
'getServiceMinorVersion':{},
},
'ConnectorService':{
'getTargetsWithRelationshipTypeForResourceById':{},
'getTargetsByRelationshipForSourceId':{},
'getAllAttachmentOnlyResourceIDs':{},
'getAllAgents':{},
'getNamesAndAliases':{},
'getReverseRelationshipsOfThisAndParents':{},
'getAllRunningAgentIDs':{},
'getESMVersion':{},
'getAllAgentIDs':{},
'addRelationship':{},
'containsDirectMemberByName':{},
'getAgentByName':{},
'getAllStoppedAgentIDs':{},
'getResourcesReferencePages':{},
'getReverseRelationshipsOfParents':{},
'getTargetsAsURIByRelationshipForSourceId':{},
'sendCommand':{},
'getReferencePages':{},
'getExclusivelyDependentResources':{},
'getAllowedUserTypes':{},
'getResourcesByNames':{},
'getSourceURIWithThisTargetByRelatiobnship':{},
'getMetaGroupID':{},
'isValidResourceID':{},
'getServiceMajorVersion':{},
'containsDirectMemberByName1':{},
'getResourcesByIds':{},
'getResourceTypesVisibleToUsers':{},
'getConnectorExecStatus':{},
'getPersonalAndSharedResourceRoots':{},
'checkImportStatus':{},
'hasReadPermission':{},
'containsDirectMemberByNameOrAlias1':{},
'getSourcesWithThisTargetByRelationship':{},
'getDeadAgentIDs':{},
'getAgentsByIDs':{},
'findById':{},
'getSourcesWithThisTargetByRelationshipForResourceId':{},
'delete':{},
'insertResource':{},
'insertResources':{},
'updateACLForResourceById':{},
'getCorruptedResources':{},
'unloadAdditional':{},
'initiateImportConfiguration':{},
'getTargetsByRelationship':{},
'getPersonalGroup':{},
'getTargetsByRelationshipCount':{},
'getSourceURIWithThisTargetByRelationshipForResourceId':{},
'getDevicesForAgents':{},
'findByUUID':{},
'resetState':{},
'insert':{},
'getAgentParameterDescriptor':{},
'initiateExportConnectorConfiguration':{},
'deleteResource':{},
'getSourcesWithThisTargetByRelationshipCount':{},
'getSourceURIWithThisTargetByRelatiobnshipForResourceId':{},
'getAgentIDsByOperationalStatusType':{},
'containsDirectMemberByNameOrAlias':{},
'getTargetsWithRelationshipTypeForResource':{},
'getPersonalResourceRoots':{},
'getResourceByName':{},
'hasXPermission':{},
'findAllIds':{},
'hasWritePermission':{},
'deleteResources':{},
'resolveRelationship':{},
'getAllPathsToRoot':{},
'getAgentParameterDescriptors':{},
'getResourcesWithVisibilityToUsers':{},
'findAll':{},
'getResourcesByNameSafely':{},
'getLiveAgentIDs':{},
'getRelationshipsOfParents':{},
'getAgentByID':{},
'hasReverseRelationship':{},
'getCommandsList':{},
'getChildNamesAndAliases':{},
'getParameterGroups':{},
'update':{},
'getAllPausedAgentIDs':{},
'getRelationshipsOfThisAndParents':{},
'updateConnector':{},
'copyResourceIntoGroup':{},
'deleteByLocalId':{},
'getDependentResourceIDsForResourceId':{},
'getResourceIfModified':{},
'getSourcesWithThisTargetByACLRelationship':{},
'getAllPathsToRootAsStrings':{},
'executeCommand':{},
'loadAdditional':{},
'getAllUnassignedResourceIDs':{},
'getEnabledResourceIDs':{},
'getSourceURIWithThisTargetByRelationship':{},
'getResourceById':{},
'initiateDownloadFile':{},
'isDisabled':{},
'getTargetsAsURIByRelationship':{},
'updateResources':{},
'deleteByUUID':{},
'getServiceMinorVersion':{},
},
'QueryViewerService':{
'getTargetsWithRelationshipTypeForResourceById':{},
'getTargetsByRelationshipForSourceId':{},
'getSourcesWithThisTargetByRelationshipCount':{},
'deleteResource':{},
'getSourceURIWithThisTargetByRelatiobnshipForResourceId':{},
'getAllAttachmentOnlyResourceIDs':{},
'getNamesAndAliases':{},
'containsDirectMemberByNameOrAlias':{},
'getTargetsWithRelationshipTypeForResource':{},
'getReverseRelationshipsOfThisAndParents':{},
'getPersonalResourceRoots':{},
'getESMVersion':{},
'getResourceByName':{},
'hasXPermission':{},
'findAllIds':{},
'addRelationship':{},
'getReverseRelationshipsOfParents':{},
'getResourcesReferencePages':{},
'containsDirectMemberByName':{},
'getTargetsAsURIByRelationshipForSourceId':{},
'hasWritePermission':{},
'deleteResources':{},
'resolveRelationship':{},
'getAllPathsToRoot':{},
'getResourcesWithVisibilityToUsers':{},
'getReferencePages':{},
'getMatrixDataForDrilldown':{},
'findAll':{},
'getExclusivelyDependentResources':{},
'getAllowedUserTypes':{},
'getResourcesByNameSafely':{},
'getResourcesByNames':{},
'getSourceURIWithThisTargetByRelatiobnship':{},
'getRelationshipsOfParents':{},
'getMetaGroupID':{},
'isValidResourceID':{},
'getServiceMajorVersion':{},
'hasReverseRelationship':{},
'containsDirectMemberByName1':{},
'getChildNamesAndAliases':{},
'getResourcesByIds':{},
'getResourceTypesVisibleToUsers':{},
'update':{},
'getRelationshipsOfThisAndParents':{},
'getPersonalAndSharedResourceRoots':{},
'getSourcesWithThisTargetByRelationship':{},
'containsDirectMemberByNameOrAlias1':{},
'hasReadPermission':{},
'copyResourceIntoGroup':{},
'getDependentResourceIDsForResourceId':{},
'deleteByLocalId':{},
'getResourceIfModified':{},
'findById':{},
'getSourcesWithThisTargetByRelationshipForResourceId':{},
'getSourcesWithThisTargetByACLRelationship':{},
'delete':{},
'getAllPathsToRootAsStrings':{},
'loadAdditional':{},
'insertResource':{},
'insertResources':{},
'getEnabledResourceIDs':{},
'getAllUnassignedResourceIDs':{},
'getSourceURIWithThisTargetByRelationship':{},
'getResourceById':{},
'updateACLForResourceById':{},
'getCorruptedResources':{},
'unloadAdditional':{},
'isDisabled':{},
'getTargetsAsURIByRelationship':{},
'updateResources':{},
'deleteByUUID':{},
'getTargetsByRelationship':{},
'getSourceURIWithThisTargetByRelationshipForResourceId':{},
'getMatrixData':{},
'getTargetsByRelationshipCount':{},
'getPersonalGroup':{},
'findByUUID':{},
'resetState':{},
'insert':{},
'getServiceMinorVersion':{},
},
'DrilldownListService':{
'getTargetsWithRelationshipTypeForResourceById':{},
'getTargetsByRelationshipForSourceId':{},
'getSourcesWithThisTargetByRelationshipCount':{},
'deleteResource':{},
'getSourceURIWithThisTargetByRelatiobnshipForResourceId':{},
'getAllAttachmentOnlyResourceIDs':{},
'getNamesAndAliases':{},
'containsDirectMemberByNameOrAlias':{},
'getTargetsWithRelationshipTypeForResource':{},
'getReverseRelationshipsOfThisAndParents':{},
'getPersonalResourceRoots':{},
'getESMVersion':{},
'getResourceByName':{},
'hasXPermission':{},
'findAllIds':{},
'addRelationship':{},
'getReverseRelationshipsOfParents':{},
'getResourcesReferencePages':{},
'containsDirectMemberByName':{},
'getDrilldownList':{},
'getTargetsAsURIByRelationshipForSourceId':{},
'hasWritePermission':{},
'deleteResources':{},
'resolveRelationship':{},
'getAllPathsToRoot':{},
'getResourcesWithVisibilityToUsers':{},
'getReferencePages':{},
'findAll':{},
'getExclusivelyDependentResources':{},
'getAllowedUserTypes':{},
'getResourcesByNameSafely':{},
'getResourcesByNames':{},
'getSourceURIWithThisTargetByRelatiobnship':{},
'getRelationshipsOfParents':{},
'getMetaGroupID':{},
'isValidResourceID':{},
'getServiceMajorVersion':{},
'hasReverseRelationship':{},
'containsDirectMemberByName1':{},
'getChildNamesAndAliases':{},
'getResourcesByIds':{},
'getResourceTypesVisibleToUsers':{},
'update':{},
'getRelationshipsOfThisAndParents':{},
'getPersonalAndSharedResourceRoots':{},
'getSourcesWithThisTargetByRelationship':{},
'containsDirectMemberByNameOrAlias1':{},
'hasReadPermission':{},
'copyResourceIntoGroup':{},
'deleteByLocalId':{},
'getDependentResourceIDsForResourceId':{},
'getResourceIfModified':{},
'findById':{},
'getSourcesWithThisTargetByRelationshipForResourceId':{},
'getSourcesWithThisTargetByACLRelationship':{},
'delete':{},
'getAllPathsToRootAsStrings':{},
'loadAdditional':{},
'insertResource':{},
'insertResources':{},
'getEnabledResourceIDs':{},
'getAllUnassignedResourceIDs':{},
'getSourceURIWithThisTargetByRelationship':{},
'getResourceById':{},
'updateACLForResourceById':{},
'getCorruptedResources':{},
'unloadAdditional':{},
'isDisabled':{},
'getTargetsAsURIByRelationship':{},
'updateResources':{},
'deleteByUUID':{},
'getTargetsByRelationship':{},
'getSourceURIWithThisTargetByRelationshipForResourceId':{},
'getTargetsByRelationshipCount':{},
'getPersonalGroup':{},
'findByUUID':{},
'resetState':{},
'insert':{},
'getServiceMinorVersion':{},
},
'CaseService':{
'getTargetsWithRelationshipTypeForResourceById':{},
'getCaseEventIDs':{},
'getTargetsByRelationshipForSourceId':{},
'getSourcesWithThisTargetByRelationshipCount':{},
'deleteResource':{},
'getSourceURIWithThisTargetByRelatiobnshipForResourceId':{},
'getAllAttachmentOnlyResourceIDs':{},
'getNamesAndAliases':{},
'containsDirectMemberByNameOrAlias':{},
'getTargetsWithRelationshipTypeForResource':{},
'getReverseRelationshipsOfThisAndParents':{},
'getPersonalResourceRoots':{},
'getESMVersion':{},
'getResourceByName':{},
'hasXPermission':{},
'findAllIds':{},
'addRelationship':{},
'getCasesGroupID':{},
'getReverseRelationshipsOfParents':{},
'getResourcesReferencePages':{},
'containsDirectMemberByName':{},
'getTargetsAsURIByRelationshipForSourceId':{},
'hasWritePermission':{},
'deleteResources':{},
'resolveRelationship':{},
'getAllPathsToRoot':{},
'getResourcesWithVisibilityToUsers':{},
'getReferencePages':{},
'findAll':{},
'getExclusivelyDependentResources':{},
'getAllowedUserTypes':{},
'getResourcesByNameSafely':{},
'getResourcesByNames':{},
'getSourceURIWithThisTargetByRelatiobnship':{},
'getRelationshipsOfParents':{},
'getMetaGroupID':{},
'isValidResourceID':{},
'getServiceMajorVersion':{},
'hasReverseRelationship':{},
'getChildNamesAndAliases':{},
'containsDirectMemberByName1':{},
'getResourcesByIds':{},
'getResourceTypesVisibleToUsers':{},
'update':{},
'getRelationshipsOfThisAndParents':{},
'getPersonalAndSharedResourceRoots':{},
'getSourcesWithThisTargetByRelationship':{},
'containsDirectMemberByNameOrAlias1':{},
'hasReadPermission':{},
'copyResourceIntoGroup':{},
'getDependentResourceIDsForResourceId':{},
'deleteByLocalId':{},
'getResourceIfModified':{},
'findById':{},
'getSourcesWithThisTargetByRelationshipForResourceId':{},
'getSourcesWithThisTargetByACLRelationship':{},
'delete':{},
'getAllPathsToRootAsStrings':{},
'loadAdditional':{},
'deleteAllCaseEvents':{},
'insertResource':{},
'insertResources':{},
'addCaseEvents':{},
'getEnabledResourceIDs':{},
'getAllUnassignedResourceIDs':{},
'getSourceURIWithThisTargetByRelationship':{},
'getResourceById':{},
'updateACLForResourceById':{},
'getCorruptedResources':{},
'deleteCaseEvents':{},
'unloadAdditional':{},
'isDisabled':{},
'getTargetsAsURIByRelationship':{},
'updateResources':{},
'deleteByUUID':{},
'getTargetsByRelationship':{},
'getSourceURIWithThisTargetByRelationshipForResourceId':{},
'getTargetsByRelationshipCount':{},
'getPersonalGroup':{},
'findByUUID':{},
'resetState':{},
'getCaseEventsTimeSpan':{},
'getSystemCasesGroupID':{},
'insert':{},
'getServiceMinorVersion':{},
'getEventExportStatus':{},
},
'ArchiveReportService':{
'getTargetsWithRelationshipTypeForResourceById':{},
'getTargetsByRelationshipForSourceId':{},
'getSourcesWithThisTargetByRelationshipCount':{},
'deleteResource':{},
'getSourceURIWithThisTargetByRelatiobnshipForResourceId':{},
'getAllAttachmentOnlyResourceIDs':{},
'getNamesAndAliases':{},
'containsDirectMemberByNameOrAlias':{},
'getTargetsWithRelationshipTypeForResource':{},
'getReverseRelationshipsOfThisAndParents':{},
'getPersonalResourceRoots':{},
'getDefaultArchiveReportByURI':{},
'getESMVersion':{},
'getResourceByName':{},
'hasXPermission':{},
'poll':{},
'findAllIds':{},
'addRelationship':{},
'getReverseRelationshipsOfParents':{},
'getResourcesReferencePages':{},
'containsDirectMemberByName':{},
'getTargetsAsURIByRelationshipForSourceId':{},
'hasWritePermission':{},
'deleteResources':{},
'getAllPathsToRoot':{},
'resolveRelationship':{},
'getResourcesWithVisibilityToUsers':{},
'getReferencePages':{},
'findAll':{},
'getExclusivelyDependentResources':{},
'getAllowedUserTypes':{},
'initDefaultArchiveReportDownloadWithOverwrite':{},
'getResourcesByNameSafely':{},
'getResourcesByNames':{},
'getSourceURIWithThisTargetByRelatiobnship':{},
'getDefaultArchiveReportById':{},
'getRelationshipsOfParents':{},
'getMetaGroupID':{},
'isValidResourceID':{},
'archiveReport':{},
'getServiceMajorVersion':{},
'initDefaultArchiveReportDownloadByURI':{},
'hasReverseRelationship':{},
'getChildNamesAndAliases':{},
'containsDirectMemberByName1':{},
'getResourcesByIds':{},
'getResourceTypesVisibleToUsers':{},
'update':{},
'getRelationshipsOfThisAndParents':{},
'getPersonalAndSharedResourceRoots':{},
'getSourcesWithThisTargetByRelationship':{},
'containsDirectMemberByNameOrAlias1':{},
'hasReadPermission':{},
'copyResourceIntoGroup':{},
'getDependentResourceIDsForResourceId':{},
'deleteByLocalId':{},
'initDefaultArchiveReportDownloadById':{},
'getResourceIfModified':{},
'findById':{},
'getSourcesWithThisTargetByRelationshipForResourceId':{},
'getSourcesWithThisTargetByACLRelationship':{},
'delete':{},
'getAllPathsToRootAsStrings':{},
'loadAdditional':{},
'insertResource':{},
'insertResources':{},
'getEnabledResourceIDs':{},
'getAllUnassignedResourceIDs':{},
'getSourceURIWithThisTargetByRelationship':{},
'getResourceById':{},
'initDefaultArchiveReportDownloadByIdASync':{},
'updateACLForResourceById':{},
'getCorruptedResources':{},
'unloadAdditional':{},
'isDisabled':{},
'getTargetsAsURIByRelationship':{},
'updateResources':{},
'deleteByUUID':{},
'getTargetsByRelationship':{},
'getSourceURIWithThisTargetByRelationshipForResourceId':{},
'getTargetsByRelationshipCount':{},
'getPersonalGroup':{},
'findByUUID':{},
'resetState':{},
'insert':{},
'getServiceMinorVersion':{},
},
'ActiveListService':{
'getTargetsWithRelationshipTypeForResourceById':{},
'getTargetsByRelationshipForSourceId':{},
'getSourcesWithThisTargetByRelationshipCount':{},
'deleteResource':{},
'getSourceURIWithThisTargetByRelatiobnshipForResourceId':{},
'getAllAttachmentOnlyResourceIDs':{},
'getNamesAndAliases':{},
'containsDirectMemberByNameOrAlias':{},
'getTargetsWithRelationshipTypeForResource':{},
'getReverseRelationshipsOfThisAndParents':{},
'getPersonalResourceRoots':{},
'getESMVersion':{},
'getResourceByName':{},
'hasXPermission':{},
'addEntries':{},
'findAllIds':{},
'addRelationship':{},
'getReverseRelationshipsOfParents':{},
'getResourcesReferencePages':{},
'containsDirectMemberByName':{},
'getTargetsAsURIByRelationshipForSourceId':{},
'hasWritePermission':{},
'deleteResources':{},
'resolveRelationship':{},
'getAllPathsToRoot':{},
'getResourcesWithVisibilityToUsers':{},
'getReferencePages':{},
'findAll':{},
'getExclusivelyDependentResources':{},
'getAllowedUserTypes':{},
'getResourcesByNameSafely':{},
'getResourcesByNames':{},
'getSourceURIWithThisTargetByRelatiobnship':{},
'getRelationshipsOfParents':{},
'getMetaGroupID':{},
'isValidResourceID':{},
'getServiceMajorVersion':{},
'getEntries':{},
'hasReverseRelationship':{},
'getChildNamesAndAliases':{},
'containsDirectMemberByName1':{},
'getResourcesByIds':{},
'getResourceTypesVisibleToUsers':{},
'update':{},
'getRelationshipsOfThisAndParents':{},
'getPersonalAndSharedResourceRoots':{},
'getSourcesWithThisTargetByRelationship':{},
'containsDirectMemberByNameOrAlias1':{},
'hasReadPermission':{},
'copyResourceIntoGroup':{},
'getDependentResourceIDsForResourceId':{},
'deleteByLocalId':{},
'clearEntries':{},
'getResourceIfModified':{},
'findById':{},
'getSourcesWithThisTargetByRelationshipForResourceId':{},
'getSourcesWithThisTargetByACLRelationship':{},
'delete':{},
'getAllPathsToRootAsStrings':{},
'loadAdditional':{},
'deleteEntries':{},
'insertResource':{},
'insertResources':{},
'getEnabledResourceIDs':{},
'getAllUnassignedResourceIDs':{},
'getSourceURIWithThisTargetByRelationship':{},
'getResourceById':{},
'updateACLForResourceById':{},
'getCorruptedResources':{},
'unloadAdditional':{},
'isDisabled':{},
'getTargetsAsURIByRelationship':{},
'updateResources':{},
'deleteByUUID':{},
'getTargetsByRelationship':{},
'getSourceURIWithThisTargetByRelationshipForResourceId':{},
'getTargetsByRelationshipCount':{},
'getPersonalGroup':{},
'findByUUID':{},
'resetState':{},
'insert':{},
'getServiceMinorVersion':{},
},
'InternalService':{
'newGroupAttributesParameter':{},
'newReportDrilldownDefinition':{},
'newEdge':{},
'newHierarchyMapGroupByHolder':{},
'newActiveChannelDrilldownDefinition':{},
'newMatrixData':{},
'newIntrospectableFieldListParameter':{},
'newGraphData':{},
'newGeoInfoEventGraphNode':{},
'newIntrospectableFieldListHolder':{},
'newGroupAttributeEntry':{},
'newDashboardDrilldownDefinition':{},
'newListWrapper':{},
'newFontHolder':{},
'newEventGraph':{},
'newPropertyHolder':{},
'newQueryViewerDrilldownDefinition':{},
'newGraph':{},
'newFilterFields':{},
'newFontParameter':{},
'newGeographicInformation':{},
'newNode':{},
'newHierarchyMapGroupByParameter':{},
'newErrorCode':{},
'newEventGraphNode':{},
},
'SecurityEventService':{
'getServiceMajorVersion':{},
'getSecurityEventsWithTimeout':{},
'getSecurityEvents':{},
'getServiceMinorVersion':{},
'getSecurityEventsByProfile':{},
},
'GraphService':{
'createSourceTargetGraphFromEventList':{},
'createSourceTargetGraph':{},
'createSourceEventTargetGraph':{},
'getServiceMajorVersion':{},
'getServiceMinorVersion':{},
'createSourceEventTargetGraphFromEventList':{},
},
'GroupService':{
'getTargetsWithRelationshipTypeForResourceById':{},
'childAttributesChanged':{},
'getTargetsByRelationshipForSourceId':{},
'getAllAttachmentOnlyResourceIDs':{},
'getNamesAndAliases':{},
'getReverseRelationshipsOfThisAndParents':{},
'getESMVersion':{},
'addRelationship':{},
'containsDirectMemberByName':{},
'getResourcesReferencePages':{},
'getReverseRelationshipsOfParents':{},
'getTargetsAsURIByRelationshipForSourceId':{},
'isParentOf':{},
'insertGroup':{},
'getAllChildren':{},
'getReferencePages':{},
'getGroupChildCount':{},
'getExclusivelyDependentResources':{},
'getAllowedUserTypes':{},
'getResourcesByNames':{},
'removeChild':{},
'getSourceURIWithThisTargetByRelatiobnship':{},
'getMetaGroupID':{},
'isValidResourceID':{},
'addChild':{},
'getServiceMajorVersion':{},
'containsDirectMemberByName1':{},
'getResourcesByIds':{},
'getResourceTypesVisibleToUsers':{},
'getPersonalAndSharedResourceRoots':{},
'hasReadPermission':{},
'containsDirectMemberByNameOrAlias1':{},
'getSourcesWithThisTargetByRelationship':{},
'findById':{},
'getSourcesWithThisTargetByRelationshipForResourceId':{},
'delete':{},
'insertResource':{},
'insertResources':{},
'getAllChildIDCount':{},
'updateACLForResourceById':{},
'getCorruptedResources':{},
'unloadAdditional':{},
'getTargetsByRelationship':{},
'getPersonalGroup':{},
'getTargetsByRelationshipCount':{},
'getSourceURIWithThisTargetByRelationshipForResourceId':{},
'findByUUID':{},
'resetState':{},
'insert':{},
'deleteResource':{},
'getSourcesWithThisTargetByRelationshipCount':{},
'getSourceURIWithThisTargetByRelatiobnshipForResourceId':{},
'containsDirectMemberByNameOrAlias':{},
'removeChildren':{},
'getTargetsWithRelationshipTypeForResource':{},
'getPersonalResourceRoots':{},
'getMetaGroup':{},
'getChildrenByType':{},
'getResourceByName':{},
'hasXPermission':{},
'findAllIds':{},
'hasWritePermission':{},
'deleteResources':{},
'resolveRelationship':{},
'getAllPathsToRoot':{},
'getResourcesWithVisibilityToUsers':{},
'findAll':{},
'addChildren':{},
'getResourcesByNameSafely':{},
'getRelationshipsOfParents':{},
'getChildResourcesByType':{},
'hasReverseRelationship':{},
'getChildNamesAndAliases':{},
'update':{},
'hasChildWithNameOrAlias':{},
'getRelationshipsOfThisAndParents':{},
'getChildIDByChildNameOrAlias':{},
'containsResourcesRecursively':{},
'copyResourceIntoGroup':{},
'deleteByLocalId':{},
'getDependentResourceIDsForResourceId':{},
'getResourceIfModified':{},
'isGroup':{},
'getSourcesWithThisTargetByACLRelationship':{},
'getAllPathsToRootAsStrings':{},
'updateGroup':{},
'loadAdditional':{},
'getAllUnassignedResourceIDs':{},
'getEnabledResourceIDs':{},
'getSourceURIWithThisTargetByRelationship':{},
'getResourceById':{},
'getGroupByURI':{},
'isDisabled':{},
'getAllChildIDs':{},
'getTargetsAsURIByRelationship':{},
'updateResources':{},
'deleteByUUID':{},
'getGroupByID':{},
'getServiceMinorVersion':{},
},
'ResourceService':{
'getTargetsWithRelationshipTypeForResourceById':{},
'getTargetsByRelationshipForSourceId':{},
'getSourcesWithThisTargetByRelationshipCount':{},
'deleteResource':{},
'getSourceURIWithThisTargetByRelatiobnshipForResourceId':{},
'getAllAttachmentOnlyResourceIDs':{},
'getNamesAndAliases':{},
'containsDirectMemberByNameOrAlias':{},
'getTargetsWithRelationshipTypeForResource':{},
'getReverseRelationshipsOfThisAndParents':{},
'getPersonalResourceRoots':{},
'getESMVersion':{},
'getResourceByName':{},
'hasXPermission':{},
'findAllIds':{},
'addRelationship':{},
'getReverseRelationshipsOfParents':{},
'getResourcesReferencePages':{},
'containsDirectMemberByName':{},
'getTargetsAsURIByRelationshipForSourceId':{},
'hasWritePermission':{},
'deleteResources':{},
'resolveRelationship':{},
'getAllPathsToRoot':{},
'getResourcesWithVisibilityToUsers':{},
'getReferencePages':{},
'findAll':{},
'getExclusivelyDependentResources':{},
'getAllowedUserTypes':{},
'getResourcesByNameSafely':{},
'getResourcesByNames':{},
'getSourceURIWithThisTargetByRelatiobnship':{},
'getRelationshipsOfParents':{},
'getMetaGroupID':{},
'isValidResourceID':{},
'getServiceMajorVersion':{},
'hasReverseRelationship':{},
'containsDirectMemberByName1':{},
'getChildNamesAndAliases':{},
'getResourcesByIds':{},
'getResourceTypesVisibleToUsers':{},
'update':{},
'getRelationshipsOfThisAndParents':{},
'getPersonalAndSharedResourceRoots':{},
'getSourcesWithThisTargetByRelationship':{},
'containsDirectMemberByNameOrAlias1':{},
'hasReadPermission':{},
'copyResourceIntoGroup':{},
'deleteByLocalId':{},
'getDependentResourceIDsForResourceId':{},
'getResourceIfModified':{},
'findById':{},
'getSourcesWithThisTargetByRelationshipForResourceId':{},
'getSourcesWithThisTargetByACLRelationship':{},
'delete':{},
'getAllPathsToRootAsStrings':{},
'loadAdditional':{},
'insertResource':{},
'insertResources':{},
'getAllUnassignedResourceIDs':{},
'getEnabledResourceIDs':{},
'getSourceURIWithThisTargetByRelationship':{},
'getResourceById':{},
'updateACLForResourceById':{},
'getCorruptedResources':{},
'unloadAdditional':{},
'isDisabled':{},
'getTargetsAsURIByRelationship':{},
'updateResources':{},
'deleteByUUID':{},
'getTargetsByRelationship':{},
'getSourceURIWithThisTargetByRelationshipForResourceId':{},
'getTargetsByRelationshipCount':{},
'getPersonalGroup':{},
'findByUUID':{},
'resetState':{},
'insert':{},
'getServiceMinorVersion':{},
},
'UserResourceService':{
'getTargetsWithRelationshipTypeForResourceById':{},
'getTargetsByRelationshipForSourceId':{},
'getAllAttachmentOnlyResourceIDs':{},
'addUserPreferenceById':{},
'getNamesAndAliases':{},
'getReverseRelationshipsOfThisAndParents':{},
'getESMVersion':{},
'addRelationship':{},
'containsDirectMemberByName':{},
'getResourcesReferencePages':{},
'getReverseRelationshipsOfParents':{},
'getTargetsAsURIByRelationshipForSourceId':{},
'getReferencePages':{},
'getUserModificationFlag':{},
'getAllUsers':{},
'getExclusivelyDependentResources':{},
'getAllowedUserTypes':{},
'create':{},
'getResourcesByNames':{},
'getSourceURIWithThisTargetByRelatiobnship':{},
'recordSuccessfulLoginFor':{},
'updateUserPreferencesByName':{},
'getMetaGroupID':{},
'isValidResourceID':{},
'getServiceMajorVersion':{},
'changePassword':{},
'containsDirectMemberByName1':{},
'getResourcesByIds':{},
'getResourceTypesVisibleToUsers':{},
'getCurrentUser':{},
'getPersonalAndSharedResourceRoots':{},
'getSourcesWithThisTargetByRelationship':{},
'hasReadPermission':{},
'containsDirectMemberByNameOrAlias1':{},
'getUserByName':{},
'getSessionProfile':{},
'findById':{},
'getSourcesWithThisTargetByRelationshipForResourceId':{},
'delete':{},
'getRootUserGroup':{},
'updateUserPreferencesById':{},
'getAllUserPreferencesForUserByName':{},
'insertResource':{},
'insertResources':{},
'updateACLForResourceById':{},
'getCorruptedResources':{},
'unloadAdditional':{},
'getFeatureAvailabilities':{},
'isFeatureAvailable':{},
'getTargetsByRelationship':{},
'increaseFailedLoginAttemptsFor':{},
'getSourceURIWithThisTargetByRelationshipForResourceId':{},
'getPersonalGroup':{},
'getTargetsByRelationshipCount':{},
'findByUUID':{},
'resetState':{},
'insert':{},
'isAdministrator':{},
'getSourcesWithThisTargetByRelationshipCount':{},
'deleteResource':{},
'getSourceURIWithThisTargetByRelatiobnshipForResourceId':{},
'containsDirectMemberByNameOrAlias':{},
'getTargetsWithRelationshipTypeForResource':{},
'getPersonalResourceRoots':{},
'getResourceByName':{},
'hasXPermission':{},
'addModuleConfigForUserById':{},
'findAllIds':{},
'hasWritePermission':{},
'deleteResources':{},
'resolveRelationship':{},
'getAllPathsToRoot':{},
'getUserPreferenceForUserByName':{},
'getAllUserPreferencesForUserById':{},
'getModuleConfigForUserByName':{},
'getResourcesWithVisibilityToUsers':{},
'getUserPreferenceForUserById':{},
'findAll':{},
'getResourcesByNameSafely':{},
'getRelationshipsOfParents':{},
'getServerDefaultLocale':{},
'hasReverseRelationship':{},
'getChildNamesAndAliases':{},
'updateUser':{},
'update':{},
'updateModuleConfigForUserById':{},
'getRelationshipsOfThisAndParents':{},
'copyResourceIntoGroup':{},
'deleteByLocalId':{},
'getDependentResourceIDsForResourceId':{},
'checkPassword':{},
'updateModuleConfigForUserByName':{},
'getResourceIfModified':{},
'addModuleConfigForUserByName':{},
'getSourcesWithThisTargetByACLRelationship':{},
'getAllPathsToRootAsStrings':{},
'getRootUserGroupID':{},
'loadAdditional':{},
'resetFailedLoginAttemptsFor':{},
'getAllUnassignedResourceIDs':{},
'getEnabledResourceIDs':{},
'getSourceURIWithThisTargetByRelationship':{},
'getResourceById':{},
'isDisabled':{},
'getTargetsAsURIByRelationship':{},
'updateResources':{},
'deleteByUUID':{},
'getRootUserId':{},
'getModuleConfigForUserById':{},
'addUserPreferenceByName':{},
'getServiceMinorVersion':{},
},
'FileResourceService':{
'getTargetsWithRelationshipTypeForResourceById':{},
'getTargetsByRelationshipForSourceId':{},
'initiateUpload':{},
'getSourcesWithThisTargetByRelationshipCount':{},
'initiateDownloadByUUID':{},
'deleteResource':{},
'getSourceURIWithThisTargetByRelatiobnshipForResourceId':{},
'getAllAttachmentOnlyResourceIDs':{},
'getNamesAndAliases':{},
'containsDirectMemberByNameOrAlias':{},
'getTargetsWithRelationshipTypeForResource':{},
'getReverseRelationshipsOfThisAndParents':{},
'getPersonalResourceRoots':{},
'getESMVersion':{},
'getResourceByName':{},
'hasXPermission':{},
'findAllIds':{},
'addRelationship':{},
'getReverseRelationshipsOfParents':{},
'getResourcesReferencePages':{},
'containsDirectMemberByName':{},
'getTargetsAsURIByRelationshipForSourceId':{},
'hasWritePermission':{},
'deleteResources':{},
'resolveRelationship':{},
'getAllPathsToRoot':{},
'getResourcesWithVisibilityToUsers':{},
'getReferencePages':{},
'findAll':{},
'getUploadStatus':{},
'getExclusivelyDependentResources':{},
'getAllowedUserTypes':{},
'getResourcesByNameSafely':{},
'getResourcesByNames':{},
'getSourceURIWithThisTargetByRelatiobnship':{},
'getRelationshipsOfParents':{},
'getMetaGroupID':{},
'isValidResourceID':{},
'getServiceMajorVersion':{},
'hasReverseRelationship':{},
'containsDirectMemberByName1':{},
'getChildNamesAndAliases':{},
'getResourcesByIds':{},
'getResourceTypesVisibleToUsers':{},
'update':{},
'getRelationshipsOfThisAndParents':{},
'getPersonalAndSharedResourceRoots':{},
'getSourcesWithThisTargetByRelationship':{},
'containsDirectMemberByNameOrAlias1':{},
'hasReadPermission':{},
'copyResourceIntoGroup':{},
'getDependentResourceIDsForResourceId':{},
'deleteByLocalId':{},
'getResourceIfModified':{},
'findById':{},
'getSourcesWithThisTargetByRelationshipForResourceId':{},
'getSourcesWithThisTargetByACLRelationship':{},
'delete':{},
'getAllPathsToRootAsStrings':{},
'loadAdditional':{},
'insertResource':{},
'insertResources':{},
'getEnabledResourceIDs':{},
'getAllUnassignedResourceIDs':{},
'getSourceURIWithThisTargetByRelationship':{},
'getResourceById':{},
'updateACLForResourceById':{},
'getCorruptedResources':{},
'unloadAdditional':{},
'isDisabled':{},
'getTargetsAsURIByRelationship':{},
'updateResources':{},
'deleteByUUID':{},
'getTargetsByRelationship':{},
'getSourceURIWithThisTargetByRelationshipForResourceId':{},
'getTargetsByRelationshipCount':{},
'getPersonalGroup':{},
'findByUUID':{},
'resetState':{},
'insert':{},
'getServiceMinorVersion':{},
},
'InfoService':{
'getActivationDateMillis':{},
'getPropertyByEncodedKey':{},
'isTrial':{},
'hasErrors':{},
'getWebServerUrl':{},
'getWebAdminRelUrlWithOTP':{},
'getWebAdminRelUrl':{},
'isPatternDiscoveryEnabled':{},
'getExpirationDate':{},
'getWebServerUrlWithOTP':{},
'isLicenseValid':{},
'getErrorMessage':{},
'getManagerVersionString':{},
'expires':{},
'isSessionListsEnabled':{},
'setLicensed':{},
'getProperty':{},
'isPartitionArchiveEnabled':{},
'getStatusString':{},
'getServiceMajorVersion':{},
'getCustomerName':{},
'getCustomerNumber':{},
'getServiceMinorVersion':{},
},
'SecurityEventIntrospectorService':{
'getTimeConstraintFields':{},
'hasField':{},
'convertLabelToName':{},
'getFields':{},
'getGroupNames':{},
'getServiceMajorVersion':{},
'getFieldsByFilter':{},
'hasFieldName':{},
'getFieldByName':{},
'getGroupDisplayName':{},
'getServiceMinorVersion':{},
'getRelatedFields':{},
},
'ConAppService':{
'getPathToConApp':{},
'getServiceMajorVersion':{},
'getServiceMinorVersion':{},
},
'FieldSetService':{
'getTargetsWithRelationshipTypeForResourceById':{},
'getTargetsByRelationshipForSourceId':{},
'getSourcesWithThisTargetByRelationshipCount':{},
'deleteResource':{},
'getSourceURIWithThisTargetByRelatiobnshipForResourceId':{},
'getAllAttachmentOnlyResourceIDs':{},
'getNamesAndAliases':{},
'containsDirectMemberByNameOrAlias':{},
'getTargetsWithRelationshipTypeForResource':{},
'getReverseRelationshipsOfThisAndParents':{},
'getPersonalResourceRoots':{},
'getESMVersion':{},
'getResourceByName':{},
'hasXPermission':{},
'findAllIds':{},
'addRelationship':{},
'getReverseRelationshipsOfParents':{},
'getResourcesReferencePages':{},
'containsDirectMemberByName':{},
'getTargetsAsURIByRelationshipForSourceId':{},
'hasWritePermission':{},
'deleteResources':{},
'resolveRelationship':{},
'getAllPathsToRoot':{},
'getResourcesWithVisibilityToUsers':{},
'getReferencePages':{},
'findAll':{},
'getExclusivelyDependentResources':{},
'getAllowedUserTypes':{},
'getResourcesByNameSafely':{},
'getResourcesByNames':{},
'getSourceURIWithThisTargetByRelatiobnship':{},
'getRelationshipsOfParents':{},
'getMetaGroupID':{},
'isValidResourceID':{},
'getServiceMajorVersion':{},
'hasReverseRelationship':{},
'containsDirectMemberByName1':{},
'getChildNamesAndAliases':{},
'getResourcesByIds':{},
'getResourceTypesVisibleToUsers':{},
'update':{},
'getRelationshipsOfThisAndParents':{},
'getPersonalAndSharedResourceRoots':{},
'getSourcesWithThisTargetByRelationship':{},
'containsDirectMemberByNameOrAlias1':{},
'hasReadPermission':{},
'copyResourceIntoGroup':{},
'deleteByLocalId':{},
'getDependentResourceIDsForResourceId':{},
'getResourceIfModified':{},
'findById':{},
'getSourcesWithThisTargetByRelationshipForResourceId':{},
'getSourcesWithThisTargetByACLRelationship':{},
'delete':{},
'getAllPathsToRootAsStrings':{},
'loadAdditional':{},
'insertResource':{},
'insertResources':{},
'getAllUnassignedResourceIDs':{},
'getEnabledResourceIDs':{},
'getSourceURIWithThisTargetByRelationship':{},
'getResourceById':{},
'updateACLForResourceById':{},
'getCorruptedResources':{},
'unloadAdditional':{},
'isDisabled':{},
'getTargetsAsURIByRelationship':{},
'updateResources':{},
'deleteByUUID':{},
'getTargetsByRelationship':{},
'getSourceURIWithThisTargetByRelationshipForResourceId':{},
'getTargetsByRelationshipCount':{},
'getPersonalGroup':{},
'findByUUID':{},
'resetState':{},
'insert':{},
'getServiceMinorVersion':{},
},
'ReportService':{
'getTargetsWithRelationshipTypeForResourceById':{},
'getTargetsByRelationshipForSourceId':{},
'getSourcesWithThisTargetByRelationshipCount':{},
'deleteResource':{},
'getSourceURIWithThisTargetByRelatiobnshipForResourceId':{},
'getAllAttachmentOnlyResourceIDs':{},
'getNamesAndAliases':{},
'containsDirectMemberByNameOrAlias':{},
'getTargetsWithRelationshipTypeForResource':{},
'getReverseRelationshipsOfThisAndParents':{},
'getPersonalResourceRoots':{},
'getESMVersion':{},
'getResourceByName':{},
'hasXPermission':{},
'findAllIds':{},
'addRelationship':{},
'getReverseRelationshipsOfParents':{},
'getResourcesReferencePages':{},
'containsDirectMemberByName':{},
'getTargetsAsURIByRelationshipForSourceId':{},
'hasWritePermission':{},
'deleteResources':{},
'resolveRelationship':{},
'getAllPathsToRoot':{},
'getResourcesWithVisibilityToUsers':{},
'getReferencePages':{},
'findAll':{},
'getExclusivelyDependentResources':{},
'getAllowedUserTypes':{},
'getResourcesByNameSafely':{},
'getResourcesByNames':{},
'getSourceURIWithThisTargetByRelatiobnship':{},
'getRelationshipsOfParents':{},
'getMetaGroupID':{},
'isValidResourceID':{},
'getServiceMajorVersion':{},
'hasReverseRelationship':{},
'containsDirectMemberByName1':{},
'getChildNamesAndAliases':{},
'getResourcesByIds':{},
'getResourceTypesVisibleToUsers':{},
'update':{},
'getRelationshipsOfThisAndParents':{},
'getPersonalAndSharedResourceRoots':{},
'getSourcesWithThisTargetByRelationship':{},
'containsDirectMemberByNameOrAlias1':{},
'hasReadPermission':{},
'copyResourceIntoGroup':{},
'deleteByLocalId':{},
'getDependentResourceIDsForResourceId':{},
'getResourceIfModified':{},
'findById':{},
'getSourcesWithThisTargetByRelationshipForResourceId':{},
'getSourcesWithThisTargetByACLRelationship':{},
'delete':{},
'getAllPathsToRootAsStrings':{},
'loadAdditional':{},
'insertResource':{},
'insertResources':{},
'getAllUnassignedResourceIDs':{},
'getEnabledResourceIDs':{},
'getSourceURIWithThisTargetByRelationship':{},
'getResourceById':{},
'updateACLForResourceById':{},
'getCorruptedResources':{},
'unloadAdditional':{},
'isDisabled':{},
'getTargetsAsURIByRelationship':{},
'updateResources':{},
'deleteByUUID':{},
'getTargetsByRelationship':{},
'getSourceURIWithThisTargetByRelationshipForResourceId':{},
'getTargetsByRelationshipCount':{},
'getPersonalGroup':{},
'findByUUID':{},
'resetState':{},
'insert':{},
'getServiceMinorVersion':{},
},
'ManagerAuthenticationService':{
'getServiceMajorVersion':{},
'getOTP':{},
'getServiceMinorVersion':{},
},
'ManagerSearchService':{
'search':{},
'search1':{},
},
'DataMonitorService':{
'getTargetsWithRelationshipTypeForResourceById':{},
'getTargetsByRelationshipForSourceId':{},
'getSourcesWithThisTargetByRelationshipCount':{},
'deleteResource':{},
'getSourceURIWithThisTargetByRelatiobnshipForResourceId':{},
'getAllAttachmentOnlyResourceIDs':{},
'getNamesAndAliases':{},
'containsDirectMemberByNameOrAlias':{},
'getTargetsWithRelationshipTypeForResource':{},
'getReverseRelationshipsOfThisAndParents':{},
'getPersonalResourceRoots':{},
'getESMVersion':{},
'getResourceByName':{},
'hasXPermission':{},
'findAllIds':{},
'addRelationship':{},
'getReverseRelationshipsOfParents':{},
'getResourcesReferencePages':{},
'containsDirectMemberByName':{},
'getTargetsAsURIByRelationshipForSourceId':{},
'hasWritePermission':{},
'deleteResources':{},
'resolveRelationship':{},
'getAllPathsToRoot':{},
'getResourcesWithVisibilityToUsers':{},
'getReferencePages':{},
'findAll':{},
'getExclusivelyDependentResources':{},
'getAllowedUserTypes':{},
'getResourcesByNameSafely':{},
'getResourcesByNames':{},
'getSourceURIWithThisTargetByRelatiobnship':{},
'getDataMonitorIfNewer':{},
'getRelationshipsOfParents':{},
'getMetaGroupID':{},
'isValidResourceID':{},
'getServiceMajorVersion':{},
'hasReverseRelationship':{},
'containsDirectMemberByName1':{},
'getChildNamesAndAliases':{},
'getResourcesByIds':{},
'getResourceTypesVisibleToUsers':{},
'update':{},
'getRelationshipsOfThisAndParents':{},
'getPersonalAndSharedResourceRoots':{},
'getSourcesWithThisTargetByRelationship':{},
'containsDirectMemberByNameOrAlias1':{},
'hasReadPermission':{},
'copyResourceIntoGroup':{},
'deleteByLocalId':{},
'getDependentResourceIDsForResourceId':{},
'getResourceIfModified':{},
'findById':{},
'getSourcesWithThisTargetByRelationshipForResourceId':{},
'getSourcesWithThisTargetByACLRelationship':{},
'delete':{},
'getAllPathsToRootAsStrings':{},
'loadAdditional':{},
'insertResource':{},
'insertResources':{},
'getEnabledResourceIDs':{},
'getAllUnassignedResourceIDs':{},
'getSourceURIWithThisTargetByRelationship':{},
'getResourceById':{},
'updateACLForResourceById':{},
'getCorruptedResources':{},
'unloadAdditional':{},
'isDisabled':{},
'getTargetsAsURIByRelationship':{},
'updateResources':{},
'deleteByUUID':{},
'getTargetsByRelationship':{},
'getSourceURIWithThisTargetByRelationshipForResourceId':{},
'getTargetsByRelationshipCount':{},
'getPersonalGroup':{},
'findByUUID':{},
'resetState':{},
'insert':{},
'getServiceMinorVersion':{},
},
'ServerConfigurationService':{
'getTargetsWithRelationshipTypeForResourceById':{},
'getTargetsByRelationshipForSourceId':{},
'getSourcesWithThisTargetByRelationshipCount':{},
'deleteResource':{},
'getSourceURIWithThisTargetByRelatiobnshipForResourceId':{},
'getAllAttachmentOnlyResourceIDs':{},
'getNamesAndAliases':{},
'containsDirectMemberByNameOrAlias':{},
'getTargetsWithRelationshipTypeForResource':{},
'getReverseRelationshipsOfThisAndParents':{},
'getPersonalResourceRoots':{},
'getESMVersion':{},
'getResourceByName':{},
'hasXPermission':{},
'findAllIds':{},
'addRelationship':{},
'getReverseRelationshipsOfParents':{},
'getResourcesReferencePages':{},
'containsDirectMemberByName':{},
'getTargetsAsURIByRelationshipForSourceId':{},
'hasWritePermission':{},
'deleteResources':{},
'resolveRelationship':{},
'getAllPathsToRoot':{},
'getResourcesWithVisibilityToUsers':{},
'getReferencePages':{},
'findAll':{},
'getExclusivelyDependentResources':{},
'getAllowedUserTypes':{},
'getResourcesByNameSafely':{},
'getResourcesByNames':{},
'getSourceURIWithThisTargetByRelatiobnship':{},
'getRelationshipsOfParents':{},
'getMetaGroupID':{},
'isValidResourceID':{},
'getServiceMajorVersion':{},
'hasReverseRelationship':{},
'containsDirectMemberByName1':{},
'getChildNamesAndAliases':{},
'getResourcesByIds':{},
'getResourceTypesVisibleToUsers':{},
'update':{},
'getRelationshipsOfThisAndParents':{},
'getPersonalAndSharedResourceRoots':{},
'getSourcesWithThisTargetByRelationship':{},
'containsDirectMemberByNameOrAlias1':{},
'hasReadPermission':{},
'copyResourceIntoGroup':{},
'deleteByLocalId':{},
'getDependentResourceIDsForResourceId':{},
'getResourceIfModified':{},
'findById':{},
'getSourcesWithThisTargetByRelationshipForResourceId':{},
'getSourcesWithThisTargetByACLRelationship':{},
'delete':{},
'getAllPathsToRootAsStrings':{},
'loadAdditional':{},
'insertResource':{},
'insertResources':{},
'getAllUnassignedResourceIDs':{},
'getEnabledResourceIDs':{},
'getSourceURIWithThisTargetByRelationship':{},
'getResourceById':{},
'updateACLForResourceById':{},
'getCorruptedResources':{},
'unloadAdditional':{},
'isDisabled':{},
'getTargetsAsURIByRelationship':{},
'updateResources':{},
'deleteByUUID':{},
'getTargetsByRelationship':{},
'getSourceURIWithThisTargetByRelationshipForResourceId':{},
'getTargetsByRelationshipCount':{},
'getPersonalGroup':{},
'findByUUID':{},
'resetState':{},
'insert':{},
'getServiceMinorVersion':{},
},
} |
# 练习:使用学生列表封装以下三个列表中数据
class Student:
def __init__(self, name="", age=0, sex=""):
self.name = name
self.age = age
self.sex = sex
list_student_name = ["悟空", "八戒", "白骨精"]
list_student_age = [28, 25, 36]
list_student_sex = ["男", "男", "女"]
list_students = []
for item in zip(list_student_name, list_student_age, list_student_sex):
# ('悟空', 28, '男') --> Student 对象
# stu = Student(item[0],item[1],item[2])
stu = Student(*item)
list_students.append(stu)
# 通过调试查看列表中的数据
print(list_students)
|
def test_a_cohama_adb(style_checker):
"""Style check test against a-cohama.adb."""
style_checker.set_year(2006)
p = style_checker.run_style_checker('trunk/gnat', 'a-cohama.adb')
style_checker.assertEqual(p.status, 0, p.image)
style_checker.assertRunOutputEmpty(p)
def test_a_cohamb_adb(style_checker):
"""Style check test against a-cohamb.adb."""
p = style_checker.run_style_checker('trunk/gnat', 'a-cohamb.adb')
style_checker.assertNotEqual(p.status, 0, p.image)
style_checker.assertRunOutputEqual(p, """\
a-cohamb.adb: Copyright notice missing, must occur before line 24
""")
def test_a_cohata_ads(style_checker):
"""Style check test against a-cohata.ads."""
style_checker.set_year(2006)
p = style_checker.run_style_checker('trunk/gnat', 'a-cohata.ads')
style_checker.assertEqual(p.status, 0, p.image)
style_checker.assertRunOutputEmpty(p)
def test_a_except_ads(style_checker):
"""Style check test against a-except.ads."""
style_checker.set_year(2006)
p = style_checker.run_style_checker('trunk/gnat', 'a-except.ads')
style_checker.assertNotEqual(p.status, 0, p.image)
style_checker.assertRunOutputEqual(p, """\
a-except.ads:9: Copyright notice must include current year (found 2005, expected 2006)
""")
def test_exceptions_ads(style_checker):
"""Style check test against exceptions.ads."""
style_checker.set_year(2006)
p = style_checker.run_style_checker('trunk/gnat', 'exceptions.ads')
style_checker.assertNotEqual(p.status, 0, p.image)
style_checker.assertRunOutputEqual(p, """\
exceptions.ads:9: Copyright notice must include current year (found 2005, expected 2006)
""")
def test_a_zttest_ads(style_checker):
"""Style check test against a-zttest.ads
"""
p = style_checker.run_style_checker('trunk/gnat', 'a-zttest.ads')
style_checker.assertEqual(p.status, 0, p.image)
style_checker.assertRunOutputEmpty(p)
def test_directio_ads(style_checker):
"""Style check test against directio.ads
"""
p = style_checker.run_style_checker('trunk/gnat', 'directio.ads')
style_checker.assertEqual(p.status, 0, p.image)
style_checker.assertRunOutputEmpty(p)
def test_i_c_ads(style_checker):
"""Style check test against i-c.ads
"""
p = style_checker.run_style_checker('trunk/gnat', 'i-c.ads')
style_checker.assertEqual(p.status, 0, p.image)
style_checker.assertRunOutputEmpty(p)
def test_s_taprop_linux_adb(style_checker):
"""Style check test s-taprop-linux.adb
"""
style_checker.set_year(2010)
p = style_checker.run_style_checker('trunk/gnat', 's-taprop-linux.adb')
style_checker.assertEqual(p.status, 0, p.image)
style_checker.assertRunOutputEmpty(p)
|
### Stupid, but extensible spam detector
STOP_SPAM_WORDS = ["Loan", "Lender", ".trade", ".bid", ".men", ".win"]
def is_spam(request):
if 'email' in request.form:
if any(
[ word.upper() in request.form['email'].upper()
for word in STOP_SPAM_WORDS]):
return True
if 'username' in request.form:
if any(
[ word.upper() in request.form['username'].upper()
for word in STOP_SPAM_WORDS]):
return True
return False
|
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'Qwerty1@'
EMAIL_USE_TLS = True |
#! /usr/bin/env Python3
list_of_tuples = []
list_of_tuples_comprehension = ([(i, j, i * j) for i in range(1, 11) for j in range(1, 11)])
for i in range(1, 11):
for j in range(1, 11):
list_of_tuples.append((i, j, i * j))
print(list_of_tuples)
print('************')
print(list_of_tuples_comprehension)
|
TARGET_BAG = 'shiny gold'
def get_data(filepath):
return [line.strip() for line in open(filepath).readlines()]
def parse_rule(rule):
rule = rule.split(' ')
adj, color = rule[0], rule[1]
container_bag = '%s %s' % (adj, color)
bags_contained = {}
if rule[4:] == ['no', 'other', 'bags.']:
pass
else:
for i in range(4, len(rule), 4):
quantity, adj, color = rule[i], rule[i + 1], rule[i + 2]
bags_contained['%s %s' % (adj, color)] = int(quantity)
return container_bag, bags_contained
def parse_bag_rules(inputs):
bag_rules = {}
for line in inputs:
container_bag, bags_contained = parse_rule(line)
bag_rules[container_bag] = bags_contained
return bag_rules
def bag_contains_target(bag_rules, bag_to_search, target_bag):
if bag_rules[bag_to_search]:
for bag in bag_rules[bag_to_search]:
if bag == target_bag:
return True
else:
if bag_contains_target(bag_rules, bag, target_bag):
return True
else:
return False
def solve(inputs):
bag_rules = parse_bag_rules(inputs)
good_bags = []
for bag in bag_rules.keys():
if bag_contains_target(bag_rules, bag, TARGET_BAG):
good_bags.append(bag)
return len(good_bags)
def search_bags(bag_rules, bag_to_search, num_bags):
num_bags_total = num_bags
for bag in bag_rules[bag_to_search]:
num_bags_inside = bag_rules[bag_to_search][bag]
num_bags_total += num_bags * search_bags(bag_rules, bag, num_bags_inside)
return num_bags_total
def solve2(inputs):
bag_rules = parse_bag_rules(inputs)
return search_bags(bag_rules, TARGET_BAG, 1) - 1 # Bag count does not include target bag
assert solve(get_data('test')) == 4
print('Part 1: %d' % solve(get_data('input')))
assert solve2(get_data('test')) == 32
assert solve2(get_data('test2')) == 126
print('Part 2: %d' % solve2(get_data('input')))
|
class Instance:
def __init__ (self, alloyfp):
self.bitwidth = '4'
self.maxseq = '4'
self.mintrace = '-1'
self.maxtrace = '-1'
self.filename = alloyfp
self.tracel = '1'
self.backl = '0'
self.sigs = []
self.fields = []
def add_sig(self, sig):
self.sigs.append(sig)
def add_field(self, field):
self.fields.append(field)
|
# Find square root using newton raphson
num = 987
eps = 1e-6
iteration = 0
sroot = num/2
while abs(sroot**2-num)>eps:
iteration+=1
if sroot**2==num:
print(f'At Iteration {iteration} : Found It!, the cube root for {num} is {sroot}')
break
sroot = sroot - (sroot**2-num)/(2*sroot)
print(f'At Iteration {iteration} : the square root approximation for {num} is {sroot}')
|
"""
https://www.practicepython.org
Exercise 14: List Remove Duplicates
2 chilis
Write a program (function!) that takes a list and returns a new list that
contains all the elements of the first list minus all the duplicates.
Extras:
- Write two different functions to do this - one using a loop and constructing
a list, and another using sets.
- Go back and do Exercise 5 using sets, and write the solution for that in a different function.
"""
def remove_common_items(list1):
answer = [ ]
for item in list1:
if item not in answer:
answer.append(item)
return answer
def rci2(list1):
return [list1[idx] for idx in range(len(list1)) if list1[idx] not in list1[idx+1:]]
def rci3(list1, list2):
return set(list1 + list2)
a = [1, 1, 2, 3, 5, 8, 8, 4, 21, 34, 5, 7, 6, 8, "sdfg", "rstl"]
b = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, "sdfg", "zyxw"]
common_list = remove_common_items(a + b)
print(common_list)
common_list = rci2(a + b)
print(common_list)
common_list = rci3(a, b)
print(common_list)
|
HEADLINE = "time_elapsed\tsystem_time\tyear\tmonth\tday\tseasonal_factor\ttreatment_coverage_0_1\ttreatment_coverage_0_10\tpopulation\tsep\teir\tsep\tbsp_2_10\tbsp_0_5\tblood_slide_prevalence\tsep\tmonthly_new_infection\tsep\tmonthly_new_treatment\tsep\tmonthly_clinical_episode\tsep\tmonthly_ntf_raw\tsep\tKNY--C1x\tKNY--C1X\tKNY--C2x\tKNY--C2X\tKNY--Y1x\tKNY--Y1X\tKNY--Y2x\tKNY--Y2X\tKYY--C1x\tKYY--C1X\tKYY--C2x\tKYY--C2X\tKYY--Y1x\tKYY--Y1X\tKYY--Y2x\tKYY--Y2X\tKNF--C1x\tKNF--C1X\tKNF--C2x\tKNF--C2X\tKNF--Y1x\tKNF--Y1X\tKNF--Y2x\tKNF--Y2X\tKYF--C1x\tKYF--C1X\tKYF--C2x\tKYF--C2X\tKYF--Y1x\tKYF--Y1X\tKYF--Y2x\tKYF--Y2X\tKNYNYC1x\tKNYNYC1X\tKNYNYC2x\tKNYNYC2X\tKNYNYY1x\tKNYNYY1X\tKNYNYY2x\tKNYNYY2X\tKYYYYC1x\tKYYYYC1X\tKYYYYC2x\tKYYYYC2X\tKYYYYY1x\tKYYYYY1X\tKYYYYY2x\tKYYYYY2X\tKNFNFC1x\tKNFNFC1X\tKNFNFC2x\tKNFNFC2X\tKNFNFY1x\tKNFNFY1X\tKNFNFY2x\tKNFNFY2X\tKYFYFC1x\tKYFYFC1X\tKYFYFC2x\tKYFYFC2X\tKYFYFY1x\tKYFYFY1X\tKYFYFY2x\tKYFYFY2X\tTNY--C1x\tTNY--C1X\tTNY--C2x\tTNY--C2X\tTNY--Y1x\tTNY--Y1X\tTNY--Y2x\tTNY--Y2X\tTYY--C1x\tTYY--C1X\tTYY--C2x\tTYY--C2X\tTYY--Y1x\tTYY--Y1X\tTYY--Y2x\tTYY--Y2X\tTNF--C1x\tTNF--C1X\tTNF--C2x\tTNF--C2X\tTNF--Y1x\tTNF--Y1X\tTNF--Y2x\tTNF--Y2X\tTYF--C1x\tTYF--C1X\tTYF--C2x\tTYF--C2X\tTYF--Y1x\tTYF--Y1X\tTYF--Y2x\tTYF--Y2X\tTNYNYC1x\tTNYNYC1X\tTNYNYC2x\tTNYNYC2X\tTNYNYY1x\tTNYNYY1X\tTNYNYY2x\tTNYNYY2X\tTYYYYC1x\tTYYYYC1X\tTYYYYC2x\tTYYYYC2X\tTYYYYY1x\tTYYYYY1X\tTYYYYY2x\tTYYYYY2X\tTNFNFC1x\tTNFNFC1X\tTNFNFC2x\tTNFNFC2X\tTNFNFY1x\tTNFNFY1X\tTNFNFY2x\tTNFNFY2X\tTYFYFC1x\tTYFYFC1X\tTYFYFC2x\tTYFYFC2X\tTYFYFY1x\tTYFYFY1X\tTYFYFY2x\tTYFYFY2X\tsep\tKNY--C1x\tKNY--C1X\tKNY--C2x\tKNY--C2X\tKNY--Y1x\tKNY--Y1X\tKNY--Y2x\tKNY--Y2X\tKYY--C1x\tKYY--C1X\tKYY--C2x\tKYY--C2X\tKYY--Y1x\tKYY--Y1X\tKYY--Y2x\tKYY--Y2X\tKNF--C1x\tKNF--C1X\tKNF--C2x\tKNF--C2X\tKNF--Y1x\tKNF--Y1X\tKNF--Y2x\tKNF--Y2X\tKYF--C1x\tKYF--C1X\tKYF--C2x\tKYF--C2X\tKYF--Y1x\tKYF--Y1X\tKYF--Y2x\tKYF--Y2X\tKNYNYC1x\tKNYNYC1X\tKNYNYC2x\tKNYNYC2X\tKNYNYY1x\tKNYNYY1X\tKNYNYY2x\tKNYNYY2X\tKYYYYC1x\tKYYYYC1X\tKYYYYC2x\tKYYYYC2X\tKYYYYY1x\tKYYYYY1X\tKYYYYY2x\tKYYYYY2X\tKNFNFC1x\tKNFNFC1X\tKNFNFC2x\tKNFNFC2X\tKNFNFY1x\tKNFNFY1X\tKNFNFY2x\tKNFNFY2X\tKYFYFC1x\tKYFYFC1X\tKYFYFC2x\tKYFYFC2X\tKYFYFY1x\tKYFYFY1X\tKYFYFY2x\tKYFYFY2X\tTNY--C1x\tTNY--C1X\tTNY--C2x\tTNY--C2X\tTNY--Y1x\tTNY--Y1X\tTNY--Y2x\tTNY--Y2X\tTYY--C1x\tTYY--C1X\tTYY--C2x\tTYY--C2X\tTYY--Y1x\tTYY--Y1X\tTYY--Y2x\tTYY--Y2X\tTNF--C1x\tTNF--C1X\tTNF--C2x\tTNF--C2X\tTNF--Y1x\tTNF--Y1X\tTNF--Y2x\tTNF--Y2X\tTYF--C1x\tTYF--C1X\tTYF--C2x\tTYF--C2X\tTYF--Y1x\tTYF--Y1X\tTYF--Y2x\tTYF--Y2X\tTNYNYC1x\tTNYNYC1X\tTNYNYC2x\tTNYNYC2X\tTNYNYY1x\tTNYNYY1X\tTNYNYY2x\tTNYNYY2X\tTYYYYC1x\tTYYYYC1X\tTYYYYC2x\tTYYYYC2X\tTYYYYY1x\tTYYYYY1X\tTYYYYY2x\tTYYYYY2X\tTNFNFC1x\tTNFNFC1X\tTNFNFC2x\tTNFNFC2X\tTNFNFY1x\tTNFNFY1X\tTNFNFY2x\tTNFNFY2X\tTYFYFC1x\tTYFYFC1X\tTYFYFC2x\tTYFYFC2X\tTYFYFY1x\tTYFYFY1X\tTYFYFY2x\tTYFYFY2X\tsep\ttotal_count"
HEADER_NAME = [
'time_elapsed', 'system_time', 'year', 'month', 'day', 'seasonal_factor',
'treatment_coverage_0_1', 'treatment_coverage_0_10', 'population', 'sep1',
'eir', 'sep2', 'bsp_2_10', 'bsp_0_5', 'blood_slide_prevalence', 'sep3',
'monthly_new_infection', 'sep4', 'monthly_new_treatment', 'sep5',
'monthly_clinical_episode', 'sep6', 'monthly_ntf_raw', 'sep7',
'KNY--C1x', 'KNY--C1X', 'KNY--C2x', 'KNY--C2X', 'KNY--Y1x', 'KNY--Y1X',
'KNY--Y2x', 'KNY--Y2X', 'KYY--C1x', 'KYY--C1X', 'KYY--C2x', 'KYY--C2X',
'KYY--Y1x', 'KYY--Y1X', 'KYY--Y2x', 'KYY--Y2X', 'KNF--C1x', 'KNF--C1X',
'KNF--C2x', 'KNF--C2X', 'KNF--Y1x', 'KNF--Y1X', 'KNF--Y2x', 'KNF--Y2X',
'KYF--C1x', 'KYF--C1X', 'KYF--C2x', 'KYF--C2X', 'KYF--Y1x', 'KYF--Y1X',
'KYF--Y2x', 'KYF--Y2X', 'KNYNYC1x', 'KNYNYC1X', 'KNYNYC2x', 'KNYNYC2X',
'KNYNYY1x', 'KNYNYY1X', 'KNYNYY2x', 'KNYNYY2X', 'KYYYYC1x', 'KYYYYC1X',
'KYYYYC2x', 'KYYYYC2X', 'KYYYYY1x', 'KYYYYY1X', 'KYYYYY2x', 'KYYYYY2X',
'KNFNFC1x', 'KNFNFC1X', 'KNFNFC2x', 'KNFNFC2X', 'KNFNFY1x', 'KNFNFY1X',
'KNFNFY2x', 'KNFNFY2X', 'KYFYFC1x', 'KYFYFC1X', 'KYFYFC2x', 'KYFYFC2X',
'KYFYFY1x', 'KYFYFY1X', 'KYFYFY2x', 'KYFYFY2X', 'TNY--C1x', 'TNY--C1X',
'TNY--C2x', 'TNY--C2X', 'TNY--Y1x', 'TNY--Y1X', 'TNY--Y2x', 'TNY--Y2X',
'TYY--C1x', 'TYY--C1X', 'TYY--C2x', 'TYY--C2X', 'TYY--Y1x', 'TYY--Y1X',
'TYY--Y2x', 'TYY--Y2X', 'TNF--C1x', 'TNF--C1X', 'TNF--C2x', 'TNF--C2X',
'TNF--Y1x', 'TNF--Y1X', 'TNF--Y2x', 'TNF--Y2X', 'TYF--C1x', 'TYF--C1X',
'TYF--C2x', 'TYF--C2X', 'TYF--Y1x', 'TYF--Y1X', 'TYF--Y2x', 'TYF--Y2X',
'TNYNYC1x', 'TNYNYC1X', 'TNYNYC2x', 'TNYNYC2X', 'TNYNYY1x', 'TNYNYY1X',
'TNYNYY2x', 'TNYNYY2X', 'TYYYYC1x', 'TYYYYC1X', 'TYYYYC2x', 'TYYYYC2X',
'TYYYYY1x', 'TYYYYY1X', 'TYYYYY2x', 'TYYYYY2X', 'TNFNFC1x', 'TNFNFC1X',
'TNFNFC2x', 'TNFNFC2X', 'TNFNFY1x', 'TNFNFY1X', 'TNFNFY2x', 'TNFNFY2X',
'TYFYFC1x', 'TYFYFC1X', 'TYFYFC2x', 'TYFYFC2X', 'TYFYFY1x', 'TYFYFY1X',
'TYFYFY2x', 'TYFYFY2X', 'sep8',
'n_KNY--C1x', 'n_KNY--C1X', 'n_KNY--C2x', 'n_KNY--C2X', 'n_KNY--Y1x',
'n_KNY--Y1X', 'n_KNY--Y2x', 'n_KNY--Y2X', 'n_KYY--C1x', 'n_KYY--C1X',
'n_KYY--C2x', 'n_KYY--C2X', 'n_KYY--Y1x', 'n_KYY--Y1X', 'n_KYY--Y2x',
'n_KYY--Y2X', 'n_KNF--C1x', 'n_KNF--C1X', 'n_KNF--C2x', 'n_KNF--C2X',
'n_KNF--Y1x', 'n_KNF--Y1X', 'n_KNF--Y2x', 'n_KNF--Y2X', 'n_KYF--C1x',
'n_KYF--C1X', 'n_KYF--C2x', 'n_KYF--C2X', 'n_KYF--Y1x', 'n_KYF--Y1X',
'n_KYF--Y2x', 'n_KYF--Y2X', 'n_KNYNYC1x', 'n_KNYNYC1X', 'n_KNYNYC2x',
'n_KNYNYC2X', 'n_KNYNYY1x', 'n_KNYNYY1X', 'n_KNYNYY2x', 'n_KNYNYY2X',
'n_KYYYYC1x', 'n_KYYYYC1X', 'n_KYYYYC2x', 'n_KYYYYC2X', 'n_KYYYYY1x',
'n_KYYYYY1X', 'n_KYYYYY2x', 'n_KYYYYY2X', 'n_KNFNFC1x', 'n_KNFNFC1X',
'n_KNFNFC2x', 'n_KNFNFC2X', 'n_KNFNFY1x', 'n_KNFNFY1X', 'n_KNFNFY2x',
'n_KNFNFY2X', 'n_KYFYFC1x', 'n_KYFYFC1X', 'n_KYFYFC2x', 'n_KYFYFC2X',
'n_KYFYFY1x', 'n_KYFYFY1X', 'n_KYFYFY2x', 'n_KYFYFY2X', 'n_TNY--C1x',
'n_TNY--C1X', 'n_TNY--C2x', 'n_TNY--C2X', 'n_TNY--Y1x', 'n_TNY--Y1X',
'n_TNY--Y2x', 'n_TNY--Y2X', 'n_TYY--C1x', 'n_TYY--C1X', 'n_TYY--C2x',
'n_TYY--C2X', 'n_TYY--Y1x', 'n_TYY--Y1X', 'n_TYY--Y2x', 'n_TYY--Y2X',
'n_TNF--C1x', 'n_TNF--C1X', 'n_TNF--C2x', 'n_TNF--C2X', 'n_TNF--Y1x',
'n_TNF--Y1X', 'n_TNF--Y2x', 'n_TNF--Y2X', 'n_TYF--C1x', 'n_TYF--C1X',
'n_TYF--C2x', 'n_TYF--C2X', 'n_TYF--Y1x', 'n_TYF--Y1X', 'n_TYF--Y2x',
'n_TYF--Y2X', 'n_TNYNYC1x', 'n_TNYNYC1X', 'n_TNYNYC2x', 'n_TNYNYC2X',
'n_TNYNYY1x', 'n_TNYNYY1X', 'n_TNYNYY2x', 'n_TNYNYY2X', 'n_TYYYYC1x',
'n_TYYYYC1X', 'n_TYYYYC2x', 'n_TYYYYC2X', 'n_TYYYYY1x', 'n_TYYYYY1X',
'n_TYYYYY2x', 'n_TYYYYY2X', 'n_TNFNFC1x', 'n_TNFNFC1X', 'n_TNFNFC2x',
'n_TNFNFC2X', 'n_TNFNFY1x', 'n_TNFNFY1X', 'n_TNFNFY2x', 'n_TNFNFY2X',
'n_TYFYFC1x', 'n_TYFYFC1X', 'n_TYFYFC2x', 'n_TYFYFC2X', 'n_TYFYFY1x',
'n_TYFYFY1X', 'n_TYFYFY2x', 'n_TYFYFY2X', 'sep9', 'total_count'
]
COLUMNS_TO_DROP = [
'n_KNY--C1x', 'n_KNY--C1X', 'n_KNY--C2x', 'n_KNY--C2X', 'n_KNY--Y1x',
'n_KNY--Y1X', 'n_KNY--Y2x', 'n_KNY--Y2X', 'n_KYY--C1x', 'n_KYY--C1X',
'n_KYY--C2x', 'n_KYY--C2X', 'n_KYY--Y1x', 'n_KYY--Y1X', 'n_KYY--Y2x',
'n_KYY--Y2X', 'n_KNF--C1x', 'n_KNF--C1X', 'n_KNF--C2x', 'n_KNF--C2X',
'n_KNF--Y1x', 'n_KNF--Y1X', 'n_KNF--Y2x', 'n_KNF--Y2X', 'n_KYF--C1x',
'n_KYF--C1X', 'n_KYF--C2x', 'n_KYF--C2X', 'n_KYF--Y1x', 'n_KYF--Y1X',
'n_KYF--Y2x', 'n_KYF--Y2X', 'n_KNYNYC1x', 'n_KNYNYC1X', 'n_KNYNYC2x',
'n_KNYNYC2X', 'n_KNYNYY1x', 'n_KNYNYY1X', 'n_KNYNYY2x', 'n_KNYNYY2X',
'n_KYYYYC1x', 'n_KYYYYC1X', 'n_KYYYYC2x', 'n_KYYYYC2X', 'n_KYYYYY1x',
'n_KYYYYY1X', 'n_KYYYYY2x', 'n_KYYYYY2X', 'n_KNFNFC1x', 'n_KNFNFC1X',
'n_KNFNFC2x', 'n_KNFNFC2X', 'n_KNFNFY1x', 'n_KNFNFY1X', 'n_KNFNFY2x',
'n_KNFNFY2X', 'n_KYFYFC1x', 'n_KYFYFC1X', 'n_KYFYFC2x', 'n_KYFYFC2X',
'n_KYFYFY1x', 'n_KYFYFY1X', 'n_KYFYFY2x', 'n_KYFYFY2X', 'n_TNY--C1x',
'n_TNY--C1X', 'n_TNY--C2x', 'n_TNY--C2X', 'n_TNY--Y1x', 'n_TNY--Y1X',
'n_TNY--Y2x', 'n_TNY--Y2X', 'n_TYY--C1x', 'n_TYY--C1X', 'n_TYY--C2x',
'n_TYY--C2X', 'n_TYY--Y1x', 'n_TYY--Y1X', 'n_TYY--Y2x', 'n_TYY--Y2X',
'n_TNF--C1x', 'n_TNF--C1X', 'n_TNF--C2x', 'n_TNF--C2X', 'n_TNF--Y1x',
'n_TNF--Y1X', 'n_TNF--Y2x', 'n_TNF--Y2X', 'n_TYF--C1x', 'n_TYF--C1X',
'n_TYF--C2x', 'n_TYF--C2X', 'n_TYF--Y1x', 'n_TYF--Y1X', 'n_TYF--Y2x',
'n_TYF--Y2X', 'n_TNYNYC1x', 'n_TNYNYC1X', 'n_TNYNYC2x', 'n_TNYNYC2X',
'n_TNYNYY1x', 'n_TNYNYY1X', 'n_TNYNYY2x', 'n_TNYNYY2X', 'n_TYYYYC1x',
'n_TYYYYC1X', 'n_TYYYYC2x', 'n_TYYYYC2X', 'n_TYYYYY1x', 'n_TYYYYY1X',
'n_TYYYYY2x', 'n_TYYYYY2X', 'n_TNFNFC1x', 'n_TNFNFC1X', 'n_TNFNFC2x',
'n_TNFNFC2X', 'n_TNFNFY1x', 'n_TNFNFY1X', 'n_TNFNFY2x', 'n_TNFNFY2X',
'n_TYFYFC1x', 'n_TYFYFC1X', 'n_TYFYFC2x', 'n_TYFYFC2X', 'n_TYFYFY1x',
'n_TYFYFY1X', 'n_TYFYFY2x', 'n_TYFYFY2X', 'time_elapsed',
'sep1', 'sep2', 'sep3', 'sep4', 'sep5', 'sep6', 'sep7', 'sep8', 'sep9',
'system_time', 'year', 'month', 'day', 'seasonal_factor', 'total_count',
'treatment_coverage_0_1', 'treatment_coverage_0_10', 'population', 'eir',
'bsp_2_10', 'bsp_0_5', 'blood_slide_prevalence', 'monthly_new_infection',
'monthly_new_treatment', 'monthly_clinical_episode', 'monthly_ntf_raw'
]
# Also used in Fig.4 Flow Diagram Common Constants
ENCODINGDB = [
'KNY--C1x', 'KNY--C1X', 'KNY--C2x', 'KNY--C2X', 'KNY--Y1x', 'KNY--Y1X',
'KNY--Y2x', 'KNY--Y2X', 'KYY--C1x', 'KYY--C1X', 'KYY--C2x', 'KYY--C2X',
'KYY--Y1x', 'KYY--Y1X', 'KYY--Y2x', 'KYY--Y2X', 'KNF--C1x', 'KNF--C1X',
'KNF--C2x', 'KNF--C2X', 'KNF--Y1x', 'KNF--Y1X', 'KNF--Y2x', 'KNF--Y2X',
'KYF--C1x', 'KYF--C1X', 'KYF--C2x', 'KYF--C2X', 'KYF--Y1x', 'KYF--Y1X',
'KYF--Y2x', 'KYF--Y2X', 'KNYNYC1x', 'KNYNYC1X', 'KNYNYC2x', 'KNYNYC2X',
'KNYNYY1x', 'KNYNYY1X', 'KNYNYY2x', 'KNYNYY2X', 'KYYYYC1x', 'KYYYYC1X',
'KYYYYC2x', 'KYYYYC2X', 'KYYYYY1x', 'KYYYYY1X', 'KYYYYY2x', 'KYYYYY2X',
'KNFNFC1x', 'KNFNFC1X', 'KNFNFC2x', 'KNFNFC2X', 'KNFNFY1x', 'KNFNFY1X',
'KNFNFY2x', 'KNFNFY2X', 'KYFYFC1x', 'KYFYFC1X', 'KYFYFC2x', 'KYFYFC2X',
'KYFYFY1x', 'KYFYFY1X', 'KYFYFY2x', 'KYFYFY2X', 'TNY--C1x', 'TNY--C1X',
'TNY--C2x', 'TNY--C2X', 'TNY--Y1x', 'TNY--Y1X', 'TNY--Y2x', 'TNY--Y2X',
'TYY--C1x', 'TYY--C1X', 'TYY--C2x', 'TYY--C2X', 'TYY--Y1x', 'TYY--Y1X',
'TYY--Y2x', 'TYY--Y2X', 'TNF--C1x', 'TNF--C1X', 'TNF--C2x', 'TNF--C2X',
'TNF--Y1x', 'TNF--Y1X', 'TNF--Y2x', 'TNF--Y2X', 'TYF--C1x', 'TYF--C1X',
'TYF--C2x', 'TYF--C2X', 'TYF--Y1x', 'TYF--Y1X', 'TYF--Y2x', 'TYF--Y2X',
'TNYNYC1x', 'TNYNYC1X', 'TNYNYC2x', 'TNYNYC2X', 'TNYNYY1x', 'TNYNYY1X',
'TNYNYY2x', 'TNYNYY2X', 'TYYYYC1x', 'TYYYYC1X', 'TYYYYC2x', 'TYYYYC2X',
'TYYYYY1x', 'TYYYYY1X', 'TYYYYY2x', 'TYYYYY2X', 'TNFNFC1x', 'TNFNFC1X',
'TNFNFC2x', 'TNFNFC2X', 'TNFNFY1x', 'TNFNFY1X', 'TNFNFY2x', 'TNFNFY2X',
'TYFYFC1x', 'TYFYFC1X', 'TYFYFC2x', 'TYFYFC2X', 'TYFYFY1x', 'TYFYFY1X',
'TYFYFY2x', 'TYFYFY2X'
]
REPORTDAYS = [
0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366, 397, 425, 456,
486, 517, 547, 578, 609, 639, 670, 700, 731, 762, 790, 821, 851, 882, 912,
943, 974, 1004, 1035, 1065, 1096, 1127, 1155, 1186, 1216, 1247, 1277, 1308,
1339, 1369, 1400, 1430, 1461, 1492, 1521, 1552, 1582, 1613, 1643, 1674,
1705, 1735, 1766, 1796, 1827, 1858, 1886, 1917, 1947, 1978, 2008, 2039,
2070, 2100, 2131, 2161, 2192, 2223, 2251, 2282, 2312, 2343, 2373, 2404,
2435, 2465, 2496, 2526, 2557, 2588, 2616, 2647, 2677, 2708, 2738, 2769,
2800, 2830, 2861, 2891, 2922, 2953, 2982, 3013, 3043, 3074, 3104, 3135,
3166, 3196, 3227, 3257, 3288, 3319, 3347, 3378, 3408, 3439, 3469, 3500,
3531, 3561, 3592, 3622, 3653, 3684, 3712, 3743, 3773, 3804, 3834, 3865,
3896, 3926, 3957, 3987, 4018, 4049, 4077, 4108, 4138, 4169, 4199, 4230,
4261, 4291, 4322, 4352, 4383, 4414, 4443, 4474, 4504, 4535, 4565, 4596,
4627, 4657, 4688, 4718, 4749, 4780, 4808, 4839, 4869, 4900, 4930, 4961,
4992, 5022, 5053, 5083, 5114, 5145, 5173, 5204, 5234, 5265, 5295, 5326,
5357, 5387, 5418, 5448, 5479, 5510, 5538, 5569, 5599, 5630, 5660, 5691,
5722, 5752, 5783, 5813, 5844, 5875, 5904, 5935, 5965, 5996, 6026, 6057,
6088, 6118, 6149, 6179, 6210, 6241, 6269, 6300, 6330, 6361, 6391, 6422,
6453, 6483, 6514, 6544, 6575, 6606, 6634, 6665, 6695, 6726, 6756, 6787,
6818, 6848, 6879, 6909, 6940, 6971, 6999, 7030, 7060, 7091, 7121, 7152,
7183, 7213, 7244, 7274, 7305, 7336, 7365, 7396, 7426, 7457, 7487, 7518,
7549, 7579, 7610, 7640, 7671, 7702, 7730, 7761, 7791, 7822, 7852, 7883,
7914, 7944, 7975, 8005, 8036, 8067, 8095, 8126, 8156, 8187, 8217, 8248,
8279, 8309, 8340, 8370, 8401, 8432, 8460, 8491, 8521, 8552, 8582, 8613,
8644, 8674, 8705, 8735, 8766, 8797, 8826, 8857, 8887, 8918, 8948, 8979,
9010, 9040, 9071, 9101, 9132, 9163, 9191, 9222, 9252, 9283, 9313, 9344,
9375, 9405, 9436, 9466, 9497, 9528, 9556, 9587, 9617, 9648, 9678, 9709,
9740, 9770, 9801, 9831, 9862, 9893, 9921, 9952, 9982, 10013, 10043, 10074,
10105, 10135, 10166, 10196, 10227, 10258, 10287, 10318, 10348, 10379,
10409, 10440, 10471, 10501, 10532, 10562, 10593, 10624, 10652, 10683,
10713, 10744, 10774, 10805, 10836, 10866, 10897, 10927, 10958
]
FIVE_YR_CYCLING_SWITCH_DAYS = [
0, 3653, # Burn-in
5478, # First Five-Year Period
7303, # Second Period
9128, # Third
10953, # Fourth / Last
10958 # Residue due to 365-and-calendar difference
]
FIRST_ROW_AFTER_BURNIN = 120
ANNOTATION_X_LOCATION = 3833
fig4_mft_most_dang_double_2_2_geno_index = [
6,
7,
14,
15,
22,
23,
30,
31,
38,
39,
46,
47,
54,
55,
62,
63,
70,
71,
78,
79,
86,
87,
94,
95,
102,
103,
110,
111,
118,
119,
126,
127
]
fig4_mft_most_dang_double_2_4_geno_index = [
20, 21, 22, 23, 52, 53, 54, 55, 76, 77, 78, 79, 108, 109, 110, 111
]
res_count_by_genotype_dhappq = [
'0-0',
'0-0',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'0-0',
'0-0',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'0-0',
'0-0',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'0-0',
'0-0',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'0-0',
'0-0',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'0-0',
'0-0',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'0-0',
'0-0',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'0-0',
'0-0',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'0-0',
'0-0',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'0-0',
'0-0',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'0-0',
'0-0',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'0-0',
'0-0',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'0-0',
'0-0',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'0-0',
'0-0',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'0-0',
'0-0',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'0-0',
'0-0',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2'
]
res_count_by_genotype_asaq = [
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'2-2',
'2-2',
'1-2',
'1-2',
'1-2',
'1-2',
'2-3',
'2-3',
'2-3',
'2-3',
'0-0',
'0-0',
'0-0',
'0-0',
'1-1',
'1-1',
'1-1',
'1-1',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'2-2',
'2-2',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'2-2',
'2-2',
'1-2',
'1-2',
'1-2',
'1-2',
'2-3',
'2-3',
'2-3',
'2-3',
'0-0',
'0-0',
'0-0',
'0-0',
'1-1',
'1-1',
'1-1',
'1-1',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'2-2',
'2-2',
'1-2',
'1-2',
'1-2',
'1-2',
'2-3',
'2-3',
'2-3',
'2-3',
'1-3',
'1-3',
'1-3',
'1-3',
'2-4',
'2-4',
'2-4',
'2-4',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'2-2',
'2-2',
'1-2',
'1-2',
'1-2',
'1-2',
'2-3',
'2-3',
'2-3',
'2-3',
'1-2',
'1-2',
'1-2',
'1-2',
'2-3',
'2-3',
'2-3',
'2-3',
'1-3',
'1-3',
'1-3',
'1-3',
'2-4',
'2-4',
'2-4',
'2-4',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'2-2',
'2-2',
'1-2',
'1-2',
'1-2',
'1-2',
'2-3',
'2-3',
'2-3',
'2-3'
]
res_count_by_genotype_al = [
'1-2',
'1-2',
'1-2',
'1-2',
'2-3',
'2-3',
'2-3',
'2-3',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'2-2',
'2-2',
'1-3',
'1-3',
'1-3',
'1-3',
'2-4',
'2-4',
'2-4',
'2-4',
'1-2',
'1-2',
'1-2',
'1-2',
'2-3',
'2-3',
'2-3',
'2-3',
'1-2',
'1-2',
'1-2',
'1-2',
'2-3',
'2-3',
'2-3',
'2-3',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'2-2',
'2-2',
'1-3',
'1-3',
'1-3',
'1-3',
'2-4',
'2-4',
'2-4',
'2-4',
'1-2',
'1-2',
'1-2',
'1-2',
'2-3',
'2-3',
'2-3',
'2-3',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'2-2',
'2-2',
'0-0',
'0-0',
'0-0',
'0-0',
'1-1',
'1-1',
'1-1',
'1-1',
'1-2',
'1-2',
'1-2',
'1-2',
'2-3',
'2-3',
'2-3',
'2-3',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'2-2',
'2-2',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'2-2',
'2-2',
'0-0',
'0-0',
'0-0',
'0-0',
'1-1',
'1-1',
'1-1',
'1-1',
'1-2',
'1-2',
'1-2',
'1-2',
'2-3',
'2-3',
'2-3',
'2-3',
'1-1',
'1-1',
'1-1',
'1-1',
'2-2',
'2-2',
'2-2',
'2-2'
]
|
# -*- coding: utf-8 -*-
"""
mongoop.default_settings
~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2015 by Lujeni.
:license: BSD, see LICENSE for more details.
"""
mongodb_host = 'localhost'
mongodb_port = 27017
mongodb_credentials = None
mongodb_options = None
frequency = 10
threshold_timeout = 60
op_triggers = None
balancer_triggers = None
query = None
|
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def getIntersectionNode(self, headA, headB):
a, b = headA, headB
while a != b:
a = a.next if a else headB
b = b.next if b else headA
return a
|
# -*- coding: utf-8 -*-
# @Author : LG
"""
执行用时:108 ms, 在所有 Python3 提交中击败了96.06% 的用户
内存消耗:15.8 MB, 在所有 Python3 提交中击败了25.37% 的用户
解题思路:
先在树中找到与链表第一个节点相同值的 树节点
然后以这些树中节点为根的子树中寻找是否存在链表
"""
class Solution:
def isSubPath(self, head: ListNode, root: TreeNode) -> bool:
def Sub(root, head): # 递归在子树中判断是否当前子树存在链表
# print(root, head)
if head==None: # 如果链表匹配完,则返回True,存在
return True
elif root and head:
if root.val == head.val:
if Sub(root.left, head.next):
return True
if Sub(root.right, head.next):
return True
nodes = []
def find(root, head): # 递归寻找树中所有与链表首节点值相同的树节点
if root:
if root.val == head.val: # 如果当前节点值等于链表首节点值,记录
nodes.append(root)
find(root.left, head)
find(root.right, head)
find(root, head)
for node in nodes:
if Sub(node, head): # 判断所有子树是否存在
return True
return False |
class DriverMeta(type):
def __instancecheck__(cls, __instance) -> bool:
return cls.__subclasscheck__(type(__instance))
def __subclasscheck__(cls, __subclass: type) -> bool:
return (
hasattr(__subclass, 'create') and callable(__subclass.create)
) and (
hasattr(__subclass, 'logs') and callable(__subclass.logs)
) and (
hasattr(__subclass, 'stats') and callable(__subclass.stats)
) and (
hasattr(__subclass, 'stop') and callable(__subclass.stop)
) and (
hasattr(__subclass, 'cleanup') and callable(__subclass.cleanup)
) and (
hasattr(__subclass, 'wait') and callable(__subclass.wait)
)
class Driver(metaclass=DriverMeta):
pass
|
# Simple example using ifs
cars = ['volks', 'ford', 'audi', 'bmw', 'toyota']
for car in cars:
if car == 'bmw':
print(car.upper())
else:
print(car.title())
# Comparing Values
#
# requested_toppings = 'mushrooms'
# if requested_toppings != 'anchovies':
# print('Hold the Anchovies')
#
#
# # Checking a value not in a list
#
# banned_users = ['andrew', 'claudia', 'jorge']
# user = 'marie'
#
# if user not in banned_users:
# print(f'{user.title()}, you can post a message here')
age = 18
if age >= 18:
print('OK to vote')
|
class Squad():
def __init__(self, handler, role, hold_point):
self.handler = handler
if len(handler.squads[role]) > 0:
self.id = handler.squads[role][-1].id + 1
else:
self.id = 1
self.units = {
handler.unit.MARINE: [],
handler.unit.SIEGETANK: []
} # type : [unit]
self.role = role
self.composition = self.handler.composition(self.role)
self.full = False
self.hold_point = hold_point
self.on_mission = False
def assign(self, unit):
self.units[unit.unit_type].append(unit)
def train(self):
self.full = True
for unit_type, amount in self.composition.items():
if len(self.units[unit_type]) < amount:
self.full = False
#print("Train " + unit_type.name)
self.handler.train(unit_type, amount - len(self.units[unit_type]))
def move_to_hold_point(self):
self.move(self.hold_point)
def move(self, pos):
for _, units in self.units.items():
for unit in units:
if util.distance(unit.position, pos) > 3:
if unit.unit_type == self.handler.unit.SIEGETANKSIEGED:
unit.morph(self.handler.unit.SIEGETANK)
unit.move(pos)
elif unit.unit_type == self.handler.unit.SIEGETANK:
unit.morph(self.handler.unit.SIEGETANKSIEGED)
def attack_move(self, pos):
for unit_type, units in self.units.items():
for unit in units:
if unit_type == self.handler.unit.SIEGETANK:
unit.morph(self.handler.unit.SIEGETANK)
if unit.is_idle:
unit.attack_move(pos)
def is_empty(self):
return len(self.units[self.handler.unit.MARINE]) == 0 and len(self.units[self.handler.unit.SIEGETANK]) == 0
|
# https://leetcode.com/problems/unique-binary-search-trees-ii/
# 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 generateTrees(self, n):
"""
:type n: int
:rtype: List[TreeNode]
"""
if n == 0:
return []
return self.calculate(1, n)
def calculate(self, start, end):
result = []
if start > end:
result.append(None)
return result
for i in range(start, end + 1):
leftsubtree = self.calculate(start, i - 1)
rightsubtree = self.calculate(i + 1, end)
for j in range(len(leftsubtree)):
for k in range(len(rightsubtree)):
root = TreeNode(i)
root.left = leftsubtree[j]
root.right = rightsubtree[k]
result.append(root)
return result
|
infile=open('pairin.txt','r')
n=int(infile.readline().strip())
dic={}
for i in range(2*n):
sn=int(infile.readline().strip())
if sn not in dic:
dic[sn]=i
else:
dic[sn]-=i
maxkey=min(dic,key=dic.get)
outfile=open('pairout.txt','w')
outfile.write(str(abs(dic[maxkey])))
outfile.close() |
"""
Queue via Stacks
Implement a MyQueue class which implements a queue using two stacks.
Questions and Assumptions:
Model 1: Back to Back ArrayStacks
MyQ
stack1 stack2
t2 t1
[ ][ x1 x2 x3 x4]
f ? b
1. Interface:
- enqueue
- dequeue
- front
2. Top Down
- enq ----> popping from the front
- deq ---> adding item to the end
3. Do the stacks have any size limits?
- assume no
- But,
4. Time Constraints on the Data Structure?
- for now assume none
5. Should we account for error handling e.g. dequeing from an empty queue?
Break Down the Problem - is it possible to implement a q w/ 1 stack?
no, b/c LIFO not FIFO
[x1 x2 x3 x4 x5]
t1
how to go from LIFO -> FIFO using a second stack?
Brainstorming:
1. use a second stack to reverse the first
- fill up the first stack however much
- once it got full, pop all the items into another stack
- then if someone calls pop, pop normally from the second stack
[x6 ]
t1
[x5 x4 x3 x2 x1]
t2
Pros:
- slow
- imposes size restrictions
2. Using a LinkedList to immplement the stack
- intuition: use stack2 to get access to the "bottom" stack1
- approach:
- enqueue - append to the tail of a ll
- deq - delete head
- front - return item at the end
Pros:
- resolves ambiguity about middle
- no size restrictions
- fast
"""
class QueueNode:
"""Regular to a node in a regular singly linked list."""
def __init__(self, val):
self.val = val
self.next = None
class MyQueue:
def __init__(self, top: QueueNode):
self.top, self.back = top, None
def front(self):
if self.top is not None:
return self.top.val
def enqueue(self, node: QueueNode):
# TODO: test cases for all 3 scenarios; and refactor
# no current head
if not self.top:
self.top = node
# no current tail
elif not self.back:
self.back = node
# adding a node after the current
else:
self.back.next = node
self.back = node
def dequeue(self) -> QueueNode:
if self.top is not None:
front = self.top
self.top = self.top.next
return front
if __name__ == "__main__":
# A: init MyQ w/ no head or tail, then enQ
q = MyQueue(None)
x1 = QueueNode(1)
q.enqueue(x1)
assert q.top == x1
assert q.top.next == None
assert q.back == None
assert q.top.next == q.back
# B: init MyQ w/ a head, then enQ
# C: enq after there's a head and tail
pass
"""
top = None
back = None
List
____
"""
|
class Solution(object):
def singleNumber(self, nums):
"""
:type nums: List[int]
:rtype: List[int]
"""
workingset = set()
for n in nums:
if n not in workingset:
workingset.add(n)
else:
workingset.remove(n)
return list(workingset)
|
'''
Created on Dec 4, 2017
@author: atip
'''
def getAdjSquareSum():
global posX, posY, valMatrix
adjSquareSum = 0
adjSquareSum += valMatrix[maxRange + posX + 1][maxRange + posY]
adjSquareSum += valMatrix[maxRange + posX + 1][maxRange + posY + 1]
adjSquareSum += valMatrix[maxRange + posX][maxRange + posY + 1]
adjSquareSum += valMatrix[maxRange + posX - 1][maxRange + posY + 1]
adjSquareSum += valMatrix[maxRange + posX - 1][maxRange + posY]
adjSquareSum += valMatrix[maxRange + posX - 1][maxRange + posY - 1]
adjSquareSum += valMatrix[maxRange + posX][maxRange + posY - 1]
adjSquareSum += valMatrix[maxRange + posX + 1][maxRange + posY - 1]
return adjSquareSum
def check():
global posX, posY, theirNumber, maxRange, valMatrix
found = valMatrix[maxRange + posX][maxRange + posY] > theirNumber
if found:
print("[{}][{}] +++> {}".format(posX, posY, valMatrix[maxRange + posX][maxRange + posY]))
return found
def checkAndUpdate():
global posX, posY, theirNumber, maxRange, valMatrix
crtSum = getAdjSquareSum()
if crtSum == 0:
crtSum = 1
valMatrix[maxRange + posX][maxRange + posY] = crtSum
print("[{}][{}] => {}".format(posX, posY, crtSum))
return check()
def goSpiraling(stepX, stepY):
global posX, posY, theirNumber, maxRange, valMatrix
finished = False
while stepX > 0 and not finished:
print("stepX > 0 : stepX: {}, posX: {}".format(stepX, posX))
posX += 1
stepX -= 1
finished = checkAndUpdate()
# finished = True
while stepX < 0 and not finished:
print("stepX < 0 : stepX: {}, posX: {}".format(stepX, posX))
posX -= 1
stepX += 1
finished = checkAndUpdate()
# finished = True
while stepY > 0 and not finished:
print("stepY > 0 : stepY: {}, posY: {}".format(stepY, posY))
posY += 1
stepY -= 1
finished = checkAndUpdate()
# finished = True
while stepY < 0 and not finished:
print("stepY < 0 : stepY: {}, posY: {}".format(stepY, posY))
posY -= 1
stepY += 1
finished = checkAndUpdate()
# finished = True
if valMatrix[maxRange + posX][maxRange + posY] > theirNumber:
return check()
return False
print("Let us begin!")
theirNumber = 265149 # 438
# theirNumber = 1 #0
# theirNumber = 747
valMatrix = [[0 for col in range(200)] for row in range(200)]
maxRange = 100
maxNo = 1
crtStep = 0
posX = 0
posY = 0
finished = False
crtNumber = 1
valMatrix[maxRange + posX][maxRange + posY] = 1
while not finished:
finished = goSpiraling(1, 0)
crtStep += 1
if not finished:
finished = goSpiraling(0, crtStep)
crtStep += 1
if not finished:
finished = goSpiraling(-crtStep, 0)
if not finished:
finished = goSpiraling(0, -crtStep)
if not finished:
finished = goSpiraling(crtStep, 0)
print("[{}][{}] ==>> {}".format(posX, posY, valMatrix[maxRange + posX][maxRange + posY]))
|
#
# @lc app=leetcode id=77 lang=python3
#
# [77] Combinations
#
# @lc code=start
class Solution:
def combine(self, n, k):
self.ans = []
nums = [num for num in range(1, n + 1)]
if n == k:
self.ans.append(nums)
return self.ans
else:
ls = []
self.helper(nums, k, ls)
return self.ans
def helper(self, array, k, current_ls):
if k > len(array):
return
if k == 0:
self.ans.append(current_ls)
for i in range(len(array)):
self.helper(array[i + 1:], k - 1, [array[i]] + current_ls)
# @lc code=end
|
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/
#
# 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, dis-
# tribute, sublicense, and/or sell copies of the Software, and to permit
# persons to whom the Software is furnished to do so, subject to the fol-
# lowing 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 MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
# SHALL THE AUTHOR 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.
def get(prop, choices=None):
prompt = prop.verbose_name
if not prompt:
prompt = prop.name
if choices:
if callable(choices):
choices = choices()
else:
choices = prop.get_choices()
valid = False
while not valid:
if choices:
min = 1
max = len(choices)
for i in range(min, max+1):
value = choices[i-1]
if isinstance(value, tuple):
value = value[0]
print('[%d] %s' % (i, value))
value = raw_input('%s [%d-%d]: ' % (prompt, min, max))
try:
int_value = int(value)
value = choices[int_value-1]
if isinstance(value, tuple):
value = value[1]
valid = True
except ValueError:
print('%s is not a valid choice' % value)
except IndexError:
print('%s is not within the range[%d-%d]' % (min, max))
else:
value = raw_input('%s: ' % prompt)
try:
value = prop.validate(value)
if prop.empty(value) and prop.required:
print('A value is required')
else:
valid = True
except:
print('Invalid value: %s' % value)
return value
|
"""
Linear search is used on a collections of items. It relies on the technique of traversing a list from
start to end by exploring properties of all the elements that are found on the way.
The time complexity of the linear search is O(N) because each element in an array is compared only once.
"""
def linear_search(arr_param, item):
pos = 0
found = False
while pos < len(arr_param) and not found:
if arr_param[pos] == item:
found = True
print("Position", pos)
else:
pos += 1
return found
arr = []
print("Linear Search\n")
# array size
m = int(input("Enter the array size:>>"))
# array input
print("Enter the array elements(new line):\n")
for l in range(m):
arr.append(int(input()))
# input search element
find = int(input("Enter the search value:>>"))
# search the element in input array
print("Value Found" if linear_search(arr, find) else "Value Not Found")
|
METR_LA_DATASET_NAME = 'metr_la'
PEMS_BAY_DATASET_NAME = 'pems_bay'
IN_MEMORY = 'mem'
ON_DISK = 'disk'
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.