content
stringlengths 7
1.05M
|
---|
# return n * (n+1) / 2
with open('./input', encoding='utf8') as file:
coord_strs = file.readline().strip()[12:].split(', ')
x_range = [int(val) for val in coord_strs[0].split('=')[1].split('..')]
y_range = [int(val) for val in coord_strs[1].split('=')[1].split('..')]
y_speed = abs(y_range[0])-1
print(y_speed * (y_speed+1)/2)
|
DEFAULT_CELERY_BROKER_LOGIN_METHOD = 'AMQPLAIN'
DEFAULT_CELERY_BROKER_URL = None
DEFAULT_CELERY_BROKER_USE_SSL = None
DEFAULT_CELERY_RESULT_BACKEND = None
|
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
Welcome to vivo !
输入:
(()(()((()(0)))))
输出:
5
'''
def solution(s):
#TODO Write your code here
giftIndex = findGift(s)
ret = []
for gitf in giftIndex:
cur = getMin(s, gitf)
ret.append(cur)
return min(ret)
def findGift(s):
"""找到礼物的位置"""
ret = []
for index, c in enumerate(s):
if c == '0':
ret.append(index)
return ret
def getMin(s, index):
"""给定s与礼物位置,找出最少需要拆的盒子"""
stack = []
# maps = {')':'('}
for i, c in enumerate(s[:index]):
if c == '(':
stack.append(c)
else:
stack.pop()
return len(stack)
def test():
s = "(()(()((()(0)))))"
ret = solution(s)
print(ret)
def inputs():
input = input()
print(solution(input))
if __name__ == '__main__':
test() |
A, B ,C= map(int, input().split())
D=int(input())
C+=D
if C>59:
B+=C//60
C=C%60
if B>59:
A+=B//60
B=B%60
if A>23:
A=A%24
print(A,B,C)
else:
print(A,B,C)
else:
print(A,B,C)
else:
print(A,B,C) |
def makeprefixsum(nums):
prefixsum = [0] * (len(nums) + 1)
for i in range(1, len(nums)+1):
prefixsum[i] = prefixsum[i-1] + nums[i-1]
return prefixsum
def rsq(prefixsum, l, r): # Range Sum Query
return prefixsum[r] - prefixsum[l]
def countzeroes(nums, l, r):
cnt = 0 # complexity O(NM) N - lenght of array, M - number of requests
for i in range(i, r):
if nums[i] == 0:
cnt += 1
return cnt
# Faster solution O(N+M)
def makeprefixsum(nums):
prefixsum = [0] * (len(nums) + 1)
for i in range(1, len(nums)+1):
if nums[i-1] == 0:
prefixsum[i] = prefixsum[i-1] + 1
else:
prefixsum[i] = prefixsum[i-1]
return prefixsum
def countzeroes(nums, l, r):
return prefixsum[r] - prefixsum[l]
# O(n**3)
def countzerossumranges(nums):
cntranges = 0
for i in range(len(nums)): # Left boundary
for j in range(i+1, len(nums)+1): # Right boundary
rangesum = 0
for k in range(i, j):
rangesum += nums[k]
if rangesum == 0:
cntranges += 1
return cntranges
# O(n)
def countprefixsum(nums):
prefixsumbyvalue = {0: 1}
nowsum = 0
for now in nums:
nowsum += now
if nowsum not in prefixsumbyvalue:
prefixsumbyvalue[nowsum] = 0
prefixsumbyvalue[nowsum] += 1
return prefixsumbyvalue
def countzerossumrange(prefixsumbyvalue):
cntranges = 0
for nowsum in prefixsumbyvalue:
cntsum = prefixsumbyvalue[nowsum]
cntranges += cntsum * (cntsum - 1) // 2
return cntranges
# O(n*n)
def cntpairswithdiffgtk(sortednums, k):
contpairs = 0
for first in range(len(sortednums)):
for last in range(first, len(sortednums)):
if sortednums[last] - sortednums[first] > k:
contpairs += 1
return contpairs
# cntpairswithdiffgtk([1,3,5,6], 3) -> 2
# O(n)
def cntpairswithdiffgtk(sortednums, k):
contpairs = 0
last = 0
for first in range(len(sortednums)):
while last < len(sortednums) and sortednums[last] - sortednums[first] <= k:
last += 1
contpairs += len(sortednums) - last
return contpairs
def merge(nums1, nums2):
merged = [0] * len(nums1) + [0] * len(nums2)
first1 = first2 = 0
inf = max(nums1[-1], nums2[-1]) + 1
nums1.append(inf)
nums2.append(inf)
for k in range(len(nums1) + len(nums2) - 2):
if nums1[first1] <= nums2[first2]:
merged[k] = nums1[first1]
first1 += 1
else:
merged[k] = nums2[first2]
first2 += 1
nums1.pop()
nums2.pop()
return merged
# O(N+M)
def mergebetter(nums1, nums2):
merged = [0] * len(nums1) + [0] * len(nums2)
first1 = first2 = 0
for k in range(len(nums1) + len(nums2)):
if (first1 != len(nums1)) and (first2 == len(nums2) or nums1[first1] < nums2[first2]):
merged[k] = nums1[first1]
first1 += 1
else:
merged[k] = nums2[first2]
first2 += 1
return merged
|
"""155. Min Stack
References:
https://leetcode.com/problems/min-stack/
https://leetcode-cn.com/problems/min-stack/
"""
class MinStack:
"""辅助栈
定义「数据栈」支持`push`、`pop`、`top` 操作
定义「辅助栈」保持栈顶元素为当前的最小值
当元素入数据栈时,如果此元素不大于辅助栈的栈顶元素,那么此元素也需要压入辅助栈的栈顶;
当元素从栈顶被弹出时,如果此元素等于辅助栈的栈顶元素,即此元素就是当前的最小值,也需要从辅助栈弹出
* 时间复杂度: O(1)
* 空间复杂度: O(N),其中`N`为总操作数,最坏情况下,我们会连续插入`N`个元素,此时两个栈占用的空间为 O(N)
"""
def __init__(self):
self._stack = list()
self._min_stack = list()
def push(self, val: int) -> None:
self._stack.append(val)
if not self._min_stack or val <= self._min_stack[-1]:
self._min_stack.append(val)
def pop(self) -> None:
val = self._stack.pop()
if self._min_stack[-1] == val:
self._min_stack.pop()
def top(self) -> int:
return self._stack[-1]
def get_min(self) -> int:
return self._min_stack[-1]
|
""" Date : Mars 2020
Projet : MOOC Python 3 - France Université Numérique
Objectif:
Écrire un programme qui aide le croupier à déterminer la somme que le casino doit donner au joueur.
Le programme lira, dans l’ordre, deux nombres entiers en entrée : le pari du joueur (représenté par un nombre entre 0 et 16, voir description plus bas),
et le numéro issu du tirage (nombre entre 0 et 12). Le programme affichera alors le montant gagné par le joueur.
Entrées pour le pari du joueur :
nombre entre 0 et 12 : le joueur parie sur le numéro correspondant
13 : le joueur parie sur pair
14 : le joueur parie sur impair
15 : le joueur parie sur la couleur rouge
16 : le joueur parie sur la couleur noire.
Consignes:
Ne mettez pas d'argument dans les input : data = input() et non data = input("Donnée suivante:") par exemple.
Le résultat doit juste faire l’objet d’un print(res) sans texte supplémentaire (pas de print("résultat =", res) par exemple).
"""
mise = 10 #Somme fixe de 10 euros du joueur
pari = int(input())
numero = int(input())
if pari == 13 and (numero == 0 or numero == 2 or numero == 4 or numero == 6 or numero == 8 or numero == 11):
print (2 * mise)
elif pari == 14 and (numero == 1 or numero == 3 or numero == 5 or numero == 7 or numero == 9):
print(2 * mise)
elif pari == 15 and (numero == 1 or numero == 3 or numero == 5 or numero == 7 or numero == 9):
print(2 * mise)
elif pari == 16 and (numero == 2 or numero == 4 or numero == 6 or numero == 8 or numero == 11):
print (2 * mise)
elif pari <= 12 and (pari == numero):
print(12 * mise)
else:
print("0") |
number_of_nice_strings=0
with open("input.txt") as input:
for line in input:
line=line.rstrip()
#chack vowels
num_of_vowels=0
vowels=["a","e","i","o","u"]
vowels_dict={}
for vowel in vowels:
if vowel in line:
vowels_dict[vowel] = line.count(vowel)
for (k,v) in vowels_dict.items():
num_of_vowels +=v
#check repeatable letters
repeatable_letters={}
for i in range(len(line)):
if i == len(line)-1:
break
# print("Letter is : {}".format(line[i]))
if line[i] == line[i+1]:
# print("Repeat of letter: {}".format(line[i]))
repeatable_letters[line[i]]=1
#chack if does not contain the fallowing
contains_not_wanted=False
not_wanted=["ab","cd","pq","xy"]
for nw in not_wanted:
if nw in line:
contains_not_wanted=True
break;
print("{} has {} vowels.".format(line,num_of_vowels))
print("{} has {} repeating letters.".format(line,len(repeatable_letters)))
print("{} contains unwanted substrings: {}".format(line,contains_not_wanted))
if num_of_vowels >=3 and not contains_not_wanted and len(repeatable_letters)>0:
number_of_nice_strings +=1
print("{} is nice.".format(line))
else:
print("{} is bad.".format(line))
print("Number of good strings is : {}".format(number_of_nice_strings)) |
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 12 13:06:05 2022
@author: Pedro
"""
#%% ejercicio 2
def a_count(string1: str) -> int:
counter = 0
for i in string1:
t = i.lower()
if t == "a":
counter += 1
return counter
#%%ejercicio 5
def ip_colmillos(ip: str) -> str:
ip = ip.split(".")
return "[.]".join(ip)
#%%ejercicio 6
def finding_joyas(piedras: str, joyas: str) -> int:
counter = 0
for i in joyas:
if i in piedras:
counter += 1
return counter
#%% ejercicio 10
a = ord('a')
print (a)
|
data1 = {
'board': {
'snakes': [
{'body': [
{'x': 5, 'y': 5},
{'x': 5, 'y': 6},
{'x': 4, 'y': 6},
{'x': 3, 'y': 6},
{'x': 3, 'y': 5},
{'x': 3, 'y': 4},
{'x': 4, 'y': 4},
{'x': 5, 'y': 4},
{'x': 6, 'y': 4},
{'x': 7, 'y': 4}
],
'health': 100,
'id': 'testsnake',
'length': 10,
'name': 'testsnake',
'object': 'snake'
}
],
'height': 10,
'width': 10,
'food': [
{'x': 2, 'y': 2},
]
},
'you': {
'body': [
{'x': 5, 'y': 5},
{'x': 5, 'y': 6},
{'x': 4, 'y': 6},
{'x': 3, 'y': 6},
{'x': 3, 'y': 5},
{'x': 3, 'y': 4},
{'x': 4, 'y': 6},
{'x': 5, 'y': 6},
{'x': 6, 'y': 6},
{'x': 7, 'y': 6}
],
'health': 100,
'id': 'testsnake',
'length': 10,
'name': 'testsnake',
'object': 'snake'
}
}
data2 = {
'board': {
'snakes': [
{'body': [
{'x': 5, 'y': 5},
{'x': 5, 'y': 6},
{'x': 5, 'y': 7},
{'x': 4, 'y': 7},
{'x': 3, 'y': 7},
{'x': 2, 'y': 7},
{'x': 2, 'y': 6},
{'x': 2, 'y': 5},
{'x': 2, 'y': 4},
{'x': 3, 'y': 4},
{'x': 4, 'y': 4},
{'x': 5, 'y': 4},
{'x': 6, 'y': 4},
{'x': 7, 'y': 4}
],
'health': 100,
'id': 'testsnake',
'length': 14,
'name': 'testsnake',
'object': 'snake'
}
],
'height': 10,
'width': 10,
'food': [
{'x': 2, 'y': 2},
]
},
'you': {
'body': [
{'x': 5, 'y': 5},
{'x': 5, 'y': 6},
{'x': 5, 'y': 7},
{'x': 4, 'y': 7},
{'x': 3, 'y': 7},
{'x': 2, 'y': 7},
{'x': 2, 'y': 6},
{'x': 2, 'y': 5},
{'x': 2, 'y': 4},
{'x': 3, 'y': 4},
{'x': 4, 'y': 4},
{'x': 5, 'y': 4},
{'x': 6, 'y': 4},
{'x': 7, 'y': 4}
],
'health': 100,
'id': 'testsnake',
'length': 14,
'name': 'testsnake',
'object': 'snake'
}
}
data3 = {
'board': {
'snakes': [
{'body': [
{'x': 0, 'y': 1},
{'x': 1, 'y': 1}
],
'health': 100,
'id': 'testsnake',
'length': 2,
'name': 'testsnake',
'object': 'snake'
}
],
'height': 10,
'width': 10,
'food': [
{'x': 5, 'y': 5},
]
},
'you': {
'body': [
{'x': 0, 'y': 1},
{'x': 1, 'y': 1}
],
'health': 100,
'id': 'testsnake',
'length': 2,
'name': 'testsnake',
'object': 'snake'
}
}
data4 = {
'board': {
'snakes': [
{'body': [
{'x': 2, 'y': 0},
{'x': 1, 'y': 0},
{'x': 0, 'y': 0},
{'x': 0, 'y': 1}
],
'health': 100,
'id': 'testsnake',
'length': 4,
'name': 'testsnake',
'object': 'snake'
}
],
'height': 10,
'width': 10,
'food': [
{'x': 1, 'y': 1},
]
},
'you': {
'body': [
{'x': 2, 'y': 0},
{'x': 1, 'y': 0},
{'x': 0, 'y': 0},
{'x': 0, 'y': 1}
],
'health': 100,
'id': 'testsnake',
'length': 4,
'name': 'testsnake',
'object': 'snake'
}
}
data5 = {
'board': {
'snakes': [
{'body': [
{'x': 3, 'y': 0},
{'x': 3, 'y': 0},
{'x': 3, 'y': 0}
],
'health': 100,
'id': 'testsnake',
'length': 3,
'name': 'testsnake',
'object': 'snake'
}
],
'height': 10,
'width': 10,
'food': [
{'x': 1, 'y': 1},
]
},
'you': {
'body': [
{'x': 3, 'y': 0},
{'x': 3, 'y': 0},
{'x': 3, 'y': 0}
],
'health': 100,
'id': 'testsnake',
'length': 3,
'name': 'testsnake',
'object': 'snake'
}
}
data52 = {
'board': {
'snakes': [
{'body': [
{'x': 0, 'y': 3},
{'x': 0, 'y': 3},
{'x': 0, 'y': 3}
],
'health': 100,
'id': 'testsnake',
'length': 3,
'name': 'testsnake',
'object': 'snake'
}
],
'height': 10,
'width': 10,
'food': [
{'x': 1, 'y': 1},
]
},
'you': {
'body': [
{'x': 0, 'y': 3},
{'x': 0, 'y': 3},
{'x': 0, 'y': 3}
],
'health': 100,
'id': 'testsnake',
'length': 3,
'name': 'testsnake',
'object': 'snake'
}
}
data53 = {
'board': {
'snakes': [
{'body': [
{'x': 3, 'y': 9},
{'x': 3, 'y': 9},
{'x': 3, 'y': 9}
],
'health': 100,
'id': 'testsnake',
'length': 3,
'name': 'testsnake',
'object': 'snake'
}
],
'height': 10,
'width': 10,
'food': [
{'x': 1, 'y': 1},
]
},
'you': {
'body': [
{'x': 3, 'y': 9},
{'x': 3, 'y': 9},
{'x': 3, 'y': 9}
],
'health': 100,
'id': 'testsnake',
'length': 3,
'name': 'testsnake',
'object': 'snake'
}
}
data54 = {
'board': {
'snakes': [
{'body': [
{'x': 9, 'y': 3},
{'x': 9, 'y': 3},
{'x': 9, 'y': 3}
],
'health': 100,
'id': 'testsnake',
'length': 3,
'name': 'testsnake',
'object': 'snake'
}
],
'height': 10,
'width': 10,
'food': [
{'x': 1, 'y': 1},
]
},
'you': {
'body': [
{'x': 9, 'y': 3},
{'x': 9, 'y': 3},
{'x': 9, 'y': 3}
],
'health': 100,
'id': 'testsnake',
'length': 3,
'name': 'testsnake',
'object': 'snake'
}
}
data6 = {
'board': {
'snakes': [
{'body': [
{'x': 0, 'y': 7},
{'x': 0, 'y': 8},
{'x': 1, 'y': 8},
{'x': 1, 'y': 7},
{'x': 1, 'y': 6},
{'x': 1, 'y': 5},
{'x': 1, 'y': 4}
],
'health': 100,
'id': 'testsnake',
'length': 7,
'name': 'testsnake',
'object': 'snake'
}
],
'height': 10,
'width': 10,
'food': [
{'x': 5, 'y': 8},
]
},
'you': {
'body': [
{'x': 0, 'y': 7},
{'x': 0, 'y': 8},
{'x': 1, 'y': 8},
{'x': 1, 'y': 7},
{'x': 1, 'y': 6},
{'x': 1, 'y': 5},
{'x': 1, 'y': 4}
],
'health': 100,
'id': 'testsnake',
'length': 7,
'name': 'testsnake',
'object': 'snake'
}
}
data7 = {
'board': {
'snakes': [
{'body': [
{'x': 4, 'y': 2},
{'x': 4, 'y': 1},
{'x': 5, 'y': 1},
{'x': 5, 'y': 2},
{'x': 5, 'y': 3},
{'x': 5, 'y': 4},
{'x': 5, 'y': 5},
{'x': 4, 'y': 5},
{'x': 3, 'y': 5},
{'x': 3, 'y': 4},
{'x': 3, 'y': 3},
{'x': 2, 'y': 3},
{'x': 1, 'y': 3}
],
'health': 100,
'id': 'testsnake',
'length': 13,
'name': 'testsnake',
'object': 'snake'
}
],
'height': 10,
'width': 10,
'food': [
{'x': 5, 'y': 8},
]
},
'you': {
'body': [
{'x': 4, 'y': 2},
{'x': 4, 'y': 1},
{'x': 5, 'y': 1},
{'x': 5, 'y': 2},
{'x': 5, 'y': 3},
{'x': 5, 'y': 4},
{'x': 5, 'y': 5},
{'x': 4, 'y': 5},
{'x': 3, 'y': 5},
{'x': 3, 'y': 4},
{'x': 3, 'y': 3},
{'x': 2, 'y': 3},
{'x': 1, 'y': 3}
],
'health': 100,
'id': 'testsnake',
'length': 13,
'name': 'testsnake',
'object': 'snake'
}
}
data8 = {
'board': {
'snakes': [
{'body': [
{'x': 8, 'y': 29},
{'x': 8, 'y': 28},
{'x': 7, 'y': 28},
{'x': 6, 'y': 27},
{'x': 6, 'y': 26},
{'x': 6, 'y': 25},
{'x': 6, 'y': 24},
{'x': 6, 'y': 23},
{'x': 6, 'y': 22},
{'x': 6, 'y': 21},
{'x': 6, 'y': 20},
{'x': 6, 'y': 19},
{'x': 6, 'y': 18},
{'x': 6, 'y': 17},
{'x': 6, 'y': 16},
{'x': 6, 'y': 15},
{'x': 6, 'y': 14},
{'x': 6, 'y': 13},
{'x': 6, 'y': 12},
{'x': 6, 'y': 11},
{'x': 6, 'y': 10},
{'x': 6, 'y': 9},
{'x': 6, 'y': 8},
{'x': 6, 'y': 7},
{'x': 6, 'y': 6},
{'x': 6, 'y': 5},
{'x': 6, 'y': 4},
{'x': 6, 'y': 3},
{'x': 6, 'y': 2},
{'x': 6, 'y': 1},
{'x': 7, 'y': 1},
{'x': 8, 'y': 1},
{'x': 9, 'y': 1},
{'x': 9, 'y': 2}
],
'health': 100,
'id': 'testsnake',
'length': 34,
'name': 'testsnake',
'object': 'snake'
}
],
'height': 30,
'width': 30,
'food': [
{'x': 5, 'y': 8},
]
},
'you': {
'body': [
{'x': 8, 'y': 29},
{'x': 8, 'y': 28},
{'x': 7, 'y': 28},
{'x': 6, 'y': 27},
{'x': 6, 'y': 26},
{'x': 6, 'y': 25},
{'x': 6, 'y': 24},
{'x': 6, 'y': 23},
{'x': 6, 'y': 22},
{'x': 6, 'y': 21},
{'x': 6, 'y': 20},
{'x': 6, 'y': 19},
{'x': 6, 'y': 18},
{'x': 6, 'y': 17},
{'x': 6, 'y': 16},
{'x': 6, 'y': 15},
{'x': 6, 'y': 14},
{'x': 6, 'y': 13},
{'x': 6, 'y': 12},
{'x': 6, 'y': 11},
{'x': 6, 'y': 10},
{'x': 6, 'y': 9},
{'x': 6, 'y': 8},
{'x': 6, 'y': 7},
{'x': 6, 'y': 6},
{'x': 6, 'y': 5},
{'x': 6, 'y': 4},
{'x': 6, 'y': 3},
{'x': 6, 'y': 2},
{'x': 6, 'y': 1},
{'x': 7, 'y': 1},
{'x': 8, 'y': 1},
{'x': 9, 'y': 1},
{'x': 9, 'y': 2}
],
'health': 100,
'id': 'testsnake',
'length': 34,
'name': 'testsnake',
'object': 'snake'
}
}
data9 = {
'board': {
'snakes': [
{'body': [
{'x': 4, 'y': 2},
{'x': 4, 'y': 3},
{'x': 4, 'y': 4},
{'x': 3, 'y': 4},
{'x': 2, 'y': 4},
{'x': 1, 'y': 4},
{'x': 1, 'y': 3},
{'x': 1, 'y': 2},
{'x': 1, 'y': 1},
{'x': 2, 'y': 1},
{'x': 3, 'y': 1},
{'x': 3, 'y': 0},
{'x': 2, 'y': 0}
],
'health': 100,
'id': 'testsnake',
'length': 13,
'name': 'testsnake',
'object': 'snake'
}
],
'height': 10,
'width': 10,
'food': [
{'x': 2, 'y': 6},
]
},
'you': {
'body': [
{'x': 4, 'y': 2},
{'x': 4, 'y': 3},
{'x': 4, 'y': 4},
{'x': 3, 'y': 4},
{'x': 2, 'y': 4},
{'x': 1, 'y': 4},
{'x': 1, 'y': 3},
{'x': 1, 'y': 2},
{'x': 1, 'y': 1},
{'x': 2, 'y': 1},
{'x': 3, 'y': 1},
{'x': 3, 'y': 0},
{'x': 2, 'y': 0}
],
'health': 100,
'id': 'testsnake',
'length': 13,
'name': 'testsnake',
'object': 'snake'
}
}
data_dead_end_with_tail = {
'board': {
'snakes': [
{'body': [
{'x': 6, 'y': 0},
{'x': 6, 'y': 1},
{'x': 6, 'y': 2},
{'x': 6, 'y': 3},
{'x': 5, 'y': 3},
{'x': 4, 'y': 3},
{'x': 4, 'y': 4},
{'x': 4, 'y': 5},
{'x': 3, 'y': 5},
{'x': 2, 'y': 5},
{'x': 1, 'y': 5},
{'x': 1, 'y': 4},
{'x': 1, 'y': 3},
{'x': 0, 'y': 3},
{'x': 0, 'y': 4},
{'x': 0, 'y': 5},
{'x': 0, 'y': 6},
{'x': 1, 'y': 6},
{'x': 2, 'y': 6},
{'x': 3, 'y': 6},
{'x': 4, 'y': 6},
{'x': 5, 'y': 6},
{'x': 6, 'y': 6},
{'x': 7, 'y': 6},
{'x': 7, 'y': 5},
{'x': 7, 'y': 4},
{'x': 7, 'y': 3},
{'x': 7, 'y': 2},
{'x': 7, 'y': 1},
{'x': 8, 'y': 1},
{'x': 8, 'y': 2},
{'x': 9, 'y': 2},
{'x': 10, 'y': 2},
{'x': 10, 'y': 1},
{'x': 10, 'y': 0},
{'x': 11, 'y': 0}
],
'health': 100,
'id': 'testsnake',
'length': 36,
'name': 'testsnake',
'object': 'snake'
}
],
'height': 12,
'width': 12,
'food': [
{'x': 8, 'y': 8},
]
},
'you': {
'body': [
{'x': 6, 'y': 0},
{'x': 6, 'y': 1},
{'x': 6, 'y': 2},
{'x': 6, 'y': 3},
{'x': 5, 'y': 3},
{'x': 4, 'y': 3},
{'x': 4, 'y': 4},
{'x': 4, 'y': 5},
{'x': 3, 'y': 5},
{'x': 2, 'y': 5},
{'x': 1, 'y': 5},
{'x': 1, 'y': 4},
{'x': 1, 'y': 3},
{'x': 0, 'y': 3},
{'x': 0, 'y': 4},
{'x': 0, 'y': 5},
{'x': 0, 'y': 6},
{'x': 1, 'y': 6},
{'x': 2, 'y': 6},
{'x': 3, 'y': 6},
{'x': 4, 'y': 6},
{'x': 5, 'y': 6},
{'x': 6, 'y': 6},
{'x': 7, 'y': 6},
{'x': 7, 'y': 5},
{'x': 7, 'y': 4},
{'x': 7, 'y': 3},
{'x': 7, 'y': 2},
{'x': 7, 'y': 1},
{'x': 8, 'y': 1},
{'x': 8, 'y': 2},
{'x': 9, 'y': 2},
{'x': 10, 'y': 2},
{'x': 10, 'y': 1},
{'x': 10, 'y': 0},
{'x': 11, 'y': 0}
],
'health': 100,
'id': 'testsnake',
'length': 36,
'name': 'testsnake',
'object': 'snake'
}
} |
# python 3.6
def camel2pothole(string):
rst = "".join(["_" + s.lower() if s == s.upper() or s.isdigit() else s for s in string])
return rst
print(camel2pothole("codingDojang"))
print(camel2pothole("numGoat30")) |
browsers = [
{
'id': 'chrome',
'name': 'Chrome'
},
{
'id': 'chromium',
'name': 'Chromium'
},
{
'id': 'firefox',
'name': 'Firefox'
},
{
'id': 'safari',
'name': 'Safari'
},
{
'id': 'msie',
'name': 'Internet Explorer'
},
{
'id': 'msedge',
'name': 'Microsoft Edge'
},
{
'id': 'opera',
'name': 'Opera'
},
{
'id': 'yandexbrowser',
'name': 'Yandex.Browser'
},
{
'id': 'ios',
'name': 'iOS'
},
{
'id': 'android',
'name': 'Android'
},
{
'id': 'samsungBrowser',
'name': 'Samsung Internet'
}
]
|
N, K, S = [int(n) for n in input().split()]
ans = []
for i in range(N-K):
ans.append(S+1 if S<10**9 else 1)
for j in range(K):
ans.append(S)
print(" ".join([str(n) for n in ans]))
|
#Binary Tree Level Order BFS&DFS
class Solution(object):
def levelOrder(self, root):
if not root:
return []
result = []
queue = collections.deque()
queue.append(root)
#visited = set(root)
while queue:
level_size = len(queue)
current_level = []
for _ in range(level_size):
node = queue.popleft()
current_level.append(node.val)
if node.left and node:
queue.append(node.left)
if node.right.append(node.right):
queue.append(node.right)
result = append(current_level)
return result
#Binary Tree Level Order BFS&DFS
# class solution(object):
# def levelOrder(self, root):
# if not root:
# return []
# self.result = []
# self._dfs(root, 0)
# return self.result
# def _dfs(self, root, level):
# if not node:
# return
# if len(self.result) < level + 1:
# self.return.append([])
# self.result[level].append([])
# self._dfs(node.left, level+1)
# self._dfs(node.right, level+1) |
# Python Learning Lessons
some_var = int(input("Give me a number, any number: "))
if some_var > 10:
print("The number is bigger than tenerooonie.")
elif some_var < 10:
print("The numbah is smaller than 10.")
elif some_var == 10:
("YO. The numbah is TEN!")
some_name = str(input("Hey, what's your name, kid: "))
print("Pleasure to meet ya, numbah, " + some_name)
|
class SubClass():
def __init__(self):
self.message = 'init - SubFile - mtulio.example.sub Class'
def returnMessage(self):
return self.message
def subMessageHelloWorld():
return 'init - SubFile - mtulio.example.sub Method'
|
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
# ------------------------------------------------------------
# File: update_db.py.py
# Created Date: 2020/6/27
# Created Time: 1:30
# Author: Hypdncy
# Author Mail: [email protected]
# Copyright (c) 2020 Hypdncy
# ------------------------------------------------------------
# .::::.
# .::::::::.
# :::::::::::
# ..:::::::::::'
# '::::::::::::'
# .::::::::::
# '::::::::::::::..
# ..::::::::::::.
# ``::::::::::::::::
# ::::``:::::::::' .:::.
# ::::' ':::::' .::::::::.
# .::::' :::: .:::::::'::::.
# .:::' ::::: .:::::::::' ':::::.
# .::' :::::.:::::::::' ':::::.
# .::' ::::::::::::::' ``::::.
# ...::: ::::::::::::' ``::.
# ````':. ':::::::::' ::::..
# '.:::::' ':'````..
# ------------------------------------------------------------
class UpdateDb(object):
"""
更新数据库
"""
def __init__(self):
"""
初始化
"""
def update(self):
"""
更新数据库
:return:
""" |
"""
Discussion:
To better appreciate what is happening here, you should go back to the previous
interactive demo. Set the w = 5 and I_ext = 0.5.
You will find that there are three fixed points of the system for these values of
w and I_ext. Now, choose the initial value in this demo and see in which direction
the system output moves. When r_init is in the vicinity of the leftmost fixed points
it moves towards the left most fixed point. When r_init is in the vicinity of the
rightmost fixed points it moves towards the rightmost fixed point.
"""; |
# coding=utf-8
# *** WARNING: this file was generated by crd2pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
SNAKE_TO_CAMEL_CASE_TABLE = {
"api_version": "apiVersion",
"attacher_node_selector": "attacherNodeSelector",
"driver_registrar": "driverRegistrar",
"gui_host": "guiHost",
"gui_port": "guiPort",
"image_pull_secrets": "imagePullSecrets",
"inode_limit": "inodeLimit",
"k8s_node": "k8sNode",
"node_mapping": "nodeMapping",
"plugin_node_selector": "pluginNodeSelector",
"primary_fs": "primaryFs",
"primary_fset": "primaryFset",
"provisioner_node_selector": "provisionerNodeSelector",
"ready": "Ready",
"remote_cluster": "remoteCluster",
"rest_api": "restApi",
"scale_hostpath": "scaleHostpath",
"secret_counter": "secretCounter",
"secure_ssl_mode": "secureSslMode",
"spectrum_scale": "spectrumScale",
"spectrumscale_node": "spectrumscaleNode",
"toleration_seconds": "tolerationSeconds",
}
CAMEL_TO_SNAKE_CASE_TABLE = {
"apiVersion": "api_version",
"attacherNodeSelector": "attacher_node_selector",
"driverRegistrar": "driver_registrar",
"guiHost": "gui_host",
"guiPort": "gui_port",
"imagePullSecrets": "image_pull_secrets",
"inodeLimit": "inode_limit",
"k8sNode": "k8s_node",
"nodeMapping": "node_mapping",
"pluginNodeSelector": "plugin_node_selector",
"primaryFs": "primary_fs",
"primaryFset": "primary_fset",
"provisionerNodeSelector": "provisioner_node_selector",
"Ready": "ready",
"remoteCluster": "remote_cluster",
"restApi": "rest_api",
"scaleHostpath": "scale_hostpath",
"secretCounter": "secret_counter",
"secureSslMode": "secure_ssl_mode",
"spectrumScale": "spectrum_scale",
"spectrumscaleNode": "spectrumscale_node",
"tolerationSeconds": "toleration_seconds",
}
|
STATS = [
{
"num_node_expansions": NaN,
"plan_length": 35,
"search_time": 7.93,
"total_time": 7.93
},
{
"num_node_expansions": NaN,
"plan_length": 34,
"search_time": 9.72,
"total_time": 9.72
},
{
"num_node_expansions": NaN,
"plan_length": 40,
"search_time": 15.54,
"total_time": 15.54
},
{
"num_node_expansions": NaN,
"plan_length": 23,
"search_time": 1.99,
"total_time": 1.99
},
{
"num_node_expansions": NaN,
"plan_length": 24,
"search_time": 1.22,
"total_time": 1.22
},
{
"num_node_expansions": NaN,
"plan_length": 23,
"search_time": 2.58,
"total_time": 2.58
},
{
"num_node_expansions": NaN,
"plan_length": 19,
"search_time": 1.62,
"total_time": 1.62
},
{
"num_node_expansions": NaN,
"plan_length": 23,
"search_time": 1.43,
"total_time": 1.43
},
{
"num_node_expansions": NaN,
"plan_length": 20,
"search_time": 0.72,
"total_time": 0.72
},
{
"num_node_expansions": NaN,
"plan_length": 29,
"search_time": 0.84,
"total_time": 0.84
},
{
"num_node_expansions": NaN,
"plan_length": 28,
"search_time": 1.08,
"total_time": 1.08
},
{
"num_node_expansions": NaN,
"plan_length": 21,
"search_time": 0.71,
"total_time": 0.71
},
{
"num_node_expansions": NaN,
"plan_length": 26,
"search_time": 1.97,
"total_time": 1.97
},
{
"num_node_expansions": NaN,
"plan_length": 29,
"search_time": 2.29,
"total_time": 2.29
},
{
"num_node_expansions": NaN,
"plan_length": 29,
"search_time": 2.64,
"total_time": 2.64
},
{
"num_node_expansions": NaN,
"plan_length": 23,
"search_time": 1.73,
"total_time": 1.73
},
{
"num_node_expansions": NaN,
"plan_length": 20,
"search_time": 0.97,
"total_time": 0.97
},
{
"num_node_expansions": NaN,
"plan_length": 34,
"search_time": 3.95,
"total_time": 3.95
}
]
num_timeouts = 12
num_timeouts = 25
num_problems = 55
|
"""
Build a Triangle
"""
# Use a while loop to print a 5-level triangle of stars that looks like this:
"""
*
**
***
****
*****
"""
|
def a():
pass
# This is commented
# out
|
""" Diseñe una función que calcule la cantidad de carne de aves en kilos si se
tienen N gallinas, M gallos y K pollitos cada uno pesando 6 kilos, 7 kilos y 1
kilo respectivamente. """
def get_amount(N, M, K):
chickens = N * 6
roosters = M * 7
chicks = K * 1
total = chickens + roosters + chicks
print('Total de carne de aves: {} kilos'.format(total))
get_amount(1, 1, 1)
get_amount(10, 10, 10)
|
"""
Main entrypoint
---------------
Just-in-time injections awaitable from asyncio coroutines
Author: Chris Lee
Email: [email protected]
"""
def main():
pass
if __name__ == "__main__":
main()
|
def makeArrayConsecutive2(statues):
'''Ratiorg got statues of different sizes as a present from CodeMaster
for his birthday, each statue having an non-negative integer size.
Since he likes to make things perfect, he wants to arrange them from
smallest to largest so that each statue will be bigger than the previous
one exactly by 1. He may need some additional statues to be able to
accomplish that. Help him figure out the minimum number of additional
statues needed.
'''
minValue = min(statues)
maxvalue = max(statues)
return maxvalue - minValue - len(statues) + 1
print(makeArrayConsecutive2([6, 2, 3, 8])) |
def is_list(v):
return isinstance(v, list)
def is_list_of_type(v, t):
return is_list(v) and all(isinstance(e, t) for e in v)
def flatten_indices(indices):
# indices could be nested nested list, we convert them to nested list
# if indices is not a list, then there is something wrong
if not is_list(indices): raise ValueError('indices is not a list')
# if indices is a list of integer, then we are done
if is_list_of_type(indices, int): return indices
# if indices is a list of list
flat_indices = []
for inds in indices:
if is_list_of_type(inds, int): flat_indices.append(inds)
else: flat_indices.extend(flatten_indices(inds))
return flat_indices
def flatten_scores(scores):
# scores could be nested list, we convert them to list of floats
if isinstance(scores, float): return scores
# instead of using deepflatten, i will write my own flatten function
# because i am not sure how deepflatten iterates (depth-first or breadth-first)
flat_scores = []
for score in scores:
if isinstance(score, float): flat_scores.append(score)
else: flat_scores.extend(flatten_scores(score))
return flat_scores
|
arquivo = open('numeros.txt', 'a') # append acrescente dados
for linha in range(341,621):
arquivo.write('%d\n' % linha)
arquivo.close()
arquivo = open('numeros.txt', 'r') # lê os arquivos
for x in arquivo.readlines():
print(x)
arquivo.close()
|
s1 = "HELLO BEGINNERS"
print(s1.casefold()) # -- CF1
s2 = "Hello Beginners"
print(s2.casefold()) # -- CF2
if s1.casefold() == s2.casefold(): # -- CF3
print("Both the strings are same after conversion")
else:
print("Both the strings are different after conversion ")
|
counter = 0 #初始化counter为0
while True:
counter += 1 #counter累加1
print(counter) #输出counter值
if counter >= 10: #当counter大于等于10时,跳出while循环
break |
n = list(map(int, input("[>] Enter numbers: ").split()))
n.sort()
for i in range(3):
for j in range(3):
print(f"{n[i]} + {n[j]} = {n[i] + n[j]}", end="\t")
print()
|
class Solution:
def sortColors(self, nums: List[int]) -> None:
# If 2, put it at the tail
# if 0, put it at the head and move idx to next
# If 1, move idx to next
idx = 0
for _ in range(len(nums)):
if nums[idx] == 2:
nums.append(nums.pop(idx))
continue
elif nums[idx] == 0:
nums.insert(0, nums.pop(idx))
idx += 1 |
capital= float (input("Ingrese la cantidad de dinero a invertir: "))
interes = float (input ("Ingrese el porcentaje de interés que el banco pagará mensualmente:"))
ganancia=(capital*interes)
total= float(capital+ganancia)
print("En total de dinero al final de un mes será de: ", str(total)) |
{
'targets': [
{
'conditions': [
[ 'OS != "linux"', {
'target_name': 'procps_only_supported_on_linux',
} ],
[ 'OS == "linux"', {
'target_name': 'procps',
'sources': [
'src/procps.cc'
, 'src/proc.cc'
, 'src/diskstat.cc'
, 'src/partitionstat.cc'
, 'src/slabcache.cc'
, 'deps/procps/proc/alloc.c'
, 'deps/procps/proc/devname.c'
, 'deps/procps/proc/escape.c'
, 'deps/procps/proc/ksym.c'
, 'deps/procps/proc/pwcache.c'
, 'deps/procps/proc/readproc.c'
, 'deps/procps/proc/sig.c'
, 'deps/procps/proc/slab.c'
, 'deps/procps/proc/sysinfo.c'
, 'deps/procps/proc/version.c'
, 'deps/procps/proc/whattime.c'
],
'include_dirs': [
'./deps/procps/include/'
, './deps/procps/'
, '<!(node -e "require(\'nan\')")'
],
# VERSION numbers are picked up by procps (see procps/proc/version.c)
# TODO: Why does the C++ compiler pick up the C flags and complain about them ???
'cflags': [
'-DPACKAGE_NAME=\"procps\"'
, '-DPACKAGE_VERSION=\"3.3.9\"'
, '-DBUILD_WITH_WHINE=1'
],
'cflags!' : [ '-fno-exceptions', '-fno-tree-vrp', '-fno-tree-sink' ],
'cflags_c' : [ '--std=gnu99', '-Wno-string-plus-int', '-Wno-sign-compare' ],
'cflags_cc' : [ '-fexceptions', '-frtti' ],
} ],
]
}
]
}
|
#!/usr/bin/env python3
def read_value():
"""Reads a single line as an integer."""
return int(input())
def read_row(width):
"""Reads one row of integers interpreted as booleans."""
row = [int(field) != 0 for field in input().split()]
if len(row) != width:
raise ValueError('wrong row width')
return row
def read_grid():
"""Reads a grid of integers interpreted as booleans."""
height = read_value()
width = read_value()
return [read_row(width) for _ in range(height)]
def height(grid):
"""Gets the height of the grid (stored in row-major order)."""
return len(grid)
def width(grid):
"""Gets the width of the grid (stored in row-major order)."""
try:
return len(grid[0])
except IndexError:
return 0
def can_go(grid, i, j):
"""Checks if (i, j) is on the grid and accessible."""
return 0 <= i < height(grid) and 0 <= j < width(grid) and grid[i][j]
def fill(grid, i, j):
"""Fills the (i, j) region of nonzeros in grid and returns its area."""
if not can_go(grid, i, j):
return 0
grid[i][j] = False
return 1 + sum(fill(grid, h, k) for h in range(i - 1, i + 2)
for k in range(j - 1, j + 2))
def run():
"""Reports the biggest component in a grid read from standard input."""
grid = read_grid()
print(max(fill(grid, i, j) for i in range(height(grid))
for j in range(width(grid))))
if __name__ == '__main__':
run()
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def getConstrains(tab):
constrains = [['A.1', 3, 0, 9, "População total e sua distribuição proporcional" ],
['A.2', 3, 0, 6, "Homens por 100 mulheres" ],
['A.3', 3, 0, 4, u"Taxa de crescimento da populacão(%)"],
['A.4', 3, 0, 6, u"Grau de Urbanização(%)"],
['A.13', 3, 0, 8, u"Proporção (%) de menores de 5 anos de idade na população"],
['A.15', 3, 0, 8, "Índice de envelhecimento"],
['A.16', 3, 0, 8, "Razão de dependência"],
['A.17', 3, 0, 8, "Razão entre nascidos vivos informados e estimados"],
['A.7', 3, 0, 9, "Taxa de natalidade"],
['A.5', 3, 0, 8, 'Taxa de fecundidade total'],
['A.18', 3, 0, 8, u"Razão entre óbitos informados e estimados" ],
['A.8', 3, 0, 5, u"Mortalidade proporcional (%) pessoas acima de 80 anos"],
['A.9', 3, 0, 5, u"Mortalidade proporcional (%) por idade, em menores de 1 ano de idade com 28 dias ou mais"],
['A.10', 3, 0, 10, u" Taxa bruta e padronizada de mortalidade"],
['A.11', 3, 0, 6, u"Esperança de vida ao nascer"],
['A.12', 3, 0, 6, u"Esperança de vida aos 60 anos"],
['A.14', 3, 0, 28, u"Proporção de idosos na população (%)"],
['A.7', 3, 0, 26, u"Taxa bruta de natalidade "],
['A.18', 3, 0, 25, u"Razão entre óbitos informados e estimados"],
['A.10', 3, 0, 27, u"Taxa bruta de mortalidade"],
['A.11', 3, 0, 29, u"Esperança de vida ao nascer(anos)"],
['A.12', 3, 0, 29, u"Esperança de vida aos 60 anos(anos"],
['B.1', 3, 0, 9, u"Taxa de analfabetismo(% da população de 15 ou mais anos não alfabetizada)"],
['B.2.1', 3, 0, 36, u"Escolaridade (%) da população de 15 anos e mais (11 anos ou mais de estudo)"],
['B.2.2', 3, 0, 36, u"Escolaridade (%) da população de 15 a 24 anos (11 anos ou mais de estudo)"],
['B.3', 3, 0, 8, u"Escolaridade (%) da população de 18 a 24 anos"],
['B.8', 4, 0, 13, u"Renda média domiciliar per capita"],
['B.9', 4, 0, 7, u"Índice de Gini da renda domiciliar per capita"],
['B.4', 3, 0, 5, u"Razão de renda"],
['B.5.1', 3, 0, 11, u"Proporção (%) de pessoas de baixa renda( Menor que 1/4 SM)"],
['B.5.2', 3, 0, 11, u"Proporção (%) de crianças em situação domiciliar de baixa renda (Menor que 1/4 SM)"],
['B.6', 4, 0, 9, u"Taxa de desemprego"],
['B.7', 4, 0, 9, u"Taxa de trabalho infantil"],
['B.10', 3, 0, 8, u"Proporção (%) de idosos residentes em domicílios na condição de outro parente"],
['C.1', 3, 0, 6, u"Taxa de mortalidade infantil"],
['C.1.1', 3, 0, 6, u"Taxa de mortalidade neonatal precoce"],
['C.1.2', 3, 0, 6, u"Taxa de mortalidade neonatal tardia"],
['C.1.4', 3, 0, 5, u"Taxa de mortalidade neonatal"],
['C.1.3', 3, 0, 6, u"Taxa de mortalidade pós-neonatal"],
['C.2', 3, 0, 5, u"Taxa de mortalidade perinatal"],
['C.16', 3, 0, 7, u"Taxa de mortalidade na infância"],
['C.3', 3, 0, 13, u"Razão de mortalidade materna"],
['C.18', 3 ,0, 5, u"Distribuição (%) de óbitos maternos por causa direta"],
['C.5', 3, 0, 29, u"Proporção (%) de óbitos por causas mal definidas sem assistência médica"],
['C.6', 3, 0, 5, u"Proporção (%) de óbitos por doença diarreica aguda em menores de 5 anos de idade"],
['C.7', 3, 0, 5, u"Proporção (%) de óbitos por infecção respiratória aguda em menores de 5 anos de idade"],
['C.8', 3, 0, 7, u"Taxa de mortalidade específica por doenças do aparelho circulatório"],
['C.10', 3, 0, 67, u"Taxa de mortalidade específica por neoplasias malignas(óbitos por 1000 habitantes)"],
['C.11', 3, 0, 11, u"Taxa de mortalidade específica por acidentes de trabalho em Segurados da Previdência Social"],
['C.12', 3, 0, 7, u"Taxa de mortalidade específica por diabete melito( óbitos por 100.000 habitantes)"],
['C.14', 3, 0, 7, u"Taxa de mortalidade específica por AIDS (óbitos por 100.000 habitantes)"],
['C.15', 3, 0, 6, u"Taxa de mortalidade específica por afecções originadas no período perinatal"],
['C.17', 3, 0, 7, u"Taxa de mortalidade específica por doenças transmissíveis (óbitos por 100.000 habitantes)"],
['D.1.1', 3, 0, 9, u"Incidência de sarampo"],
['D.1.2', 3, 0, 7, u"Incidência de difteria"],
['D.1.3', 3, 0, 8, u"Incidência de coqueluche"],
['D.1.4', 3, 0, 6, u"Incidência de tétano neonatal"],
['D.1.5', 3, 0, 9, u"Incidência de tétano (exceto o neonatal)"],
['D.1.6', 3, 0, 7, u"Incidência de febre amarela"],
['D.1.7', 3, 0, 7, u"Incidência de raiva humana"],
['D.1.8', 3, 0, 10, u"Incidência de hepatite B"],
['D.1.14', 3, 0, 9, u"Incidência de hepatite C"],
['D.1.9', 3, 0, 8, u"Incidência de cólera"],
['D.1.10', 3, 0, 8, u"Incidência de febre hemorrágica da dengue"],
['D.1.11', 3, 0, 7, u"Incidência de sífilis congênita"],
['D.1.12', 3, 0, 8, u"Incidência de rubéola"],
['D.1.13', 3, 0, 7, u"Incidência da síndrome da rubéola congênita"],
['D.1.15', 3, 0, 9, u"Incidência de doença meningocócia"],
['D.1.16', 3, 0, 6, u"Incidência de meningite"],
['D.1.17', 3, 0, 6, u"Incidência de leptospirose"],
['D.2.1', 3, 0, 13, u"Taxa de incidência de aids"],
['D.2.2', 3, 0, 11, u"Taxa de incidência de tuberculose(casos por 100.000 habitantes)"],
['D.2.3', 3, 0, 9, u"Taxa de incidência de dengue(casos por 100.000 habitantes)"],
['D.2.4', 3, 0, 9, u"Taxa de incidência de leishmaniose tegumentar americana(casos por 100.000 habitantes)"],
['D.2.5', 3, 0, 10, u"Taxa de incidência de leishmaniose visceral(casos por 100.000 habitantes)"],
['D.2.6', 3, 0, 11, u"Taxa de incidência de hanseníaseTaxa de incidência de hanseníase(casos por 100.000 habitantes)"],
['D.4', 3, 0, 12, u"Índice parasitário anual (IPA) de malária(exames positivos por 1.000 habitantes)"],
['D.5', 3, 0, 5, u"Taxa de incidência de neoplasias malignas por 100.000 habitantes"],
['D.6', 3, 0, 11, u"Taxa de incidência de acidentes e doenças do trabalho em segurados da Previdência Social(casos por 10.000 trabalhadores com cobertura contra incapacidade laborativa decorrente de riscos do trabalho)"],
['D.9', 3, 0, 7, u"Prevalência de hanseníase(casos existentes no registro ativo por 10.000 habitantes)"],
['D.23', 3, 0, 5, u"Proporção (%) de internações hospitalares (SUS) por afecções originadas no período perinatal"],
['D.22', 3, 0, 7, u"Prevalência de pacientes em diálise (SUS) ( pacientes por 100.000 habitantes)"],
['E.1', 3, 0, 54, u"Número de profissionais de saúde por habitante(médicos)"],
['E.15', 3, 0, 6, u"Número de concluintes de cursos de medicina"],
['E.16', 3, 0, 28, u"Distribuição (%) de postos de trabalho de nível superior em estabelecimentos de saúde"],
['E.17', 3, 0, 5, u"Número de postos de trabalho de enfermagem por 100 leitos hospitalares"],
['E.2', 3, 0, 2, u"Número de leitos hospitalares por 1.000 habitantes"],
['E.3', 3, 0, 10, u"Número de leitos hospitalares por 1.000 habitantes"],
['E.22', 3, 0, 6, u"Distribuição (%) de leitos hospitalares (rede privada)"],
['E.4', 3, 0, 4, u"Gasto com consumo de bens e serviços de saúde como percentual do PIB"],
['E.5', 3, 0, 5, u"Gasto per capita com consumo de bens e serviços de saúde"],
['E.6.1', 3, 0, 10, u"Gasto com ações e serviços públicos de saúde como proporção do PIB(Valores dos gastos e do PIB em milhões de reais correntes)"],
['E.6.2', 3, 0, 9, u"Gasto per capita com ações e serviços públicos de saúde(Valores brutos dos gastos em milhões de reais correntes; valores per capita em reais correntes)"],
['E.7', 3, 0, 7, u"Gasto federal com saúde como proporção do PIB(Valores em milhões de reais correntes)"],
['E.8', 3, 0, 6, u"Gasto federal com saúde, despesas federais totais, despesas federais não financeiras, proporção (%) sobre despesas totais e proporção (%) sobre despesas não financeiras"],
['E.9.1', 3, 0, 2, u"Despesa familiar autorreferida com saúde como proporção (%) da renda familiar, por classes de rendimento monetário e não monetário mensal familiar"],
['E.9.2', 3, 0, 6, u"Parte da renda disponível bruta das famílias gasta com bens e serviços de saúde"],
['E.19', 3, 0, 2, u"Participação (%) das importações na oferta total por bens e serviços de saúde"],
['E.11', 3, 0, 7, u"Valor médio pago por internação hospitalar no SUS (AIH) (em reais correntes"],
['E.20', 3, 0, 5, u"Gasto do Ministério da Saúde com atenção à saúde como proporção (%) do gasto total do Ministério da Saúde, por componente"],
['E.21', 3, 0, 6, u"Gasto per capita do Ministério da Saúde com atenção à saúde(Valores em reais correntes)"],
['E.13', 3, 0, 6, u"Gasto federal com saneamento como proporção (%) do PIB"],
['E.14', 3, 0, 8, u"Gasto federal com saneamento, despesas federais totais e não-financeiras e proporção (%) do gasto federal com saneamento sobre as despesas totais e não financeiras"],
['F.1', 3, 0, 6, u"Número de consultas médicas por habitante"],
['F.20', 3, 0, 5, u"Proporção (%) da população que refere ter consultado médico nos últimos 12 meses"],
['F.21.1', 3, 0, 6, u"Proporção (%) da população que refere ter realizado a última consulta odontológica a menos de 1 ano"],
['F.21.2', 3, 0, 6, u"Proporção (%) da população que refere nunca ter realizado consulta odontológica"],
['F.2', 3, 0, 13, u"Número de procedimentos diagnósticos por consulta médica para patologia clínica (SUS)"],
['F.22.1', 3, 0, 5, u"Proporção (%) da população feminina de 25 a 64 anos que refere ter utilizado o último exame preventivo do câncer do colo do útero em até 3 anos"],
['F.22.2', 3, 0, 5, u"Proporção (%) da população feminina de 25 a 65 anos que refere nunca ter realizado exame preventivo do câncer do colo do útero"],
['F.23.1', 3, 0, 6, u"Proporção da população feminina de 50 a 69 anos que refere ter realizado a última mamografia em até 2 anos"],
['F.23.2', 3, 0, 5, u"Proporção (%) da população feminina de 50 a 69 anos que refere nunca ter realizado mamografia"],
['F.3', 3, 0, 19, u"Número de internações hospitalares (SUS) por 100 habitantes"],
['F.24', 3, 0, 4, u"Proporção da população que refere internação hospitalar nos últimos 12 meses"],
['F.6', 3, 0, 39, u"Proporção (%) de nascidos vivos com 7 ou mais consultas"],
['F.7', 3, 0, 6, u"Proporção (%) de partos hospitalares"],
['F.8', 3, 0, 6, u"Proporção (%) de partos cesáreos"],
['F.13', 3, 0, 40, u"Proporção da população vacinada contra poliomielite por faixa etária recomendada"],
['F.14', 4, 0, 6, u"Percentual (%) da população feminina em uso de algum método anticonceptivos"],
['F.15', 3, 0, 4, u"Proporção (%) da população coberta por planos de saúde – IBGE"],
['F.16', 3, 0, 40, u"Proporção (%) da população coberta por planos privados de saúde – ANS"],
['F.17', 4, 0, 30, u"Proporção (%) da população servida por rede de abastecimento de água"],
['F.18', 4, 0, 30, u"Proporção (%) da população servida por esgotamento sanitário"],
['F.19', 4, 0, 30, u"Proporção (%) da população servida por coleta de lixo"],
['G.1', 3, 0, 31, u"Prevalência de diabete melito(percentual de adultos (35 anos ou mais de idade))"],
['G.2', 3, 0, 31, u"Prevalência de hipertensão arterial( percentual de adultos (18 anos ou mais de idade) que referem diagnóstico médico prévio de hipertensão arterial)"],
['G.4', 3, 0, 8, u"Prevalência de fumantes atuais por ano(percentual de adultos (18 anos ou mais de idade))"],
['G.19', 3, 0, 7, u"Prevalência de ex-fumantes( percentual de adultos (18 anos ou mais de idade))"],
['G.5', 3, 0, 8, u"Prevalência de consumo abusivo de bebidas alcoólicas(percentual de adultos (18 anos ou mais de idade))"],
['G.6', 3, 0, 8, u"Prevalência de indivíduos dirigindo veículos motorizados após consumir bebida alcoólica( percentual de adultos (18 anos ou mais de idade))"],
['G.7', 3, 0, 9, u"Prevalência de excesso de peso em adultos(percentual de adultos (18 anos ou mais de idade))"],
['G.8', 3, 0, 6, u"Prevalência (%) de excesso de peso em crianças menores de 5 anos de idade"],
['G.10', 3, 0, 6, u"Prevalência de déficit ponderal para a idade em crianças menores de 5 anos de idade"],
['G.11', 3, 0, 6, u"Prevalência de déficit estatural para a idade em crianças menores de 5 anos de idade"],
['G.12', 3, 0, 2, u"Participação diária per capita das calorias de frutas, verduras e legumes no total de calorias da dieta"],
['G.13', 3, 0, 5, u"Prevalência de aleitamento materno"],
['G.14', 3, 0, 4, u"Prevalência (%) de aleitamento materno exclusivo"],
['G.15.1', 3, 0, 4, u"Proporção de nascidos vivos de mães adolescentes (10 a 19 anos)"],
['G.15.2', 3, 0, 4, u"Proporção de nascidos vivos de mães tardias (40 anos ou mais)"],
['G.16', 3, 0, 8, u"Proporção de nascidos vivos com baixo peso ao nascer"],
['G.17', 3, 0, 5, u"Número médio de dentes cariados, perdidos e obturados aos 12 anos de idade"],
['G.18', 3, 0, 4, u"Proporção (%) de crianças de 5 a 6 anos de idade com número de dentes decíduos cariados, extração indicada, perdidos devido à cárie e obturados (ceo-d) igual a 0"]]
for element in constrains:
if element[0] == (tab):
return element[0], element[1], element[2], element[3], element[4]
return 0, 0, 0, 0 , 0 |
ROMAN = 'IVXLCDM'
def get_list_from_number(number):
return [int(num) for num in str(number)]
def get_roman_from_base(base_indexes, magnitude):
roman = ""
for i in base_indexes:
roman += ROMAN[i + magnitude*2]
return roman
def convert_number_to_base_indexes(number):
# Convert a number to a list of indexes, ie, 3 = [0, 0, 0] = [I, I, I]
# This handles 5-9 by adding 1 to the index
# and handles the different digits needed by 4 and 9
base_indexes = ["", "0", "00", "000", "01", "1", "10", "100", "1000", "02"]
return [int(x) for x in base_indexes[number]]
def roman_numeral(number):
roman = ''
number_list = get_list_from_number(number)
roman = rec_roman(number_list)
return roman
def rec_roman(list_of_numbers):
largest_factor = len(list_of_numbers) - 1
if largest_factor < 0:
return ''
largest_num = list_of_numbers[0]
base_indexes = convert_number_to_base_indexes(largest_num)
current_roman = get_roman_from_base(base_indexes, largest_factor)
roman = current_roman + rec_roman(list_of_numbers[1:])
return roman
if __name__ == '__main__':
print(roman_numeral(345))
|
# SPDX-FileCopyrightText: 2020 - Sebastian Ritter <[email protected]>
# SPDX-License-Identifier: Apache-2.0
'''
## *J*ust *a* *v*ampire *A*PI ##
As same as bloodhound let us reimplement the Java API.
This is similar to long time ago
[JavAPI](https://github.com/RealBastie/JavApi) project.
### The Idea ###
Too many good programming languages are looking for developers hype.
Maybe You believe to coding in all important languages. I want to
take a good or the best language for my problem. But why the have
different API interfaces?
Why it isn't enough only learn the syntax and a little bit semantic?
### The Java way ###
It think it is a good way to take a look into a new programming language
to reimplement something. Java was great - perhaps Java is great, maybe
not longer more. I don't no, but I learned Java before the year 2000. So
I know the old API good enough to reimplement.
Just like a vampire take the good base of Java, the API declaration and
**do the hard work: implement the code behind.**
### The reason ###
I like many programming languages or parts of these - Java, C#, Rust, COBOL,
PHP, Swift,...
But I like to create a solution for a problem more than using one single
programming language. And I believe we do not need more programmer, we need
the right programmer this time. I think with natural language processing
and the power of computer we can develop with description of problems in
natural language.
Python is a programming language with many natural language processing API.
So I take Python and Java is the (or with COBOL one of) backend programming
languages.
### API description ###
If a class and method is defined, take a look to Java API documentation.
### see also ###
* [GitHub](https://github.com/bastie/PythonVampire)
* [PyPI](https://pypi.org/project/VampireAPI/)
'''
|
class Meal:
def __init__(self,id,name,photo_url,details,price):
self.id = id
self.name = name
self.photo_url = photo_url
self.details = details
self.price = price
meal_list = []
orders_list = []
class Customer:
def get_all(self):
return meal_list
def get_meal_by_id(self, id):
result = None
for meal in meal_list:
if meal.id == id:
result = meal
break
return result
def add_meal(self,id):
meal = self.get_meal_by_id(id)
orders_list.append(meal)
class Admin:
def add_new_meal(self,meal):
meal_list.append(meal)
return meal_list
def get_orders(self):
return orders_list
def get_by_id(self,id):
result = None
for meal in orders_list:
if meal.id == id:
result = meal
break
return result
def update(self,id,fields):
meal = self.get_by_id(id)
meal.name = fields['name']
meal.photo_url = fields['photo_url']
meal.details = fields['details']
meal.price = fields['price']
return meal
def delete(self,id):
meal = self.get_by_id(id)
meal_list.remove(meal)
return orders_list
meal1 = Meal(id=1,
name='Lasagna Roll',
photo_url='https://thestayathomechef.com/wp-content/uploads/2017/08/Most-Amazing-Lasagna-4-e1503516670834.jpg',
details='Homemade Lasagna',
price='$40')
meal2 = Meal(id=2,
name='pasta',
photo_url='https://food.fnr.sndimg.com/content/dam/images/food/fullset/2019/1/07/0/JE401_Giadas-Pasta-with-Creamy-White-Beans_s4x3.jpg.rend.hgtvcom.826.620.suffix/1546886427856.jpeg',
details='Pasta with Creamy White Beans Recipe',
price='$30')
A = Admin()
A.add_new_meal(meal1)
A.add_new_meal(meal2)
C = Customer()
print(C.get_all())
C.add_meal(1)
print(A.get_orders())
A.delete(1)
print(C.get_all())
fields = {
'name':'Lasagna Roll',
'photo_url':'https://thestayathomechef.com/wp-content/uploads/2017/08/Most-Amazing-Lasagna-4-e1503516670834.jpg',
'details':'Homemade Lasagna',
'price':'$40'
}
A.update(1,fields)
print(C.get_meal_by_id(1))
|
"""
0. Save/copy this file to a new file under commands/
1. Add logic to my_command and rename it to something more meaningful.
Optionally you can access user, channel, text from the passed in **kwargs (don't remove this).
2. Add a useful docstring to your renamed my_command.
3. Return a message string that the command/bot should post to the channel.
You probably want to add some code under __main__ to make sure the function does what you want ...
4. In bot/slack.py import the script, e.g.: from commands.template import my_command
5. Add the command to the appropriate dict: ADMIN_BOT_COMMANDS, PUBLIC_BOT_COMMANDS or PRIVATE_BOT_COMMANDS
(public = for us in channels, private = for use in @karmabot DM)
6. PR your work. Thanks
"""
def my_command(**kwargs: dict) -> str: # type: ignore
"""Text that will appear in the help section"""
# kwargs will hold user, channel, text (from a Slack message object)
# use them like this, or just delete these line:
user = kwargs.get("user") # noqa: F841
channel = kwargs.get("channel") # noqa: F841
msg_text = kwargs.get("text") # noqa: F841
# return a message string
msg = "Replace me!"
return msg
if __name__ == "__main__":
# standalone test
user, channel, text = "bob", "#general", "some message"
kwargs = dict(user=user, channel=channel, text=text)
output = my_command(**kwargs) # type: ignore
print(output)
|
self.description = "Sysupgrade with a sync package having higher epoch"
sp = pmpkg("dummy", "1:1.0-1")
self.addpkg2db("sync", sp)
lp = pmpkg("dummy", "1.1-1")
self.addpkg2db("local", lp)
self.args = "-Su"
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_VERSION=dummy|1:1.0-1")
|
attacks_listing = {}
listing_by_name = {}
def register(attack_type):
if attack_type.base_attack:
if attack_type.base_attack in attacks_listing:
raise Exception("Attack already registered for this base_object_type.")
elif attack_type.name in listing_by_name:
raise Exception("Attack already registered for this name.")
attacks_listing[attack_type.base_attack] = attack_type
listing_by_name[attack_type.name] = attack_type
return attack_type
def get_attack(base_attack):
attack = attacks_listing.get(base_attack, None)
if attack is None:
attack_type = type(base_attack)
if attack_type is type:
try:
return get_attack(base_attack.__bases__[0])
except IndexError:
return None
else:
return get_attack(attack_type)
return attack
def get_attack_by_name(name):
return listing_by_name.get(name)
|
# MIT License
#
# Copyright (c) 2019 Eduardo E. Betanzos Morales
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
class Module:
def __init__(self, name: str, exportsPackages=None, requiresModules=None):
self.__name = name
self.__exports_packages = exportsPackages
self.__requires_modules = requiresModules
@classmethod
def from_json(cls, data):
return cls(**data)
def get_name(self):
return self.__name
def get_exports_packages(self):
return self.__exports_packages
def get_requires_modules(self):
return self.__requires_modules
class Artifact:
def __init__(self, name=None, module=None):
self.__name = name
if isinstance(module, dict):
self.__module = Module.from_json(module)
else:
self.__module = module
@classmethod
def from_json(cls, data):
return cls(**data)
def get_name(self):
return self.__name
def get_module(self):
return self.__module
def __hash__(self):
return hash(self.__name)
def __eq__(self, other):
if not isinstance(other, type(self)):
return NotImplemented
return self.__name == other.__name |
# Copyright 2014 PDFium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'bigint',
'type': 'static_library',
'sources': [
'bigint/BigInteger.hh',
'bigint/BigIntegerLibrary.hh',
'bigint/BigIntegerUtils.hh',
'bigint/BigUnsigned.hh',
'bigint/NumberlikeArray.hh',
'bigint/BigUnsignedInABase.hh',
'bigint/BigInteger.cc',
'bigint/BigIntegerUtils.cc',
'bigint/BigUnsigned.cc',
'bigint/BigUnsignedInABase.cc',
],
},
{
'target_name': 'freetype',
'type': 'static_library',
'defines': [
'FT2_BUILD_LIBRARY',
],
'include_dirs': [
'freetype/include',
],
'sources': [
'freetype/include/freetype.h',
'freetype/include/ft2build.h',
'freetype/include/ftmm.h',
'freetype/include/ftotval.h',
'freetype/include/ftoutln.h',
'freetype/include/tttables.h',
'freetype/include/internal/ftobjs.h',
'freetype/include/internal/ftstream.h',
'freetype/include/internal/tttypes.h',
'freetype/src/cff/cffobjs.h',
'freetype/src/cff/cfftypes.h',
'freetype/src/cff/cff.c',
'freetype/src/base/ftbase.c',
'freetype/src/base/ftbitmap.c',
'freetype/src/base/ftglyph.c',
'freetype/src/base/ftinit.c',
'freetype/src/base/ftlcdfil.c',
'freetype/src/base/ftmm.c',
'freetype/src/base/ftsystem.c',
'freetype/src/psaux/psaux.c',
'freetype/src/pshinter/pshinter.c',
'freetype/src/psnames/psmodule.c',
'freetype/src/raster/raster.c',
'freetype/src/sfnt/sfnt.c',
'freetype/src/smooth/smooth.c',
'freetype/src/truetype/truetype.c',
'freetype/src/type1/type1.c',
'freetype/src/cid/type1cid.c',
],
},
{
'target_name': 'safemath',
'type': 'none',
'sources': [
'logging.h',
'macros.h',
'template_util.h',
'numerics/safe_conversions.h',
'numerics/safe_conversions_impl.h',
'numerics/safe_math.h',
'numerics/safe_math_impl.h',
],
},
],
}
|
CERTIFICATION_SERVICES_TABLE_ID = 'cas'
INTERMEDIATE_CA_TAB_XPATH = '//a[@href="#intermediate_cas_tab"]'
INTERMEDIATE_CA_ADD_BTN_ID = 'intermediate_ca_add'
INTERMEDIATE_CA_CERT_UPLOAD_INPUT_ID = 'ca_cert_file'
INTERMEDIATE_CA_OCSP_TAB_XPATH = '//a[@href="#intermediate_ca_ocsp_responders_tab"]'
INTERMEDIATE_CA_OCSP_ADD_BTN_ID = 'intermediate_ca_ocsp_responder_add'
INTERMEDIATE_CA_BY_NAME_XPATH = '//table[@id="intermediate_cas"]//td[text()="{}"]'
INTERMEDIATE_CA_TR_BY_NAME_XPATH = '//table[@id="intermediate_cas"]//td[text()="{}"]/..'
INTERMEDIATE_CA_DELETE_BTN_ID = 'intermediate_ca_delete'
INTERMEDIATE_CA_TRS_CSS = '#intermediate_cas tbody tr'
INTERMEDIATE_CA_EDIT_BTN_ID = 'intermediate_ca_edit'
INTERMEDIATE_CA_SUBJECT_DN_ID = 'intermediate_ca_cert_subject_dn'
INTERMEDIATE_CA_ISSUER_DN_ID = 'intermediate_ca_cert_issuer_dn'
INTERMEDIATE_CA_VALID_FROM_ID = 'intermediate_ca_cert_valid_from'
INTERMEDIATE_CA_VALID_TO_ID = 'intermediate_ca_cert_valid_to'
DELETE_BTN_ID = 'ca_delete'
ADD_BTN_ID = 'ca_add'
DETAILS_BTN_ID = 'ca_details'
DATE_REGEX = '(\d{4}[-]?\d{1,2}[-]?\d{1,2})'
DATE_TIME_REGEX = '\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}'
CA_DETAILS_SUBJECT_DISTINGUISHED = 'top_ca_cert_subject_dn'
CA_DETAILS_ISSUER_DISTINGUISHED = 'top_ca_cert_issuer_dn'
CA_DETAILS_VALID_FROM = 'top_ca_cert_valid_from'
CA_DETAILS_VALID_TO = 'top_ca_cert_valid_to'
CA_DETAILS_VIEW_CERT = 'top_ca_cert_view'
CA_DETAILS_VIEW_CERT_SHA1 = 'cert_details_hash'
CA_DETAILS_VIEW_CERT_DUMP = 'cert_details_dump'
# Timestamp buttons
TSDELETE_BTN_ID = 'tsp_delete'
TSADD_BTN_ID = 'tsp_add'
TSEDIT_BTN_ID = 'tsp_details'
TS_SETTINGS_POPUP = '//div[@aria-describedby="tsp_url_and_cert_dialog"]'
TS_SETTINGS_POPUP_CANCEL_BTN_XPATH = TS_SETTINGS_POPUP + '//div[@class="ui-dialog-buttonset"]//button[span="Cancel"]'
IMPORT_TS_CERT_BTN_ID = 'tsp_cert_button'
SUBMIT_TS_CERT_BTN_ID = 'tsp_url_and_cert_submit'
TIMESTAMP_SERVICES_URL_ID = 'tsp_url'
IMPORT_CA_CERT_BTN_ID = 'ca_cert_button'
ADD_CA_AUTH_ONLY_CHECKBOX_XPATH = '//div[@id="ca_settings_dialog"]//input[@name="authentication_only"]'
EDIT_CA_AUTH_ONLY_CHECKBOX_XPATH = '//div[@id="ca_settings_tab"]//input[@name="authentication_only"]'
CA_SETTINGS_TAB_XPATH = '//li[@aria-controls="ca_settings_tab"]'
SUBMIT_CA_CERT_BTN_ID = 'ca_cert_submit'
# Timestamp view certificate
VIEW_CERTIFICATE = 'tsp_cert_view'
CERTIFICATE_PROFILE_INFO_AREA_CSS = '.cert_profile_info'
ADD_CERTIFICATE_PROFILE_INFO_AREA_XPATH = '//div[@id="ca_settings_dialog"]//input[@name="cert_profile_info"]'
EDIT_CERTIFICATE_PROFILE_INFO_AREA_XPATH = '//div[@id="ca_settings_tab"]//input[@name="cert_profile_info"]'
SUBMIT_CA_SETTINGS_BTN_ID = 'ca_settings_submit'
SAVE_CA_SETTINGS_BTN_ID = 'ca_settings_save'
OCSP_RESPONSE_TAB = '//li[@aria-controls="ocsp_responders_tab"]'
OCSP_RESPONDER_ADD_BTN_ID = 'ocsp_responder_add'
OCSP_RESPONDER_EDIT_BTN_ID = 'ocsp_responder_edit'
OCSP_RESPONDER_DELETE_BTN_ID = 'ocsp_responder_delete'
INTERMEDIATE_CA_TAB = '//li[@aria-controls="intermediate_cas_tab"]'
IMPORT_OCSP_CERT_BTN_ID = 'ocsp_responder_cert_button'
OCSP_RESPONDER_URL_AREA_ID = 'ocsp_responder_url'
SUBMIT_OCSP_CERT_AND_URL_BTN_ID = 'ocsp_responder_url_and_cert_submit'
OCSP_SETTINGS_POPUP = '//div[@aria-describedby="ocsp_responder_url_and_cert_dialog"]'
OCSP_SETTINGS_POPUP_OK_BTN_XPATH = OCSP_SETTINGS_POPUP + '//div[@class="ui-dialog-buttonset"]//button[span="OK"]'
OCSP_SETTINGS_POPUP_CANCEL_BTN_XPATH = OCSP_SETTINGS_POPUP + '//div[@class="ui-dialog-buttonset"]//button[span="Cancel"]'
LAST_ADDED_CERT_XPATH = '//table[@id="cas"]//tbody//tr[last()]'
def get_ca_by_td_text(text):
return '//table[contains(@id, "cas")]//tr//td[contains(text(), \"' + text + '\")]'
# timestamp id
def ts_get_ca_by_td_text(text):
return '//table[contains(@id, "tsps")]//tr//td[contains(text(), \"' + text + '\")]'
def get_ocsp_by_td_text(text):
return '//table[contains(@id, "ocsp_responders")]//tr//td[contains(text(), \"' + text + '\")]'
def get_ocsp_responders(self):
responders = self.by_xpath(
'(//table[contains(@id, "ocsp_responders")]//tr//td[1])[not(contains(@class,"dataTables_empty"))]',
multiple=True)
result = []
for responder in responders:
result.append(responder.text)
return result
|
'''Faça um programa que recebe o salário de um colaborador e o reajuste segundo
o seguinte critério, baseado no salário atual:
salários até R$ 280,00 (incluindo) : aumento de 20%
salários entre R$ 280,00 e R$ 700,00 : aumento de 15%
salários entre R$ 700,00 e R$ 1500,00 : aumento de 10%
salários de R$ 1500,00 em diante : aumento de 5% Após o aumento ser realizado, informe na tela:
o salário antes do reajuste;
o percentual de aumento aplicado;
o valor do aumento;
o novo salário, após o aumento.'''
salario = float(input("Digite o seu salário: "))
aumento1 = salario*0.20
aumento2 = salario*0.15
aumento3 = salario*0.10
aumento4 = salario*0.05
salario_final1 = salario + aumento1
salario_final2 = salario + aumento2
salario_final3 = salario + aumento3
salario_final4 = salario + aumento4
def reajuste():
if salario <= 280.0:
print(f"O seu salário era {salario} agora você terá um aumento de 20% ficando em {salario_final1}, seu aumento foi de {aumento1}")
elif salario > 280.0 and salario <= 700.0:
print(f"O seu salário era {salario} agora você terá um aumento de 15% ficando em {salario_final2}, seu aumento foi de {aumento2}")
elif salario > 700.0 and salario <= 1500.0:
print(f"O seu salário era {salario} agora você terá um aumento um aumento de 10% ficando em {salario_final3}, seu aumento foi de {aumento3}")
elif salario > 1500.0:
print(f"O seu salário era {salario} agora você terá um aumento um aumento de 5% ficando em {salario_final4}, seu aumento foi de {aumento4}")
reajuste()
|
# @author:leacoder
# @des: 递归 合并两个有序链表
'''
重复处理单元:
比较两个链表节点值
将
递归终止条件:
两个链表都是空的
递归前处理(递归到下一层前处理):
比较当前层 哪个链表头节点较小,递归找这个链表的下一个
递归(递归到下一层):
递归后处理(下层递归返回后处理):
返回较小值
'''
class Solution:
def mergeTwoLists(self, l1: ListNode, l2: ListNode) -> ListNode:
if l1 is None:
return l2
elif l2 is None:
return l1
elif l1.val<l2.val:
l1.next = self.mergeTwoLists(l1.next,l2)
return l1
else:
l2.next = self.mergeTwoLists(l1,l2.next)
return l2
# @author:leacoder
# @des: 迭代 合并两个有序链表
'''
利用哨兵简化操作
prehead= ListNode(-1)
重复处理单元:
比较大小,将小的加入 prev
迭代终止条件:
两个链表任意一个为空
迭代前处理:
记录prev = prehead
迭代处理:
判断大小,加入prev的链表
迭代后处理:
处理 l1 或 l2 中剩余节点
'''
class Solution:
def mergeTwoLists(self, l1: ListNode, l2: ListNode) -> ListNode:
# 利用哨兵简化操作
prehead= ListNode(-1)
# 迭代前处理:
prev = prehead # prev 用于迭代 这里记录表头 用于返回
# 迭代终止条件:
while l1 and l2: # 两个链表任意一个为空
# 迭代处理
# 重复处理单元:
if l1.val <= l2.val:
prev.next = l1
l1 = l1.next
else:
prev.next = l2
l2 = l2.next
prev = prev.next
# 迭代后处理:
'''
if l1 is not None:
prev.next = l1
else:
prev.next = l2
'''
prev.next = l1 if l1 is not None else l2
return prehead.next |
# coding=utf-8
"""
This package provides a custom session for TheTVDB.
"""
|
#!/usr/bin/env python3
def max_profit_with_k_transactions(prices, k):
pass
print(max_profit_with_k_transactions([5, 11, 3, 50, 60, 90], 2))
|
class Solution:
def findLUSlength(self, words):
def isSubsequence(s, t):
t = iter(t)
return all(c in t for c in s)
words.sort(key = lambda x:-len(x))
for i, word in enumerate(words):
if all(not isSubsequence(word, words[j]) for j in range(len(words)) if j != i):
return len(word)
return -1
|
class Query:
def __init__(self, the_query, filename=None):
self.data = None
self.the_query = the_query
def set_data(self, data):
self.data = data
def __repr__(self):
return self.the_query
class LocalMP3Query(Query):
def __init__(self, filename, url, author_name):
self.title = f"{filename} by {author_name}"
super().__init__(url)
def __repr__(self):
return self.title
class YoutubeQuery(Query):
def __init__(self, the_query):
super().__init__(the_query)
def __repr__(self):
return " ".join(self.the_query) if isinstance(self.the_query, tuple) or isinstance(self.the_query, list) else self.the_query
class SpotifyQuery(Query):
def __init__(self, the_query):
super().__init__(the_query)
class SoundcloudQuery(Query):
def __init__(self, the_query):
super().__init__(the_query) |
class Rect:
def __init__(self, id: int, x: int, y: int, w: int, h: int):
self.id = id
self.pos = (x,y)
self.size = (w,h)
def getX(self):
return self.pos[0]
def getY(self):
return self.pos[1]
def getEndX(self):
return self.getX() + self.getW()
def getEndY(self):
return self.getY() + self.getH()
def getW(self):
return self.size[0]
def getH(self):
return self.size[1]
def __repr__(self):
return "{}: {},{} | {},{}".format(self.id, self.getX(), self.getY(), self.getW(), self.getH())
def parse(line: str) -> Rect:
id = line[1:line.find('@') - 1]
x = line[line.find('@') + 2:line.find(',')]
y = line[line.find(',') + 1:line.find(':')]
w = line[line.find(':') + 2:line.find('x')]
h = line[line.find('x') + 1:len(line) - 1]
#print("{},{} | {},{}".format(x, y, w, h))
return Rect(id, int(x), int(y), int(w), int(h))
dict = {}
with open('input.txt', 'r') as f:
lines = f.readlines()
rects = list(map(parse, lines))
for r in rects:
for y in range (r.getX(), r.getEndX()):
for x in range (r.getY(), r.getEndY()):
k = (x, y)
if k in dict:
dict[k] = 2
else:
dict[k] = 1
sum = 0
for x in dict.values():
if x > 1:
sum += 1
print(sum) |
# Clover全局配置
DEBUG = True
VERSION = '0.9.1'
# MySQL数据库配置
MYSQL = {
'user': 'clover',
'pswd': '52.clover',
'host': '127.0.0.1',
'port': '3306',
}
SQLALCHEMY_DATABASE_URI = 'mysql://{user}:{pswd}@{host}:{port}/clover?charset=utf8'.format(**MYSQL)
SQLALCHEMY_TRACK_MODIFICATIONS=True
# celery配置
CELERY_HOST = 'redis://127.0.0.1:6379/{}'
CELERY_TIMEZONE = 'Asia/Shanghai'
CELERYD_FORCE_EXECV = True # 非常重要,有些情况下可以防止死锁
CELERYD_TASK_TIME_LIMIT = 120 # 单个任务的运行时间不超过此值,否则会被SIGKILL 信号杀死
CELERY_BROKER_URL = CELERY_HOST.format(0)
CELERY_RESULT_BACKEND = CELERY_HOST.format(1)
# 功能控制,True则生效,False则无效
MODULE = {
'join': True, # 展示加入我们
'task': False, # 开发中的定时任务
'keyword': False, # 开发中的关键字配置
}
# 企业微信配置
WECHAT = {
'key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', # 这里是企业微信机器人的key
'template': {
'msgtype': 'markdown',
'markdown': {
'content': 'Clover平台运行报告!\n'+
'>类型:<font color=\"comment\">{type}</font>\n' +
'>团队:<font color=\"comment\">{team}</font>\n' +
'>项目:<font color=\"comment\">{project}</font>\n' +
'>名称:<font color=\"comment\">{name}</font>\n' +
'>接口:<font color=\"comment\">{interface}个</font>\n' +
'>断言:<font color=\"comment\">{verify}个</font>\n' +
'>成功率:<font color=\"comment\">{percent}</font>\n' +
'>开始时间:<font color=\"comment\">{start}</font>\n' +
'>结束时间:<font color=\"comment\">{end}</font>\n' +
'[测试报告-{id}](http://www.52clover.cn/report/detail?id={id})'
}
}
}
# 邮箱配置
EMAIL = {
'sender': '[email protected]',
'receiver': ['[email protected]'],
'password': '',
'smtp_host': 'smtp.qq.com',
}
NOTIFY = {
# 通知的触发事件,成功时通知还是失败时通知
'event': ['success', 'failed'],
# 通知的方式,企业微信还是email,或则配置的其它方式
'channel': ['email'],
} |
#Crie um programa onde o usuário possa digitar cinco valores numéricos e cadastre-os em uma lista, já na #posição correta de inserção (sem usar o sort()). No final, mostre a lista ordenada na tela.
lista=[]
for i in range(0,5):
numeros= int(input(f"Digite o {i}° numero: "))
if i==0 or numeros>lista[-1]:
lista.append(numeros)
print(f"Numero adicionado na ultima posiçao...")
else:
cont=0
while cont<len(lista):
if numeros<=lista[cont]:
lista.insert(cont,numeros)
print(f"Valor adicionado na posiçao {cont} da lista... ")
break
cont+=1
print(lista) |
# Databricks notebook source
# MAGIC %run /Shared/churn-model/utils
# COMMAND ----------
seed = 2022
target = 'Churn'
drop_columns = [target, 'CodigoCliente']
# Get the Train Dataset
dataset = get_dataset('/dbfs/Dataset/Customer')
# Preprocessing Features
dataset, numeric_columns = preprocessing(dataset)
# Split train and test
train_dataset, test_dataset = split_dataset(dataset, seed)
# Parameters we got from the best interaction
params = {'early_stopping_rounds': 50,
'learning_rate': 0.2260,
'max_depth': 64,
'maximize': False,
'min_child_weight': 19.22,
'num_boost_round': 1000,
'reg_alpha': 0.01,
'reg_lambda': 0.348,
'verbose_eval': False,
'seed': seed}
# Get X, y
X_train, X_test, y_train, y_test = get_X_y(train_dataset, test_dataset, target, numeric_columns, drop_columns)
# Train model and Load
model_uri = train_model(X_train, y_train, X_test, y_test)
model = load_model(model_uri)
# Persist in the DBFS
persist_model(model, '/dbfs/models/churn-prediction')
print('Model trained - TEST') |
#
# @lc app=leetcode.cn id=747 lang=python3
#
# [747] min-cost-climbing-stairs
#
None
# @lc code=end |
"""
The difference between: "==" and "is" operators
This can be a bit confusing!!
Note that "==" operator distinguishes whether
two operands have the same value and that
"is" operator distinguishes whether two operands
refer to the same object!
"""
a = [1, 2, 3]
b = [1, 2, 3]
# we have two lists that have the same value!!
print(f'"a is b" is {a is b}')
print(f'"a == b" is {a == b}')
# seems like the same, but are different!
print(f'id of a is {id(a)}')
print(f'id of elements in list a: \n\
a[0] is {id(a[0])} \n\
a[1] is {id(a[1])} \n\
a[2] is {id(a[2])} ')
print(f'id of b is {id(b)}')
print(f'id of elements in list b: \n\
b[0] is {id(a[0])} \n\
b[1] is {id(a[1])} \n\
b[2] is {id(a[2])} ')
"""
The id(memory location) of the list are different while
the elements of the list are the same
"""
a = b
print('now a = b')
print(f'"a is b" is {a is b}')
print(f'"a == b" is {a == b}')
print(f'id of a is {id(a)}')
print(f'id of b is {id(b)}')
# b referes to a variable then everything becomes the same
a = 1
b = 1
print('now a = 1, b = 1')
print(f'"a is b" is {a is b}')
print(f'"a == b" is {a == b}')
# reminder for last class!
|
"""Perform DOI activation task."""
class HSTaskRouter(object):
"""Perform DOI activation task."""
def route_for_task(self, task, args=None, kwargs=None):
"""Return exchange, exchange_type, and routing_key."""
if task == 'hs_core.tasks.check_doi_activation':
return {
'exchange': 'default',
'exchange_type': 'topic',
'routing_key': 'task.default',
}
return None
|
class Note:
def __init__(self, number=0, name='', alt_name='', frequency=0, velocity=1):
self.number = number
self.name = name
self.alt_name = alt_name
self.frequency = frequency
self.velocity = velocity
|
#!/usr/bin/env python
# Copyright (c) 2015 Nelson Tran
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# Mouse basic commands and arguments
MOUSE_CMD = 0xE0
MOUSE_CALIBRATE = 0xE1
MOUSE_PRESS = 0xE2
MOUSE_RELEASE = 0xE3
MOUSE_CLICK = 0xE4
MOUSE_FAST_CLICK = 0xE5
MOUSE_MOVE = 0xE6
MOUSE_BEZIER = 0xE7
# Mouse buttons
MOUSE_LEFT = 0xEA
MOUSE_RIGHT = 0xEB
MOUSE_MIDDLE = 0xEC
MOUSE_BUTTONS = [MOUSE_LEFT,
MOUSE_MIDDLE,
MOUSE_RIGHT]
# Keyboard commands and arguments
KEYBOARD_CMD = 0xF0
KEYBOARD_PRESS = 0xF1
KEYBOARD_RELEASE = 0xF2
KEYBOARD_RELEASE_ALL = 0xF3
KEYBOARD_PRINT = 0xF4
KEYBOARD_PRINTLN = 0xF5
KEYBOARD_WRITE = 0xF6
KEYBOARD_TYPE = 0xF7
# Arduino keyboard modifiers
# http://arduino.cc/en/Reference/KeyboardModifiers
LEFT_CTRL = 0x80
LEFT_SHIFT = 0x81
LEFT_ALT = 0x82
LEFT_GUI = 0x83
RIGHT_CTRL = 0x84
RIGHT_SHIFT = 0x85
RIGHT_ALT = 0x86
RIGHT_GUI = 0x87
UP_ARROW = 0xDA
DOWN_ARROW = 0xD9
LEFT_ARROW = 0xD8
RIGHT_ARROW = 0xD7
BACKSPACE = 0xB2
TAB = 0xB3
RETURN = 0xB0
ESC = 0xB1
INSERT = 0xD1
DELETE = 0xD4
PAGE_UP = 0xD3
PAGE_DOWN = 0xD6
HOME = 0xD2
END = 0xD5
CAPS_LOCK = 0xC1
F1 = 0xC2
F2 = 0xC3
F3 = 0xC4
F4 = 0xC5
F5 = 0xC6
F6 = 0xC7
F7 = 0xC8
F8 = 0xC9
F9 = 0xCA
F10 = 0xCB
F11 = 0xCC
F12 = 0xCD
# etc.
SCREEN_CALIBRATE = 0xFF
COMMAND_COMPLETE = 0xFE
|
def minion_game(string):
# your code goes here
vowels = ['A', 'E', 'I', 'O', 'U']
kevin = 0
stuart = 0
for i in range(len(string)):
if s[i] in vowels:
kevin = kevin + (len(s)-i)
else:
stuart = stuart + (len(s)-i)
if stuart > kevin:
print('Stuart '+ str(stuart))
elif kevin > stuart:
print('Kevin ' + str(kevin))
else:
print('Draw')
if __name__ == '__main__':
s = input()
minion_game(s) |
# https://www.hackerrank.com/challenges/find-second-maximum-number-in-a-list
N = int(input())
line_of_numbers = input().split(' ')
# Extract numbers from input line and add them to list
A = []
for i in range(N):
A.append(int(line_of_numbers[i]))
# Sort list and get largest value from it
A.sort()
max_number = A[-1]
# Remove all instances of the largest value from the list
while (A[-1] == max_number):
A.pop()
# Print the list's last element, which is now the 2nd largest value
print(A[-1])
|
# The kth Factor of n
'''
Given two positive integers n and k.
A factor of an integer n is defined as an integer i where n % i == 0.
Consider a list of all factors of n sorted in ascending order, return the kth factor in this list or return -1 if n has less than k factors.
Example 1:
Input: n = 12, k = 3
Output: 3
Explanation: Factors list is [1, 2, 3, 4, 6, 12], the 3rd factor is 3.
Example 2:
Input: n = 7, k = 2
Output: 7
Explanation: Factors list is [1, 7], the 2nd factor is 7.
Example 3:
Input: n = 4, k = 4
Output: -1
Explanation: Factors list is [1, 2, 4], there is only 3 factors. We should return -1.
Example 4:
Input: n = 1, k = 1
Output: 1
Explanation: Factors list is [1], the 1st factor is 1.
Example 5:
Input: n = 1000, k = 3
Output: 4
Explanation: Factors list is [1, 2, 4, 5, 8, 10, 20, 25, 40, 50, 100, 125, 200, 250, 500, 1000].
Constraints:
1 <= k <= n <= 1000
Hide Hint #1
The factors of n will be always in the range [1, n].
Hide Hint #2
Keep a list of all factors sorted. Loop i from 1 to n and add i if n % i == 0. Return the kth factor if it exist in this list.
'''
class Solution:
def kthFactor(self, n: int, k: int) -> int:
factors = []
for i in range(1,n//2+1):
if n%i == 0:
factors.append(i)
factors.append(n)
return factors[k-1] if len(factors)>=k else -1
|
LOGIN_REQUIRED = 'Es Necesario iniciar Sesion!'
USER_CREATED = 'Usuario Creado Exitosamente!'
LOGOUT = 'Cerraste Sesion!'
ERRO_USER_PASSWORD = 'Usuario o Contrasena Invalidos!'
LOGIN = 'Usuario Autenticado Exitosamente!'
TASK_CREATED = 'Tarea creada Exitosamente!'
TASK_UPDATED = 'Tarea Actualizada!'
TASK_DELETE = "Tarea Eliminada!" |
def left_join(d1, d2):
results = []
for key in d1:
if key in d2:
results.append([key, d1[key], d2[key]])
else:
results.append([key, d1[key], None])
return results |
listagem = ('APRENDER', 'PROGRAMAR',
'LINGUAGEM', 'PYTHON',
'CURSO', 'GRATIS',
'ESTUDAR', 'PRATICAR',
'TRABALHAR', 'MERCADO',
'PROGRAMADOR', 'FUTURO')
for pos in listagem:
print(f'\nNa palavra {pos} temos ', end=' ')
for letra in pos:
if letra.upper() in 'AEIOU':
print(letra, end=' ')
|
# -*- codding: utf-8 -*-
# Ключевые слова без окончаний, в любом регистре.
keywords = [
'Америк',
'Германи',
'гомик',
'гомосек',
'Казахстан',
'Латви',
'Литв',
'мигрант',
'негр',
'нигер',
'пидор',
'Польш',
'Прибалт',
'Украин',
'феминистк',
'Эстони',
]
# Стартовая страница.
start = 1
# Количество проверямых страниц, начиная со start
pages = 25
|
# @Title: 最长回文子串 (Longest Palindromic Substring)
# @Author: 18015528893
# @Date: 2021-02-18 14:28:08
# @Runtime: 1000 ms
# @Memory: 15 MB
class Solution:
def longestPalindrome(self, s: str) -> str:
if len(s) < 2:
return s
def expand(l, r):
while l < r:
if l >= 0 and r < len(s) and s[l] == s[r]:
l -= 1
r += 1
else:
break
return s[l+1:r]
ans = ''
for i in range(len(s)):
# 奇数
l = i - 1
r = i + 1
k = expand(l, r)
if len(k) > len(ans):
ans = k
# 偶数
l = i - 1
r = i + 1 - 1
k = expand(l, r)
if len(k) > len(ans):
ans = k
return ans
|
# In Python, the names of classes follow the CapWords
# convention. Let's convert the input phrase accordingly by
# capitilizing all words and spelling them without underscores in-
# between.
# The input format:
# A word or phrase, with words separated by underscores, like
# function and variable names in Python.
# You might want to change the case of letters since they are not
# necessarily lowercased.
# The output format:
# The name written in the CapWords fashion.
# word.capitalize() if word.isalpha else
word = input()
print(word.title() if word.find("_") == -1 else word.title().replace("_", ''))
print(''.join([x.capitalize() for x in input().lower().split('_')])) |
"""Search in Rotated Sorted Array
Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.
(i.e., [0, 1, 2, 3, 4, 5, 6, 7]) might become [4, 5, 6, 7, 0, 1, 2]).
You are given a target value to search. If found in the arrary return its index, otherwise return
- 1. You may assume no duplicate exists in the array. Your algorithm's runtime complexity must be
in the order of O(logn).
Example 1:
Input: nums = [4 ,5, 6, 7, 0, 1, 2],
target = 0
Output: 4
Example 2:
Input: nums = [4, 5, 6, 7, 0, 1, 2],
target = 3
Ouput: -1
"""
class Solution:
"""二分搜索"""
def search(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: int
"""
def find(nums, l, r, key):
if l > r:
return -1
mid = (l + r) // 2
if nums[mid] == key:
return mid
# nums[l:mid] is sorted
if nums[l] <= nums[mid]:
if key >= nums[l] and key <= nums[mid]:
return find(nums, l, mid - 1, key)
return find(nums, mid + 1, r, key)
# if nums[l:mid] is not sorted, then nums[mid:r] must be sorted
if key >= nums[mid] and key <= nums[r]:
return find(nums, mid + 1, r, key)
return find(nums, l, mid - 1, key)
return find(nums, 0, len(nums) - 1, target)
class SoltuionIteration:
def search(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: int
"""
i, j = 0, len(nums) - 1
while i <= j:
mid = (i + j) // 2
if nums[mid] < target:
if nums[i] < target and nums[i] > nums[mid]:
j = mid - 1
elif nums[i] == target:
return i
else:
i = mid + 1
elif nums[mid] > target:
if nums[j] > target and nums[j] < nums[mid]:
i = mid + 1
elif nums[j] == target:
return j
else:
j = mid - 1
else:
return mid
return -1
if __name__ == '__main__':
cases = [
([4, 5, 6, 7, 0, 1, 2], 0, 4),
([4, 5, 6, 7, 0, 1, 2], 3, -1),
]
solutions = [Solution, SoltuionIteration]
for case in cases:
for S in solutions:
result = S().search(case[0], case[1])
assert result == case[2]
|
pow_of_5th = {i:i**5 for i in range(10)}
def get_5th_pow_of(n):
return pow_of_5th[n]
def get_sum_of_5th_pow_of(n):
sum = 0
for digit in str(n):
sum += get_5th_pow_of(int(digit))
return sum
if __name__ == "__main__":
numb = set()
ceil = ((pow_of_5th[9]) * 9)+1 # Verify this ceil
for n in range(2, ceil):
if get_sum_of_5th_pow_of(n) == n:
numb.add(n)
print(sum(numb)) |
CONSUMER_API_KEY = ""
CONSUMER_API_SECRET = ""
ACCESS_TOKEN = ""
ACCESS_KEY = ""
|
def emergency_stop(driver):
driver.setSteeringAngle(0.0)
driver.setCruisingSpeed(0)
def stop(driver, frame=30):
driver.setSteeringAngle(0.0)
driver.setCruisingSpeed(0)
def print_all_devices(r):
print('---------------------------------------')
for i in range(r.getNumberOfDevices()):
print('~ Device:', r.getDeviceByIndex(i).getName(), ' ===> ', r.getDeviceByIndex(i))
print('---------------------------------------')
|
file = open("input01.txt").read().splitlines()
file = [int(x) for x in file]
"""Part One"""
counter = 0
for i in range(1, len(file)):
if file[i] - file[i-1] > 0:
counter += 1
print(counter)
"""Part Two"""
temp = []
for i in range(len(file)-2):
temp.append(sum(file[i:i+3]))
counter = 0
for i in range(1, len(temp)):
if temp[i] - temp[i-1] > 0:
counter += 1
print(counter)
|
"""Placeholder for MicroPython framebuf module"""
MONO_VLSB = 0
MONO_HLSB = 0
MONO_HMSB = 0
RGB565 = 0
GS4_HMSB = 0
class FrameBuffer():
def __init__(self, buffer, width, height, format, stride=None):
pass
|
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
# @Script: solution.py
# @Author: Pradip Patil
# @Contact: @pradip__patil
# @Created: 2018-02-12 23:58:20
# @Last Modified By: Pradip Patil
# @Last Modified: 2018-02-13 00:15:16
# @Description: https://www.hackerrank.com/challenges/find-second-maximum-number-in-a-list/problem
if __name__ == '__main__':
n = int(input())
# 1. create list fom space separated input
# 2. remove duplicates by creating set from list
# 3. sort the set and print second last element
print(sorted(set([int(i) for i in input().split()]))[-2])
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2018/2/1 上午8:00
# @Author : wook
# @File : database.py
"""
Database configuration file
"""
host = "127.0.0.1"
user = "root"
password = "123456"
database = "tro_db"
port = 3306
charset = "utf8"
prefix = 'db_'
|
class Base(object):
TYPE_ATTRIBUTES = ("_entity_type", "workflow_type")
@staticmethod
def _get_camelcase(attribute):
if attribute in Base.TYPE_ATTRIBUTES:
return "type"
tmp = attribute.split("_")
return tmp[0] + "".join([w.title() for w in tmp[1:]])
@staticmethod
def _get_serialized(attribute_value):
serializable = getattr(attribute_value, "serialize", None)
if serializable:
attribute_value = attribute_value.serialize()
return attribute_value
def _get_serialized_attribute(self, attribute_value):
if isinstance(attribute_value, list):
attribute_value = [self._get_serialized(a) for a in attribute_value]
else:
attribute_value = self._get_serialized(attribute_value)
return attribute_value
def serialize(self):
return {self._get_camelcase(k): self._get_serialized_attribute(v)
for k, v in self.__dict__.items()
if v is not None
}
class Entity(Base):
def __init__(self, value):
self.value = value
|
n = int(input())
while n:
p = str(input())
print("gzuz")
n = n - 1
|
group_name = [
'DA',
'DG',
'DC',
'DT',
'DI'
]
|
"""
Crie um programa que leia vários números inteiros pelo teclado.
O programa só vai parar quando o usuário digitar o valor 999,
que é a condição de parada. No final, mostre quantos números
foram digitados e qual foi a soma entre eles (desconsiderando o flag).
"""
|
LESSONS = [
{
"Move cursor left": ["h"],
"Move cursor right": ["l"],
"Move cursor down": ["j"],
"Move cursor up": ["k"],
"Close file": [":q"],
"Close file, don't save changes": [":q!"],
"Save changes to file": [":w"],
"Save changes and close file": [":wq", ":x", "ZZ"],
"Delete character at cursor": ["x"],
"Insert at cursor": ["i"],
"Insert at beginning of line": ["I"],
"Append after cursor": ["a"],
"Append at end of line": ["A"],
"Exit insert mode": ["ESC"]
},
{
"Delete word": ["dw"],
"Delete to end of line": ["d$", "D"],
"Next word": ["w"],
"Go to end of text on current line": ["$"],
"Go to beginning of text on current line": ["^"],
"Go to beginning of current line": ["0"],
"Go two word forward": ["2w"],
"Go to end of third word ahead": ["3e"],
"Delete two words": ["d2w"],
"Delete entire line": ["dd"],
"Delete two lines": ["2dd"],
"Undo last change": ["u"],
"Undo changes on entire line": ["U"],
"Redo changes": ["CTRL_R"]
},
{
"Paste after cursor": ["p"],
"Paste before cursor": ["P"],
"Replace character under cursor": ["r"],
"Change word": ["cw"],
"Change to end of line": ["c$", "C"],
"Change two words": ["c2w"]
},
{
"Go to line 50": ["50G"],
"Go to last line in file": ["G"],
"Go to first line in file": ["gg"],
"Search for \"vim\"": ["/vim"],
"Go to next search result": ["n"],
"Go to previous search result": ["N"],
"Search backwards for \"editor\"": ["?editor"],
"Jump to previous location (jump back)": ["CTRL_O"],
"Jump to next location (jump foward)": ["CTRL_I"],
"Go to matching parentheses or brackets": ["%"],
"Replace bad with good in CURRENT LINE": [":%s/bad/good"],
"Replace hi with bye in entire file": [":%s/hi/bye/g"],
"Replace x with y in entire file, prompt for changes": ["%s/x/y/gc"]
},
{
"Run shell command ls": [":!ls"],
"Open visual mode": ["v"],
"Visual selected world": ["vw"],
"Visual select word, then delete word": ["vwd", "vwx"],
"Save current file as \"socket.js\"": [":w socket.js"],
"Read in file \"play.py\"": [":r play.py"]
},
{
"Open new line below": ["o"],
"Open new line above": ["O"],
"Go to end of word": ["e"],
"Go to end of next word": ["2e"],
"Enter replace mode": ["R"],
"Yank word": ["yw"],
"Visual select word, then yank": ["vwy"],
"Yank to end of current line": ["y$"],
"Change search settings to ignore case": ["set ignorecase", "set ic"],
"Change search settings to use case": ["set noignorecase", "set noic"]
},
{
"Open file \"~/.vimrc\"": [":e ~/.vimrc"],
"Get help for \"d\" command": [":help d"],
"Get help for \"y\" command": [":help y"]
}
]
|
__author__ = 'JPaschoal'
__version__ = '1.0.1'
__email__ = '[email protected]'
__date__ = '06/05/2021'
'''
Dizemos que um número natural n é palídromo (3) se
o 1º algarismo é igual ao seu último algarismo,
o 2º algarismo é igual ao seu penúltimo algarismo,
e assim sucessivamente.
Exemplos -
Palídromos: 567765 e 32423.
Não palídromos: 567675.
Dado um número natural n > 10, verificar se n é palídrome.
'''
# aux dig reverso n
# 567765 0 0 567765
#-------------------------------------------
# 567765 5 5
# 56776 6 56--> 50 + 6 = 56
# 5677 7 567--> 560 + 7 = 567
# 567 7 5677--> 5670 + 7 = 5677
# 56 6 56776--> 56770 + 6 = 56776
# 5 5 567765--> 567760 + 5 = 567765
# 0
# aux//10 aux%10 reverso*10 + dig
# // divisão inteira
# % resto da divisão
def traco():
return print('-----'*10)
print('')
print("PALÍDROMOS")
traco()
# input
n = int(input('Digite um número maior que 10: '))
# váriaveis
aux = n
dig = reverso = 0
while aux != 0:
dig = aux%10
#print(f'{dig}')
reverso = reverso*10 + dig
#print(f'{reverso}')
aux //= 10
#print(f'{aux}')
print('')
if reverso == n:
print(f'{n}, é palídromo.')
else:
print('Não é palídrome.')
traco()
print('')
# END |
class Car:
"""
Car models a car w/ tires and an engine
"""
def __init__(self, engine, tires):
self.engine = engine
self.tires = tires
def description(self):
print(f"A car with a {self.engine} engine, and {self.tires} tires")
def wheel_circumference(self):
if len(self.tires) > 0:
return self.tires[0].circumference()
else:
return 0
|
# # 15题 字典也是类
# class User:
# def __init__(self, user, pwd, email):
# self.user = user
# self.pwd = pwd
# self.email = email
#
# user_list = []
#
# # obj = User('alex1', '123', '[email protected]')
# obj = {'user': 'alex1', 'pwd': 123,
# 'email': '[email protected]'} # dict({'user':'alex1','pwd':123,'email':'[email protected]'})
# user_list.append(obj)
#
# # obj = User('alex2', '123', '[email protected]')
# obj = {'user': 'alex1', 'pwd': 123, 'email': '[email protected]'}
# user_list.append(obj)
#
# # obj = User('alex3', '123', '[email protected]')
# obj = {'user': 'alex1', 'pwd': 123, 'email': '[email protected]'}
# user_list.append(obj)
#
# for row in user_list:
# # print(row.user, row.pwd, row.email)
# print(row['user'], row['pwd'], row['emailr'])
# 16题
class User:
def __init__(self, name, pwd):
self.name = name
self.pwd = pwd
class Account:
def __init__(self):
self.user_list = []
def login(self):
name = input('请输入账号:')
pwd = input('请输入密码:')
flag = False
for user in self.user_list:
if name == user.name and pwd == user.pwd:
flag = True
break
if flag:
print('登录成功')
else:
print('登录失败')
def register(self):
i = 0
while i < 3:
i += 1
name = input('请输入用户名:')
pwd = input('请设置密码:')
usr = User(name, pwd)
self.user_list.append(usr)
def run(self):
self.register()
self.login()
if __name__ == '__main__':
obj = Account()
obj.run()
|
def centuryFromYear(year):
if ((year > 0) and (year <= 2005)):
str_year = str(year) # converts integer input to string type with 'str()'
len_year = len(str_year) # finds length of new 'str_year'
century_arr = []
century = 0
# iterates through 'str_year'...
for digit in range(len_year):
# appends each digit from 'str_year' to century_arr
century_arr.append(str_year[digit])
if len_year == 1:
century += 1
if len_year == 2:
century += 1
if len_year == 3:
if ((century_arr[1] == '0') and (century_arr[2] == '0')):
century = int(century_arr[0])
else:
century = int(century_arr[0]) + 1
if len_year == 4:
if ((century_arr[2] == '0') and (century_arr[3] == '0')):
century = int(century_arr[0] + century_arr[1])
else:
century = int(century_arr[0] + century_arr[1]) + 1
return century
else:
return "This is not a valid year. Please try again."
print(centuryFromYear(1905)) # should print "20"
print(centuryFromYear(12)) # should print "1"
print(centuryFromYear(195)) # should print "2"
print(centuryFromYear(2005)) # should print "21"
print(centuryFromYear(2035)) # should print "This is not a valid year. Please try again."
print(centuryFromYear(1700)) # should print "17"
print(centuryFromYear(45)) # should print "1" |
def get_roles(client: object) -> list:
"""Get information about the roles in Blackbaud.
Documentation:
https://docs.blackbaud.com/on-api-docs/api/constituents/role/get-listall
Args:
client (object): The ON API client object.
Returns:
List of dictionaries.
"""
url = '/role/ListAll'
return client.get(url)
|
# coding: utf-8
# Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department
# Distributed under the terms of "New BSD License", see the LICENSE file.
__author__ = "Sarath Menon, Jan Janssen"
__copyright__ = (
"Copyright 2020, Max-Planck-Institut für Eisenforschung GmbH - "
"Computational Materials Design (CM) Department"
)
__version__ = "1.0"
__maintainer__ = "Jan Janssen"
__email__ = "[email protected]"
__status__ = "production"
__date__ = "Feb 28, 2020"
func_list = [
"file",
"extract_global",
"extract_box",
"extract_atom",
"extract_fix",
"extract_variable",
"get_natoms",
"set_variable",
"reset_box",
"generate_atoms",
"set_fix_external_callback",
"get_neighlist",
"find_pair_neighlist",
"find_fix_neighlist",
"find_compute_neighlist",
"get_neighlist_size",
"get_neighlist_element_neighbors",
"command",
"gather_atoms",
"scatter_atoms",
"get_thermo",
"extract_compute",
]
prop_list = [
"version",
"natoms",
"has_exceptions",
"has_gzip_support",
"has_png_support",
"has_jpeg_support",
"has_ffmpeg_support",
"installed_packages",
]
command_list = [
"angle_coeff",
"angle_style",
"atom_modify",
"atom_style",
"atom_style",
"balance",
"bond_coeff",
"box",
"bond_style",
"boundary",
"change_box",
"clear",
"comm_modify",
"compute",
"compute_modify",
"create_atoms",
"create_bonds",
"create_box",
"delete_atoms",
"delete_bonds",
"dielectric",
"dihedral_coeff",
"dihedral_style",
"dimension",
"displace_atoms",
"dump",
"dynamical_matrix",
"fix",
"fix_modify",
"echo",
"group2ndx",
"ndx2group",
"group",
"hyper",
"improper_coeff",
"improper_style",
"include",
"info",
"jump",
"kim_init",
"kim_interactions",
"kim_query",
"kim_param",
"kspace_modify",
"kspace_style",
"label",
"log",
"message",
"min_modify",
"lattice",
"mass",
"minimize",
"minimize/kk",
"min_style",
"molecule",
"neb",
"neb/spin",
"next",
"neighbor",
"neigh_modify",
"newton",
"nthreads",
"package",
"pair_coeff",
"pair_modify",
"pair_style",
"pair_write",
"partition",
"prd",
"print",
"python",
"processors",
"read",
"read_data",
"read_dump",
"read_restart",
"region",
"replicate",
"rerun",
"reset_ids",
"reset_timestep",
"restart",
"run",
"run_style",
"server",
"set",
"shell",
"special_bonds",
"suffix",
"tad",
"temper",
"thermo",
"thermo_modify",
"thermo_style",
"third_order",
"timer",
"timestep",
"uncompute",
"undump",
"unfix",
"units",
"variable",
"velocity",
"write_coeff",
"write_data",
"write_dump",
"write_restart",
]
thermo_list = [
"step",
"elapsed",
"elaplong",
"dt",
"time",
"cpu",
"tpcpu",
"spcpu",
"cpuremain",
"part",
"timeremain",
"atoms",
"temp",
"press",
"pe",
"ke",
"etotal",
"enthalpy",
"evdwl",
"ecoul",
"epair",
"ebond",
"eangle",
"edihed",
"eimp",
"emol",
"elong",
"etail",
"vol",
"density",
"lx",
"ly",
"lz",
"xlo",
"xhi",
"ylo",
"yhi",
"zlo",
"zhi",
"xy",
"xz",
"yz",
"xlat",
"ylat",
"zlat",
"bonds",
"angles",
"dihedrals",
"impropers",
"pxx",
"pyy",
"pzz",
"pxy",
"pxz",
"pyz",
"fmax",
"fnorm",
"nbuild",
"ndanger",
"cella",
"cellb",
"cellc",
"cellalpha",
"cellbeta",
"cellgamma",
]
|
#
# PySNMP MIB module CISCO-DMN-DSG-SDI-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-DMN-DSG-SDI-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:37:52 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsUnion, SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsIntersection")
ciscoDSGUtilities, = mibBuilder.importSymbols("CISCO-DMN-DSG-ROOT-MIB", "ciscoDSGUtilities")
NotificationGroup, ObjectGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance")
Counter64, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, MibIdentifier, Unsigned32, iso, Gauge32, Counter32, Bits, Integer32, ObjectIdentity, IpAddress, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "MibIdentifier", "Unsigned32", "iso", "Gauge32", "Counter32", "Bits", "Integer32", "ObjectIdentity", "IpAddress", "TimeTicks")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
ciscoDSGSDI = ModuleIdentity((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32))
ciscoDSGSDI.setRevisions(('2012-03-20 11:00', '2010-08-24 07:00',))
if mibBuilder.loadTexts: ciscoDSGSDI.setLastUpdated('201203201100Z')
if mibBuilder.loadTexts: ciscoDSGSDI.setOrganization('Cisco Systems, Inc.')
sdiTable = MibIdentifier((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2))
sdiInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 1))
sdiVii = MibScalar((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disabled", 1), ("enabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sdiVii.setStatus('current')
vancGlobalStatusInterlaced = MibScalar((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disabled", 1), ("enabled", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vancGlobalStatusInterlaced.setStatus('current')
vancGlobalStatusFrames = MibScalar((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vancGlobalStatusFrames.setStatus('current')
vancGlobalStatusLines = MibScalar((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vancGlobalStatusLines.setStatus('current')
vancGlobalStatusWords = MibScalar((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vancGlobalStatusWords.setStatus('current')
vancGlobalStatusFirst = MibScalar((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vancGlobalStatusFirst.setStatus('current')
vancGlobalStatusLast = MibScalar((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vancGlobalStatusLast.setStatus('current')
vancGlobalStatusSwitch = MibScalar((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vancGlobalStatusSwitch.setStatus('current')
vancGlobalStatusMultiLine = MibScalar((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disabled", 1), ("enabled", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vancGlobalStatusMultiLine.setStatus('current')
vancCfgTable = MibTable((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2, 1), )
if mibBuilder.loadTexts: vancCfgTable.setStatus('current')
vancCfgEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2, 1, 1), ).setIndexNames((0, "CISCO-DMN-DSG-SDI-MIB", "vancCfgSvcID"))
if mibBuilder.loadTexts: vancCfgEntry.setStatus('current')
vancCfgSvcID = MibTableColumn((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("eia708", 1), ("afd", 2), ("dpi", 3), ("smpte2031", 4), ("sdpOP47", 5), ("multiOP47", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vancCfgSvcID.setStatus('current')
vancCfgEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vancCfgEnable.setStatus('current')
vancCfgOffset = MibTableColumn((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 18))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vancCfgOffset.setStatus('current')
sdiAudioSlotTable = MibTable((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2, 2), )
if mibBuilder.loadTexts: sdiAudioSlotTable.setStatus('current')
sdiAudioSlotEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2, 2, 1), ).setIndexNames((0, "CISCO-DMN-DSG-SDI-MIB", "sdiAudioSlotGroup"), (0, "CISCO-DMN-DSG-SDI-MIB", "sdiAudioSlotPosition"))
if mibBuilder.loadTexts: sdiAudioSlotEntry.setStatus('current')
sdiAudioSlotGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sdiAudioSlotGroup.setStatus('current')
sdiAudioSlotPosition = MibTableColumn((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sdiAudioSlotPosition.setStatus('current')
sdiAudioSlotAud = MibTableColumn((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sdiAudioSlotAud.setStatus('current')
sdiAudioSlotChan = MibTableColumn((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2, 2, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sdiAudioSlotChan.setStatus('current')
vancServiceStatusTable = MibTable((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2, 3), )
if mibBuilder.loadTexts: vancServiceStatusTable.setStatus('current')
vancServiceStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2, 3, 1), ).setIndexNames((0, "CISCO-DMN-DSG-SDI-MIB", "vancServiceStatusServiceID"))
if mibBuilder.loadTexts: vancServiceStatusEntry.setStatus('current')
vancServiceStatusServiceID = MibTableColumn((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2, 3, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("eia708", 1), ("afd", 2), ("dpi", 3), ("smpte2031", 4), ("sdpOP47", 5), ("multiOP47", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vancServiceStatusServiceID.setStatus('current')
vancServiceStatusActive = MibTableColumn((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vancServiceStatusActive.setStatus('current')
vancServiceStatusADJLine = MibTableColumn((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2, 3, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vancServiceStatusADJLine.setStatus('current')
vancServiceStatusACTLineF1 = MibTableColumn((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2, 3, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vancServiceStatusACTLineF1.setStatus('current')
vancServiceStatusACTLineF2 = MibTableColumn((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2, 3, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vancServiceStatusACTLineF2.setStatus('current')
vancServiceStatusLinesMAX = MibTableColumn((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2, 3, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vancServiceStatusLinesMAX.setStatus('current')
vancServiceStatusDataAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2, 3, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vancServiceStatusDataAvg.setStatus('current')
vancServiceStatusPacketsOKAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2, 3, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vancServiceStatusPacketsOKAvg.setStatus('current')
vancServiceStatusPacketsDroppedAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 1429, 2, 2, 5, 32, 2, 3, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vancServiceStatusPacketsDroppedAvg.setStatus('current')
mibBuilder.exportSymbols("CISCO-DMN-DSG-SDI-MIB", vancGlobalStatusMultiLine=vancGlobalStatusMultiLine, sdiTable=sdiTable, vancGlobalStatusSwitch=vancGlobalStatusSwitch, vancServiceStatusPacketsOKAvg=vancServiceStatusPacketsOKAvg, sdiAudioSlotGroup=sdiAudioSlotGroup, vancCfgOffset=vancCfgOffset, vancCfgTable=vancCfgTable, PYSNMP_MODULE_ID=ciscoDSGSDI, vancServiceStatusDataAvg=vancServiceStatusDataAvg, vancServiceStatusACTLineF2=vancServiceStatusACTLineF2, sdiAudioSlotEntry=sdiAudioSlotEntry, vancServiceStatusActive=vancServiceStatusActive, sdiInfo=sdiInfo, sdiAudioSlotTable=sdiAudioSlotTable, vancServiceStatusLinesMAX=vancServiceStatusLinesMAX, vancServiceStatusEntry=vancServiceStatusEntry, vancGlobalStatusWords=vancGlobalStatusWords, vancServiceStatusPacketsDroppedAvg=vancServiceStatusPacketsDroppedAvg, sdiAudioSlotChan=sdiAudioSlotChan, vancServiceStatusServiceID=vancServiceStatusServiceID, vancGlobalStatusFirst=vancGlobalStatusFirst, sdiAudioSlotAud=sdiAudioSlotAud, sdiVii=sdiVii, vancServiceStatusADJLine=vancServiceStatusADJLine, vancServiceStatusTable=vancServiceStatusTable, vancServiceStatusACTLineF1=vancServiceStatusACTLineF1, vancGlobalStatusLines=vancGlobalStatusLines, ciscoDSGSDI=ciscoDSGSDI, vancGlobalStatusInterlaced=vancGlobalStatusInterlaced, vancCfgSvcID=vancCfgSvcID, vancCfgEntry=vancCfgEntry, vancCfgEnable=vancCfgEnable, sdiAudioSlotPosition=sdiAudioSlotPosition, vancGlobalStatusLast=vancGlobalStatusLast, vancGlobalStatusFrames=vancGlobalStatusFrames)
|
#
# TrafficLight.py
# Taco --- SPH Innovation Challenge
#
# Created by Mat, Kon and Len on 2017-03-11.
# Copyright 2016 Researchnix. All rights reserved.
#
class TrafficLight:
# State is a 2D array with the values 0 and 1 associating red and green
# to the path from one incoming street to another outgoing street
state = {}
def __init__(self, incoming, outgoing):
for o in outgoing:
self.state[o.ID] = {}
for i in incoming:
self.state[o.ID][i.ID] = True
# For now every state is 1, so every car can go anywhere
def setState(self):
pass
# Dummy function, should actually decide if
# if a path on the intersection is clear
# depending on its current state
def pathAllowed(self, i, o):
return self.state[o][i]
# Another dummt functio
def update(self, time):
pass
|
# Lists of valid tags and mappings for tags canonicalization.
#
# Copyright (c) 2020-2021 Tatu Ylonen. See file LICENSE and https://ylonen.org
# Mappings for tags in template head line ends outside parentheses. These are
# also used to parse final tags from translations.
xlat_head_map = {
"m": "masculine",
"f": "feminine",
"m/f": "masculine feminine",
"m./f.": "masculine feminine",
"m or f": "masculine feminine",
"m or n": "masculine neuter",
"m or c": "masculine common",
"f or m": "feminine masculine",
"f or n": "feminine neuter",
"f or n.": "feminine neuter", # fimmtíu/Icelandig
"f or c": "feminine common", # sustainability/Tr/Norwegian
"n or f": "neuter feminine",
"n or m": "neuter masculine",
"n or c": "neuter common",
"c or m": "common masculine",
"c or f": "common feminine", # picture book/Tr/Norwegian
"c or n": "common neuter", # ethylene/Eng/Tr/Danish
"m or f or n": "masculine feminine neuter",
"f or m or n": "feminine masculine neuter",
"m or f or c": "masculine feminine common",
"f or m or c": "feminine masculine common",
"m or c or n": "masculine common neuter",
"f or c or n": "feminine common neuter",
"m or n or c": "masculine neuter common",
"f or n or c": "feminine neuter common",
"c or f or n": "common feminine neuter",
"c or m or n": "common masculine neuter",
"n or f or c": "neuter feminine common",
"n or m or c": "neuter masculine common",
"n or m or f": "neuter masculine feminine",
"n or f or m": "neuter feminine masculine",
"c or m or f": "common masculine feminine",
"c or f or m": "common masculine feminine",
"m or c or n": "masculine common neuter",
"f or n or m": "feminine neuter masculine",
"m or n or f": "masculine neuter feminine",
"f or c or m": "feminine common masculine",
"m or c or f": "masculine common feminine",
"m or f or m": "?masculine feminine", # fantasma,soldado/Portuguese
"f or pl": "feminine singular plural", # XXX information/Eng/Tr/Latgalian
"m or pl": "masculine singular plural", # XXX information/Eng/Tr/Latgalian
"n or pl": "neuter singular plural", # XXX table scrap/Tr/Greek
"c or pl": "common singular plural",
"pl or f": "feminine singular plural", # XXX grit/Eng/Tr(husked...)/German
"pl or m": "masculine singular plural",
"pl or n": "neuter singular plural", # ordnance/Tr/German
"pl or c": "common singular plural", # "you don't say"/Tr/Romanian
"sg or f": "singular feminine",
"sg or m": "singular masculine",
"sg or n": "singular neuter",
"sg or c": "singular common",
"m or sg": "masculine singular",
"f or sg": "feminine singular",
"m or sg": "neuter singular",
"c or sg": "common singular",
"m or pl": "masculine plural",
"f or pl": "feminine plural",
"n or pl": "neuter plural",
"c or pl": "common plural",
"m or f pl": "masculine feminine plural",
"c or n or n pl": "common neuter singular plural", # XXX augmentation/Tr
"pl or m or f": "masculine feminine singular plural", # XXX suc* my co*/Tr
"m or f or sg or pl": "masculine feminine singular plural", # Ainu/Russian
"m or f or pl": "masculine feminine plural", # that/Tr/Dutch
"m or f sg": "masculine feminine singular",
"pl or f or m or n": "", # Sindhi/Tr(language)/Spanish
"pl or f or n": "masculine feminine neuter plural singular singular", # XXX
# crush/Portuguese head
"m or m f": "?masculine feminine",
# beginner/Eng/Tr/Polish
"m or m pl": "masculine singular plural",
"f or f pl": "feminine singular plural",
"n or n pl": "neuter singular plural",
"c or c pl": "common singular plural",
"f pl or n pl": "feminine neuter plural", # diurnal/Eng/Tr/Polish
"f pl or n or n pl": "feminine neuter singular plural", # veneral/Tr/Polish
"m or m pl or f or f pl or n or n pl": "", # "a lot"/Tr/Latin
"pl or n or n pl": "neuter singular plural", # salt/Tr/Greek
"f or f": "feminine",
"topo.": "toponymic", # E.g., p/Egyptian
"n": "neuter",
"m or n or f": "masculine neuter feminine", # cataract/Tr/Dutch
"c": "common", # common gender in at least West Frisian
"sg": "singular",
"pl": "plural",
"pl or sg": "plural singular",
"sg or pl": "singular plural",
"m sg or m pl": "masculine singular plural", # valenki/Tr/German
"f sg or f pl": "feminine singular plural",
"n sg or n pl": "neuter singular plural",
"c sg or c pl": "common singular plural",
"m pl or f pl": "masculine feminine plural", # comedian/English/Tr/Welsh
"m pl or n pl": "masculine neuter plural", # whose/Tr/Latin
"m pl or n": "?masculine neuter plural singular", # pimpernel/Tr/Bulgarian
"m sg or f sg": "masculine singular feminine", # your/Eng/Tr/Walloon
"f sg or m sg": "masculine singular feminine", # your/Eng/Tr/Walloon
"n sg or n sg": "masculine singular feminine", # your/Eng/Tr/Walloon
# copacetic/English/Tr/Hebrew:
"m or m pl or f or f pl": "masculine feminine singular plural",
# your/Eng/Tr/Norwegian:
"m pl or f pl or n pl": "masculine feminine neuter plural",
"m sg or f sg or n sg": "masculine feminine neuter singular",
"m pl or f or f pl": "masculine feminine singular plural",
"c or c pl": "common singular plural",
"c pl or n pl": "common neuter plural", # which/Tr/Danish
"inan": "inanimate",
"Inanimate": "inanimate", # e.g., "James Bay"/English/Tr/Northern East Cree
"inan or anim": "inanimate animate",
"anim or inan": "animate inanimate",
"anim": "animate",
"f anim": "feminine animate",
"m anim": "masculine animate",
"n anim": "neuter animate",
"f inan": "feminine inanimate",
"m inan": "masculine inanimate",
"n inan": "neuter inanimate",
"f anim sg": "feminine animate singular",
"m anim sg": "masculine animate singular",
"n anim sg": "neuter animate singular",
"f inan sg": "feminine inanimate singular",
"m inan sg": "masculine inanimate singular",
"n inan sg": "neuter inanimate singular",
"f anim pl": "feminine animate plural",
"m anim pl": "masculine animate plural",
"n anim pl": "neuter animate plural",
"f inan pl": "feminine inanimate plural",
"m inan pl": "masculine inanimate plural",
"n inan pl": "neuter inanimate plural",
"f anim or f inan": "feminine animate inanimate",
"f inan or f anim": "feminine inanimate animate",
"m anim or m inan": "masculine animate inanimate",
"m inan or m anim": "masculine inanimate animate",
"m anim or f anim": "masculine animate feminine",
"f anim or m anum": "feminine animate masculine",
"f inan or f inan pl": "feminine inanimate singular plural",
"m inan or m inan pl": "masculine inanimate singular plural",
"n inan or n inan pl": "neuter inanimate singular plural",
"f anim or f anim pl": "feminine animate singular plural",
"m anim or m anim pl": "masculine animate singular plural",
"n anim or n anim pl": "neuter animate singular plural",
"f anim or m anim": "feminine animate masculine",
"f inan or n inan": "feminine inanimate neuter",
"m inan pl or m anim pl": "masculine inanimate animate plural",
"f inan or m inan": "feminine masculine inanimate",
"f inan or m inan or f inan pl":
"feminine masculine inanimate singular plural",
"f inan or m inan or f inan pl or m inan pl":
"feminine masculine inanimate singular plural",
"m inan pl or m anim pl or f anim pl":
"masculine feminine inanimate animate plural",
"f anim or f inan or f anim pl":
"feminine animate inanimate singular plural",
"f anim or f inan or f anim pl or f inan pl":
"feminine animate inanimate singular plural",
"f anim pl or f inan or f inan pl":
"feminine animate inanimate singular plural", # XXX
"f inan pl or f anim or f anim pl":
"feminine inanimate animate singular plural", # XXX
"m anim pl or f anim pl": "masculine feminine animate plural",
"m anim pl or f anim pl or f inan or f inan pl":
"masculine animate plural feminine inanimate",
"m anim pl or f anim pl or f inan":
"masculine animate feminine plural inanimate singular", # XXX
"f anim pl or f inan pl": "feminine animate inanimate plural",
"f anim pl or f inan pl or m anim pl":
"feminine masculine animate inanimate plural",
"m anim pl or f anim pl or f inan pl":
"masculine animate feminine plural inanimate", # XXX
"f inan pl or m anim pl": "feminine masculine animate inanimate plural",
"f inan pl or m anim pl or f anim pl":
"masculine animate feminine plural inanimate", # XXX
"m anim or f anim or m anim pl":
"masculine animate feminine singular plural",
"m anim or f anim or m anim pl or f anim pl":
"masculine animate feminine singular plural",
"n inan or n anim or m inan or m anim":
"neuter inanimate animate masculine",
"m anim pl or f anim pl or m anim or f anim":
"masculine animate plural feminine singular",
"m anim pl or f inan or f inan pl":
"masculine animate plural feminine inanimate singular", # XXX
"m anim or n inan": "masculine animate neuter inanimate", # XXX
"n inan pl or m inan or m inan pl":
"neuter inanimate plural masculine singular plural", # XXX
"n inan pl or f inan or f inan pl":
"neuter inanimate plural feminine singular", # XXX
"f inan pl or m anim or m anim pl":
"feminine inanimate plural masculine animate singular", # XXX
"f inan pl or m inan or m inan pl":
"feminine inanimate plural masculine singular", # XXX
"n anim": "neuter animate",
"n anim pl or n inan or n inan pl":
"neuter animate plural inanimate singular", # XXX
"n inan or n inan pl or f inan or f inan pl":
"neuter inanimate singular plural feminine",
"n inan pl or n anim or n anim pl":
"neuter inanimate plural animate singular", # XXX
"n anim or n inan": "neuter animate inanimate",
"pers": "person", # XXX check what this really is used for? personal?
"npers": "impersonal",
"f pers": "feminine person",
"m pers": "masculine person",
"f pers or f pers pl": "feminine person singular plural",
"m pers or m pers pl": "masculine person singular plural",
"m pers or f pers": "masculine person feminine",
"f pers or m pers": "feminine person masculine",
"m pers or n pers": "masculine person neuter",
"f pers or n pers": "feminine person neuter",
"m pers or m anim": "masculine person animate",
"m pers or m inan": "masculine person inanimate",
"f pers or f anim": "feminine person animate",
"f pers or f inan": "feminine person inanimate",
"m pers or f": "masculine person feminine",
"m inan or m pers": "masculine inanimate person",
"m or m pers or f": "masculine inanimate animate person feminine", # XXX
"m anim or m pers": "masculine animate person",
"f anim or f pers": "feminine animate person",
"n anim or n pers": "neuter animate person",
"m pers or n": "masculine person neuter animate inanimate", # XXX
"m pers or f": "masculine person feminine animate inanimate", # XXX
"vir": "virile",
"nvir": "nonvirile",
"anml": "animal-not-person",
"f anml": "feminine animal-not-person",
"m anml": "masculine animal-not-person",
"f animal": "feminine animal-not-person",
"m animal": "masculine animal-not-person",
"m animal or f animal": "masculine animal-not-person feminine",
"f animal or m animal": "feminine animal-not-person masculine",
"m anim or f": "masculine animate feminine inanimate",
"impf": "imperfective",
"impf.": "imperfective",
"pf": "perfective",
"pf.": "perfective",
"impf or pf": "imperfective perfective", # ought/Eng/Tr/Serbo-Croatian
"pf or impf": "perfective imperfective", # start/Tr(of an activity)/Russian
"invariable": "invariable",
"n.": "noun",
"v.": "verb",
"adj.": "adjective",
"adv.": "adverb",
"?": "",
"1.": "first-person",
"2.": "second-person",
"3.": "third-person",
"1": "class-1",
"1a": "class-1a",
"2": "class-2",
"2a": "class-2a",
"3": "class-3",
"4": "class-4",
"5": "class-5",
"6": "class-6",
"7": "class-7",
"8": "class-8",
"9": "class-9",
"9a": "class-9a",
"10": "class-10",
"10a": "class-10a",
"11": "class-11",
"12": "class-12",
"13": "class-13",
"14": "class-14",
"15": "class-15",
"16": "class-16",
"17": "class-17",
"18": "class-18",
"1/2": "class-1 class-2",
"3/4": "class-3 class-4",
"5/6": "class-5 class-6",
"7/8": "class-7 class-8",
"9/10": "class-9 class-10",
"15/17": "class-15 class-17",
"1 or 2": "class-1 class-2",
"1a or 2a": "class-1a class-2a",
"1a or 2": "class-1a class-2",
"3 or 4": "class-3 class-4",
"5 or 6": "class-5 class-6",
"7 or 8": "class-7 class-8",
"9 or 10": "class-9 class-10",
"9a or 10a": "class-9a class-10a",
"15 or 17": "class-15 class-17",
"9/10 or 1/2": "class-9 class-10 class-1 class-2",
# two/Tr/Kikuyu
"2 or 4 or 6 or 13": "class-2 class-4 class-6 class-13",
"8 or 10": "class-8 class-10", # two/Tr/Kikuyu
"11 or 10": "class-11 class-10", # sea/Eng/Tr/Zulu
"11 or 10a": "class-11 class-10a", # half/Ngazidja Comorian
"10 or 11": "class-10 class-11", # mushroom/Tr/Swahili
"11 or 14": "class-11 class-14", # country/Tr/Swahili
"11 or 12": "class-11 class-12", # theater/Tr/Swahili
"11 or 6": "class-11 class-6", # leaf/'Maore Comorian
"9 or 6": "class-9 class-6", # birthday,carrot/Tr/Rwanda-Rundi
"1 or 6": "class-2 class-6", # Zulu/Tr/Zulu
"6 or 7": "class-6 class-7", # spider/Eng/Tr/Lingala ???
"15 or 6": "class-15 class-6", # leg/Tr/Rwanda-Rundi
"14 or 6": "class-14 class-6", # rainbow/Tr/Chichewa
"9 or 9": "?class-9", # XXX bedsheet/Tr/Sotho
"m1": "masculine first-declension",
"f2": "feminine second-declension",
"m2": "masculine second-declension",
"f3": "feminine third-declension",
"m3": "masculine third-declension",
"f4": "feminine fourth-declension",
"m4": "masculine fourth-declension",
"f5": "feminine fifth-declension",
"m5": "masculine fifth-declension",
"[uncountable]": "uncountable",
"is more colloquial": "colloquial",
"(plural f)": "singular plural feminine", # XXX chromicas/Galician
"(plural m)": "singular plural masculine", # XXX Genseric/Galician
"2 or 3": "?class-2 class-3", # XXX branch/Tr/Swahili
"m or impf": "masculine imperfective", # pour/Tr/Ukrainian
"f or impf": "feminine imperfective", # fuc* around/Tr/(s with many)/Czech
"n or impf": "neuter imperfective", # glom/Russian
"f or pf": "feminine perfective",
"m or pf": "masculine perfective",
"n or pf": "neuter perfective",
"m or m": "?masculine", # Paul/Tr(male given name)/Urdu
"f or c pl": "?feminine common singular plural", # mulberry/Tr/Zazaki
"c pl or n": "?common neuter singular plural", # mouthpiece/Tr/Swedish
"impf or impf": "?imperfective",
"pf or pf": "?perfective",
"sg or sg": "?singular",
"pl or pl": "?plural",
"c or impf": "?common imperfective",
"m inan or n": "masculine inanimate neuter",
"m inan or f": "masculine inanimate feminine",
"pl or pf": "?plural perfective",
"m pl or pf": "masculine plural perfective",
"f pl or pf": "feminine plural perfective",
"n pl or pf": "neuter plural perfective",
"f pl or impf": "feminine plural imperfective",
"m pl or impf": "masculine plural imperfective",
"n pl or impf": "neuter plural imperfective",
"m or f or impf": "?masculine feminine imperfective",
"pl or m or f or n": "?plural masculine feminine neuter",
}
# Languages that can have head-final numeric class indicators. They are mostly
# used in Bantu languages. We do not want to interpret them at the ends of
# words like "Number 11"/English. Also, some languages have something like
# "stress pattern 1" at the end of word head, which we also do not want to
# interpret as class-1.
head_final_numeric_langs = set([
"Bende",
"Chichewa",
"Chimwiini",
"Dyirbal", # Australian aboriginal, uses class-4 etc
"Kamba",
"Kikuyu",
"Lingala",
"Luganda",
"Maore Comorian",
"Masaba",
"Mwali Comorian",
"Mwani",
"Ngazidja Comorian",
"Northern Ndebele",
"Nyankole",
"Phuthi",
"Rwanda-Rundi",
"Sotho",
"Shona",
"Southern Ndebele",
"Swahili",
"Swazi",
"Tsonga",
"Tswana",
"Tumbuka",
"Xhosa",
"Zulu",
"ǃXóõ",
])
# Languages for which to consider head_final_extra_map
head_final_bantu_langs = set([
# XXX should other Bantu languages be included here? Which ones use
# suffixes such as "m or wa"?
"Swahili",
])
head_final_bantu_map = {
# These are only handled in parse_head_final_tags
# and will generally be ignored elsewhere. These may contain spaces.
# Swahili class indications.
"m or wa": "class-1 class-2",
"m or mi": "class-3 class-4",
"ma": "class-5 class-6",
"ki or vi": "class-7 class-8",
"n": "class-9 class-10",
"u": "class-11 class-12 class-14",
"ku": "class-15",
"pa": "class-16",
"mu": "class-18",
# XXX these are probably errors in Wiktionary, currently ignored
"n or n": "?", # Andromeda/Eng/Tr/Swahili etc
"m or ma": "?", # environment/Eng/Tr/Swahili etc
"u or u": "?", # wife/Eng/Tr/Swahili
}
head_final_semitic_langs = set([
"Akkadian",
"Amharic",
"Arabic",
"Aramaic",
"Eblaite",
"Hebrew",
"Hijazi Arabic",
"Maltese",
"Moroccan Arabic",
"Phoenician",
"South Levantine Arabic",
"Tigre",
"Tigrinya",
"Ugaritic",
])
head_final_semitic_map = {
"I": "form-i",
"II": "form-ii",
"III": "form-iii",
"IV": "form-iv",
"V": "form-v",
"VI": "form-vi",
"VII": "form-vii",
"VIII": "form-viii",
"IX": "form-ix",
"X": "form-x",
"XI": "form-xi",
"XII": "form-xii",
"XIII": "form-xiii",
"Iq": "form-iq",
"IIq": "form-iiq",
"IIIq": "form-iiiq",
"IVq": "form-ivq",
}
head_final_other_langs = set([
"Finnish",
"French",
"Lithuanian",
"Arabic",
"Armenian",
"Zazaki",
"Hebrew",
"Hijazi Arabic",
"Moroccan Arabic",
"Nama",
"Old Church Slavonic",
"Gothic",
"Old Irish",
"Latin",
"Scottish Gaelic",
"Slovene",
"Sorbian",
"South Levantine Arabic",
"Kajkavian",
"Chakavian",
"Croatian", # Kajkavian and Chakavian are forms of Croatian
"Sanskrit",
"Ancient Greek",
# XXX For dual??? see e.g. route/Tr(course or way)/Polish
"Dyirbal",
"Egyptian",
"Maltese",
"Maori",
"Polish",
"Portuguese",
"Romanian", # cache,acquaintance/Tr/Romanian
"Ukrainian",
"Ugaritic",
])
head_final_other_map = {
# This is used in Finnish at the end of some word forms (in translations?)
"in indicative or conditional mood": "in-indicative in-conditional",
# marine/French Derived terms
"f colloquial form of a feminine marin": "feminine colloquial",
# These stress pattern indicators occur in Lithuanian
"stress pattern 1": "stress-pattern-1",
"stress pattern 2": "stress-pattern-2",
"stress pattern 3": "stress-pattern-3",
"stress pattern 3a": "stress-pattern-3a",
"stress pattern 3b": "stress-pattern-3b",
"stress pattern 4": "stress-pattern-4",
"stress pattern: 1": "stress-pattern-1",
"stress pattern: 2": "stress-pattern-2",
"stress pattern: 3": "stress-pattern-3",
"stress pattern: 3a": "stress-pattern-3a",
"stress pattern: 3b": "stress-pattern-3b",
"stress pattern: 4": "stress-pattern-4",
# These are specific to Arabic, Armenian, Zazaki, Hebrew, Nama,
# Old Church Slavonic, Gothic, Old Irish, Latin, Scotish Gaelic,
# Slovene, Sorbian, Kajkavian, Chakavian, (Croatian), Sanskrit,
# Ancient Greek
# (generally languages with a dual number)
"du": "dual",
"du or pl": "dual plural", # aka duoplural
"m du": "masculine dual",
"f du": "feminine dual",
"n du": "neuter dual",
"m du or f du": "masculine feminine dual", # yellow/Tr/Zazaki
"f du or m du": "feminine masculine dual",
"n du or n pl": "neuter dual plural",
"f du or f pl": "feminine dual plural",
"m du or m pl": "masculine dual plural",
"du or f du or n": "?", # XXX guest/Tr/Zazaki
"du or n or pf": "?", # XXX how would this be expressed
"du or n du": "neuter dual", # bilberry/Tr/Zazaki
"du or f du or n": "", # XXX guest/Tr(patron)/Zazaki
"pl or pf": "?plural perfective", # walk/Tr(to steal)/Russian
"m or pf": "?masculine perfective", # boom/Tr(make book)/Russian
"n or n du": "neuter singular dual",
# XXX clump/Tr/Portuguese
"sg or m du": "singular feminine neuter masculine dual",
"m du or f du or n du": "masculine dual feminine neuter",
"du or m": "?dual masculine",
}
# Accepted uppercase tag values. As tags these are represented with words
# connected by hyphens.
uppercase_tags = set([
"A Estierna",
"AF", # ??? what does this mean
"ALUPEC",
"ASL gloss", # Used with sign language heads
"Aargau",
"Abagatan",
"Absheron",
"Abung/Kotabumi",
"Abung/Sukadana",
"Abzakh",
"Acadian",
"Achaemenid",
"Achterhooks",
"Adana",
"Adlam", # Script
"Adyghe",
"Aeolic",
"Affectation",
"Afi-Amanda",
"Africa",
"African-American Vernacular English",
"Afrikaans",
"Afyonkarahisar",
"Agdam",
"Ağrı",
"Akhmimic",
"Aknada",
"Al-Andalus",
"Ala-Laukaa",
"Alak",
"Alemannic", # Variant of German
"Alemannic German", # Variant of German
"Algherese",
"Alles",
"Alliancelles",
"Alsace",
"Alsatian",
"Alviri", # Variant of Alviri-Vidari
"Amecameca",
"American continent",
"Americanization",
"Amerindish",
"Amharic", # Script (at least for numberals)
"Amianan",
"Amira",
"Amrum",
"Amur",
"Anbarani", # Variant of Talysh
"Ancient",
"Ancient China",
"Ancient Egyptian",
"Ancient Greek",
"Ancient Rome",
"Ancient Roman",
"Andalucia",
"Andalusia",
"Andalusian",
"Anglian",
"Anglicised",
"Anglicism",
"Anglism",
"Anglo-Latin",
"Anglo-Norman",
"Angola",
"Aniwa",
"Anpezan", # Variant of Ladin
"Antalya",
"Antanosy",
"Antilles",
"Appalachia",
"Appalachian",
"Arabic", # Also script
"Arabic-Indic", # Also script
"Aragon",
"Aragón",
"Aramaic",
"Aran",
"Aranese",
"Arango",
"Arawak",
"Arbëresh",
"Ardennes",
"Argentina",
"Arkhangelsk",
"Armenia",
"Armenian", # Also script
"Aromanian",
"Aruba",
"Asalem",
"Asalemi", # Variant of Talysh
"Asante",
"Ashkenazi Hebrew",
"Assamese", # Also script (India)
"Asturias",
"Atlantic Canada",
"Atlapexco",
"Attic", # Ancient greek
"Aukštaitian",
"Australia",
"Australian",
"Austria",
"Austrian",
"Auve",
"Auvernhàs", # Dialect of Occitan
"Avignon",
"Ayer",
"Ayt Ndhir",
"Azerbaijani",
"Azores",
"Baan Nong Duu",
"Babia",
"Bacheve",
"Badiot", # Variant of Ladin
"Badiu",
"Baghdad",
"Bahamas",
"Bahasa Baku",
"Baku",
"Balearic",
"Balkar",
"Balinese", # Also script
"Baltic-Finnic",
"Bamu",
"Banatiski Gurbet",
"Banawá",
"Bangkok",
"Barbados",
"Barda",
"Bardez Catholic",
"Barlavento",
"Basel",
"Bashkir",
"Basque",
"Batang",
"Batangas",
"Bavaria",
"Bavarian",
"Baybayin",
"Beijing",
"Belalau",
"Belarusian",
"Belgium",
"Belize",
"Bengali", # Also script (India)
"Bentheim",
"Bering Straits", # Inupiaq language
"Berlin",
"Berlin-Brandenburg",
"Bern",
"Beru",
"Bezhta",
"Bharati braille",
"Biblical Hebrew",
"Biblical",
"Bikol Legazpi",
"Bikol Naga",
"Bikol Tabaco",
"Bilasuvar",
"Bimenes",
"Biscayan",
"Bla-Brang",
"Bo Sa-ngae",
"Bodega",
"Bogota",
"Bohairic",
"Bohemia",
"Boholano",
"Bokmål", # Variant of Norwegian
"Bolivia",
"Bologna",
"Bolognese",
"Bombay",
"Borneo",
"Boro",
"Bosnia Croatia",
"Bosnia",
"Bosnian",
"Bosnian Croatian",
"Bosnian Serbian",
"Boston",
"Botswana",
"Brabant",
"Brabantian",
"Brahmi", # Script (India, historic)
"Brazil",
"Brazilian",
"Bressan",
"Brest",
"Britain",
"British",
"British airforce",
"British Army",
"British Columbia",
"British Isles",
"British Royal Navy",
"Brunei",
"Bugey",
"Bugurdži",
"Bukovina",
"Bulgaria",
"Bulgarian",
"Busan",
"Bushehr",
"Burdur",
"Burgenland",
"Burmese", # Script
"Bygdeå",
"Byzantine",
"Bzyb",
"Béarn",
"cabo Verde",
"CJK tally marks",
"Cabrales",
"Caipira",
"Caithness",
"California",
"Campello Monti",
"Campidanese", # Variant of Sardinian
"Canada",
"Canadian",
"Canadian English",
"Canadian French",
"Canadian Prairies",
"Canado-American",
"Canary Islands",
"Cangas del Narcea",
"Cantonese", # Chinese dialect/language
"Cape Afrikaans",
"Carakan",
"Carcoforo",
"Caribbean",
"Carioca",
"Carpi",
"Castilian Spanish",
"Castilian",
"Catalan",
"Catalan-speaking bilingual areas mostly",
"Catalonia",
"Catholic",
"Cebu",
"Cebuano",
"Central America",
"Central Apulia",
"Central Asia",
"Central Scots",
"Central Sweden",
"Central and Southern Italy",
"Central",
"Chakavian",
"Chakma", # Script (India/Burma?)
"Cham", # Script (Austronesian - Vietnam/Cambodia)
"Changuena",
"Chanthaburi",
"Chazal", # Jewish historical sages
"Chengdu",
"Chiconamel",
"Chicontepec",
"Child US",
"Chile",
"China",
"Chinese", # Also script
"Chinese Character classification",
"Cholula",
"Chongqing",
"Christian",
"Chugoku",
"Chūgoku",
"Chumulu",
"Church of England",
"Cieszyn Silesia",
"Cincinnati",
"Classical", # Variant of several languages, e.g., Greek, Nahuatl
"Classical Attic",
"Classical Chinese",
"Classical Edessan",
"Classical Indonesian",
"Classical K'Iche",
"Classical Latin",
"Classical Persian",
"Classical Sanskrit",
"Classical Syriac",
"Classical studies",
"Clay",
"Closed ultima",
"Coastal Min",
"Cockney",
"Cois Fharraige",
"Cois Fharraige",
"Colombia",
"Colunga",
"Common accent",
"Commonwealth",
"Congo",
"Congo-Kinshasa",
"Connacht",
"Connemara",
"Contentin",
"Continent",
"Copenhagen",
"Cork",
"Cornish",
"Cornwall",
"Counting rod",
"Costa Rica",
"Cotentin",
"Crimea",
"Croatia",
"Croatian",
"Cu'up", # Region in Indonesia (Rejang language)
"Cuarto de los Valles",
"Cuba",
"Cuisnahuat",
"Cumbria",
"Cuoq",
"Cusco",
"Cypriot",
"Cyprus",
"Cyrillic", # Script
"Czech",
"Czech Republic",
"Čakavian",
"DR Congo",
"Dalmatia",
"Dananshan Miao",
"Dankyira",
"Dari",
"Dashtestan",
"Dauphinois",
"Daya",
"Daytshmerish",
"De'kwana",
"Debri",
"Deh Sarv",
"Deirate",
"Delhi",
"Delhi Hindi",
"Demotic", # Greek/Ancient Greek
"Denizli",
"Derbyshire",
"Devanagari", # Script
"Devon",
"Déné syllabary", # Script for Canadian Indian languages?
"Digor", # Variant of Ossetian
"Dingzhou",
"Dissenter",
"Dithmarsisch",
"Diyarbakır",
"Dominican Republic",
"Dominican Republic",
"Dongmen",
"Doric", # Ancient Greek
"Drasi", # Region in India
"Draweno-Polabian",
"Drents",
"Dundee",
"Dungan",
"Durham",
"Dutch",
"Dêgê",
"Džáva",
"EU",
"Early Middle English",
"Early Modern Greek",
"Early",
"East Anglia",
"East Armenian",
"East Bengal",
"East Coast",
"East Frisian",
"East Midland",
"East Slovakia",
"East",
"Eastern Armenian",
"Eastern New England",
"Eastern Syriac",
"Eastern",
"Ecclesiastical",
"Ectasian",
"Ecuador",
"Ecuadorian Kichwa",
"Edirne",
"Egypt",
"Egyptian", # Also script (hieroglyph)
"Egyptian Arabic", # Variant of Arabic
"Egyptiot",
"Ekagongo",
"Ekavian",
"El Salvador",
"Elazığ",
"Elberfelder Bibel",
"England",
"English Midlands",
"English",
"Eonavian",
"Epic",
"Epigraphic Gandhari",
"Erzgebirgisch",
"Esham",
"Esperantized",
"Esperanto",
"Estonian",
"Estuary English",
"Ethiopic", # Script
"Europe",
"European",
"European Union",
"European ortography",
"Eurozone",
"Fante",
"Faroese",
"Fars",
"Fascian", # Variant of Ladin
"Fayyumic",
"Fengkai",
"Finglish", # Finnish word taken from English
"Finland",
"Fjolde",
"Flanders",
"Flemish",
"Florida",
"Fluminense",
"Fodom", # Variant of Ladin
"For transcription only",
"Formazza",
"Fountain",
"Fragoria vesca",
"France Quebec",
"France",
"Fredrikstad",
"French",
"Frenchified",
"Fribourg",
"Friulian",
"From Old Northern French",
"Föhr",
"Föhr-Amrum",
"Gadabay",
"Gaellic",
"Galgolitic",
"Galicia",
"Galician",
"Galitzish",
"Galway",
"Gan", # Variant of Chinese
"Gangwon", # Dialect/region for Korean
"Gascon", # DIalect of Occitan
"Gascony",
"Gaspésie",
"Gaúcho",
"Gelders",
"General American",
"General Australian",
"General Brazilian",
"General Cebuano",
"General New Zealand",
"General South African",
"Genoese",
"Genovese",
"Geordie",
"Georgia",
"German",
"German Low German",
"Germanic",
"Germany",
"Gheg",
"Gherdëina", # Variant of Ladin
"Gipuzkoan",
"Glagolitic", # Script
"Glarus",
"Goan Konkani",
"Goerdie",
"Goeree-Overflakkee",
"Gope",
"Gorj",
"Goth",
"Gothenburg",
"Gothic", # Script
"Gotland",
"Goud Saraswat",
"Grecian",
"Greco-Bohairic",
"Greek", # Also script
"Greek Catholic",
"Greek-type", # Used to characterize some Latin words e.g. nematodes/Latin)
"Gressoney",
"Grischun",
"Grisons",
"Groningen",
"Gronings",
"Guadeloupean",
"Gualaca",
"Guatemala",
"Guernsey",
"Gufin",
"Guichicovi",
"Guinea-Bissau",
"Guinée Conakry",
"Gujarati", # Script (Indo-Arabic)
"Gulf Arabic", # Variant of Arabic Language
"Gurbet",
"Gurmukhi", # Script (Indo-Arabic)
"Gurvari",
"Guyana",
"Gwichya",
"Gyeongsang",
"H-system",
"Ha",
"Hachijō",
"Hainanese",
"Haketia",
"Hakka", # Chinese dialect/language
"Halchighol",
"Hallig",
"Halligen",
"Hamburg",
"Hangaza",
"Hanifi Rohingya", # Script (Perso-Arabic)
"Hanoi",
"Hanyuan",
"Harak",
"Harat",
"Harry Potter",
"Hawaii",
"Hawick",
"Hán tự",
"Hebei", # China
"Hebrew", # also Script (for Aramaic)
"Hejazi Arabic", # Variant of Arabic Language
"Hejazi",
"Helgoland", # Variant of North Frisian
"Heligoland",
"Heligolandic",
"Hellenizing School",
"Hevaha",
"Hianacoto",
"Hiberno-English",
"Hijazi", # Variant of Arabic
"Hijazi Arabic", # Variant of Arabic
"Hindi", # Script (at least for numberals, e.g. 80
"Hinduism",
"Hokkien", # Chinese dialect/language
"Honduras",
"Hong Kong",
"Hong'an",
"Hoanya",
"Hometwoli",
"Hongfeng",
"Hosso",
"Hsinchu Hokkien", # Chinese dialect/language
"Hua",
"Hungarian Vend",
"Huế",
"Hyōgai", # Uncommon type of Kanji character
"Hà Nội", # Vietnamese dialect
"Hà Tĩnh", # Vietnamese dialect
"Hán Nôm", # Vietnamese latin spelling with diacritics?
"Hössjö",
"Hồ Chí Minh City",
"I Ching hexagram",
"I-I", # Used in some Dungan nouns; I have no idea what this means
"Ionic", # Ancient Greek
"IPA",
"IUPAC name",
"Iberian",
"Ibero-Romance",
"Iceland",
"İçel",
"Ikavian",
"Ijekavian",
"Ijekavian/Ekavian",
"Ilir",
"In conjunct consonants",
"Inari", # Variant of Sami
"India",
"Indian English",
"Indo-Aryan linguistics",
"Indo-European studies",
"Indonesia",
"Inkhokwari",
"Inland Min",
"Inland Northern American",
"Inner Mongolia",
"Insular Scots",
"Insular",
"Interlingua",
"Internet",
"Inuvialuktun",
"Iran",
"Iranian",
"Iranian Persian",
"Iraq",
"Iraqi Hebrew",
"Ireland",
"Irish",
"Iron", # Variant of Ossetian
"Isfahan",
"Isparta",
"Israel",
"Issime",
"Istanbul",
"Italian Hebrew",
"Italy",
"Iyaric",
"Izalco",
"İzmit",
"Jabung",
"Jainism",
"Jakarta",
"Jalalabad",
"Jalilabad",
"Jalnguy",
"Jamaica",
"Jamaican",
"Jamaican creole",
"Japan",
"Japurá",
"Jarawara",
"Javanese", # Also script (Indonesia)
"Jazan",
"Jáva",
"Jawi",
"Jehovah's Witnesses",
"Jèrriais",
"Jersey",
"Jewish Aramaic",
"Jewish Babylonian Aramaic",
"Jewish Palestinian Aramaic",
"Jewish",
"Jianghuai Mandarin", # Chinese dialect/language
"Jicalapa",
"Jicarilla", # Variant of the Apache Language?
"Jilu Mandarin", # Dialect/Language in Chinese
"Jin",
"Jin Mandarin", # Chinese dialect/language
"Jinjiang Hokkien", # Chinese dialect/language
"Johannesburg",
"Johor-Selangor",
"Johore",
"Judaism",
"Judeo-French",
"Jurchen", # Script?
"Jyutping",
"Kabul",
"Kabuli",
"Kadaru",
"Kagoshima",
"Kaipi",
"Kaiwaligau Ya",
"Kajkavian",
"Kalaw Kawaw Ya",
"Kalaw Lagaw Ya",
"Kalbajar",
"Kalderaš",
"Kalianda",
"Kaliarda",
"Kalix",
"Kaluga",
"Kamino",
"Kampong Ayer",
"Kamrupi",
"Kamviri",
"Kanchanaburi",
"Kandahar",
"Kannada", # Script (at least for numerals, Hindu-Arabic?)
"Kansai",
"Kanto",
"Kaohsiung Hokkien", # Chinese dialect/language
"Karabakh",
"Karachay",
"Karanga",
"Karwari",
"Kasuweri",
"Katharevousa",
"Kautokeino",
"Kayah Li", # Script (Sino-Tibetan)
"Kayseri",
"Kayu Agung",
"Kayu Agung Asli",
"Kayu Agung Pendatang",
"Kaw Kyaik",
"Kazakh",
"Kazerun",
"Kazym",
"Kedayan",
"Kent",
"Kentish",
"Kenya",
"Kernewek Kemmyn",
"Kernowek Standard",
"Kerry",
"Kfar Kama", # Region in Israel
"Khesht",
"Khmer", # Script
"Khojavend",
"Khorasan",
"Khoshar-Khota",
"Khudawadi", # Script (Sindhi language, India)
"Khun villages",
"Kiambu",
"Kidero",
"Kinmen Hokkien",
"Kinshasa",
"Kinyarwanda",
"Kirundi",
"Kobuk", # Inupiaq
"Koine", # Ancient Greek
"Konartakhteh",
"Kong Loi village",
"Kong Loi villages",
"Konya",
"Koryo-mar",
"Kosovo",
"Kosovo Arli",
"Kota Agung",
"Krui",
"Kulkalgau Ya",
"Kurdamir",
"Kuritiba",
"Kursk",
"Kuwait",
"Kuwaiti Gulf Arabic", # Variant of Arabic Language
"Kuzarg",
"Kyoto",
"Kyrgyz",
"Kyūshū",
"Kwantlada",
"Kölsch",
"LÚ",
"La Up village",
"Lamphun Province",
"Lanna", # Script (Thailand)
"Languedoc",
"Lao", # Script (Lao langage in Laos)
"Late Bohairic",
"Late Egyptian",
"Late Latin",
"Late Middle English",
"Late Old French",
"Late Old Frisian",
"Late West Saxon",
"Late",
"Latin America",
"Latin", # Script
"Latinate",
"Latinism",
"Latvian",
"Laval",
"Lavarone",
"Lebanese Arabic", # Variant of Arabic language
"Lebong", # Region in Indonesia/Sumatra? (Rejang language)
"Leet", # Leetspeak, an internet "slang"
"Legazpi",
"Leizhou Min", # Chinese dialect/language
"Lemosin", # Dialect of Occitan
"Lengadocian", # Dialect of Occitan
"Lepcha", # Script (Himalayas?)
"Lesotho",
"Levantine Arabic", # Variant of Arabic language
"Lewis",
"Leyte",
"Lhasa",
"Liechtenstein",
"Limba Sarda Comuna",
"Limbu", # Script (Limbu language in Central Himalayas)
"Limburg",
"Limburgish",
"Limousin",
"Limuru",
"Linnaeus",
"Lippisch",
"Lisan ud-Dawat",
"Listuguj",
"Literary affectation",
"Lithuania",
"Lithuanian",
"Litvish",
"Liverpudlian",
"Llanos",
"Logudorese", # Variant of Sardinian
"Lojban",
"Loli",
"Lombardy",
"London",
"Lorraine",
"Louisiana",
"Lovara",
"Low Prussian",
"Low Sorbian",
"Lower Sorbian",
"Lubunyaca",
"Lukang Hokkien",
"Luleå",
"Lunfardo",
"Luserna",
"Luxembourg",
"Luxembourgish",
"Lycopolitan",
"Lyon",
"Lyons",
"Lviv",
"Lövånger",
"Ḷḷena",
"Łowicz",
"M.O.D.", # Used as head form in Marshallese
"Maastrichtian",
"Macau",
"Macedonia",
"Macedonian",
"Macedonian Arli",
"Macedonian Džambazi",
"Mackem",
"Madeira",
"Maharashtra",
"Mahuizalco",
"Maiak",
"Maine",
"Mainland China",
"Malacatepec",
"Malak",
"Malayalam",
"Malaysia",
"Malaysian English",
"Mallorca",
"Malta",
"Malyangapa",
"Mamluk-Kipchak",
"Mandarin", # Dialect/Language in Chinese
"Mandi",
"Manglish",
"Manichaean",
"Manicoré",
"Manitoba Saulteux",
"Mantua",
"Manyika",
"Marathi",
"Martinican",
"Martinican Creole",
"Marwari",
"Mary-marry-merry distinction",
"Mary-marry-merry merger",
"Marxism",
"Masarm",
"Maharastri Prakrit",
"Mauritania",
"Mawakwa",
"Mayo",
"McCune-Reischauer",
"Mecayapan", # Variant of Nathuatl
"Mecklenburg-Vorpommern",
"Mecklenburgisch",
"Mecklenburgisch-Vorpommersch",
"Medan",
"Mediaeval",
"Medieval",
"Medieval Greek",
"Medieval Latin",
"Medio-Late Egyptian",
"Mehedinți",
"Meitei", # Script (used with Meitei language in India)
"Meixian",
"Melanesian",
"Melinting",
"Menggala/Tulang Bawang",
"Mercian",
"Merseyside",
"Mescaleiro",
"Mexica",
"Mexico",
"Mfom",
"Microsoft Azure",
"Mid Northern Scots",
"Mid Northern",
"Mid",
"Mid-Atlantic",
"Middle Ages",
"Middle Chinese", # Historical variant of Chinese
"Middle Cornish",
"Middle Egyptian",
"Middle",
"Midland American English",
"Midlands",
"Midlandsnormalen",
"Midwestern US",
"Milan",
"Milanese",
"Milpa Alta",
"Min",
"Min Bei",
"Min Dong", # Chinese dialect/language
"Min Nan", # Chinese dialect/language
"Minas Gerais",
"Mineiro",
"Mirandola",
"Mirandolese",
"Mistralian",
"Mizrahi Hebrew",
"Modena",
"Modern",
"Modern Armenian",
"Modern Israeli Hebrew",
"Modern Israeli",
"Modern Latin",
"Modern Polabian",
"Modern Turkish",
"Modi", # Variant/language based on Sanskrit
"Moghamo",
"Moldavia",
"Molet Kasu",
"Molet Mur",
"Monegasque",
"Mongo-Turkic",
"Mongolian", # Also script
"Montenegro",
"Montreal",
"Mooring", # Variant of North Frisian
"Moravia",
"Mormonism",
"Moroccan", # Variant of Arabic
"Moroccan Arabic", # Variant of Arabic
"Morocco",
"Moscow",
"Moselle Franconian",
"Mosetén",
"Mount Currie",
"Mozambique",
"Moçambique",
"Mpakwithi",
"Muğla",
"Multicultural London English",
"Munster",
"Murang'a",
"Mushuau Innu",
"Muslim",
"Münsterland",
"Münsterländisch",
"Myanmar", # Also script
"Mycenaean", # Variant of Greek
"N'Ko", # Script
"Nahua",
"Nahuatl",
"Nakhchivan",
"Namibia",
"Nanchuan",
"Nao Klao", # dialect
"Naples",
"Navajo",
"Navarre",
"Navarrese",
"Navarro-Lapurdian",
"Navy",
"Nazism",
"Ndia",
"Neo-Latin",
"Nepal",
"Netherlands",
"Nevada",
"New Age",
"New England",
"New Jersey",
"New Latin",
"New Sanskrit",
"New York City",
"New York",
"New Zealand",
"Newa", # Script (Newa Spelling) ??? निर्वाचन/Newar/Noun
"Newfoundland",
"Nicaragua",
"Niçard",
"Nidwalden",
"Nigeria",
"Niğde",
"Ningbo",
"Nizhegorod",
"Nomen sacrum", # Used in Gothic form names
"Non-Oxford",
"Nordestino",
"Nordic",
"Norfolk",
"Normandy",
"Norse",
"North Afar",
"North America",
"North American",
"North Brazil",
"North East England",
"North Eastern US",
"North German",
"North Korea",
"North Levantine",
"North Levantine Arabic", # Variant of Arabic
"North Northern Scots",
"North Northern",
"North Northern",
"North Wales",
"North and East of the Netherlands",
"North",
"Northeast Brazil",
"Northeastern Brazil",
"Northeastern",
"Northern California",
"Northern Catalan",
"Northern Crimea",
"Northern England",
"Northern English",
"Northern Germany",
"Northern Ireland",
"Northern Italy",
"Northern Mandarin", # Chinese dialect/language
"Northern Manx",
"Northern Middle English",
"Northern Puebla",
"Northern Scots",
"Northern UK",
"Northern US",
"Northern Yiddish",
"Northern Zazaki",
"Northern",
"Northamptonshire",
"Northumbria",
"Northwestern",
"Novgorod",
"Nde",
"Nembe",
"Nfom",
"Ngan'gimerri",
"Ngan'gikurunggurr",
"Ngie",
"Ngoko",
"Nghệ An", # Vietnamese dialect
"Nkim",
"Nkojo",
"Nkum",
"Nselle",
"Nsimbwa",
"Nta",
"Ntuzu",
"Nuorese",
"Nyeri",
"Nynorak",
"Nynorsk", # Variant of Norwegian
"Nyungkal",
"Nürnbergisch",
"Occitania",
"Odia", # Script (at least for numerals)
"Ol Chiki", # Script (Austroasiatic language in India)
"Old Bohairic",
"Old Chamorro",
"Old Chinese", # Historical variant of Chinese
"Old Coptic",
"Old East Church Slavonic",
"Old Egyptian",
"Old English",
"Old Latin",
"Old Lithuanian",
"Old Norse",
"Old Northern French",
"Old Persian", # Script
"Old Polabian",
"Old Tagalog",
"Oliti",
"Olles",
"Ombos",
"Ontario",
"Ooldea",
"Orcadian",
"Ordubad",
"Oriya", # Script (Hindu-Arabic?)
"Orkney",
"Ormulum",
"Oryol",
"Oslo",
"Osmanya", # Script (Somalia)
"Ottomans",
"Oxford", # Variant of British English
"POJ", # Latin alphabet based orthography for Min Nan (Chinese)
"Pa Pae village",
"Paderbornish",
"Paderbornisch",
"Pahang",
"Pak Kret District",
"Pakistan",
"Palacios de Sil",
"Palatine",
"Palestinian",
"Pali", # Sanskrit
"Panama",
"Pangin",
"Papua New Guinea",
"Paraguay",
"Paris",
"Parisian",
"Parres",
"Parts of south Jeolla",
"Paulistano",
"Payang", # Region in Indonesia (Rejang language)
"Pays de Bray",
"Pays de Caux",
"Paḷḷuezu",
"Peking",
"Pembrokeshire",
"Penang Hokkien",
"Peng'im",
"Penghu Hokkien",
"Pennsylvania",
"Periphrastic conjugations",
"Perm",
"Persian", # Also script
"Persian Gulf",
"Persianized",
"Perso-Arabic",
"Peru",
"Peshawar",
"Phnom Penh",
"Philadelphia",
"Philippine",
"Philippines",
"Piacenza",
"Picardy",
"Pinghua", # Chinese dialect/language
"Pinyin",
"Pirupiru",
"Pite", # Variant of Sami
"Piteå",
"Plautdietsch",
"Polari",
"Polish",
"Portugal",
"Portugal",
"Possesse",
"Poylish",
"Poznań",
"Praenominal", # Type of abbreviation
"Pre-Hebrew",
"Prokem",
"Protestant",
"Proto-Slavic",
"Provençal",
"Provençau", # Dialect of Occitan
"Pskov",
"Pu No", # dialect
"Pubian",
"Puebla",
"Puerto Rico",
"Pulaar",
"Pular",
"Puter",
"Puxian Min", # Chinese language/dialect
"Valdés",
"Vallander",
"Varendra",
"Vegliot",
"Vest Recklinghausen",
"Villacidayo",
"Qazakh",
"Quakerism",
"Quanzhou",
"Quebec",
"Quebec City",
"Quetta",
"Quirós",
"Quốc ngữ",
"Radical", # Used to mark Japanese Kanji that are radical forms
"Raguileo Alphabet",
"Ragusan",
"Rai Kaili",
"Ranau",
"Rastafari",
"Rastafarian",
"Ratak",
"Received Pronunciation",
"Recueil scientifique ou littéraire",
"Reggio Emilia",
"Reina-Valera version",
"Renshou",
"Revived Late Cornish",
"Revived Middle Cornish",
"Revived",
"Rhine Franconian", # Variant of German
"Rhineland",
"Rhodesia",
"Riau",
"Riau-Lingga",
"Rigveda",
"Riksmål",
"Rimella",
"Ring",
"Rio Grande De Sul",
"Rio de Janeiro",
"Rioplatense",
"Ripuarian",
"Ritsu",
"Rogaland",
"Roman", # Script
"Roman Catholic",
"Roman Empire",
"Romanian",
"Romungro",
"Rouen",
"Rubī-Safaia",
"Ruhrgebiet",
"Rumantsch Grischun",
"Rumi",
"Rumy",
"Rundi",
"Rungu",
"Russia",
"Russian",
"Russianism",
"Rwanda",
"Rwanda-Rundi",
"Rālik",
"Rāṛha",
"Rōmaji",
"SK Standard",
"SW England",
"São-Paulo",
"Saarve",
"Sagada",
"Sahidic",
"Saint Ouën",
"Saint Petersburg",
"Sakayamuni",
"Sakhalin",
"Salaca",
"Salas",
"Sallans",
"Salyan",
"Sami",
"San Juan Quiahije",
"Sanskrit",
"Sanskritized",
"Santiago",
"Sanxia Hokkien",
"São Vicente",
"Sappada",
"Sapper-Ricke",
"Sark",
"Sauerland",
"Sauerländisch",
"Saurashtra", # Script (Surashtra language in Tamil Nadu)
"Sauris",
"Savoie",
"Savoyard",
"Sawndip",
"Sayisi", # Variant of Chipewyan language?
"Schleswig-Holstein",
"Schwyz",
"Scientific Latin",
"Scotland",
"Scottish",
"Scouse",
"Seoul",
"Sepečides",
"Sepoe",
"Serbia",
"Serbian",
"Serbo-Croatian",
"Servia",
"Sesivi",
"Sette Comuni",
"Seville",
"Shahmukhi",
"Shandong",
"Shanghai",
"Shanghainese Wu",
"Shapsug",
"Sharada", # Script (India for Sanskrit and Kashmiri; historic)
"Shavian",
"Sheffield",
"Sheng",
"Shephardi Hebrew",
"Sheshatshiu Innu",
"Shetland",
"Shetlandic",
"Shia",
"Shidong",
"Shikoku",
"Shin",
"Shiraz",
"Shropshire",
"Shubi",
"Shuri-Naha",
"Shuryshkar",
"Siba",
"Sibe",
"Sichuanese",
"Sikh",
"Sikhism",
"Silesian",
"Simplified",
"Singapore English",
"Singapore",
"Singlish",
"Sinhalese", # Script (Sri Lanka)
"Sino-Korean",
"Sino-Japanese",
"Sisiame",
"Sistani",
"Skellefteå",
"Skiri",
"Skolt", # Variant of Sami
"Slovak",
"Slovene",
"Slovincian",
"Smolensk",
"Sobrescobiu",
"Sofia Erli",
"Soikkola",
"Solothurn",
"Somiedu",
"Sori",
"Sotavento",
"Souletin",
"South Afar",
"South Africa",
"South African",
"South America",
"South American English",
"South Asia",
"South Azerbaijani",
"South Brazil",
"South German",
"South Korea",
"South Levantine",
"South Levantine Arabic",
"South Northern Scots",
"South Scots",
"South Wales",
"South",
"Southeastern",
"Southern Africa",
"Southern American English",
"Southern Brazil",
"Southern England",
"Southern Italy",
"Southern Manx",
"Southern Middle English",
"Southern Quechua",
"Southern Scotland",
"Southern Scots",
"Southern Spain",
"Southern US",
"Southern Yiddish",
"Southern Zazaki",
"Southern",
"Southwestern",
"Southwestern Mandarin", # Chinese dialect/language
"Space Force",
"Spain",
"Spanish",
"Sremski Gurbet",
"Sri Lanka",
"St. Gallen",
"Standard Cornish",
"Standard East Norwegian",
"Standard German of Switzerland",
"Standard German",
"Standard Hlai",
"Standard Sicilian",
"Standard Tagalog",
"Standard Zhuang",
"Stavanger",
"Stellingwerfs",
"Stokoe", # Used in sign language letter entries to indicate Latin letter
"Suizhou",
"Sukai",
"Sukau",
"Sundanese",
"Sungkai",
"Sunni",
"Surgut",
"Surigaonon",
"Surinam",
"Suriname",
"Surmiran",
"Sursilvan",
"Suðuroy",
"Sutsilvan",
"Suzhou",
"Sweden",
"Swiss German",
"Swiss",
"Switzerland",
"Syllabics", # Used in word head with Plains Cree, e.g. tânisi/Plains Cree
"Sylt", # Variant of North Frisian
"Syriac", # Also script (for Aramaic)
"Syrian Hebrew",
"São Paulo",
"São Vicente",
"TV",
"Taberga",
"Tabriz",
"Tai Tham", # Script (Northern Thai?)
"Tai Xuan Jing",
"Taichung Hokkien",
"Tainan",
"Taipei",
"Taishanese",
"Taiwan",
"Taiwanese Hokkien",
"Taiwanese Mandarin", # Chinese dialect/language
"Taixuanjing tetragram",
"Tajik",
"Takri", # Script (mostly historic, used in Himachal Pradesh)
"Talang Padang",
"Tally-marks",
"Talur",
"Tamil", # Also script
"Tang-e Eram",
"Tankarana",
"Tantoyuca",
"Tao",
"Taraškievica",
"Tashelhit", # Variant of Berber
"Tasmania",
"Tasmanian",
"Tavastia",
"Tebera",
"Teesside",
"Tehran",
"Tehrani",
"Telugu", # Also script (India)
"Telugu-Kui",
"Temapache",
"Tenerife",
"Teochew",
"Teotepeque",
"Tepetzintla",
"Terre-Neuve-et-Labrador",
"Tessin",
"Texas",
"Texcoco",
"Textbibel",
"Tgdaya",
"Thai", # Script
"Thailand",
"Thanh Chương",
"The Hague",
"Thung Luang village",
"Thung Luang",
"Thurgau",
"Thuringian-Upper Saxon",
"Tibetan", # Script
"Tiberian Hebrew",
"Timau",
"Timor-Leste",
"Tirhuta", # Script (historical: Maithili, Sanskrit)
"Tlaxcala",
"Tlyadal",
"Toaripi",
"Tokat",
"Tokyo",
"Tongzi",
"Torlakian",
"Tosk",
"Toulouse",
"Traditional",
"Trakai-Vilnius",
"Translingual",
"Transoxianan",
"Transylvania",
"Trat",
"Tredici Comuni",
"Trentino",
"Trinidad and Tobago",
"Truku",
"Tsimihety",
"Tulamni",
"Turkmen",
"Tuscany",
"Twente",
"Twents",
"Twi", # Dialect of the Akan language
"Tyneside",
"Uganda",
"UK with /ʊ/",
"UK",
"Ulu",
"UPA",
"Upper Silesia",
"Upper Sorbian",
"Urama",
"Urdu",
"US with /u/",
"US",
"US-Inland North",
"US-merged",
"Ukraine",
"Ukrainish",
"Ukraynish",
"Ulaanbaatar",
"Ulster Scots",
"Ulster",
"Umeå",
"Unified",
"Unix",
"Unquachog", # Dialect of Quiripi
"Upper RP Triphthong Smoothing",
"Uri",
"Urkers",
"Ursari",
"Urtijëi",
"Uruguay",
"Utara", # Region in Indonesia (Rejang language)
"Uutände",
"Uyghurjin",
"Vaiśeṣika",
"Valais",
"Valencia",
"Valencian",
"Vallander",
"Vancouver",
"Vancouver Island",
"Vaṅga",
"Vedic",
"Veluws",
"Venezuela",
"Verona",
"Vidari", # Variant of Alviri-Vidari
"Vietnam",
"Vinh",
"Vinza",
"Virginia",
"Vivaro-Alpin",
"Vivaro-Alpine",
"Volapük Nulik",
"Volapük Rigik",
"Vosges",
"Vulgata",
"Västergötland",
"WW2 air pilots' usage",
"Wade-Giles",
"Wadikali",
"Walapai",
"Wales",
"Wallonia",
"Wamwan",
"Warang Citi", # Script (Ho language, East India)
"Wardak",
"Waterford",
"Way Lima",
"Wazirwola",
"Wearside",
"Weirate",
"Welche",
"Welsh English",
"Wenzhou", # Chinese dialect/language
"Wenzhou Wu", # Chinese dialect/language
"West Armenian",
"West Bengal",
"West Cork",
"West Country",
"West Kerry",
"West Midlands",
"West Muskerry",
"West Pomeranian",
"West",
"Western Armenian",
"Western Quebec",
"Western Rumelia",
"Western Syriac",
"Western",
"Westminster system",
"Westmünsterland",
"Westphalia",
"Westphalian",
"Westpfälzisch",
"Westwestphalian",
"Wiedingharde",
"Windesi",
"Witzapan",
"Wood",
"World War I",
"Wrangelsholm",
"Written Form",
"Wu", # Chinese dialect/language
"Wuhan",
"Wuvulu",
"X-system",
"Xiamen",
"Xiang",
"Xilitla",
"YIVO",
"Yagaria",
"Yahualica",
"Yajurveda chanting",
"Yale",
"Yaman",
"Yanbian",
"Yanhe",
"Yao'an",
"Yardliyawara",
"Yardymli",
"Yaut",
"Yawelmani",
"Yañalif",
"Ye'kwana",
"Yemen",
"Yemenite Hebrew",
"Yichang",
"Yiddish-influenced",
"Yilan Hokkien",
"Yindjilandji",
"Yintyingka",
"Ylä-Laukaa",
"Yongshan",
"Yorkshire",
"Yozgat",
"Yukjin",
"Yukon",
"Yulparija",
"Yunnan",
"Zacatianguis",
"Zamboanga",
"Zangilan",
"Zaqatala",
"Zezuru",
"Zhangzhou",
"Zhangzhou Hokkien",
"Zhuyin", # Apparently a phonetic script used with Chinese/Mandarin
"Zimbabwe",
"Zinacantán",
"Zurich",
"Zêkog",
"Överkalix",
"al-Andalus", # historically Muslim ruled area of the Iberian Penisula
"bureaucratese",
"central and northeastern Switzerland",
"continental Normandy",
"feudal Britain",
"parts of South Africa",
"outside Northumbria",
"post-Augustan",
"post-Classical",
"post-Homeric",
"pre-1989 IPA",
"pre-Classical",
"regionally African American Vernacular",
"southern Moselle Franconian",
"northernmost Moselle Franconian",
"west Sweden",
"most of Moselle Franconian",
])
# General mapping for linguistic tags. Value is a string of space-separated
# tags, or list of alternative sets of tags. Alternative forms in the same
# category can all be listed in the same string (e.g., multiple genders).
# XXX should analyze imperfect vs. imperfective - are they just used in
# different languages, or is there an actual difference in meaning?
xlat_tags_map = {
"sg": "singular",
"pl": "plural",
"sg.": "singular",
"pl.": "plural",
"sg. and pl.": "singular plural",
"sg and pl": "singular plural",
"m/f": "masculine feminine",
"no pl": "no-plural",
"pl. only": "plural-only",
"pl ordinaux": "usually plural",
"m.": "masculine",
"male": "masculine",
"f.": "feminine",
"fem.": "feminine",
"female": "feminine",
"indef.": "indefinite",
"gen.": "genitive",
"pres.": "present",
"subj.": "subjunctive",
"impf.": "imperfective",
"pf.": "perfective",
"trans.": "transitive",
"unc": "uncountable",
"abbreviated": "abbreviation",
"diminutives": "diminutive",
"Diminutive": "diminutive",
"Diminutives": "diminutive",
"†-tari": "-tari",
"†-nari": "-nari",
"♂♀": "masculine feminine",
"♂": "masculine",
"♀": "feminine",
"cangjie input": "cangjie-input",
"RP": "Received-Pronunciation",
"BR": "Brazil",
"Brasil": "Brazil",
"Brazilian Portuguese": "Brazil",
"FR": "France",
"IT": "Italy",
"CAN": "Canada",
"AU": "Australia",
"AUS": "Australia",
"Austr.": "Australian",
"AusE": "Australia",
"Aus": "Australia",
"LKA": "Sri-Lanka",
"RU": "Russia",
"SA": "South-Africa",
"[AU]": "Australia",
"NYC": "New-York-City",
"CA": "Canada",
"AT": "Austria",
"GA": "General-American",
"NV": "Navajo",
"UK male": "UK",
"UK female": "UK",
"GB": "UK",
"EN": "UK",
"IN": "India",
"PRC": "China",
"BG": "Bulgaria",
"DE": "Germany",
"IE": "Ireland",
"NL": "Netherlands",
"NZ": "New-Zealand",
"PT": "Portugal",
"BOL": "Bolivia",
"U.S.A.": "US",
"U.S.": "US",
"[US]": "US",
"Americanisation": "Americanization",
"Saint Ouen": "Saint-Ouën",
"UK & Aus": "UK Australia",
"Britian": "Britain",
"coastal Min": "Coastal-Min",
"Telugu-Kui language": "Telugu-Kui",
"SK Standard/Seoul": "SK-Standard Seoul",
"Devanagri": "Devanagari error-misspelling",
"Standard Seoul": "SK-Standard Seoul",
"Association canadienne de normalisation": "Canada",
"esp.": "especially",
"northwestern": "Northwestern",
"northeastern": "Northeastern",
"southwestern": "Southwestern",
"southeastern": "Southeastern",
"northern": "Northern",
"southern": "Southern",
"western": "Western",
"eastern": "Eastern",
"westernmost": "Western",
"west": "West",
"Mecayapán": "Mecayapan",
"Mooring and Föhr-Amrum": "Mooring Föhr-Amrum",
"Föhr-Amrum & Mooring": "Föhr-Amrum Mooring",
"Nazi slur against Churchill": "Nazism slur",
"religious slur": "slur",
"euphemistic Nazi term": "Nazism euphemistic",
"United States": "US",
"Québec": "Quebec",
"Classic Persian": "Classical-Persian",
"Sette Communi": "Sette-Comuni",
"Vivaro-alpine": "Vivaro-Alpine",
"Mooring and Hallig": "Mooring Hallig",
"Zürich": "Zurich",
"Somiedo": "Somiedu",
"Uk": "UK",
"US/UK": "US UK", # XXX leave separate
"USA": "US",
"México": "Mexico",
"Latinamerica": "Latin-America",
"Lat. Amer.": "Latin-America",
"LAm": "Latin-America",
"Monégasque": "Monegasque",
"Audio": "",
"orig. US": "",
"poetical": "poetic",
"Noun": "noun",
"Adjective": "adjective",
"Verb": "verb",
"Poetic": "poetic",
"Poetic.": "poetic",
"Informal.": "informal",
"Colloquial.": "colloquial",
"Antiquated.": "dated",
"Archaic": "archaic",
"Causative": "causative",
"Passive": "passive",
"Stative": "stative",
"Applicative": "applicative",
"Colloquial": "colloquial",
"Epic verse": "poetic",
"Nominative plural - rare": "nominative plural rare",
"Nonstandard but common": "nonstandard common",
"Slang": "slang",
"Slang-Latin America": "slang Latin-America",
"slangy": "slang",
"backslang": "slang",
"butcher's slang": "slang jargon",
"archiac": "archaic error-misspelling",
"nonstandard form": "nonstandard",
"nonstandard form of": "nonstandard alt-of",
"standard form of": "standard alt-of",
"nonstandard stylistic suffix": "nonstandard dialectal suffix",
"honorific form": "honorific",
"possessed form": "possessed",
"obligatorily possessed": "possessed",
"obligatory possessive": "possessed",
"obligatory possession": "possessed",
"indicated possession by preceding noun": "possessed",
"unpossessed form": "unpossessed",
"Dialectal": "dialectal",
"Dialect": "dialectal",
"dialectal form": "dialectal",
"dialectal term": "dialectal",
"dialectal Mandarin": "dialectal Mandarin",
"Dialect: Oslo": "dialectal Oslo",
"regiolectal": "dialectal",
"archaic or regiolectal": "archaic dialectal",
"Canada: Ontario": "Ontario",
"Canada: British Columbia": "British-Columbia",
"GenAm": "General-American",
"Greco-Bohairic Pronunciation": "Greco-Bohairic",
"Greco-Bohairic pronunciation": "Greco-Bohairic",
"Vallader": "Vallander",
"Conservative RP": "Received-Pronunciation",
"Received Prononunciation": "Received-Pronunciation",
"North American also": "North-American",
"Cois Fharraige also": "Cois-Fharraige",
"Sawndip forms": "Sawndip",
"Sawndip form": "Sawndip",
"old orthography": "archaic",
"Maine accent": "Maine",
"Bosnia Serbia": "Bosnian-Serbian",
"MLE": "Multicultural-London-English",
"AAVE": "African-American-Vernacular-English",
"Early ME": "Early-Middle-English",
"Northern ME": "Northern-Middle-English",
"Southern ME": "Southern-Middle-English",
"Late ME": "Late-Middle-English",
"Spanish given name": "Spanish proper-noun",
"St. Petersburg or dated": "Saint-Petersburg dated",
"Irregular reading": "irregular-pronunciation",
"irreg. adv.": "irregular adverbial",
"Argentina and Uruguay": "Argentina Uruguay",
"Argentina Uruguay": "Argentina Uruguay",
"Southern US folk speech": "Southern-US dialectal",
"dialect": "dialectal",
"Main dialectal variations": "dialectal",
"Many eastern and northern dialects": "dialectal",
"many dialects": "dialectal",
"some dialects of": "dialectal",
"now sometimes by conflation with etymology 1 under standard German influence":
"sometimes",
"unstressed form": "unstressed",
"mute of": "unstressed form-of",
"for some speakers": "uncommon",
'when "do" is unstressed and the next word starts with /j/':
"unstressed-before-j",
"before a vowel": "before-vowel",
"before vowel": "before-vowel",
"before vowels": "before-vowel",
"used before vowels and lenited fh-": "before-vowel before-lenited-fh",
"used before vowels": "before-vowel",
"used before the past tense": "before-past",
"used a verb in imperfect subjunctive": "with-imperfect with-subjunctive",
"the Eurozone": "Eurozone",
"Phoneme": "phoneme",
"Vowel": "phoneme",
"Consonant": "phoneme",
"Name of letter": "name",
"nation's name": "name",
"proprietary name": "name",
"Vulgar": "vulgar",
"strong language": "vulgar",
"Very Strong Swear word": "vulgar",
"Spoken": "colloquial",
"spoken": "colloquial",
"written": "literary",
"Syllable initial": "syllable-initial",
"Syllable final": "syllable-final",
"internet": "Internet",
"online": "Internet",
"instant messaging": "Internet",
"text messaging": "Internet",
"cot-caught merged": "cot-caught-merger",
"cot–caught merged": "cot-caught-merger",
"cot-caught merger": "cot-caught-merger",
"cot–caught merger": "cot-caught-merger",
"pin-pen merger": "pin-pen-merger",
"pin–pen merger": "pin-pen-merger",
"prefix before comparative forms": "prefix with-comparative",
"countable and uncountable": "countable uncountable",
"masculine and feminine plural": "masculine feminine plural",
"definite singular and plural": "definite singular plural",
"plural and definite singular attributive":
["plural attributive", "definite singular attributive"],
"oblique and nominative feminine singular":
"oblique nominative feminine singular",
"feminine and neuter plural": "feminine neuter plural",
"feminine and neuter": "feminine neuter",
"feminine and neuter plural": "feminine neuter plural",
"masculine and feminine": "masculine feminine",
"masculine and neuter": "masculine neuter",
"masculine and plural": "masculine plural",
"female and neuter": "feminine neuter",
"the third person": "third-person",
"(at least) nominative/objective/reflexive cases":
"nominative objective",
"singular and plural": "singular plural",
"plural and weak singular": ["plural", "weak singular"],
"dative-directional": "dative directional",
"preterite and supine": "preterite supine",
"genitive and dative": "genitive dative",
"genitive and plural": "genitive plural",
"dative and accusative": "dative accusative",
"accusative/illative": "accusative illative",
"dative and accusative singular": "dative accusative singular",
"simple past and past participle": ["simple past", "past participle"],
"simple past tense and past participle": ["simple past", "past participle"],
"taking a past participle": "with-past-participle",
"literary or in compounds": "literary in-compounds",
"certain compounds": "in-compounds idiomatic",
"participial adjective": "participle adjective error-misspelling",
"literary or archaic": "literary archaic",
"literaly or archaic": "literary archaic error-misspelling",
"literary or dialectal": "literary dialectal",
"dated or dialectal": "dated dialectal",
"dialectal or colloquial": "dialectal colloquial",
"dialectal or obsolete": "dialectal obsolete",
"simple past": "simple past",
"simple present": "simple present",
"with verb in simple tense": "with-simple",
"in simple past tense": "simple past",
"for most verbs": "usually",
"in general": "usually",
"in variation": "in-variation",
"genitive/dative": "genitive dative",
"dative/locative": "dative locative",
"dative/instrumental": "dative instrumental",
"genitive/dative/locative": "genitive dative locative",
"genitive/dative/ablative": "genitive dative ablative",
"dative/ablative/locative": "dative ablative locative",
"ablative/vocative": "ablative vocative",
"ablative/locative": "ablative locative",
"ablative/instrumental": "ablative instrumental",
"dative/ablative": "dative ablative",
"genitive/instrumental/locative": "genitive instrumental locative",
"genitive/dative/locative/vocative": "genitive dative locative vocative",
"genitive/dative/instrumental/prepositional":
"genitive dative instrumental prepositional",
"+ prepositional case": "with-prepositional",
"+prepositional": "with-prepositional",
"+ por": "with-por",
"accusative/instrumental": "accusative instrumental",
"dative/adverbial case": "dative adverbial",
"dative/genitive": "dative genitive",
"dative/genitive/instrumental": "dative genitive instrumental",
"dative/accusative": "dative accusative",
"dative/accusative/locative": "dative accusative locative",
"genitive/accusative/prepositional":
"genitive accusative prepositional",
"genitive/dative/accusative": "genitive dative accusative",
"genitive/animate accusative": ["genitive", "animate accusative"],
"accusative plural and genitive plural": "accusative genitive plural",
"hidden-n declension": "hidden-n",
"declension pattern of": "declension-pattern-of",
"first/second-declension adjective":
"first-declension second-declension adjective",
"first/second-declension participle":
"first-declension second-declension participle",
"class 9/10": "class-9 class-10",
"class 5/6": "class-5 class-6",
"class 3/4": "class-3 class-4",
"class 7/8": "class-7 class-8",
"class 1/2": "class-1 class-2",
"class 11/10": "class-11 class-10",
"class 11/12": "class-11 class-12",
"nc 1/2": "class-1 class-2",
"nc 3/4": "class-3 class-4",
"nc 5/6": "class-5 class-6",
"nc 7/8": "class-7 class-8",
"nc 9/10": "class-9 class-10",
"nc 1": "class-1",
"nc 2": "class-2",
"nc 3": "class-3",
"nc 4": "class-4",
"nc 5": "class-5",
"nc 6": "class-6",
"nc 7": "class-7",
"nc 8": "class-8",
"nc 9": "class-9",
"nc 10": "class-10",
"nc 11": "class-11",
"nc 12": "class-12",
"nc 13": "class-13",
"nc 14": "class-14",
"nc 15": "class-15",
"nc 16": "class-16",
"nc 17": "class-17",
"nc 18": "class-18",
"cl. 2 to cl. 11 and cl. 16 to cl. 18":
"class-2 class-3 class-4 class-5 class-6 class-7 class-8 class-9 class-10 class-11 class-16 class-17 class-18",
"refl": "reflexive",
"coll.": "colloquial",
"colloq.": "colloquial",
"colloq": "colloquial",
"collo.": "colloquial",
"collective when uncountable": "countable uncountable collective",
"coloquial": "colloquial",
"more colloquial": "colloquial",
"used colloquially and jokingly": "colloquial humorous",
"used adverbially": "adverbial",
"adverbially": "adverbial",
"intr.": "intransitive",
"tr.": "transitive",
"trans": "transitive",
"intransitive use": "intransitive",
"intransitive senses": "intransitive",
"intr. impers.": "intransitive impersonal",
"abbrev.": "abbreviation",
"Abbreviation": "abbreviation",
"Hiragana": "hiragana",
"Katakana": "katakana",
"synon. but common": "synonym common",
"common hyperhyms": "common hypernym",
"much more common": "common",
"incorrectly": "proscribed",
"incorrect": "proscribed",
"a hyponymic term": "hyponym",
"a hypernymic term": "hypernym",
"transitively": "transitive",
"intransitively": "intransitive",
"transitiv": "transitive",
"intransitiv": "intransitive",
"nominalized adjective": "noun nominalization",
"adjectivized noun": "adjectival",
"adv.": "adverb",
"infomal": "informal error-misspelling",
"informally": "informal",
"formally": "formal",
"very formal": "formal",
"unmarked form": "unstressed",
"marked form": "stressed",
"inifnitive": "infinitive error-misspelling",
"inf.": "informal",
"unformal": "informal",
"unpolite": "impolite",
"fairly polite": "polite",
"postnominal": "postpositional",
"first/second declension": "first-declension second-declension",
"first/second-declension suffix":
"first-declension second-declension suffix",
"first/second-declension numeral plural only":
"first-declension second-declension numeral plural-only",
"with gendered nouns": "with-gendered-noun",
"possessive (with noun)": "possessive with-noun",
"possessive (without noun)": "possessive without-noun",
"without a main word": "without-noun",
"informal 1st possessive": "informal first-person possessive",
"informal augmentations": "informal augmented",
"formal or literary": ["formal", "literary"],
"formal or plural": ["formal", "plural"],
"formal and written": "formal literary",
"addressing kings and queens": "formal deferential",
"adressing kings and queens": "formal deferential",
"impolite 2nd possessive": "informal second-person possessive",
"casual": "informal",
"strong personal": "strong personal pronoun",
"weak personal": "weak personal pronoun",
"persent participle": "present participle",
"with adjective or adjective-phrase complement": "with-adjective",
"with accusative or dative": "with-accusative with-dative",
"with accusative or genitive": "with-accusative with-genitive",
"with accusative or ablative": "with-accusative with-ablative",
"genitive or accusative": ["genitive accusative"],
"genitive of personal pronoun": "genitive personal pronoun",
"nominative and accusative definite singular":
"nominative accusative definite singular",
"+ genitive": "with-genitive",
"+ genitive possessive suffix or elative":
"with-genitive with-possessive-suffix with-elative",
"+ genitive-accusative": "with-genitive",
"genitive + ~": "with-genitive postpositional",
"+ partitive or (less common) possessive suffix":
"with-partitive with-possessive-suffix",
"+ allative": "with-allative",
"[an (about) + accusative]": "with-an with-accusative",
"less common": "uncommon",
"less frequently": "uncommon",
"no perfect or supine stem": "no-perfect no-supine",
"no present participle": "no-present-participle",
"no past participle": "no-past-participle",
"past participle (obsolete except in adjectival use)":
"obsolete past participle",
"adverbial locative noun in the pa, ku, or mu locative classes":
"adverbial locative",
"comparative -": "no-comparative",
"superlative -": "no-superlative",
"1 declension": "first-declension",
"4 declension": "fourth-declension",
"5th declension": "fifth-declension",
"feminine ? declension": "feminine",
"masculine ? declension": "masculine",
"1st declension": "first-declension",
"2nd declension": "second-declension",
"3rd declension": "third-declension",
"4th declension": "fourth-declension",
"2nd-person": "second-person",
"1st-person": "first-person",
"3rd-person": "third-person",
"1st person": "first-person",
"2nd person": "second-person",
"3rd person": "third-person",
"1st actor trigger": "actor-i",
"2nd actor trigger": "actor-ii",
"3rd actor trigger": "actor-iii",
"4th actor trigger": "actor-iv",
"object trigger": "objective",
"1st object trigger": "objective actor-i",
"2nd object trigger": "objective actor-ii",
"3rd object trigger": "objective actor-iii",
"4th object trigger": "objective actor-iv",
"potential mood": "potential",
"causative mood": "causative",
"comitative trigger": "comitative",
"1st comitative trigger": "comitative actor-i",
"2nd comitative trigger": "comitative actor-ii",
"3rd comitative trigger": "comitative actor-iii",
"4th comitative trigger": "comitative actor-iv",
"locative trigger": "locative",
"thematic trigger": "thematic",
"benefactive trigger": "benefactive",
"instrument trigger": "instrumental",
"1st instrument trigger": "instrumental actor-i",
"2nd instrument trigger": "instrumental actor-ii",
"3rd instrument trigger": "instrumental actor-iii",
"4th instrument trigger": "instrumental actor-iv",
"1st": "first-person",
"2nd": "second-person",
"3rd": "third-person",
"plural inv": "plural invariable",
"plural not attested": "no-plural",
"no plural forms": "no-plural",
"not translated": "not-translated",
"not mutable": "not-mutable",
"used only predicatively": "not-attributive predicative",
"only in predicative position": "not-attributive predicative",
"only predicative": "not-attributive predicative",
"predicate-only":
"not-attributive predicative error-misspelling", # eleng/Luxembourgish
"predicative only": "not-attributive predicative",
"predicatively": "predicative",
"in attributive use": "attributive",
"(attributive)": "attributive",
"(predicative)": "predicative",
"(uncountable)": "uncountable",
"only in attributive use": "attributive not-predicative",
"present tense": "present",
"past tense": "past",
"feminine counterpart": "feminine",
"masculine counterpart": "masculine",
"passive counterpart": "passive",
"active counterpart": "active",
"basic stem form": "stem",
"no supine stem": "no-supine",
"no perfect stem": "no-perfect",
"construct state": "construct",
"construct form": "construct",
"phonemic reduplicative": "reduplication",
"reduplicated": "reduplication",
"neutrally formal": "somewhat formal",
"objective case": "objective",
"first person": "first-person",
"second person": "second-person",
"third person": "third-person",
"nominative case": "nominative",
"genitive case": "genitive",
"genitive 1": "genitive",
"genitive 2": "genitive",
"genitive 3": "genitive",
"dative case": "dative",
"dative 1": "dative",
"dative 2": "dative",
"dative 3": "dative",
"accusative 1": "accusative",
"accusative 2": "accusative",
"accusative 3": "accusative",
"accusative case": "accusative",
"ergative cases": "ergative",
"absolutive case": "absolutive",
"ablative case": "ablative",
"genitive unattested": "no-genitive",
"genitive -": "no-genitive",
"nominative plural -": "no-nominative-plural",
"colloquially also feminine": "colloquial feminine",
"colloquial or pejorative": "colloquial pejorative",
"colloquial or dialectal": "colloquial dialectal",
"pejorative or racial slur": "pejorative slur",
"pejoratively": "pejorative",
"racial slur": "slur",
"in some dialects": "dialectal",
"in other dialects": "dialectal",
"dialects": "dialectal",
"pejorativ": "pejorative error-misspelling",
"idionomic": "idiomatic error-misspelling",
"idiom": "idiomatic",
"humorously self-deprecating": "humorous",
"rare/awkward": "rare",
"extremely rare": "rare",
"now quite rare": "rare",
"rarefied": "rare",
"rarely": "rare",
"rarer form": "rare",
"relatively rare": "rare",
"personified": "person",
"person or animal": "person animal-not-person",
"found only in the imperfective tenses": "no-perfect",
"imperfekt": "imperfect error-misspelling",
"imperf. aspect": "imperfect",
"perfective 1": "perfect",
"perfective 2": "perfect",
"in counterfactual conditionals": "conditional counterfactual",
"improbable of counterfactual": "usually counterfactual",
"third plural indicative": "third-person plural indicative",
"defective verb": "defective",
"+ active 3rd infinitive in elative": "with-infinitive-iii-elative",
"+ active 3rd infinitive in illative": "with-infinitive-iii-illative",
"+ third infinitive in illative": "with-infinitive-iii-illative",
"+ verb in 3rd infinitive abessive": "with-infinitive-iii-abessive",
"+ verb in third infinitive illative or adverb":
"with-infinitive-iii with-illative with-adverb",
"+ partitive + 3rd person singular": "with-partitive",
"3rd possessive": "third-person possessive",
"active voice": "active",
"+ infinitive": "with-infinitive",
"+ first infinitive": "with-infinitive-i",
"transitive + first infinitive": "transitive with-infinitive-i",
"transitive + kV": "transitive with-kV", # gǀkxʻâã/ǃXóõ
"+ a + infinitive": "with-a with-infinitive",
"+ indicative mood": "with-indicative",
"+ conditional mood": "with-conditional",
"+nominative": "with-nominative",
"+ nominative": "with-nominative",
"plus genitive": "with-genitive",
"+ genitive": "with-genitive",
"+ genetive": "with-genitive error-misspelling",
"+genitive": "with-genitive",
"+ genitive case": "with-genitive",
"genitive +": "with-genitive",
"nominative +": "with-nominative",
"genitive or possessive suffix +": "with-genitive with-possessive-suffix",
"with genitive case": "with-genitive",
"with genitive": "with-genitive",
"+dative": "with-dative",
"+ dative case": "with-dative",
"dative case +": "with-dative",
"+ dative": "with-dative",
"+ historic dative": "with-dative historic",
"only with adjectives": "with-adjective",
"plus dative": "with-dative",
"plus dative case": "with-dative",
"with dative": "with-dative",
"with the dative": "with-dative",
"with dative case": "with-dative",
"+ accusative": "with-accusative",
"+ accusative case": "with-accusative",
"+accusative": "with-accusative",
"with accusative case": "with-accusative",
"with the accusative": "with-accusative",
"with accusative": "with-accusative",
"plus accusative": "with-accusative",
"takes accusative": "with-accusative",
"takes accusative object": "with-accusative",
"governs the accusative": "with-accusative",
"governs the genitive": "with-genitive",
"governs the dative": "with-dative",
"takes dative": "with-dative",
"takes dative case": "with-dative",
"+ partitive": "with-partitive",
"+ partitive + vastaan": "with-partitive",
"+partitive": "with-partitive",
"with partitive case": "with-partitive",
"plus partitive": "with-partitive",
"with partitive": "with-partitive",
"+ablative": "with-ablative",
"+ ablative": "with-ablative",
"with ablative case": "with-ablative",
"plus ablative": "with-ablative",
"with ablative": "with-ablative",
"+ subjunctive": "with-subjunctive",
"+subjunctive": "with-subjunctive",
"plus subjunctive": "with-subjunctive",
"with subjunctive": "with-subjunctive",
"with subjunctives": "with-subjunctive",
"+ subordinate clause": "with-subordinate-clause",
"+ instrumental": "with-instrumental",
"+instrumental": "with-instrumental",
"+ instrumental case": "with-instrumental",
"with instrumental case": "with-instrumental",
"with instrumental": "with-instrumental",
"plus instrumental": "with-instrumental",
"with instrumental or genitive case": "with-instrumental with-genitive",
"with instrumental or dative case": "with-instrumental with-dative",
"+ locative": "with-locative",
"+ locative case": "with-locative",
"with locative": "with-locative",
"+ illative": "with-illative",
"intransitive + illative": "intransitive with-illative",
"intransitive + elative": "intransitive with-elative",
"intransitive + inessive or adessive":
"intransitive with-inessive with-adessive",
"intransitive + inessive": "intransitive with-inessive",
"intransitive + adessive": "intransitive with-adessive",
"intransitive + translative": "intransitive with-translative",
"intransitive + partitive or transitive + accusative":
"intransitive with-partitive transitive with-accusative",
"transitive + partitive": "transitive with-partitive",
"transitive + partitive + essive":
"transitive with-partitive with-essive",
"transitive + elative + kiinni":
"transitive with-elative",
"transitive (+ yllään) + partitive":
"transitive with-partitive",
"transitive + accusative": "transitive with-accusative",
"transitive + elative": "transitive with-elative",
"transitive or reflexive": "transitive reflexive",
"illative + 3rd-person singular":
"with-illative with-third-person-singular",
"partitive + 3rd-person singular":
"with-partitive with-third-person-singular",
"+ translative": "with-translative",
"+ negative adjective in translative": "with-translative with-negative-adj",
"with negation": "with-negation",
"with negated verb": "with-negation",
"when negated": "with-negation",
"usu. in negative": "usually with-negation",
"predicate of copula": "copulative",
"copular verb": "copulative",
"copula": "copulative", # náina/Phalura
"+ adessive": "with-adessive",
"+ adessive or illative": "with-adessive with-illative",
"+absolutive": "with-absolutive",
"+ absolutive": "with-absolutive",
"with absolutive case": "with-absolutive",
"with absolutive": "with-absolutive",
"+ absolutive case": "with-absolutive",
"plus absolutive": "with-absolutive",
"take nouns in absolute case": "with-absolute",
"takes nouns in absolute case": "with-absolute",
"takes absolute case": "with-absolute",
"+elative": "with-elative",
"+ elative": "with-elative",
"elative +": "with-elative",
"elative case": "elative",
"+ [elative]": "with-elative",
"with elative case": "with-elative",
"with elative": "with-elative",
"plus elative": "with-elative",
"+ essive": "with-essive",
"+ comparative": "with-comparative",
"+objective": "with-objective",
"+ objective": "with-objective",
"with objective case": "with-objective",
"with objective": "with-objective",
"plus objective": "with-objective",
"sublative case": "sublative",
"terminative case": "terminative",
"+ present form": "with-present",
"+ noun phrase] + subjunctive (verb)":
"with-noun-phrase with-subjunctive",
"with noun phrase": "with-noun-phrase",
"+ [nounphrase] + subjunctive":
"with-noun-phrase with-subjunctive",
"+ number": "with-number",
"with number": "with-number",
"optative mood +": "with-optative",
"p-past": "passive past",
"ppp": "passive perfect participle",
"not used in plural form": "no-plural",
"indecl": "indeclinable",
"all forms unconjugated": "indeclinable",
"not declined": "indeclinable",
"not declinable": "indeclinable",
"undeclinable": "indeclinable",
"inconjugable": "indeclinable error-misspelling",
"indeclinable?": "indeclinable",
"no inflections": "indeclinable",
"not often used": "rare",
"interrogative adverb": "interrogative adverb",
"perfect tense": "perfect",
"intensive": "emphatic",
"intensifier": "emphatic",
"changed conjunct form": "conjunct",
"biblical hebrew pausal form": "pausal Biblical",
"bible": "Biblical",
"Bibilical": "Biblical",
"emphatic form": "emphatic",
"emphatic form of": "emphatic form-of",
"emphatically": "emphatic",
"emphatical": "emphatic",
"standard form": "standard",
"augmented form": "augmented",
"active form": "active",
"passive form": "passive",
"mutated form": "mutated",
"auxiliary verb": "auxiliary",
"modal auxiliary verb": "auxiliary modal",
"transitive verb": "transitive",
"tr and intr": "transitive intransitive",
"intransitive verb": "intransitive",
"transitive or intransitive": "transitive intransitive",
"male equivalent": "masculine",
"in compounds": "in-compounds",
"in combination": "in-compounds",
"attribute": "attributive",
"in the past subjunctive": "with-past with-subjunctive",
"in conditional": "with-conditional",
"use the subjunctive tense of the verb that follows": "with-subjunctive",
"kyūjitai form": "kyūjitai",
"kyūjitai kanji": "kyūjitai",
"shinjitai form": "shinjitai",
"shinjitai kanji": "shinjitai",
"grade 1 “Kyōiku” kanji": "grade-1-kanji",
"grade 2 “Kyōiku” kanji": "grade-2-kanji",
"grade 3 “Kyōiku” kanji": "grade-3-kanji",
"grade 4 “Kyōiku” kanji": "grade-4-kanji",
"grade 5 “Kyōiku” kanji": "grade-5-kanji",
"grade 6 “Kyōiku” kanji": "grade-6-kanji",
"uncommon “Hyōgai” kanji": "uncommon Hyōgai",
"dialectical": "dialectal",
"dialectal or archaic": "dialectal archaic",
"dialectal or poetic": "dialectal poetic",
"dialect": "dialectal",
"obsolescent": "possibly obsolete",
"antiquated": "dated",
"19th century": "archaic",
"dated or regional": "dated regional",
"dated or archaic": "archaic",
"common and polite term": "polite",
"most common but potentially demeaning term": "possibly derogatory",
"highly academic": "literary",
"highly irregular": "irregular",
"academic": "literary",
"learned": "literary",
"archaic ortography": "archaic",
"archaic elsewhere": "dialectal",
"in the plural": "plural-only",
"derog.": "derogatory",
"derogative": "derogatory",
"derogatively": "derogatory",
"disparaging": "derogatory",
"deprecative": "derogatory",
"collective sense": "collective",
"relatively rare": "rare",
"very rare": "rare",
"very informal": "informal",
"less formal": "somewhat formal",
"very archaic": "archaic",
"outdated": "archaic",
"historiographic": "historical",
"with a + inf.": "with-a with-infinitive",
"with di + inf.": "with-di with-infinitive",
"with che + subj.": "with-che with-subjunctive",
"with inf.": "with-infinitive",
"with infinitive": "with-infinitive",
"with following infinitive": "with-infinitive",
"followed by an infinitive": "with-infinitive",
"zu-infinitive": "infinitive infinitive-zu",
"zu infinitive": "infinitive infinitive-zu",
"da-infinitive": "infinitive infinitive-da",
"Use the future tense": "with-future",
# XXX re-enable "~ се": "with-ce",
"strong/mixed": "strong mixed",
"strong/weak/mixed": "strong weak mixed",
"weak/mixed": "weak mixed",
"weak verb": "weak-verb",
"auxiliary sein": "aux-sein",
"auxiliary haben": "aux-haben",
"no auxiliary": "no-auxiliary",
"nominative/accusative": "nominative accusative",
"masculine/feminine": "masculine feminine",
"masculine/neuter": "masculine neuter",
"present/future": "present future",
"future/present": "present future",
"present/aoriest": "present aorist error-misspelling",
"superlative degree": "superlative",
"sup.": "superlative",
"comparative degree": "comparative",
"comp.": "comparative",
"positive degree": "positive",
"pos.": "positive",
"positive outcome": "positive",
"negative outcome": "negative",
"equative degree": "equative",
"indicative and subjunctive": "indicative subjunctive",
"indicative/subjunctive": "indicative subjunctive",
"second/third-person": "second-person third-person",
"singular/plural": "singular plural",
"in the singular": "singular",
"in the plural": "plural",
"in singular": "singular",
"in plural": "plural",
"dual/plural": "dual plural",
"collective or in the plural": "collective in-plural",
"in the plural": "in-plural",
"(with savrtsobi)": "with-savrtsobi",
"plural and definite singular": ["plural", "definite singular"],
"feminine singular & neuter plural": ["feminine singular", "neuter plural"],
"partitive/illative": "partitive illative",
"oblique/nominative": "oblique nominative",
"nominative/vocative/dative/strong genitive":
["nominative vocative dative", "strong genitive"],
"non-attributive": "not-attributive predicative",
"not predicative": "not-predicative attributive",
"attributive use": "attributive",
"nominative/vocative/instrumental":
"nominative vocative instrumental",
"nominative/vocative/strong genitive/dative":
["nominative vocative dative", "strong genitive"],
"nominative/vocative/dative": "nominative vocative dative",
"accusative/genitive/partitive/illative":
"accusative genitive partitive illative",
"nominative/vocative/accusative/genitive":
"nominative vocative accusative genitive",
"accusative/genitive/locative": "accusative locative genitive",
"accusative/genitive/dative/instrumental":
"accusative genitive dative instrumental",
"accusative/genitive/dative": "accusative genitive dative",
"accusative/genitive": "accusative genitive",
"masculine/feminine/neuter": "masculine feminine neuter",
"feminine/neuter/masculine": "masculine feminine neuter",
"feminine/neuter": "feminine neuter",
"present participle and present tense": ["present participle", "present"],
"present participle and gerund": ["present participle", "gerund"],
"past indicative and past participle": "past indicative participle",
"all-gender": "",
"gender unknown": "",
"all-case": "",
"accusative/dative": "accusative dative",
"accusative-singular": "accusative singular",
"accusative-genitive": "accusative genitive",
"dative/locative/instrumental": "dative locative instrumental",
"dative/vocative/locative": "dative vocative locative",
"dative/prepositional": "dative prepositional",
"dative and ablative": "dative ablative",
"nominative/vocative/dative and strong genitive":
["nominative vocative dative", "strong genitive"],
"nominative/vocative/accusative":
"nominative vocative accusative",
"nominative/vocative": "nominative vocative",
"nominative/oblique": "nominative oblique",
"nominative/locative": "nominative locative",
"nominative/instrumental": "nominative instrumental",
"nominative/genitive/dative/accusative":
"nominative genitive dative accusative",
"nominative/genitive/dative": "nominative genitive dative",
"nominative/genitive/accusative/vocative":
"nominative genitive accusative vocative",
"nominative/genitive/accusative":
"nominative genitive accusative",
"nominative/dative": "nominative dative",
"nominative/accusative/vocative/instrumental":
"nominative accusative vocative instrumental",
"nominative/accusative/vocative": "nominative accusative vocative",
"nominative/accusative/nominative/accusative":
"nominative accusative",
"nominative/accusative/nominative": "nominative accusative",
"nominative/accusative/locative": "nominative accusative locative",
"nominative/accusative/genitive/dative":
"nominative accusative genitive dative",
"nominative/accusative/genitive": "nominative accusative genitive",
"nominative/accusative/genitive": "nominative accusative genitive",
"nominative/accusative/dative": "nominative accusative dative",
"nominative/accusative": "nominative accusative",
"perfective/imperfective": "perfective imperfective",
"neg. perfective": "perfective negative",
"neg. continuous": "continuative negative",
"negative form": "negative",
"negating particle": "negative particle",
"negation": "negative",
"continuous": "continuative",
"continuously": "continuative",
"animate/inanimate": "animate inanimate",
"animate or inanimate": "animate inanimate",
"locative/vocative": "locative vocative",
"prospective/agentive": "prospective agentive",
"genitive/accusative": "genitive accusative",
"singular/duoplural": "singular dual plural",
"duoplural": "dual plural",
"1st/3rd": "first-person third-person",
"first/second/third-person":
"first-person second-person third-person",
"first/third/third-person": "first-person third-person",
"first-/third-person": "first-person third-person",
"first/second/second-person": "first-person second-person",
"first/third-person": "first-person third-person",
"first-person/second-person": "first-person second-person",
"first-person/third-person": "first-person third-person",
"first-person singular/third-person singular":
"first-person third-person singular",
"first-person singular/third-person plural":
["first-person singular", "third-person plural"],
"affirmative/negative": "affirmative negative",
"first-, second-, third-person singular subjunctive present":
"first-person second-person third-person singular subjunctive present",
"first-, second- and third-person singular present indicative":
"first-person second-person third-person singular present indicative",
"first- and third-person": "first-person third-person",
"female equivalent": "feminine",
"male equivalent": "masculine",
"direct/oblique/vocative": "direct oblique vocative",
"definite/plural": "definite plural",
"singular definite and plural": ["singular definite", "plural"],
"agent noun": "agent",
"agent noun of": "agent form-of",
"Principle verb suffix": "agent suffix nominal-from-verb nominalization",
"third active infinitive": "infinitive-iii active",
"third passive infinitive": "infinitive-iii passive",
"British spelling": "UK",
"Roman spelling": "Roman",
"Perso-Arabic spelling": "Perso-Arabic",
"Arabic/Persian": "Arabic Persian",
"Urdu spelling": "Urdu",
"Urdu spelling of": "Urdu alt-of",
"eye dialect": "pronunciation-spelling",
"feminist or eye dialect": "pronunciation-spelling",
"enclitic and proclitic": "enclitic proclitic",
"Enclitic contractions": "enclitic contraction",
"Proclitic contractions": "proclitic contraction",
"enclitic form": "enclitic",
"Devanagari script form of": "alt-of Devanagari",
"Hebrew script": "Hebrew",
"Mongolian script": "Mongolian",
"Bengali script": "Bengali",
"script": "character",
"letters": "letter",
"digits": "digit",
"characters": "character",
"symbols": "symbol",
"tetragrams": "symbol",
"letter names": "letter-name",
"Cyrillic-script": "Cyrillic",
"Latin-script": "Latin",
"obsolete form of": "alt-of obsolete",
"former word": "obsolete",
"obs.": "obsolete",
"etymological spelling": "nonstandard",
"(Dialectological)": "dialectal",
"(hence past tense)": "past",
"(ablative case)": "ablative",
"(genitive case)": "genitive",
"(suffix conjugation)": "suffix",
"(suffix conjugation)": "prefix",
"(nós)": "with-nos",
"(eu)": "with-eu",
"(vós)": "with-vós",
"(vos)": "with-vos",
"(voseo)": "with-voseo",
"(tu)": "with-tu",
"(tú)": "with-tú",
"(eles)": "with-eles",
"(elas)": "with-elas",
"(vocês)": "with-vocês",
"(usted)": "with-usted",
"(ustedes)": "with-ustedes",
"(yo)": "with-yo",
"(ele, ela, also used with tu and você?)":
"with-ele with-ela with-tu with-você",
"(eles and elas, also used with vocês and others)":
"with-eles with-elas with-vocês with-others",
"(você)": "with-você",
"(hiri)": "with-hiri",
"(hura)": "with-hura",
"(zuek)": "with-zuek",
"(vós, sometimes used with vocês)": "with-vós with-vocês",
"(gij)": "with-gij",
"(tu, sometimes used with você)": "with-tu with-você",
"(\u00e9l, ella, also used with usted)":
"with-él with-ella with-usted",
"(ellos, ellas, also used with ustedes)":
"with-ellos with-ellas with-ustedes",
"(nosotros, nosotras)": "with-nosotros with-nosotras",
"(vosotros, vosotras)": "with-vosotros with-vosotras",
"(vosotros or vosotras)": "with-vosotros with-vosotras",
"(ele and ela, also used with você and others)":
"with-ele with-ela with-você with-others",
"(ele, ela, also used with tu and você)":
"with-ele with-ela with-tu with-você",
"former reform[s] only": "",
"no conj.": "", # XXX conjunctive/conjugation/indeclinable? dot/Latvian
"no construct forms": "no-construct-forms",
"no nominative plural": "no-nominative-plural",
"no supine": "no-supine",
"no perfect": "no-perfect",
"no perfective": "no-perfect",
"no genitive": "no-genitive",
"no superlative": "no-superlative",
"no sup.": "no-superlative",
"no comparative": "no-comparative",
"no comp.": "no-comparative",
"no singulative": "no-singulative",
"no plural": "no-plural",
"no singular": "plural-only",
"not comparable": "not-comparable",
"incomparable": "not-comparable",
"not generally comparable": "usually not-comparable",
"plurale tantum": "plural-only",
"plurare tantum": "plural-only",
"pluralia tantum": "plural-only",
"singulare tantum": "singular-only",
"normally plural": "plural-normally",
"used mostly in plural form": "plural-normally",
"used mostly in the plural form": "plural-normally",
"most often in the plural": "plural-normally",
"used especially in the plural form": "plural-normally",
"suffixed pronoun": "suffix pronoun",
"possessive suffix": "possessive suffix",
"possessive determiner": "possessive determiner",
"pronominal state": "pronominal-state",
"nominal state": "nominal-state",
"form i": "form-i",
"form ii": "form-ii",
"form iii": "form-iii",
"form iv": "form-iv",
"form v": "form-v",
"form vi": "form-vi",
"form vii": "form-vii",
"form viii": "form-viii",
"form ix": "form-ix",
"form x": "form-x",
"form xi": "form-xi",
"form xii": "form-xii",
"form xiii": "form-xiii",
"form iq": "form-iq",
"form iiq": "form-iiq",
"form iiiq": "form-iiiq",
"form ivq": "form-ivq",
"form I": "form-i",
"form-I": "form-i",
"form II": "form-ii",
"form-II": "form-ii",
"form III": "form-iii",
"form-III": "form-iii",
"form IV": "form-iv",
"form-IV": "form-iv",
"form V": "form-v",
"form-V": "form-v",
"form VI": "form-vi",
"form-VI": "form-vi",
"form VII": "form-vii",
"form-VII": "form-vii",
"form VIII": "form-viii",
"form-VIII": "form-viii",
"form IX": "form-ix",
"form-IX": "form-ix",
"form X": "form-x",
"form-X": "form-x",
"form XI": "form-xi",
"form-XI": "form-xi",
"form XII": "form-xii",
"form-XII": "form-xii",
"form XIII": "form-xiii",
"form-XIII": "form-xiii",
"form Iq": "form-iq",
"form IIq": "form-iiq",
"form IIIq": "form-iiiq",
"form IVq": "form-ivq",
"class 1": "class-1",
"class 1a": "class-1a",
"class 2": "class-2",
"class 2a": "class-2a",
"class 3": "class-3",
"class 4": "class-4",
"class 5": "class-5",
"class 6": "class-6",
"class 7": "class-7",
"class 8": "class-8",
"class 9": "class-9",
"class 9a": "class-9a",
"class 10": "class-10",
"class 10a": "class-10",
"class 11": "class-11",
"class 12": "class-12",
"class 13": "class-13",
"class 14": "class-14",
"class 15": "class-15",
"class 16": "class-16",
"class 17": "class-17",
"class 18": "class-18",
"m-wa class": "class-1 class-2",
"m-mi class": "class-3 class-4",
"ma class": "class-5 class-6",
"ki-vi class": "class-7 class-8",
"n class": "class-9 class-10",
"u class": "class-11 class-12 class-14",
"ku class": "class-15",
"pa class": "class-16",
# "ku class": "class-17", # XXX how to distinguish from class-15?
"mu class": "class-18",
"first declension": "first-declension",
"second declension": "second-declension",
"third declension": "third-declension",
"fourth declension": "fourth-declension",
"fifth declension": "fifth-declension",
"first conjugation": "first-conjugation",
"second conjugation": "second-conjugation",
"third conjugation": "third-conjugation",
"fourth conjugation": "fourth-conjugation",
"fifth conjugation": "fifth-conjugation",
"sixth conjugation": "sixth-conjugation",
"seventh conjugation": "seventh-conjugation",
"stress pattern 1": "stress-pattern-1",
"stress pattern 2": "stress-pattern-2",
"stress pattern 3": "stress-pattern-3",
"stress pattern 3a": "stress-pattern-3a",
"stress pattern 3b": "stress-pattern-3b",
"stress pattern 4": "stress-pattern-4",
"preposition stressed": "stressed-preposition",
"tone I": "tone-1",
"tone II": "tone-2",
"type p": "type-p",
"type P": "type-p",
"type u": "type-u",
"type U": "type-u",
"type up": "type-up",
"type UP": "type-up",
"type a": "type-a",
"type A": "type-a",
"type ua": "type-ua",
"type UA": "type-ua",
"form of": "form-of",
"ordinal form of": "ordinal form-of",
"ordinal form of the number": "ordinal form-of",
"ordinal form of": "ordinal form-of",
"ordinal of": "ordinal form-of",
"ordinal number corresponding to the cardinal number":
"ordinal form-of",
"ordinal form of the cardinal number": "ordinal form-of",
"the ordinal number": "ordinal alt-of",
"used in the form": "used-in-the-form",
"upper case": "uppercase",
"upper-case": "uppercase",
"lower case": "lowercase",
"lower-case": "lowercase",
"mixed case": "mixedcase",
"mixed-case": "mixedcase",
"capital": "uppercase",
"verb form i": "verb-form-i",
"verb form ii": "verb-form-ii",
"pi'el construction": "construction-pi'el",
"pa'el construction": "construction-pa'el",
"pa'al construction": "construction-pa'al",
"hif'il construction": "construction-hif'il",
"hitpa'el construction": "construction-hitpa'el",
"hitpu'al construction": "construction-hitpu'al",
"pu'al construction": "construction-pu'al",
"nif'al construction": "construction-nif'al",
"huf'al construction": "construction-huf'al",
"peal construction": "construction-peal",
"verbal noun": "nominal-from-verb nominalization",
"Verbal derivations": "verb",
"abstract noun": "abstract-noun",
"concrete verb": "concrete",
"concrete verbs": "concrete",
"genitive singular as substantive": "genitive singular substantive",
"female names": "feminine proper-noun",
"proper name": "proper-noun",
"proper noun": "proper-noun",
"proper nouns": "proper-noun",
"usually in the": "usually",
"usually in the negative": "usually with-negation",
"non-scientific usage": "non-scientific",
"krama inggil": "honorific",
"krama andhap": "humble",
"krama-ngoko": "informal",
"ngoko": "informal",
"McCune–Reischauer": "McCune-Reischauer", # Dash type differs
"gender indeterminate": "gender-neutral",
"singular only": "singular singular-only",
"not used in plural": "singular-only singular",
"singularonly": "singular-only",
"plural only": "plural plural-only",
"imperative only": "imperative-only",
"in general sense": "broadly",
"by extension": "broadly",
"by metonymy": "metonymically",
"by synecdoche": "synecdoche",
"by semantic narrowing": "narrowly",
"by semantic widening": "broadly",
"strict sense": "strict-sense",
"baby talk": "baby-talk",
"middle infinitive": "middle-infinitive",
"first infinitive": "infinitive-i",
"third-person form of the long first infinitive of":
"third-person infinitive-i-long form-of",
"second infinitive": "infinitive-ii",
"second active infinitive": "infinitive-ii active",
"second passive infinitive": "infinitive-ii passive",
"third infinitive": "infinitive-iii",
"third active infinitive": "infinitive-iii active",
"third passive infinitive": "infinitive-iii passive",
"fourth infinitive": "infinitive-iv",
"fifth infinitive": "infinitive-v",
"subjunctive I": "subjunctive-i",
"subjunctive II": "subjunctive-ii",
"morse code": "morse-code",
"with odd-syllable stems": "with-odd-syllable-stems",
"old orthography": "archaic",
"Brazilian ortography": "Brazilian",
"European ortography": "European",
"with noun phrase": "with-noun-phrase",
"contracted dem-form": "contracted-dem-form",
"contractions": "contraction",
"Yale cen": "Yale",
"subjective pronoun": "subjective pronoun",
"subject": "subjective",
"subject form": "subjective",
"‘subject form’": "subjective", # tw.t/Egyptian
# "object": "objective", # XXX problems with "An object of ... form_of
"possessive pronoun": "possessive pronoun without-noun",
"demostrative": "demonstrative", # eeteeṇú/Phalura
"revised jeon": "revised-jeon",
"form used before": "archaic",
"front vowel harmony variant": "front-vowel",
"romanization of": "alt-of romanization",
"romanisation of": "alt-of romanization",
"archaic spelling of": "alt-of archaic",
"obsolete typography of": "alt-of obsolete",
"obsolete spelling of": "alt-of obsolete",
"rare spelling of": "alt-of rare",
"superseded spelling of": "alt-of archaic",
"pronunciation spelling of": "alt-of pronunciation-spelling",
"pronunciation spelling": "pronunciation-spelling",
"eye dialect spelling of": "alt-of pronunciation-spelling",
"alternative or obsolete spelling of":
"alt-of obsolete alternative",
"obsolete and rare": "obsolete rare",
"American spelling": "US",
"Canadian spelling": "Canada",
"name of the": "alt-of name", # E.g. .. letter | Latin-script letter
"alternative name of": "alt-of alternative name",
"alternative name for": "alt-of alternative name",
"nonstandard spelling of": "alt-of nonstandard",
"US standard spelling of": "alt-of US standard",
"US spelling of": "alt-of US",
"alternative typography of": "alt-of alternative",
"polytonic spelling of": "alt-of polytonic",
"variant of": "alt-of alternative",
"uncommon spelling of": "alt-of uncommon",
"alternative typographic spelling of": "alt-of alternative",
"especially in typeface names": "typography",
"alternative spelling": "alternative",
"alternative spelling of": "alt-of alternative",
"alternative form": "alternative",
"alternative form of": "alt-of alternative",
"alternative term for": "alt-of alternative",
"alternative stem of": "alt-of stem alternative",
"alternative letter-case form of": "alt-of",
"medieval spelling of": "alt-of obsolete",
"post-1930s Cyrillic spelling of": "alt-of standard Cyrillic",
"pre-1918 spelling of": "alt-of dated",
"pre-1945 period": "dated",
"Plural pre-1990": "dated plural",
"Plural pre-1990 reformed spelling": "plural",
"unreformed spelling": "nonstandard",
"Switzerland and Liechtenstein standard spelling of":
"alt-of Switzerland Liechtenstein standard",
"form removed with the spelling reform of 2012; superseded by":
"alt-of dated",
"excessive spelling of": "alt-of excessive",
"exaggerated degree of": "alt-of exaggerated",
"defective spelling of": "alt-of misspelling",
"verbal noun of": "nominal-from-verb nominalization form-of",
"alternative verbal noun of":
"form-of alternative nominal-from-verb nominalization",
"alternative conjugation of": "alt-of alternative",
"abbreviation of": "alt-of abbreviation",
"short for": "alt-of abbreviation",
"short form": "short-form",
"eclipsed form of": "alt-of abbreviation eclipsis",
"apocopic form of": "alt-of abbreviation apocope",
"apocopic form": "apocope abbreviation",
"apocopated": "apocope abbreviation",
"apocopate": "apocope abbreviation",
"h-prothesized form of": "alt-of prothesis",
"acronym of": "alt-of abbreviation",
"acronym": "abbreviation",
"initialism of": "alt-of abbreviation initialism",
"contraction of": "alt-of abbreviation contraction",
"IUPAC 3-letter abbreviation for": "alt-of abbreviation",
"IUPAC 3-letter abbreviation of": "alt-of abbreviation",
"IUPAC 2-letter abbreviation of": "alt-of abbreviation",
"IUPAC 2-letter abbreviation for": "alt-of abbreviation",
"IUPAC 1-letter abbreviation of": "alt-of abbreviation",
"IUPAC 1-letter abbreviation for": "alt-of abbreviation",
"symbol for": "alt-of symbol",
"praenominal abbreviation of": "alt-of abbreviation praenominal",
"ellipsis of": "alt-of ellipsis abbreviation",
"clipping of": "alt-of clipping abbreviation",
"X-system spelling of": "alt-of X-system",
"H-system spelling of": "alt-of H-system",
"Pinyin transcription of": "alt-of Pinyin",
"Rōmaji transcription of": "alt-of Rōmaji",
"romaji": "Rōmaji",
"rōmaji": "Rōmaji",
"visual rendering of Morse code for":
"alt-of visual-rendering morse-code",
"soft mutation of": "form-of soft-mutation",
"causes soft mutation": "triggers-soft-mutation",
"non-Oxford British English standard spelling of":
"alt-of nonstandard UK",
"Nil standard spelling of": "alt-of UK standard",
"nasal mutation of": "form-of nasal-mutation",
"nasal mutation": "nasal-mutation",
"triggers nasalization": "triggers-nasal-mutation",
"triggers nasal mutation": "triggers-nasal-mutation",
"mixed mutation of": "form-of mixed-mutation",
"mixed mutation": "mixed-mutation",
"aspirate mutation of": "form-of aspirate-mutation",
"aspirate mutation": "aspirate-mutation",
"British misspelling": "misspelling British",
"misspelling of": "alt-of misspelling",
"deliberate misspelling of": "alt-of misspelling deliberate",
"common misspelling of": "alt-of misspelling",
"misconstruction of": "alt-of misconstruction",
"misconstructed": "misconstruction",
"ungrammatical": "misconstruction",
"Latin spelling of": "alt-of Latin",
"Latn": "Latin",
"Late Anglo-Norman spelling of": "alt-of Anglo-Norman",
"Jawi spelling of": "alt-of Jawi",
"Hanja form of": "alt-of hanja",
"Hanja form? of": "alt-of hanja",
"Hanja": "hanja",
"Hán tự form of": "alt-of Hán-tự",
"Newa Spelling": "Newa",
"Glagolitic spelling of": "alt-of Glagolitic",
"front vowel variant of": "alt-of front-vowel",
"front-vowel variant of": "alt-of front-vowel",
"euphemistic spelling of": "alt-of euphemistic",
"euphemistic reading of": "alt-of euphemistic",
"euphemism": "euphemistic",
"transliterated Russian pet forms": "transliteration Russian",
"Transliteration": "transliteration",
"Cyrillic spelling of": "alt-of Cyrillic",
"Cyrillic spelling": "Cyrillic",
"British standard spellingh of": "alt-of UK standard",
"British and Canada standard spelling of":
"alt-of UK Canada standard",
"Britain and Ireland standard spelling of":
"alt-of Britain Ireland standard",
"Britain and New Zealand standard spelling of":
"alt-of Britain New-Zealand standard",
"Britain and Canada spelling of": "alt-of Britain Canada",
"Baybayin spelling of": "alt-of Baybayin",
"Arabic spelling of": "alt-of Arabic",
"Arabic (Eastern)": "Arabic-Indic",
"Eastern Arabic": "Arabic-Indic",
"Arabic (Western)": "Arabic",
"Formerly standard spelling of": "alt-of archaic",
"informal spelling of": "alt-of informal",
"Yañalif spelling of": "alt-of Yañalif",
"traditional orthography spelling of": "alt-of traditional",
"traditional and simplified": "traditional simplified",
"Taraškievica spelling of": "alt-of Taraškievica",
"Post-1930s Cyrillic spelling of": "alt-of Cyrillic",
"Britain spelling of": "alt-of Britain",
"linguistically informed spelling of": "alt-of literary",
"Chinese spelling of": "alt-of China",
"Mongolian spelling of": "alt-of Mongolian",
"Leet spelling of": "alt-of Leet Internet",
"leetspeak": "Leet Internet",
"bulletin board system slang": "slang Internet",
"combining form of": "in-compounds form-of",
"combining form": "in-compounds",
"compound of": "compound-of",
"compound of gerund of": "compound-of",
"compound of imperative (noi form) of": "compound-of",
"compound of imperative (tu form) of": "compound-of",
"compound of imperative (vo form) of": "compound-of",
"compound of imperative (voi form) of": "compound-of",
"compound of imperative of": "compound-of",
"compound of indicative present of": "compound-of",
"compound of masculine plural past participle of": "compound-of",
"compound of past participle of": "compound-of",
"compound of present indicative of": "compound-of",
"compound of plural past participle of": "compound-of",
"compound of second-person singular imperative of": "compound-of",
"compound of the gerund of": "compound-of",
"compound of the imperfect": "compound-of",
"compound of the infinitive": "compound-of",
"synonym of": "synonym synonym-of",
"same as": "synonym synonym-of",
"topicalized form of": "topicalized form-of",
"form of": "form-of",
"inflected form of": "form-of",
"lenited form of": "lenition form-of",
"triggers lenition": "triggers-lenition",
"triggers lenition of a following consonant-initial noun":
"triggers-lenition",
"triggers eclipsis": "triggers-eclipsis",
"triggers h-prothesis": "triggers-h-prothesis",
"causes aspirate mutation": "triggers-aspirate-mutation",
"triggers aspiration": "triggers-aspirate-mutation",
"triggers mixed mutation": "triggers-mixed-mutation",
# XXX Could be more accurate
"triggers mixed mutation except of forms of bod": "triggers-mixed-mutation",
"humurous": "humorous error-misspelling",
"humourous": "humorous",
"sarcasm": "sarcastic",
"ecclesiastic or ironic": "Ecclesiastical ironic",
"figuratively or literally": "figuratively literally",
"figuratively and literary": "figuratively literary",
"figuative": "figuratively",
"humorously": "humorous",
"jocular": "humorous",
"humorous or euphemistic": "humorous euphemistic",
"may sound impolite": "possibly impolite",
"northern dialects": "dialectal",
"dialectism": "dialectal",
"archaic or loosely": "archaic broadly",
"archaic or poetic": "archaic poetic",
"archeic or poetic": "archaic poetic",
"archaic or phrasal": "archaic idiomatic",
"archaic or dialectal": "archaic dialectal",
"archaic or literary": "archaic literary",
"archaic or Britain": "archaic Britain",
"archaic or nonstandard": "archaic nonstandard",
"most dialects": "dialectal",
"most dialects of Ripuarian": "dialectal",
"some dialects": "dialectal",
"some compounds": "idiomatic in-compounds",
"as a modifier in compound words": "in-compounds",
"used in compound adjectives": "in-compounds adjective",
"used attributively": "attributive",
"used predicatively": "predicative",
"used substatively": "substantive",
"unofficial spelling": "nonstandard",
"rare nonstandard spellings": "rare nonstandard",
"as rare alternative form": "rare",
"nonstandard spellings": "nonstandard",
"capitalised": "capitalized",
"always capitalized": "capitalized",
"sometimes not capitalized": "usually capitalized",
"sometimes capitalized": "sometimes capitalized",
"Sometimes capitalized": "sometimes capitalized",
"rhetorical question": "rhetoric",
"old-fashioned": "dated",
"rarely used": "rare",
"rarely": "rare",
"present tense seldom used": "present-rare",
"often in place of present tense": "present often",
"conjugated non-suppletively in the present tense": "irregular",
"now rare": "archaic",
"in the past tense": "past",
"fixed expressions": "idiomatic",
"formulaic": "idiomatic",
"several set phrases": "idiomatic",
"now colloquial": "colloquial",
"now colloquial and nonstandard": "colloquial nonstandard",
"colloquial or Min Nan": "colloquial Min-Nan",
"colloquial or jargon": "colloquial jargon",
"Wiktionary and WMF jargon": "jargon Internet",
"colloquially": "colloquial",
"fossil word": "archaic",
"brusque": "impolite",
"verbs": "verb",
"prepositions": "prepositional",
"postpositions": "postpositional",
"interjections": "interjection",
"Abbreviations": "abbreviation",
"abbreviations": "abbreviation",
"variants": "variant",
"Ordinal": "ordinal",
"ordinals": "ordinal",
"local use": "regional",
"more generally": "broadly",
"loosely": "broadly",
"broad sense": "broadly",
"hypocoristic": "familiar",
"familiar or childish": "familiar childish",
"to a male": "addressee-masculine",
"to a man": "addressee-masculine",
"to a female": "addressee-masculine",
"to a woman": "addressee-feminine",
"hyperbolic": "excessive",
"18th century": "obsolete",
"9th century": "obsolete",
"17th century": "obsolete",
"10th century": "obsolete",
"16th century": "obsolete",
"14th century": "obsolete",
"12th century": "obsolete",
"post-classical": "obsolete",
"early 20th century": "archaic",
"20th century": "dated",
"mid-20th century": "dated",
"mid-19th century": "obsolete",
"before 20th century": "obsolete",
"19th to 20th century": "archaic",
"15th century": "obsolete",
"11th century": "obsolete",
"until early 20th century": "obsolete",
"since the 16th century": "dated",
"late 16th century": "obsolete",
"late 14th century": "obsolete",
"in usage until 20th century": "obsolete",
"in the 17th century": "obsolete",
"in the 16 th century": "obsolete",
"in Scots until the seventeenth century": "obsolete",
"in 10th century": "obsolete",
"early 17th century": "obsolete",
"chiefly 18th century": "obsolete",
"chiefly 12th century": "obsolete",
"before 16th century": "obsolete",
"attested in the 16th century": "obsolete",
"5th century": "obsolete",
"19th to early 20th century": "obsolete",
"19th-mid 20th century": "obsolete",
"19 the century": "obsolete",
"19th-early 20th century": "obsolete",
"19th century": "obsolete",
"1776-19th century": "obsolete",
"15th-16th century": "obsolete",
"Medieval and Early Modern Greek regional":
"Medieval-Greek Early-Modern-Greek dialectal",
"collectively": "collective",
"collective or singulative": "collective singulative",
"used formally in Spain": "Spain",
"nouns": "noun",
"phrases": "phrase",
"with the particle lai": "with-lai",
"adjectives": "adjective",
"related adjective": "adjective",
"adj": "adjective",
"adj.": "adjective",
"adv": "adverb",
"adverbs": "adverb",
"augmentatives": "augmentative",
"pejoratives": "pejorative",
"perjorative": "pejorative error-misspelling",
"pejorative or colloquial": "pejorative colloquial",
"non-standard since 2012": "nonstandard",
"colloquialism": "colloquial",
"non-standard since 1917": "nonstandard",
"conditional mood": "conditional",
"figurative": "figuratively",
"compound words": "compound",
"form of address": "term-of-address",
"term of address": "term-of-address",
"as a term of address": "term-of-address",
"direct address": "term-of-address",
"face-to-face address term": "term-of-address",
"address": "term-of-address",
"endearingly": "endearing",
"elliptically": "ellipsis",
"elegant": "formal", # Elegant or Formal Thai
"nonce word": "nonce-word",
"neologism or slang": "neologism slang",
"attributively": "attributive",
"poetic term": "poetic",
"poetic meter": "poetic",
"in certain phrases": "in-certain-phrases",
"deprecated template usage": "",
"deprecated": "proscribed",
"diacritical mark": "diacritic",
"inflection of": "form-of",
"mainland China": "Mainland-China",
"spelling in China": "China",
"rhyming slang": "slang",
"prison slang": "slang",
"criminal slang": "slang",
"fandom slang": "slang lifestyle",
"furry fandom": "slang lifestyle",
"manga fandom slang": "slang manga",
"real estate slang": "slang real-estate",
"gay slang": "slang LGBT",
"urban slang": "slang urbanism",
"lolspeak": "humorous Internet",
"Usenet": "Internet",
"one-termination adjective": "one-termination",
"two-termination adjective": "two-termination",
"three-termination adjective": "three-termination",
"semelefactive": "semelfactive error-misspelling",
"invariant": "invariable",
"followed by to": "with-to",
"taking a to-infinitive": "with-to with-infinitive",
"with bare infinitive": "with-infinitive",
"direct object": "direct-object",
"indirect object": "indirect-object",
"transitive with of": "transitive-with-of",
"with of": "with-of",
"with on": "with-on",
"with down": "with-down",
"with up": "with-up",
"with a personal pronoun": "with-personal-pronoun",
"with an indirect object": "with-indirect-object",
"with comparatives": "with-comparative",
"with definite article": "with-definite-article",
"etc.": "usually",
"regardless of gender": "gender-neutral",
"gender-neutral (or multigendered)": "gender-neutral",
"ditransitive for the second object": "ditransitive",
"double transitive": "ditransitive",
"transitive or ditransitive": "transitive ditransitive",
"number": "numeral",
"numerals": "numeral",
"Tally marks": "Tally-marks numeral",
"+ 3rd-pers.": "with-third-person",
"Historical": "historical",
"hist.": "historical",
"antiquity": "historical",
"ideophone": "ideophonic",
"Alsatian (Low Alemannic German)": "Alsatian Alemannic",
"all sects": "",
"adessive + 3rd person singular + ~":
"with-adessive with-third-person-singular postpositional",
"inessive + 3rd person singular + ~":
"with-inessive with-third-person-singular postpositional",
"~ (olemassa)": "with-olemassa",
"3rd person singular": "third-person singular",
"+ genitive + 3rd person singular + passive present participle":
"with-genitive with-third-person-singular with-passive-present-participle",
"genitive + 3rd-pers. singular + 1st infinitive":
"with-genitive with-third-person-singular with-infinitive-i",
"+ direct object in accusative + 3rd infinitive in illative":
"transitive with-accusative with-infinitive-iii-illative",
"+ direct object in accusative + past participle in translative or partitive":
"transitive with-accusative with-past-participle-translative with-past-participle-partitive",
"+ past participle in translative or partitive":
"with-past-participle-translative with-past-participle-partitive",
"active past part. taitanut": "",
"+ passive past participle in translative":
"with-passive-past-participle-translative",
"+ passive past participle in partitive":
"with-passive-past-participle-partitive",
"+ active past participle in translative":
"with-past-participle-translative",
"+ adjective in ablative or allative":
"with-adjective with-ablative with-allative",
"in indicative or conditional mood": "in-indicative in-conditional",
"in negative sentences": "with-negation",
"in negative clauses": "with-negation",
"using Raguileo Alphabet": "Raguileo-Alphabet",
"using Raguileo alphabet": "Raguileo-Alphabet",
"using Raguileo and Unified Alphabet": "Raguileo-Alphabet Unified",
"transliterated": "transliteration",
"though not derogative": "",
"women generally don't accept to be called this way": "offensive",
"transitive sense": "transitive",
"in intransitive meaning": "intransitive",
"initial change reduplication": "reduplication",
"initial change reduplication with syncope": "reduplication syncope",
"initial change with syncope": "syncope",
"syncopated": "syncope",
"reduplication with syncope": "reduplication syncope",
"introducing subjunctive hortative": "subjunctive hortative",
"nominative and vocative plural animate": "nominative vocative",
"with diaeresis to indicate disyllabilicity": "",
"aphaeretic variant": "variant",
"mediopassive voice": "mediopassive",
"ALL": "",
"archaic or hypercorrect": "archaic hypercorrect",
"as a diacritic": "diacritic",
"as a gerund": "gerund",
"as a calque": "calque",
"pseudoarchaic": "dated",
"surnames": "surname",
"all countable senses": "countable",
"attributive form of pyjamas": "attributive",
"ordinal form": "ordinal",
"ordinal form of twelve": "ordinal",
"conjugative of": "conjugative-of",
"correlative of": "correlative-of",
"modern nonstandard spellings": "modern nonstandard",
"non-standard": "nonstandard",
"non-standard form of": "nonstandard alt-of",
"nonanimate": "inanimate",
"nominalized verb": "nominalization",
"nominalized": "nominalization",
"n-v": "verb-from-nominal",
"v-n": "nominal-from-verb nominalization",
"n-n": "nominal-from-nominal nominalization",
"v-v": "verb-from-verb",
"uses -j- as interfix": "interfix-j",
"eulogistic": "poetic", # XXX not really, implies praise
"prev": "previous",
"normal usage": "", # In some Russian words with two heads
"professional usage": "", # In some Russian words with two heads
"?? missing information.": "",
"unknown comparative": "",
"unknown accent pattern": "",
"?? conj.": "",
"pres. ??": "",
"past ??": "",
"see usage notes": "",
"no known Cyrillic variant": "",
"no first-person singular present": "no-first-person-singular-present",
"no first-person singular preterite": "no-first-person-singular-preterite",
"no third-person singular past historic":
"no-third-person-singular-past-historic",
"‘dependent’": "dependent", # sn/Egyptian
"‘independent’": "independent", # ntf/Egyptian
"eum": "hangeul", # Apparently synonym for the Korean alphabet
"classifiers": "classifier",
"discourse particle": "discourse particle",
"discourse": "discourse", # hum/Phalura
"numeral tones": "numeral-tones",
"alphabetic tones": "alphabetic-tones",
"class A infixed pronoun": "infix pronoun class-A",
"class B infixed pronoun": "infix pronoun class-B",
"class C infixed pronoun": "infix pronoun class-C",
"class B & C infixed pronoun": "infix pronoun class-B class-C",
"class I": "class-i",
"class II": "class-ii",
"class III": "class-iii",
"class N": "class-n",
"class a-i": "class-a-i",
"to multiple people": "addressee-plural",
"to one person": "addressee-singular",
"actor focus": "actor-focus",
"indirect actor trigger": "actor-indirect",
"usually feminine": "feminine-usually",
"but usually feminine": "feminine-usually",
"usually masculine": "masculine-usually",
"but usually masculine": "masculine-usually",
"but rarely feminine": "masculine-usually",
"but rarely masculine": "feminine-usually",
"requires negation": "with-negation",
"inalienable–class I agreement": "inalienable class-i",
"inalienable–class II agreement": "inalienable class-ii",
"inalienable–class III agreement": "inalienable class-iii",
"no first-person singular past historic":
"no-first-person-singular-past-historic",
"no definite forms": "no-definite",
"no definite form": "no-definite",
"no diminutive": "no-diminutive",
"no second-person singular imperative":
"no-second-person-singular-imperative",
"no simple past": "no-simple-past",
"no feminine form": "no-feminine",
"no infinitive": "no-infinitive",
"no longer productive": "idiomatic",
"no past tense": "no-simple-past",
"no third-person singular present": "no-third-person-singular-present",
"nominalized adjective following adjective declension":
"nominalization adjective-declension",
# XXX this could be more accurate
"truncative except after q and r": "truncative", # Greenlandic
"of masculine singular": "masculine singular nominative",
"of masculine plural": "masculine plural nominative",
"of feminine singular": "feminine singular nominative",
"of feminine plural": "feminine plural nominative",
"officialese": "bureaucratese",
"+ optionally: adjective in accusative case + neuter noun in accusative case":
"definite neuter with-accusative",
"non-emphatic": "unemphatic",
"not productive": "idiomatic",
"passive with different sense": "passive",
"active with different sense": "active",
"+ von": "with-von", # außerhalb/German
"Symbol:": "symbol",
"a reflexive": "reflexive",
"active/stative": "active stative",
"always postpostive": "postpositional",
"postpositive": "postpositional",
"defininte plural": "definite plural", # aigg/Westrobothnian
"determinative of": "determinative-of",
"lenites": "lenition",
"followed by indirect relative": "with-indirect-relative",
"inflected like": "inflected-like",
"locational noun": "locative",
"mass noun": "uncountable",
"negated": "past participle negative", # fera/Westrobothnian
"neutral": "gender-neutral", # countryman/English
"never clause-initial": "not-clause-initial",
"primarily": "mostly",
"definite articulation": "definite", # boatsi/Aromanian
"p-past": "passive simple past",
"ppp": "passive past participle",
"plural:": "plural",
"synonyms:": "synonym",
"quantified:": "quantified",
"sentence case": "sentence-case",
"set phrase from Classical Chinese": "idiomatic Classical-Chinese",
"the plural of": "plural-of",
"the reflexive case of": "reflexive-of",
"the reflexive form of": "reflexive-of",
"unipersonal": "", # Too rare to track
"used only after prepositions": "after-preposition",
"appended after imperfective form": "in-compounds with-imperfect",
"universal or indefinite": "universal indefinite",
"el/ea": "third-person singular", # o/Romanian/Verb
"ele/ei": "third-person plural", # vor/Romanian/Verb
"vestre": "slang", # type of backslang in Argentine and Uruguayan Spanish
"onomatopoeia": "onomatopoeic",
"ITERATIVE": "iterative",
"OPTATIVE": "optative",
"IMPERFECTIVE": "imperfective",
"PERFECTIVE": "perfective",
"(FIXME)": "error-fixme",
"Conversive": "conversive",
"Cholula and Milpa Alta": "Cholula Milpa-Alta",
"Surnames": "surname",
"metaphorically": "metaphoric",
"hypothetic": "hypothetical",
"Kinmen and Penghu Hokkien": "Kinmen-Hokkien Penghu-Hokkien",
}
# This mapping is applied to full descriptions before splitting by comma.
# Note: these cannot match just part of a description (even when separated
# by comma or semicolon), as these can contain commas and semicolons.
xlat_descs_map = {
"with there, or dialectally it, as dummy subject": "with-dummy-subject",
"+ location in inessive, adessive + vehicle in elative, often with pois":
"with-inessive with-adessive with-elative",
"+ accusative +, Genitive": "with-accusative with-genitive",
"with genitive, instrumental or dative case":
"with-genitive with-instrumental with-dative",
"+ illative, allative, (verbs) 3rd infinitive in illative":
"with-illative with-allative with-infinitive-iii-illative",
"(inessive or adessive) + 3rd-pers. sg. + an adverb":
"with-inessive with-adessive with-third-person-singular with-adverb",
"+ partitive for agent, + allative for target":
"with-partitive with-allative",
"+ infinitive; in indicative or conditional mood":
"with-infinitive with-indicative with-conditional",
"transitive, auxiliary + first infinitive, active past part. taitanut or tainnut":
"transitive, auxiliary, with-infinitive-i",
"elative + 3rd person singular + noun/adjective in nominative or partitive or personal + translative":
"with-elative with-third-person-singular", # XXX very incomplete
"group theory, of a group, semigroup, etc.": "group theory",
"Triggers lenition of b, c, f, g, m, p, s. Triggers eclipsis of d, t.":
"triggers-lenition triggers-eclipsis",
# XXX this could be more precise
"‘his’ and ‘its’ trigger lenition; ‘her’ triggers /h/-prothesis; ‘their’ triggers eclipsis": "triggers-lenition triggers-h-prothesis triggers-eclipsis",
"for = elative; for verbs action noun in elative":
"with-action-noun-in-elative",
# de/Danish
"as a personal pronoun, it has the forms dem in the oblique case and deres in the genitive; as a determiner, it is uninflected": "",
# spinifer/Latin
"nominative masculine singular in -er; two different stems": "",
"^(???) please indicate transitivity!": "",
"^(???) please provide spelling!": "",
"please provide plural": "",
"please provide feminine": "",
"please provide feminine plural": "",
"the passive, with different sense": "",
"the active, with different sense": "",
"m": "masculine",
"f": "feminine",
"classic": "",
}
# Words that are interpreted as tags at the beginning of a linkage
linkage_beginning_tags = {
"factitive/causative": "factitive causative",
"factive/causative": "factive causative",
"factive": "factive",
"factitive": "factive", # Not sure if same or different as factive
"causative": "causative",
"reflexive": "reflexive",
"frequentative": "frequentative",
"optative": "optative",
"affirmative": "affirmative",
"cohortative": "cohortative",
"applicative": "applicative",
"stative": "stative",
"passive": "passive",
"optative": "optative",
"adjective": "adjective",
"verb": "verb",
"noun": "noun",
"adverb": "adverb",
}
# For a gloss to be interpreted as a form_of by parse_alt_or_inflection_of(),
# the form must contain at least one of these tags. This is only used for
# the implicit form-of (tags followed by "of").
form_of_tags = set([
"abessive",
"ablative",
"absolutive",
"accusative",
"adessive",
"adjectival",
"adverbial",
"affirmative",
"agentive",
"allative",
"aorist",
"applicative",
"aspirate-mutation",
"attributive",
"augmentative",
"augmented",
"benefactive",
"causal-final",
"causative",
"collective",
"comitative",
"comparative",
"conditional",
"conditional-i",
"conditional-ii",
"connegative",
"construct",
"contemplative",
"counterfactual",
"dative",
"debitive",
"definite",
"delative",
"demonstrative",
"desiderative",
"diminutive",
"distal",
"dual",
"durative",
"elative",
"endearing",
"equative",
"ergative",
"essive",
"feminine",
"first-declension",
"first-person",
"form-i",
"form-ii",
"form-iii",
"form-iiiq",
"form-iiq",
"form-iq",
"form-iv",
"form-ivq",
"form-ix",
"form-v",
"form-vi",
"form-vii",
"form-viii",
"form-x",
"form-xi",
"form-xii",
"form-xiii",
"fourth-person",
"frequentative",
"future",
"gender-neutral",
"genitive",
"gerund",
"hortative",
"illative",
"imperative",
"imperfect",
"imperfective",
"impersonal",
"inclusive",
"indefinite",
"indicative",
"inessive",
"infinitive",
"infinitive-i",
"infinitive-ii",
"infinitive-iii",
"infinitive-iv",
"infinitive-v",
"instructive",
"instrumental",
"interrogative",
"iterative",
"jussive",
"lative",
"locative",
"masculine",
"mediopassive",
"middle-infinitive",
"mixed-mutation",
"nasal-mutation",
"negative",
"neuter",
"nominal",
"nominative",
"non-past",
"oblique",
"offensive",
"optative",
"ordinal",
"participle",
"partitive",
"passive",
"past",
"paucal",
"perfect",
"perfective",
"pluperfect",
"plural",
"polite",
"possessed",
"possessive",
"potential",
"predicative",
"prepositional",
"present",
"preterite",
"prolative",
"pronominal",
"prospective",
"proximal",
"quotative",
"reflexive",
"root",
"second-declension",
"second-person",
"singular",
"singulative",
"soft-mutation",
"stative",
"stressed",
"subjective",
"subjunctive",
"subjunctive-i",
"subjunctive-ii",
"sublative",
"superessive",
"superlative",
"supine",
"terminative",
"third-declension",
"third-person",
"transgressive",
"translative",
"unstressed",
"vocative",
# 2084 objective - beware of "An object of ..." (e.g., song/English)
])
# For a gloss to be interpreted as an alt_of by parse_alt_or_inflection_of(),
# the form must contain at least one of these tags. This is only used for
# the implicit alt-of (tags followed by "of").
alt_of_tags = set([
"abbreviation",
"capitalized",
"colloquial",
"contracted",
"dialectal",
"historic",
"hypercorrect",
"initialism",
"literary",
"lowercase",
"misconstruction",
"nonstandard",
"obsolete",
"proscribed",
"standard",
"uppercase",
])
# Valid tag categories / attributes
tag_categories = set([
"case", # Grammatical case (also direct-object, indirect-object)
"gender", # Semantic gender (often also implies class)
"class", # Inflection class (Bantu languages, Japanese, etc)
"number", # Singular, plural, dual, paucal, ...
"addressee", # Something related to addressee
"possession", # possessive, possessed, alienable, inalienable
"deictic", # distal, proximal, inclusive, exclusive
"voice", # active, passive, middle
"aspect", # Aspect of verbs (perfective, imperfective, habitual, ...)
"mood", # cohortiative, commissive, conditional, conjunctive,
# declarative, hortative, imperative, indicative, infinitive,
# interrogative, jussive, optative, potential, prohibitive,
# subjunctive
# Note that interrogative also used for, e.g., pronouns
"tense", # present, past, imperfect, perfect, future, pluperfect
"transitivity", # intransitive, transitive, ditransitive, ambitransitive
"participants", # reflexive, reciprocal
"degree", # positive, comparative, superlative
"trigger", # Triggers something (e.g., mutation) in some context
"related", # Indicates related term / word / classifier / counter / aux
"detail", # Provides some detail
"mod", # Provides a modified form (e.g., abbreviation, mutation)
"pos", # Specifies part-of-speech
"derivation", # Specifies derivation (nominalization, agent,
# nominal-from-verb, ...)
"pragmatic", # Specifies pragmatics (e.g., stressed/unstressed)
"phonetic", # Describes some phonetic aspect
"lexical", # Describes some lexical/typographic aspect
"category", # person, personal, impersonal, animate, inanimate,
# (virile, nonvirile?)
"register", # dialectal, formal, informal, slang, vulgar
"misc", # simple, compound
"gradation", # gradation or qualifier
"with", # Co-occurs with something
"order", # Word position or order
"XXX", # TBD, currently not clear
])
# Set of all valid tags
valid_tags = set([
"-i", # Japanese inflection type
"-na", # Japanese inflection type
"-nari", # Japanese inflection type
"-tari", # Japanese inflection type
"abbreviation",
"abessive", # Case
"ablative", # Case
"absolute", # Case, Bashkir, Swedish [absolute reflexive]
"absolutive", # Case (patient or experience of action)
"abstract",
"abstract-noun",
"accent/glottal",
"accusative",
"active",
"actor-focus", # Tagalog
"actor-indirect", # Tagalog
"actor-i", # Ilocano vebs
"actor-ii",
"actor-iii",
"actor-iv",
"additive", # Greenlandic: adds suffix after last letter of stem
"addressee-feminine",
"addressee-masculine",
"addressee-plural",
"addressee-singular",
"adessive", # Case
"adjectival",
"adjective",
"adjective-declension",
"admirative", # Verb form in Albanian
"adnominal",
"adverb",
"adverbial",
"adversative",
"affirmative",
"affix",
"after-preposition", # Word used only after preposition nich/Lower Sorbian
"agent",
"agentive",
"alienable", # Alienable possession; Choctaw, Ojibwe, Navajo, Tokelauan etc
"allative", # Case
"allative-i",
"allative-ii",
"alphabetic-tones",
"also",
"alt-of",
"alternative",
"ambitransitive",
"analytic",
"anaphorically",
"animate",
"animal-not-person", # Refers to animal (e.g., Russian anml suffix)
"anterior", # French seems to have "past anterior" tense
"aorist", # Verb form (perfective past) E.g., Latin, Macedonian
"aorist-ii", # Albanian
"apocope",
"applicative", # Verb form
"approximative", # Noun form (case?), e.g., марксизм/Komi-Zyrian
"archaic",
"article",
"aspirate-mutation",
"assertive", # Verb form (e.g., Korean)
"associative", # Case (e.g., Quechua)
"ateji",
"attributive",
"augmentative",
"augmented",
"autonomous",
"aux-haben",
"aux-sein",
"auxiliary",
"baby-talk",
"before-lenited-fh", # Next word starts with lenited fh (Irish)
"before-past", # Used before the past tense (Irish)
"before-vowel", # next words starts with vowel (in pronunciation)
"benefactive", # Case (beneficiary of an action)
"broadly",
"būdinys",
"calque",
"cangjie-input",
"canonical", # Used to mark the canonical word from from the head tag
"capitalized",
"capitalized",
"cardinal",
"caritive", # Case (lack or absense of something), марксизм/Komi-Zyrian
"catenative",
"causal-final",
"causative", # Verb aspect (e.g., Japanese); Cause/Reason (Korean)
"character",
"chiefly",
"childish",
"circumstantial", # Verb form, e.g., patjaṉi
"class", # Used as a head prefix in San Juan Quajihe Chatino (class 68 etc)
"class-1", # Inflectional classes (e.g., Bantu languages), cf. gender
"class-10",
"class-10a",
"class-11",
"class-12",
"class-13",
"class-14",
"class-15",
"class-16",
"class-17",
"class-18",
"class-1a",
"class-2",
"class-2a",
"class-3",
"class-4",
"class-5",
"class-6",
"class-7",
"class-8",
"class-9",
"class-9a",
"class-A", # e.g., Old Irish affixed pronoun classes
"class-B",
"class-C",
"class-i", # Choctaw
"class-ii",
"class-iii",
"class-n", # Chickasaw
"class-a-i", # Akkadian
"classifier",
"clipping",
"clitic",
"coactive", # Verbs in Guaraní
"cohortative", # Verb form: plea, imploring, wish, intent, command, purpose
"collective", # plural interpreted collectively
"colloquial",
"comitative", # Case
"common", # XXX gender (Swedish, Danish), also meaning commonly occurring
"comparable",
"comparative",
"completive",
"composition",
"compound", # Can indicate verb forms formed with auxiliary
"compound-of",
"concessive", # Verb form
"conclusive", # Verb form (e.g., Bulgarian)
"concrete", # Slavic verbs
"conditional", # Verb mood
"conditional-i", # Verb mood (German)
"conditional-ii", # Verb mood (German)
"conjugation-type", # Used to indicate form really is conjugation class
"conjugative", # Verb form, e.g., উঘাল/Assamese
"conjugative-of", # Korean
"conjunct", # Verb form, e.g., gikaa/Ojibwe
"conjunct-incorporating",
"conjunct-non-incorporating",
"conjunctive", # Verb mood (doubt: wish, emotion, possibility, obligation)
"conjunction", # Used in Phalura conjunctions, relative pronouns
"connective", # Group of verb forms in Korean
"connegative",
"consecutive", # Verb form, e.g., થૂંકવું/Gujarati, noun form марксизм
"construct", # Apparently like definite/indefinite (e.g., Arabic)
"construction-hif'il",
"construction-hitpa'el",
"construction-hitpu'al",
"construction-huf'al",
"construction-nif'al",
"construction-pa'al",
"construction-pa'el",
"construction-peal", # Aramaic, Classical Syriac
"construction-pi'el",
"construction-pu'al",
"contemplative",
"contemporary",
"contingent", # Verb form, উঘাল/Assamese
"continuative", # Verb aspect (actions still happening; e.g., Japanese)
"contracted",
"contracted-dem-form",
"contraction",
"contrastive", # Apparently connective verb form in Korean
"converb", # Verb form or special converb word
"converb-i", # e.g., խածնել/Armenian
"converb-ii",
"conversive", # Verb form/type, at least in Swahili, reverse meaning?
"coordinating",
"copulative",
"correlative-of",
"cot-caught-merger",
"count-form", # Nominal form in Belarusian
"countable",
"counter",
"counterfactual",
"dated",
"dative",
"debitive", # need or obligation (XXX is this same as "obligational" ???)
"declension-pattern-of",
"declinable",
"defective",
"deferential",
"definite",
"definition",
"definitive", # XXX is this used same as "definite", opposite indefinite?
"deictically",
"delative", # Case
"deliberate",
"demonstrative",
"demonym",
"dependent",
"derogatory",
"desiderative", # Verb mood
"destinative", # Case, marks destination/something destined (e.g. Hindi)
"determinate", # Polish verbs (similar to "concrete" in Russian?)
"determinative-of", # Korean
"determiner", # Indicates determiner; Korean determiner verb forms?
"deuterotonic", # e.g., dofuissim/Old Irish
"diacritic",
"dialectal",
"digit",
"diminutive",
"diptote", # Noun having two cases (e.g., Arabic)
"direct", # Apparently like case form (e.g., Hindi, Punjabi)
"direct-object",
"directional", # Case?, e.g., тэр/Mongolian
"directive", # Case (locative/nearness), e.g. Basque, Sumerian, Turkic
"disapproving",
"discourse", # At lest some Ancient Greek particles
"disjunctive",
"distal", # Demonstrative referent is far, cf. proximal, obviative
"distributive", # Case in Quechua? (is this case or e.g. determiner?)
"ditransitive",
"dual", # two in number, cf. singular, trial, plural
"dubitative", # Verb form (e.g., Bulgarian)
"durative", # Verb form
"eclipsis",
"egressive", # Case? e.g., дворец/Komi-Zyrian
"elative", # Case
"ellipsis",
"emphatic",
"empty-gloss",
"enclitic",
"endearing",
"epic",
"epicene",
"equative", # Case (indicates something is like something else)
"ergative",
"error-fixme",
"error-lua-exec",
"error-lua-timeout",
"error-unknown-tag",
"error-misspelling",
"error-unrecognized-form",
"especially",
"essive", # Case
"essive-formal",
"essive-instructive",
"essive-modal",
"ethnic",
"eumhun",
"euphemistic",
"evidential", # Verb form (e.g., Azerbaijani)
"exaggerated",
"excessive",
"exclusive", # inclusive vs. exclusive first-person; case in Quechua
"exessive", # Case (transition away from state)
"expectative", # Verb form, e.g., ϯϩⲉ/Coptic
"expletive",
"expressively",
"extended", # At least in some Bulgarian forms, e.g. -лив
"extinct", # Uses for taxonomic entries, indicates species is extinct
"factitive", # Not sure if same or different as factive
"factive",
"familiar", # Formality/politeness degree of verbs etc
"feminine", # Grammatical gender, masculine, neuter, common, class-* etc.
"feminine-usually", # m/f, but usually feminine
"fifth-conjugation",
"fifth-declension",
"figuratively",
"finite-form", # General category for finite verb forms
"first-conjugation",
"first-declension",
"first-person",
"focalising", # Verb form, e.g., ϯϩⲉ/Coptic
"form-i",
"form-ii",
"form-iii",
"form-iiiq",
"form-iiq",
"form-iq",
"form-iv",
"form-ivq",
"form-ix",
"form-of",
"form-v",
"form-vi",
"form-vii",
"form-viii",
"form-x",
"form-xi",
"form-xii",
"form-xiii",
"formal", # Formality/politeness degree of verbs etc
"four-corner",
"fourth-conjugation",
"fourth-declension",
"fourth-person",
"frequentative",
"front-vowel",
"fusioning", # Greenlandic suffixes
"future", # Verb tense
"future-i", # Verb tense (German, e.g., vertippen)
"future-ii", # Verb tense (German)
"gender-neutral",
"general", # In general temporal participle, e.g., talamaq/Azerbaijani
"genitive",
"gerund",
"goal", # Verb form, e.g., উঘাল/Assamese
"grade-1-kanji",
"grade-2-kanji",
"grade-3-kanji",
"grade-4-kanji",
"grade-5-kanji",
"grade-6-kanji",
"habitual", # Verb aspect
"hangeul",
"hanja", # Han character script (Chinese characters) to write Korean
"hard", # sladek/Slovene
"hellenism",
"hidden-n", # Mongolian declension
"hiragana", # Japanese syllabic spelling for native words
"historic", # Grammatical tense/mood for retelling past events
"historical", # Relating to history
"honorific", # Formality/politeness degree of verbs etc
"hortative", # Verb mood
"humble",
"humorous",
"hypernym",
"hypercorrect",
"hyponym",
"hypothetical", # Verb mood (e.g., Japanese)
"ideophonic",
"idiomatic",
"illative", # Case
"imperative",
"imperative-only",
"imperfect", # Past tense in various languages
"imperfective", # Verb aspect (action not completed)
"impersonal", # Verb form, e.g., Portuguese impersonal infinitive
"impolite", # Politeness degree of verbs etc
"in-certain-phrases",
"in-compounds",
"in-plural",
"in-indicative",
"in-conditional",
"in-variation", # E.g. crush,WiFi,lhama,tsunami/Portuguese,
"inalienable", # Inablienable possession: body parts etc; Choctaw, Ojibwe..
"inanimate",
"including",
"includes-article", # Word form includes article
"inclusive", # inclusive vs. exclusive first-person
"indeclinable",
"indefinite",
"independent", # Verb form, e.g., gikaa/Ojibwe
"indeterminate", # Polish verbs (similar to "abstract" in Russian)
"indicative",
"indirect", # Verb form, e.g., بونا/
"indirect-object",
"inessive", # Case
"inferential", # Verb form (w/ aorist), e.g. -ekalmak/Turkish
"infinitive", # Verb form
"infinitive-da", # Estonian
"infinitive-i", # Finnish
"infinitive-i-long", # Finnish
"infinitive-ii", # Finnish
"infinitive-iii", # Finnish
"infinitive-iv", # Finnish
"infinitive-ma", # Estonian
"infinitive-v", # Finnish
"infinitive-zu", # German
"infix",
"inflected", # Marks inflected form, constrast to uninflected (e.g., Dutch)
"inflected-like", # seleen/Limburgish
"informal", # Formality/politeness degree of verbs etc
"initialism",
"injunctive", # Verb form, e.g., पुस्नु/Nepali
"instructive",
"instrumental", # Case
"iterative",
"intensifier", # In participle of intensification, e.g., talamaq
"intentive", # Verb form, e.g., patjaṉi
"interfix-j", # Greenlandic: adds -j- after long vowel
"interjection",
"interrogative",
"intransitive",
"invariable",
"invertive", # Case? (e.g., Сотрэш/Adyghe)
"involuntary", # Verb form, e.g., khitan/Indonesian
"ionic", # XXX ???
"ironic",
"irrealis", # Verb form, e.g., たたかう/Japanese
"irregular", # Generally of written word forms
"irregular-pronunciation", # Kanji or similar pronunciation irregular
"italics", # Used in head form to indicate italic character variant
"jargon",
"jussive", # Verb mood for orders, commanding, exhorting (subjunctively)
"kanji", # Used in word head for some Japanese symbols
"katakana", # Japanese syllabic spelling for foreign words
"krama",
"krama-ngoko",
"kyūjitai", # Traditional Japanese Kanji (before 1947)
"lative", # Case, e.g., тіл/Khakas
"lenition",
"letter",
"letter-name",
"limitative", # Verb form, e.g., ϯϩⲉ/Coptic
"literally",
"literary",
"locative",
"long-form", # Verb forms, отъпоустити/Old Church Slavonic
"lowercase",
"mainly",
"majestic",
"masculine", # Grammatial gender see feminine, neuter, common, class-* etc.
"masculine-usually", # m/f, but usually masculine
"material",
"matronymic",
"medial",
"mediopassive",
"metaphoric",
"metonymically",
"metrically", # Used in Sanskrit word heads
"mi-form", # Malagasy verbs
"middle", # At least middle voice (cf. active, passive)
"middle-infinitive",
"mildly",
"misconstruction", # Used for e.g. incorrect Latin plurals
"misspelling",
"mixed",
"mixed-mutation",
"mixedcase",
"mnemonic",
"modal",
"modern",
"modified", # Noun form, e.g., dikko/Sidamo (similar to person?)
"monopersonal",
"morpheme",
"morse-code",
"mostly",
"motive-form", # Verb form for Korean (e.g., 조사하다)
"multiple-possession",
"mutated",
"mutation",
"name",
"narrowly",
"nasal-mutation",
"natural",
"necessitative", # Verb form in some languages
"negated-with", # Indicates how word is negated, e.g., ϣⲗⲏⲗ/Coptic
"negative", # Indicates negation of meaning (nominal or verbal)
"neologism",
"neuter", # Gender, cf. masculine, feminine, common, class-* etc.
"next", # Next value in sequence (number, letter, etc.)
"no-absolute", # No aboslute form; femri/Icelandic
"no-auxiliary", # No auxiliary needed for verb (?); lavarsi/Italian
"no-comparative", # The word has no comparative form
"no-construct-forms", # The word has no construct forms
"no-definite", # Danish "no definite forms"
"no-diminutive", # No diminutive form (goeste/West Flemish)
"no-feminine", # No feminine form (ácimo/Spanish)
"no-first-person-singular-past-historic", # Italian
"no-first-person-singular-present", # Spanish (only third person?)
"no-first-person-singular-preterite", # Spanish (only third person?)
"no-genitive", # The word has no genitive form
"no-imperfective", # No imperfective form (исходить/Russian)
"no-infinitive", # No infinitive form (måste/Swedish)
"no-nominative-plural", # The word has no nominative plural
"no-perfect", # The word has no perfect/perfective aspect/form
"no-plural", # The word has no plural form (= singular only)
"no-past-participle", # The word has no past participle
"no-present-participle", # The word has no present participle
"no-second-person-singular-imperative", # No imperative
"no-senses", # Added synthesized sense when no senses extracted
"no-simple-past", # No simple past form"
"no-singulative", # no singulative form
"no-superlative", # The word has no superlative form
"no-supine", # The word has no supine form
"no-third-person-singular-past-historic", # Italian
"no-third-person-singular-present", # mittagessen/German
"nominal",
"nominal-from-nominal", # Greenlandic: suffix derives nominal from nominal
"nominal-from-verb", # Greenlandic: suffix derives nominal from verb
"nominal-state",
"nominalization",
"nominative",
"nomino-accusative", # 𒀀𒄿𒅖/Hittite XXX same as nominate/accusative???
"non-aspectual", # E.g., भूलना/Hindi
"non-durative", # non-durative sentence, e.g., ϣⲗⲏⲗ/Coptic
"non-finite", # General category of non-finite verb forms
"non-numeral", # Assamese noun forms
"non-past", # Verb tense (e.g., Korean)
"non-scientific",
"non-subject", # ishno'/Chickasaw
"nonce-word",
"nondeferential",
"nonstandard",
"nonvirile",
"not-attributive",
"not-clause-initial",
"not-comparable",
"not-mutable",
"not-predicative",
"not-translated",
"noun",
"now",
"numeral", # Numeral part-of-speech; also Assamese noun forms
"numeral-tones",
"obligational", # Verb form (e.g., Azerbaijani)
"objective", # Case, used as an object
"oblique", # Apparently like case form (e.g., Hindi)
"obsolete",
"obviative", # Referent is not the most salient one, cf. proximal, distal
"offensive",
"often",
"one-termination",
"only",
"onomatopoeic",
"optative",
"ordinal",
"parasynonym",
"parenthetic",
"participle",
"particle",
"partitive", # Case
"passive",
"past",
"patronymic",
"paucal",
"pausal",
"pejorative",
"perfect", # Tense/verb form, e.g., in Finnish
"perfect-i", # E.g., talamaq/Azerbaijani
"perfect-ii", # E.g., talamaq/Azerbaijani
"perfective", # Verb aspect
"person",
"personal", # Verb form (e.g., Portuguese personal infinitive)
"phoneme",
"phrasal",
"phrase",
"physical",
"pin-pen-merger",
"place",
"pluperfect", # Tense/verb form
"pluperfect-i", # воштыны'/Udmurt
"pluperfect-ii",
"plural", # Number, cf. sigular, dual, trial
"plural-of", # Plural form of something
"plural-of-variety", # Plural indicating different kinds of things (Arabic)
"plural-only", # Word only manifested in plural in this sense
"plural-normally", # Usually plural, but singular may be possible
"poetic",
"polite", # Politeness degree of verbs etc
"polytonic",
"positive", # degree of comparison; opposite of negation for verb forms
"possessed", # Marks object that is possessed, cf. possessed
"possessive", # Possession (marks who possesses)
"possessive-sg", # Possessive with single object possessed
"possessive-pl", # Possessive with multiple objects possessed
"possibly",
"postpositional",
"potential", # Verb mood
"praenominal",
"precursive", # Verb form, e.g. ϯϩⲉ/Coptic
"predicative",
"prefix",
"preparative", # Verb form, e.g., ᠵᡠᠸᡝᡩᡝᠮᠪᡳ/Manchu
"prepositional",
"present",
"present-rare", # Present tense is rare
"presumptive", # Verb mood, e.g., गरजना/Hindi
"preterite", # Verb tense (action in the past, similar to simple past)
"preterite-present", # word where present&preterite forms look opposite
"preterite-i", # воштыны/Udmurt
"preterite-ii",
"pretonic", # Precedes stressed syllable
"previous", # Previous value in sequence (number, letter, etc.)
"proclitic",
"progressive", # Verb form, e.g., પચવું/Gurajati
"prohibitive", # Verb form (negative imperative), e.g., Old Armenian
"prolative",
"pronominal",
"pronominal-state",
"pronoun",
"pronoun-included",
"pronunciation-spelling",
"proper-noun",
"proscribed",
"prosecutive", # Case (move along a surface or way); Greenlandic -nnguaq
"prospective",
"prothesis",
"prototonic", # E.g., dofuissim/Old Irish
"proximal", # Demonstrative referent is far, cf. distal, obviative
"purposive", # Verb form, e.g., patjaṉi
"quadral",
"quantified", # bat/Jamaican Creole (head form)
"quotative", # Verb mood (marks quoted speech keeping orig person/tense)
"radical",
"radical+strokes",
"rare",
"realis", # Verb form, e.g., たたかう/Japanese
"reason", # Verb form, e.g., উঘাল/Assamese
"recently", # Used in Recently complete, e.g., {ligpit,magbukid}/Tagalog
"reciprocal", # Mutual action (board sense reflexive)
"reconstruction",
"reduced", # de/Central Franconian (XXX merge with e.g. clipping?)
"reduplication",
"reflexive",
"reflexive-of", # Reflexive form of something
"regional",
"relational",
"relative",
"renarrative", # Verb form (e.g. Bulgarian)
"replacive", # Greenlandic suffixes
"reported", # Verb forms for reported speech
"resultative", # partciple in Armenian (state resulting from action)
"retronym",
"revised", # Used in many Korean words, is this same as revised-jeon?
"revised-jeon",
"rhetoric",
"romanization",
"root",
"sarcastic",
"second-conjugation",
"second-declension",
"second-person",
"secular", # Contrast with Ecclesiastical, Tham, etc
"semelfactive",
"sentence-case", # дь/Yakut
"sentence-final", # Korean verb forms (broad category)
"sequence",
"sequential",
"seventh-conjugation",
"shinjitai", # Simplified Japanese Kanji (after 1947)
"short-form", # Verb forms, отъпоустити/Old Church Slavonic
"si-perfective",
"simple",
"simplified",
"simultaneous", # simultaneous converb, e.g. խածնել/Armenian
"single-possession",
"singular", # Number, cf. plural, dual, trial
"singular-only",
"singulative", # Individuation of a collective or mass noun, like number
"sixth-conjugation",
"slang",
"slur",
"sociative", # Case?, e.g., மரம்/Tamil
"soft", # najslajši/slovene
"soft-mutation", # At least Welsh
"sometimes",
"somewhat",
"special", # Adverbial verb form in Lithuanian
"specific", # In specific temporal participle, e.g., talamaq
"specifically",
"standalone", # Without a main word (e.g., pronoun/determiner senses)
"standard",
"stative",
"stem", # Stem rather than full forms
"stem-primary", # Primary stem, e.g., दुनु/Nepali
"stem-secondary", # Secondary stem, e.g., दुनु/Nepali
"stress-pattern-1",
"stress-pattern-2",
"stress-pattern-3",
"stress-pattern-3a",
"stress-pattern-3b",
"stress-pattern-4",
"stressed", # Marked/full form, cf. unstressed
"stressed-preposition",
"strict-sense",
"strokes",
"strong",
"subjective", # Case, used as a subject; subject form
"subjunctive",
"subjunctive-i",
"subjunctive-ii",
"sublative",
"subordinate-clause", # e.g., ϣⲗⲏⲗ/Coptic
"subordinating",
"subscript", # Variant of certain characters
"substantive",
"subsuntive", # Verbs in Guaraní
"suffix",
"superessive", # Case, e.g., Hungarian
"superlative",
"superscript", # Variant of certain characters
"supine",
"suppletive",
"surname",
"suru", # Japanese verb inflection type
"syllable-final",
"syllable-initial",
"symbol",
"syncope",
"synecdoche",
"synonym",
"synonym-of",
"taboo",
"tafa-form", # Malagasy verbs
"temporal", # Used in generic/specific temporal participle, e.g., talamaq
"term-of-address",
"terminative", # Verb mood (e.g., Japanese); also case in Quechua?
"thematic",
"third-conjugation",
"third-declension",
"third-person",
"three-termination",
"tone-1",
"tone-2",
"topicalized",
"toponymic",
"traditional",
"transcription",
"transgressive", # Verb form
"transitive",
"transitive-with-of",
"translation-hub", # Predictable compound term with translations, no gloss
"translative",
"translingual",
"transliteration",
"trial", # Number, cf. singular, dual, plural
"trigger-actor", # Actor trigger, e.g., magtinda/Tagalog
"trigger-benefactive", # Benefactive trigger
"trigger-causative", # Causative trigger
"trigger-instrument", # Instrument trigger
"trigger-locative", # Locative trigger
"trigger-measurement", # Measurement trigger, e.g., rumupok/Tagalog
"trigger-object", # Object trigger
"trigger-referential", # Referential trigger
"triggers-aspirate-mutation", # Welsh
"triggers-eclipsis", # Irish
"triggers-h-prothesis", # Irish
"triggers-lenition", # Irish
"triggers-mixed-mutation", # Welsh
"triggers-nasal-mutation", # Old Irish
"triggers-soft-mutation", # Welsh
"triptote", # Noun having three cases (e.g., Arabic)
"truncative", # Greenlandic: suffix attaches to last vowel, removing stuff
"two-termination",
"type-a",
"type-p",
"type-u",
"type-ua",
"type-up",
"unabbreviated",
"unaugmented",
"uncommon",
"uncountable",
"unemphatic",
"uninflected", # uninflected form (e.g., Dutch), cf. inflected
"universal", # universally known (καθεμία/Greek)
"unknown", # Apparently verb form, e.g., जाँच्नु/Nepali
"unmodified", # Noun form, e.g., dikko/Sidamo (similar to person?)
"unpossessed", # Not possessed (often omitted); cf. possessed
"unspecified", # Used in some conjugation/declension tables
"unstressed", # Unstressed (unmarked, weaker) form
"unstressed-before-j", # unstressed when next word starts with /j/
"uppercase",
"used-in-the-form",
"usually",
"utterance-medial",
"variant",
"vav-consecutive",
"vernacular",
"verb",
"verb-completement", # Used in some Chinese words (merged verb+complement?)
"verb-form-da", # Estonian da-form
"verb-form-des", # Estonian des-form
"verb-form-i",
"verb-form-ii",
"verb-from-nominal", # Forms verbs from nominals
"verb-object", # Used in some Chinese words (verb+object in same entry?)
"verb-from-verb", # Suffix modifies verbs producing verbs
"vigesimal",
"virile",
"visual-rendering",
"voa-form", # Malagasy verbs
"vocative", # Case? used for addressee
"volitive",
"volitional", # Verb mood (e.g., Japanese: suggests, urges, initates act)
"vulgar",
"weak",
"weak-verb",
"with-a",
"with-ablative",
"with-absolute",
"with-absolutive",
"with-accusative",
"with-action-noun-in-elative",
"with-adessive",
"with-adjective",
"with-adverb",
"with-allative",
"with-an",
"with-avec",
"with-ce",
"with-che",
"with-comparative",
"with-con",
"with-conditional",
"with-da",
"with-dative",
"with-de",
"with-definite-article",
"with-di",
"with-down",
"with-ela",
"with-elas",
"with-elative",
"with-ele",
"with-eles",
"with-ella",
"with-ellas",
"with-ellos",
"with-en",
"with-essive",
"with-eu",
"with-infinitive-i",
"with-future",
"with-for",
"with-gendered-noun",
"with-genitive",
"with-gij",
"with-hiri",
"with-hura",
"with-illative",
"with-imperfect",
"with-in",
"with-indicative",
"with-indirect-object",
"with-indirect-relative",
"with-inessive",
"with-infinitive",
"with-instrumental",
"with-it-dialectally",
"with-järgi",
"with-kala",
"with-kV", # gǀkxʻâã/ǃXóõ
"with-lai",
"with-locative",
"with-meel",
"with-negation",
"with-negative-adj",
"with-nominative",
"with-nos",
"with-nosotras",
"with-nosotros",
"with-noun",
"with-noun-phrase",
"with-number",
"with-objective",
"with-odd-syllable-stems",
"with-of",
"with-olemassa", # Finnish
"with-on",
"with-optative",
"with-others",
"with-partitive",
"with-passive-present-participle",
"with-passive-past-participle-partitive",
"with-passive-past-participle-translative",
"with-past",
"with-past-participle",
"with-past-participle-translative",
"with-past-participle-partitive",
"with-per",
"with-personal-pronoun",
"with-por",
"with-possessive-suffix",
"with-pour",
"with-prepositional",
"with-present",
"with-savrtsobi",
"with-simple",
"with-su",
"with-subjunctive",
"with-subordinate-clause",
"with-sur",
"with-dummy-subject",
"with-there",
"with-third-person",
"with-third-person-singular",
"with-infinitive-iii",
"with-infinitive-iii-abessive",
"with-infinitive-iii-elative",
"with-infinitive-iii-illative",
"with-to",
"with-translative",
"with-tu",
"with-tú",
"with-up",
"with-usted",
"with-ustedes",
"with-você",
"with-vocês",
"with-von",
"with-vos",
"with-voseo",
"with-vosotras",
"with-vosotros",
"with-välja",
"with-vós",
"with-yo",
"with-zuek",
"with-à",
"with-él",
"without-article", # E.g., grüun/Cimbrian
"without-noun",
"zhuyin",
"æ-tensing",
"има", # Distinguishes certain verb forms in Macedonian
])
for tag in form_of_tags - valid_tags:
print("tags.py:form_of_tags contains invalid tag {}"
.format(tag))
|
mins = []
maxes = []
letters = []
passwords = []
with open("day2_input", "r") as f:
for line in f:
first, second = line.split(':')
first = first.split('-')
mins.append(int(first[0]))
maxes.append(int(first[1].split(' ')[0]))
letters.append(first[1].split(' ')[1])
passwords.append(second.lstrip(' ').rstrip('\n'))
def valid(min_l, max_l, letter, password):
count = password.count(letter)
return (min_l <= count) and (count <= max_l)
def valid2(index1, index2, letter, password):
# print(index1, index2, letter, password)
return ((password[index1-1] == letter) and (password[index2-1] != letter)) or ((password[index1-1] != letter) and (password[index2-1] == letter))
# part 1
# total = 0
# for (mn, mx, l, p) in zip(mins, maxes, letters, passwords):
# if valid(mn, mx, l, p):
# total += 1
# print(total)
# part 2
total = 0
for (mn, mx, l, p) in zip(mins, maxes, letters, passwords):
# print(valid2(mn, mx, l, p), mn, mx, l, p)
if valid2(mn, mx, l, p):
total += 1
print(total)
|
#
# PySNMP MIB module PDN-UPLINK-TAGGING-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/PDN-UPLINK-TAGGING-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:39:49 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsUnion, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint")
pdn_common, = mibBuilder.importSymbols("PDN-HEADER-MIB", "pdn-common")
VlanId, = mibBuilder.importSymbols("Q-BRIDGE-MIB", "VlanId")
NotificationGroup, ModuleCompliance, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance", "ObjectGroup")
Counter64, Integer32, NotificationType, Unsigned32, Counter32, IpAddress, Bits, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, TimeTicks, iso, ObjectIdentity, Gauge32, ModuleIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "Integer32", "NotificationType", "Unsigned32", "Counter32", "IpAddress", "Bits", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "TimeTicks", "iso", "ObjectIdentity", "Gauge32", "ModuleIdentity")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
pdnUplinkTagging = ModuleIdentity((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 37))
pdnUplinkTagging.setRevisions(('2003-03-12 00:00', '2002-05-15 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: pdnUplinkTagging.setRevisionsDescriptions(("Deprecated the origional objects, ultBaseVlanTag and ultIndex. Added new objects as follows: 1. pdnUltIndex - This new object is basically an Unsigned32 that excludes '0'. It idea is that different implementations will support different maximum values of the index. As such, the syntax for this object will cover any implementation and actual implementation specific maximum values should be documented in something like the implementation's SNMP Op Spec. 2. pdnGenUltBaseVlanTag - This object allows a any base VLAN Tag to be defined. 3. pdn48UltBaseVlanTag - This object defines a set of enumerations for base VLAN Tags for chassis/units that contain 48 ports. 4. pdn24UltBaseVlanTag - This object defines a set of enumerations for base VLAN Tags for chassis/units that contain 24 ports.", 'Initial Release.',))
if mibBuilder.loadTexts: pdnUplinkTagging.setLastUpdated('200303120000Z')
if mibBuilder.loadTexts: pdnUplinkTagging.setOrganization('Paradyne Networks MIB Working Group Other information about group editing the MIB')
if mibBuilder.loadTexts: pdnUplinkTagging.setContactInfo('Paradyne Networks, Inc. 8545 126th Avenue North Largo, FL 33733 www.paradyne.com General Comments to: [email protected] Editors Clay Sikes')
if mibBuilder.loadTexts: pdnUplinkTagging.setDescription("This MIB contains objects that are used to configure Uplink Tagging (ULT). Uplink Tagging is a term used to describe a feature that simplifies the setup and administration of networks where a service provider wants to use a unique VLAN per subscriber port. Ingress frames will get tagged with a VLAN and these tagged frame will be transmitted on the uplink port towards the WAN. In cases where the hardware implementation permits, multiple units can be interconnected together to form a 'Uplink Tagging Domain (ULT Domain)'. A ULT domain is defined as the set of interconnected Paradyne DSLAMs that share a common block of VLAN IDs. The maximum number of Paradyne DSLAMs that can be interconnected is implementation dependent. Generally, all DSLAMs in a ULT Domain will be configured with the same block of VLAN IDs. Each chassis/unit will be assigned a unique ULT Index within the ULT Domain. There are two parts of configuring Uplink Tagging: 1. Uplink Base VLAN Tag - This object specifies the beginning VLAN ID for a particular common block of VLAN IDs. This object will be defined as an enumeration whose values will depend on the number of port in a chassis/unit. 2. Uplink Tag Index - This object specifies the index within some block of VLAN IDs. Generally, this index can thought of a chassis/unit number as can be seen with the examples below.")
pdnUplinkTaggingObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 37, 1))
pdnUplinkTaggingObjectsR2 = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 37, 3))
pdnUltIndex = MibScalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 37, 3, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295)).clone(1)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: pdnUltIndex.setStatus('current')
if mibBuilder.loadTexts: pdnUltIndex.setDescription("This object represents VLAN tag index which is an index into a block of VLAN Tags the unit will use. Generally, this can be also thought of as the chassis/unit number in the case where multiple units are interconnected and form a ULT Domain described above. It is strongly encouraged that the upper limit for a particular implementation be clearly documented in the product's SNMP Op Spec.")
pdnGenUltBaseVlanTag = MibScalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 37, 3, 2), VlanId().clone(16)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: pdnGenUltBaseVlanTag.setStatus('current')
if mibBuilder.loadTexts: pdnGenUltBaseVlanTag.setDescription("This object can be used to allow any Uplink Tagging Base Index to be entered when they don't like the 'canned' list defined in the objects below.")
pdn48UltBaseVlanTag = MibScalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 37, 3, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("ultBase16", 1), ("ultBase512", 2), ("ultBase1024", 3), ("ultBase1536", 4), ("ultBase2048", 5), ("ultBase2560", 6), ("ultBase3072", 7), ("ultBase3584", 8))).clone('ultBase16')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: pdn48UltBaseVlanTag.setStatus('current')
if mibBuilder.loadTexts: pdn48UltBaseVlanTag.setDescription('This object represents Uplink Tagging base index which is the starting VLAN ID for a particular common block of VLAN IDs for chassis/units that contain 48 DSL subscriber ports.')
pdn24UltBaseVlanTag = MibScalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 37, 3, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16))).clone(namedValues=NamedValues(("ultBase16", 1), ("ultBase256", 2), ("ultBase512", 3), ("ultBase768", 4), ("ultBase1024", 5), ("ultBase1280", 6), ("ultBase1536", 7), ("ultBase1792", 8), ("ultBase2048", 9), ("ultBase2304", 10), ("ultBase2560", 11), ("ultBase2816", 12), ("ultBase3072", 13), ("ultBase3328", 14), ("ultBase3584", 15), ("ultBase3840", 16))).clone('ultBase16')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: pdn24UltBaseVlanTag.setStatus('current')
if mibBuilder.loadTexts: pdn24UltBaseVlanTag.setDescription('This object represents Uplink Tagging base index which is the starting VLAN ID for a particular common block of VLAN IDs for chassis/units that contain 24 DSL subscriber ports.')
ultBaseVlanTag = MibScalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 37, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("ultBase16", 1), ("ultBase512", 2), ("ultBase1024", 3), ("ultBase1536", 4), ("ultBase2048", 5), ("ultBase2560", 6), ("ultBase3072", 7), ("ultBase3584", 8))).clone('ultBase16')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ultBaseVlanTag.setStatus('deprecated')
if mibBuilder.loadTexts: ultBaseVlanTag.setDescription('This object represents Uplink Tagging base index. This object has been deprecated. Please use an object defined in pdnUplinkTaggingObjectsR2.')
ultIndex = MibScalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 37, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 5)).clone(1)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ultIndex.setStatus('deprecated')
if mibBuilder.loadTexts: ultIndex.setDescription('This object represents VLAN tag index which represents an index into a block of VLAN Tags the unit will use. This object has been deprecated. Please use pdnUltIndex, which is more general below.')
pdnUplinkTaggingConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 37, 2))
pdnUplinkTaggingGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 37, 2, 1))
pdnUplinkTaggingCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 37, 2, 2))
pdnUplinkTaggingDeprecatedGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 37, 2, 3))
pdn48PortUpLinkTaggingGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 37, 2, 1, 1)).setObjects(("PDN-UPLINK-TAGGING-MIB", "pdnUltIndex"), ("PDN-UPLINK-TAGGING-MIB", "pdnGenUltBaseVlanTag"), ("PDN-UPLINK-TAGGING-MIB", "pdn48UltBaseVlanTag"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
pdn48PortUpLinkTaggingGroup = pdn48PortUpLinkTaggingGroup.setStatus('current')
if mibBuilder.loadTexts: pdn48PortUpLinkTaggingGroup.setDescription('Uplink Tagging Objects for 48-Port chassis/units.')
pdn24PortUpLinkTaggingGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 37, 2, 1, 2)).setObjects(("PDN-UPLINK-TAGGING-MIB", "pdnUltIndex"), ("PDN-UPLINK-TAGGING-MIB", "pdnGenUltBaseVlanTag"), ("PDN-UPLINK-TAGGING-MIB", "pdn24UltBaseVlanTag"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
pdn24PortUpLinkTaggingGroup = pdn24PortUpLinkTaggingGroup.setStatus('current')
if mibBuilder.loadTexts: pdn24PortUpLinkTaggingGroup.setDescription('Uplink Tagging Objects for 24-Port chassis/units.')
upLinkTaggingDeprecatedGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 37, 2, 3, 1)).setObjects(("PDN-UPLINK-TAGGING-MIB", "ultBaseVlanTag"), ("PDN-UPLINK-TAGGING-MIB", "ultIndex"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
upLinkTaggingDeprecatedGroup = upLinkTaggingDeprecatedGroup.setStatus('deprecated')
if mibBuilder.loadTexts: upLinkTaggingDeprecatedGroup.setDescription('Objects not to use.')
mibBuilder.exportSymbols("PDN-UPLINK-TAGGING-MIB", pdnUplinkTaggingObjectsR2=pdnUplinkTaggingObjectsR2, pdn24PortUpLinkTaggingGroup=pdn24PortUpLinkTaggingGroup, pdnGenUltBaseVlanTag=pdnGenUltBaseVlanTag, pdnUplinkTaggingCompliances=pdnUplinkTaggingCompliances, ultBaseVlanTag=ultBaseVlanTag, ultIndex=ultIndex, pdn48PortUpLinkTaggingGroup=pdn48PortUpLinkTaggingGroup, upLinkTaggingDeprecatedGroup=upLinkTaggingDeprecatedGroup, pdnUplinkTaggingConformance=pdnUplinkTaggingConformance, pdn48UltBaseVlanTag=pdn48UltBaseVlanTag, pdnUltIndex=pdnUltIndex, pdn24UltBaseVlanTag=pdn24UltBaseVlanTag, pdnUplinkTagging=pdnUplinkTagging, pdnUplinkTaggingObjects=pdnUplinkTaggingObjects, pdnUplinkTaggingDeprecatedGroup=pdnUplinkTaggingDeprecatedGroup, pdnUplinkTaggingGroups=pdnUplinkTaggingGroups, PYSNMP_MODULE_ID=pdnUplinkTagging)
|
class Chromosome:
def __init__(self, gene):
self.gene = gene
|
"""
对象 = 属性 + 方法
"""
class Turtle: # Python 中的类名约定以大写字母开头
"""关于类的一个简单例子"""
# 属性
color = 'green'
weight = 10
legs = 4
shell = True
mouth = '大嘴'
# 方法
def climb(self):
print('我正在很努力的向前爬....')
def run(self):
print('我正在快速的向前跑.....')
def bite(self):
print('咬你......')
def eat(self):
print('有的吃......')
def sleep(self):
print('困了,睡了......')
"""
tt = Turtle
print(tt)
tt1 = Turtle()
print(tt1)
tt.bite('')
"""
# 面向对象特性1:封装
print('------------------------------------------')
list1 = [2, 1, 7, 5, 3]
list1.sort()
print(list1)
list1.append(9)
print(list1)
print('------------------------------------------')
# 面向对象特性2:继承
# 子类自动共享父类之间数据和方法的机制
class MyList(list):
pass
list2 = MyList()
list2.append(5)
list2.append(3)
list2.append(7)
print(list2)
list2.sort()
print(list2)
print('------------------------------------------')
# 面向对象特性3:多态
class A:
def fun(self):
print('我是小A...')
class B:
def fun(self):
print('我是小B...')
a = A()
b = B()
a.fun()
b.fun()
print('------------------------------------------')
|
"""
Runtime: 800 ms, faster than 31.40% of Python3 online submissions for Two Sum.
Memory Usage: 14.9 MB, less than 11.62% of Python3 online submissions for Two Sum.
https://leetcode.com/problems/two-sum
"""
def twoSum(nums, target):
# nums is a list of given numbers
# target is our goal
for i in range(len(nums)):
cn = nums[i]
lf = target - cn
if lf in nums:
if nums.index(lf) != i:
return [i, nums.index(lf)]
print(twoSum([3, 2, 4], 6))
|
#
# PySNMP MIB module FDRY-RADIUS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/FDRY-RADIUS-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:59:41 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection")
fdryRadius, = mibBuilder.importSymbols("FOUNDRY-SN-ROOT-MIB", "fdryRadius")
InetAddressType, InetAddress = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddressType", "InetAddress")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
MibScalar, MibTable, MibTableRow, MibTableColumn, iso, ModuleIdentity, Integer32, TimeTicks, Unsigned32, Counter32, Counter64, NotificationType, MibIdentifier, Gauge32, Bits, ObjectIdentity, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "ModuleIdentity", "Integer32", "TimeTicks", "Unsigned32", "Counter32", "Counter64", "NotificationType", "MibIdentifier", "Gauge32", "Bits", "ObjectIdentity", "IpAddress")
TextualConvention, RowStatus, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "RowStatus", "DisplayString")
fdryRadiusMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 1991, 1, 1, 8, 1))
fdryRadiusMIB.setRevisions(('2010-06-02 00:00', '2008-02-25 00:00',))
if mibBuilder.loadTexts: fdryRadiusMIB.setLastUpdated('201006020000Z')
if mibBuilder.loadTexts: fdryRadiusMIB.setOrganization('Brocade Communications Systems, Inc.')
class ServerUsage(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))
namedValues = NamedValues(("default", 1), ("authenticationOnly", 2), ("authorizationOnly", 3), ("accountingOnly", 4))
fdryRadiusServer = MibIdentifier((1, 3, 6, 1, 4, 1, 1991, 1, 1, 8, 1, 1))
fdryRadiusServerTable = MibTable((1, 3, 6, 1, 4, 1, 1991, 1, 1, 8, 1, 1, 1), )
if mibBuilder.loadTexts: fdryRadiusServerTable.setStatus('current')
fdryRadiusServerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1991, 1, 1, 8, 1, 1, 1, 1), ).setIndexNames((0, "FDRY-RADIUS-MIB", "fdryRadiusServerIndex"))
if mibBuilder.loadTexts: fdryRadiusServerEntry.setStatus('current')
fdryRadiusServerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 8, 1, 1, 1, 1, 1), Unsigned32())
if mibBuilder.loadTexts: fdryRadiusServerIndex.setStatus('current')
fdryRadiusServerAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 8, 1, 1, 1, 1, 2), InetAddressType().clone('ipv4')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: fdryRadiusServerAddrType.setStatus('current')
fdryRadiusServerAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 8, 1, 1, 1, 1, 3), InetAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: fdryRadiusServerAddr.setStatus('current')
fdryRadiusServerAuthPort = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 8, 1, 1, 1, 1, 4), Unsigned32()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: fdryRadiusServerAuthPort.setStatus('current')
fdryRadiusServerAcctPort = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 8, 1, 1, 1, 1, 5), Unsigned32()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: fdryRadiusServerAcctPort.setStatus('current')
fdryRadiusServerRowKey = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 8, 1, 1, 1, 1, 6), DisplayString()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: fdryRadiusServerRowKey.setStatus('current')
fdryRadiusServerUsage = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 8, 1, 1, 1, 1, 7), ServerUsage().clone('default')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: fdryRadiusServerUsage.setStatus('current')
fdryRadiusServerRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 8, 1, 1, 1, 1, 8), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: fdryRadiusServerRowStatus.setStatus('current')
mibBuilder.exportSymbols("FDRY-RADIUS-MIB", fdryRadiusServerTable=fdryRadiusServerTable, fdryRadiusServerAddr=fdryRadiusServerAddr, PYSNMP_MODULE_ID=fdryRadiusMIB, ServerUsage=ServerUsage, fdryRadiusServerAddrType=fdryRadiusServerAddrType, fdryRadiusMIB=fdryRadiusMIB, fdryRadiusServerEntry=fdryRadiusServerEntry, fdryRadiusServerIndex=fdryRadiusServerIndex, fdryRadiusServer=fdryRadiusServer, fdryRadiusServerUsage=fdryRadiusServerUsage, fdryRadiusServerAcctPort=fdryRadiusServerAcctPort, fdryRadiusServerAuthPort=fdryRadiusServerAuthPort, fdryRadiusServerRowStatus=fdryRadiusServerRowStatus, fdryRadiusServerRowKey=fdryRadiusServerRowKey)
|
input = """
% Enforce that <MUST_BE_TRUE,a> is in the queue before <TRUE,a>
:- x.
:- y.
x :- not a.
a :- not y.
% A rule with w and y in the head, such that they are not optimised away.
w v y v z.
% If <MUST_BE_TRUE,a> is in the queue before <TRUE,a>, the undefPosBody counter
% in this constraint should be decremented exactly once.
% If it is decremented twice, a bogus inconsistency is detected.
:- a, w.
"""
output = """
{a, z}
"""
|
expected_output = {
"ap_name": {
"b25a-13-cap10": {
"ap_mac": "3c41.0fee.5094",
"site_tag_name": "default-site-tag-fabric",
"policy_tag_name": "PT_Fabri_B25_B25-1_fe778",
"rf_tag_name": "Standard",
"misconfigured": "No",
"tag_source": "Static",
},
"b25b-12-cap01": {
"ap_mac": "3c41.0fee.5884",
"site_tag_name": "default-site-tag-fabric",
"policy_tag_name": "PT_Fabri_B25_B25-1_fe778",
"rf_tag_name": "Standard",
"misconfigured": "No",
"tag_source": "Static",
},
"b25b-11-cap01": {
"ap_mac": "3c41.0fee.5d90",
"site_tag_name": "default-site-tag-fabric",
"policy_tag_name": "PT_Fabri_B25_B25-1_fe778",
"rf_tag_name": "Standard",
"misconfigured": "No",
"tag_source": "Static",
},
"b25a-12-cap07": {
"ap_mac": "3c41.0fee.5de8",
"site_tag_name": "default-site-tag-fabric",
"policy_tag_name": "PT_Fabri_B25_B25-1_fe778",
"rf_tag_name": "Standard",
"misconfigured": "No",
"tag_source": "Static",
},
"b25a-11-cap05": {
"ap_mac": "3c41.0fee.5df0",
"site_tag_name": "default-site-tag-fabric",
"policy_tag_name": "PT_Fabri_B25_B25-1_fe778",
"rf_tag_name": "Standard",
"misconfigured": "No",
"tag_source": "Static",
},
"b25a-11-cap04": {
"ap_mac": "3c41.0fee.5e5c",
"site_tag_name": "default-site-tag-fabric",
"policy_tag_name": "PT_Fabri_B25_B25-1_fe778",
"rf_tag_name": "Standard",
"misconfigured": "No",
"tag_source": "Static",
},
"b25a-12-cap08": {
"ap_mac": "3c41.0fee.5e74",
"site_tag_name": "default-site-tag-fabric",
"policy_tag_name": "PT_Fabri_B25_B25-1_fe778",
"rf_tag_name": "Standard",
"misconfigured": "No",
"tag_source": "Static",
},
"b25a-11-cap01": {
"ap_mac": "3c41.0fee.5eac",
"site_tag_name": "default-site-tag-fabric",
"policy_tag_name": "PT_Fabri_B25_B25-1_fe778",
"rf_tag_name": "Standard",
"misconfigured": "No",
"tag_source": "Static",
},
"b25a-11-cap08": {
"ap_mac": "3c41.0fee.5ef8",
"site_tag_name": "default-site-tag-fabric",
"policy_tag_name": "PT_Fabri_B25_B25-1_fe778",
"rf_tag_name": "Standard",
"misconfigured": "No",
"tag_source": "Static",
},
"b25a-11-cap02": {
"ap_mac": "3c41.0fee.5f94",
"site_tag_name": "default-site-tag-fabric",
"policy_tag_name": "PT_Fabri_B25_B25-1_fe778",
"rf_tag_name": "Standard",
"misconfigured": "No",
"tag_source": "Static",
},
"b25a-11-cap07": {
"ap_mac": "3c41.0fee.5fbc",
"site_tag_name": "default-site-tag-fabric",
"policy_tag_name": "PT_Fabri_B25_B25-1_fe778",
"rf_tag_name": "Standard",
"misconfigured": "No",
"tag_source": "Static",
},
"b25a-12-cap02": {
"ap_mac": "2c57.4518.16ac",
"site_tag_name": "default-site-tag-fabric",
"policy_tag_name": "PT_Fabri_B25_B25-1_fe778",
"rf_tag_name": "Standard",
"misconfigured": "No",
"tag_source": "Static",
},
"b25b-11-cap06": {
"ap_mac": "2c57.4518.2df0",
"site_tag_name": "default-site-tag-fabric",
"policy_tag_name": "PT_Fabri_B25_B25-1_fe778",
"rf_tag_name": "Standard",
"misconfigured": "No",
"tag_source": "Static",
},
"b25b-11-cap08": {
"ap_mac": "2c57.4518.41b0",
"site_tag_name": "default-site-tag-fabric",
"policy_tag_name": "PT_Fabri_B25_B25-1_fe778",
"rf_tag_name": "Standard",
"misconfigured": "No",
"tag_source": "Static",
},
"b25b-11-cap07": {
"ap_mac": "2c57.4518.432c",
"site_tag_name": "default-site-tag-fabric",
"policy_tag_name": "PT_Fabri_B25_B25-1_fe778",
"rf_tag_name": "Standard",
"misconfigured": "No",
"tag_source": "Static",
},
"b25a-12-cap11": {
"ap_mac": "2c57.4518.4330",
"site_tag_name": "default-site-tag-fabric",
"policy_tag_name": "PT_Fabri_B25_B25-1_fe778",
"rf_tag_name": "Standard",
"misconfigured": "No",
"tag_source": "Static",
},
"b25b-12-cap02": {
"ap_mac": "3c41.0fee.4394",
"site_tag_name": "default-site-tag-fabric",
"policy_tag_name": "PT_Fabri_B25_B25-1_fe778",
"rf_tag_name": "Standard",
"misconfigured": "No",
"tag_source": "Static",
},
"b25a-13-cap09": {
"ap_mac": "2c57.4518.564c",
"site_tag_name": "default-site-tag-fabric",
"policy_tag_name": "PT_Fabri_B25_B25-1_fe778",
"rf_tag_name": "Standard",
"misconfigured": "No",
"tag_source": "Static",
},
"b25b-12-cap03": {
"ap_mac": "2c57.4518.5b40",
"site_tag_name": "default-site-tag-fabric",
"policy_tag_name": "PT_Fabri_B25_B25-1_fe778",
"rf_tag_name": "Standard",
"misconfigured": "No",
"tag_source": "Static",
},
"b25a-12-cap10": {
"ap_mac": "2c57.4518.5b48",
"site_tag_name": "default-site-tag-fabric",
"policy_tag_name": "PT_Fabri_B25_B25-1_fe778",
"rf_tag_name": "Standard",
"misconfigured": "No",
"tag_source": "Static",
},
},
"number_of_aps": 20,
}
|
epoch = 100
train_result = "/home/yetaoyu/zc/Classification/patch_train_results"
train_dataset_dir = "/home/yetaoyu/zc/Classification/patch_data"
test_data_dir = "/home/yetaoyu/zc/Classification/patch_data"
test_result_dir = "/home/yetaoyu/zc/Classification/patch_test_results"
model_weight_path = "/home/yetaoyu/zc/Classification/patch_train_results" |
bunsyou = "I am a"
gengo = "cat"
if len(gengo) > 3:
print(gengo)
elif bunsyou[-1] == gengo[1]:
print(bunsyou)
else:
print(bunsyou + " " + gengo)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.