content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
# -*- coding: utf-8 -*-
n1 = int(input())
n2 = int(input())
x = n1 + n2
print("X =", x) | n1 = int(input())
n2 = int(input())
x = n1 + n2
print('X =', x) |
#!/usr/bin/env python
# coding: utf-8
# In[9]:
##############################################################################################################################
### Hassan Shahzad
### CS-D
### Artificial Intelligence Lab (Lab # 9)
### FAST-NUCES
### chhxnshah@gmail.com
##############################################################################################################################
################################################## GLOBAL DECLARATIONS ####################################################
VARIABLES = ["A", "B", "C", "D", "E", "F", "G"]
CONSTRAINTS = [
("A", "B"),
("A", "C"),
("B", "C"),
("B", "D"),
("B", "E"),
("C", "E"),
("C", "F"),
("D", "E"),
("E", "F"),
("E", "G"),
("F", "G")
]
DOMAIN_VALUES = ["Monday", "Tuesday", "Wednesday"]
######################################### BACK TRACK FUNCTION IMPLEMENTATION ##############################################
def backtrack(assignment):
if len(assignment) == len (VARIABLES): # Check if assignment is complete
return assignment
temp_var = select_unassigned_variable(assignment) # selecting a new un-assigned variable's index
for value in DOMAIN_VALUES: # Checking the array containing days
ass = assignment.copy()
ass[temp_var] = value
if consistent(ass): # Checking is assignment is consistent
result = backtrack(ass) # Resursive function
if result is not None:
return result
return None
############################################### Selects Unassigned Variable ###############################################
def select_unassigned_variable(assignment):
for i in VARIABLES:
if i not in assignment: # Checks and returns the variable not currently assigned
return i # Returns the index
return None
################################################### Consistent Function ###################################################
def consistent(assignment):
for (i,j) in CONSTRAINTS:
if i not in assignment or j not in assignment: # If the selected value hasn't been assigned yet
continue
if assignment[i] == assignment[j]: # Both having same value (Constraint failed)
return False
return True
################################################# MAIN Implementation #####################################################
# The main entry point for this module
def main():
solution = backtrack(dict())
print(solution)
# Tell python to run main method
if __name__ == "__main__": main()
# In[ ]:
| variables = ['A', 'B', 'C', 'D', 'E', 'F', 'G']
constraints = [('A', 'B'), ('A', 'C'), ('B', 'C'), ('B', 'D'), ('B', 'E'), ('C', 'E'), ('C', 'F'), ('D', 'E'), ('E', 'F'), ('E', 'G'), ('F', 'G')]
domain_values = ['Monday', 'Tuesday', 'Wednesday']
def backtrack(assignment):
if len(assignment) == len(VARIABLES):
return assignment
temp_var = select_unassigned_variable(assignment)
for value in DOMAIN_VALUES:
ass = assignment.copy()
ass[temp_var] = value
if consistent(ass):
result = backtrack(ass)
if result is not None:
return result
return None
def select_unassigned_variable(assignment):
for i in VARIABLES:
if i not in assignment:
return i
return None
def consistent(assignment):
for (i, j) in CONSTRAINTS:
if i not in assignment or j not in assignment:
continue
if assignment[i] == assignment[j]:
return False
return True
def main():
solution = backtrack(dict())
print(solution)
if __name__ == '__main__':
main() |
clearText = pow(0x025051c6c4e82266e0b9e8a47266531a01d484b0dc7ee629fb5a0588f15bf50281f46cf08be71e067ac7166580f144a6bdcc83a90206681c2409404e92474b37de67d92fd2fa4bc4bd119372b6d50c0377758fc8e946d203a040e04d6bfe41dfb898cd4e36e582f16ad475915ac2c6586d874dd397e7ed1cb2d3f2003586c257, 89508186630638564513494386415865407147609702392949250864642625401059935751367507, 2562256018798982275495595589518163432372017502243601864658538274705537914483947807120783733766118553254101235396521540936164219440561532997119915510314638089613615679231310858594698461124636943528101265406967445593951653796041336078776455339658353436309933716631455967769429086442266084993673779546522240901)
print(('0'+hex(clearText)[2:][:-1]).decode("hex"))
| clear_text = pow(1624768965978244122218384915440259949773623052619109265384960524204099241405509334298217012073574245240140975823312659160847045035132501536939096089619077929998251251236783590255562951129897302725067655285503493676186062693350470482247124598766533755027440418713398509566189239815613916662987881029294277207, 89508186630638564513494386415865407147609702392949250864642625401059935751367507, 2562256018798982275495595589518163432372017502243601864658538274705537914483947807120783733766118553254101235396521540936164219440561532997119915510314638089613615679231310858594698461124636943528101265406967445593951653796041336078776455339658353436309933716631455967769429086442266084993673779546522240901)
print(('0' + hex(clearText)[2:][:-1]).decode('hex')) |
# File: awswaf_consts.py
#
# Copyright (c) 2019-2021 Splunk Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
# either express or implied. See the License for the specific language governing permissions
# and limitations under the License.
AWSWAF_ACCESS_KEY = 'access_key_id'
AWSWAF_SECRET_KEY = 'access_key_secret'
AWSWAF_REGION = 'region'
AWSWAF_DEFAULT_LIMIT = 100
AWSWAF_INSUFFICIENT_PARAM = 'Insufficient parameters. Please provide either ip_set_name or ip_set_id'
AWSWAF_ERR_TOKEN = 'Error in connection while getting the token'
AWSWAF_ERR_CREATE_IPSET = 'Error in connection while creating a new IP set'
AWSWAF_INVALID_INPUT = 'The given input ip_set_id/ip_set_name is not valid'
AWSWAF_IMPROPER_FORMAT = 'Please enter IP in a proper format which includes the mask of the IP (e.g. 126.0.0.0/24)'
AWSWAF_INVALID_IP = 'Please provide a valid IPV4 or IPV6'
AWSWAF_INVALID_LIMIT = 'Please provide non-zero positive integer in limit'
AWSWAF_TEST_CONNECTIVITY_FAILED = 'Test Connectivity Failed'
AWSWAF_TEST_CONNECTIVITY_PASSED = 'Test Connectivity Passed'
AWSWAF_REGION_DICT = {
"US East (N. Virginia)": "us-east-1",
"US East (Ohio)": "us-east-2",
"US West (N. California)": "us-west-1",
"US West (Oregon)": "us-west-2",
"Asia Pacific (Mumbai)": "ap-south-1",
"Asia Pacific (Seoul)": "ap-northeast-2",
"Asia Pacific (Singapore)": "ap-southeast-1",
"Asia Pacific (Sydney)": "ap-southeast-2",
"Asia Pacific (Tokyo)": "ap-northeast-1",
"Canada (Central)": "ca-central-1",
"China (Beijing)": "cn-north-1",
"China (Ningxia)": "cn-northwest-1",
"EU (Frankfurt)": "eu-central-1",
"EU (Ireland)": "eu-west-1",
"EU (London)": "eu-west-2",
"EU (Paris)": " eu-west-3",
"EU (Stockholm)": "eu-north-1",
"South America (Sao Paulo)": "sa-east-1",
"AWS GovCloud (US-East)": "us-gov-east-1",
"AWS GovCloud (US)": "us-gov-west-1"
}
| awswaf_access_key = 'access_key_id'
awswaf_secret_key = 'access_key_secret'
awswaf_region = 'region'
awswaf_default_limit = 100
awswaf_insufficient_param = 'Insufficient parameters. Please provide either ip_set_name or ip_set_id'
awswaf_err_token = 'Error in connection while getting the token'
awswaf_err_create_ipset = 'Error in connection while creating a new IP set'
awswaf_invalid_input = 'The given input ip_set_id/ip_set_name is not valid'
awswaf_improper_format = 'Please enter IP in a proper format which includes the mask of the IP (e.g. 126.0.0.0/24)'
awswaf_invalid_ip = 'Please provide a valid IPV4 or IPV6'
awswaf_invalid_limit = 'Please provide non-zero positive integer in limit'
awswaf_test_connectivity_failed = 'Test Connectivity Failed'
awswaf_test_connectivity_passed = 'Test Connectivity Passed'
awswaf_region_dict = {'US East (N. Virginia)': 'us-east-1', 'US East (Ohio)': 'us-east-2', 'US West (N. California)': 'us-west-1', 'US West (Oregon)': 'us-west-2', 'Asia Pacific (Mumbai)': 'ap-south-1', 'Asia Pacific (Seoul)': 'ap-northeast-2', 'Asia Pacific (Singapore)': 'ap-southeast-1', 'Asia Pacific (Sydney)': 'ap-southeast-2', 'Asia Pacific (Tokyo)': 'ap-northeast-1', 'Canada (Central)': 'ca-central-1', 'China (Beijing)': 'cn-north-1', 'China (Ningxia)': 'cn-northwest-1', 'EU (Frankfurt)': 'eu-central-1', 'EU (Ireland)': 'eu-west-1', 'EU (London)': 'eu-west-2', 'EU (Paris)': '\teu-west-3', 'EU (Stockholm)': 'eu-north-1', 'South America (Sao Paulo)': 'sa-east-1', 'AWS GovCloud (US-East)': 'us-gov-east-1', 'AWS GovCloud (US)': 'us-gov-west-1'} |
# Copyright 2019 Axis Communications AB.
#
# For a full list of individual contributors, please see the commit history.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FOLLOW_MY_COMMIT = '''{
sourceChangeCreated(search: "{'data.gitIdentifier.commitId': 'c9ea15d2d0d3bcfa2856416be4add5a5919764f4'}") {
edges {
node {
reverse {
edges {
node {
... on SourceChangeSubmitted {
reverse {
edges {
node {
... on CompositionDefined {
reverse {
edges {
node {
... on ArtifactCreated {
reverse {
edges {
node {
__typename
... on ArtifactPublished {
data {
locations {
uri
type
}
}
}
... on ConfidenceLevelModified {
data {
name
value
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
'''
| follow_my_commit = '{\n sourceChangeCreated(search: "{\'data.gitIdentifier.commitId\': \'c9ea15d2d0d3bcfa2856416be4add5a5919764f4\'}") {\n edges {\n node {\n reverse {\n edges {\n node {\n ... on SourceChangeSubmitted {\n reverse {\n edges {\n node {\n ... on CompositionDefined {\n reverse {\n edges {\n node {\n ... on ArtifactCreated {\n reverse {\n edges {\n node {\n __typename\n ... on ArtifactPublished {\n data {\n locations {\n uri\n type\n }\n }\n }\n ... on ConfidenceLevelModified {\n data {\n name\n value\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n}\n' |
#Printing Stars in 'F' Shape !
'''
* * * * *
*
*
* * * *
*
*
*
'''
for row in range(7):
for col in range(5):
if (col==0)or((row==0) and (col>0) or (row==3)and(col>0 and col<4)):
print('*',end=' ')
else:
print(end=' ')
print() | """
* * * * *
*
*
* * * *
*
*
*
"""
for row in range(7):
for col in range(5):
if col == 0 or (row == 0 and col > 0 or (row == 3 and (col > 0 and col < 4))):
print('*', end=' ')
else:
print(end=' ')
print() |
print("hello")
print('hello')
welcome_message = "Hello, welcome to Udacity!"
print(welcome_message)
# pet_halibut = "Why should I be tarred with the epithet "loony" merely because I have a pet halibut?""
# SyntaxError: invalid syntax
pet_halibut = 'Why should I be tarred with the epithet "loony" merely because I have a pet halibut?'
salesman = '"I think you\'re an encyclopedia salesman"'
this_string = "Simon's skateboard is in the garage."
print(this_string)
# Combine strings with +
first_word = "Hello"
second_word = "There"
print(first_word + " " + second_word)
print(first_word[0])
print(first_word[1])
# Repeat strings with *
word = "Hello"
print(word * 5)
# Length function
udacity_length = len("Udacity")
print(udacity_length)
print(len("ababa") / len("ab"))
# QUIZ
# TODO: Fix this string!
# ford_quote = 'Whether you think you can, or you think you can't--you're right.'
ford_quote = 'Whether you think you can, or you think you can\'t--you\'re right.'
# TODO: print a log message using the variables above.
# The message should have the same format as this one:
# "Yogesh accessed the site http://petshop.com/pets/reptiles/pythons at 16:20."
username = "Kinari"
timestamp = "04:50"
url = "http://petshop.com/pets/mammals/cats"
message = username + " accessed the site " + url + " at " + timestamp + "."
print(message)
# Quiz len()
given_name = "William"
middle_names = "Bradley"
family_name = "Pitt"
#todo: calculate how long this name is
full_name = given_name + " " + middle_names + " " + family_name
name_length = len(full_name)
print (name_length)
# Now we check to make sure that the name fits within the driving license character limit
# Nothing you need to do here
driving_license_character_limit = 28
print(name_length <= driving_license_character_limit)
len(835)
| print('hello')
print('hello')
welcome_message = 'Hello, welcome to Udacity!'
print(welcome_message)
pet_halibut = 'Why should I be tarred with the epithet "loony" merely because I have a pet halibut?'
salesman = '"I think you\'re an encyclopedia salesman"'
this_string = "Simon's skateboard is in the garage."
print(this_string)
first_word = 'Hello'
second_word = 'There'
print(first_word + ' ' + second_word)
print(first_word[0])
print(first_word[1])
word = 'Hello'
print(word * 5)
udacity_length = len('Udacity')
print(udacity_length)
print(len('ababa') / len('ab'))
ford_quote = "Whether you think you can, or you think you can't--you're right."
username = 'Kinari'
timestamp = '04:50'
url = 'http://petshop.com/pets/mammals/cats'
message = username + ' accessed the site ' + url + ' at ' + timestamp + '.'
print(message)
given_name = 'William'
middle_names = 'Bradley'
family_name = 'Pitt'
full_name = given_name + ' ' + middle_names + ' ' + family_name
name_length = len(full_name)
print(name_length)
driving_license_character_limit = 28
print(name_length <= driving_license_character_limit)
len(835) |
# Hyperparameters to evaluate: For each, hyperparameter, provide a LIST of options to evaluate. A paramter grid will be generated so all combinations of these hyperparameters will be evaluated.
hyperparams = {"epochs": [200], \
"nonlinearity": ["relu"], \
"hidden_sizes_shared": [[500,100]], \
"hidden_sizes_separate": [[50,10]],\
"dropout": [.1],\
"k_reg": [.00001,.001],\
"learning_rate": [.0001,.001],\
"loss_weights": [[1, 1]],\
"grad_clip_norm": [.01,.1],\
"batch_size": [20]}
############################################ DATA ############################################
# Chooses which pre-processed data set is used. "origGE" refers to the data with no covariate correction for GE data
SPECIFIC_FOLDER = "origGE"
phenotypes = ["ABETA_IHC", "TAU_IHC","PLAQUES", "TANGLES","BRAAK", "CERAD"]
num_cats = {"CERAD": 4, "BRAAK": 6}
num_components = 500
full_dataset = "ACT_MSBBRNA_ROSMAP"
full_pca_dataset = "ACT_MSBBRNA_ROSMAP_PCA"
split_pca_dataset = "ACT_MSBBRNA_ROSMAP_PCASplit"
path_to_MDAD_data_folders = "../../DATA/MTL_data/"
#path_to_MDAD_data_folders = "../../DATA/MTL_data_rev/" # Revision experiments with new CV Splits
path_to_ext_val_data_folder = "../../DATA/External_Validation/"
path_to_geneset_data = "../../DATA/geneset_data/"
###################### RESULTS ##################################
# Paths for saving cross-validation models and results
CV_save_path = "../../Pipeline_Outputs_Submitted/%s/"%SPECIFIC_FOLDER
#CV_save_path = "../../Pipeline_Outputs_Submitted/%s_rev/"%SPECIFIC_FOLDER # Revision experiments with new CV Splits
path_to_final_chosen_models = CV_save_path + 'final_models_chosen/'
# path for final models and predictions
final_models_save_path = '../../Pipeline_Outputs_Submitted/final_model/%s/'%SPECIFIC_FOLDER
path_to_preds = "../../Pipeline_Outputs_Submitted/final_model/MDAD_predictions/"
# path for final embeddings
final_rep_embeddings_savepath = "../../Pipeline_Outputs_Submitted/model_transformations/"
final_rep_consensus_embeddings_savepath = "../../Pipeline_Outputs_Submitted/model_transformations_consensus/"
path_to_medoids_info = "../../Pipeline_Outputs_Submitted/model_transformations_consensus/1/normed_KMeans_medoids/MTL_50_medoids_info.csv"
# path for all external validaton results
path_to_ext_val_results = "../../Pipeline_Outputs_Submitted/External_Validation/"
# path for model interpretations
IG_save_path = "../../Pipeline_Outputs_Submitted/IG_weights/"
path_to_gene_rankings = "../../Pipeline_Outputs_Submitted/gene_rankings/"
| hyperparams = {'epochs': [200], 'nonlinearity': ['relu'], 'hidden_sizes_shared': [[500, 100]], 'hidden_sizes_separate': [[50, 10]], 'dropout': [0.1], 'k_reg': [1e-05, 0.001], 'learning_rate': [0.0001, 0.001], 'loss_weights': [[1, 1]], 'grad_clip_norm': [0.01, 0.1], 'batch_size': [20]}
specific_folder = 'origGE'
phenotypes = ['ABETA_IHC', 'TAU_IHC', 'PLAQUES', 'TANGLES', 'BRAAK', 'CERAD']
num_cats = {'CERAD': 4, 'BRAAK': 6}
num_components = 500
full_dataset = 'ACT_MSBBRNA_ROSMAP'
full_pca_dataset = 'ACT_MSBBRNA_ROSMAP_PCA'
split_pca_dataset = 'ACT_MSBBRNA_ROSMAP_PCASplit'
path_to_mdad_data_folders = '../../DATA/MTL_data/'
path_to_ext_val_data_folder = '../../DATA/External_Validation/'
path_to_geneset_data = '../../DATA/geneset_data/'
cv_save_path = '../../Pipeline_Outputs_Submitted/%s/' % SPECIFIC_FOLDER
path_to_final_chosen_models = CV_save_path + 'final_models_chosen/'
final_models_save_path = '../../Pipeline_Outputs_Submitted/final_model/%s/' % SPECIFIC_FOLDER
path_to_preds = '../../Pipeline_Outputs_Submitted/final_model/MDAD_predictions/'
final_rep_embeddings_savepath = '../../Pipeline_Outputs_Submitted/model_transformations/'
final_rep_consensus_embeddings_savepath = '../../Pipeline_Outputs_Submitted/model_transformations_consensus/'
path_to_medoids_info = '../../Pipeline_Outputs_Submitted/model_transformations_consensus/1/normed_KMeans_medoids/MTL_50_medoids_info.csv'
path_to_ext_val_results = '../../Pipeline_Outputs_Submitted/External_Validation/'
ig_save_path = '../../Pipeline_Outputs_Submitted/IG_weights/'
path_to_gene_rankings = '../../Pipeline_Outputs_Submitted/gene_rankings/' |
# http://ipset.netfilter.org/iptables-extensions.man.html#lbBK
class Mark(object):
def __init__(self, raw):
self.value = 0
self.mask = 0xFFFFFFFF
self.invert = False
fields = raw.split()
for i in range(len(fields)):
if fields[i] == "--mark":
if fields[i-1] == "!":
self.invert = True
if "/" in fields[i+1]:
self.value = int(fields[i+1].split("/")[0], 0)
self.mask = int(fields[i+1].split("/")[1], 0)
else:
self.value = int(fields[i+1], 0)
def match(self, packet, runner):
match = (packet.nfmark & self.mask) == self.value
if self.invert:
return not match
return match | class Mark(object):
def __init__(self, raw):
self.value = 0
self.mask = 4294967295
self.invert = False
fields = raw.split()
for i in range(len(fields)):
if fields[i] == '--mark':
if fields[i - 1] == '!':
self.invert = True
if '/' in fields[i + 1]:
self.value = int(fields[i + 1].split('/')[0], 0)
self.mask = int(fields[i + 1].split('/')[1], 0)
else:
self.value = int(fields[i + 1], 0)
def match(self, packet, runner):
match = packet.nfmark & self.mask == self.value
if self.invert:
return not match
return match |
{
"targets": [
{
"includes": [
"auto.gypi"
],
"sources": [
"src/run.cpp"
],
"link_settings":{
"ldflags": [
"-L<(module_root_dir)/src/target/release -lbinarytrees",
"-Wl,-rpath=<(module_root_dir)/src/target/release"
]
}
}
],
"includes": [
"auto-top.gypi"
]
}
| {'targets': [{'includes': ['auto.gypi'], 'sources': ['src/run.cpp'], 'link_settings': {'ldflags': ['-L<(module_root_dir)/src/target/release -lbinarytrees', '-Wl,-rpath=<(module_root_dir)/src/target/release']}}], 'includes': ['auto-top.gypi']} |
for i in range(1,101):
print(i,end="")
divisores=[]
if i % 2 == 0:
divisores.append(2)
if i % 3 == 0:
divisores.append(3)
if i % 5 == 0:
divisores.append(5)
if len(divisores) == 0 :
divisores = ""
else :
divisores=" "+str(tuple(divisores)).replace(",)",")")
print(divisores)
| for i in range(1, 101):
print(i, end='')
divisores = []
if i % 2 == 0:
divisores.append(2)
if i % 3 == 0:
divisores.append(3)
if i % 5 == 0:
divisores.append(5)
if len(divisores) == 0:
divisores = ''
else:
divisores = ' ' + str(tuple(divisores)).replace(',)', ')')
print(divisores) |
#
# @lc app=leetcode id=1239 lang=python3
#
# [1239] Maximum Length of a Concatenated String with Unique Characters
#
# @lc code=start
class Solution:
def maxLength(self, arr: List[str]) -> int:
filtered = [set(str) for str in arr if len(str) == len(set(str))]
found = [set()]
for s1 in filtered:
for s2 in found:
if not (s1 & s2):
found.append(s1 | s2)
return max([len(i) for i in found])
# @lc code=end
| class Solution:
def max_length(self, arr: List[str]) -> int:
filtered = [set(str) for str in arr if len(str) == len(set(str))]
found = [set()]
for s1 in filtered:
for s2 in found:
if not s1 & s2:
found.append(s1 | s2)
return max([len(i) for i in found]) |
class Rat:
def __init__(self, game):
self.game = game
self.attack = 1
game.rat_enters.append(self.rat_enters)
game.notify_rat.append(self.notify_rat)
game.rat_dies.append(self.rat_dies)
self.game.rat_enters(self)
def __enter__(self):
return self
def __exit__(self, exc_type, exc_val, exc_tb):
self.game.rat_dies(self)
def rat_enters(self, which_rat):
if which_rat != self:
self.attack += 1
self.game.notify_rat(which_rat)
def notify_rat(self, which_rat):
if which_rat == self:
self.attack += 1
def rat_dies(self, which_rat):
self.attack -= 1
| class Rat:
def __init__(self, game):
self.game = game
self.attack = 1
game.rat_enters.append(self.rat_enters)
game.notify_rat.append(self.notify_rat)
game.rat_dies.append(self.rat_dies)
self.game.rat_enters(self)
def __enter__(self):
return self
def __exit__(self, exc_type, exc_val, exc_tb):
self.game.rat_dies(self)
def rat_enters(self, which_rat):
if which_rat != self:
self.attack += 1
self.game.notify_rat(which_rat)
def notify_rat(self, which_rat):
if which_rat == self:
self.attack += 1
def rat_dies(self, which_rat):
self.attack -= 1 |
INDEX_INFO = {
"robust04": {
"description": "TREC Disks 4 & 5 (minus Congressional Records), used in the TREC 2004 Robust Track",
"urls": [
"https://www.dropbox.com/s/s91388puqbxh176/index-robust04-20191213.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/anserini-indexes/raw/master/index-robust04-20191213.tar.gz"
],
"md5": "15f3d001489c97849a010b0a4734d018",
"size compressed (bytes)": 1821814915,
"total_terms": 174540872,
"documents": 528030,
"unique_terms": 923436,
},
"msmarco-passage": {
"description": "MS MARCO passage corpus",
"urls": [
"https://www.dropbox.com/s/tiptih5qcjy4sp8/index-msmarco-passage-20201117-f87c94.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/anserini-indexes/raw/master/index-msmarco-passage-20201117-f87c94.tar.gz"
],
"md5": "1efad4f1ae6a77e235042eff4be1612d",
"size compressed (bytes)": 2218470796,
"total_terms": 352316036,
"documents": 8841823,
"unique_terms": 2660824,
"downloaded": False
},
"msmarco-passage-slim": {
"description": "MS MARCO passage corpus (slim version, no documents)",
"urls": [
"https://www.dropbox.com/s/3hsc8ul9zv1txhr/index-msmarco-passage-slim-20201202-ab6e28.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/anserini-indexes/raw/master/index-msmarco-passage-slim-20201202-ab6e28.tar.gz"
],
"md5": "5e11da4cebd2e8dda2e73c589ffb0b4c",
"size compressed (bytes)": 513566686,
"total_terms": 352316036,
"documents": 8841823,
"unique_terms": 2660824,
"downloaded": False
},
"msmarco-passage-expanded": {
"description": "MS MARCO passage corpus (+ docTTTTTquery expansion)",
"urls": [
"https://www.dropbox.com/s/rxa52pvqox8ow3o/index-msmarco-passage-expanded-20201121-e127fb.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/anserini-indexes/raw/master/index-msmarco-passage-expanded-20201121-e127fb.tar.gz"
],
"md5": "e5762e9e065b6fe5000f9c18da778565",
"size compressed (bytes)": 816438546,
"total_terms": 1986612263,
"documents": 8841823,
"unique_terms": 3929111,
"downloaded": False
},
"msmarco-doc": {
"description": "MS MARCO document corpus",
"urls": [
"https://www.dropbox.com/s/uwzc3rlkccpt6eb/index-msmarco-doc-20201117-f87c94.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/anserini-indexes/raw/master/index-msmarco-doc-20201117-f87c94.tar.gz"
],
"md5": "ac747860e7a37aed37cc30ed3990f273",
"size compressed (bytes)": 13642330935,
"total_terms": 2748636047,
"documents": 3213835,
"unique_terms": 29823078,
"downloaded": False
},
"msmarco-doc-slim": {
"description": "MS MARCO document corpus (slim version, no documents)",
"urls": [
"https://www.dropbox.com/s/v40ajir6v398iek/index-msmarco-doc-slim-20201202-ab6e28.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/anserini-indexes/raw/master/index-msmarco-doc-slim-20201202-ab6e28.tar.gz"
],
"md5": "c56e752f7992bf6149761097641d515a",
"size compressed (bytes)": 1874471867,
"total_terms": 2748636047,
"documents": 3213835,
"unique_terms": 29823078,
"downloaded": False
},
"msmarco-doc-per-passage": {
"description": "MS MARCO document corpus, segmented into passages",
"urls": [
"https://www.dropbox.com/s/69ieyumdx3rb3tu/index-msmarco-doc-per-passage-20201204-f50dcc.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/anserini-indexes/raw/master/index-msmarco-doc-per-passage-20201204-f50dcc.tar.gz"
],
"md5": "797367406a7542b649cefa6b41cf4c33",
"size compressed (bytes)": 11602951258,
"total_terms": 3197886407,
"documents": 20544550,
"unique_terms": 21173582,
"downloaded": False
},
"msmarco-doc-per-passage-slim": {
"description": "MS MARCO document corpus, segmented into passages (slim version, no documents)",
"urls": [
"https://www.dropbox.com/s/uic4ijgv2u3xcat/index-msmarco-doc-per-passage-slim-20201204-f50dcc.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/anserini-indexes/raw/master/index-msmarco-doc-per-passage-slim-20201204-f50dcc.tar.gz"
],
"md5": "77c2409943a8c9faffabf57cb6adca69",
"size compressed (bytes)": 2834865200,
"total_terms": 3197886407,
"documents": 20544550,
"unique_terms": 21173582,
"downloaded": False
},
"msmarco-doc-expanded-per-doc": {
"description": "MS MARCO document corpus, with per-doc docTTTTTquery expansion",
"urls": [
"https://www.dropbox.com/s/u4yagsgf3lo3gk4/index-msmarco-doc-expanded-per-doc-20201126-1b4d0a.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/anserini-indexes/raw/master/index-msmarco-doc-expanded-per-doc-20201126-1b4d0a.tar.gz"
],
"md5": "f7056191842ab77a01829cff68004782",
"size compressed (bytes)": 1978837253,
"total_terms": 3748333319,
"documents": 3213835,
"unique_terms": 30627687,
"downloaded": False
},
"msmarco-doc-expanded-per-passage": {
"description": "MS MARCO document corpus, with per-passage docTTTTTquery expansion",
"urls": [
"https://www.dropbox.com/s/t3z7p5o6kfe931s/index-msmarco-doc-expanded-per-passage-20201126-1b4d0a.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/anserini-indexes/raw/master/index-msmarco-doc-expanded-per-passage-20201126-1b4d0a.tar.gz"
],
"md5": "54ea30c64515edf3c3741291b785be53",
"size compressed (bytes)": 3069280946,
"total_terms": 4203956960,
"documents": 20544550,
"unique_terms": 22037213,
"downloaded": False
},
"enwiki-paragraphs": {
"description": "English Wikipedia",
"urls": [
"https://www.dropbox.com/s/b7qqaos9ot3atlp/lucene-index.enwiki-20180701-paragraphs.tar.gz?dl=1"
],
"md5": "77d1cd530579905dad2ee3c2bda1b73d",
"size compressed (bytes)": 17725958785,
"total_terms": 1498980668,
"documents": 39880064,
"unique_terms": -1,
"downloaded": False
},
"zhwiki-paragraphs": {
"description": "Chinese Wikipedia",
"urls": [
"https://www.dropbox.com/s/6zn16mombt0wirs/lucene-index.zhwiki-20181201-paragraphs.tar.gz?dl=1"
],
"md5": "c005af4036296972831288c894918a92",
"size compressed (bytes)": 3284531213,
"total_terms": 320776789,
"documents": 4170312,
"unique_terms": -1,
"downloaded": False
},
"trec-covid-r5-abstract": {
"description": "TREC-COVID Round 5: abstract index",
"urls": [
"https://www.dropbox.com/s/9hfowxi7zenuaay/lucene-index-cord19-abstract-2020-07-16.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-07-16/lucene-index-cord19-abstract-2020-07-16.tar.gz"
],
"md5": "c883571ccc78b4c2ce05b41eb07f5405",
"size compressed (bytes)": 2796524,
"total_terms": 22100404,
"documents": 192459,
"unique_terms": 195875,
"downloaded": False
},
"trec-covid-r5-full-text": {
"description": "TREC-COVID Round 5: full-text index",
"urls": [
"https://www.dropbox.com/s/dyd9sggrqo44d0n/lucene-index-cord19-full-text-2020-07-16.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-07-16/lucene-index-cord19-full-text-2020-07-16.tar.gz"
],
"md5": "23cfad89b4c206d66125f5736f60248f",
"size compressed (bytes)": 5351744,
"total_terms": 275238847,
"documents": 192460,
"unique_terms": 1843368,
"downloaded": False
},
"trec-covid-r5-paragraph": {
"description": "TREC-COVID Round 5: paragraph index",
"urls": [
"https://www.dropbox.com/s/jdfbrnohtkrvds5/lucene-index-cord19-paragraph-2020-07-16.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-07-16/lucene-index-cord19-paragraph-2020-07-16.tar.gz"
],
"md5": "c2c6ac832f8a1fcb767d2356d2b1e1df",
"size compressed (bytes)": 11352968,
"total_terms": 627083574,
"documents": 3010497,
"unique_terms": 1843368,
"downloaded": False
},
"trec-covid-r4-abstract": {
"description": "TREC-COVID Round 4: abstract index",
"urls": [
"https://www.dropbox.com/s/x8wbuy0atgnajfd/lucene-index-cord19-abstract-2020-06-19.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-06-19/lucene-index-cord19-abstract-2020-06-19.tar.gz"
],
"md5": "029bd55daba8800fbae2be9e5fcd7b33",
"size compressed (bytes)": 2584264,
"total_terms": 18724353,
"documents": 158226,
"unique_terms": 179937,
"downloaded": False
},
"trec-covid-r4-full-text": {
"description": "TREC-COVID Round 4: full-text index",
"urls": [
"https://www.dropbox.com/s/tf469r70r8aigu2/lucene-index-cord19-full-text-2020-06-19.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-06-19/lucene-index-cord19-full-text-2020-06-19.tar.gz"
],
"md5": "3d0eb12094a24cff9bcacd1f17c3ea1c",
"size compressed (bytes)": 4983900,
"total_terms": 254810123,
"documents": 158227,
"unique_terms": 1783089,
"downloaded": False
},
"trec-covid-r4-paragraph": {
"description": "TREC-COVID Round 4: paragraph index",
"urls": [
"https://www.dropbox.com/s/fr3v69vhryevwp9/lucene-index-cord19-paragraph-2020-06-19.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-06-19/lucene-index-cord19-paragraph-2020-06-19.tar.gz"
],
"md5": "5cd8cd6998177bed7a3e0057ef8b3595",
"size compressed (bytes)": 10382704,
"total_terms": 567579834,
"documents": 2781172,
"unique_terms": 1783089,
"downloaded": False
},
"trec-covid-r3-abstract": {
"description": "TREC-COVID Round 3: abstract index",
"urls": [
"https://www.dropbox.com/s/7bbz6pm4rduqvx3/lucene-index-cord19-abstract-2020-05-19.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-05-19/lucene-index-cord19-abstract-2020-05-19.tar.gz"
],
"md5": "37bb97d0c41d650ba8e135fd75ae8fd8",
"size compressed (bytes)": 2190328,
"total_terms": 16278419,
"documents": 128465,
"unique_terms": 168291,
"downloaded": False
},
"trec-covid-r3-full-text": {
"description": "TREC-COVID Round 3: full-text index",
"urls": [
"https://www.dropbox.com/s/bxhldgks1rxz4ly/lucene-index-cord19-full-text-2020-05-19.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-05-19/lucene-index-cord19-full-text-2020-05-19.tar.gz"
],
"md5": "f5711915a66cd2b511e0fb8d03e4c325",
"size compressed (bytes)": 4233300,
"total_terms": 215806519,
"documents": 128465,
"unique_terms": 1620335,
"downloaded": False
},
"trec-covid-r3-paragraph": {
"description": "TREC-COVID Round 3: paragraph index",
"urls": [
"https://www.dropbox.com/s/2ewjchln0ihm6hh/lucene-index-cord19-paragraph-2020-05-19.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-05-19/lucene-index-cord19-paragraph-2020-05-19.tar.gz"
],
"md5": "012ab1f804382b2275c433a74d7d31f2",
"size compressed (bytes)": 9053524,
"total_terms": 485309568,
"documents": 2297201,
"unique_terms": 1620335,
"downloaded": False
},
"trec-covid-r2-abstract": {
"description": "TREC-COVID Round 2: abstract index",
"urls": [
"https://www.dropbox.com/s/jdsc6wu0vbumpup/lucene-index-cord19-abstract-2020-05-01.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-05-01/lucene-index-cord19-abstract-2020-05-01.tar.gz"
],
"md5": "a06e71a98a68d31148cb0e97e70a2ee1",
"size compressed (bytes)": 1575804,
"total_terms": 7651125,
"documents": 59873,
"unique_terms": 109750,
"downloaded": False
},
"trec-covid-r2-full-text": {
"description": "TREC-COVID Round 2: full-text index",
"urls": [
"https://www.dropbox.com/s/ouvp7zyqsp9y9gh/lucene-index-cord19-full-text-2020-05-01.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-05-01/lucene-index-cord19-full-text-2020-05-01.tar.gz"
],
"md5": "e7eca1b976cdf2cd80e908c9ac2263cb",
"size compressed (bytes)": 3088540,
"total_terms": 154736295,
"documents": 59876,
"unique_terms": 1214374,
"downloaded": False
},
"trec-covid-r2-paragraph": {
"description": "TREC-COVID Round 2: paragraph index",
"urls": [
"https://www.dropbox.com/s/e1118vjuf58ojt4/lucene-index-cord19-paragraph-2020-05-01.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-05-01/lucene-index-cord19-paragraph-2020-05-01.tar.gz"
],
"md5": "8f9321757a03985ac1c1952b2fff2c7d",
"size compressed (bytes)": 6881696,
"total_terms": 360119048,
"documents": 1758168,
"unique_terms": 1214374,
"downloaded": False
},
"trec-covid-r1-abstract": {
"description": "TREC-COVID Round 1: abstract index",
"urls": [
"https://www.dropbox.com/s/iebape2yfgkzkt1/lucene-index-covid-2020-04-10.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-04-10/lucene-index-covid-2020-04-10.tar.gz"
],
"md5": "ec239d56498c0e7b74e3b41e1ce5d42a",
"size compressed (bytes)": 1621440,
"total_terms": 6672525,
"documents": 51069,
"unique_terms": 104595,
"downloaded": False
},
"trec-covid-r1-full-text": {
"description": "TREC-COVID Round 1: full-text index",
"urls": [
"https://www.dropbox.com/s/pfouskfoxb471e6/lucene-index-covid-full-text-2020-04-10.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-04-10/lucene-index-covid-full-text-2020-04-10.tar.gz"
],
"md5": "401a6f5583b0f05340c73fbbeb3279c8",
"size compressed (bytes)": 4471820,
"total_terms": 315624154,
"documents": 51071,
"unique_terms": 1812522,
"downloaded": False
},
"trec-covid-r1-paragraph": {
"description": "TREC-COVID Round 1: paragraph index",
"urls": [
"https://www.dropbox.com/s/yr0bj5pxu2k89n0/lucene-index-covid-paragraph-2020-04-10.tar.gz?dl=1",
"https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-04-10/lucene-index-covid-paragraph-2020-04-10.tar.gz"
],
"md5": "8b87a2c55bc0a15b87f11e796860216a",
"size compressed (bytes)": 5994192,
"total_terms": 330715243,
"documents": 1412648,
"unique_terms": 944574,
"downloaded": False
},
"cast2019": {
"description": "TREC 2019 CaST",
"urls": [
"https://www.dropbox.com/s/ba89k4xyn0srbk0/index-cast2019.tar.gz?dl=1",
],
"md5": "36e604d7f5a4e08ade54e446be2f6345",
"size compressed (bytes)": 21266884884,
"total_terms": 1593628213,
"documents": 38429835,
"unique_terms": -1,
"downloaded": False
},
"msmarco-passage-tct_colbert-hnsw": {
"description": "MS MARCO passage corpus encoded by TCT-ColBERT and indexed as HNSW index",
"urls": [
"https://www.dropbox.com/s/dsmtv6asjpd9lkc/dindex-hnsw-msmarco-passage-20210112-be7119.tar.gz?dl=1",
],
"md5": "732773b80dae174b3d372a56b6a55a0d",
"size compressed (bytes)": 33359123138,
"total_terms": 352316036,
"documents": 8841823,
"unique_terms": 2660824,
"downloaded": False
},
"msmarco-passage-tct_colbert-bf": {
"description": "MS MARCO passage corpus encoded by TCT-ColBERT and indexed as brute force index",
"urls": [
"https://www.dropbox.com/s/uwwo2xigvhx3bz7/dindex-faissbf-msmarco-passage-20210112-be7119.tar.gz?dl=1",
],
"md5": "ca89a411b111d46b7a579f200d3ac1f5",
"size compressed (bytes)": 25204501665,
"total_terms": 352316036,
"documents": 8841823,
"unique_terms": 2660824,
"downloaded": False
},
"wikipedia-dpr-hnsw": {
"description": "Wikipedia corpus encoded by DPR and indexed as brute force index",
"urls": [
"https://www.dropbox.com/s/ctos2lvmkof7l0g/dindex-hnsw-wikipedia-20200115-cd5034.tar.gz?dl=1",
],
"md5": "b91a50493233593a3ce872b71ca37574",
"size compressed (bytes)": 77724801312,
"documents": 21015320,
"downloaded": False
},
"wikipedia-dpr-bf": {
"description": "Wikipedia corpus encoded by DPR and indexed as brute force index",
"urls": [
"https://www.dropbox.com/s/coat4uu7tdz3wu9/dindex-faissbf-wikipedia-20200115-cd5034.tar.gz?dl=1",
],
"md5": "dd3c29e426d33b49d2b86eb573915783",
"size compressed (bytes)": 59836863765,
"documents": 21015320,
"downloaded": False
},
"wikipedia-dpr": {
"description": "Wikipedia (DPR 100 word splits) Anserini index",
"urls": [
"https://www.dropbox.com/s/spohu55l6608ho2/index-wikipedia-dpr-20210120-d1b9e6.tar.gz?dl=1",
],
"md5": "c28f3a56b2dfcef25bf3bf755c264d04",
"size compressed (bytes)": 9177942656,
"total_terms": 1512973270,
"documents": 21015324,
"unique_terms": 5345463,
"downloaded": False
},
"wikipedia-dpr-slim": {
"description": "Wikipedia (DPR 100 word splits) Anserini index, without raw texts stored",
"urls": [
"https://www.dropbox.com/s/r2xpo3e0pecibir/index-wikipedia-dpr-slim-20210120-d1b9e6.tar.gz?dl=1",
],
"md5": "7d40604a824b5df37a1ae9d25ea38071",
"size compressed (bytes)": 1810342390,
"total_terms": 1512973270,
"documents": 21015324,
"unique_terms": 5345463,
"downloaded": False
},
"msmarco-doc-tct_colbert-bf": {
"description": "MS MARCO document corpus encoded by TCT-ColBERT and indexed as brute force index",
"urls": [
"https://www.dropbox.com/s/tsf0oudr98bb0tq/msmarco-doc-tct_colbert-bf.tar.gz?dl=1",
],
"md5": "cb85d46e8a9205829ada11f6534c12b2",
"size compressed (bytes)": 58514326130,
"documents": 20544550,
"downloaded": False
},
}
| index_info = {'robust04': {'description': 'TREC Disks 4 & 5 (minus Congressional Records), used in the TREC 2004 Robust Track', 'urls': ['https://www.dropbox.com/s/s91388puqbxh176/index-robust04-20191213.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/anserini-indexes/raw/master/index-robust04-20191213.tar.gz'], 'md5': '15f3d001489c97849a010b0a4734d018', 'size compressed (bytes)': 1821814915, 'total_terms': 174540872, 'documents': 528030, 'unique_terms': 923436}, 'msmarco-passage': {'description': 'MS MARCO passage corpus', 'urls': ['https://www.dropbox.com/s/tiptih5qcjy4sp8/index-msmarco-passage-20201117-f87c94.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/anserini-indexes/raw/master/index-msmarco-passage-20201117-f87c94.tar.gz'], 'md5': '1efad4f1ae6a77e235042eff4be1612d', 'size compressed (bytes)': 2218470796, 'total_terms': 352316036, 'documents': 8841823, 'unique_terms': 2660824, 'downloaded': False}, 'msmarco-passage-slim': {'description': 'MS MARCO passage corpus (slim version, no documents)', 'urls': ['https://www.dropbox.com/s/3hsc8ul9zv1txhr/index-msmarco-passage-slim-20201202-ab6e28.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/anserini-indexes/raw/master/index-msmarco-passage-slim-20201202-ab6e28.tar.gz'], 'md5': '5e11da4cebd2e8dda2e73c589ffb0b4c', 'size compressed (bytes)': 513566686, 'total_terms': 352316036, 'documents': 8841823, 'unique_terms': 2660824, 'downloaded': False}, 'msmarco-passage-expanded': {'description': 'MS MARCO passage corpus (+ docTTTTTquery expansion)', 'urls': ['https://www.dropbox.com/s/rxa52pvqox8ow3o/index-msmarco-passage-expanded-20201121-e127fb.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/anserini-indexes/raw/master/index-msmarco-passage-expanded-20201121-e127fb.tar.gz'], 'md5': 'e5762e9e065b6fe5000f9c18da778565', 'size compressed (bytes)': 816438546, 'total_terms': 1986612263, 'documents': 8841823, 'unique_terms': 3929111, 'downloaded': False}, 'msmarco-doc': {'description': 'MS MARCO document corpus', 'urls': ['https://www.dropbox.com/s/uwzc3rlkccpt6eb/index-msmarco-doc-20201117-f87c94.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/anserini-indexes/raw/master/index-msmarco-doc-20201117-f87c94.tar.gz'], 'md5': 'ac747860e7a37aed37cc30ed3990f273', 'size compressed (bytes)': 13642330935, 'total_terms': 2748636047, 'documents': 3213835, 'unique_terms': 29823078, 'downloaded': False}, 'msmarco-doc-slim': {'description': 'MS MARCO document corpus (slim version, no documents)', 'urls': ['https://www.dropbox.com/s/v40ajir6v398iek/index-msmarco-doc-slim-20201202-ab6e28.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/anserini-indexes/raw/master/index-msmarco-doc-slim-20201202-ab6e28.tar.gz'], 'md5': 'c56e752f7992bf6149761097641d515a', 'size compressed (bytes)': 1874471867, 'total_terms': 2748636047, 'documents': 3213835, 'unique_terms': 29823078, 'downloaded': False}, 'msmarco-doc-per-passage': {'description': 'MS MARCO document corpus, segmented into passages', 'urls': ['https://www.dropbox.com/s/69ieyumdx3rb3tu/index-msmarco-doc-per-passage-20201204-f50dcc.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/anserini-indexes/raw/master/index-msmarco-doc-per-passage-20201204-f50dcc.tar.gz'], 'md5': '797367406a7542b649cefa6b41cf4c33', 'size compressed (bytes)': 11602951258, 'total_terms': 3197886407, 'documents': 20544550, 'unique_terms': 21173582, 'downloaded': False}, 'msmarco-doc-per-passage-slim': {'description': 'MS MARCO document corpus, segmented into passages (slim version, no documents)', 'urls': ['https://www.dropbox.com/s/uic4ijgv2u3xcat/index-msmarco-doc-per-passage-slim-20201204-f50dcc.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/anserini-indexes/raw/master/index-msmarco-doc-per-passage-slim-20201204-f50dcc.tar.gz'], 'md5': '77c2409943a8c9faffabf57cb6adca69', 'size compressed (bytes)': 2834865200, 'total_terms': 3197886407, 'documents': 20544550, 'unique_terms': 21173582, 'downloaded': False}, 'msmarco-doc-expanded-per-doc': {'description': 'MS MARCO document corpus, with per-doc docTTTTTquery expansion', 'urls': ['https://www.dropbox.com/s/u4yagsgf3lo3gk4/index-msmarco-doc-expanded-per-doc-20201126-1b4d0a.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/anserini-indexes/raw/master/index-msmarco-doc-expanded-per-doc-20201126-1b4d0a.tar.gz'], 'md5': 'f7056191842ab77a01829cff68004782', 'size compressed (bytes)': 1978837253, 'total_terms': 3748333319, 'documents': 3213835, 'unique_terms': 30627687, 'downloaded': False}, 'msmarco-doc-expanded-per-passage': {'description': 'MS MARCO document corpus, with per-passage docTTTTTquery expansion', 'urls': ['https://www.dropbox.com/s/t3z7p5o6kfe931s/index-msmarco-doc-expanded-per-passage-20201126-1b4d0a.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/anserini-indexes/raw/master/index-msmarco-doc-expanded-per-passage-20201126-1b4d0a.tar.gz'], 'md5': '54ea30c64515edf3c3741291b785be53', 'size compressed (bytes)': 3069280946, 'total_terms': 4203956960, 'documents': 20544550, 'unique_terms': 22037213, 'downloaded': False}, 'enwiki-paragraphs': {'description': 'English Wikipedia', 'urls': ['https://www.dropbox.com/s/b7qqaos9ot3atlp/lucene-index.enwiki-20180701-paragraphs.tar.gz?dl=1'], 'md5': '77d1cd530579905dad2ee3c2bda1b73d', 'size compressed (bytes)': 17725958785, 'total_terms': 1498980668, 'documents': 39880064, 'unique_terms': -1, 'downloaded': False}, 'zhwiki-paragraphs': {'description': 'Chinese Wikipedia', 'urls': ['https://www.dropbox.com/s/6zn16mombt0wirs/lucene-index.zhwiki-20181201-paragraphs.tar.gz?dl=1'], 'md5': 'c005af4036296972831288c894918a92', 'size compressed (bytes)': 3284531213, 'total_terms': 320776789, 'documents': 4170312, 'unique_terms': -1, 'downloaded': False}, 'trec-covid-r5-abstract': {'description': 'TREC-COVID Round 5: abstract index', 'urls': ['https://www.dropbox.com/s/9hfowxi7zenuaay/lucene-index-cord19-abstract-2020-07-16.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-07-16/lucene-index-cord19-abstract-2020-07-16.tar.gz'], 'md5': 'c883571ccc78b4c2ce05b41eb07f5405', 'size compressed (bytes)': 2796524, 'total_terms': 22100404, 'documents': 192459, 'unique_terms': 195875, 'downloaded': False}, 'trec-covid-r5-full-text': {'description': 'TREC-COVID Round 5: full-text index', 'urls': ['https://www.dropbox.com/s/dyd9sggrqo44d0n/lucene-index-cord19-full-text-2020-07-16.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-07-16/lucene-index-cord19-full-text-2020-07-16.tar.gz'], 'md5': '23cfad89b4c206d66125f5736f60248f', 'size compressed (bytes)': 5351744, 'total_terms': 275238847, 'documents': 192460, 'unique_terms': 1843368, 'downloaded': False}, 'trec-covid-r5-paragraph': {'description': 'TREC-COVID Round 5: paragraph index', 'urls': ['https://www.dropbox.com/s/jdfbrnohtkrvds5/lucene-index-cord19-paragraph-2020-07-16.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-07-16/lucene-index-cord19-paragraph-2020-07-16.tar.gz'], 'md5': 'c2c6ac832f8a1fcb767d2356d2b1e1df', 'size compressed (bytes)': 11352968, 'total_terms': 627083574, 'documents': 3010497, 'unique_terms': 1843368, 'downloaded': False}, 'trec-covid-r4-abstract': {'description': 'TREC-COVID Round 4: abstract index', 'urls': ['https://www.dropbox.com/s/x8wbuy0atgnajfd/lucene-index-cord19-abstract-2020-06-19.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-06-19/lucene-index-cord19-abstract-2020-06-19.tar.gz'], 'md5': '029bd55daba8800fbae2be9e5fcd7b33', 'size compressed (bytes)': 2584264, 'total_terms': 18724353, 'documents': 158226, 'unique_terms': 179937, 'downloaded': False}, 'trec-covid-r4-full-text': {'description': 'TREC-COVID Round 4: full-text index', 'urls': ['https://www.dropbox.com/s/tf469r70r8aigu2/lucene-index-cord19-full-text-2020-06-19.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-06-19/lucene-index-cord19-full-text-2020-06-19.tar.gz'], 'md5': '3d0eb12094a24cff9bcacd1f17c3ea1c', 'size compressed (bytes)': 4983900, 'total_terms': 254810123, 'documents': 158227, 'unique_terms': 1783089, 'downloaded': False}, 'trec-covid-r4-paragraph': {'description': 'TREC-COVID Round 4: paragraph index', 'urls': ['https://www.dropbox.com/s/fr3v69vhryevwp9/lucene-index-cord19-paragraph-2020-06-19.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-06-19/lucene-index-cord19-paragraph-2020-06-19.tar.gz'], 'md5': '5cd8cd6998177bed7a3e0057ef8b3595', 'size compressed (bytes)': 10382704, 'total_terms': 567579834, 'documents': 2781172, 'unique_terms': 1783089, 'downloaded': False}, 'trec-covid-r3-abstract': {'description': 'TREC-COVID Round 3: abstract index', 'urls': ['https://www.dropbox.com/s/7bbz6pm4rduqvx3/lucene-index-cord19-abstract-2020-05-19.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-05-19/lucene-index-cord19-abstract-2020-05-19.tar.gz'], 'md5': '37bb97d0c41d650ba8e135fd75ae8fd8', 'size compressed (bytes)': 2190328, 'total_terms': 16278419, 'documents': 128465, 'unique_terms': 168291, 'downloaded': False}, 'trec-covid-r3-full-text': {'description': 'TREC-COVID Round 3: full-text index', 'urls': ['https://www.dropbox.com/s/bxhldgks1rxz4ly/lucene-index-cord19-full-text-2020-05-19.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-05-19/lucene-index-cord19-full-text-2020-05-19.tar.gz'], 'md5': 'f5711915a66cd2b511e0fb8d03e4c325', 'size compressed (bytes)': 4233300, 'total_terms': 215806519, 'documents': 128465, 'unique_terms': 1620335, 'downloaded': False}, 'trec-covid-r3-paragraph': {'description': 'TREC-COVID Round 3: paragraph index', 'urls': ['https://www.dropbox.com/s/2ewjchln0ihm6hh/lucene-index-cord19-paragraph-2020-05-19.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-05-19/lucene-index-cord19-paragraph-2020-05-19.tar.gz'], 'md5': '012ab1f804382b2275c433a74d7d31f2', 'size compressed (bytes)': 9053524, 'total_terms': 485309568, 'documents': 2297201, 'unique_terms': 1620335, 'downloaded': False}, 'trec-covid-r2-abstract': {'description': 'TREC-COVID Round 2: abstract index', 'urls': ['https://www.dropbox.com/s/jdsc6wu0vbumpup/lucene-index-cord19-abstract-2020-05-01.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-05-01/lucene-index-cord19-abstract-2020-05-01.tar.gz'], 'md5': 'a06e71a98a68d31148cb0e97e70a2ee1', 'size compressed (bytes)': 1575804, 'total_terms': 7651125, 'documents': 59873, 'unique_terms': 109750, 'downloaded': False}, 'trec-covid-r2-full-text': {'description': 'TREC-COVID Round 2: full-text index', 'urls': ['https://www.dropbox.com/s/ouvp7zyqsp9y9gh/lucene-index-cord19-full-text-2020-05-01.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-05-01/lucene-index-cord19-full-text-2020-05-01.tar.gz'], 'md5': 'e7eca1b976cdf2cd80e908c9ac2263cb', 'size compressed (bytes)': 3088540, 'total_terms': 154736295, 'documents': 59876, 'unique_terms': 1214374, 'downloaded': False}, 'trec-covid-r2-paragraph': {'description': 'TREC-COVID Round 2: paragraph index', 'urls': ['https://www.dropbox.com/s/e1118vjuf58ojt4/lucene-index-cord19-paragraph-2020-05-01.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-05-01/lucene-index-cord19-paragraph-2020-05-01.tar.gz'], 'md5': '8f9321757a03985ac1c1952b2fff2c7d', 'size compressed (bytes)': 6881696, 'total_terms': 360119048, 'documents': 1758168, 'unique_terms': 1214374, 'downloaded': False}, 'trec-covid-r1-abstract': {'description': 'TREC-COVID Round 1: abstract index', 'urls': ['https://www.dropbox.com/s/iebape2yfgkzkt1/lucene-index-covid-2020-04-10.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-04-10/lucene-index-covid-2020-04-10.tar.gz'], 'md5': 'ec239d56498c0e7b74e3b41e1ce5d42a', 'size compressed (bytes)': 1621440, 'total_terms': 6672525, 'documents': 51069, 'unique_terms': 104595, 'downloaded': False}, 'trec-covid-r1-full-text': {'description': 'TREC-COVID Round 1: full-text index', 'urls': ['https://www.dropbox.com/s/pfouskfoxb471e6/lucene-index-covid-full-text-2020-04-10.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-04-10/lucene-index-covid-full-text-2020-04-10.tar.gz'], 'md5': '401a6f5583b0f05340c73fbbeb3279c8', 'size compressed (bytes)': 4471820, 'total_terms': 315624154, 'documents': 51071, 'unique_terms': 1812522, 'downloaded': False}, 'trec-covid-r1-paragraph': {'description': 'TREC-COVID Round 1: paragraph index', 'urls': ['https://www.dropbox.com/s/yr0bj5pxu2k89n0/lucene-index-covid-paragraph-2020-04-10.tar.gz?dl=1', 'https://git.uwaterloo.ca/jimmylin/cord19-indexes/-/raw/master/2020-04-10/lucene-index-covid-paragraph-2020-04-10.tar.gz'], 'md5': '8b87a2c55bc0a15b87f11e796860216a', 'size compressed (bytes)': 5994192, 'total_terms': 330715243, 'documents': 1412648, 'unique_terms': 944574, 'downloaded': False}, 'cast2019': {'description': 'TREC 2019 CaST', 'urls': ['https://www.dropbox.com/s/ba89k4xyn0srbk0/index-cast2019.tar.gz?dl=1'], 'md5': '36e604d7f5a4e08ade54e446be2f6345', 'size compressed (bytes)': 21266884884, 'total_terms': 1593628213, 'documents': 38429835, 'unique_terms': -1, 'downloaded': False}, 'msmarco-passage-tct_colbert-hnsw': {'description': 'MS MARCO passage corpus encoded by TCT-ColBERT and indexed as HNSW index', 'urls': ['https://www.dropbox.com/s/dsmtv6asjpd9lkc/dindex-hnsw-msmarco-passage-20210112-be7119.tar.gz?dl=1'], 'md5': '732773b80dae174b3d372a56b6a55a0d', 'size compressed (bytes)': 33359123138, 'total_terms': 352316036, 'documents': 8841823, 'unique_terms': 2660824, 'downloaded': False}, 'msmarco-passage-tct_colbert-bf': {'description': 'MS MARCO passage corpus encoded by TCT-ColBERT and indexed as brute force index', 'urls': ['https://www.dropbox.com/s/uwwo2xigvhx3bz7/dindex-faissbf-msmarco-passage-20210112-be7119.tar.gz?dl=1'], 'md5': 'ca89a411b111d46b7a579f200d3ac1f5', 'size compressed (bytes)': 25204501665, 'total_terms': 352316036, 'documents': 8841823, 'unique_terms': 2660824, 'downloaded': False}, 'wikipedia-dpr-hnsw': {'description': 'Wikipedia corpus encoded by DPR and indexed as brute force index', 'urls': ['https://www.dropbox.com/s/ctos2lvmkof7l0g/dindex-hnsw-wikipedia-20200115-cd5034.tar.gz?dl=1'], 'md5': 'b91a50493233593a3ce872b71ca37574', 'size compressed (bytes)': 77724801312, 'documents': 21015320, 'downloaded': False}, 'wikipedia-dpr-bf': {'description': 'Wikipedia corpus encoded by DPR and indexed as brute force index', 'urls': ['https://www.dropbox.com/s/coat4uu7tdz3wu9/dindex-faissbf-wikipedia-20200115-cd5034.tar.gz?dl=1'], 'md5': 'dd3c29e426d33b49d2b86eb573915783', 'size compressed (bytes)': 59836863765, 'documents': 21015320, 'downloaded': False}, 'wikipedia-dpr': {'description': 'Wikipedia (DPR 100 word splits) Anserini index', 'urls': ['https://www.dropbox.com/s/spohu55l6608ho2/index-wikipedia-dpr-20210120-d1b9e6.tar.gz?dl=1'], 'md5': 'c28f3a56b2dfcef25bf3bf755c264d04', 'size compressed (bytes)': 9177942656, 'total_terms': 1512973270, 'documents': 21015324, 'unique_terms': 5345463, 'downloaded': False}, 'wikipedia-dpr-slim': {'description': 'Wikipedia (DPR 100 word splits) Anserini index, without raw texts stored', 'urls': ['https://www.dropbox.com/s/r2xpo3e0pecibir/index-wikipedia-dpr-slim-20210120-d1b9e6.tar.gz?dl=1'], 'md5': '7d40604a824b5df37a1ae9d25ea38071', 'size compressed (bytes)': 1810342390, 'total_terms': 1512973270, 'documents': 21015324, 'unique_terms': 5345463, 'downloaded': False}, 'msmarco-doc-tct_colbert-bf': {'description': 'MS MARCO document corpus encoded by TCT-ColBERT and indexed as brute force index', 'urls': ['https://www.dropbox.com/s/tsf0oudr98bb0tq/msmarco-doc-tct_colbert-bf.tar.gz?dl=1'], 'md5': 'cb85d46e8a9205829ada11f6534c12b2', 'size compressed (bytes)': 58514326130, 'documents': 20544550, 'downloaded': False}} |
def compress(image, b):
'''
Function to compress images
Parameters:
image, a 3d array representation of the image
like the one returned by plt.imread(image)
b, the number of bits used in each entry in the array
integer from 1 to 8
1 = maximum compression
8 = no compression
Returns:
compressed_image, an image with the same size as image but
with fewer bits used to represent each entry
Example:
compress(image, 5)
'''
pass | def compress(image, b):
"""
Function to compress images
Parameters:
image, a 3d array representation of the image
like the one returned by plt.imread(image)
b, the number of bits used in each entry in the array
integer from 1 to 8
1 = maximum compression
8 = no compression
Returns:
compressed_image, an image with the same size as image but
with fewer bits used to represent each entry
Example:
compress(image, 5)
"""
pass |
#OOPR-Assgn-5
#Start writing your code here
def check_type(type):
vehicle_type=['Two Wheeler', 'Four Wheeler']
if type not in vehicle_type:
return 0
return 1
class Vehicle:
def __init__(self):
self.__vehicle_cost=None
self.__vehicle_id=None
self.__vehicle_type=None
self.__premium_amount=None
def set_vehicle_id(self,vehicle_id):
self.__vehicle_id=vehicle_id
def set_vehicle_type(self,vehicle_type):
if check_type(vehicle_type):
self.__vehicle_type=vehicle_type
else:
return "invalid Vehicle DETAILS"
def set_vehicle_cost(self,vehicle_cost):
self.__vehicle_cost=vehicle_cost
def get_vehicle_id(self):
return self.__vehicle_id
def get_vehicle_type(self):
return self.__vehicle_type
def get_vehicle_cost(self):
return self.__vehicle_cost
def set_premium_amount(self,premium_amount):
self.__premium_amount=premium_amount
def get_premium_amount(self):
return self.__premium_amount
def calculate_premium(self):
if self.__vehicle_type=="Two Wheeler":
self.__premium_amount=self.__vehicle_cost*2/100
elif self.__vehicle_type=="Four Wheeler":
self.__premium_amount=self.__vehicle_cost*6/100
else:
print("Invalid Vehicle Type")
def display_vehicle_details(self):
print(self.__premium_amount)
v1 = Vehicle()
#v1.set_vehicle_id=10
v1.set_vehicle_type("Two Wheeler")
v1.set_vehicle_cost(105000)
v1.calculate_premium()
v1.display_vehicle_details()
| def check_type(type):
vehicle_type = ['Two Wheeler', 'Four Wheeler']
if type not in vehicle_type:
return 0
return 1
class Vehicle:
def __init__(self):
self.__vehicle_cost = None
self.__vehicle_id = None
self.__vehicle_type = None
self.__premium_amount = None
def set_vehicle_id(self, vehicle_id):
self.__vehicle_id = vehicle_id
def set_vehicle_type(self, vehicle_type):
if check_type(vehicle_type):
self.__vehicle_type = vehicle_type
else:
return 'invalid Vehicle DETAILS'
def set_vehicle_cost(self, vehicle_cost):
self.__vehicle_cost = vehicle_cost
def get_vehicle_id(self):
return self.__vehicle_id
def get_vehicle_type(self):
return self.__vehicle_type
def get_vehicle_cost(self):
return self.__vehicle_cost
def set_premium_amount(self, premium_amount):
self.__premium_amount = premium_amount
def get_premium_amount(self):
return self.__premium_amount
def calculate_premium(self):
if self.__vehicle_type == 'Two Wheeler':
self.__premium_amount = self.__vehicle_cost * 2 / 100
elif self.__vehicle_type == 'Four Wheeler':
self.__premium_amount = self.__vehicle_cost * 6 / 100
else:
print('Invalid Vehicle Type')
def display_vehicle_details(self):
print(self.__premium_amount)
v1 = vehicle()
v1.set_vehicle_type('Two Wheeler')
v1.set_vehicle_cost(105000)
v1.calculate_premium()
v1.display_vehicle_details() |
friction = 0.02 # higher value = points slow down faster after force is applied
gravity = 0.05 # constant downard force on all points
bounce = 0.5 # multiple of inverse force applied to point when out of bounds
rigidity = 5 # accuracy; elasticity
class Rag:
def __init__(self, rag):
self.points = [p + p for p in rag["points"]]# [x, y, old-x, old-y]
self.statics = [s for s in rag["statics"]] # references to points that don't move
self.sticks = [s for s in rag["sticks"]] # references to two points that are connected
# calculate and append stick lengths
for s in self.sticks:
p0 = self.points[s[0]]
p1 = self.points[s[1]]
dx = p1[0] - p0[0]
dy = p1[1] - p0[1]
distance = (dx * dx + dy * dy)**0.5
s.append(distance)
def move_dynamic_points(self):
for i, p in enumerate(self.points):
if i not in self.statics:
vx = (p[0] - p[2]) * max(((1 - friction), 0))
vy = (p[1] - p[3]) * max(((1 - friction), 0))
p[2] = p[0]
p[3] = p[1]
p[0] += vx
p[1] += vy
p[1] += gravity
# move static point and all connected static points
def move_static_point(self, index, pos, exception=None):
for s in self.sticks:
p0 = self.points[s[0]]
p1 = self.points[s[1]]
if index == s[0] and s[1] in self.statics and exception != s[1]:
self.move_static_point(s[1], (p1[0] + (pos[0] - p0[0]), p1[1] + (pos[1] - p0[1])), exception=s[0])
elif index == s[1] and s[0] in self.statics and exception != s[0]:
self.move_static_point(s[0], (p0[0] + (pos[0] - p1[0]), p0[1] + (pos[1] - p1[1])), exception=s[1])
self.points[index] = [pos[0], pos[1]] * 2
def constrain_points(self, bounds):
width, height = bounds[0], bounds[1]
for i, p in enumerate(self.points):
if i not in self.statics:
vx = (p[0] - p[2]) * max(((1 - friction), 0))
vy = (p[1] - p[3]) * max(((1 - friction), 0))
# if point is too far right
if p[0] > width:
p[0] = width
p[2] = p[0] + vx * bounce
# if point is too far left
if p[0] < 0:
p[0] = 0
p[2] = p[0] + vx * bounce
# if point is too low
if p[1] > height:
p[1] = height
p[3] = p[1] + vy * bounce
# if point is too high
if p[1] < 0:
p[1] = 0
p[3] = p[1] + vy * bounce
def update_sticks(self):
for s in self.sticks:
p0 = self.points[s[0]]
p1 = self.points[s[1]]
length = s[2]
dx = p1[0] - p0[0]
dy = p1[1] - p0[1]
distance = (dx * dx + dy * dy)**0.5
difference = length - distance
try:
percent = difference/distance/2
except:
percent = 0 # prevent division by zero error
offsetX = dx * percent
offsetY = dy * percent
if s[0] not in self.statics:
p0[0] -= offsetX
p0[1] -= offsetY
if s[1] not in self.statics:
p1[0] += offsetX
p1[1] += offsetY
| friction = 0.02
gravity = 0.05
bounce = 0.5
rigidity = 5
class Rag:
def __init__(self, rag):
self.points = [p + p for p in rag['points']]
self.statics = [s for s in rag['statics']]
self.sticks = [s for s in rag['sticks']]
for s in self.sticks:
p0 = self.points[s[0]]
p1 = self.points[s[1]]
dx = p1[0] - p0[0]
dy = p1[1] - p0[1]
distance = (dx * dx + dy * dy) ** 0.5
s.append(distance)
def move_dynamic_points(self):
for (i, p) in enumerate(self.points):
if i not in self.statics:
vx = (p[0] - p[2]) * max((1 - friction, 0))
vy = (p[1] - p[3]) * max((1 - friction, 0))
p[2] = p[0]
p[3] = p[1]
p[0] += vx
p[1] += vy
p[1] += gravity
def move_static_point(self, index, pos, exception=None):
for s in self.sticks:
p0 = self.points[s[0]]
p1 = self.points[s[1]]
if index == s[0] and s[1] in self.statics and (exception != s[1]):
self.move_static_point(s[1], (p1[0] + (pos[0] - p0[0]), p1[1] + (pos[1] - p0[1])), exception=s[0])
elif index == s[1] and s[0] in self.statics and (exception != s[0]):
self.move_static_point(s[0], (p0[0] + (pos[0] - p1[0]), p0[1] + (pos[1] - p1[1])), exception=s[1])
self.points[index] = [pos[0], pos[1]] * 2
def constrain_points(self, bounds):
(width, height) = (bounds[0], bounds[1])
for (i, p) in enumerate(self.points):
if i not in self.statics:
vx = (p[0] - p[2]) * max((1 - friction, 0))
vy = (p[1] - p[3]) * max((1 - friction, 0))
if p[0] > width:
p[0] = width
p[2] = p[0] + vx * bounce
if p[0] < 0:
p[0] = 0
p[2] = p[0] + vx * bounce
if p[1] > height:
p[1] = height
p[3] = p[1] + vy * bounce
if p[1] < 0:
p[1] = 0
p[3] = p[1] + vy * bounce
def update_sticks(self):
for s in self.sticks:
p0 = self.points[s[0]]
p1 = self.points[s[1]]
length = s[2]
dx = p1[0] - p0[0]
dy = p1[1] - p0[1]
distance = (dx * dx + dy * dy) ** 0.5
difference = length - distance
try:
percent = difference / distance / 2
except:
percent = 0
offset_x = dx * percent
offset_y = dy * percent
if s[0] not in self.statics:
p0[0] -= offsetX
p0[1] -= offsetY
if s[1] not in self.statics:
p1[0] += offsetX
p1[1] += offsetY |
# Programa 12
c = 7 + 5*1.2
b = c - 4
if (b > 9):
if (c == 10):
a = b + 3
elif (b == 6):
a = c*3
print(a - c)
elif (c >= 13):
a = b + 1
else:
a = c / 7
print(a**b)
if (a < b):
a = c - b
c = c - a | c = 7 + 5 * 1.2
b = c - 4
if b > 9:
if c == 10:
a = b + 3
elif b == 6:
a = c * 3
print(a - c)
elif c >= 13:
a = b + 1
else:
a = c / 7
print(a ** b)
if a < b:
a = c - b
c = c - a |
PACKAGE_NAME = 'chatbridge'
VERSION_PYPI = '2.0.0-a1'
SERVER_NAME = '#SERVER'
| package_name = 'chatbridge'
version_pypi = '2.0.0-a1'
server_name = '#SERVER' |
#
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS-IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
{
'includes': [
'../common.gypi',
],
'variables': {
'icu_src_dir': '<(root_dir)/third_party/icu/icu4c',
},
'targets': [
{
'target_name': 'ionicu',
'type': 'static_library',
'all_dependent_settings': {
'include_dirs': [
'<(icu_src_dir)/source/common',
],
'defines': [
'U_DISABLE_RENAMING',
],
}, # all_dependent_settings
'include_dirs': [
'<(root_dir)/',
'<(icu_src_dir)/source/common',
],
'cflags_cc': [
'-Wno-deprecated-declarations',
],
'cflags_cc!': [
'-Wconversion',
],
'defines': [
'U_DISABLE_RENAMING',
],
'msvs_disabled_warnings': [
'4005', # Macro redefinition. ICU headers define WIN32_LEAN_AND_MEAN.
'4244', # Conversion from 64-bit to 32-bit types.
'4267', # Conversion from 64-bit to 32-bit types.
'4996', # 'uidna_toASCII': was declared deprecated.
],
'sources': [
# To generate this list cd into third_party/icu and run:
# ls -1 source/common/*.{c{,pp},h} 2>/dev/null|sed "sI\(.*\)I '<(icu_src_dir)/\1',I"|LC_ALL=C sort
'<(icu_src_dir)/source/common/appendable.cpp',
'<(icu_src_dir)/source/common/bmpset.cpp',
'<(icu_src_dir)/source/common/bmpset.h',
'<(icu_src_dir)/source/common/brkeng.cpp',
'<(icu_src_dir)/source/common/brkeng.h',
'<(icu_src_dir)/source/common/brkiter.cpp',
'<(icu_src_dir)/source/common/bytestream.cpp',
'<(icu_src_dir)/source/common/bytestrie.cpp',
'<(icu_src_dir)/source/common/bytestriebuilder.cpp',
'<(icu_src_dir)/source/common/bytestrieiterator.cpp',
'<(icu_src_dir)/source/common/caniter.cpp',
'<(icu_src_dir)/source/common/chariter.cpp',
'<(icu_src_dir)/source/common/charstr.cpp',
'<(icu_src_dir)/source/common/charstr.h',
'<(icu_src_dir)/source/common/cmemory.c',
'<(icu_src_dir)/source/common/cmemory.h',
'<(icu_src_dir)/source/common/cpputils.h',
'<(icu_src_dir)/source/common/cstring.c',
'<(icu_src_dir)/source/common/cstring.h',
'<(icu_src_dir)/source/common/cwchar.c',
'<(icu_src_dir)/source/common/cwchar.h',
'<(icu_src_dir)/source/common/dictbe.cpp',
'<(icu_src_dir)/source/common/dictbe.h',
'<(icu_src_dir)/source/common/dictionarydata.cpp',
'<(icu_src_dir)/source/common/dictionarydata.h',
'<(icu_src_dir)/source/common/dtintrv.cpp',
'<(icu_src_dir)/source/common/errorcode.cpp',
'<(icu_src_dir)/source/common/filteredbrk.cpp',
'<(icu_src_dir)/source/common/filterednormalizer2.cpp',
'<(icu_src_dir)/source/common/hash.h',
'<(icu_src_dir)/source/common/icudataver.c',
'<(icu_src_dir)/source/common/icuplug.cpp',
'<(icu_src_dir)/source/common/icuplugimp.h',
'<(icu_src_dir)/source/common/listformatter.cpp',
'<(icu_src_dir)/source/common/loadednormalizer2impl.cpp',
'<(icu_src_dir)/source/common/localsvc.h',
'<(icu_src_dir)/source/common/locavailable.cpp',
'<(icu_src_dir)/source/common/locbased.cpp',
'<(icu_src_dir)/source/common/locbased.h',
'<(icu_src_dir)/source/common/locdispnames.cpp',
'<(icu_src_dir)/source/common/locid.cpp',
'<(icu_src_dir)/source/common/loclikely.cpp',
'<(icu_src_dir)/source/common/locmap.c',
'<(icu_src_dir)/source/common/locmap.h',
'<(icu_src_dir)/source/common/locresdata.cpp',
'<(icu_src_dir)/source/common/locutil.cpp',
'<(icu_src_dir)/source/common/locutil.h',
'<(icu_src_dir)/source/common/messageimpl.h',
'<(icu_src_dir)/source/common/messagepattern.cpp',
'<(icu_src_dir)/source/common/msvcres.h',
'<(icu_src_dir)/source/common/mutex.h',
'<(icu_src_dir)/source/common/norm2_nfc_data.h',
'<(icu_src_dir)/source/common/norm2allmodes.h',
'<(icu_src_dir)/source/common/normalizer2.cpp',
'<(icu_src_dir)/source/common/normalizer2impl.cpp',
'<(icu_src_dir)/source/common/normalizer2impl.h',
'<(icu_src_dir)/source/common/normlzr.cpp',
'<(icu_src_dir)/source/common/parsepos.cpp',
'<(icu_src_dir)/source/common/patternprops.cpp',
'<(icu_src_dir)/source/common/patternprops.h',
'<(icu_src_dir)/source/common/pluralmap.cpp',
'<(icu_src_dir)/source/common/pluralmap.h',
'<(icu_src_dir)/source/common/propname.cpp',
'<(icu_src_dir)/source/common/propname.h',
'<(icu_src_dir)/source/common/propname_data.h',
'<(icu_src_dir)/source/common/propsvec.c',
'<(icu_src_dir)/source/common/propsvec.h',
'<(icu_src_dir)/source/common/punycode.cpp',
'<(icu_src_dir)/source/common/punycode.h',
'<(icu_src_dir)/source/common/putil.cpp',
'<(icu_src_dir)/source/common/putilimp.h',
'<(icu_src_dir)/source/common/rbbi.cpp',
'<(icu_src_dir)/source/common/rbbidata.cpp',
'<(icu_src_dir)/source/common/rbbidata.h',
'<(icu_src_dir)/source/common/rbbinode.cpp',
'<(icu_src_dir)/source/common/rbbinode.h',
'<(icu_src_dir)/source/common/rbbirb.cpp',
'<(icu_src_dir)/source/common/rbbirb.h',
'<(icu_src_dir)/source/common/rbbirpt.h',
'<(icu_src_dir)/source/common/rbbiscan.cpp',
'<(icu_src_dir)/source/common/rbbiscan.h',
'<(icu_src_dir)/source/common/rbbisetb.cpp',
'<(icu_src_dir)/source/common/rbbisetb.h',
'<(icu_src_dir)/source/common/rbbistbl.cpp',
'<(icu_src_dir)/source/common/rbbitblb.cpp',
'<(icu_src_dir)/source/common/rbbitblb.h',
'<(icu_src_dir)/source/common/resbund.cpp',
'<(icu_src_dir)/source/common/resbund_cnv.cpp',
'<(icu_src_dir)/source/common/ruleiter.cpp',
'<(icu_src_dir)/source/common/ruleiter.h',
'<(icu_src_dir)/source/common/schriter.cpp',
'<(icu_src_dir)/source/common/serv.cpp',
'<(icu_src_dir)/source/common/serv.h',
'<(icu_src_dir)/source/common/servlk.cpp',
'<(icu_src_dir)/source/common/servlkf.cpp',
'<(icu_src_dir)/source/common/servloc.h',
'<(icu_src_dir)/source/common/servls.cpp',
'<(icu_src_dir)/source/common/servnotf.cpp',
'<(icu_src_dir)/source/common/servnotf.h',
'<(icu_src_dir)/source/common/servrbf.cpp',
'<(icu_src_dir)/source/common/servslkf.cpp',
'<(icu_src_dir)/source/common/sharedobject.cpp',
'<(icu_src_dir)/source/common/sharedobject.h',
'<(icu_src_dir)/source/common/simplepatternformatter.cpp',
'<(icu_src_dir)/source/common/simplepatternformatter.h',
'<(icu_src_dir)/source/common/sprpimpl.h',
'<(icu_src_dir)/source/common/stringpiece.cpp',
'<(icu_src_dir)/source/common/stringtriebuilder.cpp',
'<(icu_src_dir)/source/stubdata/stubdata.c',
'<(icu_src_dir)/source/common/uarrsort.c',
'<(icu_src_dir)/source/common/uarrsort.h',
'<(icu_src_dir)/source/common/uassert.h',
'<(icu_src_dir)/source/common/ubidi.c',
'<(icu_src_dir)/source/common/ubidi_props.c',
'<(icu_src_dir)/source/common/ubidi_props.h',
'<(icu_src_dir)/source/common/ubidi_props_data.h',
'<(icu_src_dir)/source/common/ubidiimp.h',
'<(icu_src_dir)/source/common/ubidiln.c',
'<(icu_src_dir)/source/common/ubidiwrt.c',
'<(icu_src_dir)/source/common/ubrk.cpp',
'<(icu_src_dir)/source/common/ubrkimpl.h',
'<(icu_src_dir)/source/common/ucase.cpp',
'<(icu_src_dir)/source/common/ucase.h',
'<(icu_src_dir)/source/common/ucase_props_data.h',
'<(icu_src_dir)/source/common/ucasemap.cpp',
'<(icu_src_dir)/source/common/ucasemap_titlecase_brkiter.cpp',
'<(icu_src_dir)/source/common/ucat.c',
'<(icu_src_dir)/source/common/uchar.c',
'<(icu_src_dir)/source/common/uchar_props_data.h',
'<(icu_src_dir)/source/common/ucharstrie.cpp',
'<(icu_src_dir)/source/common/ucharstriebuilder.cpp',
'<(icu_src_dir)/source/common/ucharstrieiterator.cpp',
'<(icu_src_dir)/source/common/uchriter.cpp',
'<(icu_src_dir)/source/common/ucln.h',
'<(icu_src_dir)/source/common/ucln_cmn.cpp',
'<(icu_src_dir)/source/common/ucln_cmn.h',
'<(icu_src_dir)/source/common/ucln_imp.h',
'<(icu_src_dir)/source/common/ucmndata.c',
'<(icu_src_dir)/source/common/ucmndata.h',
'<(icu_src_dir)/source/common/ucnv.c',
'<(icu_src_dir)/source/common/ucnv2022.cpp',
'<(icu_src_dir)/source/common/ucnv_bld.cpp',
'<(icu_src_dir)/source/common/ucnv_bld.h',
'<(icu_src_dir)/source/common/ucnv_cb.c',
'<(icu_src_dir)/source/common/ucnv_cnv.c',
'<(icu_src_dir)/source/common/ucnv_cnv.h',
'<(icu_src_dir)/source/common/ucnv_ct.c',
'<(icu_src_dir)/source/common/ucnv_err.c',
'<(icu_src_dir)/source/common/ucnv_ext.cpp',
'<(icu_src_dir)/source/common/ucnv_ext.h',
'<(icu_src_dir)/source/common/ucnv_imp.h',
'<(icu_src_dir)/source/common/ucnv_io.cpp',
'<(icu_src_dir)/source/common/ucnv_io.h',
'<(icu_src_dir)/source/common/ucnv_lmb.c',
'<(icu_src_dir)/source/common/ucnv_set.c',
'<(icu_src_dir)/source/common/ucnv_u16.c',
'<(icu_src_dir)/source/common/ucnv_u32.c',
'<(icu_src_dir)/source/common/ucnv_u7.c',
'<(icu_src_dir)/source/common/ucnv_u8.c',
'<(icu_src_dir)/source/common/ucnvbocu.cpp',
'<(icu_src_dir)/source/common/ucnvdisp.c',
'<(icu_src_dir)/source/common/ucnvhz.c',
'<(icu_src_dir)/source/common/ucnvisci.c',
'<(icu_src_dir)/source/common/ucnvlat1.c',
'<(icu_src_dir)/source/common/ucnvmbcs.cpp',
'<(icu_src_dir)/source/common/ucnvmbcs.h',
'<(icu_src_dir)/source/common/ucnvscsu.c',
'<(icu_src_dir)/source/common/ucnvsel.cpp',
'<(icu_src_dir)/source/common/ucol_data.h',
'<(icu_src_dir)/source/common/ucol_swp.cpp',
'<(icu_src_dir)/source/common/ucol_swp.h',
'<(icu_src_dir)/source/common/udata.cpp',
'<(icu_src_dir)/source/common/udatamem.c',
'<(icu_src_dir)/source/common/udatamem.h',
'<(icu_src_dir)/source/common/udataswp.c',
'<(icu_src_dir)/source/common/udataswp.h',
'<(icu_src_dir)/source/common/uelement.h',
'<(icu_src_dir)/source/common/uenum.c',
'<(icu_src_dir)/source/common/uenumimp.h',
'<(icu_src_dir)/source/common/uhash.c',
'<(icu_src_dir)/source/common/uhash.h',
'<(icu_src_dir)/source/common/uhash_us.cpp',
'<(icu_src_dir)/source/common/uidna.cpp',
'<(icu_src_dir)/source/common/uinit.cpp',
'<(icu_src_dir)/source/common/uinvchar.c',
'<(icu_src_dir)/source/common/uinvchar.h',
'<(icu_src_dir)/source/common/uiter.cpp',
'<(icu_src_dir)/source/common/ulist.c',
'<(icu_src_dir)/source/common/ulist.h',
'<(icu_src_dir)/source/common/ulistformatter.cpp',
'<(icu_src_dir)/source/common/uloc.cpp',
'<(icu_src_dir)/source/common/uloc_keytype.cpp',
'<(icu_src_dir)/source/common/uloc_tag.c',
'<(icu_src_dir)/source/common/ulocimp.h',
'<(icu_src_dir)/source/common/umapfile.c',
'<(icu_src_dir)/source/common/umapfile.h',
'<(icu_src_dir)/source/common/umath.c',
'<(icu_src_dir)/source/common/umutex.cpp',
'<(icu_src_dir)/source/common/umutex.h',
'<(icu_src_dir)/source/common/unames.cpp',
'<(icu_src_dir)/source/common/unifiedcache.cpp',
'<(icu_src_dir)/source/common/unifiedcache.h',
'<(icu_src_dir)/source/common/unifilt.cpp',
'<(icu_src_dir)/source/common/unifunct.cpp',
'<(icu_src_dir)/source/common/uniset.cpp',
'<(icu_src_dir)/source/common/uniset_closure.cpp',
'<(icu_src_dir)/source/common/uniset_props.cpp',
'<(icu_src_dir)/source/common/unisetspan.cpp',
'<(icu_src_dir)/source/common/unisetspan.h',
'<(icu_src_dir)/source/common/unistr.cpp',
'<(icu_src_dir)/source/common/unistr_case.cpp',
'<(icu_src_dir)/source/common/unistr_case_locale.cpp',
'<(icu_src_dir)/source/common/unistr_cnv.cpp',
'<(icu_src_dir)/source/common/unistr_props.cpp',
'<(icu_src_dir)/source/common/unistr_titlecase_brkiter.cpp',
'<(icu_src_dir)/source/common/unistrappender.h',
'<(icu_src_dir)/source/common/unorm.cpp',
'<(icu_src_dir)/source/common/unormcmp.cpp',
'<(icu_src_dir)/source/common/unormimp.h',
'<(icu_src_dir)/source/common/uobject.cpp',
'<(icu_src_dir)/source/common/uposixdefs.h',
'<(icu_src_dir)/source/common/uprops.cpp',
'<(icu_src_dir)/source/common/uprops.h',
'<(icu_src_dir)/source/common/ures_cnv.c',
'<(icu_src_dir)/source/common/uresbund.cpp',
'<(icu_src_dir)/source/common/uresdata.c',
'<(icu_src_dir)/source/common/uresdata.h',
'<(icu_src_dir)/source/common/uresimp.h',
'<(icu_src_dir)/source/common/ureslocs.h',
'<(icu_src_dir)/source/common/usc_impl.c',
'<(icu_src_dir)/source/common/usc_impl.h',
'<(icu_src_dir)/source/common/uscript.c',
'<(icu_src_dir)/source/common/uscript_props.cpp',
'<(icu_src_dir)/source/common/uset.cpp',
'<(icu_src_dir)/source/common/uset_imp.h',
'<(icu_src_dir)/source/common/uset_props.cpp',
'<(icu_src_dir)/source/common/usetiter.cpp',
'<(icu_src_dir)/source/common/ushape.cpp',
'<(icu_src_dir)/source/common/usprep.cpp',
'<(icu_src_dir)/source/common/ustack.cpp',
'<(icu_src_dir)/source/common/ustr_cnv.cpp',
'<(icu_src_dir)/source/common/ustr_cnv.h',
'<(icu_src_dir)/source/common/ustr_imp.h',
'<(icu_src_dir)/source/common/ustr_titlecase_brkiter.cpp',
'<(icu_src_dir)/source/common/ustr_wcs.cpp',
'<(icu_src_dir)/source/common/ustrcase.cpp',
'<(icu_src_dir)/source/common/ustrcase_locale.cpp',
'<(icu_src_dir)/source/common/ustrenum.cpp',
'<(icu_src_dir)/source/common/ustrenum.h',
'<(icu_src_dir)/source/common/ustrfmt.c',
'<(icu_src_dir)/source/common/ustrfmt.h',
'<(icu_src_dir)/source/common/ustring.cpp',
'<(icu_src_dir)/source/common/ustrtrns.cpp',
'<(icu_src_dir)/source/common/utext.cpp',
'<(icu_src_dir)/source/common/utf_impl.c',
'<(icu_src_dir)/source/common/util.cpp',
'<(icu_src_dir)/source/common/util.h',
'<(icu_src_dir)/source/common/util_props.cpp',
'<(icu_src_dir)/source/common/utrace.c',
'<(icu_src_dir)/source/common/utracimp.h',
'<(icu_src_dir)/source/common/utrie.cpp',
'<(icu_src_dir)/source/common/utrie.h',
'<(icu_src_dir)/source/common/utrie2.cpp',
'<(icu_src_dir)/source/common/utrie2.h',
'<(icu_src_dir)/source/common/utrie2_builder.cpp',
'<(icu_src_dir)/source/common/utrie2_impl.h',
'<(icu_src_dir)/source/common/uts46.cpp',
'<(icu_src_dir)/source/common/utypeinfo.h',
'<(icu_src_dir)/source/common/utypes.c',
'<(icu_src_dir)/source/common/uvector.cpp',
'<(icu_src_dir)/source/common/uvector.h',
'<(icu_src_dir)/source/common/uvectr32.cpp',
'<(icu_src_dir)/source/common/uvectr32.h',
'<(icu_src_dir)/source/common/uvectr64.cpp',
'<(icu_src_dir)/source/common/uvectr64.h',
'<(icu_src_dir)/source/common/wintz.c',
'<(icu_src_dir)/source/common/wintz.h',
], # sources
'conditions': [
['_type == "static_library"', {
'defines': [
'U_COMMON_IMPLEMENTATION',
'GOOGLE_VENDOR_SRC_BRANCH',
],
'all_dependent_settings': {
'defines': [
'NO_GOOGLE_STRING_PIECE_IN_ICU',
],
}, # all_dependent_settings
}],
], # conditions
}, # target: ionicu
], # targets
}
| {'includes': ['../common.gypi'], 'variables': {'icu_src_dir': '<(root_dir)/third_party/icu/icu4c'}, 'targets': [{'target_name': 'ionicu', 'type': 'static_library', 'all_dependent_settings': {'include_dirs': ['<(icu_src_dir)/source/common'], 'defines': ['U_DISABLE_RENAMING']}, 'include_dirs': ['<(root_dir)/', '<(icu_src_dir)/source/common'], 'cflags_cc': ['-Wno-deprecated-declarations'], 'cflags_cc!': ['-Wconversion'], 'defines': ['U_DISABLE_RENAMING'], 'msvs_disabled_warnings': ['4005', '4244', '4267', '4996'], 'sources': ['<(icu_src_dir)/source/common/appendable.cpp', '<(icu_src_dir)/source/common/bmpset.cpp', '<(icu_src_dir)/source/common/bmpset.h', '<(icu_src_dir)/source/common/brkeng.cpp', '<(icu_src_dir)/source/common/brkeng.h', '<(icu_src_dir)/source/common/brkiter.cpp', '<(icu_src_dir)/source/common/bytestream.cpp', '<(icu_src_dir)/source/common/bytestrie.cpp', '<(icu_src_dir)/source/common/bytestriebuilder.cpp', '<(icu_src_dir)/source/common/bytestrieiterator.cpp', '<(icu_src_dir)/source/common/caniter.cpp', '<(icu_src_dir)/source/common/chariter.cpp', '<(icu_src_dir)/source/common/charstr.cpp', '<(icu_src_dir)/source/common/charstr.h', '<(icu_src_dir)/source/common/cmemory.c', '<(icu_src_dir)/source/common/cmemory.h', '<(icu_src_dir)/source/common/cpputils.h', '<(icu_src_dir)/source/common/cstring.c', '<(icu_src_dir)/source/common/cstring.h', '<(icu_src_dir)/source/common/cwchar.c', '<(icu_src_dir)/source/common/cwchar.h', '<(icu_src_dir)/source/common/dictbe.cpp', '<(icu_src_dir)/source/common/dictbe.h', '<(icu_src_dir)/source/common/dictionarydata.cpp', '<(icu_src_dir)/source/common/dictionarydata.h', '<(icu_src_dir)/source/common/dtintrv.cpp', '<(icu_src_dir)/source/common/errorcode.cpp', '<(icu_src_dir)/source/common/filteredbrk.cpp', '<(icu_src_dir)/source/common/filterednormalizer2.cpp', '<(icu_src_dir)/source/common/hash.h', '<(icu_src_dir)/source/common/icudataver.c', '<(icu_src_dir)/source/common/icuplug.cpp', '<(icu_src_dir)/source/common/icuplugimp.h', '<(icu_src_dir)/source/common/listformatter.cpp', '<(icu_src_dir)/source/common/loadednormalizer2impl.cpp', '<(icu_src_dir)/source/common/localsvc.h', '<(icu_src_dir)/source/common/locavailable.cpp', '<(icu_src_dir)/source/common/locbased.cpp', '<(icu_src_dir)/source/common/locbased.h', '<(icu_src_dir)/source/common/locdispnames.cpp', '<(icu_src_dir)/source/common/locid.cpp', '<(icu_src_dir)/source/common/loclikely.cpp', '<(icu_src_dir)/source/common/locmap.c', '<(icu_src_dir)/source/common/locmap.h', '<(icu_src_dir)/source/common/locresdata.cpp', '<(icu_src_dir)/source/common/locutil.cpp', '<(icu_src_dir)/source/common/locutil.h', '<(icu_src_dir)/source/common/messageimpl.h', '<(icu_src_dir)/source/common/messagepattern.cpp', '<(icu_src_dir)/source/common/msvcres.h', '<(icu_src_dir)/source/common/mutex.h', '<(icu_src_dir)/source/common/norm2_nfc_data.h', '<(icu_src_dir)/source/common/norm2allmodes.h', '<(icu_src_dir)/source/common/normalizer2.cpp', '<(icu_src_dir)/source/common/normalizer2impl.cpp', '<(icu_src_dir)/source/common/normalizer2impl.h', '<(icu_src_dir)/source/common/normlzr.cpp', '<(icu_src_dir)/source/common/parsepos.cpp', '<(icu_src_dir)/source/common/patternprops.cpp', '<(icu_src_dir)/source/common/patternprops.h', '<(icu_src_dir)/source/common/pluralmap.cpp', '<(icu_src_dir)/source/common/pluralmap.h', '<(icu_src_dir)/source/common/propname.cpp', '<(icu_src_dir)/source/common/propname.h', '<(icu_src_dir)/source/common/propname_data.h', '<(icu_src_dir)/source/common/propsvec.c', '<(icu_src_dir)/source/common/propsvec.h', '<(icu_src_dir)/source/common/punycode.cpp', '<(icu_src_dir)/source/common/punycode.h', '<(icu_src_dir)/source/common/putil.cpp', '<(icu_src_dir)/source/common/putilimp.h', '<(icu_src_dir)/source/common/rbbi.cpp', '<(icu_src_dir)/source/common/rbbidata.cpp', '<(icu_src_dir)/source/common/rbbidata.h', '<(icu_src_dir)/source/common/rbbinode.cpp', '<(icu_src_dir)/source/common/rbbinode.h', '<(icu_src_dir)/source/common/rbbirb.cpp', '<(icu_src_dir)/source/common/rbbirb.h', '<(icu_src_dir)/source/common/rbbirpt.h', '<(icu_src_dir)/source/common/rbbiscan.cpp', '<(icu_src_dir)/source/common/rbbiscan.h', '<(icu_src_dir)/source/common/rbbisetb.cpp', '<(icu_src_dir)/source/common/rbbisetb.h', '<(icu_src_dir)/source/common/rbbistbl.cpp', '<(icu_src_dir)/source/common/rbbitblb.cpp', '<(icu_src_dir)/source/common/rbbitblb.h', '<(icu_src_dir)/source/common/resbund.cpp', '<(icu_src_dir)/source/common/resbund_cnv.cpp', '<(icu_src_dir)/source/common/ruleiter.cpp', '<(icu_src_dir)/source/common/ruleiter.h', '<(icu_src_dir)/source/common/schriter.cpp', '<(icu_src_dir)/source/common/serv.cpp', '<(icu_src_dir)/source/common/serv.h', '<(icu_src_dir)/source/common/servlk.cpp', '<(icu_src_dir)/source/common/servlkf.cpp', '<(icu_src_dir)/source/common/servloc.h', '<(icu_src_dir)/source/common/servls.cpp', '<(icu_src_dir)/source/common/servnotf.cpp', '<(icu_src_dir)/source/common/servnotf.h', '<(icu_src_dir)/source/common/servrbf.cpp', '<(icu_src_dir)/source/common/servslkf.cpp', '<(icu_src_dir)/source/common/sharedobject.cpp', '<(icu_src_dir)/source/common/sharedobject.h', '<(icu_src_dir)/source/common/simplepatternformatter.cpp', '<(icu_src_dir)/source/common/simplepatternformatter.h', '<(icu_src_dir)/source/common/sprpimpl.h', '<(icu_src_dir)/source/common/stringpiece.cpp', '<(icu_src_dir)/source/common/stringtriebuilder.cpp', '<(icu_src_dir)/source/stubdata/stubdata.c', '<(icu_src_dir)/source/common/uarrsort.c', '<(icu_src_dir)/source/common/uarrsort.h', '<(icu_src_dir)/source/common/uassert.h', '<(icu_src_dir)/source/common/ubidi.c', '<(icu_src_dir)/source/common/ubidi_props.c', '<(icu_src_dir)/source/common/ubidi_props.h', '<(icu_src_dir)/source/common/ubidi_props_data.h', '<(icu_src_dir)/source/common/ubidiimp.h', '<(icu_src_dir)/source/common/ubidiln.c', '<(icu_src_dir)/source/common/ubidiwrt.c', '<(icu_src_dir)/source/common/ubrk.cpp', '<(icu_src_dir)/source/common/ubrkimpl.h', '<(icu_src_dir)/source/common/ucase.cpp', '<(icu_src_dir)/source/common/ucase.h', '<(icu_src_dir)/source/common/ucase_props_data.h', '<(icu_src_dir)/source/common/ucasemap.cpp', '<(icu_src_dir)/source/common/ucasemap_titlecase_brkiter.cpp', '<(icu_src_dir)/source/common/ucat.c', '<(icu_src_dir)/source/common/uchar.c', '<(icu_src_dir)/source/common/uchar_props_data.h', '<(icu_src_dir)/source/common/ucharstrie.cpp', '<(icu_src_dir)/source/common/ucharstriebuilder.cpp', '<(icu_src_dir)/source/common/ucharstrieiterator.cpp', '<(icu_src_dir)/source/common/uchriter.cpp', '<(icu_src_dir)/source/common/ucln.h', '<(icu_src_dir)/source/common/ucln_cmn.cpp', '<(icu_src_dir)/source/common/ucln_cmn.h', '<(icu_src_dir)/source/common/ucln_imp.h', '<(icu_src_dir)/source/common/ucmndata.c', '<(icu_src_dir)/source/common/ucmndata.h', '<(icu_src_dir)/source/common/ucnv.c', '<(icu_src_dir)/source/common/ucnv2022.cpp', '<(icu_src_dir)/source/common/ucnv_bld.cpp', '<(icu_src_dir)/source/common/ucnv_bld.h', '<(icu_src_dir)/source/common/ucnv_cb.c', '<(icu_src_dir)/source/common/ucnv_cnv.c', '<(icu_src_dir)/source/common/ucnv_cnv.h', '<(icu_src_dir)/source/common/ucnv_ct.c', '<(icu_src_dir)/source/common/ucnv_err.c', '<(icu_src_dir)/source/common/ucnv_ext.cpp', '<(icu_src_dir)/source/common/ucnv_ext.h', '<(icu_src_dir)/source/common/ucnv_imp.h', '<(icu_src_dir)/source/common/ucnv_io.cpp', '<(icu_src_dir)/source/common/ucnv_io.h', '<(icu_src_dir)/source/common/ucnv_lmb.c', '<(icu_src_dir)/source/common/ucnv_set.c', '<(icu_src_dir)/source/common/ucnv_u16.c', '<(icu_src_dir)/source/common/ucnv_u32.c', '<(icu_src_dir)/source/common/ucnv_u7.c', '<(icu_src_dir)/source/common/ucnv_u8.c', '<(icu_src_dir)/source/common/ucnvbocu.cpp', '<(icu_src_dir)/source/common/ucnvdisp.c', '<(icu_src_dir)/source/common/ucnvhz.c', '<(icu_src_dir)/source/common/ucnvisci.c', '<(icu_src_dir)/source/common/ucnvlat1.c', '<(icu_src_dir)/source/common/ucnvmbcs.cpp', '<(icu_src_dir)/source/common/ucnvmbcs.h', '<(icu_src_dir)/source/common/ucnvscsu.c', '<(icu_src_dir)/source/common/ucnvsel.cpp', '<(icu_src_dir)/source/common/ucol_data.h', '<(icu_src_dir)/source/common/ucol_swp.cpp', '<(icu_src_dir)/source/common/ucol_swp.h', '<(icu_src_dir)/source/common/udata.cpp', '<(icu_src_dir)/source/common/udatamem.c', '<(icu_src_dir)/source/common/udatamem.h', '<(icu_src_dir)/source/common/udataswp.c', '<(icu_src_dir)/source/common/udataswp.h', '<(icu_src_dir)/source/common/uelement.h', '<(icu_src_dir)/source/common/uenum.c', '<(icu_src_dir)/source/common/uenumimp.h', '<(icu_src_dir)/source/common/uhash.c', '<(icu_src_dir)/source/common/uhash.h', '<(icu_src_dir)/source/common/uhash_us.cpp', '<(icu_src_dir)/source/common/uidna.cpp', '<(icu_src_dir)/source/common/uinit.cpp', '<(icu_src_dir)/source/common/uinvchar.c', '<(icu_src_dir)/source/common/uinvchar.h', '<(icu_src_dir)/source/common/uiter.cpp', '<(icu_src_dir)/source/common/ulist.c', '<(icu_src_dir)/source/common/ulist.h', '<(icu_src_dir)/source/common/ulistformatter.cpp', '<(icu_src_dir)/source/common/uloc.cpp', '<(icu_src_dir)/source/common/uloc_keytype.cpp', '<(icu_src_dir)/source/common/uloc_tag.c', '<(icu_src_dir)/source/common/ulocimp.h', '<(icu_src_dir)/source/common/umapfile.c', '<(icu_src_dir)/source/common/umapfile.h', '<(icu_src_dir)/source/common/umath.c', '<(icu_src_dir)/source/common/umutex.cpp', '<(icu_src_dir)/source/common/umutex.h', '<(icu_src_dir)/source/common/unames.cpp', '<(icu_src_dir)/source/common/unifiedcache.cpp', '<(icu_src_dir)/source/common/unifiedcache.h', '<(icu_src_dir)/source/common/unifilt.cpp', '<(icu_src_dir)/source/common/unifunct.cpp', '<(icu_src_dir)/source/common/uniset.cpp', '<(icu_src_dir)/source/common/uniset_closure.cpp', '<(icu_src_dir)/source/common/uniset_props.cpp', '<(icu_src_dir)/source/common/unisetspan.cpp', '<(icu_src_dir)/source/common/unisetspan.h', '<(icu_src_dir)/source/common/unistr.cpp', '<(icu_src_dir)/source/common/unistr_case.cpp', '<(icu_src_dir)/source/common/unistr_case_locale.cpp', '<(icu_src_dir)/source/common/unistr_cnv.cpp', '<(icu_src_dir)/source/common/unistr_props.cpp', '<(icu_src_dir)/source/common/unistr_titlecase_brkiter.cpp', '<(icu_src_dir)/source/common/unistrappender.h', '<(icu_src_dir)/source/common/unorm.cpp', '<(icu_src_dir)/source/common/unormcmp.cpp', '<(icu_src_dir)/source/common/unormimp.h', '<(icu_src_dir)/source/common/uobject.cpp', '<(icu_src_dir)/source/common/uposixdefs.h', '<(icu_src_dir)/source/common/uprops.cpp', '<(icu_src_dir)/source/common/uprops.h', '<(icu_src_dir)/source/common/ures_cnv.c', '<(icu_src_dir)/source/common/uresbund.cpp', '<(icu_src_dir)/source/common/uresdata.c', '<(icu_src_dir)/source/common/uresdata.h', '<(icu_src_dir)/source/common/uresimp.h', '<(icu_src_dir)/source/common/ureslocs.h', '<(icu_src_dir)/source/common/usc_impl.c', '<(icu_src_dir)/source/common/usc_impl.h', '<(icu_src_dir)/source/common/uscript.c', '<(icu_src_dir)/source/common/uscript_props.cpp', '<(icu_src_dir)/source/common/uset.cpp', '<(icu_src_dir)/source/common/uset_imp.h', '<(icu_src_dir)/source/common/uset_props.cpp', '<(icu_src_dir)/source/common/usetiter.cpp', '<(icu_src_dir)/source/common/ushape.cpp', '<(icu_src_dir)/source/common/usprep.cpp', '<(icu_src_dir)/source/common/ustack.cpp', '<(icu_src_dir)/source/common/ustr_cnv.cpp', '<(icu_src_dir)/source/common/ustr_cnv.h', '<(icu_src_dir)/source/common/ustr_imp.h', '<(icu_src_dir)/source/common/ustr_titlecase_brkiter.cpp', '<(icu_src_dir)/source/common/ustr_wcs.cpp', '<(icu_src_dir)/source/common/ustrcase.cpp', '<(icu_src_dir)/source/common/ustrcase_locale.cpp', '<(icu_src_dir)/source/common/ustrenum.cpp', '<(icu_src_dir)/source/common/ustrenum.h', '<(icu_src_dir)/source/common/ustrfmt.c', '<(icu_src_dir)/source/common/ustrfmt.h', '<(icu_src_dir)/source/common/ustring.cpp', '<(icu_src_dir)/source/common/ustrtrns.cpp', '<(icu_src_dir)/source/common/utext.cpp', '<(icu_src_dir)/source/common/utf_impl.c', '<(icu_src_dir)/source/common/util.cpp', '<(icu_src_dir)/source/common/util.h', '<(icu_src_dir)/source/common/util_props.cpp', '<(icu_src_dir)/source/common/utrace.c', '<(icu_src_dir)/source/common/utracimp.h', '<(icu_src_dir)/source/common/utrie.cpp', '<(icu_src_dir)/source/common/utrie.h', '<(icu_src_dir)/source/common/utrie2.cpp', '<(icu_src_dir)/source/common/utrie2.h', '<(icu_src_dir)/source/common/utrie2_builder.cpp', '<(icu_src_dir)/source/common/utrie2_impl.h', '<(icu_src_dir)/source/common/uts46.cpp', '<(icu_src_dir)/source/common/utypeinfo.h', '<(icu_src_dir)/source/common/utypes.c', '<(icu_src_dir)/source/common/uvector.cpp', '<(icu_src_dir)/source/common/uvector.h', '<(icu_src_dir)/source/common/uvectr32.cpp', '<(icu_src_dir)/source/common/uvectr32.h', '<(icu_src_dir)/source/common/uvectr64.cpp', '<(icu_src_dir)/source/common/uvectr64.h', '<(icu_src_dir)/source/common/wintz.c', '<(icu_src_dir)/source/common/wintz.h'], 'conditions': [['_type == "static_library"', {'defines': ['U_COMMON_IMPLEMENTATION', 'GOOGLE_VENDOR_SRC_BRANCH'], 'all_dependent_settings': {'defines': ['NO_GOOGLE_STRING_PIECE_IN_ICU']}}]]}]} |
# -- Configuration Version --
config_version = 1
# -- Solver configuration --
f_to_calculate = [16., 31.5, 63., 125., 250., 500., 1000., 2000., 4000., 8000.]
f_to_plot = [250., 1000., 4000.]
order = 1
absorbing_layer = True
# -- Results Files configuration --
should_delete_old_results = False
results_directory = '../results/config{}'.format(config_version)
results_dir_with_absorbing_layer = '{}/with_absorbing_layer'.format(results_directory)
results_dir_without_absorbing_layer = '{}/without_absorbing_layer'.format(results_directory)
if absorbing_layer:
results_dir = results_dir_with_absorbing_layer
else:
results_dir = results_dir_without_absorbing_layer
totals_dir = '{}/total'.format(results_dir)
| config_version = 1
f_to_calculate = [16.0, 31.5, 63.0, 125.0, 250.0, 500.0, 1000.0, 2000.0, 4000.0, 8000.0]
f_to_plot = [250.0, 1000.0, 4000.0]
order = 1
absorbing_layer = True
should_delete_old_results = False
results_directory = '../results/config{}'.format(config_version)
results_dir_with_absorbing_layer = '{}/with_absorbing_layer'.format(results_directory)
results_dir_without_absorbing_layer = '{}/without_absorbing_layer'.format(results_directory)
if absorbing_layer:
results_dir = results_dir_with_absorbing_layer
else:
results_dir = results_dir_without_absorbing_layer
totals_dir = '{}/total'.format(results_dir) |
PLUGIN_AUTHOR_NAME = 'Your name'
PLUGIN_AUTHOR_EMAIL = 'your@email'
PLUGIN_AUTHOR_WEBSITE = 'https://yourwebsite'
HOOK_BEFORE_CREATE_PLUGIN = ''
HOOK_AFTER_CREATE_PLUGIN = ''
STORAGE_DIR = 'storage'
PERMISSIONS_TREE = {
'root': ['admin'],
'admin': ['execution'],
'execution': []
}
PROTOCOLS = [
]
PLUGINS = [
'bot',
'hello',
]
PERMS_METHODS = [
'nekbot.core.permissions.perms_from_settings',
]
SYMBOL = '!' | plugin_author_name = 'Your name'
plugin_author_email = 'your@email'
plugin_author_website = 'https://yourwebsite'
hook_before_create_plugin = ''
hook_after_create_plugin = ''
storage_dir = 'storage'
permissions_tree = {'root': ['admin'], 'admin': ['execution'], 'execution': []}
protocols = []
plugins = ['bot', 'hello']
perms_methods = ['nekbot.core.permissions.perms_from_settings']
symbol = '!' |
class Solution:
def isValid(self, s: str) -> bool:
dic = {'(': ')', '{': '}', '[': ']', '!': '!'}
stack = ['!']
for c in s:
if c in dic:
stack.append(c)
elif dic[stack.pop()] != c:
return False
return len(stack) == 1
| class Solution:
def is_valid(self, s: str) -> bool:
dic = {'(': ')', '{': '}', '[': ']', '!': '!'}
stack = ['!']
for c in s:
if c in dic:
stack.append(c)
elif dic[stack.pop()] != c:
return False
return len(stack) == 1 |
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
SPOOL_TEMPLATE = '''
heat_template_version: 2015-04-30
description: Template to test subnetpool Neutron resource
resources:
sub_pool:
type: OS::Neutron::SubnetPool
properties:
name: the_sp
prefixes:
- 10.1.0.0/16
address_scope: test
default_quota: 2
default_prefixlen: 28
min_prefixlen: 8
max_prefixlen: 32
is_default: False
tenant_id: c1210485b2424d48804aad5d39c61b8f
shared: False
'''
SPOOL_MINIMAL_TEMPLATE = '''
heat_template_version: 2015-04-30
description: Template to test subnetpool Neutron resource
resources:
sub_pool:
type: OS::Neutron::SubnetPool
properties:
prefixes:
- 10.0.0.0/16
- 10.1.0.0/16
'''
RBAC_TEMPLATE = '''
heat_template_version: 2016-04-08
description: Template to test rbac-policy Neutron resource
resources:
rbac:
type: OS::Neutron::RBACPolicy
properties:
object_type: network
target_tenant: d1dbbed707e5469da9cd4fdd618e9706
action: access_as_shared
object_id: 9ba4c03a-dbd5-4836-b651-defa595796ba
'''
RBAC_REFERENCE_TEMPLATE = '''
heat_template_version: 2016-04-08
description: Template to test rbac-policy Neutron resource
resources:
rbac:
type: OS::Neutron::RBACPolicy
properties:
object_type: network
target_tenant: d1dbbed707e5469da9cd4fdd618e9706
action: access_as_shared
object_id: {get_resource: my_net}
my_net:
type: OS::Neutron::Net
'''
LB_TEMPLATE = '''
heat_template_version: 2016-04-08
description: Create a loadbalancer
resources:
lb:
type: OS::Neutron::LBaaS::LoadBalancer
properties:
name: my_lb
description: my loadbalancer
vip_address: 10.0.0.4
vip_subnet: sub123
provider: octavia
tenant_id: 1234
admin_state_up: True
'''
LISTENER_TEMPLATE = '''
heat_template_version: 2016-04-08
description: Create a listener
resources:
listener:
type: OS::Neutron::LBaaS::Listener
properties:
protocol_port: 80
protocol: TCP
loadbalancer: 123
default_pool: my_pool
name: my_listener
description: my listener
admin_state_up: True
default_tls_container_ref: ref
sni_container_refs:
- ref1
- ref2
connection_limit: -1
tenant_id: 1234
'''
POOL_TEMPLATE = '''
heat_template_version: 2016-04-08
description: Create a pool
resources:
pool:
type: OS::Neutron::LBaaS::Pool
properties:
name: my_pool
description: my pool
session_persistence:
type: HTTP_COOKIE
lb_algorithm: ROUND_ROBIN
loadbalancer: my_lb
listener: 123
protocol: HTTP
admin_state_up: True
'''
MEMBER_TEMPLATE = '''
heat_template_version: 2016-04-08
description: Create a pool member
resources:
member:
type: OS::Neutron::LBaaS::PoolMember
properties:
pool: 123
address: 1.2.3.4
protocol_port: 80
weight: 1
subnet: sub123
admin_state_up: True
'''
MONITOR_TEMPLATE = '''
heat_template_version: 2016-04-08
description: Create a health monitor
resources:
monitor:
type: OS::Neutron::LBaaS::HealthMonitor
properties:
admin_state_up: True
delay: 3
expected_codes: 200-202
http_method: HEAD
max_retries: 5
pool: 123
timeout: 10
type: HTTP
url_path: /health
'''
SECURITY_GROUP_RULE_TEMPLATE = '''
heat_template_version: 2016-10-14
resources:
security_group_rule:
type: OS::Neutron::SecurityGroupRule
properties:
security_group: 123
description: test description
remote_group: 123
protocol: tcp
port_range_min: 100
'''
L7POLICY_TEMPLATE = '''
heat_template_version: 2016-04-08
description: Template to test L7Policy Neutron resource
resources:
l7policy:
type: OS::Neutron::LBaaS::L7Policy
properties:
admin_state_up: True
name: test_l7policy
description: test l7policy resource
action: REDIRECT_TO_URL
redirect_url: http://www.mirantis.com
listener: 123
position: 1
'''
L7RULE_TEMPLATE = '''
heat_template_version: 2016-04-08
description: Template to test L7Rule Neutron resource
resources:
l7rule:
type: OS::Neutron::LBaaS::L7Rule
properties:
admin_state_up: True
l7policy: 123
type: HEADER
compare_type: ENDS_WITH
key: test_key
value: test_value
invert: False
'''
SEGMENT_TEMPLATE = '''
heat_template_version: pike
description: Template to test Segment
resources:
segment:
type: OS::Neutron::Segment
properties:
network: private
network_type: vxlan
segmentation_id: 101
'''
| spool_template = '\nheat_template_version: 2015-04-30\ndescription: Template to test subnetpool Neutron resource\nresources:\n sub_pool:\n type: OS::Neutron::SubnetPool\n properties:\n name: the_sp\n prefixes:\n - 10.1.0.0/16\n address_scope: test\n default_quota: 2\n default_prefixlen: 28\n min_prefixlen: 8\n max_prefixlen: 32\n is_default: False\n tenant_id: c1210485b2424d48804aad5d39c61b8f\n shared: False\n'
spool_minimal_template = '\nheat_template_version: 2015-04-30\ndescription: Template to test subnetpool Neutron resource\nresources:\n sub_pool:\n type: OS::Neutron::SubnetPool\n properties:\n prefixes:\n - 10.0.0.0/16\n - 10.1.0.0/16\n'
rbac_template = '\nheat_template_version: 2016-04-08\ndescription: Template to test rbac-policy Neutron resource\nresources:\n rbac:\n type: OS::Neutron::RBACPolicy\n properties:\n object_type: network\n target_tenant: d1dbbed707e5469da9cd4fdd618e9706\n action: access_as_shared\n object_id: 9ba4c03a-dbd5-4836-b651-defa595796ba\n'
rbac_reference_template = '\nheat_template_version: 2016-04-08\ndescription: Template to test rbac-policy Neutron resource\nresources:\n rbac:\n type: OS::Neutron::RBACPolicy\n properties:\n object_type: network\n target_tenant: d1dbbed707e5469da9cd4fdd618e9706\n action: access_as_shared\n object_id: {get_resource: my_net}\n my_net:\n type: OS::Neutron::Net\n'
lb_template = '\nheat_template_version: 2016-04-08\ndescription: Create a loadbalancer\nresources:\n lb:\n type: OS::Neutron::LBaaS::LoadBalancer\n properties:\n name: my_lb\n description: my loadbalancer\n vip_address: 10.0.0.4\n vip_subnet: sub123\n provider: octavia\n tenant_id: 1234\n admin_state_up: True\n'
listener_template = '\nheat_template_version: 2016-04-08\ndescription: Create a listener\nresources:\n listener:\n type: OS::Neutron::LBaaS::Listener\n properties:\n protocol_port: 80\n protocol: TCP\n loadbalancer: 123\n default_pool: my_pool\n name: my_listener\n description: my listener\n admin_state_up: True\n default_tls_container_ref: ref\n sni_container_refs:\n - ref1\n - ref2\n connection_limit: -1\n tenant_id: 1234\n'
pool_template = '\nheat_template_version: 2016-04-08\ndescription: Create a pool\nresources:\n pool:\n type: OS::Neutron::LBaaS::Pool\n properties:\n name: my_pool\n description: my pool\n session_persistence:\n type: HTTP_COOKIE\n lb_algorithm: ROUND_ROBIN\n loadbalancer: my_lb\n listener: 123\n protocol: HTTP\n admin_state_up: True\n'
member_template = '\nheat_template_version: 2016-04-08\ndescription: Create a pool member\nresources:\n member:\n type: OS::Neutron::LBaaS::PoolMember\n properties:\n pool: 123\n address: 1.2.3.4\n protocol_port: 80\n weight: 1\n subnet: sub123\n admin_state_up: True\n'
monitor_template = '\nheat_template_version: 2016-04-08\ndescription: Create a health monitor\nresources:\n monitor:\n type: OS::Neutron::LBaaS::HealthMonitor\n properties:\n admin_state_up: True\n delay: 3\n expected_codes: 200-202\n http_method: HEAD\n max_retries: 5\n pool: 123\n timeout: 10\n type: HTTP\n url_path: /health\n'
security_group_rule_template = '\nheat_template_version: 2016-10-14\nresources:\n security_group_rule:\n type: OS::Neutron::SecurityGroupRule\n properties:\n security_group: 123\n description: test description\n remote_group: 123\n protocol: tcp\n port_range_min: 100\n'
l7_policy_template = '\nheat_template_version: 2016-04-08\ndescription: Template to test L7Policy Neutron resource\nresources:\n l7policy:\n type: OS::Neutron::LBaaS::L7Policy\n properties:\n admin_state_up: True\n name: test_l7policy\n description: test l7policy resource\n action: REDIRECT_TO_URL\n redirect_url: http://www.mirantis.com\n listener: 123\n position: 1\n'
l7_rule_template = '\nheat_template_version: 2016-04-08\ndescription: Template to test L7Rule Neutron resource\nresources:\n l7rule:\n type: OS::Neutron::LBaaS::L7Rule\n properties:\n admin_state_up: True\n l7policy: 123\n type: HEADER\n compare_type: ENDS_WITH\n key: test_key\n value: test_value\n invert: False\n'
segment_template = '\nheat_template_version: pike\ndescription: Template to test Segment\nresources:\n segment:\n type: OS::Neutron::Segment\n properties:\n network: private\n network_type: vxlan\n segmentation_id: 101\n' |
print('Pick an operation')
operation=input()
print('enter your first number')
number_1 = int(input())
print('enter your second number')
number_2 = int(input())
if operation == '+':
print(number_1 + number_2)
else:
print(number_1 - number_2)
| print('Pick an operation')
operation = input()
print('enter your first number')
number_1 = int(input())
print('enter your second number')
number_2 = int(input())
if operation == '+':
print(number_1 + number_2)
else:
print(number_1 - number_2) |
class Solution:
def findSubstringInWraproundString(self, p: str) -> int:
dp = [0] * 26
curr = 1
expected_code = None
for i, c in enumerate(p):
char_code = ord(c) - ord('a')
if char_code == expected_code:
curr += 1
else:
curr = 1
dp[char_code] = max(dp[char_code], curr)
if char_code == 25:
expected_code = 0
else:
expected_code = char_code + 1
return sum(dp)
| class Solution:
def find_substring_in_wrapround_string(self, p: str) -> int:
dp = [0] * 26
curr = 1
expected_code = None
for (i, c) in enumerate(p):
char_code = ord(c) - ord('a')
if char_code == expected_code:
curr += 1
else:
curr = 1
dp[char_code] = max(dp[char_code], curr)
if char_code == 25:
expected_code = 0
else:
expected_code = char_code + 1
return sum(dp) |
# File: symantecatp_view.py
#
# Copyright (c) 2017-2019 Splunk Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
# either express or implied. See the License for the specific language governing permissions
# and limitations under the License.
def get_ctx_result(result):
ctx_result = {}
param = result.get_param()
summary = result.get_summary()
data = result.get_data()
ctx_result['param'] = param
if summary:
ctx_result['summary'] = summary
if not data:
ctx_result['data'] = {}
return ctx_result
ctx_result['data'] = data[0]
return ctx_result
def display_report(provides, all_app_runs, context):
context['results'] = results = []
for summary, action_results in all_app_runs:
for result in action_results:
ctx_result = get_ctx_result(result)
if not ctx_result:
continue
if ctx_result['data'].get('action') == 'delete_endpoint_file':
ctx_result['device_uid'] = ctx_result['data']['status'][0]['target']['device_uid']
results.append(ctx_result)
return 'symantecatp_display_status.html'
def display_targets(provides, all_app_runs, context):
context['results'] = results = []
for summary, action_results in all_app_runs:
for result in action_results:
ctx_result = get_ctx_result(result)
if not ctx_result:
continue
if provides == 'delete file':
ctx_result['param']['hash'] = ctx_result['param']['hash'].split(',')
else:
ctx_result['param']['targets'] = ctx_result['param']['targets'].split(',')
ctx_result['action'] = provides
results.append(ctx_result)
return 'symantecatp_display_targets.html'
| def get_ctx_result(result):
ctx_result = {}
param = result.get_param()
summary = result.get_summary()
data = result.get_data()
ctx_result['param'] = param
if summary:
ctx_result['summary'] = summary
if not data:
ctx_result['data'] = {}
return ctx_result
ctx_result['data'] = data[0]
return ctx_result
def display_report(provides, all_app_runs, context):
context['results'] = results = []
for (summary, action_results) in all_app_runs:
for result in action_results:
ctx_result = get_ctx_result(result)
if not ctx_result:
continue
if ctx_result['data'].get('action') == 'delete_endpoint_file':
ctx_result['device_uid'] = ctx_result['data']['status'][0]['target']['device_uid']
results.append(ctx_result)
return 'symantecatp_display_status.html'
def display_targets(provides, all_app_runs, context):
context['results'] = results = []
for (summary, action_results) in all_app_runs:
for result in action_results:
ctx_result = get_ctx_result(result)
if not ctx_result:
continue
if provides == 'delete file':
ctx_result['param']['hash'] = ctx_result['param']['hash'].split(',')
else:
ctx_result['param']['targets'] = ctx_result['param']['targets'].split(',')
ctx_result['action'] = provides
results.append(ctx_result)
return 'symantecatp_display_targets.html' |
# import re
def replaceVogais(txt):
for i in 'aeiouAEIOU':
txt = txt.replace(i, '')
return txt
lista = []
for i in range(3):
palavra = input('Digite uma palavra:')
lista.append(palavra)
for index, palavra in enumerate(lista):
match index:
case 0:
lista[0] = lista[0].upper()
print(lista[0])
case 1:
lista[1] = lista[1].casefold()
print(lista[1])
case 2:
# lista[2] = re.sub("[aeiouAEIOU]", "", lista[2])
# print(lista[2])
txt = replaceVogais(lista[2])
print(txt)
| def replace_vogais(txt):
for i in 'aeiouAEIOU':
txt = txt.replace(i, '')
return txt
lista = []
for i in range(3):
palavra = input('Digite uma palavra:')
lista.append(palavra)
for (index, palavra) in enumerate(lista):
match index:
case 0:
lista[0] = lista[0].upper()
print(lista[0])
case 1:
lista[1] = lista[1].casefold()
print(lista[1])
case 2:
txt = replace_vogais(lista[2])
print(txt) |
_DEFAULT_SAMPLE_RATE = 22050
SOUNDFONTS = {
"salamander": "../soundfonts/salamander/SalamanderGrandPiano.sf2",
"fluidR3": "../soundfonts/fluid/FluidR3_GM.sf2",
"musescore": "../soundfonts/musescore/musescore_general.sf3",
"rhodes": "../soundfonts/rhodes/RhodesEPsPlus_2.3.sf2"
} | _default_sample_rate = 22050
soundfonts = {'salamander': '../soundfonts/salamander/SalamanderGrandPiano.sf2', 'fluidR3': '../soundfonts/fluid/FluidR3_GM.sf2', 'musescore': '../soundfonts/musescore/musescore_general.sf3', 'rhodes': '../soundfonts/rhodes/RhodesEPsPlus_2.3.sf2'} |
n, k = [int(x) for x in input().split()]
nm = []
for g in range(n): nm.append(input())
print(sorted(nm)[k-1])
| (n, k) = [int(x) for x in input().split()]
nm = []
for g in range(n):
nm.append(input())
print(sorted(nm)[k - 1]) |
#!usr/bin/env python
# -*- coding: utf-8 -*-
# This function checks if the status code of a REST request is 200/201,
# signifying a successful request. If not, the program exits with a log message.
def checkStatusCode(status_code, URL):
# Status codes 200 and 201 represent a successful request, so the function
# simply returns to the code that called it and continues.
if status_code == 200 or status_code == 201:
return
# If the request is unsuccessful, both the URL and the status code of
# the failed request are printed.
else:
print("Call to URL {0} failed with status code {1}".format(URL, status_code))
print("Exiting")
exit(1) | def check_status_code(status_code, URL):
if status_code == 200 or status_code == 201:
return
else:
print('Call to URL {0} failed with status code {1}'.format(URL, status_code))
print('Exiting')
exit(1) |
class CompositionalRule(object):
def __and__(self, other):
return And(self, other)
def __invert__(self):
return Not(self)
def __or__(self, other):
return Or(self, other)
def __ne__(self, other):
return Not(self.__eq__(other))
def accepts(self, anObject):
raise NotImplementedError
class CollectionAttributeIncludesFilter(CompositionalRule):
def __init__(self, attribute, quantifier, filter):
self.filter = filter
self.attribute = attribute
self.quantifier = quantifier
def accepts(self, anObject):
return self.quantifier(self.filter.accepts(x) for x in getattr(anObject, self.attribute))
class And(CompositionalRule):
def __init__(self, l, r):
self.r = r
self.l = l
def accepts(self, anObject):
return self.l.accepts(anObject) and self.r.accepts(anObject)
class Or(CompositionalRule):
def __init__(self, l, r):
self.r = r
self.l = l
def accepts(self, anObject):
return self.l.accepts(anObject) or self.r.accepts(anObject)
class AttributeEqualsFilter(CompositionalRule):
def __init__(self, attribute, value):
self.value = value
self.attribute = attribute
def accepts(self, anObject):
return self.value == getattr(anObject, self.attribute)
class AttributeLambdaFilter(CompositionalRule):
def __init__(self, attribute, l):
self.l = l
self.attribute = attribute
def accepts(self, anObject):
return self.l(getattr(anObject, self.attribute))
class BinOpAttrLength(CompositionalRule):
def __init__(self, attr, other, op):
super(BinOpAttrLength, self).__init__()
self.op = op
self.attr = attr
self.other = other
def accepts(self, anObject):
return self.op(len(getattr(anObject, self.attr)), self.other)
class LengthConditionOnAttribute(object):
def __init__(self, attr):
super(LengthConditionOnAttribute, self).__init__()
self.attr = attr
def __gt__(self, other):
return BinOpAttrLength(self.attr, other, lambda a, b: a > b)
def __ge__(self, other):
return BinOpAttrLength(self.attr, other, lambda a, b: a >= b)
def __eq__(self, other):
return BinOpAttrLength(self.attr, other, lambda a, b: a == b)
def __ne__(self, other):
return BinOpAttrLength(self.attr, other, lambda a, b: a != b)
def __le__(self, other):
return BinOpAttrLength(self.attr, other, lambda a, b: a <= b)
def __lt__(self, other):
return BinOpAttrLength(self.attr, other, lambda a, b: a < b)
class BaseCondition(object):
def __init__(self, collection_attribute):
self.collection_attribute = collection_attribute
def __eq__(self, other):
return AttributeLambdaFilter(self.collection_attribute, lambda x: x == other)
class ConditionOnAttribute(BaseCondition):
def includes(self, param):
return AttributeLambdaFilter(self.collection_attribute, lambda x: param in x)
def in_(self, a_list):
return AttributeLambdaFilter(self.collection_attribute, lambda x: x in a_list)
class ConditionOnCollectionAttribute(BaseCondition):
def includes(self, quantifier, criteria):
return CollectionAttributeIncludesFilter(self.collection_attribute, quantifier, criteria)
def length(self):
return LengthConditionOnAttribute(self.collection_attribute)
class ForAll(CompositionalRule):
def __init__(self, attribute, condition):
self.attribute = attribute
self.condition = condition
def accepts(self, anObject):
return all([self.condition.accepts(x) for x in getattr(anObject, self.attribute)])
class Not(CompositionalRule):
def __init__(self, inner):
self.inner = inner
def accepts(self, anObject):
return not self.inner.accepts(anObject)
class Exists(CompositionalRule):
def __init__(self, attribute, condition):
self.attribute = attribute
self.condition = condition
def accepts(self, anObject):
return any(self.condition.accepts(x) for x in getattr(anObject, self.attribute))
class IF(object):
def __init__(self, precedent_condition, consequent_condition):
self.consequent_condition = consequent_condition
self.precedent_condition = precedent_condition
def accepts(self, anObject):
return Not(self.precedent_condition).accepts(anObject) or self.consequent_condition.accepts(anObject)
class AcceptAllFilter(CompositionalRule):
def accepts(self, anObject):
return True
| class Compositionalrule(object):
def __and__(self, other):
return and(self, other)
def __invert__(self):
return not(self)
def __or__(self, other):
return or(self, other)
def __ne__(self, other):
return not(self.__eq__(other))
def accepts(self, anObject):
raise NotImplementedError
class Collectionattributeincludesfilter(CompositionalRule):
def __init__(self, attribute, quantifier, filter):
self.filter = filter
self.attribute = attribute
self.quantifier = quantifier
def accepts(self, anObject):
return self.quantifier((self.filter.accepts(x) for x in getattr(anObject, self.attribute)))
class And(CompositionalRule):
def __init__(self, l, r):
self.r = r
self.l = l
def accepts(self, anObject):
return self.l.accepts(anObject) and self.r.accepts(anObject)
class Or(CompositionalRule):
def __init__(self, l, r):
self.r = r
self.l = l
def accepts(self, anObject):
return self.l.accepts(anObject) or self.r.accepts(anObject)
class Attributeequalsfilter(CompositionalRule):
def __init__(self, attribute, value):
self.value = value
self.attribute = attribute
def accepts(self, anObject):
return self.value == getattr(anObject, self.attribute)
class Attributelambdafilter(CompositionalRule):
def __init__(self, attribute, l):
self.l = l
self.attribute = attribute
def accepts(self, anObject):
return self.l(getattr(anObject, self.attribute))
class Binopattrlength(CompositionalRule):
def __init__(self, attr, other, op):
super(BinOpAttrLength, self).__init__()
self.op = op
self.attr = attr
self.other = other
def accepts(self, anObject):
return self.op(len(getattr(anObject, self.attr)), self.other)
class Lengthconditiononattribute(object):
def __init__(self, attr):
super(LengthConditionOnAttribute, self).__init__()
self.attr = attr
def __gt__(self, other):
return bin_op_attr_length(self.attr, other, lambda a, b: a > b)
def __ge__(self, other):
return bin_op_attr_length(self.attr, other, lambda a, b: a >= b)
def __eq__(self, other):
return bin_op_attr_length(self.attr, other, lambda a, b: a == b)
def __ne__(self, other):
return bin_op_attr_length(self.attr, other, lambda a, b: a != b)
def __le__(self, other):
return bin_op_attr_length(self.attr, other, lambda a, b: a <= b)
def __lt__(self, other):
return bin_op_attr_length(self.attr, other, lambda a, b: a < b)
class Basecondition(object):
def __init__(self, collection_attribute):
self.collection_attribute = collection_attribute
def __eq__(self, other):
return attribute_lambda_filter(self.collection_attribute, lambda x: x == other)
class Conditiononattribute(BaseCondition):
def includes(self, param):
return attribute_lambda_filter(self.collection_attribute, lambda x: param in x)
def in_(self, a_list):
return attribute_lambda_filter(self.collection_attribute, lambda x: x in a_list)
class Conditiononcollectionattribute(BaseCondition):
def includes(self, quantifier, criteria):
return collection_attribute_includes_filter(self.collection_attribute, quantifier, criteria)
def length(self):
return length_condition_on_attribute(self.collection_attribute)
class Forall(CompositionalRule):
def __init__(self, attribute, condition):
self.attribute = attribute
self.condition = condition
def accepts(self, anObject):
return all([self.condition.accepts(x) for x in getattr(anObject, self.attribute)])
class Not(CompositionalRule):
def __init__(self, inner):
self.inner = inner
def accepts(self, anObject):
return not self.inner.accepts(anObject)
class Exists(CompositionalRule):
def __init__(self, attribute, condition):
self.attribute = attribute
self.condition = condition
def accepts(self, anObject):
return any((self.condition.accepts(x) for x in getattr(anObject, self.attribute)))
class If(object):
def __init__(self, precedent_condition, consequent_condition):
self.consequent_condition = consequent_condition
self.precedent_condition = precedent_condition
def accepts(self, anObject):
return not(self.precedent_condition).accepts(anObject) or self.consequent_condition.accepts(anObject)
class Acceptallfilter(CompositionalRule):
def accepts(self, anObject):
return True |
class Args(list):
def __init__(self, raw_args):
super().__init__()
self._raw_args = raw_args
def __setitem__(self, index, data):
self._raw_args[index] = data
def __getitem__(self, index):
return self._raw_args[index]
def __len__(self):
return len(self._raw_args)
@property
def without_flags(self):
new_args = []
for arg in self._raw_args:
if not arg.startswith('-'):
new_args.append(arg)
return new_args
| class Args(list):
def __init__(self, raw_args):
super().__init__()
self._raw_args = raw_args
def __setitem__(self, index, data):
self._raw_args[index] = data
def __getitem__(self, index):
return self._raw_args[index]
def __len__(self):
return len(self._raw_args)
@property
def without_flags(self):
new_args = []
for arg in self._raw_args:
if not arg.startswith('-'):
new_args.append(arg)
return new_args |
# Areas list
areas = [ "hallway", 14.35,
"kitchen", 15.0,
"living room", 19.0,
"bedroom", 12.5,
"bathroom", 8.75 ]
# Add garage and garden data
all_areas = areas + ["garage", 20.0,"garden", 17.0]
# Print out all_areas
print(all_areas) | areas = ['hallway', 14.35, 'kitchen', 15.0, 'living room', 19.0, 'bedroom', 12.5, 'bathroom', 8.75]
all_areas = areas + ['garage', 20.0, 'garden', 17.0]
print(all_areas) |
with open("input.txt", "r") as f:
lines = f.readlines()
isFirst = True
cValue = 0
counter = 0
for line in lines:
line = line.strip()
if isFirst:
isFirst = False
else:
if cValue < int(line) :
counter +=1
cValue = int(line)
print("Total increment = ", counter) | with open('input.txt', 'r') as f:
lines = f.readlines()
is_first = True
c_value = 0
counter = 0
for line in lines:
line = line.strip()
if isFirst:
is_first = False
elif cValue < int(line):
counter += 1
c_value = int(line)
print('Total increment = ', counter) |
# print(*input().split('WUB'))
# And I thought regex is going to beat me...
# Wait.... the checker doesn't care about double space......................
# Now I stand by my solution, even thought it would replace "WUBWWUBUWUBBWUB" with ""
def l(a):
for b in ['WUB',' ']:a=a.replace(b,' ')
return a
w=input()
while w!=l(w):w=l(w)
print(w.strip()) | def l(a):
for b in ['WUB', ' ']:
a = a.replace(b, ' ')
return a
w = input()
while w != l(w):
w = l(w)
print(w.strip()) |
class Location:
def __init__(self, x, y, value):
self.x = x
self.y = y
self.value = value
def intersection(node, x, y):
pass
class QuadTreeNode:
def __init__(self, top_left, top_right, bottom_left, bottom_right):
self.top_left = top_left
self.top_right = top_right
self.bottom_left = bottom_left
self.bottom_right = bottom_right
self.locations = []
self.children = []
self.max_capacity = 10
self.leaf = True
def check_capacity(self):
if len(self.locations) > self.max_capacity:
self.leaf = False
half_distance = (self.top_right + self.top_left) / 2
self.children = [
QuadTreeNode(self.top_left, None, None, None),
QuadTreeNode(None, self.top_right, None, None),
QuadTreeNode(None, None, self.bottom_left, None),
QuadTreeNode(None, None, None, self.bottom_right)
]
for location in self.locations:
for child in self.children:
if intersection(child, location.x, location.y):
child.locations.append(location)
self.locations = []
for child in self.children:
child.check_capacity()
class QuadTree:
def __init__(self):
self.root = QuadTreeNode([0, 0], [0, 100], [100, 0], [100, 100])
def insert(self, value, x, y):
def recursive_insert(node):
if node.leaf:
node.locations.append(value)
node.check_capacity()
else:
for child in node.children:
if intersection(node, x, y):
recursive_insert(child)
break
recursive_insert(self.root)
def search(self, x, y):
def recursive_search(node):
if node.leaf:
for location in node.locations:
if location.x == x and location.y == y:
return True
else:
for child in node.children:
if intersection(child, x, y):
return recursive_search(child)
return False
return recursive_search(self.root)
| class Location:
def __init__(self, x, y, value):
self.x = x
self.y = y
self.value = value
def intersection(node, x, y):
pass
class Quadtreenode:
def __init__(self, top_left, top_right, bottom_left, bottom_right):
self.top_left = top_left
self.top_right = top_right
self.bottom_left = bottom_left
self.bottom_right = bottom_right
self.locations = []
self.children = []
self.max_capacity = 10
self.leaf = True
def check_capacity(self):
if len(self.locations) > self.max_capacity:
self.leaf = False
half_distance = (self.top_right + self.top_left) / 2
self.children = [quad_tree_node(self.top_left, None, None, None), quad_tree_node(None, self.top_right, None, None), quad_tree_node(None, None, self.bottom_left, None), quad_tree_node(None, None, None, self.bottom_right)]
for location in self.locations:
for child in self.children:
if intersection(child, location.x, location.y):
child.locations.append(location)
self.locations = []
for child in self.children:
child.check_capacity()
class Quadtree:
def __init__(self):
self.root = quad_tree_node([0, 0], [0, 100], [100, 0], [100, 100])
def insert(self, value, x, y):
def recursive_insert(node):
if node.leaf:
node.locations.append(value)
node.check_capacity()
else:
for child in node.children:
if intersection(node, x, y):
recursive_insert(child)
break
recursive_insert(self.root)
def search(self, x, y):
def recursive_search(node):
if node.leaf:
for location in node.locations:
if location.x == x and location.y == y:
return True
else:
for child in node.children:
if intersection(child, x, y):
return recursive_search(child)
return False
return recursive_search(self.root) |
# test basic complex number functionality
# convert bignum to complex on rhs
ans = 1j + (1 << 70)
print("%.5g %.5g" % (ans.real, ans.imag))
| ans = 1j + (1 << 70)
print('%.5g %.5g' % (ans.real, ans.imag)) |
with open("day8_input.txt") as f:
lines = map(str.strip, f.readlines())
count = 0
for signals, outputs in [(x.split(), y.split()) for x, y in [line.split("|") for line in lines]]:
count += sum(1 for output in outputs if len(output) in [2, 4, 3, 7])
print(f"{count=}")
| with open('day8_input.txt') as f:
lines = map(str.strip, f.readlines())
count = 0
for (signals, outputs) in [(x.split(), y.split()) for (x, y) in [line.split('|') for line in lines]]:
count += sum((1 for output in outputs if len(output) in [2, 4, 3, 7]))
print(f'count={count!r}') |
print('Welcome to Number Guessing Mania - Game in Python')
while(True):
n = int(input('Enter a number :\n'))
if n == 18:
print('Yes you got it !!! \n')
break
elif n > 30:
print(f'Sorry, your entered number {n} is greater than expected.')
continue
elif n < 15:
print(f'Sorry, your entered number {n} is smaller than expected.')
continue
elif n >= 15 < 18:
print('Good ! Your are nearly close...')
continue
elif n < 30 >= 19:
print('Good ! Your are nearly close...')
continue
else:
print('Please try again !\n')
continue
| print('Welcome to Number Guessing Mania - Game in Python')
while True:
n = int(input('Enter a number :\n'))
if n == 18:
print('Yes you got it !!! \n')
break
elif n > 30:
print(f'Sorry, your entered number {n} is greater than expected.')
continue
elif n < 15:
print(f'Sorry, your entered number {n} is smaller than expected.')
continue
elif n >= 15 < 18:
print('Good ! Your are nearly close...')
continue
elif n < 30 >= 19:
print('Good ! Your are nearly close...')
continue
else:
print('Please try again !\n')
continue |
df = pd.DataFrame(
np.random.randint(1, 7, 6000),
columns = ['one'])
df['two'] = df['one'] + np.random.randint(1, 7, 6000)
ax = df.plot.hist(bins=12, alpha=0.5)
| df = pd.DataFrame(np.random.randint(1, 7, 6000), columns=['one'])
df['two'] = df['one'] + np.random.randint(1, 7, 6000)
ax = df.plot.hist(bins=12, alpha=0.5) |
_options = {
"cpp_std": "c++11",
"optimize": "3",
}
def set_option(name, value):
global _options
_options[name] = value
def get_option(name, default=None):
global _options
return _options.get(name, default)
| _options = {'cpp_std': 'c++11', 'optimize': '3'}
def set_option(name, value):
global _options
_options[name] = value
def get_option(name, default=None):
global _options
return _options.get(name, default) |
load(
"@bazel_tools//tools/build_defs/repo:http.bzl",
"http_archive",
"http_file",
)
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
########################################
# bazel_toolchains_repositories
########################################
#
# This rule configures the following repositories:
# * io_bazel_rules_docker: https://github.com/bazelbuild/rules_docker
# * bazel_skylib: https://github.com/bazelbuild/bazel-skylib
# * bazel_gpg: https://bazel.build/bazel-release.pub.gpg
load(
"@bazel_toolchains//repositories:repositories.bzl",
bazel_toolchains_repositories = "repositories",
)
def stage2():
bazel_toolchains_repositories()
protobuf_deps()
http_archive(
name = "gtest",
build_file = "@com_google_or_tools//bazel:gtest.BUILD",
strip_prefix = "googletest-release-1.8.0/googletest",
url = "https://github.com/google/googletest/archive/release-1.8.0.zip",
)
http_archive(
name = "glpk",
build_file = "@com_google_or_tools//bazel:glpk.BUILD",
sha256 = "9a5dab356268b4f177c33e00ddf8164496dc2434e83bd1114147024df983a3bb",
url = "http://ftp.gnu.org/gnu/glpk/glpk-4.52.tar.gz",
)
| load('@bazel_tools//tools/build_defs/repo:http.bzl', 'http_archive', 'http_file')
load('@com_google_protobuf//:protobuf_deps.bzl', 'protobuf_deps')
load('@bazel_toolchains//repositories:repositories.bzl', bazel_toolchains_repositories='repositories')
def stage2():
bazel_toolchains_repositories()
protobuf_deps()
http_archive(name='gtest', build_file='@com_google_or_tools//bazel:gtest.BUILD', strip_prefix='googletest-release-1.8.0/googletest', url='https://github.com/google/googletest/archive/release-1.8.0.zip')
http_archive(name='glpk', build_file='@com_google_or_tools//bazel:glpk.BUILD', sha256='9a5dab356268b4f177c33e00ddf8164496dc2434e83bd1114147024df983a3bb', url='http://ftp.gnu.org/gnu/glpk/glpk-4.52.tar.gz') |
class Repeater:
def __init__(self, value):
if callable(value):
self._value = value
else:
self._value = lambda: value
def __iter__(self):
return self
def __next__(self):
return self._value()
| class Repeater:
def __init__(self, value):
if callable(value):
self._value = value
else:
self._value = lambda : value
def __iter__(self):
return self
def __next__(self):
return self._value() |
while True:
command = input(">")
if command == 'help':
print("1) start")
print("2) stop")
print("3) quiet")
elif command == 'start':
print("Car started....Ready to Go")
elif command == 'stop':
print("Car stopped")
elif command == 'quiet':
print("Car terminated")
break
else:
print("input ERROR: Unknown command")
| while True:
command = input('>')
if command == 'help':
print('1) start')
print('2) stop')
print('3) quiet')
elif command == 'start':
print('Car started....Ready to Go')
elif command == 'stop':
print('Car stopped')
elif command == 'quiet':
print('Car terminated')
break
else:
print('input ERROR: Unknown command') |
def hcf(x, y):
divisor = 1
if x > y:
smaller = y
else:
smaller = x
for i in range(1, smaller + 1):
if (x % i == 0) and (y % i == 0):
divisor = i
return divisor
num1 = int(input('Enter the first number: '))
num2 = int(input("Enter the second number: "))
print(num1, " and ", num2, " has a greatest common divisor: ", hcf(num1, num2))
| def hcf(x, y):
divisor = 1
if x > y:
smaller = y
else:
smaller = x
for i in range(1, smaller + 1):
if x % i == 0 and y % i == 0:
divisor = i
return divisor
num1 = int(input('Enter the first number: '))
num2 = int(input('Enter the second number: '))
print(num1, ' and ', num2, ' has a greatest common divisor: ', hcf(num1, num2)) |
class DiscordanceReportResolution:
ONGOING = None
CONCORDANT = 'C'
CONTINUED_DISCORDANCE = 'D'
CHOICES = (
(CONCORDANT, 'Concordant'),
(CONTINUED_DISCORDANCE, 'Continued Discordance')
)
class ContinuedDiscordanceReason:
UNRESPONSIVE = 'U'
DIFFERENT_CURATION_METHODS = 'D'
CHOICES = (
(UNRESPONSIVE, 'One or more labs was unresponsive'),
(DIFFERENT_CURATION_METHODS, 'Different curation methods are being employed')
)
| class Discordancereportresolution:
ongoing = None
concordant = 'C'
continued_discordance = 'D'
choices = ((CONCORDANT, 'Concordant'), (CONTINUED_DISCORDANCE, 'Continued Discordance'))
class Continueddiscordancereason:
unresponsive = 'U'
different_curation_methods = 'D'
choices = ((UNRESPONSIVE, 'One or more labs was unresponsive'), (DIFFERENT_CURATION_METHODS, 'Different curation methods are being employed')) |
if __name__ == '__main__':
x = int(input())
y = int(input())
z = int(input())
n = int(input())
L = [[a,b,c] for a in range(x+1) for b in range(y+1) for c in range(z+1)]
L = list(filter(lambda x : sum(x) != n, L))
print(L)
| if __name__ == '__main__':
x = int(input())
y = int(input())
z = int(input())
n = int(input())
l = [[a, b, c] for a in range(x + 1) for b in range(y + 1) for c in range(z + 1)]
l = list(filter(lambda x: sum(x) != n, L))
print(L) |
#Parameters
def say_hello(name, age):
print(f'Hello, I am {name} and I am {age} years old.')
#Default Parameters
def say_something(name='Andrei', age=20):
print(f'Hello, I am {name} and I am not {age} years old.')
say_something()
#Positional Arguments
say_hello('Elena', 14)
say_hello('John', 10)
#Keyword Arguments
say_hello(name='Peter', age=20)
say_hello(age=10, name='Ana')
| def say_hello(name, age):
print(f'Hello, I am {name} and I am {age} years old.')
def say_something(name='Andrei', age=20):
print(f'Hello, I am {name} and I am not {age} years old.')
say_something()
say_hello('Elena', 14)
say_hello('John', 10)
say_hello(name='Peter', age=20)
say_hello(age=10, name='Ana') |
def find_numbers(lst, test):
numbers = []
for x in lst:
if test(x):
numbers.append(x)
return numbers
def is_even(n):
return n % 2 == 0
def is_big(n):
return n > 500
numbers = [2, 1, 3, 4, 1000, 10001, 1002, 100, -5, -101, -1]
print(find_numbers(numbers, is_big))
def negate(n):
return -n
def by_abs(n):
return abs(n)
numbers.sort(key=by_abs)
print(numbers)
def get_value(m):
return m[1]
measurements = [ (1, 5), (2, 3), (-1, 100)]
measurements.sort(key=get_value)
print(measurements)
print()
print()
print()
print(find_numbers(numbers, lambda n: n % 5 == 0))
measurements.sort(key=lambda m: -m[1])
print(measurements)
f = lambda x,y,z=5: print(x*y+z)
f(1,2) | def find_numbers(lst, test):
numbers = []
for x in lst:
if test(x):
numbers.append(x)
return numbers
def is_even(n):
return n % 2 == 0
def is_big(n):
return n > 500
numbers = [2, 1, 3, 4, 1000, 10001, 1002, 100, -5, -101, -1]
print(find_numbers(numbers, is_big))
def negate(n):
return -n
def by_abs(n):
return abs(n)
numbers.sort(key=by_abs)
print(numbers)
def get_value(m):
return m[1]
measurements = [(1, 5), (2, 3), (-1, 100)]
measurements.sort(key=get_value)
print(measurements)
print()
print()
print()
print(find_numbers(numbers, lambda n: n % 5 == 0))
measurements.sort(key=lambda m: -m[1])
print(measurements)
f = lambda x, y, z=5: print(x * y + z)
f(1, 2) |
'''import requests
# IDs of the datasets we want to query --> TODO: complete, maybe list in separate file?
datasets_interesting = ['S1084_80_2_409', 'S2060_83_4_435_ENG', 'S2140_87_1_459_ENG', 'S2212_91_3_490_ENG']
# Directory for output/RDF data
dir_processed_eb_rdf = 'data/processed_data/special_eb/metadata/'
def api_request(dataset_ids):
datasets = {}
# Do an API request for every package specified by ID
for dataset_id in dataset_ids:
# Return the metadata of a dataset (package) and its resources
# Documentation: https://app.swaggerhub.com/apis/navarde/eu-open_data_portal/0.7.0#/read/packageShowGet
request_url = 'https://data.europa.eu/euodp/data/apiodp/action/package_show?id=' + dataset_id
response = requests.get(request_url)
# Use JSON/dict representation of the response
datasets[dataset_id] = response.json()
return datasets
def get_rdf_data(dataset_ids):
datasets = api_request(dataset_ids)
for dataset_id in dataset_ids:
# Write the 'rdf' part of the response dict to an RDF file
with open(dir_processed_eb_rdf + dataset_id + ".rdf", "w") as text_file:
print(datasets[dataset_id]['result']['rdf'], file=text_file)
# print(datasets) ## All datasets in the response
get_rdf_data(datasets_interesting)''' | """import requests
# IDs of the datasets we want to query --> TODO: complete, maybe list in separate file?
datasets_interesting = ['S1084_80_2_409', 'S2060_83_4_435_ENG', 'S2140_87_1_459_ENG', 'S2212_91_3_490_ENG']
# Directory for output/RDF data
dir_processed_eb_rdf = 'data/processed_data/special_eb/metadata/'
def api_request(dataset_ids):
datasets = {}
# Do an API request for every package specified by ID
for dataset_id in dataset_ids:
# Return the metadata of a dataset (package) and its resources
# Documentation: https://app.swaggerhub.com/apis/navarde/eu-open_data_portal/0.7.0#/read/packageShowGet
request_url = 'https://data.europa.eu/euodp/data/apiodp/action/package_show?id=' + dataset_id
response = requests.get(request_url)
# Use JSON/dict representation of the response
datasets[dataset_id] = response.json()
return datasets
def get_rdf_data(dataset_ids):
datasets = api_request(dataset_ids)
for dataset_id in dataset_ids:
# Write the 'rdf' part of the response dict to an RDF file
with open(dir_processed_eb_rdf + dataset_id + ".rdf", "w") as text_file:
print(datasets[dataset_id]['result']['rdf'], file=text_file)
# print(datasets) ## All datasets in the response
get_rdf_data(datasets_interesting)""" |
N, T, *A = map(int, open(0).read().split())
t = 10 ** 9 + 1
d = {}
for a in A:
t = min(t, a)
d.setdefault(a - t, 0)
d[a - t] += 1
print(d[max(d)])
| (n, t, *a) = map(int, open(0).read().split())
t = 10 ** 9 + 1
d = {}
for a in A:
t = min(t, a)
d.setdefault(a - t, 0)
d[a - t] += 1
print(d[max(d)]) |
mondey_temparature = [9.1, 8.8, 7.6]
for temparature in mondey_temparature:
print(round(temparature))
for letter in "helllo":
print(letter) | mondey_temparature = [9.1, 8.8, 7.6]
for temparature in mondey_temparature:
print(round(temparature))
for letter in 'helllo':
print(letter) |
def checkdata(b):
clear_output()
display(button0)
print('Initial Data Condition:')
#checkdata = pd.read_excel('story_'+ story.value+'/story'+ story.value+'.xlsx', sheet_name='sample')
checkdata = pd.read_excel('story_0/story0'+'.xlsx', sheet_name='sample')
checkdata['FC_Start_Date'] = checkdata['Arrival_Date'] + pd.to_timedelta(1, unit='D') #startdate next fc
#### Create feature demanddays for 1 floating crane
checkdata['demanddays']= np.ceil(checkdata.Demand_Qty/checkdata.Loading_Rate)
checkdata['demandfc']=np.ceil(checkdata['demanddays']/checkdata.Laytime_Duration)
checkdata.loc[checkdata.demandfc>2,'demandfc']=2
checkdata['demanddays_new']=np.ceil(checkdata.Demand_Qty/(checkdata.Loading_Rate*checkdata['demandfc']))
checkdata['FC_End_Date'] = checkdata['FC_Start_Date'] + pd.to_timedelta(checkdata['demanddays'], unit='D') #startdate next fc
checkdata['Arrival_Date_change']=checkdata.Arrival_Date
checkdata['Departure_Date_change']=checkdata.Departure_Date
checkdata['FC_Start_Date_change']=checkdata.FC_Start_Date
checkdata['FC_End_Date_change']=checkdata.FC_End_Date
chartdata1=checkdata[['MV', 'Price','Arrival_Date','Departure_Date']]
chartdata1['x']=chartdata1.MV
for i in range(0,chartdata1.shape[0]):
chartdata1.loc[i,'MV'] = '1 arv plan - '+chartdata1.loc[i,'MV']
chartdata2=checkdata[['MV', 'Price','Arrival_Date_change','Departure_Date_change']]
chartdata2['x']=chartdata2.MV
for i in range(0,chartdata2.shape[0]):
chartdata2.loc[i,'MV'] = '2 arv actual - '+chartdata2.loc[i,'MV']
chartdata3=checkdata[['MV', 'Price','FC_Start_Date','FC_End_Date']]
chartdata3['x']=chartdata3.MV
for i in range(0,chartdata3.shape[0]):
chartdata3.loc[i,'MV'] = '3 FC work plan - '+chartdata3.loc[i,'MV']
chartdata4=checkdata[['MV', 'Price','FC_Start_Date_change','FC_End_Date_change']]
chartdata4['x']=chartdata4.MV
for i in range(0,chartdata4.shape[0]):
chartdata4.loc[i,'MV'] = '4 FC work actual - '+chartdata4.loc[i,'MV']
chartdata=chartdata1.append(chartdata2,sort=False)
chartdata=chartdata.append(chartdata3,sort=False)
chartdata=chartdata.append(chartdata4,sort=False)
chartdata=chartdata.sort_values(by=['x','MV','Arrival_Date_change','Price'], ascending=[True,True,True,False])
chartdata=chartdata.reset_index()
chartdata.drop('index',axis=1,inplace=True)
chartdata
def gantt_fig(chartdata):
data3 = []
for row in chartdata.itertuples():
data3.append(dict(Task=str(row.MV), Start=str(row.Arrival_Date),
Finish=str(row.Departure_Date), Resource='Plan_Arrival'))
data3.append(dict(Task=str(row.MV), Start=str(row.Arrival_Date_change),
Finish=str(row.Departure_Date_change), Resource='Actual_Arrival'))
data3.append(dict(Task=str(row.MV), Start=str(row.FC_Start_Date),
Finish=str(row.FC_End_Date), Resource='Plan_FC_Working'))
data3.append(dict(Task=str(row.MV), Start=str(row.FC_Start_Date_change),
Finish=str(row.FC_End_Date_change), Resource='Actual_FC_Working'))
colors = dict(Plan_Arrival='rgb(0,0,150)',Actual_Arrival='rgb(0,0,255)' , Plan_FC_Working='rgb(255,140,0)',Actual_FC_Working='rgb(235, 220, 52)')
fig = ff.create_gantt(data3, index_col='Resource', title='Gantt Chart', show_colorbar = True, group_tasks = True , height=500, width=1300 ,colors=colors)
# fig['layout'].update(legend=dict(traceorder='reversed'))
return fig
iplot(gantt_fig(chartdata))
button0
checkdata
return button0, display(checkdata),checkdata | def checkdata(b):
clear_output()
display(button0)
print('Initial Data Condition:')
checkdata = pd.read_excel('story_0/story0' + '.xlsx', sheet_name='sample')
checkdata['FC_Start_Date'] = checkdata['Arrival_Date'] + pd.to_timedelta(1, unit='D')
checkdata['demanddays'] = np.ceil(checkdata.Demand_Qty / checkdata.Loading_Rate)
checkdata['demandfc'] = np.ceil(checkdata['demanddays'] / checkdata.Laytime_Duration)
checkdata.loc[checkdata.demandfc > 2, 'demandfc'] = 2
checkdata['demanddays_new'] = np.ceil(checkdata.Demand_Qty / (checkdata.Loading_Rate * checkdata['demandfc']))
checkdata['FC_End_Date'] = checkdata['FC_Start_Date'] + pd.to_timedelta(checkdata['demanddays'], unit='D')
checkdata['Arrival_Date_change'] = checkdata.Arrival_Date
checkdata['Departure_Date_change'] = checkdata.Departure_Date
checkdata['FC_Start_Date_change'] = checkdata.FC_Start_Date
checkdata['FC_End_Date_change'] = checkdata.FC_End_Date
chartdata1 = checkdata[['MV', 'Price', 'Arrival_Date', 'Departure_Date']]
chartdata1['x'] = chartdata1.MV
for i in range(0, chartdata1.shape[0]):
chartdata1.loc[i, 'MV'] = '1 arv plan - ' + chartdata1.loc[i, 'MV']
chartdata2 = checkdata[['MV', 'Price', 'Arrival_Date_change', 'Departure_Date_change']]
chartdata2['x'] = chartdata2.MV
for i in range(0, chartdata2.shape[0]):
chartdata2.loc[i, 'MV'] = '2 arv actual - ' + chartdata2.loc[i, 'MV']
chartdata3 = checkdata[['MV', 'Price', 'FC_Start_Date', 'FC_End_Date']]
chartdata3['x'] = chartdata3.MV
for i in range(0, chartdata3.shape[0]):
chartdata3.loc[i, 'MV'] = '3 FC work plan - ' + chartdata3.loc[i, 'MV']
chartdata4 = checkdata[['MV', 'Price', 'FC_Start_Date_change', 'FC_End_Date_change']]
chartdata4['x'] = chartdata4.MV
for i in range(0, chartdata4.shape[0]):
chartdata4.loc[i, 'MV'] = '4 FC work actual - ' + chartdata4.loc[i, 'MV']
chartdata = chartdata1.append(chartdata2, sort=False)
chartdata = chartdata.append(chartdata3, sort=False)
chartdata = chartdata.append(chartdata4, sort=False)
chartdata = chartdata.sort_values(by=['x', 'MV', 'Arrival_Date_change', 'Price'], ascending=[True, True, True, False])
chartdata = chartdata.reset_index()
chartdata.drop('index', axis=1, inplace=True)
chartdata
def gantt_fig(chartdata):
data3 = []
for row in chartdata.itertuples():
data3.append(dict(Task=str(row.MV), Start=str(row.Arrival_Date), Finish=str(row.Departure_Date), Resource='Plan_Arrival'))
data3.append(dict(Task=str(row.MV), Start=str(row.Arrival_Date_change), Finish=str(row.Departure_Date_change), Resource='Actual_Arrival'))
data3.append(dict(Task=str(row.MV), Start=str(row.FC_Start_Date), Finish=str(row.FC_End_Date), Resource='Plan_FC_Working'))
data3.append(dict(Task=str(row.MV), Start=str(row.FC_Start_Date_change), Finish=str(row.FC_End_Date_change), Resource='Actual_FC_Working'))
colors = dict(Plan_Arrival='rgb(0,0,150)', Actual_Arrival='rgb(0,0,255)', Plan_FC_Working='rgb(255,140,0)', Actual_FC_Working='rgb(235, 220, 52)')
fig = ff.create_gantt(data3, index_col='Resource', title='Gantt Chart', show_colorbar=True, group_tasks=True, height=500, width=1300, colors=colors)
return fig
iplot(gantt_fig(chartdata))
button0
checkdata
return (button0, display(checkdata), checkdata) |
major = 1
minor = 3
build = 6
version = f"{major}.{minor}.{build}"
| major = 1
minor = 3
build = 6
version = f'{major}.{minor}.{build}' |
def sortPositions(positions):
sorted_positions = {}
for eachposition in positions:
chromosome=eachposition.split(".")[0]
start,end = eachposition.split(":")[-1].split("-")
start,end=int(start),int(end)
sorted_positions[chromosome] = [start,end]
sorted_positions_new={}
for chromosome in sorted_positions:
sorted_positions[chromosome]=sorted(sorted_positions[chromosome],key=lambda x: x[0])
per_chromosome_positions = []
i=0
while i<len(sorted_positions[chromosome]):
i+=1
sorted_positions_new[chromosome] = per_chromosome_positions | def sort_positions(positions):
sorted_positions = {}
for eachposition in positions:
chromosome = eachposition.split('.')[0]
(start, end) = eachposition.split(':')[-1].split('-')
(start, end) = (int(start), int(end))
sorted_positions[chromosome] = [start, end]
sorted_positions_new = {}
for chromosome in sorted_positions:
sorted_positions[chromosome] = sorted(sorted_positions[chromosome], key=lambda x: x[0])
per_chromosome_positions = []
i = 0
while i < len(sorted_positions[chromosome]):
i += 1
sorted_positions_new[chromosome] = per_chromosome_positions |
def array_advance(A):
furthest_reached = 0
i=0
lastIndex = len(A)-1
# If furthest reach still has range and we have not reached goal
while i <= furthest_reached and furthest_reached < lastIndex:
furthest_reached = max(furthest_reached, A[i]+i)
i += 1
return furthest_reached >= lastIndex
# True: Possible to navigate to last index in A:
# Moves: 1,3,2
A = [3, 3, 1, 0, 2, 0, 1]
print(array_advance(A))
# False: Not possible to navigate to last index in A:
A = [2, 4, 1, 1, 0, 2, 3, 0, 0, 3,0,0,3,0,0,2,0]
print(array_advance(A)) | def array_advance(A):
furthest_reached = 0
i = 0
last_index = len(A) - 1
while i <= furthest_reached and furthest_reached < lastIndex:
furthest_reached = max(furthest_reached, A[i] + i)
i += 1
return furthest_reached >= lastIndex
a = [3, 3, 1, 0, 2, 0, 1]
print(array_advance(A))
a = [2, 4, 1, 1, 0, 2, 3, 0, 0, 3, 0, 0, 3, 0, 0, 2, 0]
print(array_advance(A)) |
class ComputeRank(object):
def __init__(self, var_name):
self.var_name = var_name
def __call__(self, documents):
for i, document in enumerate(documents, 1):
document[self.var_name] = i
return documents
| class Computerank(object):
def __init__(self, var_name):
self.var_name = var_name
def __call__(self, documents):
for (i, document) in enumerate(documents, 1):
document[self.var_name] = i
return documents |
stocks = pd.read_csv('all_stocks_SP500.csv')
stocks = stocks.T
stocks.columns = stocks.iloc[0]
stocks = stocks[1:]
stocks['condition1'] = (stocks['price'] > stocks['200 MA']) & (stocks['price'] > stocks['150 MA'])
stocks['condition2'] = stocks['150 MA'] > stocks['200 MA']
#3 The 200-day moving average line is trending up for 1 month
stocks['condition3'] = stocks['200 MA'] > stocks['200 MA_1mago']
stocks['condition4'] = (stocks['50 MA'] > stocks['200 MA']) & (stocks['50 MA'] > stocks['150 MA'])
stocks['condition5'] = stocks['price'] > stocks['50 MA']
#6 The current stock price is at least 30 percent above its 52-week low
stocks['condition6'] = stocks['price'] > stocks['Above_30%_low']
#7 The current stock price is within at least 25 percent of its 52-week high.
stocks['condition7'] = stocks['price'] > stocks['Within_25%_high']
#8 The relative strength ranking is above 80
stocks['condition8'] = stocks['pct_rank'] > 0.8
selection = stocks[(stocks['condition1'] == True) & (stocks['condition2'] == True) & (stocks['condition3'] == True) & (stocks['condition4'] == True)
& (stocks['condition5'] == True) & (stocks['condition6'] == True) & (stocks['condition7'] == True) & (stocks['condition8'] == True)]
print(selection) | stocks = pd.read_csv('all_stocks_SP500.csv')
stocks = stocks.T
stocks.columns = stocks.iloc[0]
stocks = stocks[1:]
stocks['condition1'] = (stocks['price'] > stocks['200 MA']) & (stocks['price'] > stocks['150 MA'])
stocks['condition2'] = stocks['150 MA'] > stocks['200 MA']
stocks['condition3'] = stocks['200 MA'] > stocks['200 MA_1mago']
stocks['condition4'] = (stocks['50 MA'] > stocks['200 MA']) & (stocks['50 MA'] > stocks['150 MA'])
stocks['condition5'] = stocks['price'] > stocks['50 MA']
stocks['condition6'] = stocks['price'] > stocks['Above_30%_low']
stocks['condition7'] = stocks['price'] > stocks['Within_25%_high']
stocks['condition8'] = stocks['pct_rank'] > 0.8
selection = stocks[(stocks['condition1'] == True) & (stocks['condition2'] == True) & (stocks['condition3'] == True) & (stocks['condition4'] == True) & (stocks['condition5'] == True) & (stocks['condition6'] == True) & (stocks['condition7'] == True) & (stocks['condition8'] == True)]
print(selection) |
# pylint: disable=missing-docstring, unused-variable, pointless-statement, too-few-public-methods, useless-object-inheritance
class WrapperClass(object):
def method(self):
var = +4294967296
self.method.__code__.co_consts
| class Wrapperclass(object):
def method(self):
var = +4294967296
self.method.__code__.co_consts |
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
# Version requirements for various tools. Checked by tooling (e.g. fusesoc),
# and inserted into the documentation.
#
# Entries are keyed by tool name. The value is either a string giving the
# minimum version number or is a dictionary. If a dictionary, the following
# keys are recognised:
#
# min_version: Required string. Minimum version number.
#
# as_needed: Optional bool. Defaults to False. If set, this tool is not
# automatically required. If it is asked for, the rest of the
# entry gives the required version.
#
__TOOL_REQUIREMENTS__ = {
'edalize': '0.2.0',
'ninja': {
'min_version': '1.8.2',
'as_needed': True
},
'verilator': {
'min_version': '4.210',
'as_needed': True
},
'hugo_extended': {
'min_version': '0.82.0',
'as_needed': True
},
'verible': {
'min_version': 'v0.0-2135-gb534c1fe',
'as_needed': True
},
'vcs': {
'min_version': '2020.12-SP2',
'as_needed': True
},
'rust': {
'min_version': '1.58.0',
'as_needed': True
},
'vivado': {
'min_version': '2020.2',
'as_needed': True
},
}
| __tool_requirements__ = {'edalize': '0.2.0', 'ninja': {'min_version': '1.8.2', 'as_needed': True}, 'verilator': {'min_version': '4.210', 'as_needed': True}, 'hugo_extended': {'min_version': '0.82.0', 'as_needed': True}, 'verible': {'min_version': 'v0.0-2135-gb534c1fe', 'as_needed': True}, 'vcs': {'min_version': '2020.12-SP2', 'as_needed': True}, 'rust': {'min_version': '1.58.0', 'as_needed': True}, 'vivado': {'min_version': '2020.2', 'as_needed': True}} |
# physical constants in cgs
# Fundamental constants taken from NIST's 2010 CODATA recommended values
c = 2.99792458e10 # speed of light
h = 6.62606957e-27 # Planck constant
hbar = 1.054571726e-27 #
G = 6.67428e-8 # Gravitational constant
e = 4.80320451e-10 # Electron charge
me = 9.10938291e-28 # Electron mass
mp = 1.672621777e-24 # Proton mass
NA = 6.02214129e23 # Avogadro constant
k = 1.3806488e-16 # Boltzmann constant
R = 8.3144621454689518e7 # gas constant = k * NA
# This is how the value of R in LOGI
sigma = 5.670373e-5 # Stefan-Boltzmann constant
sigmaT = 6.652458734e-25 # Thomson cross section
a = 7.5657313567241239e-15 # Radiation density constant
# a = 4.*sigma/c
# because this is how a is computed in LOGI
# conversion factor
eV = 1.602176487e-12 # Electron volt
J = 1.0e7 # 1 Joule = 10^7 erg
N = 1.0e5 # 1 N = 10^5 dyn
# astronomical quantities
AU = 1.496e13 # Astronomical Unit
pc = 3.086e18 # Parsec
ly = 9.463e17 # light year
Jy = 1.0e-23 # Jansky
mJy = 1.0e-23 # mJansky
Msun = 1.98892e33 # Solar mass
Lsun = 3.839e33 # Solar Luminosity
Rsun = 6.955e11 # Solar radius
Mbolsun = 4.7554 # Absolute Bolometric Magnitude of Sun
# time
year = 3.1556926e7 # year in second
day = 86400.0 # day in second
| c = 29979245800.0
h = 6.62606957e-27
hbar = 1.054571726e-27
g = 6.67428e-08
e = 4.80320451e-10
me = 9.10938291e-28
mp = 1.672621777e-24
na = 6.02214129e+23
k = 1.3806488e-16
r = 83144621.45468952
sigma = 5.670373e-05
sigma_t = 6.652458734e-25
a = 7.565731356724124e-15
e_v = 1.602176487e-12
j = 10000000.0
n = 100000.0
au = 14960000000000.0
pc = 3.086e+18
ly = 9.463e+17
jy = 1e-23
m_jy = 1e-23
msun = 1.98892e+33
lsun = 3.839e+33
rsun = 695500000000.0
mbolsun = 4.7554
year = 31556926.0
day = 86400.0 |
#
# PySNMP MIB module NOKIA-ALCHEMYOS-HARDWARE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NOKIA-ALCHEMYOS-HARDWARE-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:23:17 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)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection, ConstraintsUnion, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueSizeConstraint")
hardware, alchemyOSProducts, alchemyOSModules = mibBuilder.importSymbols("NOKIA-ALCHEMYOS-MIB", "hardware", "alchemyOSProducts", "alchemyOSModules")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
ModuleIdentity, Bits, iso, Counter64, MibIdentifier, Gauge32, TimeTicks, Counter32, IpAddress, ObjectIdentity, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "ModuleIdentity", "Bits", "iso", "Counter64", "MibIdentifier", "Gauge32", "TimeTicks", "Counter32", "IpAddress", "ObjectIdentity", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "Unsigned32")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
nokiaAlchemyOSHardwareMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 94, 1, 45, 5, 4))
nokiaAlchemyOSHardwareMIB.setRevisions(('2001-01-18 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: nokiaAlchemyOSHardwareMIB.setRevisionsDescriptions(('Cleanup.',))
if mibBuilder.loadTexts: nokiaAlchemyOSHardwareMIB.setLastUpdated('200101180000Z')
if mibBuilder.loadTexts: nokiaAlchemyOSHardwareMIB.setOrganization('Nokia Internet Communications.')
if mibBuilder.loadTexts: nokiaAlchemyOSHardwareMIB.setContactInfo(' Nokia, Inc. Customer Support Postal: 100 Enterprise Way, Module B Scotts Valley, CA 95066 USA E-Mail: snmp-contact@cips.nokia.com')
if mibBuilder.loadTexts: nokiaAlchemyOSHardwareMIB.setDescription('Hardware (and version) MIB module.')
hardwarePrimaryCPU = MibScalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hardwarePrimaryCPU.setStatus('current')
if mibBuilder.loadTexts: hardwarePrimaryCPU.setDescription('Primary CPU load (percent).')
hardwareSecondaryCpu = MibScalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hardwareSecondaryCpu.setStatus('current')
if mibBuilder.loadTexts: hardwareSecondaryCpu.setDescription('Secondary CPU load (percent). Value -1 indicates that second CPU is not present.')
hardwareHifnLoadAve = MibScalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hardwareHifnLoadAve.setStatus('current')
if mibBuilder.loadTexts: hardwareHifnLoadAve.setDescription('Cryptographic co-processor load (percent). Value -1 indicates that cryptographic co-processor is not present.')
hardwareMemoryUsage = MibScalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hardwareMemoryUsage.setStatus('current')
if mibBuilder.loadTexts: hardwareMemoryUsage.setDescription('Percent of memory currently in use.')
hardwarIOLoad = MibScalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hardwarIOLoad.setStatus('current')
if mibBuilder.loadTexts: hardwarIOLoad.setDescription('Packets per second sent and received.')
hardwareUpTime = MibScalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hardwareUpTime.setStatus('current')
if mibBuilder.loadTexts: hardwareUpTime.setDescription('Uptime in seconds.')
hardwareOSName = MibScalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 7), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hardwareOSName.setStatus('current')
if mibBuilder.loadTexts: hardwareOSName.setDescription('Operating system name.')
hardwareOSVersion = MibScalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 8), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hardwareOSVersion.setStatus('current')
if mibBuilder.loadTexts: hardwareOSVersion.setDescription('Operating system (kernel) version.')
hardwareCompileUser = MibScalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 9), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hardwareCompileUser.setStatus('current')
if mibBuilder.loadTexts: hardwareCompileUser.setDescription('What user compiled this kernel.')
hardwareCompileDate = MibScalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 10), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hardwareCompileDate.setStatus('current')
if mibBuilder.loadTexts: hardwareCompileDate.setDescription('Compile date and time.')
hardwareCompileHost = MibScalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 11), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hardwareCompileHost.setStatus('current')
if mibBuilder.loadTexts: hardwareCompileHost.setDescription('Computer where this build was made.')
hardwareConfigVersion = MibScalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hardwareConfigVersion.setStatus('current')
if mibBuilder.loadTexts: hardwareConfigVersion.setDescription('Version of config file (number of config saves).')
mibBuilder.exportSymbols("NOKIA-ALCHEMYOS-HARDWARE-MIB", hardwareCompileHost=hardwareCompileHost, hardwareMemoryUsage=hardwareMemoryUsage, hardwareOSName=hardwareOSName, hardwareConfigVersion=hardwareConfigVersion, hardwareUpTime=hardwareUpTime, nokiaAlchemyOSHardwareMIB=nokiaAlchemyOSHardwareMIB, hardwareSecondaryCpu=hardwareSecondaryCpu, hardwareOSVersion=hardwareOSVersion, hardwareCompileDate=hardwareCompileDate, hardwarePrimaryCPU=hardwarePrimaryCPU, hardwareCompileUser=hardwareCompileUser, hardwareHifnLoadAve=hardwareHifnLoadAve, hardwarIOLoad=hardwarIOLoad, PYSNMP_MODULE_ID=nokiaAlchemyOSHardwareMIB)
| (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, value_range_constraint, constraints_intersection, constraints_union, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueSizeConstraint')
(hardware, alchemy_os_products, alchemy_os_modules) = mibBuilder.importSymbols('NOKIA-ALCHEMYOS-MIB', 'hardware', 'alchemyOSProducts', 'alchemyOSModules')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(module_identity, bits, iso, counter64, mib_identifier, gauge32, time_ticks, counter32, ip_address, object_identity, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, integer32, unsigned32) = mibBuilder.importSymbols('SNMPv2-SMI', 'ModuleIdentity', 'Bits', 'iso', 'Counter64', 'MibIdentifier', 'Gauge32', 'TimeTicks', 'Counter32', 'IpAddress', 'ObjectIdentity', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Integer32', 'Unsigned32')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
nokia_alchemy_os_hardware_mib = module_identity((1, 3, 6, 1, 4, 1, 94, 1, 45, 5, 4))
nokiaAlchemyOSHardwareMIB.setRevisions(('2001-01-18 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
nokiaAlchemyOSHardwareMIB.setRevisionsDescriptions(('Cleanup.',))
if mibBuilder.loadTexts:
nokiaAlchemyOSHardwareMIB.setLastUpdated('200101180000Z')
if mibBuilder.loadTexts:
nokiaAlchemyOSHardwareMIB.setOrganization('Nokia Internet Communications.')
if mibBuilder.loadTexts:
nokiaAlchemyOSHardwareMIB.setContactInfo(' Nokia, Inc. Customer Support Postal: 100 Enterprise Way, Module B Scotts Valley, CA 95066 USA E-Mail: snmp-contact@cips.nokia.com')
if mibBuilder.loadTexts:
nokiaAlchemyOSHardwareMIB.setDescription('Hardware (and version) MIB module.')
hardware_primary_cpu = mib_scalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hardwarePrimaryCPU.setStatus('current')
if mibBuilder.loadTexts:
hardwarePrimaryCPU.setDescription('Primary CPU load (percent).')
hardware_secondary_cpu = mib_scalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hardwareSecondaryCpu.setStatus('current')
if mibBuilder.loadTexts:
hardwareSecondaryCpu.setDescription('Secondary CPU load (percent). Value -1 indicates that second CPU is not present.')
hardware_hifn_load_ave = mib_scalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hardwareHifnLoadAve.setStatus('current')
if mibBuilder.loadTexts:
hardwareHifnLoadAve.setDescription('Cryptographic co-processor load (percent). Value -1 indicates that cryptographic co-processor is not present.')
hardware_memory_usage = mib_scalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hardwareMemoryUsage.setStatus('current')
if mibBuilder.loadTexts:
hardwareMemoryUsage.setDescription('Percent of memory currently in use.')
hardwar_io_load = mib_scalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hardwarIOLoad.setStatus('current')
if mibBuilder.loadTexts:
hardwarIOLoad.setDescription('Packets per second sent and received.')
hardware_up_time = mib_scalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hardwareUpTime.setStatus('current')
if mibBuilder.loadTexts:
hardwareUpTime.setDescription('Uptime in seconds.')
hardware_os_name = mib_scalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 7), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hardwareOSName.setStatus('current')
if mibBuilder.loadTexts:
hardwareOSName.setDescription('Operating system name.')
hardware_os_version = mib_scalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 8), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hardwareOSVersion.setStatus('current')
if mibBuilder.loadTexts:
hardwareOSVersion.setDescription('Operating system (kernel) version.')
hardware_compile_user = mib_scalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 9), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hardwareCompileUser.setStatus('current')
if mibBuilder.loadTexts:
hardwareCompileUser.setDescription('What user compiled this kernel.')
hardware_compile_date = mib_scalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 10), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hardwareCompileDate.setStatus('current')
if mibBuilder.loadTexts:
hardwareCompileDate.setDescription('Compile date and time.')
hardware_compile_host = mib_scalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 11), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hardwareCompileHost.setStatus('current')
if mibBuilder.loadTexts:
hardwareCompileHost.setDescription('Computer where this build was made.')
hardware_config_version = mib_scalar((1, 3, 6, 1, 4, 1, 94, 1, 45, 2, 2, 12), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hardwareConfigVersion.setStatus('current')
if mibBuilder.loadTexts:
hardwareConfigVersion.setDescription('Version of config file (number of config saves).')
mibBuilder.exportSymbols('NOKIA-ALCHEMYOS-HARDWARE-MIB', hardwareCompileHost=hardwareCompileHost, hardwareMemoryUsage=hardwareMemoryUsage, hardwareOSName=hardwareOSName, hardwareConfigVersion=hardwareConfigVersion, hardwareUpTime=hardwareUpTime, nokiaAlchemyOSHardwareMIB=nokiaAlchemyOSHardwareMIB, hardwareSecondaryCpu=hardwareSecondaryCpu, hardwareOSVersion=hardwareOSVersion, hardwareCompileDate=hardwareCompileDate, hardwarePrimaryCPU=hardwarePrimaryCPU, hardwareCompileUser=hardwareCompileUser, hardwareHifnLoadAve=hardwareHifnLoadAve, hardwarIOLoad=hardwarIOLoad, PYSNMP_MODULE_ID=nokiaAlchemyOSHardwareMIB) |
# Input contains a number of pairs of parentheses, extract each group seperately
stack = []
pairs = []
s = "Outer (First inner (first nested group) group) parentheses (another group)"
for i, char in enumerate(s):
if char == "(":
stack.append(i)
elif char == ")":
pairs.append((stack.pop(), i))
for pair in pairs:
print(s[pair[0] : pair[1]+1])
# Extract the group starting at the given index
# This will fail if the starting index has a ) before
# the next ( but I'm too lazy to fix it
def get_group(ii, s):
stack = []
for i, char in enumerate(s[ii:]):
if char == "(":
stack.append(i)
elif char == ")":
j = stack.pop()
if not stack:
return (j+ii, i+ii)
test = get_group(19, s)
print(s[test[0] : test[1]+1])
test = get_group(0, s)
print(s[test[0] : test[1]+1])
print("noice")
| stack = []
pairs = []
s = 'Outer (First inner (first nested group) group) parentheses (another group)'
for (i, char) in enumerate(s):
if char == '(':
stack.append(i)
elif char == ')':
pairs.append((stack.pop(), i))
for pair in pairs:
print(s[pair[0]:pair[1] + 1])
def get_group(ii, s):
stack = []
for (i, char) in enumerate(s[ii:]):
if char == '(':
stack.append(i)
elif char == ')':
j = stack.pop()
if not stack:
return (j + ii, i + ii)
test = get_group(19, s)
print(s[test[0]:test[1] + 1])
test = get_group(0, s)
print(s[test[0]:test[1] + 1])
print('noice') |
# TODO: Add import statements
# Assign the data to predictor and outcome variables
# TODO: Load the data
train_data = None
X = None
y = None
# Create polynomial features
# TODO: Create a PolynomialFeatures object, then fit and transform the
# predictor feature
poly_feat = None
X_poly = None
# Make and fit the polynomial regression model
# TODO: Create a LinearRegression object and fit it to the polynomial predictor
# features
poly_model = None
# Once you've completed all of the steps, select Test Run to see your model
# predictions against the data, or select Submit Answer to check if the degree
# of the polynomial features is the same as ours! | train_data = None
x = None
y = None
poly_feat = None
x_poly = None
poly_model = None |
DB_VALUE_PREPROCESSING = "Calls or returns the specified input value's attribute when saved to the database"
FIXED_KWARGS = "Fixed run method keyword arguments"
IS_CONFIGURATION = "Whether this definition represents a configuration of the analysis (rather than data input)"
MAX_PARALLEL = "Maximal number of parallel executions"
NESTED_RESULTS_ATTRIBUTE = "Name of an attribute to be returned or called in order to retreive the output dictionary"
RUN_METHOD_INPUT = "Pass this input when calling the run method (and not at interface initialization)"
RUN_METHOD_KEY = "Custom run method name"
VALUE_ATTRIBUTE = "Calls or returns the specified input value's attribute when passed to the interface"
# flake8: noqa: E501
| db_value_preprocessing = "Calls or returns the specified input value's attribute when saved to the database"
fixed_kwargs = 'Fixed run method keyword arguments'
is_configuration = 'Whether this definition represents a configuration of the analysis (rather than data input)'
max_parallel = 'Maximal number of parallel executions'
nested_results_attribute = 'Name of an attribute to be returned or called in order to retreive the output dictionary'
run_method_input = 'Pass this input when calling the run method (and not at interface initialization)'
run_method_key = 'Custom run method name'
value_attribute = "Calls or returns the specified input value's attribute when passed to the interface" |
# Title : Print Prime Number till the specified limit
# Author : Kiran raj R.
# Date : 16:10:2020
userInput = int(input("Enter the limit of the prime number : "))
def primeLimit(limit):
for num in range(2, limit):
for i in range(2, num):
if num % i == 0:
break
else:
print(num)
primeLimit(userInput)
| user_input = int(input('Enter the limit of the prime number : '))
def prime_limit(limit):
for num in range(2, limit):
for i in range(2, num):
if num % i == 0:
break
else:
print(num)
prime_limit(userInput) |
built_modules = list(name for name in
"Core;Gui;Widgets;PrintSupport;Sql;Network;Test;Concurrent;WinExtras;Xml;XmlPatterns;Help;Multimedia;MultimediaWidgets;OpenGL;OpenGLFunctions;Positioning;Location;Qml;Quick;QuickControls2;QuickWidgets;RemoteObjects;Scxml;Script;ScriptTools;Sensors;SerialPort;TextToSpeech;Charts;Svg;DataVisualization;UiTools;AxContainer;WebChannel;WebEngineCore;WebEngine;WebEngineWidgets;WebSockets;3DCore;3DRender;3DInput;3DLogic;3DAnimation;3DExtras"
.split(";"))
shiboken_library_soversion = str(5.15)
pyside_library_soversion = str(5.15)
version = "5.15.2.1"
version_info = (5, 15, 2.1, "", "")
__build_date__ = '2022-01-07T13:16:52+00:00'
__setup_py_package_version__ = '5.15.2.1'
| built_modules = list((name for name in 'Core;Gui;Widgets;PrintSupport;Sql;Network;Test;Concurrent;WinExtras;Xml;XmlPatterns;Help;Multimedia;MultimediaWidgets;OpenGL;OpenGLFunctions;Positioning;Location;Qml;Quick;QuickControls2;QuickWidgets;RemoteObjects;Scxml;Script;ScriptTools;Sensors;SerialPort;TextToSpeech;Charts;Svg;DataVisualization;UiTools;AxContainer;WebChannel;WebEngineCore;WebEngine;WebEngineWidgets;WebSockets;3DCore;3DRender;3DInput;3DLogic;3DAnimation;3DExtras'.split(';')))
shiboken_library_soversion = str(5.15)
pyside_library_soversion = str(5.15)
version = '5.15.2.1'
version_info = (5, 15, 2.1, '', '')
__build_date__ = '2022-01-07T13:16:52+00:00'
__setup_py_package_version__ = '5.15.2.1' |
# Collaborators: none
#
# Write a program that asks for the user's name and another piece of information.Then prints a response using both of the inputs.
x= input("Your name: ")
print ("Hello there, " + x + "!")
y= input("How are you, " + x + "?: ")
print (y + " huh, okay thank you " + x + ", for letting me know!") | x = input('Your name: ')
print('Hello there, ' + x + '!')
y = input('How are you, ' + x + '?: ')
print(y + ' huh, okay thank you ' + x + ', for letting me know!') |
t = int(input())
for _ in range(t):
l = list(map(str, input().split()))
for i in range(len(l) - 1):
l[i] = l[i][0].upper() + "."
l[len(l) - 1] = l[len(l) - 1][0].upper() + l[len(l) - 1][1:].lower()
print(" ".join(l)) | t = int(input())
for _ in range(t):
l = list(map(str, input().split()))
for i in range(len(l) - 1):
l[i] = l[i][0].upper() + '.'
l[len(l) - 1] = l[len(l) - 1][0].upper() + l[len(l) - 1][1:].lower()
print(' '.join(l)) |
num = 10
if num < 10:
print("number is less than 10")
elif num > 10:
print("number is greater than 10")
else:
print("the number is equal to 10")
| num = 10
if num < 10:
print('number is less than 10')
elif num > 10:
print('number is greater than 10')
else:
print('the number is equal to 10') |
class Action(object):
def __init__(self, actionroot):
self.name = actionroot.find('./name').text
argumentLists = None
if len(actionroot.findall('./argumentList/argument')) > 0:
argumentLists = actionroot.findall('./argumentList/argument')
else:
argumentLists = actionroot.findall('./argumentList')
self.arguments = []
for argument in argumentLists:
try:
argumentName = argument.find('./name').text
relatedStateVariable = argument.find('./relatedStateVariable').text.lower()
direction = argument.find('./direction').text
self.arguments.append({ 'name': argumentName, 'relatedStateVariable': relatedStateVariable, 'direction': direction })
except:
print("Unable to extract arguments for action: ", self.name)
| class Action(object):
def __init__(self, actionroot):
self.name = actionroot.find('./name').text
argument_lists = None
if len(actionroot.findall('./argumentList/argument')) > 0:
argument_lists = actionroot.findall('./argumentList/argument')
else:
argument_lists = actionroot.findall('./argumentList')
self.arguments = []
for argument in argumentLists:
try:
argument_name = argument.find('./name').text
related_state_variable = argument.find('./relatedStateVariable').text.lower()
direction = argument.find('./direction').text
self.arguments.append({'name': argumentName, 'relatedStateVariable': relatedStateVariable, 'direction': direction})
except:
print('Unable to extract arguments for action: ', self.name) |
description = 'detector setup'
group = 'lowlevel'
devices = dict(
monitor = device('nicos.devices.generic.VirtualCounter',
description = 'simulated monitor',
fmtstr = '%d',
type = 'monitor',
visibility = (),
),
timer = device('nicos.devices.generic.VirtualTimer',
description = 'simulated timer',
fmtstr = '%.2f',
visibility = (),
),
image = device('nicos.devices.generic.VirtualImage',
description = 'Image data device',
fmtstr = '%d',
size = (256, 256),
visibility = (),
),
cam = device('nicos.devices.generic.Detector',
description = 'classical detector',
timers = ['timer'],
monitors = ['monitor'],
images = ['image'],
),
lsd = device("nicos.devices.generic.Axis",
description = "detector arm translation",
motor = device('nicos.devices.generic.VirtualMotor',
abslimits = (900, 1500),
unit = 'mm',
speed = 1,
curvalue = 900,
),
precision = 0.01,
fmtstr = "%.2f",
),
)
| description = 'detector setup'
group = 'lowlevel'
devices = dict(monitor=device('nicos.devices.generic.VirtualCounter', description='simulated monitor', fmtstr='%d', type='monitor', visibility=()), timer=device('nicos.devices.generic.VirtualTimer', description='simulated timer', fmtstr='%.2f', visibility=()), image=device('nicos.devices.generic.VirtualImage', description='Image data device', fmtstr='%d', size=(256, 256), visibility=()), cam=device('nicos.devices.generic.Detector', description='classical detector', timers=['timer'], monitors=['monitor'], images=['image']), lsd=device('nicos.devices.generic.Axis', description='detector arm translation', motor=device('nicos.devices.generic.VirtualMotor', abslimits=(900, 1500), unit='mm', speed=1, curvalue=900), precision=0.01, fmtstr='%.2f')) |
class Solution:
def maxSlidingWindow(self, nums: List[int], k: int) -> List[int]:
'''
T: O(n log k) and S: O(k)
result = []
for i in range(len(nums) - k + 1):
numsK = nums[i: i + k]
heapq._heapify_max(numsK)
result.append(numsK[0])
return result
T: O(n) and S: O(k)
'''
result = []
q = deque()
for i in range(len(nums)):
while q and (nums[q[-1]] < nums[i]):
q.pop()
if q and (i - q[0] >= k):
q.popleft()
q.append(i)
result.append(nums[q[0]])
return result[k-1:]
| class Solution:
def max_sliding_window(self, nums: List[int], k: int) -> List[int]:
"""
T: O(n log k) and S: O(k)
result = []
for i in range(len(nums) - k + 1):
numsK = nums[i: i + k]
heapq._heapify_max(numsK)
result.append(numsK[0])
return result
T: O(n) and S: O(k)
"""
result = []
q = deque()
for i in range(len(nums)):
while q and nums[q[-1]] < nums[i]:
q.pop()
if q and i - q[0] >= k:
q.popleft()
q.append(i)
result.append(nums[q[0]])
return result[k - 1:] |
# Marc's Cakewalk
# Developer: Murillo Grubler
# Link: https://www.hackerrank.com/challenges/marcs-cakewalk/problem
# Function O(n)
def must_walk(n, arr):
count = 0
for i in range(n):
count = count + (arr[i] * (2 ** i))
return count
n = int(input().strip())
calories = sorted(list(map(int, input().strip().split(' '))), reverse=True)
print (must_walk(n, calories)) | def must_walk(n, arr):
count = 0
for i in range(n):
count = count + arr[i] * 2 ** i
return count
n = int(input().strip())
calories = sorted(list(map(int, input().strip().split(' '))), reverse=True)
print(must_walk(n, calories)) |
class LinkedListException(Exception):
pass
class Node(object):
def __init__(self, value, next_node, previous_node=None):
self.value = value
self.next_node = next_node
self.previous_node = previous_node
class _LinkedList(object):
def __init__(self):
self.last_node = None
self.linked_list_size = 0
def append(self, value):
raise LinkedListException('Not implemented error')
def _delete(self, value):
node = self.last_node
if node.value == value:
return node.next_node
while (node.next_node != None):
if (node.next_node.value == value):
node_delete = node.next_node
node.next_node = node.next_node.next_node
del node_delete
return self.last_node
node = node.next_node
return self.last_node
def delete(self, value):
self.last_node = self._delete(value)
self.linked_list_size -= 1
def __delitem__(self, idx):
if idx > self.linked_list_size - 1:
raise IndexError("LinkedList index is out of bound")
idx_node = self.last_node
if idx == self.linked_list_size - 1:
self.last_node = self.last_node.next_node
else:
pass
def __getitem__(self, idx):
if idx > self.linked_list_size - 1:
raise IndexError("LinkedList index is out of bound")
idx_node = self.last_node
for i in range(self.linked_list_size-idx-1):
idx_node = idx_node.next_node
return idx_node.value
def __contains__(self, value):
node = self.last_node
for i in range(self.linked_list_size):
if node.value == value:
return True
node = node.next_node
return False
class SinglyLinkedList(_LinkedList):
def append(self, value):
new_node = Node(value, self.last_node)
self.last_node = new_node
self.linked_list_size += 1
class DoublyLinkedList(_LinkedList):
def append(self, value):
new_node = Node(value, self.last_node)
self.last_node.previous_node = new_node
self.last_node = new_node
self.linked_list_size += 1
| class Linkedlistexception(Exception):
pass
class Node(object):
def __init__(self, value, next_node, previous_node=None):
self.value = value
self.next_node = next_node
self.previous_node = previous_node
class _Linkedlist(object):
def __init__(self):
self.last_node = None
self.linked_list_size = 0
def append(self, value):
raise linked_list_exception('Not implemented error')
def _delete(self, value):
node = self.last_node
if node.value == value:
return node.next_node
while node.next_node != None:
if node.next_node.value == value:
node_delete = node.next_node
node.next_node = node.next_node.next_node
del node_delete
return self.last_node
node = node.next_node
return self.last_node
def delete(self, value):
self.last_node = self._delete(value)
self.linked_list_size -= 1
def __delitem__(self, idx):
if idx > self.linked_list_size - 1:
raise index_error('LinkedList index is out of bound')
idx_node = self.last_node
if idx == self.linked_list_size - 1:
self.last_node = self.last_node.next_node
else:
pass
def __getitem__(self, idx):
if idx > self.linked_list_size - 1:
raise index_error('LinkedList index is out of bound')
idx_node = self.last_node
for i in range(self.linked_list_size - idx - 1):
idx_node = idx_node.next_node
return idx_node.value
def __contains__(self, value):
node = self.last_node
for i in range(self.linked_list_size):
if node.value == value:
return True
node = node.next_node
return False
class Singlylinkedlist(_LinkedList):
def append(self, value):
new_node = node(value, self.last_node)
self.last_node = new_node
self.linked_list_size += 1
class Doublylinkedlist(_LinkedList):
def append(self, value):
new_node = node(value, self.last_node)
self.last_node.previous_node = new_node
self.last_node = new_node
self.linked_list_size += 1 |
def encrypt(text,s):
# Cipher(n) = De-cipher(26-n)
s=s
text =text.replace(" ","")
result="" #empty string
for i in range(len(text)):
char=text[i]
if(char.isupper()): #if the text[i] is in upper case
result=result+chr((ord(char)+s-65)%26+65)
else:
result=result+chr((ord(char)+s-97)%26+97)
return result
word=str(input("enter the word:"))
k=int(input("Enter the key: "))
print("Encoded word in Caeser cipher is: ",encrypt(word,k))
'''
----------OUTPUT----------
enter the word:hi there my name is abhiram
Enter the key: 3
Encoded word in Caeser cipher is: klwkhuhpbqdphlvdekludp
>>>
'''
| def encrypt(text, s):
s = s
text = text.replace(' ', '')
result = ''
for i in range(len(text)):
char = text[i]
if char.isupper():
result = result + chr((ord(char) + s - 65) % 26 + 65)
else:
result = result + chr((ord(char) + s - 97) % 26 + 97)
return result
word = str(input('enter the word:'))
k = int(input('Enter the key: '))
print('Encoded word in Caeser cipher is: ', encrypt(word, k))
'\n----------OUTPUT----------\nenter the word:hi there my name is abhiram\nEnter the key: 3\nEncoded word in Caeser cipher is: klwkhuhpbqdphlvdekludp\n>>> \n' |
class Contact:
def __init__(self, first_name=None, last_name=None, id=None, all_phones_from_home_page=None,
all_emails_from_home_page=None, address=None, email=None, email2=None, email3=None,
home_phone=None, mobile_phone=None, work_phone=None, secondary_phone=None):
self.first_name = first_name
self.last_name = last_name
self.id = id
self.home_phone = home_phone
self.mobile_phone = mobile_phone
self.work_phone = work_phone
self.secondary_phone = secondary_phone
self.all_phones_from_home_page = all_phones_from_home_page
self.all_emails_from_home_page = all_emails_from_home_page
self.address = address
self.email = email
self.email2 = email2
self.email3 = email3
def __repr__(self):
return "%s %s: %s" % (self.first_name, self.last_name, self.id)
def __eq__(self, other):
return (self.id == other.id or self.id is None or other.id is None) and\
self.first_name == other.first_name and self.last_name == other.last_name
| class Contact:
def __init__(self, first_name=None, last_name=None, id=None, all_phones_from_home_page=None, all_emails_from_home_page=None, address=None, email=None, email2=None, email3=None, home_phone=None, mobile_phone=None, work_phone=None, secondary_phone=None):
self.first_name = first_name
self.last_name = last_name
self.id = id
self.home_phone = home_phone
self.mobile_phone = mobile_phone
self.work_phone = work_phone
self.secondary_phone = secondary_phone
self.all_phones_from_home_page = all_phones_from_home_page
self.all_emails_from_home_page = all_emails_from_home_page
self.address = address
self.email = email
self.email2 = email2
self.email3 = email3
def __repr__(self):
return '%s %s: %s' % (self.first_name, self.last_name, self.id)
def __eq__(self, other):
return (self.id == other.id or self.id is None or other.id is None) and self.first_name == other.first_name and (self.last_name == other.last_name) |
tags = db.Table('tags',
db.Column('tag_id', db.Integer, db.ForeignKey('tag.id'), primary_key=True),
db.Column('page_id', db.Integer, db.ForeignKey('page.id'), primary_key=True)
)
class Page(db.Model):
id = db.Column(db.Integer, primary_key=True)
tags = db.relationship('Tag', secondary=tags, lazy='subquery',
backref=db.backref('pages', lazy=True))
class Tag(db.Model):
id = db.Column(db.Integer, primary_key=True)
# https://dev.to/chidioguejiofor/eager-loading-vs-lazy-loading-in-sqlalchemy-5209
# Nested Queries with SQLAlchemy ORM
#https://blog.miguelgrinberg.com/post/nested-queries-with-sqlalchemy-orm | tags = db.Table('tags', db.Column('tag_id', db.Integer, db.ForeignKey('tag.id'), primary_key=True), db.Column('page_id', db.Integer, db.ForeignKey('page.id'), primary_key=True))
class Page(db.Model):
id = db.Column(db.Integer, primary_key=True)
tags = db.relationship('Tag', secondary=tags, lazy='subquery', backref=db.backref('pages', lazy=True))
class Tag(db.Model):
id = db.Column(db.Integer, primary_key=True) |
# import pytest
# import calculator_cha2ds2 as cal
# import validation_cha2ds2 as val
# import fetch_data_cha2ds2 as fd
class TestCalculator:
def test_calculate(self):
assert True
class TestFetchData:
def test_fetch_data(self):
assert True
def test_create_connection(self):
assert True
def test_query_data(self):
assert True
def test_clean_data(self):
assert True
class TestMain:
def test_renal_transplant(self):
assert True
class TestValidation:
def test_validate(self):
assert True
def test_validation(self):
assert True
| class Testcalculator:
def test_calculate(self):
assert True
class Testfetchdata:
def test_fetch_data(self):
assert True
def test_create_connection(self):
assert True
def test_query_data(self):
assert True
def test_clean_data(self):
assert True
class Testmain:
def test_renal_transplant(self):
assert True
class Testvalidation:
def test_validate(self):
assert True
def test_validation(self):
assert True |
allPoints = []
epsilon = 0
def setup():
global rdp
size(400, 400)
for x in range(width):
xval = map(x, 0, width, 0, 5);
yval = exp(-xval) * cos(TWO_PI*xval);
y = map(yval, -1, 1, height, 0);
allPoints.append(PVector(x, y));
def draw():
global epsilon
background(51)
stroke(255)
noFill()
beginShape()
for v in allPoints:
vertex(v.x, v.y)
endShape()
stroke(255, 0, 0)
rdp = RDP(allPoints, epsilon)
print(epsilon)
epsilon += 1
if epsilon > 100:
epsilon = 0
beginShape();
for v in rdp:
vertex(v.x, v.y)
endShape();
def RDP(points, seuil):
dmax = 0
index = -1
for i in range(1, len(points)-1):
seg = PVector(points[-1].x - points[0].x, points[-1].y - points[0].y)
m = seg.x / seg.y
x = points[-1].x
y = points[-1].y
b = y - m * x
d = abs(m * points[i].x - points[i].y + b)/sqrt(m**2+1)
if d > dmax:
index = i
dmax = d
if dmax > seuil:
recPoints1 = RDP(points[:index+1], seuil)
recPoints2 = RDP(points[index:], seuil)
return recPoints1[:-1] + recPoints2
else:
return [points[0], points[-1]]
| all_points = []
epsilon = 0
def setup():
global rdp
size(400, 400)
for x in range(width):
xval = map(x, 0, width, 0, 5)
yval = exp(-xval) * cos(TWO_PI * xval)
y = map(yval, -1, 1, height, 0)
allPoints.append(p_vector(x, y))
def draw():
global epsilon
background(51)
stroke(255)
no_fill()
begin_shape()
for v in allPoints:
vertex(v.x, v.y)
end_shape()
stroke(255, 0, 0)
rdp = rdp(allPoints, epsilon)
print(epsilon)
epsilon += 1
if epsilon > 100:
epsilon = 0
begin_shape()
for v in rdp:
vertex(v.x, v.y)
end_shape()
def rdp(points, seuil):
dmax = 0
index = -1
for i in range(1, len(points) - 1):
seg = p_vector(points[-1].x - points[0].x, points[-1].y - points[0].y)
m = seg.x / seg.y
x = points[-1].x
y = points[-1].y
b = y - m * x
d = abs(m * points[i].x - points[i].y + b) / sqrt(m ** 2 + 1)
if d > dmax:
index = i
dmax = d
if dmax > seuil:
rec_points1 = rdp(points[:index + 1], seuil)
rec_points2 = rdp(points[index:], seuil)
return recPoints1[:-1] + recPoints2
else:
return [points[0], points[-1]] |
#
# PySNMP MIB module HP-ICF-BRIDGE (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HP-ICF-BRIDGE
# Produced by pysmi-0.3.4 at Mon Apr 29 19:20: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)
#
OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint")
dot1dBasePortEntry, = mibBuilder.importSymbols("BRIDGE-MIB", "dot1dBasePortEntry")
VidList, = mibBuilder.importSymbols("HP-ICF-FTRCO", "VidList")
hpSwitch, = mibBuilder.importSymbols("HP-ICF-OID", "hpSwitch")
ConfigStatus, = mibBuilder.importSymbols("HP-ICF-TC", "ConfigStatus")
ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex")
dot1qVlanStaticEntry, VlanIndex, VlanId = mibBuilder.importSymbols("Q-BRIDGE-MIB", "dot1qVlanStaticEntry", "VlanIndex", "VlanId")
portCopyEntry, = mibBuilder.importSymbols("SMON-MIB", "portCopyEntry")
ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup")
Gauge32, ObjectIdentity, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, ModuleIdentity, Counter32, Counter64, Bits, Integer32, iso, IpAddress, Unsigned32, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "ObjectIdentity", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "ModuleIdentity", "Counter32", "Counter64", "Bits", "Integer32", "iso", "IpAddress", "Unsigned32", "TimeTicks")
TruthValue, DisplayString, TextualConvention, TimeStamp = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "DisplayString", "TextualConvention", "TimeStamp")
hpicfBridge = ModuleIdentity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12))
hpicfBridge.setRevisions(('2014-04-27 00:00', '2013-10-11 00:00', '2012-07-13 00:00', '2012-05-30 00:00', '2010-06-26 00:00', '2009-12-15 00:00', '2009-02-11 00:00', '2006-09-30 00:00', '2006-09-26 00:00', '2006-08-13 17:38', '2003-02-20 00:00', '2002-05-23 17:38', '2001-10-03 20:50', '2000-11-03 06:42',))
if mibBuilder.loadTexts: hpicfBridge.setLastUpdated('201404270000Z')
if mibBuilder.loadTexts: hpicfBridge.setOrganization('HP Networking')
class BridgeId(TextualConvention, OctetString):
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(8, 8)
fixedLength = 8
hpicfBridgeObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1))
hpicfBridgeBase = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 1))
hpicfBridgeMaxVlans = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4094))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeMaxVlans.setStatus('current')
hpicfBridgeVlanEnable = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeVlanEnable.setStatus('current')
hpicfBridgePrimaryVlan = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 1, 3), VlanIndex()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgePrimaryVlan.setStatus('current')
hpicfBridgeVlanConfigStatus = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 1, 4), ConfigStatus()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpicfBridgeVlanConfigStatus.setStatus('current')
hpicfBridgeGvrp = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 2))
hpicfBridgeGvrpPortTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 2, 1), )
if mibBuilder.loadTexts: hpicfBridgeGvrpPortTable.setStatus('current')
hpicfBridgeGvrpPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 2, 1, 1), )
dot1dBasePortEntry.registerAugmentions(("HP-ICF-BRIDGE", "hpicfBridgeGvrpPortEntry"))
hpicfBridgeGvrpPortEntry.setIndexNames(*dot1dBasePortEntry.getIndexNames())
if mibBuilder.loadTexts: hpicfBridgeGvrpPortEntry.setStatus('current')
hpicfBridgeGvrpRestrictedVlanReg = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 2, 1, 1, 1), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeGvrpRestrictedVlanReg.setStatus('current')
hpicfBridgeGvrpStateMachineTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 2, 2), )
if mibBuilder.loadTexts: hpicfBridgeGvrpStateMachineTable.setStatus('current')
hpicfBridgeGvrpStateMachineEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 2, 2, 1), ).setIndexNames((0, "HP-ICF-BRIDGE", "hpicfGenericVlanId"), (0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: hpicfBridgeGvrpStateMachineEntry.setStatus('current')
hpicfGenericVlanId = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 2, 2, 1, 1), VlanId())
if mibBuilder.loadTexts: hpicfGenericVlanId.setStatus('current')
hpicfApplicantStateMachine = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 2, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13))).clone(namedValues=NamedValues(("va", 0), ("aa", 1), ("qa", 2), ("la", 3), ("vp", 4), ("ap", 5), ("qp", 6), ("vo", 7), ("ao", 8), ("qo", 9), ("lo", 10), ("von", 11), ("aon", 12), ("qon", 13)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpicfApplicantStateMachine.setStatus('current')
hpicfRegistarStateMachine = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 2, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17))).clone(namedValues=NamedValues(("inn", 0), ("lv", 1), ("l3", 2), ("l2", 3), ("l1", 4), ("mt", 5), ("inr", 6), ("lvr", 7), ("l3r", 8), ("l2r", 9), ("l1r", 10), ("mtr", 11), ("inf", 12), ("lvf", 13), ("l3f", 14), ("l2f", 15), ("l1f", 16), ("mtf", 17)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpicfRegistarStateMachine.setStatus('current')
hpicfBridgeRstp = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4))
hpicfBridgeRstpForceVersion = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 2, 3))).clone(namedValues=NamedValues(("stpCompatibility", 0), ("rstpOperation", 2), ("mstpOperation", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeRstpForceVersion.setStatus('current')
hpicfBridgeRstpConfigStatus = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 2), ConfigStatus()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpicfBridgeRstpConfigStatus.setStatus('current')
hpicfBridgeRstpProtocolVersion = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 2, 3))).clone(namedValues=NamedValues(("ieee8021d", 0), ("ieee8021w", 2), ("ieee8021s", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeRstpProtocolVersion.setStatus('current')
hpicfBridgeRstpAdminStatus = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeRstpAdminStatus.setStatus('current')
hpicfBridgeRstpPortTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 5), )
if mibBuilder.loadTexts: hpicfBridgeRstpPortTable.setStatus('current')
hpicfBridgeRstpPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 5, 1), ).setIndexNames((0, "HP-ICF-BRIDGE", "hpicfBridgeRstpPortIndex"))
if mibBuilder.loadTexts: hpicfBridgeRstpPortEntry.setStatus('current')
hpicfBridgeRstpPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpicfBridgeRstpPortIndex.setStatus('current')
hpicfBridgeRstpAdminEdgePort = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 5, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeRstpAdminEdgePort.setStatus('current')
hpicfBridgeRstpOperEdgePort = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 5, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpicfBridgeRstpOperEdgePort.setStatus('current')
hpicfBridgeRstpAdminPointToPointMac = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 5, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("forceTrue", 1), ("forceFalse", 2), ("auto", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeRstpAdminPointToPointMac.setStatus('current')
hpicfBridgeRstpOperPointToPointMac = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 5, 1, 5), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpicfBridgeRstpOperPointToPointMac.setStatus('current')
hpicfBridgeRstpPortPathCost = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 5, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 200000000))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeRstpPortPathCost.setStatus('current')
hpicfBridgeRstpForceBpduMigrationCheck = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 5, 1, 7), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeRstpForceBpduMigrationCheck.setStatus('current')
hpicfBridgeRstpAutoEdgePort = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 5, 1, 8), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeRstpAutoEdgePort.setStatus('current')
hpicfBridgeRstpPortBpduFiltering = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 5, 1, 9), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeRstpPortBpduFiltering.setStatus('current')
hpicfBridgeStpBpduThrottleConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 6))
hpicfBridgeStpBpduThrottleStatus = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 6, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2))).clone('enable')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeStpBpduThrottleStatus.setStatus('current')
hpicfBridgeStpBpduThrottleValue = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 6, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)).clone(256)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeStpBpduThrottleValue.setStatus('current')
class LoopProtectReceiverAction(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("disableTx", 1), ("noDisable", 2), ("disableTxRx", 3))
hpicfBridgeLoopProtect = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5))
hpicfBridgeLoopProtectNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 0))
hpicfBridgeLoopProtectBase = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 1))
hpicfBridgeLoopProtectPort = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 2))
hpicfBridgeLoopProtectInterval = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeLoopProtectInterval.setStatus('current')
hpicfBridgeLoopProtectTrapLoopDetectEnable = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 1, 2), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeLoopProtectTrapLoopDetectEnable.setStatus('current')
hpicfBridgeLoopProtectEnableTimer = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeLoopProtectEnableTimer.setStatus('current')
hpicfBridgeLoopProtectMode = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("port", 1), ("vlan", 2))).clone('port')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeLoopProtectMode.setStatus('current')
hpicfBridgeLoopProtectVIDList = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 1, 5), VidList()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeLoopProtectVIDList.setStatus('current')
hpicfBridgeLoopProtectPortTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 2, 1), )
if mibBuilder.loadTexts: hpicfBridgeLoopProtectPortTable.setStatus('current')
hpicfBridgeLoopProtectPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 2, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: hpicfBridgeLoopProtectPortEntry.setStatus('current')
hpicfBridgeLoopProtectPortEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 2, 1, 1, 1), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeLoopProtectPortEnable.setStatus('current')
hpicfBridgeLoopProtectPortLoopDetected = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 2, 1, 1, 2), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpicfBridgeLoopProtectPortLoopDetected.setStatus('current')
hpicfBridgeLoopProtectPortLastLoopTime = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 2, 1, 1, 3), TimeStamp()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpicfBridgeLoopProtectPortLastLoopTime.setStatus('current')
hpicfBridgeLoopProtectPortLoopCount = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 2, 1, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpicfBridgeLoopProtectPortLoopCount.setStatus('current')
hpicfBridgeLoopProtectPortReceiverAction = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 2, 1, 1, 5), LoopProtectReceiverAction()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeLoopProtectPortReceiverAction.setStatus('current')
hpicfBridgeLoopDetectedVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 2, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4096))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpicfBridgeLoopDetectedVlan.setStatus('current')
hpicfBridgeLoopProtectLoopDetectedNotification = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 0, 1)).setObjects(("IF-MIB", "ifIndex"), ("HP-ICF-BRIDGE", "hpicfBridgeLoopProtectPortLoopCount"), ("HP-ICF-BRIDGE", "hpicfBridgeLoopProtectPortReceiverAction"))
if mibBuilder.loadTexts: hpicfBridgeLoopProtectLoopDetectedNotification.setStatus('current')
hpicfBridgeVlanLoopProtectLoopDetectedNotification = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 0, 2)).setObjects(("IF-MIB", "ifIndex"), ("HP-ICF-BRIDGE", "hpicfBridgeLoopProtectPortLoopCount"), ("HP-ICF-BRIDGE", "hpicfBridgeLoopProtectPortReceiverAction"), ("HP-ICF-BRIDGE", "hpicfBridgeLoopDetectedVlan"))
if mibBuilder.loadTexts: hpicfBridgeVlanLoopProtectLoopDetectedNotification.setStatus('current')
hpicfBridgeMirrorSession = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 6))
hpicfBridgeMirrorSessionBase = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 6, 1))
hpicfBridgeMirrorSessionDestination = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 6, 2))
hpicfBridgeMirrorSessionTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 6, 2, 1), )
if mibBuilder.loadTexts: hpicfBridgeMirrorSessionTable.setStatus('current')
hpicfBridgeMirrorSessionEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 6, 2, 1, 1), )
portCopyEntry.registerAugmentions(("HP-ICF-BRIDGE", "hpicfBridgeMirrorSessionEntry"))
hpicfBridgeMirrorSessionEntry.setIndexNames(*portCopyEntry.getIndexNames())
if mibBuilder.loadTexts: hpicfBridgeMirrorSessionEntry.setStatus('current')
hpicfBridgeMirrorSessionID = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 6, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647)).clone(1)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: hpicfBridgeMirrorSessionID.setStatus('current')
hpicfBridgeDontTagWithVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 6, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone(2)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeDontTagWithVlan.setStatus('current')
hpicfBridgeMirrorSessionType = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 6, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("noMirror", 1), ("mirrorAddresses", 2), ("mirrorPolicies", 3), ("mirrorPorts", 4), ("mirrorVlan", 5))).clone(1)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeMirrorSessionType.setStatus('current')
hpicfBridgeVoiceVlanConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 7))
hpicfBridgeVoiceVlanConfigTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 7, 1), )
if mibBuilder.loadTexts: hpicfBridgeVoiceVlanConfigTable.setStatus('current')
hpicfBridgeVoiceVlanConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 7, 1, 1), )
dot1qVlanStaticEntry.registerAugmentions(("HP-ICF-BRIDGE", "hpicfBridgeVoiceVlanConfigEntry"))
hpicfBridgeVoiceVlanConfigEntry.setIndexNames(*dot1qVlanStaticEntry.getIndexNames())
if mibBuilder.loadTexts: hpicfBridgeVoiceVlanConfigEntry.setStatus('current')
hpicfBridgeVoiceVlanEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 7, 1, 1, 1), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeVoiceVlanEnable.setStatus('current')
hpicfBridgeJumboInterfaceConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 8))
hpicfBridgeJumboInterfaceConfigTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 8, 1), )
if mibBuilder.loadTexts: hpicfBridgeJumboInterfaceConfigTable.setStatus('current')
hpicfBridgeJumboInterfaceConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 8, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: hpicfBridgeJumboInterfaceConfigEntry.setStatus('current')
hpicfBridgeJumboInterfaceEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 8, 1, 1, 1), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeJumboInterfaceEnable.setStatus('current')
hpicfBridgeManagementInterfaceConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 9))
hpicfBridgeManagementInterfaceConfigTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 9, 1), )
if mibBuilder.loadTexts: hpicfBridgeManagementInterfaceConfigTable.setStatus('current')
hpicfBridgeManagementInterfaceConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 9, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: hpicfBridgeManagementInterfaceConfigEntry.setStatus('current')
hpicfBridgeManagementInterfaceEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 9, 1, 1, 1), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfBridgeManagementInterfaceEnable.setStatus('current')
hpicfBridgeConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2))
hpicfBridgeGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1))
hpicfBridgeCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2))
hpicfBridgeNotGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 3))
hpicfBridgeVlanBaseGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 1)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeMaxVlans"), ("HP-ICF-BRIDGE", "hpicfBridgeVlanEnable"), ("HP-ICF-BRIDGE", "hpicfBridgePrimaryVlan"), ("HP-ICF-BRIDGE", "hpicfBridgeVlanConfigStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeVlanBaseGroup = hpicfBridgeVlanBaseGroup.setStatus('current')
hpicfBridgeGvrpPortGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 2)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeGvrpRestrictedVlanReg"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeGvrpPortGroup = hpicfBridgeGvrpPortGroup.setStatus('deprecated')
hpicfBridgeRstpBaseGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 3)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeRstpForceVersion"), ("HP-ICF-BRIDGE", "hpicfBridgeRstpConfigStatus"), ("HP-ICF-BRIDGE", "hpicfBridgeRstpProtocolVersion"), ("HP-ICF-BRIDGE", "hpicfBridgeRstpAdminStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeRstpBaseGroup = hpicfBridgeRstpBaseGroup.setStatus('current')
hpicfBridgeLoopProtectBaseGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 4)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeLoopProtectInterval"), ("HP-ICF-BRIDGE", "hpicfBridgeLoopProtectEnableTimer"), ("HP-ICF-BRIDGE", "hpicfBridgeLoopProtectTrapLoopDetectEnable"), ("HP-ICF-BRIDGE", "hpicfBridgeLoopProtectPortEnable"), ("HP-ICF-BRIDGE", "hpicfBridgeLoopProtectPortLoopDetected"), ("HP-ICF-BRIDGE", "hpicfBridgeLoopProtectPortLastLoopTime"), ("HP-ICF-BRIDGE", "hpicfBridgeLoopProtectPortLoopCount"), ("HP-ICF-BRIDGE", "hpicfBridgeLoopProtectPortReceiverAction"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeLoopProtectBaseGroup = hpicfBridgeLoopProtectBaseGroup.setStatus('current')
hpicfBridgeVoiceVlanConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 7)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeVoiceVlanEnable"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeVoiceVlanConfigGroup = hpicfBridgeVoiceVlanConfigGroup.setStatus('current')
hpicfBridgeJumboInterfaceConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 8)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeJumboInterfaceEnable"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeJumboInterfaceConfigGroup = hpicfBridgeJumboInterfaceConfigGroup.setStatus('current')
hpicfBridgeManagementInterfaceConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 9)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeManagementInterfaceEnable"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeManagementInterfaceConfigGroup = hpicfBridgeManagementInterfaceConfigGroup.setStatus('current')
hpicfBridgeLoopProtectVLANGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 10)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeLoopProtectMode"), ("HP-ICF-BRIDGE", "hpicfBridgeLoopProtectVIDList"), ("HP-ICF-BRIDGE", "hpicfBridgeLoopDetectedVlan"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeLoopProtectVLANGroup = hpicfBridgeLoopProtectVLANGroup.setStatus('current')
hpicfBridgeRstpPortEntryGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 11)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeRstpAdminEdgePort"), ("HP-ICF-BRIDGE", "hpicfBridgeRstpOperEdgePort"), ("HP-ICF-BRIDGE", "hpicfBridgeRstpAdminPointToPointMac"), ("HP-ICF-BRIDGE", "hpicfBridgeRstpOperPointToPointMac"), ("HP-ICF-BRIDGE", "hpicfBridgeRstpPortPathCost"), ("HP-ICF-BRIDGE", "hpicfBridgeRstpForceBpduMigrationCheck"), ("HP-ICF-BRIDGE", "hpicfBridgeRstpAutoEdgePort"), ("HP-ICF-BRIDGE", "hpicfBridgeRstpPortBpduFiltering"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeRstpPortEntryGroup = hpicfBridgeRstpPortEntryGroup.setStatus('current')
hpicfBridgeMirrorSessionEntryGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 12)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeDontTagWithVlan"), ("HP-ICF-BRIDGE", "hpicfBridgeMirrorSessionType"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeMirrorSessionEntryGroup = hpicfBridgeMirrorSessionEntryGroup.setStatus('current')
hpicfBridgeRstpPortEntryGroup1 = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 13)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeRstpPortIndex"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeRstpPortEntryGroup1 = hpicfBridgeRstpPortEntryGroup1.setStatus('current')
hpicfBridgeGvrpPortGroup1 = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 14)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeGvrpRestrictedVlanReg"), ("HP-ICF-BRIDGE", "hpicfApplicantStateMachine"), ("HP-ICF-BRIDGE", "hpicfRegistarStateMachine"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeGvrpPortGroup1 = hpicfBridgeGvrpPortGroup1.setStatus('current')
hpicfBridgeStpBpduThrottleConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 15)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeStpBpduThrottleStatus"), ("HP-ICF-BRIDGE", "hpicfBridgeStpBpduThrottleValue"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeStpBpduThrottleConfigGroup = hpicfBridgeStpBpduThrottleConfigGroup.setStatus('current')
hpicfBridgeLoopProtectNotGrp = NotificationGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 3, 1)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeLoopProtectLoopDetectedNotification"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeLoopProtectNotGrp = hpicfBridgeLoopProtectNotGrp.setStatus('current')
hpicfBridgeVlanLoopProtectNotGrp = NotificationGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 3, 2)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeVlanLoopProtectLoopDetectedNotification"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeVlanLoopProtectNotGrp = hpicfBridgeVlanLoopProtectNotGrp.setStatus('current')
hpicfBridgeMirrorSessionBaseGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 5)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeMirrorSessionID"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeMirrorSessionBaseGroup = hpicfBridgeMirrorSessionBaseGroup.setStatus('current')
hpicfBridgeCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 1)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeVlanBaseGroup"), ("HP-ICF-BRIDGE", "hpicfBridgeGvrpPortGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeCompliance = hpicfBridgeCompliance.setStatus('deprecated')
hpicfBridgeComplianceRevTwo = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 2)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeVlanBaseGroup"), ("HP-ICF-BRIDGE", "hpicfBridgeGvrpPortGroup"), ("HP-ICF-BRIDGE", "hpicfBridgeRstpBaseGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeComplianceRevTwo = hpicfBridgeComplianceRevTwo.setStatus('deprecated')
hpicfBridgeComplianceRevThree = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 3)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeVlanBaseGroup"), ("HP-ICF-BRIDGE", "hpicfBridgeGvrpPortGroup"), ("HP-ICF-BRIDGE", "hpicfBridgeRstpBaseGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeComplianceRevThree = hpicfBridgeComplianceRevThree.setStatus('deprecated')
hpicfBridgeComplianceRevFour = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 4)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeVlanBaseGroup"), ("HP-ICF-BRIDGE", "hpicfBridgeGvrpPortGroup"), ("HP-ICF-BRIDGE", "hpicfBridgeRstpBaseGroup"), ("HP-ICF-BRIDGE", "hpicfBridgeMirrorSessionBaseGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeComplianceRevFour = hpicfBridgeComplianceRevFour.setStatus('deprecated')
hpicfBridgeLoopProtectCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 5)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeLoopProtectBaseGroup"), ("HP-ICF-BRIDGE", "hpicfBridgeLoopProtectNotifications"), ("HP-ICF-BRIDGE", "hpicfBridgeLoopProtectBaseGroup"), ("HP-ICF-BRIDGE", "hpicfBridgeLoopProtectNotifications"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeLoopProtectCompliance = hpicfBridgeLoopProtectCompliance.setStatus('current')
hpicfBridgeVlanBaseConfigCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 6)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeVoiceVlanConfigGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeVlanBaseConfigCompliance = hpicfBridgeVlanBaseConfigCompliance.setStatus('current')
hpicfBridgeInterfaceConfigCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 7)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeJumboInterfaceConfigGroup"), ("HP-ICF-BRIDGE", "hpicfBridgeManagementInterfaceConfigGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeInterfaceConfigCompliance = hpicfBridgeInterfaceConfigCompliance.setStatus('current')
hpicfBridgeVlanLoopProtConfigCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 8)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeLoopProtectVLANGroup"), ("HP-ICF-BRIDGE", "hpicfBridgeVlanLoopProtectNotGrp"), ("HP-ICF-BRIDGE", "hpicfBridgeLoopProtectNotGrp"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeVlanLoopProtConfigCompliance = hpicfBridgeVlanLoopProtConfigCompliance.setStatus('current')
hpicfBridgeRstpPortEntryCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 9)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeRstpPortEntryGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeRstpPortEntryCompliance = hpicfBridgeRstpPortEntryCompliance.setStatus('current')
hpicfBridgeMirrorSessionEntryCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 10)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeMirrorSessionEntryGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeMirrorSessionEntryCompliance = hpicfBridgeMirrorSessionEntryCompliance.setStatus('current')
hpicfBridgeRstpPortEntryCompliance1 = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 11)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeRstpPortEntryGroup1"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeRstpPortEntryCompliance1 = hpicfBridgeRstpPortEntryCompliance1.setStatus('current')
hpicfBridgeComplianceRevFour1 = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 12)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeVlanBaseGroup"), ("HP-ICF-BRIDGE", "hpicfBridgeGvrpPortGroup1"), ("HP-ICF-BRIDGE", "hpicfBridgeRstpBaseGroup"), ("HP-ICF-BRIDGE", "hpicfBridgeMirrorSessionBaseGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeComplianceRevFour1 = hpicfBridgeComplianceRevFour1.setStatus('current')
hpicfBridgeStpBpduThrottleConfigCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 13)).setObjects(("HP-ICF-BRIDGE", "hpicfBridgeStpBpduThrottleConfigGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfBridgeStpBpduThrottleConfigCompliance = hpicfBridgeStpBpduThrottleConfigCompliance.setStatus('current')
mibBuilder.exportSymbols("HP-ICF-BRIDGE", hpicfBridgeLoopProtectBaseGroup=hpicfBridgeLoopProtectBaseGroup, hpicfBridgeLoopProtect=hpicfBridgeLoopProtect, hpicfBridgeRstp=hpicfBridgeRstp, hpicfBridgeLoopProtectCompliance=hpicfBridgeLoopProtectCompliance, hpicfBridgeVlanBaseConfigCompliance=hpicfBridgeVlanBaseConfigCompliance, hpicfBridgeRstpBaseGroup=hpicfBridgeRstpBaseGroup, hpicfBridgeGvrpStateMachineEntry=hpicfBridgeGvrpStateMachineEntry, hpicfBridgeVlanLoopProtConfigCompliance=hpicfBridgeVlanLoopProtConfigCompliance, hpicfBridgeMirrorSessionEntryGroup=hpicfBridgeMirrorSessionEntryGroup, hpicfBridgeMaxVlans=hpicfBridgeMaxVlans, hpicfBridgeLoopProtectLoopDetectedNotification=hpicfBridgeLoopProtectLoopDetectedNotification, hpicfBridgeRstpPortEntryGroup=hpicfBridgeRstpPortEntryGroup, hpicfBridgeMirrorSessionEntryCompliance=hpicfBridgeMirrorSessionEntryCompliance, hpicfBridgeMirrorSessionBaseGroup=hpicfBridgeMirrorSessionBaseGroup, hpicfBridgeLoopProtectPortEnable=hpicfBridgeLoopProtectPortEnable, hpicfBridgeManagementInterfaceConfig=hpicfBridgeManagementInterfaceConfig, BridgeId=BridgeId, hpicfBridgeConformance=hpicfBridgeConformance, hpicfBridgeJumboInterfaceConfig=hpicfBridgeJumboInterfaceConfig, hpicfBridgeLoopProtectPortLastLoopTime=hpicfBridgeLoopProtectPortLastLoopTime, hpicfBridgeGvrpPortTable=hpicfBridgeGvrpPortTable, hpicfBridgeMirrorSessionType=hpicfBridgeMirrorSessionType, hpicfBridgeVlanBaseGroup=hpicfBridgeVlanBaseGroup, hpicfBridgeLoopProtectTrapLoopDetectEnable=hpicfBridgeLoopProtectTrapLoopDetectEnable, hpicfBridgeLoopProtectPortTable=hpicfBridgeLoopProtectPortTable, hpicfBridgeRstpPortPathCost=hpicfBridgeRstpPortPathCost, hpicfBridgeLoopProtectNotGrp=hpicfBridgeLoopProtectNotGrp, hpicfBridgeLoopProtectPortLoopCount=hpicfBridgeLoopProtectPortLoopCount, hpicfBridgeRstpAutoEdgePort=hpicfBridgeRstpAutoEdgePort, hpicfBridgeGvrpStateMachineTable=hpicfBridgeGvrpStateMachineTable, hpicfBridgeRstpAdminStatus=hpicfBridgeRstpAdminStatus, hpicfBridgeLoopProtectInterval=hpicfBridgeLoopProtectInterval, hpicfBridgeMirrorSessionDestination=hpicfBridgeMirrorSessionDestination, hpicfBridgeLoopProtectNotifications=hpicfBridgeLoopProtectNotifications, hpicfBridgeStpBpduThrottleConfigGroup=hpicfBridgeStpBpduThrottleConfigGroup, hpicfBridgeJumboInterfaceEnable=hpicfBridgeJumboInterfaceEnable, hpicfBridgeVlanEnable=hpicfBridgeVlanEnable, hpicfBridgeJumboInterfaceConfigEntry=hpicfBridgeJumboInterfaceConfigEntry, hpicfBridgeRstpPortTable=hpicfBridgeRstpPortTable, hpicfBridge=hpicfBridge, hpicfBridgeInterfaceConfigCompliance=hpicfBridgeInterfaceConfigCompliance, hpicfBridgeLoopProtectMode=hpicfBridgeLoopProtectMode, PYSNMP_MODULE_ID=hpicfBridge, hpicfBridgeGvrp=hpicfBridgeGvrp, hpicfBridgeRstpPortEntryCompliance=hpicfBridgeRstpPortEntryCompliance, hpicfBridgeManagementInterfaceConfigGroup=hpicfBridgeManagementInterfaceConfigGroup, hpicfBridgeVoiceVlanConfig=hpicfBridgeVoiceVlanConfig, hpicfBridgeManagementInterfaceEnable=hpicfBridgeManagementInterfaceEnable, hpicfBridgeManagementInterfaceConfigEntry=hpicfBridgeManagementInterfaceConfigEntry, hpicfBridgeCompliance=hpicfBridgeCompliance, hpicfBridgeMirrorSessionTable=hpicfBridgeMirrorSessionTable, hpicfBridgeLoopProtectVLANGroup=hpicfBridgeLoopProtectVLANGroup, hpicfBridgeManagementInterfaceConfigTable=hpicfBridgeManagementInterfaceConfigTable, LoopProtectReceiverAction=LoopProtectReceiverAction, hpicfBridgeMirrorSession=hpicfBridgeMirrorSession, hpicfBridgeStpBpduThrottleConfig=hpicfBridgeStpBpduThrottleConfig, hpicfBridgeRstpProtocolVersion=hpicfBridgeRstpProtocolVersion, hpicfBridgeVoiceVlanConfigEntry=hpicfBridgeVoiceVlanConfigEntry, hpicfGenericVlanId=hpicfGenericVlanId, hpicfBridgeVlanLoopProtectNotGrp=hpicfBridgeVlanLoopProtectNotGrp, hpicfBridgeJumboInterfaceConfigGroup=hpicfBridgeJumboInterfaceConfigGroup, hpicfBridgeLoopProtectPort=hpicfBridgeLoopProtectPort, hpicfBridgeRstpPortEntryCompliance1=hpicfBridgeRstpPortEntryCompliance1, hpicfBridgeGvrpRestrictedVlanReg=hpicfBridgeGvrpRestrictedVlanReg, hpicfBridgeJumboInterfaceConfigTable=hpicfBridgeJumboInterfaceConfigTable, hpicfBridgeMirrorSessionBase=hpicfBridgeMirrorSessionBase, hpicfBridgeDontTagWithVlan=hpicfBridgeDontTagWithVlan, hpicfBridgeVlanLoopProtectLoopDetectedNotification=hpicfBridgeVlanLoopProtectLoopDetectedNotification, hpicfBridgeCompliances=hpicfBridgeCompliances, hpicfBridgeRstpPortEntryGroup1=hpicfBridgeRstpPortEntryGroup1, hpicfBridgeMirrorSessionID=hpicfBridgeMirrorSessionID, hpicfBridgeVoiceVlanEnable=hpicfBridgeVoiceVlanEnable, hpicfBridgeLoopProtectPortLoopDetected=hpicfBridgeLoopProtectPortLoopDetected, hpicfBridgeRstpOperPointToPointMac=hpicfBridgeRstpOperPointToPointMac, hpicfBridgeBase=hpicfBridgeBase, hpicfBridgeMirrorSessionEntry=hpicfBridgeMirrorSessionEntry, hpicfBridgeRstpPortEntry=hpicfBridgeRstpPortEntry, hpicfBridgeComplianceRevFour1=hpicfBridgeComplianceRevFour1, hpicfBridgeGvrpPortEntry=hpicfBridgeGvrpPortEntry, hpicfBridgeLoopProtectVIDList=hpicfBridgeLoopProtectVIDList, hpicfBridgeLoopProtectEnableTimer=hpicfBridgeLoopProtectEnableTimer, hpicfBridgeRstpPortBpduFiltering=hpicfBridgeRstpPortBpduFiltering, hpicfBridgeRstpOperEdgePort=hpicfBridgeRstpOperEdgePort, hpicfBridgeComplianceRevTwo=hpicfBridgeComplianceRevTwo, hpicfBridgeComplianceRevThree=hpicfBridgeComplianceRevThree, hpicfApplicantStateMachine=hpicfApplicantStateMachine, hpicfBridgeVlanConfigStatus=hpicfBridgeVlanConfigStatus, hpicfBridgeStpBpduThrottleConfigCompliance=hpicfBridgeStpBpduThrottleConfigCompliance, hpicfBridgeLoopProtectPortReceiverAction=hpicfBridgeLoopProtectPortReceiverAction, hpicfBridgeNotGroups=hpicfBridgeNotGroups, hpicfBridgeComplianceRevFour=hpicfBridgeComplianceRevFour, hpicfBridgeVoiceVlanConfigGroup=hpicfBridgeVoiceVlanConfigGroup, hpicfBridgeRstpForceBpduMigrationCheck=hpicfBridgeRstpForceBpduMigrationCheck, hpicfBridgeRstpPortIndex=hpicfBridgeRstpPortIndex, hpicfBridgeLoopProtectBase=hpicfBridgeLoopProtectBase, hpicfBridgePrimaryVlan=hpicfBridgePrimaryVlan, hpicfBridgeObjects=hpicfBridgeObjects, hpicfBridgeRstpAdminEdgePort=hpicfBridgeRstpAdminEdgePort, hpicfBridgeGvrpPortGroup1=hpicfBridgeGvrpPortGroup1, hpicfBridgeLoopDetectedVlan=hpicfBridgeLoopDetectedVlan, hpicfRegistarStateMachine=hpicfRegistarStateMachine, hpicfBridgeStpBpduThrottleStatus=hpicfBridgeStpBpduThrottleStatus, hpicfBridgeVoiceVlanConfigTable=hpicfBridgeVoiceVlanConfigTable, hpicfBridgeLoopProtectPortEntry=hpicfBridgeLoopProtectPortEntry, hpicfBridgeRstpForceVersion=hpicfBridgeRstpForceVersion, hpicfBridgeRstpAdminPointToPointMac=hpicfBridgeRstpAdminPointToPointMac, hpicfBridgeRstpConfigStatus=hpicfBridgeRstpConfigStatus, hpicfBridgeGroups=hpicfBridgeGroups, hpicfBridgeGvrpPortGroup=hpicfBridgeGvrpPortGroup, hpicfBridgeStpBpduThrottleValue=hpicfBridgeStpBpduThrottleValue)
| (octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, value_size_constraint, constraints_union, value_range_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ConstraintsUnion', 'ValueRangeConstraint', 'SingleValueConstraint')
(dot1d_base_port_entry,) = mibBuilder.importSymbols('BRIDGE-MIB', 'dot1dBasePortEntry')
(vid_list,) = mibBuilder.importSymbols('HP-ICF-FTRCO', 'VidList')
(hp_switch,) = mibBuilder.importSymbols('HP-ICF-OID', 'hpSwitch')
(config_status,) = mibBuilder.importSymbols('HP-ICF-TC', 'ConfigStatus')
(if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex')
(dot1q_vlan_static_entry, vlan_index, vlan_id) = mibBuilder.importSymbols('Q-BRIDGE-MIB', 'dot1qVlanStaticEntry', 'VlanIndex', 'VlanId')
(port_copy_entry,) = mibBuilder.importSymbols('SMON-MIB', 'portCopyEntry')
(module_compliance, notification_group, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup', 'ObjectGroup')
(gauge32, object_identity, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, mib_identifier, module_identity, counter32, counter64, bits, integer32, iso, ip_address, unsigned32, time_ticks) = mibBuilder.importSymbols('SNMPv2-SMI', 'Gauge32', 'ObjectIdentity', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'MibIdentifier', 'ModuleIdentity', 'Counter32', 'Counter64', 'Bits', 'Integer32', 'iso', 'IpAddress', 'Unsigned32', 'TimeTicks')
(truth_value, display_string, textual_convention, time_stamp) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'DisplayString', 'TextualConvention', 'TimeStamp')
hpicf_bridge = module_identity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12))
hpicfBridge.setRevisions(('2014-04-27 00:00', '2013-10-11 00:00', '2012-07-13 00:00', '2012-05-30 00:00', '2010-06-26 00:00', '2009-12-15 00:00', '2009-02-11 00:00', '2006-09-30 00:00', '2006-09-26 00:00', '2006-08-13 17:38', '2003-02-20 00:00', '2002-05-23 17:38', '2001-10-03 20:50', '2000-11-03 06:42'))
if mibBuilder.loadTexts:
hpicfBridge.setLastUpdated('201404270000Z')
if mibBuilder.loadTexts:
hpicfBridge.setOrganization('HP Networking')
class Bridgeid(TextualConvention, OctetString):
status = 'current'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(8, 8)
fixed_length = 8
hpicf_bridge_objects = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1))
hpicf_bridge_base = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 1))
hpicf_bridge_max_vlans = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4094))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeMaxVlans.setStatus('current')
hpicf_bridge_vlan_enable = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeVlanEnable.setStatus('current')
hpicf_bridge_primary_vlan = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 1, 3), vlan_index()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgePrimaryVlan.setStatus('current')
hpicf_bridge_vlan_config_status = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 1, 4), config_status()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpicfBridgeVlanConfigStatus.setStatus('current')
hpicf_bridge_gvrp = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 2))
hpicf_bridge_gvrp_port_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 2, 1))
if mibBuilder.loadTexts:
hpicfBridgeGvrpPortTable.setStatus('current')
hpicf_bridge_gvrp_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 2, 1, 1))
dot1dBasePortEntry.registerAugmentions(('HP-ICF-BRIDGE', 'hpicfBridgeGvrpPortEntry'))
hpicfBridgeGvrpPortEntry.setIndexNames(*dot1dBasePortEntry.getIndexNames())
if mibBuilder.loadTexts:
hpicfBridgeGvrpPortEntry.setStatus('current')
hpicf_bridge_gvrp_restricted_vlan_reg = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 2, 1, 1, 1), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeGvrpRestrictedVlanReg.setStatus('current')
hpicf_bridge_gvrp_state_machine_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 2, 2))
if mibBuilder.loadTexts:
hpicfBridgeGvrpStateMachineTable.setStatus('current')
hpicf_bridge_gvrp_state_machine_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 2, 2, 1)).setIndexNames((0, 'HP-ICF-BRIDGE', 'hpicfGenericVlanId'), (0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
hpicfBridgeGvrpStateMachineEntry.setStatus('current')
hpicf_generic_vlan_id = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 2, 2, 1, 1), vlan_id())
if mibBuilder.loadTexts:
hpicfGenericVlanId.setStatus('current')
hpicf_applicant_state_machine = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 2, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13))).clone(namedValues=named_values(('va', 0), ('aa', 1), ('qa', 2), ('la', 3), ('vp', 4), ('ap', 5), ('qp', 6), ('vo', 7), ('ao', 8), ('qo', 9), ('lo', 10), ('von', 11), ('aon', 12), ('qon', 13)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpicfApplicantStateMachine.setStatus('current')
hpicf_registar_state_machine = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 2, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17))).clone(namedValues=named_values(('inn', 0), ('lv', 1), ('l3', 2), ('l2', 3), ('l1', 4), ('mt', 5), ('inr', 6), ('lvr', 7), ('l3r', 8), ('l2r', 9), ('l1r', 10), ('mtr', 11), ('inf', 12), ('lvf', 13), ('l3f', 14), ('l2f', 15), ('l1f', 16), ('mtf', 17)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpicfRegistarStateMachine.setStatus('current')
hpicf_bridge_rstp = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4))
hpicf_bridge_rstp_force_version = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 2, 3))).clone(namedValues=named_values(('stpCompatibility', 0), ('rstpOperation', 2), ('mstpOperation', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeRstpForceVersion.setStatus('current')
hpicf_bridge_rstp_config_status = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 2), config_status()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpicfBridgeRstpConfigStatus.setStatus('current')
hpicf_bridge_rstp_protocol_version = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 2, 3))).clone(namedValues=named_values(('ieee8021d', 0), ('ieee8021w', 2), ('ieee8021s', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeRstpProtocolVersion.setStatus('current')
hpicf_bridge_rstp_admin_status = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeRstpAdminStatus.setStatus('current')
hpicf_bridge_rstp_port_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 5))
if mibBuilder.loadTexts:
hpicfBridgeRstpPortTable.setStatus('current')
hpicf_bridge_rstp_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 5, 1)).setIndexNames((0, 'HP-ICF-BRIDGE', 'hpicfBridgeRstpPortIndex'))
if mibBuilder.loadTexts:
hpicfBridgeRstpPortEntry.setStatus('current')
hpicf_bridge_rstp_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 5, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpicfBridgeRstpPortIndex.setStatus('current')
hpicf_bridge_rstp_admin_edge_port = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 5, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeRstpAdminEdgePort.setStatus('current')
hpicf_bridge_rstp_oper_edge_port = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 5, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpicfBridgeRstpOperEdgePort.setStatus('current')
hpicf_bridge_rstp_admin_point_to_point_mac = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 5, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('forceTrue', 1), ('forceFalse', 2), ('auto', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeRstpAdminPointToPointMac.setStatus('current')
hpicf_bridge_rstp_oper_point_to_point_mac = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 5, 1, 5), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpicfBridgeRstpOperPointToPointMac.setStatus('current')
hpicf_bridge_rstp_port_path_cost = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 5, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(1, 200000000))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeRstpPortPathCost.setStatus('current')
hpicf_bridge_rstp_force_bpdu_migration_check = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 5, 1, 7), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeRstpForceBpduMigrationCheck.setStatus('current')
hpicf_bridge_rstp_auto_edge_port = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 5, 1, 8), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeRstpAutoEdgePort.setStatus('current')
hpicf_bridge_rstp_port_bpdu_filtering = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 5, 1, 9), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeRstpPortBpduFiltering.setStatus('current')
hpicf_bridge_stp_bpdu_throttle_config = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 6))
hpicf_bridge_stp_bpdu_throttle_status = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 6, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2))).clone('enable')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeStpBpduThrottleStatus.setStatus('current')
hpicf_bridge_stp_bpdu_throttle_value = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 4, 6, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)).clone(256)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeStpBpduThrottleValue.setStatus('current')
class Loopprotectreceiveraction(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('disableTx', 1), ('noDisable', 2), ('disableTxRx', 3))
hpicf_bridge_loop_protect = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5))
hpicf_bridge_loop_protect_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 0))
hpicf_bridge_loop_protect_base = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 1))
hpicf_bridge_loop_protect_port = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 2))
hpicf_bridge_loop_protect_interval = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 10))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeLoopProtectInterval.setStatus('current')
hpicf_bridge_loop_protect_trap_loop_detect_enable = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 1, 2), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeLoopProtectTrapLoopDetectEnable.setStatus('current')
hpicf_bridge_loop_protect_enable_timer = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeLoopProtectEnableTimer.setStatus('current')
hpicf_bridge_loop_protect_mode = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('port', 1), ('vlan', 2))).clone('port')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeLoopProtectMode.setStatus('current')
hpicf_bridge_loop_protect_vid_list = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 1, 5), vid_list()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeLoopProtectVIDList.setStatus('current')
hpicf_bridge_loop_protect_port_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 2, 1))
if mibBuilder.loadTexts:
hpicfBridgeLoopProtectPortTable.setStatus('current')
hpicf_bridge_loop_protect_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 2, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
hpicfBridgeLoopProtectPortEntry.setStatus('current')
hpicf_bridge_loop_protect_port_enable = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 2, 1, 1, 1), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeLoopProtectPortEnable.setStatus('current')
hpicf_bridge_loop_protect_port_loop_detected = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 2, 1, 1, 2), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpicfBridgeLoopProtectPortLoopDetected.setStatus('current')
hpicf_bridge_loop_protect_port_last_loop_time = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 2, 1, 1, 3), time_stamp()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpicfBridgeLoopProtectPortLastLoopTime.setStatus('current')
hpicf_bridge_loop_protect_port_loop_count = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 2, 1, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpicfBridgeLoopProtectPortLoopCount.setStatus('current')
hpicf_bridge_loop_protect_port_receiver_action = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 2, 1, 1, 5), loop_protect_receiver_action()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeLoopProtectPortReceiverAction.setStatus('current')
hpicf_bridge_loop_detected_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 2, 1, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(1, 4096))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpicfBridgeLoopDetectedVlan.setStatus('current')
hpicf_bridge_loop_protect_loop_detected_notification = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 0, 1)).setObjects(('IF-MIB', 'ifIndex'), ('HP-ICF-BRIDGE', 'hpicfBridgeLoopProtectPortLoopCount'), ('HP-ICF-BRIDGE', 'hpicfBridgeLoopProtectPortReceiverAction'))
if mibBuilder.loadTexts:
hpicfBridgeLoopProtectLoopDetectedNotification.setStatus('current')
hpicf_bridge_vlan_loop_protect_loop_detected_notification = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 5, 0, 2)).setObjects(('IF-MIB', 'ifIndex'), ('HP-ICF-BRIDGE', 'hpicfBridgeLoopProtectPortLoopCount'), ('HP-ICF-BRIDGE', 'hpicfBridgeLoopProtectPortReceiverAction'), ('HP-ICF-BRIDGE', 'hpicfBridgeLoopDetectedVlan'))
if mibBuilder.loadTexts:
hpicfBridgeVlanLoopProtectLoopDetectedNotification.setStatus('current')
hpicf_bridge_mirror_session = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 6))
hpicf_bridge_mirror_session_base = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 6, 1))
hpicf_bridge_mirror_session_destination = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 6, 2))
hpicf_bridge_mirror_session_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 6, 2, 1))
if mibBuilder.loadTexts:
hpicfBridgeMirrorSessionTable.setStatus('current')
hpicf_bridge_mirror_session_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 6, 2, 1, 1))
portCopyEntry.registerAugmentions(('HP-ICF-BRIDGE', 'hpicfBridgeMirrorSessionEntry'))
hpicfBridgeMirrorSessionEntry.setIndexNames(*portCopyEntry.getIndexNames())
if mibBuilder.loadTexts:
hpicfBridgeMirrorSessionEntry.setStatus('current')
hpicf_bridge_mirror_session_id = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 6, 2, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647)).clone(1)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
hpicfBridgeMirrorSessionID.setStatus('current')
hpicf_bridge_dont_tag_with_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 6, 2, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone(2)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeDontTagWithVlan.setStatus('current')
hpicf_bridge_mirror_session_type = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 6, 2, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('noMirror', 1), ('mirrorAddresses', 2), ('mirrorPolicies', 3), ('mirrorPorts', 4), ('mirrorVlan', 5))).clone(1)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeMirrorSessionType.setStatus('current')
hpicf_bridge_voice_vlan_config = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 7))
hpicf_bridge_voice_vlan_config_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 7, 1))
if mibBuilder.loadTexts:
hpicfBridgeVoiceVlanConfigTable.setStatus('current')
hpicf_bridge_voice_vlan_config_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 7, 1, 1))
dot1qVlanStaticEntry.registerAugmentions(('HP-ICF-BRIDGE', 'hpicfBridgeVoiceVlanConfigEntry'))
hpicfBridgeVoiceVlanConfigEntry.setIndexNames(*dot1qVlanStaticEntry.getIndexNames())
if mibBuilder.loadTexts:
hpicfBridgeVoiceVlanConfigEntry.setStatus('current')
hpicf_bridge_voice_vlan_enable = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 7, 1, 1, 1), truth_value().clone('false')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeVoiceVlanEnable.setStatus('current')
hpicf_bridge_jumbo_interface_config = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 8))
hpicf_bridge_jumbo_interface_config_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 8, 1))
if mibBuilder.loadTexts:
hpicfBridgeJumboInterfaceConfigTable.setStatus('current')
hpicf_bridge_jumbo_interface_config_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 8, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
hpicfBridgeJumboInterfaceConfigEntry.setStatus('current')
hpicf_bridge_jumbo_interface_enable = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 8, 1, 1, 1), truth_value().clone('false')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeJumboInterfaceEnable.setStatus('current')
hpicf_bridge_management_interface_config = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 9))
hpicf_bridge_management_interface_config_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 9, 1))
if mibBuilder.loadTexts:
hpicfBridgeManagementInterfaceConfigTable.setStatus('current')
hpicf_bridge_management_interface_config_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 9, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
hpicfBridgeManagementInterfaceConfigEntry.setStatus('current')
hpicf_bridge_management_interface_enable = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 1, 9, 1, 1, 1), truth_value().clone('false')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpicfBridgeManagementInterfaceEnable.setStatus('current')
hpicf_bridge_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2))
hpicf_bridge_groups = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1))
hpicf_bridge_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2))
hpicf_bridge_not_groups = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 3))
hpicf_bridge_vlan_base_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 1)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeMaxVlans'), ('HP-ICF-BRIDGE', 'hpicfBridgeVlanEnable'), ('HP-ICF-BRIDGE', 'hpicfBridgePrimaryVlan'), ('HP-ICF-BRIDGE', 'hpicfBridgeVlanConfigStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_vlan_base_group = hpicfBridgeVlanBaseGroup.setStatus('current')
hpicf_bridge_gvrp_port_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 2)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeGvrpRestrictedVlanReg'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_gvrp_port_group = hpicfBridgeGvrpPortGroup.setStatus('deprecated')
hpicf_bridge_rstp_base_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 3)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeRstpForceVersion'), ('HP-ICF-BRIDGE', 'hpicfBridgeRstpConfigStatus'), ('HP-ICF-BRIDGE', 'hpicfBridgeRstpProtocolVersion'), ('HP-ICF-BRIDGE', 'hpicfBridgeRstpAdminStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_rstp_base_group = hpicfBridgeRstpBaseGroup.setStatus('current')
hpicf_bridge_loop_protect_base_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 4)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeLoopProtectInterval'), ('HP-ICF-BRIDGE', 'hpicfBridgeLoopProtectEnableTimer'), ('HP-ICF-BRIDGE', 'hpicfBridgeLoopProtectTrapLoopDetectEnable'), ('HP-ICF-BRIDGE', 'hpicfBridgeLoopProtectPortEnable'), ('HP-ICF-BRIDGE', 'hpicfBridgeLoopProtectPortLoopDetected'), ('HP-ICF-BRIDGE', 'hpicfBridgeLoopProtectPortLastLoopTime'), ('HP-ICF-BRIDGE', 'hpicfBridgeLoopProtectPortLoopCount'), ('HP-ICF-BRIDGE', 'hpicfBridgeLoopProtectPortReceiverAction'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_loop_protect_base_group = hpicfBridgeLoopProtectBaseGroup.setStatus('current')
hpicf_bridge_voice_vlan_config_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 7)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeVoiceVlanEnable'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_voice_vlan_config_group = hpicfBridgeVoiceVlanConfigGroup.setStatus('current')
hpicf_bridge_jumbo_interface_config_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 8)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeJumboInterfaceEnable'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_jumbo_interface_config_group = hpicfBridgeJumboInterfaceConfigGroup.setStatus('current')
hpicf_bridge_management_interface_config_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 9)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeManagementInterfaceEnable'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_management_interface_config_group = hpicfBridgeManagementInterfaceConfigGroup.setStatus('current')
hpicf_bridge_loop_protect_vlan_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 10)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeLoopProtectMode'), ('HP-ICF-BRIDGE', 'hpicfBridgeLoopProtectVIDList'), ('HP-ICF-BRIDGE', 'hpicfBridgeLoopDetectedVlan'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_loop_protect_vlan_group = hpicfBridgeLoopProtectVLANGroup.setStatus('current')
hpicf_bridge_rstp_port_entry_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 11)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeRstpAdminEdgePort'), ('HP-ICF-BRIDGE', 'hpicfBridgeRstpOperEdgePort'), ('HP-ICF-BRIDGE', 'hpicfBridgeRstpAdminPointToPointMac'), ('HP-ICF-BRIDGE', 'hpicfBridgeRstpOperPointToPointMac'), ('HP-ICF-BRIDGE', 'hpicfBridgeRstpPortPathCost'), ('HP-ICF-BRIDGE', 'hpicfBridgeRstpForceBpduMigrationCheck'), ('HP-ICF-BRIDGE', 'hpicfBridgeRstpAutoEdgePort'), ('HP-ICF-BRIDGE', 'hpicfBridgeRstpPortBpduFiltering'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_rstp_port_entry_group = hpicfBridgeRstpPortEntryGroup.setStatus('current')
hpicf_bridge_mirror_session_entry_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 12)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeDontTagWithVlan'), ('HP-ICF-BRIDGE', 'hpicfBridgeMirrorSessionType'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_mirror_session_entry_group = hpicfBridgeMirrorSessionEntryGroup.setStatus('current')
hpicf_bridge_rstp_port_entry_group1 = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 13)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeRstpPortIndex'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_rstp_port_entry_group1 = hpicfBridgeRstpPortEntryGroup1.setStatus('current')
hpicf_bridge_gvrp_port_group1 = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 14)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeGvrpRestrictedVlanReg'), ('HP-ICF-BRIDGE', 'hpicfApplicantStateMachine'), ('HP-ICF-BRIDGE', 'hpicfRegistarStateMachine'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_gvrp_port_group1 = hpicfBridgeGvrpPortGroup1.setStatus('current')
hpicf_bridge_stp_bpdu_throttle_config_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 15)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeStpBpduThrottleStatus'), ('HP-ICF-BRIDGE', 'hpicfBridgeStpBpduThrottleValue'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_stp_bpdu_throttle_config_group = hpicfBridgeStpBpduThrottleConfigGroup.setStatus('current')
hpicf_bridge_loop_protect_not_grp = notification_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 3, 1)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeLoopProtectLoopDetectedNotification'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_loop_protect_not_grp = hpicfBridgeLoopProtectNotGrp.setStatus('current')
hpicf_bridge_vlan_loop_protect_not_grp = notification_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 3, 2)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeVlanLoopProtectLoopDetectedNotification'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_vlan_loop_protect_not_grp = hpicfBridgeVlanLoopProtectNotGrp.setStatus('current')
hpicf_bridge_mirror_session_base_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 1, 5)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeMirrorSessionID'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_mirror_session_base_group = hpicfBridgeMirrorSessionBaseGroup.setStatus('current')
hpicf_bridge_compliance = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 1)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeVlanBaseGroup'), ('HP-ICF-BRIDGE', 'hpicfBridgeGvrpPortGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_compliance = hpicfBridgeCompliance.setStatus('deprecated')
hpicf_bridge_compliance_rev_two = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 2)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeVlanBaseGroup'), ('HP-ICF-BRIDGE', 'hpicfBridgeGvrpPortGroup'), ('HP-ICF-BRIDGE', 'hpicfBridgeRstpBaseGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_compliance_rev_two = hpicfBridgeComplianceRevTwo.setStatus('deprecated')
hpicf_bridge_compliance_rev_three = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 3)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeVlanBaseGroup'), ('HP-ICF-BRIDGE', 'hpicfBridgeGvrpPortGroup'), ('HP-ICF-BRIDGE', 'hpicfBridgeRstpBaseGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_compliance_rev_three = hpicfBridgeComplianceRevThree.setStatus('deprecated')
hpicf_bridge_compliance_rev_four = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 4)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeVlanBaseGroup'), ('HP-ICF-BRIDGE', 'hpicfBridgeGvrpPortGroup'), ('HP-ICF-BRIDGE', 'hpicfBridgeRstpBaseGroup'), ('HP-ICF-BRIDGE', 'hpicfBridgeMirrorSessionBaseGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_compliance_rev_four = hpicfBridgeComplianceRevFour.setStatus('deprecated')
hpicf_bridge_loop_protect_compliance = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 5)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeLoopProtectBaseGroup'), ('HP-ICF-BRIDGE', 'hpicfBridgeLoopProtectNotifications'), ('HP-ICF-BRIDGE', 'hpicfBridgeLoopProtectBaseGroup'), ('HP-ICF-BRIDGE', 'hpicfBridgeLoopProtectNotifications'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_loop_protect_compliance = hpicfBridgeLoopProtectCompliance.setStatus('current')
hpicf_bridge_vlan_base_config_compliance = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 6)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeVoiceVlanConfigGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_vlan_base_config_compliance = hpicfBridgeVlanBaseConfigCompliance.setStatus('current')
hpicf_bridge_interface_config_compliance = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 7)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeJumboInterfaceConfigGroup'), ('HP-ICF-BRIDGE', 'hpicfBridgeManagementInterfaceConfigGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_interface_config_compliance = hpicfBridgeInterfaceConfigCompliance.setStatus('current')
hpicf_bridge_vlan_loop_prot_config_compliance = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 8)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeLoopProtectVLANGroup'), ('HP-ICF-BRIDGE', 'hpicfBridgeVlanLoopProtectNotGrp'), ('HP-ICF-BRIDGE', 'hpicfBridgeLoopProtectNotGrp'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_vlan_loop_prot_config_compliance = hpicfBridgeVlanLoopProtConfigCompliance.setStatus('current')
hpicf_bridge_rstp_port_entry_compliance = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 9)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeRstpPortEntryGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_rstp_port_entry_compliance = hpicfBridgeRstpPortEntryCompliance.setStatus('current')
hpicf_bridge_mirror_session_entry_compliance = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 10)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeMirrorSessionEntryGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_mirror_session_entry_compliance = hpicfBridgeMirrorSessionEntryCompliance.setStatus('current')
hpicf_bridge_rstp_port_entry_compliance1 = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 11)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeRstpPortEntryGroup1'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_rstp_port_entry_compliance1 = hpicfBridgeRstpPortEntryCompliance1.setStatus('current')
hpicf_bridge_compliance_rev_four1 = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 12)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeVlanBaseGroup'), ('HP-ICF-BRIDGE', 'hpicfBridgeGvrpPortGroup1'), ('HP-ICF-BRIDGE', 'hpicfBridgeRstpBaseGroup'), ('HP-ICF-BRIDGE', 'hpicfBridgeMirrorSessionBaseGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_compliance_rev_four1 = hpicfBridgeComplianceRevFour1.setStatus('current')
hpicf_bridge_stp_bpdu_throttle_config_compliance = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 12, 2, 2, 13)).setObjects(('HP-ICF-BRIDGE', 'hpicfBridgeStpBpduThrottleConfigGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicf_bridge_stp_bpdu_throttle_config_compliance = hpicfBridgeStpBpduThrottleConfigCompliance.setStatus('current')
mibBuilder.exportSymbols('HP-ICF-BRIDGE', hpicfBridgeLoopProtectBaseGroup=hpicfBridgeLoopProtectBaseGroup, hpicfBridgeLoopProtect=hpicfBridgeLoopProtect, hpicfBridgeRstp=hpicfBridgeRstp, hpicfBridgeLoopProtectCompliance=hpicfBridgeLoopProtectCompliance, hpicfBridgeVlanBaseConfigCompliance=hpicfBridgeVlanBaseConfigCompliance, hpicfBridgeRstpBaseGroup=hpicfBridgeRstpBaseGroup, hpicfBridgeGvrpStateMachineEntry=hpicfBridgeGvrpStateMachineEntry, hpicfBridgeVlanLoopProtConfigCompliance=hpicfBridgeVlanLoopProtConfigCompliance, hpicfBridgeMirrorSessionEntryGroup=hpicfBridgeMirrorSessionEntryGroup, hpicfBridgeMaxVlans=hpicfBridgeMaxVlans, hpicfBridgeLoopProtectLoopDetectedNotification=hpicfBridgeLoopProtectLoopDetectedNotification, hpicfBridgeRstpPortEntryGroup=hpicfBridgeRstpPortEntryGroup, hpicfBridgeMirrorSessionEntryCompliance=hpicfBridgeMirrorSessionEntryCompliance, hpicfBridgeMirrorSessionBaseGroup=hpicfBridgeMirrorSessionBaseGroup, hpicfBridgeLoopProtectPortEnable=hpicfBridgeLoopProtectPortEnable, hpicfBridgeManagementInterfaceConfig=hpicfBridgeManagementInterfaceConfig, BridgeId=BridgeId, hpicfBridgeConformance=hpicfBridgeConformance, hpicfBridgeJumboInterfaceConfig=hpicfBridgeJumboInterfaceConfig, hpicfBridgeLoopProtectPortLastLoopTime=hpicfBridgeLoopProtectPortLastLoopTime, hpicfBridgeGvrpPortTable=hpicfBridgeGvrpPortTable, hpicfBridgeMirrorSessionType=hpicfBridgeMirrorSessionType, hpicfBridgeVlanBaseGroup=hpicfBridgeVlanBaseGroup, hpicfBridgeLoopProtectTrapLoopDetectEnable=hpicfBridgeLoopProtectTrapLoopDetectEnable, hpicfBridgeLoopProtectPortTable=hpicfBridgeLoopProtectPortTable, hpicfBridgeRstpPortPathCost=hpicfBridgeRstpPortPathCost, hpicfBridgeLoopProtectNotGrp=hpicfBridgeLoopProtectNotGrp, hpicfBridgeLoopProtectPortLoopCount=hpicfBridgeLoopProtectPortLoopCount, hpicfBridgeRstpAutoEdgePort=hpicfBridgeRstpAutoEdgePort, hpicfBridgeGvrpStateMachineTable=hpicfBridgeGvrpStateMachineTable, hpicfBridgeRstpAdminStatus=hpicfBridgeRstpAdminStatus, hpicfBridgeLoopProtectInterval=hpicfBridgeLoopProtectInterval, hpicfBridgeMirrorSessionDestination=hpicfBridgeMirrorSessionDestination, hpicfBridgeLoopProtectNotifications=hpicfBridgeLoopProtectNotifications, hpicfBridgeStpBpduThrottleConfigGroup=hpicfBridgeStpBpduThrottleConfigGroup, hpicfBridgeJumboInterfaceEnable=hpicfBridgeJumboInterfaceEnable, hpicfBridgeVlanEnable=hpicfBridgeVlanEnable, hpicfBridgeJumboInterfaceConfigEntry=hpicfBridgeJumboInterfaceConfigEntry, hpicfBridgeRstpPortTable=hpicfBridgeRstpPortTable, hpicfBridge=hpicfBridge, hpicfBridgeInterfaceConfigCompliance=hpicfBridgeInterfaceConfigCompliance, hpicfBridgeLoopProtectMode=hpicfBridgeLoopProtectMode, PYSNMP_MODULE_ID=hpicfBridge, hpicfBridgeGvrp=hpicfBridgeGvrp, hpicfBridgeRstpPortEntryCompliance=hpicfBridgeRstpPortEntryCompliance, hpicfBridgeManagementInterfaceConfigGroup=hpicfBridgeManagementInterfaceConfigGroup, hpicfBridgeVoiceVlanConfig=hpicfBridgeVoiceVlanConfig, hpicfBridgeManagementInterfaceEnable=hpicfBridgeManagementInterfaceEnable, hpicfBridgeManagementInterfaceConfigEntry=hpicfBridgeManagementInterfaceConfigEntry, hpicfBridgeCompliance=hpicfBridgeCompliance, hpicfBridgeMirrorSessionTable=hpicfBridgeMirrorSessionTable, hpicfBridgeLoopProtectVLANGroup=hpicfBridgeLoopProtectVLANGroup, hpicfBridgeManagementInterfaceConfigTable=hpicfBridgeManagementInterfaceConfigTable, LoopProtectReceiverAction=LoopProtectReceiverAction, hpicfBridgeMirrorSession=hpicfBridgeMirrorSession, hpicfBridgeStpBpduThrottleConfig=hpicfBridgeStpBpduThrottleConfig, hpicfBridgeRstpProtocolVersion=hpicfBridgeRstpProtocolVersion, hpicfBridgeVoiceVlanConfigEntry=hpicfBridgeVoiceVlanConfigEntry, hpicfGenericVlanId=hpicfGenericVlanId, hpicfBridgeVlanLoopProtectNotGrp=hpicfBridgeVlanLoopProtectNotGrp, hpicfBridgeJumboInterfaceConfigGroup=hpicfBridgeJumboInterfaceConfigGroup, hpicfBridgeLoopProtectPort=hpicfBridgeLoopProtectPort, hpicfBridgeRstpPortEntryCompliance1=hpicfBridgeRstpPortEntryCompliance1, hpicfBridgeGvrpRestrictedVlanReg=hpicfBridgeGvrpRestrictedVlanReg, hpicfBridgeJumboInterfaceConfigTable=hpicfBridgeJumboInterfaceConfigTable, hpicfBridgeMirrorSessionBase=hpicfBridgeMirrorSessionBase, hpicfBridgeDontTagWithVlan=hpicfBridgeDontTagWithVlan, hpicfBridgeVlanLoopProtectLoopDetectedNotification=hpicfBridgeVlanLoopProtectLoopDetectedNotification, hpicfBridgeCompliances=hpicfBridgeCompliances, hpicfBridgeRstpPortEntryGroup1=hpicfBridgeRstpPortEntryGroup1, hpicfBridgeMirrorSessionID=hpicfBridgeMirrorSessionID, hpicfBridgeVoiceVlanEnable=hpicfBridgeVoiceVlanEnable, hpicfBridgeLoopProtectPortLoopDetected=hpicfBridgeLoopProtectPortLoopDetected, hpicfBridgeRstpOperPointToPointMac=hpicfBridgeRstpOperPointToPointMac, hpicfBridgeBase=hpicfBridgeBase, hpicfBridgeMirrorSessionEntry=hpicfBridgeMirrorSessionEntry, hpicfBridgeRstpPortEntry=hpicfBridgeRstpPortEntry, hpicfBridgeComplianceRevFour1=hpicfBridgeComplianceRevFour1, hpicfBridgeGvrpPortEntry=hpicfBridgeGvrpPortEntry, hpicfBridgeLoopProtectVIDList=hpicfBridgeLoopProtectVIDList, hpicfBridgeLoopProtectEnableTimer=hpicfBridgeLoopProtectEnableTimer, hpicfBridgeRstpPortBpduFiltering=hpicfBridgeRstpPortBpduFiltering, hpicfBridgeRstpOperEdgePort=hpicfBridgeRstpOperEdgePort, hpicfBridgeComplianceRevTwo=hpicfBridgeComplianceRevTwo, hpicfBridgeComplianceRevThree=hpicfBridgeComplianceRevThree, hpicfApplicantStateMachine=hpicfApplicantStateMachine, hpicfBridgeVlanConfigStatus=hpicfBridgeVlanConfigStatus, hpicfBridgeStpBpduThrottleConfigCompliance=hpicfBridgeStpBpduThrottleConfigCompliance, hpicfBridgeLoopProtectPortReceiverAction=hpicfBridgeLoopProtectPortReceiverAction, hpicfBridgeNotGroups=hpicfBridgeNotGroups, hpicfBridgeComplianceRevFour=hpicfBridgeComplianceRevFour, hpicfBridgeVoiceVlanConfigGroup=hpicfBridgeVoiceVlanConfigGroup, hpicfBridgeRstpForceBpduMigrationCheck=hpicfBridgeRstpForceBpduMigrationCheck, hpicfBridgeRstpPortIndex=hpicfBridgeRstpPortIndex, hpicfBridgeLoopProtectBase=hpicfBridgeLoopProtectBase, hpicfBridgePrimaryVlan=hpicfBridgePrimaryVlan, hpicfBridgeObjects=hpicfBridgeObjects, hpicfBridgeRstpAdminEdgePort=hpicfBridgeRstpAdminEdgePort, hpicfBridgeGvrpPortGroup1=hpicfBridgeGvrpPortGroup1, hpicfBridgeLoopDetectedVlan=hpicfBridgeLoopDetectedVlan, hpicfRegistarStateMachine=hpicfRegistarStateMachine, hpicfBridgeStpBpduThrottleStatus=hpicfBridgeStpBpduThrottleStatus, hpicfBridgeVoiceVlanConfigTable=hpicfBridgeVoiceVlanConfigTable, hpicfBridgeLoopProtectPortEntry=hpicfBridgeLoopProtectPortEntry, hpicfBridgeRstpForceVersion=hpicfBridgeRstpForceVersion, hpicfBridgeRstpAdminPointToPointMac=hpicfBridgeRstpAdminPointToPointMac, hpicfBridgeRstpConfigStatus=hpicfBridgeRstpConfigStatus, hpicfBridgeGroups=hpicfBridgeGroups, hpicfBridgeGvrpPortGroup=hpicfBridgeGvrpPortGroup, hpicfBridgeStpBpduThrottleValue=hpicfBridgeStpBpduThrottleValue) |
rows = int(input("Enter number of rows: "))
k = 0
count=0
count1=0
for i in range(1, rows+1):
for space in range(1, (rows-i)+1):
print(" ", end="")
count+=1
while k!=((2*i)-1):
if count<=rows-1:
print(i+k, end=" ")
count+=1
else:
count1+=1
print(i+k-(2*count1), end=" ")
k += 1
count1 = count = k = 0
print() | rows = int(input('Enter number of rows: '))
k = 0
count = 0
count1 = 0
for i in range(1, rows + 1):
for space in range(1, rows - i + 1):
print(' ', end='')
count += 1
while k != 2 * i - 1:
if count <= rows - 1:
print(i + k, end=' ')
count += 1
else:
count1 += 1
print(i + k - 2 * count1, end=' ')
k += 1
count1 = count = k = 0
print() |
#!/usr/bin/env python
#
# Copyright (C) 2017 ShadowMan
#
class MaxSubSequenceSum(object):
def __init__(self, sequence: list):
self._sequence = sequence
self._sum = sequence[0]
self._left_index = 0
self._right_index = 0
def brute_force(self):
for start_i, start_v in enumerate(self._sequence):
for end_i in range(start_i, len(self._sequence)):
# iterable range is [...), but output result is [...]
if sum(self._sequence[start_i:end_i + 1]) > self._sum:
self._sum = sum(self._sequence[start_i:end_i + 1])
self._left_index = start_i
self._right_index = end_i
@property
def sum(self):
return self._sum
@property
def left_index(self):
return self._left_index
@property
def right_index(self):
return self._right_index
if __name__ == '__main__':
sequences = [
[4, -3, 5, -2, -1, 2, 6, -2],
[1, 2, 3, 4, -4, -3, -2, -1],
[1, -1, 2, -2, 3, -3, 4, -4],
[1, -1, 1, -1, 1, -1, 1, -1],
[1, 2, 3, 4, 5, 6, 7, -1000],
[-100, 1, 2, 3, 4, 5, -9, 1]
]
for seq in sequences:
bf = MaxSubSequenceSum(seq)
bf.brute_force()
print("{} Max sub sequence sum: {}({}, {})".format(
seq, bf.sum, bf.left_index, bf.right_index))
| class Maxsubsequencesum(object):
def __init__(self, sequence: list):
self._sequence = sequence
self._sum = sequence[0]
self._left_index = 0
self._right_index = 0
def brute_force(self):
for (start_i, start_v) in enumerate(self._sequence):
for end_i in range(start_i, len(self._sequence)):
if sum(self._sequence[start_i:end_i + 1]) > self._sum:
self._sum = sum(self._sequence[start_i:end_i + 1])
self._left_index = start_i
self._right_index = end_i
@property
def sum(self):
return self._sum
@property
def left_index(self):
return self._left_index
@property
def right_index(self):
return self._right_index
if __name__ == '__main__':
sequences = [[4, -3, 5, -2, -1, 2, 6, -2], [1, 2, 3, 4, -4, -3, -2, -1], [1, -1, 2, -2, 3, -3, 4, -4], [1, -1, 1, -1, 1, -1, 1, -1], [1, 2, 3, 4, 5, 6, 7, -1000], [-100, 1, 2, 3, 4, 5, -9, 1]]
for seq in sequences:
bf = max_sub_sequence_sum(seq)
bf.brute_force()
print('{} Max sub sequence sum: {}({}, {})'.format(seq, bf.sum, bf.left_index, bf.right_index)) |
def factorial(num):
sum = 1
for i in range(1,num+1):
sum=sum*i
print(sum)
num = int(input("enter the number"))
factorial(num)
| def factorial(num):
sum = 1
for i in range(1, num + 1):
sum = sum * i
print(sum)
num = int(input('enter the number'))
factorial(num) |
class Solution:
def filterRestaurants(self, restaurants: List[List[int]], veganFriendly: int, maxPrice: int, maxDistance: int) -> List[int]:
res = []
for restaurant in restaurants:
i, r, v, p, d = restaurant
if veganFriendly == 1:
if v == 1 and p <= maxPrice and d <= maxDistance:
res.append([i, r])
else:
if p <= maxPrice and d <= maxDistance:
res.append([i, r])
res.sort(key = lambda x : (-x[1], -x[0]))
return [e[0] for e in res]
| class Solution:
def filter_restaurants(self, restaurants: List[List[int]], veganFriendly: int, maxPrice: int, maxDistance: int) -> List[int]:
res = []
for restaurant in restaurants:
(i, r, v, p, d) = restaurant
if veganFriendly == 1:
if v == 1 and p <= maxPrice and (d <= maxDistance):
res.append([i, r])
elif p <= maxPrice and d <= maxDistance:
res.append([i, r])
res.sort(key=lambda x: (-x[1], -x[0]))
return [e[0] for e in res] |
if __name__ == '__main__':
zi = int(input('Enter a number:\n'))
n1 = 1
c9 = 1
m9 = 9
sum = 9
while n1 != 0:
if sum % zi == 0:
n1 = 0
else:
m9 *= 10
sum += m9
c9 += 1
print('%d \'9\' could to be divisible by %d' % (c9, zi))
r = sum / zi
print('%d / %d = %d' % (sum, zi, r))
| if __name__ == '__main__':
zi = int(input('Enter a number:\n'))
n1 = 1
c9 = 1
m9 = 9
sum = 9
while n1 != 0:
if sum % zi == 0:
n1 = 0
else:
m9 *= 10
sum += m9
c9 += 1
print("%d '9' could to be divisible by %d" % (c9, zi))
r = sum / zi
print('%d / %d = %d' % (sum, zi, r)) |
# A. donuts
def donuts(count):
if count < 10:
st="Number of donuts: " + str(count)
else:
st="Number of donuts: many"
return st
# B. both_ends
def both_ends(s):
if len(s) < 2:
st=""
else:
st=s[0]+s[1]+s[-2]+s[-1]
return st
# C. fix_start
def fix_start(s):
i=1
st=s[0]+ s.replace(s[0], '*')[1:]
return st
# D. MixUp
def mix_up(a, b):
st=b[0]+b[1]+a[2:] +" "+ a[0]+a[1]+b[2:]
return st
def test(got, expected):
if got == expected:
prefix = ' OK '
else:
prefix = ' X '
print ('%s got: %s expected: %s' % (prefix, repr(got), repr(expected)))
def main():
print ('donuts')
test(donuts(4), 'Number of donuts: 4')
test(donuts(9), 'Number of donuts: 9')
test(donuts(10), 'Number of donuts: many')
test(donuts(99), 'Number of donuts: many')
print
print ('both_ends')
test(both_ends('spring'), 'spng')
test(both_ends('Hello'), 'Helo')
test(both_ends('a'), '')
test(both_ends('xyz'), 'xyyz')
print
print ('fix_start')
test(fix_start('babble'), 'ba**le')
test(fix_start('aardvark'), 'a*rdv*rk')
test(fix_start('google'), 'goo*le')
test(fix_start('donut'), 'donut')
print
print ('mix_up')
test(mix_up('mix', 'pod'), 'pox mid')
test(mix_up('dog', 'dinner'), 'dig donner')
test(mix_up('gnash', 'sport'), 'spash gnort')
test(mix_up('pezzy', 'firm'), 'fizzy perm')
if __name__ == '__main__':
main()
| def donuts(count):
if count < 10:
st = 'Number of donuts: ' + str(count)
else:
st = 'Number of donuts: many'
return st
def both_ends(s):
if len(s) < 2:
st = ''
else:
st = s[0] + s[1] + s[-2] + s[-1]
return st
def fix_start(s):
i = 1
st = s[0] + s.replace(s[0], '*')[1:]
return st
def mix_up(a, b):
st = b[0] + b[1] + a[2:] + ' ' + a[0] + a[1] + b[2:]
return st
def test(got, expected):
if got == expected:
prefix = ' OK '
else:
prefix = ' X '
print('%s got: %s expected: %s' % (prefix, repr(got), repr(expected)))
def main():
print('donuts')
test(donuts(4), 'Number of donuts: 4')
test(donuts(9), 'Number of donuts: 9')
test(donuts(10), 'Number of donuts: many')
test(donuts(99), 'Number of donuts: many')
print
print('both_ends')
test(both_ends('spring'), 'spng')
test(both_ends('Hello'), 'Helo')
test(both_ends('a'), '')
test(both_ends('xyz'), 'xyyz')
print
print('fix_start')
test(fix_start('babble'), 'ba**le')
test(fix_start('aardvark'), 'a*rdv*rk')
test(fix_start('google'), 'goo*le')
test(fix_start('donut'), 'donut')
print
print('mix_up')
test(mix_up('mix', 'pod'), 'pox mid')
test(mix_up('dog', 'dinner'), 'dig donner')
test(mix_up('gnash', 'sport'), 'spash gnort')
test(mix_up('pezzy', 'firm'), 'fizzy perm')
if __name__ == '__main__':
main() |
def FreqToArfcn(band, tech, freq):
LTE_arfcn_table = {
'Band1':{'FDL_low':2110, 'NOffs-DL':0, 'FUL_low': 1920, 'NOffs-UL':18000, 'spacing': 190},
'Band2':{'FDL_low':2110, 'NOffs-DL':0, 'FUL_low': 1920, 'NOffs-UL':18000, 'spacing': 80},
'Band3':{'FDL_low':2110, 'NOffs-DL':0, 'FUL_low': 1920, 'NOffs-UL':18000, 'spacing': 95},
'Band20':{'FDL_low':791, 'NOffs-DL':6150, 'FUL_low': 832, 'NOffs-UL':24150, 'spacing': -41 }
}
GSM_arfcn_table = {
'900E':{'FDL_low': 925.2, 'FDL_high': 959.8, 'FUL_low': 880.2, 'FUL_high': 914.8, 'spacing': 45},
'900R':{'FDL_low': 921.2, 'FDL_high': 959.8, 'FUL_low': 876.2, 'FUL_high': 914.8, 'spacing': 45},
'900P':{'FDL_low': 935.2, 'FDL_high': 959.8, 'FUL_low': 890.2, 'FUL_high': 914.8, 'spacing': 45}
}
if (tech=='LTE'):
arfcn_table = LTE_arfcn_table
arfcn_dict = arfcn_table[band]
# Check if given frequency is in downlink or uplink
if (arfcn_dict['FDL_low'] > arfcn_dict['FUL_low']):
if freq > arfcn_dict['FDL_low']:
freq_DL = freq
freq_UL = freq - arfcn_dict['spacing']
else:
freq_UL = freq
freq_DL = freq + arfcn_dict['spacing']
else:
if freq > arfcn_dict['FUL_low']:
freq_UL = freq
freq_DL = freq + arfcn_dict['spacing']
else:
freq_DL = freq
freq_UL = freq - arfcn_dict['spacing']
arfcn_DL = int(arfcn_dict['NOffs-DL'] + 10*(freq_DL-arfcn_dict['FDL_low']))
arfcn_UL = int(arfcn_dict['NOffs-UL'] + 10*(freq_UL- arfcn_dict['FUL_low']))
return {'arfcn_DL': arfcn_DL, 'arfcn_UL': arfcn_UL}
if (tech == 'GSM'):
arfcn_table = GSM_arfcn_table
arfcn_dict = arfcn_table[band]
if (arfcn_dict['FDL_low'] > arfcn_dict['FUL_low']):
if freq > arfcn_dict['FDL_low']:
freq_DL = freq
freq_UL = freq - arfcn_dict['spacing']
else:
freq_UL = freq
freq_DL = freq + arfcn_dict['spacing']
freq_UL = freq_DL - arfcn_dict['spacing']
arfcn = int(5*(freq_UL - 890))
if (arfcn < 0):
arfcn = arfcn + 1024
return {'arfcn_DL': arfcn, 'arfcn_UL':arfcn}
def FreqRangeToArfcnRange(band,tech,freq_start,freq_end,bw):
if (freq_end-freq_start > bw):
freq_start_A = freq_start+bw/2
freq_end_A = freq_end-bw/2
arfcn_start = FreqToArfcn(band,tech,freq_start_A)
arfcn_end = FreqToArfcn(band,tech,freq_end_A)
return {'arfcn_start': arfcn_start, 'arfcn_end': arfcn_end}
| def freq_to_arfcn(band, tech, freq):
lte_arfcn_table = {'Band1': {'FDL_low': 2110, 'NOffs-DL': 0, 'FUL_low': 1920, 'NOffs-UL': 18000, 'spacing': 190}, 'Band2': {'FDL_low': 2110, 'NOffs-DL': 0, 'FUL_low': 1920, 'NOffs-UL': 18000, 'spacing': 80}, 'Band3': {'FDL_low': 2110, 'NOffs-DL': 0, 'FUL_low': 1920, 'NOffs-UL': 18000, 'spacing': 95}, 'Band20': {'FDL_low': 791, 'NOffs-DL': 6150, 'FUL_low': 832, 'NOffs-UL': 24150, 'spacing': -41}}
gsm_arfcn_table = {'900E': {'FDL_low': 925.2, 'FDL_high': 959.8, 'FUL_low': 880.2, 'FUL_high': 914.8, 'spacing': 45}, '900R': {'FDL_low': 921.2, 'FDL_high': 959.8, 'FUL_low': 876.2, 'FUL_high': 914.8, 'spacing': 45}, '900P': {'FDL_low': 935.2, 'FDL_high': 959.8, 'FUL_low': 890.2, 'FUL_high': 914.8, 'spacing': 45}}
if tech == 'LTE':
arfcn_table = LTE_arfcn_table
arfcn_dict = arfcn_table[band]
if arfcn_dict['FDL_low'] > arfcn_dict['FUL_low']:
if freq > arfcn_dict['FDL_low']:
freq_dl = freq
freq_ul = freq - arfcn_dict['spacing']
else:
freq_ul = freq
freq_dl = freq + arfcn_dict['spacing']
elif freq > arfcn_dict['FUL_low']:
freq_ul = freq
freq_dl = freq + arfcn_dict['spacing']
else:
freq_dl = freq
freq_ul = freq - arfcn_dict['spacing']
arfcn_dl = int(arfcn_dict['NOffs-DL'] + 10 * (freq_DL - arfcn_dict['FDL_low']))
arfcn_ul = int(arfcn_dict['NOffs-UL'] + 10 * (freq_UL - arfcn_dict['FUL_low']))
return {'arfcn_DL': arfcn_DL, 'arfcn_UL': arfcn_UL}
if tech == 'GSM':
arfcn_table = GSM_arfcn_table
arfcn_dict = arfcn_table[band]
if arfcn_dict['FDL_low'] > arfcn_dict['FUL_low']:
if freq > arfcn_dict['FDL_low']:
freq_dl = freq
freq_ul = freq - arfcn_dict['spacing']
else:
freq_ul = freq
freq_dl = freq + arfcn_dict['spacing']
freq_ul = freq_DL - arfcn_dict['spacing']
arfcn = int(5 * (freq_UL - 890))
if arfcn < 0:
arfcn = arfcn + 1024
return {'arfcn_DL': arfcn, 'arfcn_UL': arfcn}
def freq_range_to_arfcn_range(band, tech, freq_start, freq_end, bw):
if freq_end - freq_start > bw:
freq_start_a = freq_start + bw / 2
freq_end_a = freq_end - bw / 2
arfcn_start = freq_to_arfcn(band, tech, freq_start_A)
arfcn_end = freq_to_arfcn(band, tech, freq_end_A)
return {'arfcn_start': arfcn_start, 'arfcn_end': arfcn_end} |
def rawify_url(url):
if url.startswith("https://github.com"):
urlparts = url.replace("https://github.com", "", 1).strip('/').split('/') + [None] * 5
ownername, reponame, _, refvalue, *filename_parts = urlparts
filename = '/'.join([p for p in filename_parts if p is not None])
assert ownername is not None, "URL should include the name of the owner/organization."
assert reponame is not None, "URL should include the name of the repository."
if refvalue is None:
refvalue = "main"
if filename == '':
filename = "CITATION.cff"
return f"https://raw.githubusercontent.com/{ownername}/{reponame}/{refvalue}/{filename}"
# return unrecognized URLs as-is
return url
| def rawify_url(url):
if url.startswith('https://github.com'):
urlparts = url.replace('https://github.com', '', 1).strip('/').split('/') + [None] * 5
(ownername, reponame, _, refvalue, *filename_parts) = urlparts
filename = '/'.join([p for p in filename_parts if p is not None])
assert ownername is not None, 'URL should include the name of the owner/organization.'
assert reponame is not None, 'URL should include the name of the repository.'
if refvalue is None:
refvalue = 'main'
if filename == '':
filename = 'CITATION.cff'
return f'https://raw.githubusercontent.com/{ownername}/{reponame}/{refvalue}/{filename}'
return url |
vertical_tile_number = 14
tile_size = 16
screen_height = vertical_tile_number*tile_size *2
screen_width = 800 | vertical_tile_number = 14
tile_size = 16
screen_height = vertical_tile_number * tile_size * 2
screen_width = 800 |
def test_pythagorean_triplet(a, b, c):
return a**2 + b**2 - c**2 == 0
for a in range(1, 1000):
for b in range(1, 1000):
if test_pythagorean_triplet(a, b, 1000-(a+b)):
print("Product of a*b*c:", a*b*(1000-a-b))
| def test_pythagorean_triplet(a, b, c):
return a ** 2 + b ** 2 - c ** 2 == 0
for a in range(1, 1000):
for b in range(1, 1000):
if test_pythagorean_triplet(a, b, 1000 - (a + b)):
print('Product of a*b*c:', a * b * (1000 - a - b)) |
def cavityMap(grid):
m, n = len(grid[0]), len(grid)
if n < 3 or m < 3:
return grid
for i in range(1, m-1):
for j in range(1, n-1):
adjacent = [grid[i-1][j], grid[i+1][j],
grid[i][j+1], grid[i][j-1]]
if "X" in adjacent:
continue
if int(grid[i][j]) > max(map(int, adjacent)):
grid[i] = grid[i][:j] + "X" + grid[i][j+1:]
return grid
| def cavity_map(grid):
(m, n) = (len(grid[0]), len(grid))
if n < 3 or m < 3:
return grid
for i in range(1, m - 1):
for j in range(1, n - 1):
adjacent = [grid[i - 1][j], grid[i + 1][j], grid[i][j + 1], grid[i][j - 1]]
if 'X' in adjacent:
continue
if int(grid[i][j]) > max(map(int, adjacent)):
grid[i] = grid[i][:j] + 'X' + grid[i][j + 1:]
return grid |
for row in range(7):
for col in range(4):
if col==3 or row==3 and col in {0,1,2} or row in {0,1,2} and col<1:
print('*',end=' ')
else:
print(' ',end=' ')
print()
### Method-4
for i in range(6):
for j in range(6):
if j==3 or i+j==3 or i==3:
print('*',end=' ')
else:
print(' ',end=' ')
print()
###
| for row in range(7):
for col in range(4):
if col == 3 or (row == 3 and col in {0, 1, 2}) or (row in {0, 1, 2} and col < 1):
print('*', end=' ')
else:
print(' ', end=' ')
print()
for i in range(6):
for j in range(6):
if j == 3 or i + j == 3 or i == 3:
print('*', end=' ')
else:
print(' ', end=' ')
print() |
try:
type('abc', None, None)
except TypeError:
print(True)
else:
print(False)
try:
type('abc', (), None)
except TypeError:
print(True)
else:
print(False)
try:
type('abc', (1,), {})
except TypeError:
print(True)
else:
print(False)
| try:
type('abc', None, None)
except TypeError:
print(True)
else:
print(False)
try:
type('abc', (), None)
except TypeError:
print(True)
else:
print(False)
try:
type('abc', (1,), {})
except TypeError:
print(True)
else:
print(False) |
def mergeSort(myList):
if len(myList) > 1:
mid = len(myList) // 2
left = myList[:mid]
right = myList[mid:]
mergeSort(left)
mergeSort(right)
i,j,k = 0,0,0
while i < len(left) and j < len(right):
if left[i] < right[j]:
myList[k] = left[i]
i += 1
else:
myList[k] = right[j]
j += 1
k += 1
while i < len(left):
myList[k] = left[i]
i += 1
k += 1
while j < len(right):
myList[k]=right[j]
j += 1
k += 1
myList = [54,26,93,17,77,31,44,55,20]
mergeSort(myList)
print("Sorted List : ")
print(myList) | def merge_sort(myList):
if len(myList) > 1:
mid = len(myList) // 2
left = myList[:mid]
right = myList[mid:]
merge_sort(left)
merge_sort(right)
(i, j, k) = (0, 0, 0)
while i < len(left) and j < len(right):
if left[i] < right[j]:
myList[k] = left[i]
i += 1
else:
myList[k] = right[j]
j += 1
k += 1
while i < len(left):
myList[k] = left[i]
i += 1
k += 1
while j < len(right):
myList[k] = right[j]
j += 1
k += 1
my_list = [54, 26, 93, 17, 77, 31, 44, 55, 20]
merge_sort(myList)
print('Sorted List : ')
print(myList) |
# Dictionary labels
txtTitle = "Who\'s talking"
txtBot = "Bot name"
txtAuth= "OAUTH token"
txtChannel = "Channel name"
txtNotConnd = "Not Connected"
txtListChat = "\nList of chatters"
txtIgnore = "Ignore"
txtConnd = "Connected"
txtStart = "Start"
txtStop = "Stop"
txtClear = "Clear"
txtConnect = "Connect"
txtDisconnect = "Disconnect"
txtError = "Error"
txtErrorBot = "Bot name different from oauth"
txtErrorChannel = "Could not connect to channel"
txtErrorOauth = "Improperly formatted auth"
txtErrorAuthenticationFailed = "Login authentication failed"
txtSave = "Save file"
txtSettings = "Settings"
# tk helpers
TXT = "text"
END = "end"
FG = "fg"
RD = "red"
BL = "blue"
RSD = "raised"
SKN = "sunken"
| txt_title = "Who's talking"
txt_bot = 'Bot name'
txt_auth = 'OAUTH token'
txt_channel = 'Channel name'
txt_not_connd = 'Not Connected'
txt_list_chat = '\nList of chatters'
txt_ignore = 'Ignore'
txt_connd = 'Connected'
txt_start = 'Start'
txt_stop = 'Stop'
txt_clear = 'Clear'
txt_connect = 'Connect'
txt_disconnect = 'Disconnect'
txt_error = 'Error'
txt_error_bot = 'Bot name different from oauth'
txt_error_channel = 'Could not connect to channel'
txt_error_oauth = 'Improperly formatted auth'
txt_error_authentication_failed = 'Login authentication failed'
txt_save = 'Save file'
txt_settings = 'Settings'
txt = 'text'
end = 'end'
fg = 'fg'
rd = 'red'
bl = 'blue'
rsd = 'raised'
skn = 'sunken' |
class Solution:
def largestAltitude(self, gain: List[int]) -> int:
altitude = 0; maxAltitude = 0
for g in gain:
altitude += g
maxAltitude = max(maxAltitude, altitude)
return maxAltitude | class Solution:
def largest_altitude(self, gain: List[int]) -> int:
altitude = 0
max_altitude = 0
for g in gain:
altitude += g
max_altitude = max(maxAltitude, altitude)
return maxAltitude |
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'chromium_code': 1,
},
'targets': [
{
'target_name': 'extensions_common',
'type': 'static_library',
'dependencies': [
# TODO(benwells): figure out what to do with the api target and
# api resources compiled into the chrome resource bundle.
# http://crbug.com/162530
'../chrome/chrome_resources.gyp:chrome_resources',
'../components/components.gyp:url_matcher',
'../content/content.gyp:content_common',
'../crypto/crypto.gyp:crypto',
'../ipc/ipc.gyp:ipc',
'../net/net.gyp:net',
'../third_party/re2/re2.gyp:re2',
'../ui/base/ui_base.gyp:ui_base',
'../ui/gfx/gfx.gyp:gfx_geometry',
'../ui/gfx/ipc/gfx_ipc.gyp:gfx_ipc',
'../url/url.gyp:url_lib',
'common/api/api.gyp:extensions_api',
'extensions_strings.gyp:extensions_strings',
],
'include_dirs': [
'..',
'<(INTERMEDIATE_DIR)',
],
'sources': [
'common/api/messaging/message.h',
'common/api/sockets/sockets_manifest_data.cc',
'common/api/sockets/sockets_manifest_data.h',
'common/api/sockets/sockets_manifest_handler.cc',
'common/api/sockets/sockets_manifest_handler.h',
'common/api/sockets/sockets_manifest_permission.cc',
'common/api/sockets/sockets_manifest_permission.h',
'common/common_manifest_handlers.cc',
'common/common_manifest_handlers.h',
'common/constants.cc',
'common/constants.h',
'common/crx_file.cc',
'common/crx_file.h',
'common/csp_validator.cc',
'common/csp_validator.h',
'common/dom_action_types.h',
'common/draggable_region.cc',
'common/draggable_region.h',
'common/error_utils.cc',
'common/error_utils.h',
'common/event_filter.cc',
'common/event_filter.h',
'common/event_filtering_info.cc',
'common/event_filtering_info.h',
'common/event_matcher.cc',
'common/event_matcher.h',
'common/extension.cc',
'common/extension.h',
'common/extension_api.cc',
'common/extension_api.h',
'common/extension_api_stub.cc',
'common/extension_icon_set.cc',
'common/extension_icon_set.h',
'common/extension_l10n_util.cc',
'common/extension_l10n_util.h',
'common/extension_message_generator.cc',
'common/extension_message_generator.h',
'common/extension_messages.cc',
'common/extension_messages.h',
'common/extension_paths.cc',
'common/extension_paths.h',
'common/extension_resource.cc',
'common/extension_resource.h',
'common/extension_set.cc',
'common/extension_set.h',
'common/extension_urls.cc',
'common/extension_urls.h',
'common/extensions_client.cc',
'common/extensions_client.h',
'common/feature_switch.cc',
'common/feature_switch.h',
'common/features/api_feature.cc',
'common/features/api_feature.h',
'common/features/base_feature_provider.cc',
'common/features/base_feature_provider.h',
'common/features/complex_feature.cc',
'common/features/complex_feature.h',
'common/features/feature.cc',
'common/features/feature.h',
'common/features/feature_provider.cc',
'common/features/feature_provider.h',
'common/features/json_feature_provider_source.cc',
'common/features/json_feature_provider_source.h',
'common/features/manifest_feature.cc',
'common/features/manifest_feature.h',
'common/features/permission_feature.cc',
'common/features/permission_feature.h',
'common/features/simple_feature.cc',
'common/features/simple_feature.h',
'common/features/simple_feature_filter.cc',
'common/features/simple_feature_filter.h',
'common/file_util.cc',
'common/file_util.h',
'common/id_util.cc',
'common/id_util.h',
'common/install_warning.cc',
'common/install_warning.h',
'common/manifest.cc',
'common/manifest.h',
'common/manifest_constants.cc',
'common/manifest_constants.h',
'common/manifest_handler.cc',
'common/manifest_handler.h',
'common/manifest_handler_helpers.cc',
'common/manifest_handler_helpers.h',
'common/manifest_handlers/background_info.cc',
'common/manifest_handlers/background_info.h',
'common/manifest_handlers/csp_info.cc',
'common/manifest_handlers/csp_info.h',
'common/manifest_handlers/externally_connectable.cc',
'common/manifest_handlers/externally_connectable.h',
'common/manifest_handlers/file_handler_info.cc',
'common/manifest_handlers/file_handler_info.h',
'common/manifest_handlers/icons_handler.cc',
'common/manifest_handlers/icons_handler.h',
'common/manifest_handlers/incognito_info.cc',
'common/manifest_handlers/incognito_info.h',
'common/manifest_handlers/kiosk_mode_info.cc',
'common/manifest_handlers/kiosk_mode_info.h',
'common/manifest_handlers/offline_enabled_info.cc',
'common/manifest_handlers/offline_enabled_info.h',
'common/manifest_handlers/permissions_parser.cc',
'common/manifest_handlers/permissions_parser.h',
'common/manifest_handlers/requirements_info.cc',
'common/manifest_handlers/requirements_info.h',
'common/manifest_handlers/sandboxed_page_info.cc',
'common/manifest_handlers/sandboxed_page_info.h',
'common/manifest_handlers/shared_module_info.cc',
'common/manifest_handlers/shared_module_info.h',
'common/manifest_handlers/web_accessible_resources_info.cc',
'common/manifest_handlers/web_accessible_resources_info.h',
'common/manifest_handlers/webview_info.cc',
'common/manifest_handlers/webview_info.h',
'common/message_bundle.cc',
'common/message_bundle.h',
'common/one_shot_event.cc',
'common/one_shot_event.h',
'common/permissions/api_permission.cc',
'common/permissions/api_permission.h',
'common/permissions/api_permission_set.cc',
'common/permissions/api_permission_set.h',
'common/permissions/base_set_operators.h',
'common/permissions/extensions_api_permissions.cc',
'common/permissions/extensions_api_permissions.h',
'common/permissions/manifest_permission.cc',
'common/permissions/manifest_permission.h',
'common/permissions/manifest_permission_set.cc',
'common/permissions/manifest_permission_set.h',
'common/permissions/media_galleries_permission.cc',
'common/permissions/media_galleries_permission.h',
'common/permissions/media_galleries_permission_data.cc',
'common/permissions/media_galleries_permission_data.h',
'common/permissions/permission_message.cc',
'common/permissions/permission_message.h',
'common/permissions/permission_message_provider.cc',
'common/permissions/permission_message_provider.h',
'common/permissions/permission_message_util.cc',
'common/permissions/permission_message_util.h',
'common/permissions/permission_set.cc',
'common/permissions/permission_set.h',
'common/permissions/permissions_data.cc',
'common/permissions/permissions_data.h',
'common/permissions/permissions_info.cc',
'common/permissions/permissions_info.h',
'common/permissions/permissions_provider.h',
'common/permissions/set_disjunction_permission.h',
'common/permissions/settings_override_permission.cc',
'common/permissions/settings_override_permission.h',
'common/permissions/socket_permission.cc',
'common/permissions/socket_permission.h',
'common/permissions/socket_permission_data.cc',
'common/permissions/socket_permission_data.h',
'common/permissions/socket_permission_entry.cc',
'common/permissions/socket_permission_entry.h',
'common/permissions/usb_device_permission.cc',
'common/permissions/usb_device_permission.h',
'common/permissions/usb_device_permission_data.cc',
'common/permissions/usb_device_permission_data.h',
'common/stack_frame.cc',
'common/stack_frame.h',
'common/switches.cc',
'common/switches.h',
'common/url_pattern.cc',
'common/url_pattern.h',
'common/url_pattern_set.cc',
'common/url_pattern_set.h',
'common/user_script.cc',
'common/user_script.h',
'common/value_counter.cc',
'common/value_counter.h',
'common/view_type.cc',
'common/view_type.h',
],
# Disable c4267 warnings until we fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
'conditions': [
['enable_extensions==1', {
'dependencies': [
'../device/usb/usb.gyp:device_usb',
],
'sources!': [
'common/extension_api_stub.cc',
],
}, { # enable_extensions == 0
'sources!': [
'common/api/messaging/message.h',
'common/api/sockets/sockets_manifest_data.cc',
'common/api/sockets/sockets_manifest_data.h',
'common/api/sockets/sockets_manifest_handler.cc',
'common/api/sockets/sockets_manifest_handler.h',
'common/api/sockets/sockets_manifest_permission.cc',
'common/api/sockets/sockets_manifest_permission.h',
'common/extension_api.cc',
'common/manifest_handlers/externally_connectable.cc',
'common/manifest_handlers/externally_connectable.h',
],
}],
],
},
{
'target_name': 'extensions_browser',
'type': 'static_library',
'dependencies': [
'../components/components.gyp:keyed_service_content',
'../components/components.gyp:keyed_service_core',
'../components/components.gyp:pref_registry',
'../components/components.gyp:usb_service',
'../content/content.gyp:content_browser',
'../device/serial/serial.gyp:device_serial',
'../skia/skia.gyp:skia',
'../third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
'common/api/api.gyp:extensions_api',
'extensions_common',
'extensions_strings.gyp:extensions_strings',
],
'include_dirs': [
'..',
'<(INTERMEDIATE_DIR)',
# Needed to access generated API headers.
'<(SHARED_INTERMEDIATE_DIR)',
# Needed for grit.
'<(SHARED_INTERMEDIATE_DIR)/chrome',
],
'sources': [
'browser/admin_policy.cc',
'browser/admin_policy.h',
# NOTE: When moving an API out of Chrome be sure to verify that the
# Android build still compiles. See conditions below.
'browser/api/api_resource.cc',
'browser/api/api_resource.h',
'browser/api/api_resource_manager.h',
'browser/api/app_runtime/app_runtime_api.cc',
'browser/api/app_runtime/app_runtime_api.h',
'browser/api/app_view/app_view_internal_api.cc',
'browser/api/app_view/app_view_internal_api.h',
'browser/api/async_api_function.cc',
'browser/api/async_api_function.h',
'browser/api/dns/dns_api.cc',
'browser/api/dns/dns_api.h',
'browser/api/dns/host_resolver_wrapper.cc',
'browser/api/dns/host_resolver_wrapper.h',
'browser/api/extensions_api_client.cc',
'browser/api/extensions_api_client.h',
'browser/api/power/power_api.cc',
'browser/api/power/power_api.h',
'browser/api/power/power_api_manager.cc',
'browser/api/power/power_api_manager.h',
'browser/api/runtime/runtime_api.cc',
'browser/api/runtime/runtime_api.h',
'browser/api/runtime/runtime_api_delegate.cc',
'browser/api/runtime/runtime_api_delegate.h',
'browser/api/serial/serial_api.cc',
'browser/api/serial/serial_api.h',
'browser/api/serial/serial_connection.cc',
'browser/api/serial/serial_connection.h',
'browser/api/serial/serial_event_dispatcher.cc',
'browser/api/serial/serial_event_dispatcher.h',
'browser/api/socket/socket.cc',
'browser/api/socket/socket.h',
'browser/api/socket/socket_api.cc',
'browser/api/socket/socket_api.h',
'browser/api/socket/tcp_socket.cc',
'browser/api/socket/tcp_socket.h',
'browser/api/socket/udp_socket.cc',
'browser/api/socket/udp_socket.h',
'browser/api/sockets_tcp/sockets_tcp_api.cc',
'browser/api/sockets_tcp/sockets_tcp_api.h',
'browser/api/sockets_tcp/tcp_socket_event_dispatcher.cc',
'browser/api/sockets_tcp/tcp_socket_event_dispatcher.h',
'browser/api/sockets_tcp_server/sockets_tcp_server_api.cc',
'browser/api/sockets_tcp_server/sockets_tcp_server_api.h',
'browser/api/sockets_tcp_server/tcp_server_socket_event_dispatcher.cc',
'browser/api/sockets_tcp_server/tcp_server_socket_event_dispatcher.h',
'browser/api/sockets_udp/sockets_udp_api.cc',
'browser/api/sockets_udp/sockets_udp_api.h',
'browser/api/sockets_udp/udp_socket_event_dispatcher.cc',
'browser/api/sockets_udp/udp_socket_event_dispatcher.h',
'browser/api/storage/leveldb_settings_storage_factory.cc',
'browser/api/storage/leveldb_settings_storage_factory.h',
'browser/api/storage/local_value_store_cache.cc',
'browser/api/storage/local_value_store_cache.h',
'browser/api/storage/settings_namespace.cc',
'browser/api/storage/settings_namespace.h',
'browser/api/storage/settings_observer.h',
'browser/api/storage/settings_storage_factory.h',
'browser/api/storage/settings_storage_quota_enforcer.cc',
'browser/api/storage/settings_storage_quota_enforcer.h',
'browser/api/storage/storage_api.cc',
'browser/api/storage/storage_api.h',
'browser/api/storage/storage_frontend.cc',
'browser/api/storage/storage_frontend.h',
'browser/api/storage/value_store_cache.cc',
'browser/api/storage/value_store_cache.h',
'browser/api/storage/weak_unlimited_settings_storage.cc',
'browser/api/storage/weak_unlimited_settings_storage.h',
'browser/api/test/test_api.cc',
'browser/api/test/test_api.h',
'browser/api/usb/usb_api.cc',
'browser/api/usb/usb_api.h',
'browser/api/usb/usb_device_resource.cc',
'browser/api/usb/usb_device_resource.h',
'browser/api_activity_monitor.h',
'browser/app_sorting.h',
'browser/blacklist_state.h',
'browser/blob_holder.cc',
'browser/blob_holder.h',
'browser/browser_context_keyed_api_factory.h',
'browser/browser_context_keyed_service_factories.cc',
'browser/browser_context_keyed_service_factories.h',
'browser/component_extension_resource_manager.h',
'browser/computed_hashes.cc',
'browser/computed_hashes.h',
'browser/content_hash_fetcher.cc',
'browser/content_hash_fetcher.h',
'browser/content_hash_reader.cc',
'browser/content_hash_reader.h',
'browser/content_hash_tree.cc',
'browser/content_hash_tree.h',
'browser/content_verifier.cc',
'browser/content_verifier.h',
'browser/content_verifier_delegate.h',
'browser/content_verifier_io_data.cc',
'browser/content_verifier_io_data.h',
'browser/content_verify_job.cc',
'browser/content_verify_job.h',
'browser/error_map.cc',
'browser/error_map.h',
'browser/event_listener_map.cc',
'browser/event_listener_map.h',
'browser/event_router.cc',
'browser/event_router.h',
'browser/extension_host.cc',
'browser/extension_host.h',
'browser/extension_host_delegate.h',
'browser/extension_error.cc',
'browser/extension_error.h',
'browser/extension_function.cc',
'browser/extension_function.h',
'browser/extension_function_dispatcher.cc',
'browser/extension_function_dispatcher.h',
'browser/extension_function_registry.cc',
'browser/extension_function_registry.h',
'browser/extension_function_util.cc',
'browser/extension_function_util.h',
'browser/extension_icon_image.cc',
'browser/extension_icon_image.h',
'browser/extension_message_filter.cc',
'browser/extension_message_filter.h',
'browser/extension_pref_store.cc',
'browser/extension_pref_store.h',
'browser/extension_pref_value_map.cc',
'browser/extension_pref_value_map_factory.cc',
'browser/extension_pref_value_map_factory.h',
'browser/extension_pref_value_map.h',
'browser/extension_prefs.cc',
'browser/extension_prefs.h',
'browser/extension_prefs_factory.cc',
'browser/extension_prefs_factory.h',
'browser/extension_prefs_observer.h',
'browser/extension_prefs_scope.h',
'browser/extension_protocols.cc',
'browser/extension_protocols.h',
'browser/extension_registry.cc',
'browser/extension_registry.h',
'browser/extension_registry_factory.cc',
'browser/extension_registry_factory.h',
'browser/extension_registry_observer.h',
'browser/extension_scoped_prefs.h',
'browser/extension_system.cc',
'browser/extension_system.h',
'browser/extension_system_provider.cc',
'browser/extension_system_provider.h',
'browser/extension_util.cc',
'browser/extension_util.h',
'browser/extension_web_contents_observer.cc',
'browser/extension_web_contents_observer.h',
'browser/extensions_browser_client.cc',
'browser/extensions_browser_client.h',
'browser/external_provider_interface.h',
'browser/granted_file_entry.cc',
'browser/granted_file_entry.h',
'browser/image_loader.cc',
'browser/image_loader.h',
'browser/image_loader_factory.cc',
'browser/image_loader_factory.h',
'browser/image_util.cc',
'browser/image_util.h',
'browser/info_map.cc',
'browser/info_map.h',
'browser/install_flag.h',
'browser/file_highlighter.cc',
'browser/file_highlighter.h',
'browser/file_reader.cc',
'browser/file_reader.h',
'browser/lazy_background_task_queue.cc',
'browser/lazy_background_task_queue.h',
'browser/management_policy.cc',
'browser/management_policy.h',
'browser/pref_names.cc',
'browser/pref_names.h',
'browser/process_manager.cc',
'browser/process_manager.h',
'browser/process_manager_delegate.h',
'browser/process_manager_observer.h',
'browser/process_map.cc',
'browser/process_map.h',
'browser/process_map_factory.cc',
'browser/process_map_factory.h',
'browser/quota_service.cc',
'browser/quota_service.h',
'browser/renderer_startup_helper.cc',
'browser/renderer_startup_helper.h',
'browser/runtime_data.cc',
'browser/runtime_data.h',
'browser/state_store.cc',
'browser/state_store.h',
'browser/uninstall_reason.h',
'browser/update_observer.h',
'browser/value_store/leveldb_value_store.cc',
'browser/value_store/leveldb_value_store.h',
'browser/value_store/testing_value_store.cc',
'browser/value_store/testing_value_store.h',
'browser/value_store/value_store.cc',
'browser/value_store/value_store.h',
'browser/value_store/value_store_change.cc',
'browser/value_store/value_store_change.h',
'browser/value_store/value_store_frontend.cc',
'browser/value_store/value_store_frontend.h',
'browser/value_store/value_store_util.cc',
'browser/value_store/value_store_util.h',
'browser/verified_contents.cc',
'browser/verified_contents.h',
'browser/view_type_utils.cc',
'browser/view_type_utils.h',
],
'conditions': [
['enable_extensions==0', {
# Exclude all API implementations and the ExtensionsApiClient
# interface. Moving an API from src/chrome to src/extensions implies
# it can be cleanly disabled with enable_extensions==0.
# TODO: Eventually the entire extensions module should not be built
# when enable_extensions==0.
'sources/': [
['exclude', '^browser/api/'],
],
'sources!': [
'browser/browser_context_keyed_service_factories.cc',
'browser/browser_context_keyed_service_factories.h',
],
'dependencies!': [
'../components/components.gyp:usb_service',
'../device/serial/serial.gyp:device_serial',
],
}],
],
# Disable c4267 warnings until we fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
},
{
'target_name': 'extensions_renderer',
'type': 'static_library',
'dependencies': [
'extensions_resources.gyp:extensions_resources',
'../chrome/chrome_resources.gyp:chrome_resources',
'../gin/gin.gyp:gin',
'../third_party/WebKit/public/blink.gyp:blink',
],
'include_dirs': [
'..',
],
'sources': [
'renderer/activity_log_converter_strategy.cc',
'renderer/activity_log_converter_strategy.h',
'renderer/api_activity_logger.cc',
'renderer/api_activity_logger.h',
'renderer/api_definitions_natives.cc',
'renderer/api_definitions_natives.h',
'renderer/app_runtime_custom_bindings.cc',
'renderer/app_runtime_custom_bindings.h',
'renderer/binding_generating_native_handler.cc',
'renderer/binding_generating_native_handler.h',
'renderer/blob_native_handler.cc',
'renderer/blob_native_handler.h',
'renderer/console.cc',
'renderer/console.h',
'renderer/content_watcher.cc',
'renderer/content_watcher.h',
'renderer/context_menus_custom_bindings.cc',
'renderer/context_menus_custom_bindings.h',
'renderer/css_native_handler.cc',
'renderer/css_native_handler.h',
'renderer/default_dispatcher_delegate.cc',
'renderer/default_dispatcher_delegate.h',
'renderer/dispatcher.cc',
'renderer/dispatcher.h',
'renderer/dispatcher_delegate.h',
'renderer/document_custom_bindings.cc',
'renderer/document_custom_bindings.h',
'renderer/dom_activity_logger.cc',
'renderer/dom_activity_logger.h',
'renderer/event_bindings.cc',
'renderer/event_bindings.h',
'renderer/extension_helper.cc',
'renderer/extension_helper.h',
'renderer/extensions_renderer_client.cc',
'renderer/extensions_renderer_client.h',
'renderer/extension_groups.h',
'renderer/file_system_natives.cc',
'renderer/file_system_natives.h',
'renderer/i18n_custom_bindings.cc',
'renderer/i18n_custom_bindings.h',
'renderer/id_generator_custom_bindings.cc',
'renderer/id_generator_custom_bindings.h',
'renderer/lazy_background_page_native_handler.cc',
'renderer/lazy_background_page_native_handler.h',
'renderer/logging_native_handler.cc',
'renderer/logging_native_handler.h',
'renderer/messaging_bindings.cc',
'renderer/messaging_bindings.h',
'renderer/module_system.cc',
'renderer/module_system.h',
'renderer/native_handler.cc',
'renderer/native_handler.h',
'renderer/object_backed_native_handler.cc',
'renderer/object_backed_native_handler.h',
'renderer/print_native_handler.cc',
'renderer/print_native_handler.h',
'renderer/process_info_native_handler.cc',
'renderer/process_info_native_handler.h',
'renderer/programmatic_script_injector.cc',
'renderer/programmatic_script_injector.h',
'renderer/render_view_observer_natives.cc',
'renderer/render_view_observer_natives.h',
'renderer/request_sender.cc',
'renderer/request_sender.h',
'renderer/resource_bundle_source_map.cc',
'renderer/resource_bundle_source_map.h',
'renderer/resources/app_runtime_custom_bindings.js',
'renderer/resources/binding.js',
'renderer/resources/context_menus_custom_bindings.js',
'renderer/resources/entry_id_manager.js',
'renderer/resources/event.js',
'renderer/resources/extension_custom_bindings.js',
'renderer/resources/greasemonkey_api.js',
'renderer/resources/i18n_custom_bindings.js',
'renderer/resources/image_util.js',
'renderer/resources/json_schema.js',
'renderer/resources/last_error.js',
'renderer/resources/messaging.js',
'renderer/resources/messaging_utils.js',
'renderer/resources/permissions_custom_bindings.js',
'renderer/resources/platform_app.css',
'renderer/resources/platform_app.js',
'renderer/resources/runtime_custom_bindings.js',
'renderer/resources/schema_utils.js',
'renderer/resources/send_request.js',
'renderer/resources/set_icon.js',
'renderer/resources/storage_area.js',
'renderer/resources/test_custom_bindings.js',
'renderer/resources/uncaught_exception_handler.js',
'renderer/resources/unload_event.js',
'renderer/resources/utils.js',
'renderer/runtime_custom_bindings.cc',
'renderer/runtime_custom_bindings.h',
'renderer/safe_builtins.cc',
'renderer/safe_builtins.h',
'renderer/send_request_natives.cc',
'renderer/send_request_natives.h',
'renderer/set_icon_natives.cc',
'renderer/set_icon_natives.h',
'renderer/scoped_persistent.h',
'renderer/script_context.cc',
'renderer/script_context.h',
'renderer/script_context_set.cc',
'renderer/script_context_set.h',
'renderer/script_injection.cc',
'renderer/script_injection.h',
'renderer/script_injection_manager.cc',
'renderer/script_injection_manager.h',
'renderer/script_injector.h',
'renderer/scripts_run_info.cc',
'renderer/scripts_run_info.h',
'renderer/static_v8_external_ascii_string_resource.cc',
'renderer/static_v8_external_ascii_string_resource.h',
'renderer/test_features_native_handler.cc',
'renderer/test_features_native_handler.h',
'renderer/user_gestures_native_handler.cc',
'renderer/user_gestures_native_handler.h',
'renderer/user_script_injector.cc',
'renderer/user_script_injector.h',
'renderer/user_script_set.cc',
'renderer/user_script_set.h',
'renderer/utils_native_handler.cc',
'renderer/utils_native_handler.h',
'renderer/v8_context_native_handler.cc',
'renderer/v8_context_native_handler.h',
'renderer/v8_schema_registry.cc',
'renderer/v8_schema_registry.h',
],
# Disable c4267 warnings until we fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
'conditions': [
# Temporary conditions for Android until it can stop building
# the extensions module altogether. These exemptions are taken
# directly from chrome_renderer.gypi as sources are moved
# from //chrome/renderer to //extensions/renderer.
['OS == "android"', {
'sources!': [
'renderer/api_definitions_natives.cc',
'renderer/context_menus_custom_bindings.cc',
'renderer/render_view_observer_natives.cc',
'renderer/send_request_natives.cc',
],
}],
]
},
{
'target_name': 'extensions_test_support',
'type': 'static_library',
'dependencies': [
'../base/base.gyp:base',
'../testing/gtest.gyp:gtest',
'common/api/api.gyp:extensions_api',
'extensions_browser',
'extensions_common',
],
'include_dirs': [
'..',
'<(SHARED_INTERMEDIATE_DIR)',
],
'sources': [
'browser/test_extensions_browser_client.cc',
'browser/test_extensions_browser_client.h',
'browser/test_management_policy.cc',
'browser/test_management_policy.h',
'browser/test_runtime_api_delegate.cc',
'browser/test_runtime_api_delegate.h',
'common/extension_builder.cc',
'common/extension_builder.h',
'common/test_util.cc',
'common/test_util.h',
'common/value_builder.cc',
'common/value_builder.h',
'renderer/test_extensions_renderer_client.cc',
'renderer/test_extensions_renderer_client.h',
],
# Disable c4267 warnings until we fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
},
{
# TODO(tfarina): Our plan is to build and run this target on Chromium bots
# (TS, CQ, Waterfall). First we will get this target passing all tests,
# after that we will start the work on buildbot to get this running there.
# When we consider this stable in the bots, we can go to unit_tests target
# and remove the duplicated entries from there, otherwise if we just
# remove them right now we would be losing coverage.
# http://crbug.com/348066
'target_name': 'extensions_unittests',
'type': 'executable',
'dependencies': [
'../base/base.gyp:base',
'../base/base.gyp:test_support_base',
'../content/content_shell_and_tests.gyp:test_support_content',
'../testing/gmock.gyp:gmock',
'../testing/gtest.gyp:gtest',
'extensions_common',
'extensions_renderer',
'extensions_resources.gyp:extensions_resources',
'extensions_strings.gyp:extensions_strings',
'extensions_test_support',
],
'sources': [
'common/api/sockets/sockets_manifest_permission_unittest.cc',
'common/csp_validator_unittest.cc',
'common/event_filter_unittest.cc',
'common/id_util_unittest.cc',
'common/one_shot_event_unittest.cc',
'common/permissions/manifest_permission_set_unittest.cc',
'common/user_script_unittest.cc',
'renderer/event_unittest.cc',
'renderer/json_schema_unittest.cc',
'renderer/messaging_utils_unittest.cc',
'renderer/module_system_test.cc',
'renderer/module_system_test.h',
'renderer/module_system_unittest.cc',
'renderer/safe_builtins_unittest.cc',
'renderer/utils_unittest.cc',
'test/extensions_unittests_main.cc',
'test/test_extensions_client.cc',
'test/test_extensions_client.h',
'test/test_permission_message_provider.cc',
'test/test_permission_message_provider.h',
'test/test_permissions_provider.cc',
'test/test_permissions_provider.h',
],
'conditions': [
['OS=="win" and win_use_allocator_shim==1', {
'dependencies': [
'../base/allocator/allocator.gyp:allocator',
],
}],
],
'actions': [
{
'action_name': 'repack_components_pack',
'variables': {
'pak_inputs': [
'<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_renderer_resources.pak',
],
'pak_output': '<(PRODUCT_DIR)/extensions_unittests_resources.pak',
},
'includes': [ '../build/repack_action.gypi' ],
},
],
},
]
}
| {'variables': {'chromium_code': 1}, 'targets': [{'target_name': 'extensions_common', 'type': 'static_library', 'dependencies': ['../chrome/chrome_resources.gyp:chrome_resources', '../components/components.gyp:url_matcher', '../content/content.gyp:content_common', '../crypto/crypto.gyp:crypto', '../ipc/ipc.gyp:ipc', '../net/net.gyp:net', '../third_party/re2/re2.gyp:re2', '../ui/base/ui_base.gyp:ui_base', '../ui/gfx/gfx.gyp:gfx_geometry', '../ui/gfx/ipc/gfx_ipc.gyp:gfx_ipc', '../url/url.gyp:url_lib', 'common/api/api.gyp:extensions_api', 'extensions_strings.gyp:extensions_strings'], 'include_dirs': ['..', '<(INTERMEDIATE_DIR)'], 'sources': ['common/api/messaging/message.h', 'common/api/sockets/sockets_manifest_data.cc', 'common/api/sockets/sockets_manifest_data.h', 'common/api/sockets/sockets_manifest_handler.cc', 'common/api/sockets/sockets_manifest_handler.h', 'common/api/sockets/sockets_manifest_permission.cc', 'common/api/sockets/sockets_manifest_permission.h', 'common/common_manifest_handlers.cc', 'common/common_manifest_handlers.h', 'common/constants.cc', 'common/constants.h', 'common/crx_file.cc', 'common/crx_file.h', 'common/csp_validator.cc', 'common/csp_validator.h', 'common/dom_action_types.h', 'common/draggable_region.cc', 'common/draggable_region.h', 'common/error_utils.cc', 'common/error_utils.h', 'common/event_filter.cc', 'common/event_filter.h', 'common/event_filtering_info.cc', 'common/event_filtering_info.h', 'common/event_matcher.cc', 'common/event_matcher.h', 'common/extension.cc', 'common/extension.h', 'common/extension_api.cc', 'common/extension_api.h', 'common/extension_api_stub.cc', 'common/extension_icon_set.cc', 'common/extension_icon_set.h', 'common/extension_l10n_util.cc', 'common/extension_l10n_util.h', 'common/extension_message_generator.cc', 'common/extension_message_generator.h', 'common/extension_messages.cc', 'common/extension_messages.h', 'common/extension_paths.cc', 'common/extension_paths.h', 'common/extension_resource.cc', 'common/extension_resource.h', 'common/extension_set.cc', 'common/extension_set.h', 'common/extension_urls.cc', 'common/extension_urls.h', 'common/extensions_client.cc', 'common/extensions_client.h', 'common/feature_switch.cc', 'common/feature_switch.h', 'common/features/api_feature.cc', 'common/features/api_feature.h', 'common/features/base_feature_provider.cc', 'common/features/base_feature_provider.h', 'common/features/complex_feature.cc', 'common/features/complex_feature.h', 'common/features/feature.cc', 'common/features/feature.h', 'common/features/feature_provider.cc', 'common/features/feature_provider.h', 'common/features/json_feature_provider_source.cc', 'common/features/json_feature_provider_source.h', 'common/features/manifest_feature.cc', 'common/features/manifest_feature.h', 'common/features/permission_feature.cc', 'common/features/permission_feature.h', 'common/features/simple_feature.cc', 'common/features/simple_feature.h', 'common/features/simple_feature_filter.cc', 'common/features/simple_feature_filter.h', 'common/file_util.cc', 'common/file_util.h', 'common/id_util.cc', 'common/id_util.h', 'common/install_warning.cc', 'common/install_warning.h', 'common/manifest.cc', 'common/manifest.h', 'common/manifest_constants.cc', 'common/manifest_constants.h', 'common/manifest_handler.cc', 'common/manifest_handler.h', 'common/manifest_handler_helpers.cc', 'common/manifest_handler_helpers.h', 'common/manifest_handlers/background_info.cc', 'common/manifest_handlers/background_info.h', 'common/manifest_handlers/csp_info.cc', 'common/manifest_handlers/csp_info.h', 'common/manifest_handlers/externally_connectable.cc', 'common/manifest_handlers/externally_connectable.h', 'common/manifest_handlers/file_handler_info.cc', 'common/manifest_handlers/file_handler_info.h', 'common/manifest_handlers/icons_handler.cc', 'common/manifest_handlers/icons_handler.h', 'common/manifest_handlers/incognito_info.cc', 'common/manifest_handlers/incognito_info.h', 'common/manifest_handlers/kiosk_mode_info.cc', 'common/manifest_handlers/kiosk_mode_info.h', 'common/manifest_handlers/offline_enabled_info.cc', 'common/manifest_handlers/offline_enabled_info.h', 'common/manifest_handlers/permissions_parser.cc', 'common/manifest_handlers/permissions_parser.h', 'common/manifest_handlers/requirements_info.cc', 'common/manifest_handlers/requirements_info.h', 'common/manifest_handlers/sandboxed_page_info.cc', 'common/manifest_handlers/sandboxed_page_info.h', 'common/manifest_handlers/shared_module_info.cc', 'common/manifest_handlers/shared_module_info.h', 'common/manifest_handlers/web_accessible_resources_info.cc', 'common/manifest_handlers/web_accessible_resources_info.h', 'common/manifest_handlers/webview_info.cc', 'common/manifest_handlers/webview_info.h', 'common/message_bundle.cc', 'common/message_bundle.h', 'common/one_shot_event.cc', 'common/one_shot_event.h', 'common/permissions/api_permission.cc', 'common/permissions/api_permission.h', 'common/permissions/api_permission_set.cc', 'common/permissions/api_permission_set.h', 'common/permissions/base_set_operators.h', 'common/permissions/extensions_api_permissions.cc', 'common/permissions/extensions_api_permissions.h', 'common/permissions/manifest_permission.cc', 'common/permissions/manifest_permission.h', 'common/permissions/manifest_permission_set.cc', 'common/permissions/manifest_permission_set.h', 'common/permissions/media_galleries_permission.cc', 'common/permissions/media_galleries_permission.h', 'common/permissions/media_galleries_permission_data.cc', 'common/permissions/media_galleries_permission_data.h', 'common/permissions/permission_message.cc', 'common/permissions/permission_message.h', 'common/permissions/permission_message_provider.cc', 'common/permissions/permission_message_provider.h', 'common/permissions/permission_message_util.cc', 'common/permissions/permission_message_util.h', 'common/permissions/permission_set.cc', 'common/permissions/permission_set.h', 'common/permissions/permissions_data.cc', 'common/permissions/permissions_data.h', 'common/permissions/permissions_info.cc', 'common/permissions/permissions_info.h', 'common/permissions/permissions_provider.h', 'common/permissions/set_disjunction_permission.h', 'common/permissions/settings_override_permission.cc', 'common/permissions/settings_override_permission.h', 'common/permissions/socket_permission.cc', 'common/permissions/socket_permission.h', 'common/permissions/socket_permission_data.cc', 'common/permissions/socket_permission_data.h', 'common/permissions/socket_permission_entry.cc', 'common/permissions/socket_permission_entry.h', 'common/permissions/usb_device_permission.cc', 'common/permissions/usb_device_permission.h', 'common/permissions/usb_device_permission_data.cc', 'common/permissions/usb_device_permission_data.h', 'common/stack_frame.cc', 'common/stack_frame.h', 'common/switches.cc', 'common/switches.h', 'common/url_pattern.cc', 'common/url_pattern.h', 'common/url_pattern_set.cc', 'common/url_pattern_set.h', 'common/user_script.cc', 'common/user_script.h', 'common/value_counter.cc', 'common/value_counter.h', 'common/view_type.cc', 'common/view_type.h'], 'msvs_disabled_warnings': [4267], 'conditions': [['enable_extensions==1', {'dependencies': ['../device/usb/usb.gyp:device_usb'], 'sources!': ['common/extension_api_stub.cc']}, {'sources!': ['common/api/messaging/message.h', 'common/api/sockets/sockets_manifest_data.cc', 'common/api/sockets/sockets_manifest_data.h', 'common/api/sockets/sockets_manifest_handler.cc', 'common/api/sockets/sockets_manifest_handler.h', 'common/api/sockets/sockets_manifest_permission.cc', 'common/api/sockets/sockets_manifest_permission.h', 'common/extension_api.cc', 'common/manifest_handlers/externally_connectable.cc', 'common/manifest_handlers/externally_connectable.h']}]]}, {'target_name': 'extensions_browser', 'type': 'static_library', 'dependencies': ['../components/components.gyp:keyed_service_content', '../components/components.gyp:keyed_service_core', '../components/components.gyp:pref_registry', '../components/components.gyp:usb_service', '../content/content.gyp:content_browser', '../device/serial/serial.gyp:device_serial', '../skia/skia.gyp:skia', '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase', 'common/api/api.gyp:extensions_api', 'extensions_common', 'extensions_strings.gyp:extensions_strings'], 'include_dirs': ['..', '<(INTERMEDIATE_DIR)', '<(SHARED_INTERMEDIATE_DIR)', '<(SHARED_INTERMEDIATE_DIR)/chrome'], 'sources': ['browser/admin_policy.cc', 'browser/admin_policy.h', 'browser/api/api_resource.cc', 'browser/api/api_resource.h', 'browser/api/api_resource_manager.h', 'browser/api/app_runtime/app_runtime_api.cc', 'browser/api/app_runtime/app_runtime_api.h', 'browser/api/app_view/app_view_internal_api.cc', 'browser/api/app_view/app_view_internal_api.h', 'browser/api/async_api_function.cc', 'browser/api/async_api_function.h', 'browser/api/dns/dns_api.cc', 'browser/api/dns/dns_api.h', 'browser/api/dns/host_resolver_wrapper.cc', 'browser/api/dns/host_resolver_wrapper.h', 'browser/api/extensions_api_client.cc', 'browser/api/extensions_api_client.h', 'browser/api/power/power_api.cc', 'browser/api/power/power_api.h', 'browser/api/power/power_api_manager.cc', 'browser/api/power/power_api_manager.h', 'browser/api/runtime/runtime_api.cc', 'browser/api/runtime/runtime_api.h', 'browser/api/runtime/runtime_api_delegate.cc', 'browser/api/runtime/runtime_api_delegate.h', 'browser/api/serial/serial_api.cc', 'browser/api/serial/serial_api.h', 'browser/api/serial/serial_connection.cc', 'browser/api/serial/serial_connection.h', 'browser/api/serial/serial_event_dispatcher.cc', 'browser/api/serial/serial_event_dispatcher.h', 'browser/api/socket/socket.cc', 'browser/api/socket/socket.h', 'browser/api/socket/socket_api.cc', 'browser/api/socket/socket_api.h', 'browser/api/socket/tcp_socket.cc', 'browser/api/socket/tcp_socket.h', 'browser/api/socket/udp_socket.cc', 'browser/api/socket/udp_socket.h', 'browser/api/sockets_tcp/sockets_tcp_api.cc', 'browser/api/sockets_tcp/sockets_tcp_api.h', 'browser/api/sockets_tcp/tcp_socket_event_dispatcher.cc', 'browser/api/sockets_tcp/tcp_socket_event_dispatcher.h', 'browser/api/sockets_tcp_server/sockets_tcp_server_api.cc', 'browser/api/sockets_tcp_server/sockets_tcp_server_api.h', 'browser/api/sockets_tcp_server/tcp_server_socket_event_dispatcher.cc', 'browser/api/sockets_tcp_server/tcp_server_socket_event_dispatcher.h', 'browser/api/sockets_udp/sockets_udp_api.cc', 'browser/api/sockets_udp/sockets_udp_api.h', 'browser/api/sockets_udp/udp_socket_event_dispatcher.cc', 'browser/api/sockets_udp/udp_socket_event_dispatcher.h', 'browser/api/storage/leveldb_settings_storage_factory.cc', 'browser/api/storage/leveldb_settings_storage_factory.h', 'browser/api/storage/local_value_store_cache.cc', 'browser/api/storage/local_value_store_cache.h', 'browser/api/storage/settings_namespace.cc', 'browser/api/storage/settings_namespace.h', 'browser/api/storage/settings_observer.h', 'browser/api/storage/settings_storage_factory.h', 'browser/api/storage/settings_storage_quota_enforcer.cc', 'browser/api/storage/settings_storage_quota_enforcer.h', 'browser/api/storage/storage_api.cc', 'browser/api/storage/storage_api.h', 'browser/api/storage/storage_frontend.cc', 'browser/api/storage/storage_frontend.h', 'browser/api/storage/value_store_cache.cc', 'browser/api/storage/value_store_cache.h', 'browser/api/storage/weak_unlimited_settings_storage.cc', 'browser/api/storage/weak_unlimited_settings_storage.h', 'browser/api/test/test_api.cc', 'browser/api/test/test_api.h', 'browser/api/usb/usb_api.cc', 'browser/api/usb/usb_api.h', 'browser/api/usb/usb_device_resource.cc', 'browser/api/usb/usb_device_resource.h', 'browser/api_activity_monitor.h', 'browser/app_sorting.h', 'browser/blacklist_state.h', 'browser/blob_holder.cc', 'browser/blob_holder.h', 'browser/browser_context_keyed_api_factory.h', 'browser/browser_context_keyed_service_factories.cc', 'browser/browser_context_keyed_service_factories.h', 'browser/component_extension_resource_manager.h', 'browser/computed_hashes.cc', 'browser/computed_hashes.h', 'browser/content_hash_fetcher.cc', 'browser/content_hash_fetcher.h', 'browser/content_hash_reader.cc', 'browser/content_hash_reader.h', 'browser/content_hash_tree.cc', 'browser/content_hash_tree.h', 'browser/content_verifier.cc', 'browser/content_verifier.h', 'browser/content_verifier_delegate.h', 'browser/content_verifier_io_data.cc', 'browser/content_verifier_io_data.h', 'browser/content_verify_job.cc', 'browser/content_verify_job.h', 'browser/error_map.cc', 'browser/error_map.h', 'browser/event_listener_map.cc', 'browser/event_listener_map.h', 'browser/event_router.cc', 'browser/event_router.h', 'browser/extension_host.cc', 'browser/extension_host.h', 'browser/extension_host_delegate.h', 'browser/extension_error.cc', 'browser/extension_error.h', 'browser/extension_function.cc', 'browser/extension_function.h', 'browser/extension_function_dispatcher.cc', 'browser/extension_function_dispatcher.h', 'browser/extension_function_registry.cc', 'browser/extension_function_registry.h', 'browser/extension_function_util.cc', 'browser/extension_function_util.h', 'browser/extension_icon_image.cc', 'browser/extension_icon_image.h', 'browser/extension_message_filter.cc', 'browser/extension_message_filter.h', 'browser/extension_pref_store.cc', 'browser/extension_pref_store.h', 'browser/extension_pref_value_map.cc', 'browser/extension_pref_value_map_factory.cc', 'browser/extension_pref_value_map_factory.h', 'browser/extension_pref_value_map.h', 'browser/extension_prefs.cc', 'browser/extension_prefs.h', 'browser/extension_prefs_factory.cc', 'browser/extension_prefs_factory.h', 'browser/extension_prefs_observer.h', 'browser/extension_prefs_scope.h', 'browser/extension_protocols.cc', 'browser/extension_protocols.h', 'browser/extension_registry.cc', 'browser/extension_registry.h', 'browser/extension_registry_factory.cc', 'browser/extension_registry_factory.h', 'browser/extension_registry_observer.h', 'browser/extension_scoped_prefs.h', 'browser/extension_system.cc', 'browser/extension_system.h', 'browser/extension_system_provider.cc', 'browser/extension_system_provider.h', 'browser/extension_util.cc', 'browser/extension_util.h', 'browser/extension_web_contents_observer.cc', 'browser/extension_web_contents_observer.h', 'browser/extensions_browser_client.cc', 'browser/extensions_browser_client.h', 'browser/external_provider_interface.h', 'browser/granted_file_entry.cc', 'browser/granted_file_entry.h', 'browser/image_loader.cc', 'browser/image_loader.h', 'browser/image_loader_factory.cc', 'browser/image_loader_factory.h', 'browser/image_util.cc', 'browser/image_util.h', 'browser/info_map.cc', 'browser/info_map.h', 'browser/install_flag.h', 'browser/file_highlighter.cc', 'browser/file_highlighter.h', 'browser/file_reader.cc', 'browser/file_reader.h', 'browser/lazy_background_task_queue.cc', 'browser/lazy_background_task_queue.h', 'browser/management_policy.cc', 'browser/management_policy.h', 'browser/pref_names.cc', 'browser/pref_names.h', 'browser/process_manager.cc', 'browser/process_manager.h', 'browser/process_manager_delegate.h', 'browser/process_manager_observer.h', 'browser/process_map.cc', 'browser/process_map.h', 'browser/process_map_factory.cc', 'browser/process_map_factory.h', 'browser/quota_service.cc', 'browser/quota_service.h', 'browser/renderer_startup_helper.cc', 'browser/renderer_startup_helper.h', 'browser/runtime_data.cc', 'browser/runtime_data.h', 'browser/state_store.cc', 'browser/state_store.h', 'browser/uninstall_reason.h', 'browser/update_observer.h', 'browser/value_store/leveldb_value_store.cc', 'browser/value_store/leveldb_value_store.h', 'browser/value_store/testing_value_store.cc', 'browser/value_store/testing_value_store.h', 'browser/value_store/value_store.cc', 'browser/value_store/value_store.h', 'browser/value_store/value_store_change.cc', 'browser/value_store/value_store_change.h', 'browser/value_store/value_store_frontend.cc', 'browser/value_store/value_store_frontend.h', 'browser/value_store/value_store_util.cc', 'browser/value_store/value_store_util.h', 'browser/verified_contents.cc', 'browser/verified_contents.h', 'browser/view_type_utils.cc', 'browser/view_type_utils.h'], 'conditions': [['enable_extensions==0', {'sources/': [['exclude', '^browser/api/']], 'sources!': ['browser/browser_context_keyed_service_factories.cc', 'browser/browser_context_keyed_service_factories.h'], 'dependencies!': ['../components/components.gyp:usb_service', '../device/serial/serial.gyp:device_serial']}]], 'msvs_disabled_warnings': [4267]}, {'target_name': 'extensions_renderer', 'type': 'static_library', 'dependencies': ['extensions_resources.gyp:extensions_resources', '../chrome/chrome_resources.gyp:chrome_resources', '../gin/gin.gyp:gin', '../third_party/WebKit/public/blink.gyp:blink'], 'include_dirs': ['..'], 'sources': ['renderer/activity_log_converter_strategy.cc', 'renderer/activity_log_converter_strategy.h', 'renderer/api_activity_logger.cc', 'renderer/api_activity_logger.h', 'renderer/api_definitions_natives.cc', 'renderer/api_definitions_natives.h', 'renderer/app_runtime_custom_bindings.cc', 'renderer/app_runtime_custom_bindings.h', 'renderer/binding_generating_native_handler.cc', 'renderer/binding_generating_native_handler.h', 'renderer/blob_native_handler.cc', 'renderer/blob_native_handler.h', 'renderer/console.cc', 'renderer/console.h', 'renderer/content_watcher.cc', 'renderer/content_watcher.h', 'renderer/context_menus_custom_bindings.cc', 'renderer/context_menus_custom_bindings.h', 'renderer/css_native_handler.cc', 'renderer/css_native_handler.h', 'renderer/default_dispatcher_delegate.cc', 'renderer/default_dispatcher_delegate.h', 'renderer/dispatcher.cc', 'renderer/dispatcher.h', 'renderer/dispatcher_delegate.h', 'renderer/document_custom_bindings.cc', 'renderer/document_custom_bindings.h', 'renderer/dom_activity_logger.cc', 'renderer/dom_activity_logger.h', 'renderer/event_bindings.cc', 'renderer/event_bindings.h', 'renderer/extension_helper.cc', 'renderer/extension_helper.h', 'renderer/extensions_renderer_client.cc', 'renderer/extensions_renderer_client.h', 'renderer/extension_groups.h', 'renderer/file_system_natives.cc', 'renderer/file_system_natives.h', 'renderer/i18n_custom_bindings.cc', 'renderer/i18n_custom_bindings.h', 'renderer/id_generator_custom_bindings.cc', 'renderer/id_generator_custom_bindings.h', 'renderer/lazy_background_page_native_handler.cc', 'renderer/lazy_background_page_native_handler.h', 'renderer/logging_native_handler.cc', 'renderer/logging_native_handler.h', 'renderer/messaging_bindings.cc', 'renderer/messaging_bindings.h', 'renderer/module_system.cc', 'renderer/module_system.h', 'renderer/native_handler.cc', 'renderer/native_handler.h', 'renderer/object_backed_native_handler.cc', 'renderer/object_backed_native_handler.h', 'renderer/print_native_handler.cc', 'renderer/print_native_handler.h', 'renderer/process_info_native_handler.cc', 'renderer/process_info_native_handler.h', 'renderer/programmatic_script_injector.cc', 'renderer/programmatic_script_injector.h', 'renderer/render_view_observer_natives.cc', 'renderer/render_view_observer_natives.h', 'renderer/request_sender.cc', 'renderer/request_sender.h', 'renderer/resource_bundle_source_map.cc', 'renderer/resource_bundle_source_map.h', 'renderer/resources/app_runtime_custom_bindings.js', 'renderer/resources/binding.js', 'renderer/resources/context_menus_custom_bindings.js', 'renderer/resources/entry_id_manager.js', 'renderer/resources/event.js', 'renderer/resources/extension_custom_bindings.js', 'renderer/resources/greasemonkey_api.js', 'renderer/resources/i18n_custom_bindings.js', 'renderer/resources/image_util.js', 'renderer/resources/json_schema.js', 'renderer/resources/last_error.js', 'renderer/resources/messaging.js', 'renderer/resources/messaging_utils.js', 'renderer/resources/permissions_custom_bindings.js', 'renderer/resources/platform_app.css', 'renderer/resources/platform_app.js', 'renderer/resources/runtime_custom_bindings.js', 'renderer/resources/schema_utils.js', 'renderer/resources/send_request.js', 'renderer/resources/set_icon.js', 'renderer/resources/storage_area.js', 'renderer/resources/test_custom_bindings.js', 'renderer/resources/uncaught_exception_handler.js', 'renderer/resources/unload_event.js', 'renderer/resources/utils.js', 'renderer/runtime_custom_bindings.cc', 'renderer/runtime_custom_bindings.h', 'renderer/safe_builtins.cc', 'renderer/safe_builtins.h', 'renderer/send_request_natives.cc', 'renderer/send_request_natives.h', 'renderer/set_icon_natives.cc', 'renderer/set_icon_natives.h', 'renderer/scoped_persistent.h', 'renderer/script_context.cc', 'renderer/script_context.h', 'renderer/script_context_set.cc', 'renderer/script_context_set.h', 'renderer/script_injection.cc', 'renderer/script_injection.h', 'renderer/script_injection_manager.cc', 'renderer/script_injection_manager.h', 'renderer/script_injector.h', 'renderer/scripts_run_info.cc', 'renderer/scripts_run_info.h', 'renderer/static_v8_external_ascii_string_resource.cc', 'renderer/static_v8_external_ascii_string_resource.h', 'renderer/test_features_native_handler.cc', 'renderer/test_features_native_handler.h', 'renderer/user_gestures_native_handler.cc', 'renderer/user_gestures_native_handler.h', 'renderer/user_script_injector.cc', 'renderer/user_script_injector.h', 'renderer/user_script_set.cc', 'renderer/user_script_set.h', 'renderer/utils_native_handler.cc', 'renderer/utils_native_handler.h', 'renderer/v8_context_native_handler.cc', 'renderer/v8_context_native_handler.h', 'renderer/v8_schema_registry.cc', 'renderer/v8_schema_registry.h'], 'msvs_disabled_warnings': [4267], 'conditions': [['OS == "android"', {'sources!': ['renderer/api_definitions_natives.cc', 'renderer/context_menus_custom_bindings.cc', 'renderer/render_view_observer_natives.cc', 'renderer/send_request_natives.cc']}]]}, {'target_name': 'extensions_test_support', 'type': 'static_library', 'dependencies': ['../base/base.gyp:base', '../testing/gtest.gyp:gtest', 'common/api/api.gyp:extensions_api', 'extensions_browser', 'extensions_common'], 'include_dirs': ['..', '<(SHARED_INTERMEDIATE_DIR)'], 'sources': ['browser/test_extensions_browser_client.cc', 'browser/test_extensions_browser_client.h', 'browser/test_management_policy.cc', 'browser/test_management_policy.h', 'browser/test_runtime_api_delegate.cc', 'browser/test_runtime_api_delegate.h', 'common/extension_builder.cc', 'common/extension_builder.h', 'common/test_util.cc', 'common/test_util.h', 'common/value_builder.cc', 'common/value_builder.h', 'renderer/test_extensions_renderer_client.cc', 'renderer/test_extensions_renderer_client.h'], 'msvs_disabled_warnings': [4267]}, {'target_name': 'extensions_unittests', 'type': 'executable', 'dependencies': ['../base/base.gyp:base', '../base/base.gyp:test_support_base', '../content/content_shell_and_tests.gyp:test_support_content', '../testing/gmock.gyp:gmock', '../testing/gtest.gyp:gtest', 'extensions_common', 'extensions_renderer', 'extensions_resources.gyp:extensions_resources', 'extensions_strings.gyp:extensions_strings', 'extensions_test_support'], 'sources': ['common/api/sockets/sockets_manifest_permission_unittest.cc', 'common/csp_validator_unittest.cc', 'common/event_filter_unittest.cc', 'common/id_util_unittest.cc', 'common/one_shot_event_unittest.cc', 'common/permissions/manifest_permission_set_unittest.cc', 'common/user_script_unittest.cc', 'renderer/event_unittest.cc', 'renderer/json_schema_unittest.cc', 'renderer/messaging_utils_unittest.cc', 'renderer/module_system_test.cc', 'renderer/module_system_test.h', 'renderer/module_system_unittest.cc', 'renderer/safe_builtins_unittest.cc', 'renderer/utils_unittest.cc', 'test/extensions_unittests_main.cc', 'test/test_extensions_client.cc', 'test/test_extensions_client.h', 'test/test_permission_message_provider.cc', 'test/test_permission_message_provider.h', 'test/test_permissions_provider.cc', 'test/test_permissions_provider.h'], 'conditions': [['OS=="win" and win_use_allocator_shim==1', {'dependencies': ['../base/allocator/allocator.gyp:allocator']}]], 'actions': [{'action_name': 'repack_components_pack', 'variables': {'pak_inputs': ['<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_renderer_resources.pak'], 'pak_output': '<(PRODUCT_DIR)/extensions_unittests_resources.pak'}, 'includes': ['../build/repack_action.gypi']}]}]} |
def write(query):
query_list = filter(None, query.decode("utf-8").split('\r\n'))
for q in query_list:
print(q)
return str()
| def write(query):
query_list = filter(None, query.decode('utf-8').split('\r\n'))
for q in query_list:
print(q)
return str() |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.