blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 2
616
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
69
| license_type
stringclasses 2
values | repo_name
stringlengths 5
118
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
63
| visit_date
timestamp[us] | revision_date
timestamp[us] | committer_date
timestamp[us] | github_id
int64 2.91k
686M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 23
values | gha_event_created_at
timestamp[us] | gha_created_at
timestamp[us] | gha_language
stringclasses 213
values | src_encoding
stringclasses 30
values | language
stringclasses 1
value | is_vendor
bool 2
classes | is_generated
bool 2
classes | length_bytes
int64 2
10.3M
| extension
stringclasses 246
values | content
stringlengths 2
10.3M
| authors
listlengths 1
1
| author_id
stringlengths 0
212
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
08596d2d132a3910d7f04e4123c37aff47d8b801
|
968bd3464bc968f6b4aedc35056d90d6c623c5a5
|
/forms.py
|
ee5f360e5c915f0549710ae40b709423aff8057e
|
[] |
no_license
|
SShanmukh-cell/online_school_quiz
|
d2d6c191d97e37de79dc646cbbe4204499a49ac3
|
f5d3c532e0938d800919c4d1c15a60e1a043b96f
|
refs/heads/main
| 2023-05-07T02:31:12.365507
| 2021-05-25T05:24:53
| 2021-05-25T05:24:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 337
|
py
|
from django import forms
# creating a form
class InputForm(forms.Form):
first_name = forms.CharField(max_length=200)
last_name = forms.CharField(max_length=200)
roll_number = forms.IntegerField(
help_text="Enter 6 digit roll number"
)
password = forms.CharField(widget=forms.PasswordInput())
|
[
"noreply@github.com"
] |
SShanmukh-cell.noreply@github.com
|
a73e7844df3db18de71d428658ea074b3c8d8671
|
08c0396f8c96632f3f3203931f526858d83c40b6
|
/KJW_Project1_DS620/data/marvel_massage.py
|
20c6e4145637b6bac07afb35203c9c1b131ae50f
|
[] |
no_license
|
WillieDavonSmalls/KJW_CUNY_DATA_620
|
00a2968934deebe0a47b6c3bc388446bb12e281c
|
1d01a5e198cccab31eb3dae82b283772ad2cbcec
|
refs/heads/master
| 2022-11-21T04:07:04.887616
| 2020-07-20T03:28:36
| 2020-07-20T03:28:36
| 271,411,922
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,264
|
py
|
import pandas as pd
from fuzzywuzzy import process
#%cd '/Users/williesmalls/Documents/School/CUNY\ SPS/01\ -\ Courses/00\ -\ Web\ Analytics/Data\ Play/project\ 1'
# import os
# os.chdir(path)
df_hero_network = pd.read_csv('hero-network.csv')
df_marvel_characters = pd.read_csv('marvel-wikia-data.csv')
lst_heroes = sorted(list(set(df_hero_network['hero1'].tolist() + df_hero_network['hero2'].tolist())))
lst_marvel_chars = list(df_marvel_characters['name'])
split = [
[0, 500],
[501, 1000],
[1001, 1500],
[1501, 2000],
[2001, 2500],
[2501, 3000],
[3000, 3500],
[3501, 4000],
[4001, 4500],
[4501, 5000],
[5001, 5500],
[5500, 6000],
[6000, 6426],
]
# split = [[0, 10], [11, 20], [21, 30]]
for i in split:
a = i[0]
b = i[1]
print('Begin: ' + str(a) + ' and ' + str(b))
list_heroes_names = []
for j in lst_heroes[a:b]:
heroe_lookup = []
heroe_lookup = [j, process.extractOne(j, lst_marvel_chars)]
list_heroes_names.append(heroe_lookup)
df_list_heroes_names = pd.DataFrame(list_heroes_names, columns=["heroe", "name"])
df_list_heroes_names.to_csv('marvel_heroe_list.csv', mode='a', header=False, index=True)
print('End: ' + str(a) + ' and ' + str(b))
|
[
"williesmalls@Willies-MacBook-Air.local"
] |
williesmalls@Willies-MacBook-Air.local
|
6ce6a4887f81223e6c1df30e7238cdcebef911a5
|
2ce992c3a82e3e67a15dd9685463ca38ba24875c
|
/pycco/__init__.py
|
864b6310d90cfe785a61b6031221fd35402e217d
|
[
"MIT"
] |
permissive
|
mhils/pycco
|
39cc65df946f60c04920710ba257514b9a4a65b5
|
14ece38506057f7c412aa11768112b6985e0cafb
|
refs/heads/master
| 2020-04-05T23:13:42.477736
| 2011-09-13T10:40:20
| 2011-09-13T10:40:20
| 2,307,198
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 18,146
|
py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# For python 2.5 compatibility.
from __future__ import with_statement
# "**Pycco**" is a Python port of [Docco](http://jashkenas.github.com/docco/ ):
# the original quick-and-dirty, hundred-line-long, literate-programming-style
# documentation generator. It produces HTML that displays your comments
# alongside your code. Comments are passed through
# [Markdown](http://daringfireball.net/projects/markdown/syntax) and
# [SmartyPants](http://daringfireball.net/projects/smartypants), while code is
# passed through [Pygments](http://pygments.org/) for syntax highlighting.
# This page is the result of running Pycco against its own source file.
#
# If you install Pycco, you can run it from the command-line:
#
# pycco src/*.py
#
# This will generate linked HTML documentation for the named source files,
# saving it into a `docs` folder by default.
#
# To install Pycco, simply
#
# pip install pycco
#
# Or, to install the latest source
#
# git clone git://github.com/fitzgen/pycco.git
# cd pycco
# python setup.py install
# === Main Documentation Generation Functions ===
# Generate the documentation for a source file by reading it in, splitting it up
# into comment/code sections, highlighting them for the appropriate language,
# and merging them into an HTML template.
def generate_documentation(source, outdir=None, preserve_paths=True):
if not outdir:
raise TypeError("Missing the required 'outdir' keyword argument.")
fh = open(source, "r")
sections = parse(source, fh.read())
highlight(source, sections, preserve_paths=preserve_paths, outdir=outdir)
return generate_html(source, sections, preserve_paths=preserve_paths,
outdir=outdir)
# Given a string of source code, parse out each comment and the code that
# follows it, and create an individual **section** for it.
# Sections take the form:
#
# { "docs_text": ...,
# "docs_html": ...,
# "code_text": ...,
# "code_html": ...,
# "num": ...
# }
#
def parse(source, code):
lines = code.split("\n")
sections = []
language = get_language(source)
has_code = docs_text = code_text = ""
if lines[0].startswith("#!"):
lines.pop(0)
if language["name"] == "python":
for linenum, line in enumerate(lines[:2]):
if re.search(r'coding[:=]\s*([-\w.]+)', lines[linenum]):
lines.pop(linenum)
break
def save(docs, code):
if docs or code:
sections.append({
"docs_text": docs,
"code_text": code
})
# Setup the variables to get ready to check for multiline comments
preformatted = multi_line = False
last_scope = -1
multi_line_delimiters = [language.get("multistart"),
language.get("multiend")]
for line in lines:
# Only go into multiline comments section when one of the delimiters is
# found to be at the start of a line
if all(multi_line_delimiters) and any(
[line.lstrip().startswith(delim) for delim in
multi_line_delimiters]):
if not multi_line:
multi_line = True
else:
multi_line = False
last_scope = -1
if(preformatted):
docs_text += "</pre>"
preformatted = False
# Get rid of the delimiters so that they aren't in the final docs
line = re.sub(re.escape(language["multistart"]), '', line)
line = re.sub(re.escape(language["multiend"]), '', line)
docs_text += line.strip() + '\n'
if has_code and docs_text.strip():
save(docs_text, code_text[:-1])
code_text = code_text.split('\n')[-1]
last_scope = -1
has_code = docs_text = ''
elif multi_line:
line_rstriped = line.rstrip()
current_scope = line_rstriped.count(" ") + line_rstriped.count("\t")
# This section will parse if the line is indented at least four
# places, and if so know to have the final text treat it as a
# preformatted text block.
if last_scope >= 0 and current_scope > last_scope:
if not preformatted:
preformatted = True
docs_text += "<pre>"
last_scope = current_scope
elif current_scope < last_scope and preformatted:
preformatted = False
last_scope = current_scope
docs_text += "</pre>"
# Keep a tracker var to see if the scope increases, that way later
# the code can decided if a section is indented more than 4 spaces
# from the leading code.
last_scope = current_scope if last_scope < 0 else last_scope
docs_text += " " * (current_scope - last_scope)
docs_text += line.strip() + '\n'
elif re.match(language["comment_matcher"], line) and not(line.lstrip().startswith("//! ")):
if has_code:
save(docs_text, code_text)
has_code = docs_text = code_text = ''
docs_text += re.sub(language["comment_matcher"], "", line) + "\n"
else:
if code_text and any([line.lstrip().startswith(x) for x in ['class ', 'def ', '@']]):
if not code_text.lstrip().startswith("@"):
save(docs_text, code_text)
code_text = has_code = docs_text = ''
has_code = True
code_text += line + '\n'
save(docs_text, code_text)
return sections
# === Preprocessing the comments ===
# Add cross-references before having the text processed by markdown. It's
# possible to reference another file, like this : `[[main.py]]` which renders
# [[main.py]]. You can also reference a specific section of another file, like
# this: `[[main.py#highlighting-the-source-code]]` which renders as
# [[main.py#highlighting-the-source-code]]. Sections have to be manually
# declared; they are written on a single line, and surrounded by equals signs:
# `=== like this ===`
def preprocess(comment, section_nr, preserve_paths=True, outdir=None):
if not outdir:
raise TypeError("Missing the required 'outdir' keyword argument.")
def sanitize_section_name(name):
return "-".join(name.lower().strip().split(" "))
def replace_crossref(match):
# Check if the match contains an anchor
if '#' in match.group(1):
name, anchor = match.group(1).split('#')
return " [%s](%s#%s)" \
% (name,
os.path.basename(destination(name,
preserve_paths=preserve_paths,
outdir=outdir)),
anchor)
else:
return " [%s](%s)" \
% (match.group(1),
os.path.basename(destination(match.group(1),
preserve_paths=preserve_paths,
outdir=outdir)))
def replace_section_name(match):
return '%(lvl)s <span id="%(id)s" href="%(id)s">%(name)s</span>' % {
"lvl": re.sub('=', '#', match.group(1)),
"id": sanitize_section_name(match.group(2)),
"name": match.group(2)
}
comment = re.sub('^([=]+)([^=]+)[=]*\\n', replace_section_name, comment)
comment = re.sub('[^`]\[\[(.+)\]\]', replace_crossref, comment)
return comment
# === Highlighting the source code ===
# Highlights a single chunk of code using the **Pygments** module, and runs the
# text of its corresponding comment through **Markdown**.
#
# We process the entire file in a single call to Pygments by inserting little
# marker comments between each section and then splitting the result string
# wherever our markers occur.
def highlight(source, sections, preserve_paths=True, outdir=None):
if not outdir:
raise TypeError("Missing the required 'outdir' keyword argument.")
language = get_language(source)
output = pygments.highlight(language["divider_text"].join(section["code_text"].rstrip() for section in sections),
language["lexer"],
formatters.get_formatter_by_name("html"))
output = output.replace(highlight_start, "").replace(highlight_end, "")
fragments = re.split(language["divider_html"], output)
for i, section in enumerate(sections):
section["code_html"] = highlight_start + shift(fragments, "") + highlight_end
try:
docs_text = unicode(section["docs_text"])
except UnicodeError:
docs_text = unicode(section["docs_text"].decode('utf-8'))
section["docs_html"] = markdown(
preprocess(docs_text,
i,
preserve_paths=preserve_paths,
outdir=outdir))
section["num"] = i
# === HTML Code generation ===
# Once all of the code is finished highlighting, we can generate the HTML file
# and write out the documentation. Pass the completed sections into the template
# found in `resources/pycco.html`.
#
# Pystache will attempt to recursively render context variables, so we must
# replace any occurences of `{{`, which is valid in some languages, with a
# "unique enough" identifier before rendering, and then post-process the
# rendered template and change the identifier back to `{{`.
def generate_html(source, sections, preserve_paths=True, outdir=None):
if not outdir:
raise TypeError("Missing the required 'outdir' keyword argument")
title = os.path.basename(source)
dest = destination(source, preserve_paths=preserve_paths, outdir=outdir)
for sect in sections:
sect["code_html"] = re.sub(r"\{\{", r"__DOUBLE_OPEN_STACHE__",
sect["code_html"])
rendered = pycco_template({
"title": title,
"stylesheet": relpath(os.path.join(os.path.dirname(dest), "pycco.css"),
os.path.split(dest)[0]),
"sections": sections,
"source": source,
"path": os.path,
"destination": destination
})
return re.sub(r"__DOUBLE_OPEN_STACHE__", "{{", rendered).encode("utf-8")
# === Helpers & Setup ===
# Import system dependencies.
import sys
import os.path
import optparse
import re
# Import external dependencies.
import pygments
import pystache
import cssmin
from markdown import markdown
from pygments import lexers, formatters
try:
from os.path import relpath
except ImportError:
# relpath: Python 2.5 doesn't have it.
def relpath(path, start=os.path.curdir):
"""Return a relative version of a path"""
from os.path import abspath, sep, pardir
def commonprefix(m):
"Given a list of pathnames, returns the longest common leading component"
if not m: return ''
s1 = min(m)
s2 = max(m)
for i, c in enumerate(s1):
if c != s2[i]:
return s1[:i]
return s1
if not path:
raise ValueError("no path specified")
start_list = [x for x in abspath(start).split(sep) if x]
path_list = [x for x in abspath(path).split(sep) if x]
# Work out how much of the filepath is shared by start and path.
i = len(commonprefix([start_list, path_list]))
rel_list = [pardir] * (len(start_list)-i) + path_list[i:]
if not rel_list:
return os.path.curdir
return os.path.join(*rel_list)
# A list of the languages that Pycco supports, mapping the file extension to
# the name of the Pygments lexer and the symbol that indicates a comment. To
# add another language to Pycco's repertoire, add it here.
languages = {
".coffee": {"name": "coffee-script", "symbol": "#"},
".pl": {"name": "perl", "symbol": "#"},
".sql": {"name": "sql", "symbol": "--"},
".c": {"name": "c", "symbol": "//",
"multistart": "/*", "multiend": "*/"},
".cpp": {"name": "cpp", "symbol": "//",
"multistart": "/*", "multiend": "*/"},
".js": {"name": "javascript", "symbol": "//",
"multistart": "/*", "multiend": "*/"},
".html": {"name": "html", "symbol": "//",
"multistart": "/*", "multiend": "*/"},
".rb": {"name": "ruby", "symbol": "#",
"multistart": "=begin", "multiend": "=end"},
".py": {"name": "python", "symbol": "#",
"multistart": '"""', "multiend": '"""'},
".scm": {"name": "scheme", "symbol": ";;",
"multistart": "#|", "multiend": "|#"},
".lua": {"name": "lua", "symbol": "--",
"multistart": "--[[", "mutliend": "--]]"},
".erl": {"name": "erlang", "symbol": "%%"},
}
# Build out the appropriate matchers and delimiters for each language.
for ext, l in languages.items():
# Does the line begin with a comment?
l["comment_matcher"] = re.compile(r"^\s*" + l["symbol"] + "\s?")
# The dividing token we feed into Pygments, to delimit the boundaries between
# sections.
l["divider_text"] = "\n" + l["symbol"] + "DIVIDER\n"
# The mirror of `divider_text` that we expect Pygments to return. We can split
# on this to recover the original sections.
l["divider_html"] = \
re.compile(r'\n*<span class="c[1]?">' + l["symbol"] + 'DIVIDER</span>\n*')
# Get the Pygments Lexer for this language.
l["lexer"] = lexers.get_lexer_by_name(l["name"])
# Get the current language we're documenting, based on the extension.
def get_language(source):
try:
return languages[source[source.rindex("."):]]
except ValueError:
source = open(source, "r")
code = source.read()
source.close()
lang = lexers.guess_lexer(code).name.lower()
for l in languages.values():
if l["name"] == lang:
return l
else:
raise ValueError("Can't figure out the language!")
# Compute the destination HTML path for an input source file path. If the source
# is `lib/example.py`, the HTML will be at `docs/example.html`
def destination(filepath, preserve_paths=True, outdir=None):
if not outdir:
raise TypeError("Missing the required 'outdir' keyword argument.")
name = filepath
if not preserve_paths:
name = os.path.basename(name)
return os.path.join(outdir, "%s.html" % name)
# Shift items off the front of the `list` until it is empty, then return
# `default`.
def shift(list, default):
try:
return list.pop(0)
except IndexError:
return default
# Ensure that the destination directory exists.
def ensure_directory(directory):
if not os.path.isdir(directory):
os.mkdir(directory)
def template(template_name, template_dir):
source = open(os.path.join(template_dir, template_name), 'rb').read()
return lambda context: pystache.render(source, context)
# The directory path of this module.
DIR_PATH = os.path.abspath(os.path.normpath(os.path.dirname(__file__)))
# Create the template that we will use to generate the Pycco HTML page.
pycco_template = template('template.html', DIR_PATH)
# The start of each Pygments highlight block.
highlight_start = "<div class=\"highlight\"><pre>"
# The end of each Pygments highlight block.
highlight_end = "</pre></div>"
# For each source file passed in as an argument, generate the documentation.
def process(sources, preserve_paths=True, outdir=None):
if not outdir:
raise TypeError("Missing the required 'outdir' keyword argument.")
sources.sort()
if sources:
ensure_directory(outdir)
# Copy the CSS resource file to the documentation directory.
output_css_filepath = os.path.join(outdir, "pycco.css")
input_css_filepath = os.path.join(DIR_PATH, "pycco.css")
minified_css = cssmin.cssmin(open(input_css_filepath).read())
with open(output_css_filepath, 'wb') as f:
f.write(minified_css)
def next_file():
s = sources.pop(0)
dest = destination(s, preserve_paths=preserve_paths, outdir=outdir)
try:
os.makedirs(os.path.split(dest)[0])
except OSError:
pass
with open(destination(s,
preserve_paths=preserve_paths,
outdir=outdir), "w") as f:
f.write(generate_documentation(s, outdir=outdir))
print "pycco = %s -> %s" % (s, dest)
if sources:
next_file()
next_file()
__all__ = ("process", "generate_documentation")
# Entry point for the console script generated by setuptools.
def main():
parser = optparse.OptionParser()
parser.add_option('-p', '--paths', action='store_true',
help='Preserve path structure of original files')
parser.add_option('-d', '--directory', action='store', type='string',
dest='outdir', default='docs',
help='Directory where documentation is output.')
opts, sources = parser.parse_args()
process(sources, outdir=opts.outdir, preserve_paths=opts.paths)
# Run the script.
if __name__ == "__main__":
main()
|
[
"git@maximilianhils.com"
] |
git@maximilianhils.com
|
4bcc7480277a4ea734b672ef2d573d7b2b5c830b
|
82a438bc77f47e5b2d293e7abfc0304fd501c22a
|
/test/test_schedule.py
|
2556264b6b2201d06a121b6b591326fe0a1eea9c
|
[] |
no_license
|
jnpr-xbhuang/python
|
e0b56d9880bfdc7366b8745ae44a66a24bce398b
|
b4140835c2a658d257f7f312c6e1c52ccdd18450
|
refs/heads/master
| 2021-01-13T09:27:16.334472
| 2016-10-20T09:25:51
| 2016-10-20T09:25:51
| 72,103,442
| 0
| 1
| null | 2016-10-27T11:54:11
| 2016-10-27T11:54:11
| null |
UTF-8
|
Python
| false
| false
| 598
|
py
|
#!/usr/bin/env python
# encoding: utf-8
"""
@author: zhanghe
@software: PyCharm
@file: test_schedule.py
@time: 2016/10/20 下午5:17
"""
import schedule
import time
def job():
print("I'm working...")
def run():
schedule.every(10).minutes.do(job)
schedule.every().hour.do(job)
schedule.every().day.at("10:30").do(job)
schedule.every().monday.do(job)
schedule.every().wednesday.at("13:15").do(job)
while True:
schedule.run_pending()
time.sleep(1)
if __name__ == '__main__':
run()
"""
$ pip install schedule
python 版本的定时调度
"""
|
[
"zhang_he06@163.com"
] |
zhang_he06@163.com
|
0987c5e1b0d45ac52d51229d2bfe98b785f9d918
|
3522a0f9ae04b6bd325e36a07c0b2828ab49dfb4
|
/bot.py
|
7c0999e082fe9e93f4267089d2570d9b39bb9056
|
[] |
no_license
|
davide-brunetto94/hate-speech-detection-bot-twitter
|
ee4de1512000c51b69223e104160fe1042e39cad
|
f502597621e8369a09d4126aa10626c66fed1e4d
|
refs/heads/main
| 2023-01-09T12:25:32.341061
| 2020-11-10T09:54:49
| 2020-11-10T09:54:49
| 311,595,920
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 4,200
|
py
|
#!/usr/bin/env python
import tweets as tw
import pp as preprocessing
import logging
import classification as cl
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
# Enable logging
logging.basicConfig(
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level=logging.INFO
)
logger = logging.getLogger(__name__)
# Define a few command handlers. These usually take the two arguments update and
# context. Error handlers also receive the raised TelegramError object in error.
def start(update, context):
"""Send a message when the command /start is issued."""
update.message.reply_text(
"Hi, this is a bot that can detect if a Twitter user's feed"
+ ' or a certain topic contains hate speech. To start send "@" followed by a twitter username'
+ 'or "#" followed by a topic!'
)
def help(update, context):
"""Send a message when the command /help is issued."""
update.message.reply_text(
"This is a bot that can detect if a Twitter user's feed"
+ "or a certain topic contains hate speech!"
)
def echo(update, context):
"""Echo the user message."""
update.message.reply_text(update.message.text)
def user_hate_speech(update, context):
username = update.message.text
update.message.reply_text(f"Checking if {username} is using hate speech...")
tweets = tw.get_tweets_by_user(username.replace("@", ""))
if not tweets:
update.message.reply_text("I haven't found any tweet for that user, try again")
else:
hate_speech_present = cl.predict_hate_speech_tweets(tweets)
if hate_speech_present:
update.message.reply_text("I think the user is using hate speech")
else:
update.message.reply_text("I don't think the user is using hate speech")
def topic_hate_speech(update, context):
topic = update.message.text
update.message.reply_text(f"Checking if {topic} contains hate speech...")
tweets = tw.get_tweets_by_keyword(topic.replace("#", ""))
if not tweets:
update.message.reply_text("I haven't found any tweet for that topic, try again")
else:
hate_speech_present = cl.predict_hate_speech_tweets(tweets)
if hate_speech_present:
update.message.reply_text("I think that topic contains hate speech")
else:
update.message.reply_text(
"I don't think that the topic contains hate speech"
)
def incorrect_message(update, context):
update.message.reply_text(
"The message you typed is incorrect "
+ 'To try again, send "@" followed by a twitter username'
+ 'or "#" followed by a topic!'
)
def error(update, context):
"""Log Errors caused by Updates."""
logger.warning('Update "%s" caused error "%s"', update, context.error)
def main():
"""Start the bot."""
# Create the Updater and pass it your bot's token.
# Make sure to set use_context=True to use the new context based callbacks
# Post version 12 this will no longer be necessary
updater = Updater("TELETOKEN", use_context=True)
# Get the dispatcher to register handlers
dp = updater.dispatcher
# on different commands - answer in Telegram
dp.add_handler(CommandHandler("start", start))
dp.add_handler(CommandHandler("help", help))
# on noncommand i.e message - echo the message on Telegram
# dp.add_handler(MessageHandler(Filters.text, echo))
dp.add_handler(MessageHandler(Filters.regex(r"^[@][\w]+"), user_hate_speech))
dp.add_handler(MessageHandler(Filters.regex(r"^[#][\w]+"), topic_hate_speech))
dp.add_handler(MessageHandler(Filters.text, incorrect_message))
# log all errors
dp.add_error_handler(error)
# Start the Bot
updater.start_polling()
# Run the bot until you press Ctrl-C or the process receives SIGINT,
# SIGTERM or SIGABRT. This should be used most of the time, since
# start_polling() is non-blocking and will stop the bot gracefully.
updater.idle()
if __name__ == "__main__":
main()
|
[
"noreply@github.com"
] |
davide-brunetto94.noreply@github.com
|
313d6e5a7be8e3431b1c790fccc5dcfeb0e5ddf3
|
578a23c6850e0a03cf9329878ea10c7e5e2941c2
|
/core/config/__init__.py
|
fa20c48f37c9053422148cd259ed52f3b59ba9a1
|
[] |
no_license
|
pydtools/FastAPI-MySQL-Tortoise-Casbin
|
3fb585bea1056d79ef926d813b28305b43344bff
|
ebd96bf29c2196f459718e9a9c340fd03a2ffeeb
|
refs/heads/main
| 2023-05-30T09:43:58.791122
| 2021-06-15T09:15:45
| 2021-06-15T09:15:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 348
|
py
|
import os
# 获取环境变量
env = os.getenv("ENV", "")
if env:
# 如果有虚拟环境 则是 生产环境
print("----------生产环境启动------------")
from .production_config import settings
else:
# 没有则是开发环境
print("----------开发环境启动------------")
from .development_config import settings
|
[
"beixia1989@163.com"
] |
beixia1989@163.com
|
a7e983776b2d152f2c05fbc65323d25b8410d1be
|
9bcdd4ce802462230b7a966bfe046fe413e7139c
|
/JSON_Schema_Analysis.py
|
6ddf3158e5bb836d5cf26e7c44d08191bb58a410
|
[] |
no_license
|
jiaoxlong/schemastore-analysis
|
6b66bdb8c0efff49f4d35ca50ba49b5a0e11e036
|
297c672f8b8ed7ab5beb39b400238819d2fc9d74
|
refs/heads/master
| 2023-03-17T00:48:21.144565
| 2019-11-16T09:28:13
| 2019-11-16T09:28:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 11,779
|
py
|
#! /usr/bin/python
"""! @package JSON_Schema_Analysis
@brief This is the main file of the JSON Schema Analysis Project.
By calling this file and specifying its command line arguments the analysis process is started
Usage:
JSON_Schema_Analysis.py [-v | --verbose] [(-a | --all) | ((-c | --count) <val>)
Args:
- -v | --verbose output of analysis results to console
- -a | --all analyse all schemas located in directory ./JSON
- -c | --count <val> analyse only first <val> files in directory ./JSON
"""
import sys, getopt
sys.path.append("./Visitors")
sys.path.append("./NodeTypes")
import os
absFilePath = os.path.abspath(__file__)
os.chdir(os.path.dirname(absFilePath))
from Analytic_Process import Analytic_Process
import threading as th
import multiprocessing as mp
import csv, json
import pandas as pd
import validity_constants as validity
from array import *
from schema_graph import schema_graph
def main(argv):
"""! @brief This is the main entry function of JSON_Schema_Analysis.
The main function parses the command line arguments and starts the analyses as specified by them.
The JSON Schema documents are analysed in parallel with n threads, where n represents the number
of virtual CPU cores found by os.cpu_count().
This method sets up all lists and dictionaries needed by an Analytic_Thread to perform the analysis
of the JSON Schema documents and to store the results.
After all files were analysed completely, the results are output as different csv files and as a
Excel sheet.
The resulting Excel sheet will look as follows:
Filename | Category | add_prop_count | all_of_count | any_of_count | array_count | ref_count | str_count | enum_count | mult_of_count | not_count | number_count | pattern_count | required_count | unique_items_count | value_restriction_count | boolean_count | nulltype_count | object_count | depth_schema | depth_resolvedTree | fan_in | fan_out | has_recursion | no_path_or_cycle | width | reachability
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
File1 | example category | val | val | val | val | val | val | val | val | val | val | val | val | val | val | val | val | val | val | val | val | val | val | val | val | val
"""
verbose_output = False
file_count = 0
thread_timeout_secs = 720.0
# parse command line arguments
try:
opts, args = getopt.getopt(argv, "hvac:",["verbose","all","count="])
except getopt.GetoptError:
print('JSON_Schema_Analysis.py [-v | --verbose] [(-a | --all) | ((-c | --count) <val>)')
sys.exit(2)
for opt, arg in opts:
if opt == '-h':
print('JSON_Schema_Analysis.py [-v | --verbose] [(-a | --all) | ((-c | --count) <val>)')
sys.exit()
elif opt in ('-v', '--verbose'):
verbose_output = True
elif opt in ('-a', '--all'):
file_count = 0
elif opt in ('-c', '--count'):
file_count = int(arg)
# set up the environment as specified in the loaded files
## directory with JSON Schema documents
json_dir_path = "./JSON"
## csv that stores nicknames of files and there actual filename
file_spec_path = "./filename_spec.csv"
## csv that stores nicknames of files and there category
cat_spec_path = "./categorisation.csv"
## path to logfile
schema_graph_log_path = "./schema_graph.log"
## multiprocessing manager
manager = mp.Manager()
## matching nicknames to filenames
filename_dict = manager.dict()
## matching nicknames to categories
cat_dict = manager.dict()
## matching filenames to categories
filename_cat_dict = manager.dict()
## result dictionary
cat_list_dict = manager.dict()
## dict of all valid and processed files
filename_res_dict = manager.dict()
open(schema_graph_log_path, 'w+').close() #clean logfile
with open(file_spec_path, 'r', newline='') as csvfile:
csv_reader = csv.DictReader(csvfile)
for row in csv_reader:
filename_dict[row["name"]] = row["filename"]
with open(cat_spec_path, 'r', newline='') as csvfile:
csv_reader = csv.DictReader(csvfile)
for row in csv_reader:
cat_dict[row["name"]] = row["category"]
for name, filename in filename_dict.items():
filename_cat_dict[filename] = cat_dict[name]
help_cat_set = set(cat for cat in cat_dict.values()) #unique categories
for cat in help_cat_set:
cat_list_dict[cat] = manager.list()
filename_res_dict[cat] = manager.list()
# create list of JSON Schema documents to be analysed
unmanaged_pathes = list()
pathes = manager.list()
for file in os.listdir(json_dir_path):
unmanaged_pathes.append(json_dir_path + "/" + file)
if not file_count is 0:
if len(unmanaged_pathes) > file_count:
unmanaged_pathes = unmanaged_pathes[:file_count]
for path in unmanaged_pathes:
pathes.append(path)
# determine how many threads to use
thread_count = os.cpu_count()
# create list to store threads
thread_list = []
# create all semaphores for different operations of Analytic_Threads
print_lock = mp.Lock()
list_lock = mp.Lock()
res_lock = mp.Lock()
print("Analysis of files started!")
pathes_available = True
#creating and starting of threads
#threads now handle multiple files by them self
if verbose_output:
for i in range(0, thread_count):
thread_list.append(Analytic_Process(True, pathes, cat_list_dict, filename_res_dict, filename_cat_dict,\
print_lock, list_lock, res_lock))
else:
for i in range(0, thread_count):
thread_list.append(Analytic_Process(False, pathes, cat_list_dict, filename_res_dict, filename_cat_dict,\
print_lock, list_lock, res_lock))
for i in range(0, thread_count):
thread_list[i].start()
#wait for thread without timeout
for i in range(0, thread_count):
thread_list[i].join()
unmanaged_cat_list_dict = dict()
for key in cat_list_dict:
unmanaged_cat_list_dict[key] = list()
#create output by storing analysis results to csv and xlsx
createKeywordCountTable(cat_list_dict)
saveAllInformation(cat_list_dict, filename_res_dict)
createFanInCSV(cat_list_dict)
createFanOutCSV(cat_list_dict)
print("Finished analysis!")
def createKeywordCountTable(cat_list_dict):
"""! @brief Output a CSV file with categories and each counted value.
The ouput csv file specifies summed keyword count per category
@param cat_list_dict dictionary with all analysis results
"""
# this list specifies all relevant attributes for this csv file
attribute_name_list = ["add_prop_count", "all_of_count", "any_of_count", \
"array_count", "ref_count", "str_count", "enum_count", "mult_of_count", \
"not_count", "number_count", "pattern_count", "required_count", "unique_items_count", \
"value_restriction_count", "boolean_count", "nulltype_count", "object_count"]
# sum up the keyword counts for all relevant attributes per category
attr_count = 0
cat_count = 0
table = [[0 for x in range(len(cat_list_dict.keys()))] for y in range(len(attribute_name_list))]
for attr in attribute_name_list:
cat_count = 0
for cat in cat_list_dict:
cat_att_sum = 0
for att_dict in cat_list_dict[cat]:
cat_att_sum += att_dict[attr]
table[attr_count][cat_count] = cat_att_sum
cat_count += 1
attr_count += 1
# write the csv file to ../../KeywordCount.csv
with open("./KeywordCount.csv", 'w+') as csvfile:
csvwriter = csv.writer(csvfile, delimiter=",")
csvwriter.writerow(["Attribute"] + list(cat_list_dict.keys()))
attr_count = 0
for row in table:
csvwriter.writerow([attribute_name_list[attr_count]] + row)
attr_count += 1
def saveAllInformation(cat_list_dict, filenamedict):
"""! @brief This function saves all analysed information in a csv-File and a Excel sheet.
This function creates a csv file where all analysis results of all Schema documents are stored.
It also creates an equivalent Excel sheet with the same information
@param cat_list_dict a dictionary with all analysis results
@param filenemlist a list with the names of all valid and analysed JSON Schema documents
"""
keyword_list = list()
#exclude fan_in and fan_out lists from this csv
for key in cat_list_dict["data"][0].keys():
if (key == "fan_in_list") or (key == "fan_out_list") or (key == "filename"):
continue
else:
keyword_list.append(key)
# create csv-file at ../../AnalysisResults.csv
data = []
filenames = []
with open("./AnalysisResults.csv", 'w+') as csvfile:
csvwriter = csv.writer(csvfile, delimiter=',')
# Header with all attribute names. These are extracted from example category conf and the
# first element in the category's dictionary list
csvwriter.writerow(["Category"] + keyword_list)
for cat in cat_list_dict:
#filenames.extend(filenamedict[cat])
for attr_dict in cat_list_dict[cat]:
csv_row = [cat]
filenames.append(attr_dict["filename"])
for attr in keyword_list:
csv_row.append(attr_dict[attr])
data.append(csv_row)
csvwriter.writerow(csv_row)
# create equivalent Excel Sheet at ../../AnalysisResults.xlsx
col_list = keyword_list;
col_list.insert(0, "Category")
df = pd.DataFrame(data, filenames, col_list)
df.to_excel("./AnalysisResults.xlsx")
def createFanInCSV(cat_list_dict):
"""! @brief This function creates a csv file with all fan-ins of all elements in all files.
The output csv file is used to generate plots of all fan-ins contained in a file.
@param cat_list_dict a dictionary containing all analysis results
"""
with open("./FanInList.csv", 'w+') as csvfile:
csvwriter = csv.writer(csvfile, delimiter=',')
for cat in cat_list_dict:
for attr_dict in cat_list_dict[cat]:
csvwriter.writerow([cat] + attr_dict["fan_in_list"])
def createFanOutCSV(cat_list_dict):
"""! @brief This function creates a csv file with all fan-outs of all elements in all files.
The output csv file is used to generate plots of all fan-outs contained in a file.
@param cat_list_dict a dictionary containing all analysis results
"""
with open("./FanOutList.csv", 'w+') as csvfile:
csvwriter = csv.writer(csvfile, delimiter=',')
for cat in cat_list_dict:
for attr_dict in cat_list_dict[cat]:
csvwriter.writerow([cat] + attr_dict["fan_out_list"])
# entry point
if __name__ == "__main__":
main(sys.argv[1:])
|
[
"riedle.benjamin@gmail.com"
] |
riedle.benjamin@gmail.com
|
4cbeff608168f50999b88289e0c6e3e6ae1551fd
|
5ef3ac5ab3cd2a03767f409f243633993e18000b
|
/standard_day1/play_code2.py
|
cbcd7c4fe02693fbb1ba97d3124945b2cc4d7a85
|
[] |
no_license
|
Teddy512/project
|
4c00114c7a8613af145c3fcfbe70a909106ceb88
|
3898439cdf8abe1e090f9eebbd35fcc9f90aaf96
|
refs/heads/master
| 2022-12-21T01:12:53.853700
| 2018-03-06T03:31:42
| 2018-03-06T03:31:42
| 124,015,246
| 0
| 1
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 644
|
py
|
# authon :teddy
names=input ("please input you name")
age=int (input("age"))
job=input("you job")
salary=input("you salary")
info ='''-----info of %s------
name:%s
age:%s
job:%s
salary:%s
'''%(names,names,age,job,salary)
info2='''-----info of {_name}-------
name:{_name}
age:{_age}
job:{_job}
salary{_salary}
'''.format(_name=names,_age=age,_job=job,_salary=salary)
info3='''----=info of {0}------
name:{0}
age:{1}
job:{2}
salary:{3}
'''.format(names,names,age,job,salary)
print (info)
print ("1111")
print (info2)
print ("555")
print (info3)
|
[
"m13655699934@163.com"
] |
m13655699934@163.com
|
ed0d08acff7cdb566160e636f759999e536ab4f6
|
ca7aa979e7059467e158830b76673f5b77a0f5a3
|
/Python_codes/p03037/s274754900.py
|
6902135688b72b2db1d327d37916c624bd8af23c
|
[] |
no_license
|
Aasthaengg/IBMdataset
|
7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901
|
f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8
|
refs/heads/main
| 2023-04-22T10:22:44.763102
| 2021-05-13T17:27:22
| 2021-05-13T17:27:22
| 367,112,348
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 273
|
py
|
n, m = map(int, input().split())
max_l = 0
min_r = 10**5
for i in range(m):
l, r = map(int, input().split())
if l > max_l:
max_l = l
if r < min_r:
min_r = r
max_l = min(n+1, max_l)
min_r = min(n+1, min_r)
res = min_r - max_l + 1
if res<0:
res = 0
print(res)
|
[
"66529651+Aastha2104@users.noreply.github.com"
] |
66529651+Aastha2104@users.noreply.github.com
|
2ffd05a2ab646749d3b65ccb1fedf4b70903a1cf
|
419231d8bf3e94f07c11625b9f54f12522153d95
|
/server/models/models/order_id.py
|
91f80ec4ed361c56532e931c0fcdc62d97cb67e4
|
[] |
no_license
|
06wagon/LightningFuturesExchange
|
f062268a343aeaab6415515f0ae5cd046fb8f5bf
|
337915c9fc024a2da66975d2d6302a25b31d7a68
|
refs/heads/master
| 2020-03-28T12:04:54.500939
| 2018-04-30T03:46:19
| 2018-04-30T03:46:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 181
|
py
|
from shared.shared import db
class OrderId(db.Model):
equity_id = db.Column(db.Integer, primary_key=True, nullable=False)
order_id = db.Column(db.Integer, nullable=False)
|
[
"ryansfishman@gmail.com"
] |
ryansfishman@gmail.com
|
3bccbd76ac39f774b2cbd6e293322c711716dac4
|
cca46b6703c111465967f12515d75c8235874909
|
/replace/replace.py
|
a75f32b6195fc57ef33ccff31f2605d58d57c1b1
|
[] |
no_license
|
Youngjin-KimY/DS_code_python
|
6e084ab6f98b7a25603a4f170e24aa7fd98ac78b
|
aa3481cb6481de4c884c6f2e2195b36ffea4c5e1
|
refs/heads/master
| 2020-04-09T11:29:47.498356
| 2018-12-04T06:44:54
| 2018-12-04T06:44:54
| 160,311,950
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 211
|
py
|
import sys
f = open("testfile","r")
start = sys.argv[1]
to = sys.argv[2]
lines = f.readlines()
f.close()
w = open("testfile","w")
for line in lines:
line = line.replace(start,to)
w.write(line)
w.close()
|
[
"11kimyj@gmail.com"
] |
11kimyj@gmail.com
|
44fc2e1570fe5a0bdd8c5b8fcdb30c27f1d45eee
|
281bd2c08ff444bab4bdf561939f942d20115ba8
|
/_beatspot/settings.py
|
bac37488ff956b9e158daa788d4876c8b8c8e7e2
|
[] |
no_license
|
AM0k84/Social-website-sketch
|
443b77c0c27c48ad0dd402333fd440d3419d5aad
|
35a409b496293759304804a65095d4668d45f1f2
|
refs/heads/master
| 2023-01-02T10:49:43.467801
| 2020-10-20T17:22:37
| 2020-10-20T17:22:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 3,637
|
py
|
"""
Django settings for _beatspot project.
Generated by 'django-admin startproject' using Django 3.1.1.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
import os
from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'q_x6u$6ueexu_4b0rp9e5ne1#=7hbi6u+n-(+cv0d3jqk^xqwb'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'user',
'news',
'music',
'web',
'video',
'embed_video',
'hitcount',
'crispy_forms',
# 'audiofield',
'tinymce',
]
MIDDLEWARE = [
# 'audiofield.middleware.threadlocals.ThreadLocals',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = '_beatspot.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = '_beatspot.wsgi.application'
# Database
# https://docs.djangoproject.com/en/3.1/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
# Password validation
# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/3.1/topics/i18n/
LANGUAGE_CODE = 'en-US'
TIME_ZONE = 'Europe/Warsaw'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.1/howto/static-files/
STATIC_URL = '/static/'
STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static'),)
MEDIA_URL = '/mediafiles/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'mediafiles')
AUTH_USER_MODEL = 'user.Profile'
#USTAWIENIA ZLICZANIA WYŚWIETLEŃ.
#ZALICZA 1 WYŚWIETLENIE NA 1 SEKUNDĘ
HITCOUNT_KEEP_HIT_ACTIVE = {'seconds': 1}
CRISPY_TEMPLATE_PACK = 'bootstrap4'
|
[
"l.chalinski@gmail.com"
] |
l.chalinski@gmail.com
|
dbfe92ca3ae9dcd36f2a40281697bca8e8b4db77
|
b6e09f9a39a219dd5375c66e7497e4971059b03e
|
/tools/media.py
|
ba9b0dc3ffe1ed47981a767e951acda1dd4f7042
|
[] |
no_license
|
moon0walker/musicbox
|
627c3c5089de5f9707bb1afe9a35f528839f402e
|
768c15523fe0bc3460e9353fb44256ae2908b298
|
refs/heads/master
| 2021-01-12T16:16:18.730798
| 2016-10-26T06:10:34
| 2016-10-26T06:10:34
| 71,970,493
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 6,117
|
py
|
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import GdkPixbuf
from os import listdir
from os.path import exists, isfile, isdir
from collections import OrderedDict
import json, time
pixbuf_folder = GdkPixbuf.Pixbuf.new_from_file_at_scale('/home/user/musicbox/data/folder.png', 24, 16, False)
pixbuf_music = GdkPixbuf.Pixbuf.new_from_file_at_scale('/home/user/musicbox/data/music.png', 24, 24, False)
pixbuf_karaoke = GdkPixbuf.Pixbuf.new_from_file_at_scale('/home/user/musicbox/data/karaoke.png', 24, 24, False)
pixbuf_ordered = GdkPixbuf.Pixbuf.new_from_file_at_scale('/home/user/musicbox/data/order_mark.png', 24, 16, False)
__g_audio_ext__ = ['.mp3', '.wav', 'midi', '.mid']
__g_video_ext__ = ['.avi', '.mp4', '.flv', '.3gp', '.mkv']
def is_karafun(full_path):
if exists(full_path) and isfile(full_path) and len(full_path) > 4 and full_path[-4:] == '.mp3':
karafun_path = full_path[:-4] + '.cdg'
if exists(karafun_path) and isfile(karafun_path):
return True
return False
def name_central_making(name):
chrs = 17
name_central = name
if len(name) > chrs*2:
name_central = '%s\n%s\n%s' % (name[:chrs], name[chrs:chrs*2], name[chrs*2:])
elif len(name) > chrs and len(name) <= chrs*2:
name_central = '%s\n%s\n' % (name[:chrs], name[chrs:])
else:
name_central = '\n%s\n' % name
return name_central
def list_store_making(name_raw, idx_raw, pixes):
name = name_raw.upper()
if len(name) > 4 and name[-4:].lower() in __g_audio_ext__+__g_video_ext__:
name = name[:-4]
name_central = name_central_making(name)
idx = '%03d' % idx_raw
list_store = [idx, pixes[0], name, pixes[1], 'tahoma 10']
list_store_central = [idx, pixes[0], name_central, pixes[1], 'tahoma 10']
return (list_store, list_store_central)
def update_file_statistic(artist_dir, song_name, is_karaoke):
ordered_path = '/home/user/musicbox/data/stat_ordered.json'
if exists(artist_dir) and isdir(artist_dir):
artist = artist_dir[artist_dir.rfind('/')+1:]
song = song_name[:song_name.rfind('.')]
tm = '%04d.%02d' % (time.gmtime().tm_year, time.gmtime().tm_mon)
ordered = {}
if exists(ordered_path):
fd = open(ordered_path, 'r')
try: ordered = json.loads(fd.read())
except: pass
fd.close()
ordered_tm = ordered.get(tm, [])
if ordered_tm:
is_exists = False
for item in ordered_tm:
if item[0].lower() == artist.lower() and item[1].lower() == song.lower():
is_exists = True
item[2] = is_karaoke
item[3] += 1
break
if not is_exists:
ordered_tm.append( [artist, song, is_karaoke, 1] )
else:
ordered_tm.append( [artist, song, is_karaoke, 1] )
ordered[tm] = ordered_tm
# print(ordered)
open(ordered_path, 'w').write(json.dumps(ordered))
class Track(object):
def __init__(self, name, idx, is_karaoke=False):
self.name = name
self.idx = idx
self.is_karaoke = is_karaoke
self.is_ordered = False
self.list_store = []
self.list_store_central = []
def list_store_making(self):
pixes = [pixbuf_music, None]
if self.is_karaoke == True: pixes[0] = pixbuf_karaoke
if self.is_ordered == True: pixes[1] = pixbuf_ordered
self.list_store, self.list_store_central = list_store_making(self.name, self.idx, pixes)
class Media(object):
def __init__(self, full_path, idx):
self.full_path = full_path
self.name = full_path.split('/')[-1]
self.tracks = OrderedDict()
self.count = 0
self.idx = idx
self.imgframe = None
self.is_karaoke = False
self.list_store = []
self.list_store_central = []
def list_store_making(self):
pixes = [pixbuf_folder, None]
if self.is_karaoke:
pixes[1] = pixbuf_karaoke
self.list_store, self.list_store_central = list_store_making(self.name, self.idx, pixes)
class MediaLibrary(object):
def __init__(self):
self.media_path = '/home/user/Music'
self.library = OrderedDict()
self.count = 0
self.ls()
def ls(self):
self.ls_media()
for idx in self.library:
m = self.library.get(idx, None)
if not m:
self.library[idx] = None
self.count = 0
library_new = OrderedDict()
for idx in self.library:
m = self.library.get(idx, None)
if m:
self.count += 1
m.idx = self.count
library_new[self.count] = m
self.library = library_new
for idx in self.library:
m = self.library.get(idx, None)
self.ls_track(m)
def ls_media(self):
try:
if not exists(self.media_path): return
for name in sorted(listdir(self.media_path)):
try:
full_path = '%s/%s' % (self.media_path, name)
if isdir(full_path):
self.count += 1
self.library[self.count] = Media(full_path, self.count)
except:
pass
except:
pass
def ls_track(self, media):
try:
if not media: return
for name in sorted(listdir(media.full_path)):
try:
full_path = '%s/%s' % (media.full_path, name)
is_karaoke = False
if isfile(full_path):
if full_path[-4:].lower() in __g_video_ext__:
media.is_karaoke = is_karaoke = True
elif is_karafun(full_path):
media.is_karaoke = is_karaoke = True
if full_path[-4:].lower() in __g_audio_ext__ or is_karaoke:
media.count += 1
t = Track(name, media.count, is_karaoke)
t.list_store_making()
media.tracks[media.count] = t
except:
pass
try:
imgframe_path = '%s/img.jpeg' % media.full_path
if not exists(imgframe_path): imgframe_path = '/home/user/musicbox/data/artist_default.png'
media.imgframe = GdkPixbuf.Pixbuf.new_from_file_at_scale(imgframe_path, 170, 150, False)
media.list_store_making()
except:
pass
except:
pass
def set_media_path(self, media_path):
if exists(media_path) and isdir(media_path):
self.media_path = media_path
def add_media(self, media_path):
if exists(media_path) and isdir(media_path):
self.count += 1
m = Media(media_path, self.count)
self.ls_track(m)
self.library[self.count] = m
def remove_media_path(self, media_path):
idx = 0
if exists(media_path) and isdir(media_path):
for i in self.library:
if l.library[i].full_path == media_path:
idx = i
break
if idx:
del l.library[idx]
self.__init__()
|
[
"user@debian"
] |
user@debian
|
cd7d028a7110451c68ca81f852b71f61576154a6
|
c6e8e849acd1e775d586cba97bace388886307d4
|
/service/InMoovTorso.py
|
c5308656291c464c2233a3c21be74067692934e2
|
[
"Apache-2.0"
] |
permissive
|
Greaver77/pyrobotlab
|
1137a6dbf56cc3d3e27ecb37715fde1998db7c14
|
f0b45f6cdb26be07d1009f9f1972f34644612b29
|
refs/heads/master
| 2021-08-08T14:25:07.770462
| 2017-11-10T14:18:18
| 2017-11-10T14:18:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 76
|
py
|
# start the service
inmoovtorso = Runtime.start("inmoovtorso","InMoovTorso")
|
[
"supertick@gmail.com"
] |
supertick@gmail.com
|
1cab4477f0fd43df04e799ced1716973ea57502a
|
eb5c52cdaa43efd54dbb66c8617b99c98504c327
|
/youtube_platform/views/plain.py
|
24b861bb53aa444432338a0df7da5586cc178d4b
|
[] |
no_license
|
slushkovsky/youtube
|
517c88c10ea76a8c23b14b55c68187d0b3a63aca
|
32e347ac4ed9628bca96686e4c133f57b1bf9ea7
|
refs/heads/master
| 2021-03-27T10:15:59.144955
| 2017-05-22T08:03:50
| 2017-05-22T08:03:50
| 87,112,082
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 984
|
py
|
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from ..models import Plain
from .menu import create_context_from_request
from .modules import ServicePermission
@login_required
def handle_plains(request):
context = create_context_from_request(request)
context['disable_page_bg'] = True
if 'plain' in request.GET:
plain = request.GET['plain']
# After purchasing we can add new permission
plain = Plain.objects.get(id=int(plain))
print(plain.get_permission())
request.user.profile.add_perm(plain.get_permission())
context['result']['status'] = True
context['result']['details'] = plain.title
context['plains'] = [
dict(
p.dict(),
disabled=request.user.profile.has_perm(p.get_permission())
)
for p in Plain.objects.filter(hidden=False).all()
]
return render(
request, 'plain.html', context
)
|
[
"s.lushkovsky@gmail.com"
] |
s.lushkovsky@gmail.com
|
c5c16ec3635e6f5238dc6dc3f6deac1894c165d5
|
9d2f0e8b1fe94901c7eac55b7f5454e9049a5295
|
/2python_work/RANGE _TRYING.py
|
adf35d7f54f33be65c903bb6dc5e23eec6ea4bd8
|
[] |
no_license
|
muxum/python-learning
|
cff38a979a0671b36c654ba751ff124df9f16126
|
bf30552bc9d0df191d1cded6c0397a6d43da9c61
|
refs/heads/master
| 2020-06-26T03:42:06.890691
| 2019-08-06T10:33:51
| 2019-08-06T10:33:51
| 199,517,167
| 1
| 0
| null | null | null | null |
MacCentralEurope
|
Python
| false
| false
| 392
|
py
|
for value in range(1,5):
print(value)###print 1, 2, 3,4 no "5",because RIGHT value is not included
##range()isgooood
numbers=list(range(1,6))
print(numbers)
k =[]
a =0;
b =11;
for i in range(a,b):###just like for(i=a;i<b;i++) in C;
k.append(i**2)
print(k)
print("\n\n\n")
print([value**2 for value in range(1,11)])# called :list analysis£®translated from Chinese°££©
|
[
"noreply@github.com"
] |
muxum.noreply@github.com
|
4e4f1240996a91861928dae34c2a25ba533b08fa
|
e3a95ba3206a4d15a17d194ac9a8672a2eaef2e1
|
/srcOld/filter.py
|
73d944c89a8936f1d4a9eaa270c721d3f12618cc
|
[] |
no_license
|
quant42/Champuru2
|
4903a07f01a54401bae0de86dcf1b2d76c074b28
|
9789122f57fe39c7e81738cb66394024c48536fa
|
refs/heads/master
| 2020-05-21T19:55:22.217595
| 2016-11-13T09:51:13
| 2016-11-13T09:51:13
| 61,372,060
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 2,288
|
py
|
#! /usr/bin/env python
# -*- coding: UTF-8 -*-
from __future__ import division, print_function
import numpy as np
__doc__ = """
Simply library for signal processing filters.
"""
def _getGaussianWeights(sigma):
"""
Get the needed weights for the gaussian filter.
@param sigma The sigma value for the gaussian
filter to get the weights for.
@return The needed weights for the gaussian
filter.
"""
weights = np.arange(0, 10*sigma+2, dtype=float) # after 10*sigma the weight is principally 0
weights = (1 / (np.sqrt(2 * np.pi) * sigma)) * (np.e ** (-(weights ** 2 / (2 * sigma ** 2))))
return weights
def gf(data, sigma):
"""
Apply a gaussian filter to a signal.
@param data The signal to apply the filter on.
@param sigma The sigma value of the gaussian filter.
@return The filtered signal.
"""
newData, weights, i = [], _getGaussianWeights(sigma), 0
weightLen = min(len(weights), len(data))
for pos, val in enumerate(data):
summe = val * weights[0]
for dist in range(1, weightLen):
wd, pN, pP = weights[dist], pos - dist, pos + dist
dpN = data[pN] if 0 <= pN < weightLen else 0
dpP = data[pP] if 0 <= pP < weightLen else 0
summe += dpN * wd
summe += dpP * wd
newData.append(int(round(summe)))
return newData
def applyGaussianFilter(chrom):
"""
Apply a gaussian filter on the chromatogram data.
@param chrom The chromatogram to process.
@return The processed chromatogram data.
"""
# for all keys in the chromatogram
for key in "ACTG":
# get an estimation for the needed sigma value
# Therefore use the end of the chromatogram where
# the chromatogram normally isn't reliable anymore
# in order to estimate the measurement fluctuation
# error/noise of the sequencing machine ...
# TODO: check if this can really be done everythime
# e.g. expect that the user hasn't already cut of
# the tail ...
sigma = np.std(chrom[key][-100:], ddof=1)
# apply filter for this trace
chrom[key] = gf(chrom[key], sigma)
# return the new chromatogram
return chrom
|
[
"yann_spoeri@web.de"
] |
yann_spoeri@web.de
|
f8b50a4da62a19b52deb5ca48874165a469de09c
|
5a9dcf4b8df692e05db6032b4aafd43ce77f3ee7
|
/client/client.py
|
cdc15691545f1013b16c453bf9d944f22804fd72
|
[] |
no_license
|
mtaylor719/pindrop
|
d528e4155889a9e001d87c968868840d4c52a6d0
|
712956853f821930fdb0141b91a7f41568644639
|
refs/heads/master
| 2021-01-10T06:51:47.232664
| 2016-01-26T02:16:34
| 2016-01-26T02:16:34
| 50,396,044
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 987
|
py
|
#!/usr/bin/python
import requests
try:
import json
except ImportError:
import simplejson as json
class client:
def __init__(self, endpoint, port):
self.endpoint = 'http://{}:{}'.format(endpoint, port)
"""
Used to get all results
"""
def all_result(self):
return self._request('GET', '/results')
"""
Used to get area codes
"""
def area_code(self, area_code):
return self._request('GET', '/results/{}/'.format(area_code))
#Should add some authentication here
def _request(self, method, uri, data = {}):
full_url = '{}{}'.format(self.endpoint, uri)
if method == 'POST':
response = requests.request(method, full_url, verify=False, data=data)
else:
response = requests.request(method, full_url, verify=False, params=data)
response.raise_for_status()
content = json.loads(response.content)
return content
|
[
"michael.taylor719@gmail.com"
] |
michael.taylor719@gmail.com
|
01950d6e2de6ac5b6b6a87bf948cbad9cb0c9458
|
120e7d566341180f776cf99d4969063a919e8ef1
|
/bai_03.py
|
f1d53dad4b4dffa8714386bacb5acab7ba8d6631
|
[] |
no_license
|
Toan73/PythonCore
|
098f699819bef409f89e04ac081f38f9897a9e4b
|
7e3ad9ce503df0ec175edbe90e9dd983d71e9243
|
refs/heads/main
| 2023-05-31T16:16:19.991938
| 2021-07-03T06:09:19
| 2021-07-03T06:09:19
| 364,540,305
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 113
|
py
|
n = input("n = ")
s = max(n)
print(f"Ky tu lon nhat la: {s}")
s = min(n)
print(f"Ky tu nho nhat la: {s}")
|
[
"noreply@github.com"
] |
Toan73.noreply@github.com
|
13db545cc31fbda5f286e1866bc83a40d3fe8279
|
81d27ece7360d219fe241114c7a51db99ff1371a
|
/game/controller/consolecontroller.py
|
8905c7a51e83a0994e381a83bd21f07d64101a7e
|
[] |
no_license
|
alexandr-gnrk/reversi
|
b5f5aea8c06c7dc76122075a13fd970dcc47a848
|
9d7d69274564a58c062a8cb10be7610f6097baf7
|
refs/heads/main
| 2023-01-03T03:51:58.424222
| 2020-10-27T03:55:54
| 2020-10-27T03:55:54
| 300,346,784
| 5
| 1
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 2,549
|
py
|
from ..model.game import Game
from ..model.antigame import AntiGame
from .player.consoleplayer import HumanPlayer, AIPlayer
from .gamemode import GameMode
import random
import time
class ConsoleController():
def __init__(self, black_hole=None, experimental=False):
# set Anti-Reversi mode if black hole was passed
if black_hole:
self.gamemodel = AntiGame(black_hole)
else:
self.gamemodel = Game()
self.experimental = experimental
def create_players(self, gamemode):
# create players depends on game mode
if gamemode == GameMode.PLAYER_VS_PLAYER:
player1 = HumanPlayer('Player1')
player2 = HumanPlayer('Player2')
elif gamemode == GameMode.PLAYER_VS_BOT:
player1 = HumanPlayer('Player1')
player2 = AIPlayer('Player2')
else:
player1 = AIPlayer('Player1')
player2 = AIPlayer('Player2')
return player1, player2
def request_gamemode(self):
print('Game mods:')
print(' 0 - Player vs Player')
print(' 1 - Player vs Bot')
if self.experimental:
print(' 2 - Bot vs Bot')
# prompt for input gamemode
mode = int(input('Enter game mode: '))
if mode == 0:
return GameMode.PLAYER_VS_PLAYER
elif mode == 1:
return GameMode.PLAYER_VS_BOT
else:
# by default return Bot vs Bot mode
return GameMode.BOT_VS_BOT
def start(self):
# get parametrs from conslon and create game model
gamemode = self.request_gamemode()
players = self.create_players(gamemode)
self.gamemodel.start(*players)
# game loop
while True:
# show prompt for input
print('Command: ', end='', flush=True)
# get input and extract command and args
command = self.gamemodel.current_player.get_command()
# make action that depends on command
if command == 'move':
print('Enter pos: ', end='', flush=True)
move = self.gamemodel.current_player.get_move(self.gamemodel)
self.gamemodel.move(*move)
elif command == 'restart':
gamemode = self.request_gamemode()
players = self.create_players(gamemode)
self.gamemodel.start(*players)
elif command == 'exit':
return
else:
print('Try again!')
|
[
"alexandr.gnrk@gmail.com"
] |
alexandr.gnrk@gmail.com
|
58eead567e75645d41c6b6d3ae1812abc6e17d02
|
b6aa706c66f306fe8938a981eca3299bb773a917
|
/ScrapyCourse/ScrapyBooks/books_crawler/spiders/books.py
|
81b546e5ea98cdca68815ddd9803115d263abc2b
|
[] |
no_license
|
starl1stener/ParsingStaff
|
4515d4e09106cf5cde9bcead44ca9fb206f980fc
|
e31898399ad760e427150b721e818a50ae23222a
|
refs/heads/master
| 2022-12-09T12:49:07.984492
| 2019-10-23T18:54:29
| 2019-10-23T18:54:29
| 151,253,949
| 0
| 1
| null | 2021-12-13T19:50:03
| 2018-10-02T12:52:46
|
Python
|
UTF-8
|
Python
| false
| false
| 403
|
py
|
# -*- coding: utf-8 -*-
from scrapy.spiders import CrawlSpider, Rule
from scrapy.linkextractors import LinkExtractor
class BooksSpider(CrawlSpider):
name = 'books'
allowed_domains = ['books.toscrape.com']
start_urls = ['http://books.toscrape.com/']
rules = (Rule(LinkExtractor(allow=('music')), callback='parse_page', follow = True),)
def parse_page(self, response):
pass
|
[
"nantog@gmail.com"
] |
nantog@gmail.com
|
554c67db9adf6ed2a5fe9d7043b826cf528ed3b0
|
7fc8ca926a0b3069896b065cc33cb89d4c46af02
|
/读书笔记/pythonCookBookSourceCode/chapter1_DS/priorityqueue.py
|
7e8368d91f633bd264b3a4d6be3f4a51d59f59a5
|
[] |
no_license
|
guobin8205/LearningMD
|
c7798ea6bb27bf9ad7d548ee8d1e818d739e674c
|
df9d0dd6b53a91e936345491c2235d976382e0e4
|
refs/heads/master
| 2023-04-08T15:52:02.626066
| 2021-04-24T04:09:54
| 2021-04-24T04:09:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 869
|
py
|
# -*-coding: utf-8 -*-
"""
利用heapq实现优先级队列
"""
import heapq
class PriorityQueue:
def __init__(self):
self._queue = []
self._index = 0
def push(self, item, priority):
heapq.heappush(self._queue, (-priority, self._index, item))# 优先级为负数的目的是使得元素按照优先级从高到低排序。index 变量的作用是保证同等优先级元素的正确排序。
self._index += 1
def pop(self):
return heapq.heappop(self._queue)[-1]
class Item:
def __init__(self, name):
self.name = name
def __repr__(self):
return 'Item({!r})'.format(self.name)
q = PriorityQueue()
q.push(Item('foo'), 1)
q.push(Item('bar'), 5)
q.push(Item('spam'), 4)
q.push(Item('grok'), 1)
print(q.pop())
print(q.pop())
print(q.pop())
print(q.pop())
|
[
"434329188@qq.com"
] |
434329188@qq.com
|
1baeda83554cd5797e384d58f9229151c8706eee
|
e9850af29ed29f13af837cd011f32c314a6f8520
|
/pyhcup/pd.py
|
10578994ee17238c3a3087f736aaf6bf9da78266
|
[
"MIT"
] |
permissive
|
bbodek/pyhcup
|
8b81367972f02aab85105aef713f50bb013523e8
|
8609fd5a5d7d7f02665fc5b3ec5550eceb928f8b
|
refs/heads/master
| 2023-01-24T20:57:41.408070
| 2020-12-06T17:52:59
| 2020-12-06T17:52:59
| 318,869,695
| 0
| 0
| null | 2020-12-05T19:16:21
| 2020-12-05T19:16:20
| null |
UTF-8
|
Python
| false
| false
| 658
|
py
|
"""Helper functions for dealing with pandas and numpy"""
import math
import numpy as np
def cast_np_to_py(x):
"""Casts values to native Python types, mainly so they can be passed on as bind params for SQL"""
int_types = [int, np.int, np.int64, np.int32, np.int16]
float_types = [float, np.float, np.float64, np.float16, np.float32]
str_types = [str]
if type(x) in float_types:
if math.isnan(x) or np.isnan(x):
return None
else:
return float(x)
elif type(x) in int_types:
return int(x)
elif type(x) in str_types:
return str(x)
else:
return x
|
[
"tbiel@med.umich.edu"
] |
tbiel@med.umich.edu
|
931d2002619985e2bfc116fef9479dc1eaffb073
|
242086b8c6a39cbc7af3bd7f2fd9b78a66567024
|
/python/PP4E-Examples-1.4/Examples/PP4E/Gui/TextEditor/simpleshell.py
|
924883a098406c9a233cf0443888b2a1e2d7edb4
|
[] |
no_license
|
chuzui/algorithm
|
7537d0aa051ac4cbe9f6a7ca9a3037204803a650
|
c3006b24c4896c1242d3ceab43ace995c94f10c8
|
refs/heads/master
| 2021-01-10T13:05:30.902020
| 2015-09-27T14:39:02
| 2015-09-27T14:39:02
| 8,404,397
| 4
| 4
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 293
|
py
|
# read and run Python statement strings: like PyEdit's run code menu option
namespace = {}
while True:
try:
line = input('>>> ') # single-line statements only
except EOFError:
break
else:
exec(line, namespace) # or eval() and print result
|
[
"zui"
] |
zui
|
a2baa1540c6619ad75c2619e945c124d20dae234
|
998a41d15c4a2c3b8620d6f81b523821810bf08a
|
/AP/training/admin.py
|
2d61442c30f810ba523b86cdfb0664d030c2382c
|
[] |
no_license
|
Naveenhiremath/AP
|
7977644d61bffd1ec93e239755d33065d0362fb8
|
ab127ed4dc919d4275c212fc4a9b0679460e7aa6
|
refs/heads/master
| 2020-04-16T05:31:23.157660
| 2019-01-11T21:18:37
| 2019-01-11T21:18:37
| 165,309,382
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 192
|
py
|
from django.contrib import admin
from .models import Event
# Register your models here.
admin.site.register(Event)
# admin.site.register(Employee)
# admin.site.register(ProfessionalBehaviour)
|
[
"AL2328@accionlabs.in"
] |
AL2328@accionlabs.in
|
b646f76ca9bbf5a6d2afd13f6cce716e6b1b84ac
|
c787dc2722b3ae6e4331e7a10bb84f9c4a17afc7
|
/DocumentWithReviewFirstN/models/model.py
|
01c48c2a60e107b4f5fceefefc27c852aa233651
|
[] |
no_license
|
halecakir/description-to-permission-fidelity
|
65e01039eead1a617dc40f4b07392efbe75c2703
|
bc02aac9fe73d64d5cb2d47163f297dc54473a03
|
refs/heads/master
| 2022-04-04T18:53:57.030327
| 2020-02-11T15:12:33
| 2020-02-11T15:12:33
| 161,750,206
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 13,629
|
py
|
import sys
import os
import csv
import random
import pickle
import scipy
import pandas as pd
import numpy as np
import torch
import torch.nn as nn
import torch.nn.init as init
from torch import optim
from utils.io_utils import IOUtils
from utils.nlp_utils import NLPUtils
from sklearn.metrics import roc_auc_score, average_precision_score
from sklearn.model_selection import KFold
seed = 10
random.seed(seed)
torch.manual_seed(seed)
torch.cuda.manual_seed_all(seed)
np.random.seed(seed)
class Data:
def __init__(self):
self.w2i = None
self.entries = None
self.train_entries = None
self.test_entries = None
self.ext_embedding = None
self.reviews = None
self.predicted_reviews = None
def to(self, device):
if self.entries:
for document in self.entries:
for i in range(len(document.index_tensors)):
document.index_tensors[i] = document.index_tensors[i].to(
device=device
)
if self.reviews:
for doc_id in self.reviews:
for review in self.reviews[doc_id]:
review.index_tensor = review.index_tensor.to(device=device)
if self.predicted_reviews:
for doc_id in self.predicted_reviews:
for review in self.predicted_reviews[doc_id]:
review.index_tensor = review.index_tensor.to(device=device)
def load(self, infile):
with open(infile, "rb") as target:
self.ext_embeddings, self.entries, self.w2i = pickle.load(target)
def save_data(self, infile):
with open(infile, "rb") as target:
self.ext_embeddings, self.entries, self.w2i = pickle.dump(target)
def load_predicted_reviews(self, infile):
with open(infile, "rb") as target:
self.predicted_reviews = pickle.load(target)
for app_id in self.predicted_reviews.keys():
self.predicted_reviews[app_id].sort(
key=lambda x: x.prediction_result.item(), reverse=True
)
def load_reviews(self, infile):
with open(infile, "rb") as target:
self.reviews = pickle.load(target)
class Encoder(nn.Module):
def __init__(self, opt, w2i):
super(Encoder, self).__init__()
self.opt = opt
self.w2i = w2i
self.lstm = nn.LSTM(
self.opt.hidden_size, self.opt.hidden_size, batch_first=True
)
if opt.dropout > 0:
self.dropout = nn.Dropout(opt.dropout)
self.embedding = nn.Embedding(len(self.w2i), self.opt.hidden_size)
self.__initParameters()
def __initParameters(self):
for name, param in self.named_parameters():
if "bias" not in name and param.requires_grad:
init.xavier_uniform_(param)
def initalizedPretrainedEmbeddings(self, embeddings):
weights_matrix = np.zeros(((len(self.w2i), self.opt.hidden_size)))
for word in self.w2i:
weights_matrix[self.w2i[word]] = embeddings[word]
self.embedding.weight = nn.Parameter(torch.FloatTensor(weights_matrix))
def forward(self, input_src):
src_emb = self.embedding(input_src) # batch_size x src_length x emb_size
if self.opt.dropout > 0:
src_emb = self.dropout(src_emb)
outputs, (h, c) = self.lstm(src_emb)
return outputs, (h, c)
class Classifier(nn.Module):
def __init__(self, opt):
super(Classifier, self).__init__()
self.opt = opt
self.hidden_size = opt.hidden_size
self.linear = nn.Linear(2 * self.hidden_size, opt.output_size)
if opt.dropout > 0:
self.dropout = nn.Dropout(opt.dropout)
self.sigmoid = nn.Sigmoid()
self.__initParameters()
def __initParameters(self):
for name, param in self.named_parameters():
if "bias" not in name and param.requires_grad:
init.xavier_uniform_(param)
def forward(self, prev_h):
if self.opt.dropout > 0:
prev_h = self.dropout(prev_h)
h2y = self.linear(prev_h)
pred = self.sigmoid(h2y)
return pred
class Model:
def __init__(self):
self.opt = None
self.encoders = {}
self.review_encoder = None
self.classifier = None
self.optimizer = None
self.criterion = None
def create(self, opt, data):
self.opt = opt
self.encoders["sentenceL1"] = Encoder(self.opt, data.w2i).to(
device=self.opt.device
)
self.encoders["sentenceL2"] = nn.LSTMCell(opt.hidden_size, opt.hidden_size).to(
device=self.opt.device
)
self.encoders["reviewL1"] = Encoder(self.opt, data.w2i).to(
device=self.opt.device
)
self.encoders["reviewL2"] = nn.LSTMCell(opt.hidden_size, opt.hidden_size).to(
device=self.opt.device
)
params = []
for encoder in self.encoders:
params += list(self.encoders[encoder].parameters())
self.classifier = Classifier(self.opt).to(device=self.opt.device)
params += list(self.classifier.parameters())
self.optimizer = optim.RMSprop(params)
self.criterion = nn.BCELoss()
def train(self):
for encoder in self.encoders:
self.encoders[encoder].train()
self.classifier.train()
def eval(self):
for encoder in self.encoders:
self.encoders[encoder].eval()
self.classifier.eval()
def step(self):
self.optimizer.step()
def zero_grad(self):
self.optimizer.zero_grad()
def rate_decay(self):
for param_group in self.optimizer.param_groups:
param_group["lr"] = param_group["lr"] * self.opt.learning_rate_decay
def grad_clip(self):
for encoder in self.encoders:
torch.nn.utils.clip_grad_value_(
self.encoders[encoder].parameters(), self.opt.grad_clip
)
self.encoders[encoder].train()
torch.nn.utils.clip_grad_value_(
self.classifier.parameters(), self.opt.grad_clip
)
def save(self, filename):
checkpoint = {}
checkpoint["opt"] = self.opt
for encoder in self.encoders:
checkpoint[encoder] = self.encoders[encoder].state_dict()
checkpoint["classifier"] = self.classifier.state_dict()
checkpoint["optimizer"] = self.optimizer.state_dict()
torch.save(checkpoint, filename)
def load(self, filename, data):
checkpoint = torch.load(filename)
opt = checkpoint["opt"]
self.create(opt, data)
for encoder in self.encoders:
self.encoders[encoder].load_state_dict(checkpoint[encoder])
self.classifier.load_state_dict(checkpoint["classifier"])
self.optimizer.load_state_dict(checkpoint["optimizer"])
def write_file(filename, string):
with open(filename, "a") as target:
target.write("{}\n".format(string))
target.flush()
def train_item(args, model, document, reviews):
model.zero_grad()
hidden_s_lst = []
for sentence_index_tensor in document.index_tensors:
if sentence_index_tensor.shape[1] > 0:
outputs_s, (hidden_s, cell_s) = model.encoders["sentenceL1"](
sentence_index_tensor
)
hidden_s_lst.append(hidden_s)
hidden_sl2, cell_sl2 = None, None
for hidden_s in hidden_s_lst:
hidden_sl2, cell_sl2 = model.encoders["sentenceL2"](hidden_s.view(1, -1))
hidden_r_lst = []
for review in reviews:
if review.index_tensor.shape[1] > 0:
outputs_r, (hidden_r, cell_r) = model.encoders["reviewL1"](
review.index_tensor
)
hidden_r_lst.append(hidden_r)
hidden_rl2, cell_rl2 = None, None
for hidden_r in hidden_r_lst:
hidden_rl2, cell_rl2 = model.encoders["reviewL2"](hidden_r.view(1, -1))
hidden = torch.cat((hidden_sl2.view(1, 1, -1), hidden_rl2.view(1, 1, -1)), 2)
pred = model.classifier(hidden)
loss = model.criterion(
pred,
torch.tensor(
[[[document.permissions[args.permission_type]]]], dtype=torch.float
).to(device=args.device),
)
loss.backward()
if model.opt.grad_clip != -1:
model.grad_clip()
model.step()
return loss
def test_item(model, document, reviews):
hidden_s_lst = []
for sentence_index_tensor in document.index_tensors:
if sentence_index_tensor.shape[1] > 0:
outputs_s, (hidden_s, cell_s) = model.encoders["sentenceL1"](
sentence_index_tensor
)
hidden_s_lst.append(hidden_s)
hidden_sl2, cell_sl2 = None, None
for hidden_s in hidden_s_lst:
hidden_sl2, cell_sl2 = model.encoders["sentenceL2"](hidden_s.view(1, -1))
hidden_r_lst = []
for review in reviews:
if review.index_tensor.shape[1] > 0:
outputs_r, (hidden_r, cell_r) = model.encoders["reviewL1"](
review.index_tensor
)
hidden_r_lst.append(hidden_r)
hidden_rl2, cell_rl2 = None, None
for hidden_r in hidden_r_lst:
hidden_rl2, cell_rl2 = model.encoders["reviewL2"](hidden_r.view(1, -1))
hidden = torch.cat((hidden_sl2.view(1, 1, -1), hidden_rl2.view(1, 1, -1)), 2)
pred = model.classifier(hidden)
return pred
def train_all(args, model, data):
write_file(args.outdir, "Training...")
model.train()
losses = []
for index, document in enumerate(data.train_entries):
if document.app_id in data.predicted_reviews:
loss = train_item(
args,
model,
document,
data.predicted_reviews[document.app_id][: args.useful_reviews],
)
if index != 0:
if index % model.opt.print_every == 0:
write_file(
args.outdir,
"Index {} Loss {}".format(
index, np.mean(losses[index - model.opt.print_every :])
),
)
losses.append(loss.item())
def test_all(args, model, data):
def pr_roc_auc(predictions, gold):
y_true = np.array(gold)
y_scores = np.array(predictions)
roc_auc = roc_auc_score(y_true, y_scores)
pr_auc = average_precision_score(y_true, y_scores)
return roc_auc, pr_auc
write_file(args.outdir, "Predicting..")
predictions, gold = [], []
model.eval()
with torch.no_grad():
for index, document in enumerate(data.test_entries):
if document.app_id in data.predicted_reviews:
pred = test_item(
model,
document,
data.predicted_reviews[document.app_id][: args.useful_reviews],
)
predictions.append(pred.cpu())
gold.append(document.permissions[args.permission_type])
return pr_roc_auc(predictions, gold)
def kfold_validation(args, data):
data.entries = np.array(data.entries)
random.shuffle(data.entries)
kfold = KFold(n_splits=10, shuffle=True, random_state=seed)
roc_l, pr_l = [], []
for foldid, (train, test) in enumerate(kfold.split(data.entries)):
write_file(args.outdir, "Fold {}".format(foldid + 1))
model = Model()
model.create(args, data)
data.train_entries = data.entries[train]
data.test_entries = data.entries[test]
train_all(args, model, data)
roc_auc, pr_auc = test_all(args, model, data)
write_file(args.outdir, "ROC {} PR {}".format(roc_auc, pr_auc))
roc_l.append(roc_auc)
pr_l.append(pr_auc)
write_file(
args.outdir, "Summary : ROC {} PR {}".format(np.mean(roc_l), np.mean(pr_l))
)
def train_n_epoch(args, data, epoch):
data.entries = np.array(data.entries)
random.shuffle(data.entries)
data.test_entries = data.entries[: int(len(data.entries) / 10)]
data.train_entries = data.entries[int(len(data.entries) / 10) :]
write_file(
args.outdir,
"Number of Train {} and Test {}".format(
len(data.train_entries), len(data.test_entries)
),
)
tagged_train, tagged_test = 0, 0
tagged_train = sum(
[entry.permissions[args.permission_type] for entry in data.train_entries]
)
tagged_test = sum(
[entry.permissions[args.permission_type] for entry in data.test_entries]
)
write_file(
args.outdir, "Train tagged {}, Test tagged {}".format(tagged_train, tagged_test)
)
model = Model()
model.create(args, data)
max_roc, max_pr = 0, 0
roc_l, pr_l = [], []
for n in range(epoch):
write_file(args.outdir, "Epoch {}".format(n + 1))
train_all(args, model, data)
roc_auc, pr_auc = test_all(args, model, data)
if pr_auc > max_pr:
max_pr = pr_auc
max_roc = roc_auc
if args.learning_rate_decay < 1:
if epoch >= args.learning_rate_decay_after:
model.rate_decay()
write_file(args.outdir, "ROC {} PR {}".format(roc_auc, pr_auc))
roc_l.append(roc_auc)
pr_l.append(pr_auc)
write_file(args.outdir, "Summary : ROC {} PR {}".format(max_roc, max_pr))
def run(args):
data = Data()
data.load(args.saved_data)
data.load_predicted_reviews(args.saved_predicted_reviews)
data.to(args.device)
train_n_epoch(args, data, epoch=30)
|
[
"huseyinalecakir@gmail.com"
] |
huseyinalecakir@gmail.com
|
182c9a970bbc935993654adb7ebb6a5294d97a4d
|
d03b5399786cdb898ac347c65ed9021a3c497740
|
/7_FM-原始数据转化为libsvm格式/输出/libsvm6.py
|
3463b509324437408819fa8760a915f3d929f980
|
[] |
no_license
|
CynthiaWang2018/Scoial-Network-Mining
|
775fa4fda55e38d8ceecda98ff9eb3bff5605313
|
29d54c0ddddb6075817a6991479f83cbd5a401b6
|
refs/heads/master
| 2020-04-07T01:44:27.810016
| 2019-02-20T05:24:20
| 2019-02-20T05:24:20
| 157,950,377
| 4
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 4,047
|
py
|
# -*- coding: utf-8 -*-
"""
Created on Fri Dec 28 10:06:53 2018
@author: Administrator
"""
import pandas as pd
import numpy as np
movie_vec = pd.read_csv('movie_vec1.csv',header=None)
del movie_vec[0]
del movie_vec[15]
movie_vec.columns = movie_vec.ix[0,:]
movie_vec = movie_vec.drop(0,axis=0)
movie_vec = movie_vec.reset_index()
'''0-999是用户ID,1000-1996是电影ID,1997是电影平均评分,1998是用户平均评分,1999-2025是电影类型'''
'''2026-5168是演员信息'''
# 将演员信息one-hot化
def actor(x):
n = 0
m = list()
l = np.array(eval(x))
for k in range(len(l)):
if l[k]==1:
m.append(str(2026+k)+':'+str(1))
else:
n = n+1
return m
movie_vec['actor_libsvm'] = movie_vec['actor_vec'].apply(actor)
actor = movie_vec[['number','actor_libsvm']]
actor['number'] = actor['number'].astype('int')
df4 = pd.read_csv('df4.csv',header=None)
df4.columns = ['user_id','rate','movie_num','movie_bias','movie_id','user_bias','type']
df6 = pd.merge(df4,actor,how='left',left_on='movie_num',right_on='number')
df6 = df6.dropna(axis=0)
# 转化成libsvm格式
libsvm6 = []
def getlibsvm(d):
for i in range(len(d)):
libsvm6.append(d.rate[i])
libsvm6.append(str(int(d.user_id[i])-1)+':'+str(1))
libsvm6.append(str(int(d.movie_num[i])+999)+':'+str(1))
libsvm6.append(str(1997)+':'+str(d.movie_bias[i]/2))
libsvm6.append(str(1998)+':'+str(d.user_bias[i]))
libsvm6.append(d.type[i])
libsvm6.append(str(d['actor_libsvm'][i]))
return libsvm6
libsvm6 = getlibsvm(df6)
libsvm = pd.DataFrame(np.array(libsvm6).reshape(len(df6),7))
libsvm.columns = ['rate','user','movie','movie_bias','user_bias','type','actor']
# 去除type两端的双引号
l = list()
for i in range(len(libsvm)):
l.append(eval(libsvm['type'][i]))
libsvm['type'] = l
# 去除actor两端的双引号
l = list()
for i in range(len(libsvm)):
l.append(eval(libsvm['actor'][i]))
libsvm['actor'] = l
libsvm.to_csv('libsvm6.csv',header=True,index=None)
# 划分训练集合测试集
from sklearn.model_selection import train_test_split
train61, test61 = train_test_split(libsvm, test_size=0.1, random_state=10)
train62, test62 = train_test_split(libsvm, test_size=0.1, random_state=11)
train61 = train61.reset_index()
test61 = test61.reset_index()
train62 = train62.reset_index()
test62 = test62.reset_index()
# 解决类别是-1带来的麻烦
def transpose(list1):
if -1 in list1:
l = ''
else:
l= ' '+" ".join(i for i in list1)
return l
def transpose1(list1):
l= ' '+" ".join(i for i in list1)
return l
# train61,test61
fw = open("train61.txt", 'w')
for i in range(len(train61)):
fw.write(train61['rate'][i]+' '+train61['user'][i]+' '+train61['movie'][i]
+' '+train61['movie_bias'][i]+' '+train61['user_bias'][i]+transpose(train61['type'][i])
+transpose1(train61['actor'][i]))
fw.write('\n')
fw.close()
fw = open("test61.txt", 'w')
for i in range(len(test61)):
fw.write(test61['rate'][i]+' '+test61['user'][i]+' '+test61['movie'][i]
+' '+test61['movie_bias'][i]+' '+test61['user_bias'][i]+transpose(test61['type'][i])
+transpose1(test61['actor'][i]))
fw.write('\n')
fw.close()
# train62,test62
fw = open("train62.txt", 'w')
for i in range(len(train62)):
fw.write(train62['rate'][i]+' '+train62['user'][i]+' '+train62['movie'][i]
+' '+train62['movie_bias'][i]+' '+train62['user_bias'][i]+transpose(train62['type'][i])
+transpose1(train62['actor'][i]))
fw.write('\n')
fw.close()
fw = open("test62.txt", 'w')
for i in range(len(test62)):
fw.write(test62['rate'][i]+' '+test62['user'][i]+' '+test62['movie'][i]
+' '+test62['movie_bias'][i]+' '+test62['user_bias'][i]+transpose(test62['type'][i])
+transpose1(test62['actor'][i]))
fw.write('\n')
fw.close()
|
[
"noreply@github.com"
] |
CynthiaWang2018.noreply@github.com
|
baf58035c41c885e7fe744aeeaad3bf2268cda80
|
2e10cfcfd8650a53998b5f6e80f08212371a62bc
|
/11 模块/实例1.py
|
3e48ca7ef884087778d8a81ad811fab1306c537f
|
[] |
no_license
|
Selina0210/Python-learning
|
711bce7679dbefc2be7ca73b26d4f8b13afa7062
|
111a1332f56aa798530642b0ff906e3d0de0061d
|
refs/heads/master
| 2020-03-28T14:00:25.263258
| 2018-10-09T12:08:03
| 2018-10-09T12:08:03
| 148,450,282
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 357
|
py
|
#1----
#导入模块,需要模块名作为前缀
import m1
#利用模块里的类实例化对象
s=m1.student('selina',18)
s.say()
#调用模块里的函数
m1.hello()
#2---
#导入模块里的特定函数,不用带模块名
from m1 import hello
hello()
#导入模块里的特定类
from m1 import student
s1=student('lili',20)
s1.say()
|
[
"noreply@github.com"
] |
Selina0210.noreply@github.com
|
725b90f298c72cf4a541f6d593b58b3c2a42f5cc
|
702a827ca7abcda88fbd3ffdb48869284ab8d18d
|
/2011-mebipenny/contest/fib/fib.py
|
f96ac827ff59a6cd687f70d3c9b0d8f2c5da3a1c
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
stringham/contests
|
7dda147c129645a6e0491bbad9e141642f615559
|
8325ff8ae5b57baf05eae9e8255fde1873bc3af5
|
refs/heads/master
| 2020-04-08T05:27:37.335493
| 2015-09-21T01:01:44
| 2015-09-21T01:01:44
| 42,835,527
| 1
| 0
| null | 2015-09-21T00:38:05
| 2015-09-21T00:38:05
| null |
UTF-8
|
Python
| false
| false
| 693
|
py
|
#!/usr/bin/env python
import sys, re
def int_stream(datastream):
whitespace = re.compile(r'\s+')
for line in datastream:
chunks = whitespace.split(line)
for chunk in chunks:
if not chunk: continue
yield int(chunk)
def fib_count(a, b):
count = 0
counted_1_already = False
x, y = 0, 1
while True:
if x >= a and x <= b:
if x == 1:
if not counted_1_already:
count += 1
counted_1_already = True
else:
count += 1
elif x > b: break
x, y = y, x + y
return count
def main(argv):
ints = int_stream(sys.stdin)
for _ in xrange(ints.next()):
print fib_count(ints.next(), ints.next())
main(sys.argv)
|
[
"jt@instructure.com"
] |
jt@instructure.com
|
d7ee865e250634965a3ca532d24216dc0acde7f0
|
8e64d4ef5bb953f0447bb88fe05d81ba9b61f725
|
/app/migrations/0002_auto_20201223_1719.py
|
62dcb28d7a2918a1144e16c0ba6317e7830b11d3
|
[] |
no_license
|
itsdeka/bitcoin-exchange
|
1597d8dd2aa54a15cd2f7e97222da187f9888a69
|
d2ab9a29ba1970111921e9f82bec47ecf7ae31f1
|
refs/heads/master
| 2023-05-15T10:54:33.461813
| 2021-05-30T12:43:51
| 2021-05-30T12:43:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 452
|
py
|
# Generated by Django 3.0.5 on 2020-12-23 16:19
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('app', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='profile',
name='user',
),
migrations.DeleteModel(
name='Order',
),
migrations.DeleteModel(
name='Profile',
),
]
|
[
"marcodignazio@gmail.com"
] |
marcodignazio@gmail.com
|
3ca36e30db95dfa0413ce29829506bfcea66b55d
|
d499db07cac87471a14cd73599e659abcd3c3afc
|
/account/migrations/0001_initial.py
|
3cd99fa1aa7f54a1c4db401fefcbdeed78e5413f
|
[] |
no_license
|
ArtusU/ChatApp
|
7127afcad99d485993bf803ca130e5eacc095814
|
bea6e447d433ce519ebf01aedd8152454d1ae2d1
|
refs/heads/master
| 2023-02-08T16:32:02.609163
| 2020-12-28T12:48:13
| 2020-12-28T12:48:13
| 322,002,787
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,511
|
py
|
# Generated by Django 3.1.4 on 2020-12-19 13:18
import account.models
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Account',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('password', models.CharField(max_length=128, verbose_name='password')),
('email', models.EmailField(max_length=60, unique=True, verbose_name='email')),
('username', models.CharField(max_length=30, unique=True)),
('date_joined', models.DateTimeField(auto_now_add=True, verbose_name='date joined')),
('last_login', models.DateTimeField(auto_now=True, verbose_name='last login')),
('is_admin', models.BooleanField(default=False)),
('is_active', models.BooleanField(default=True)),
('is_staff', models.BooleanField(default=False)),
('is_superuser', models.BooleanField(default=False)),
('profile_image', models.ImageField(blank=True, default=account.models.get_default_frofile_image, max_length=255, null=True, upload_to=account.models.get_profile_image_filepath)),
('hide_email', models.BooleanField(default=True)),
],
options={
'abstract': False,
},
),
]
|
[
"artusrock@hotmail.com"
] |
artusrock@hotmail.com
|
ae67d1955e3cc2d34661101cdbb636de8c9b46aa
|
f45fa7e4f0f23a53065f55ed916456a2c1bdef3e
|
/ceilometer/tests/database/test_notifications.py
|
93f480a400adff78d4b69ea2b45e453b7b255347
|
[
"Apache-2.0"
] |
permissive
|
r-mibu/ceilometer
|
ef35aa553f3650ad872931399ba569cd73a9e2f0
|
e5562b7e73317ac13e8dda934bd00101c3d54550
|
refs/heads/master
| 2021-01-21T15:07:45.629220
| 2015-07-23T04:35:01
| 2015-07-23T04:35:01
| 39,547,413
| 0
| 0
| null | 2015-07-23T05:24:37
| 2015-07-23T05:24:37
| null |
UTF-8
|
Python
| false
| false
| 3,315
|
py
|
#
# Copyright 2015 Hewlett Packard
#
# 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.
import mock
from oslo_utils import timeutils
from oslotest import base
from ceilometer.database import notifications
from ceilometer import sample
NOW = timeutils.isotime()
TENANT_ID = u'76538754af6548f5b53cf9af2d35d582'
USER_ID = u'b70ece400e4e45c187168c40fa42ff7a'
INSTANCE_STATE = u'active'
INSTANCE_TYPE = u'm1.rd-tiny'
RESOURCE_ID = u'a8b55824-e731-40a3-a32d-de81474d74b2'
SERVICE_ID = u'2f3ff068-2bfb-4f70-9a9d-a6bb65bc084b'
NOVA_INSTANCE_ID = u'1cf6ce1b-708b-4e6a-8ecf-2b60c8ccd435'
PUBLISHER_ID = u'trove'
def _trove_notification_for(operation):
return {
u'event_type': '%s.instance.%s' % (notifications.SERVICE,
operation),
u'priority': u'INFO',
u'timestamp': NOW,
u'publisher_id': PUBLISHER_ID,
u'message_id': u'67ba0a2a-32bd-4cdf-9bfb-ef9cefcd0f63',
u'payload': {
u'state_description': INSTANCE_STATE,
u'user_id': USER_ID,
u'audit_period_beginning': u'2015-07-10T20:05:29.870091Z',
u'tenant_id': TENANT_ID,
u'created_at': u'2015-06-29T20:52:12.000000',
u'instance_type_id': u'7',
u'launched_at': u'2015-06-29T20:52:12.000000',
u'instance_id': RESOURCE_ID,
u'instance_type': INSTANCE_TYPE,
u'state': INSTANCE_STATE,
u'service_id': SERVICE_ID,
u'nova_instance_id': NOVA_INSTANCE_ID,
u'display_name': u'test',
u'instance_name': u'test',
u'region': u'LOCAL_DEV',
u'audit_period_ending': u'2015-07-10T21:05:29.870091Z'
},
}
class TestNotification(base.BaseTestCase):
def _verify_common_sample(self, actual, operation):
self.assertIsNotNone(actual)
self.assertEqual('%s.instance.%s' % (notifications.SERVICE, operation),
actual.name)
self.assertEqual(NOW, actual.timestamp)
self.assertEqual(sample.TYPE_CUMULATIVE, actual.type)
self.assertEqual(TENANT_ID, actual.project_id)
self.assertEqual(RESOURCE_ID, actual.resource_id)
self.assertEqual(USER_ID, actual.user_id)
self.assertEqual(3600, actual.volume)
self.assertEqual('s', actual.unit)
metadata = actual.resource_metadata
self.assertEqual(PUBLISHER_ID, metadata.get('host'))
def _test_operation(self, operation):
notif = _trove_notification_for(operation)
handler = notifications.InstanceExists(mock.Mock())
data = list(handler.process_notification(notif))
self.assertEqual(1, len(data))
self._verify_common_sample(data[0], operation)
def test_exists(self):
self._test_operation('exists')
|
[
"rohit.jaiswal@hp.com"
] |
rohit.jaiswal@hp.com
|
6d06e3869d991cdba871e3ea3de84ef5f9f3797e
|
ec0f7de5313f7b7ec80bbf9a8199fe499d540598
|
/mainpage/views.py
|
5b373ff42b69cde3cf9783d38a08db2ea98ece93
|
[] |
no_license
|
DenisSkulovic/Finance_Django_Project
|
d2908c58f6b1dace78f8b700a29a4db355f6e9fa
|
0bb52ef8231cc3b2e416e3b02678200b00de74c1
|
refs/heads/master
| 2023-02-11T20:25:31.257617
| 2021-01-07T13:37:58
| 2021-01-07T13:37:58
| 324,163,477
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 315
|
py
|
from django.shortcuts import render
from django.views.generic import TemplateView, ListView, View, CreateView, DeleteView, UpdateView
# Create your views here.
class MainpageTemplateView(TemplateView):
template_name = 'mainpage.html'
class ContactTemplateView(TemplateView):
template_name = 'contact.html'
|
[
"dskulovich@gmail.com"
] |
dskulovich@gmail.com
|
5009d72e66510b1f700002769eddcea15c26a5cc
|
5911f67eb716c3cc744c6c6ea21e8830e4c7e581
|
/lasso/lasso.py
|
6b2ee44c98bebedc8d34edb01b3a4c9c90d498ba
|
[] |
no_license
|
sauxpa/ML_101
|
bda709e1ed382f37729c2684695e6a5642951756
|
842941db91fa093d9b7fdf047f7c485a6c2f90cd
|
refs/heads/master
| 2023-07-23T13:30:03.149435
| 2023-07-15T13:16:15
| 2023-07-15T13:16:15
| 164,256,524
| 3
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 7,965
|
py
|
#!/usr/bin/env python
# coding: utf-8
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
from typing import Tuple
class Lasso():
"""Wrapper for Lasso regression in tensorflow,
with model selection tools (lasso path, number of active features...)
"""
def __init__(self,
X: np.ndarray=None,
y: np.ndarray=None,
optim_params: dict={},
l1_strength: float=1e-1,
n_epochs: int=int(1e2),
active_features_threshold: float=0.01,
verbose: bool=False,
) -> None:
self._X = X
self._y = y
self._optim_params = optim_params
self._l1_strength = l1_strength
self._theta = None
self._theta_filtered = None # drop component below active_features_threshold
self._n_epochs = n_epochs
self._active_features_threshold = active_features_threshold
self._verbose = verbose
@property
def X(self) -> np.ndarray:
""" Feature matrix : (n_data, n_features)
"""
return self._X
@X.setter
def X(self, new_X) -> None:
self._X = new_X
@property
def y(self) -> np.ndarray:
""" target vector : (n_data, 1)
"""
return self._y
@y.setter
def y(self, new_y) -> None:
self._y = new_y
@property
def optim_params(self) -> dict:
return self._optim_params
@optim_params.setter
def optim_params(self, new_optim_params) -> None:
self._optim_params = new_optim_params
@property
def optimizer_name(self) -> str:
return self.optim_params.get('optimizer_name', '')
@property
def learning_rate(self) -> float:
return self.optim_params.get('learning_rate', None)
@property
def momentum(self) -> float:
return self.optim_params.get('momentum', None)
@property
def l1_strength(self) -> float:
return self._l1_strength
@l1_strength.setter
def l1_strength(self, new_l1_strength) -> None:
self._l1_strength = float(new_l1_strength)
@property
def n_epochs(self) -> int:
return self._n_epochs
@n_epochs.setter
def n_epochs(self, new_n_epochs) -> None:
self._n_epochs = new_n_epochs
@property
def active_features_threshold(self) -> float:
return self._active_features_threshold
@active_features_threshold.setter
def active_features_threshold(self, new_active_features_threshold) -> None:
self._active_features_threshold = new_active_features_threshold
@property
def verbose(self) -> bool:
return self._verbose
@verbose.setter
def verbose(self, new_verbose) -> None:
self._verbose = new_verbose
@property
def n_features(self) -> int:
return self._X.shape[1]
@property
def n_samples(self) -> int:
return self._X.shape[0]
@property
def theta_filtered(self) -> np.ndarray:
return np.array([x if np.abs(x) > self.active_features_threshold else 0. for x in self.theta])
@property
def optimizer(self):
if self.optimizer_name == 'gradient_descent':
return tf.train.GradientDescentOptimizer(learning_rate=self.learning_rate)
elif self.optimizer_name == 'momentum':
return tf.train.MomentumOptimizer(learning_rate=self.learning_rate, momentum=self.momentum, use_nesterov=False)
elif self.optimizer_name == 'nesterov':
return tf.train.MomentumOptimizer(learning_rate=self.learning_rate, momentum=self.momentum, use_nesterov=True)
elif self.optimizer_name == 'rmsprop':
return tf.train.RMSPropOptimizer(learning_rate=self.learning_rate)
elif self.optimizer_name == 'adam':
return tf.train.AdamOptimizer(learning_rate=self.learning_rate)
elif self.optimizer_name == 'ftrl':
return tf.train.FtrlOptimizer(learning_rate=self.learning_rate)
else:
raise NameError('Optimizer {} not implemented'.format(self.optimizer_name))
@property
def l1_regularizer(self):
return tf.contrib.layers.l1_regularizer(
scale=self.l1_strength, scope=None
)
@property
def n_active_features(self) -> int:
return (np.abs(self.theta)>self.active_features_threshold).sum()
def fit(self) -> None:
X = tf.constant(self._X, dtype=tf.float32, name='X')
y = tf.constant(self._y, dtype=tf.float32, name='y')
theta = tf.Variable(tf.random_uniform([self.n_features, 1], -1.0, 1.0), name='theta')
y_pred = tf.matmul(X, theta, name='predictions')
error = y_pred - y
mse = tf.reduce_mean(tf.square(error), name='mse')
l1_regularizer = self.l1_regularizer
optimizer = self.optimizer
regularization_penalty = tf.contrib.layers.apply_regularization(
l1_regularizer,
[theta])
regularized_loss = mse + regularization_penalty # this loss needs to be minimized
training_op = optimizer.minimize(regularized_loss)
init = tf.global_variables_initializer()
with tf.Session() as sess:
sess.run(init)
for epoch in range(self.n_epochs+1):
if self.verbose and epoch % 100 == 0:
print('Epoch', epoch, 'MSE =', mse.eval())
sess.run(training_op)
self.theta = theta.eval().flatten()
def bar_plot(self) -> None:
fig, ax = plt.subplots(nrows=1, ncols=1)
index = range(self.n_features)
ax.bar(index, self.theta)
ax.set_xlabel(r'Component of $\theta$')
ax.set_ylabel('Value')
ax.set_title('{} active features (threshold : {})'.format(self.n_active_features, self.active_features_threshold))
plt.tight_layout()
plt.show()
def lasso_path(self,
n_l1_strength: int=10,
l1_min: float=0.001,
l1_max:float =0.001,
plot_path: bool=False,
plot_active_features_path: bool=False,
add_legend: bool=False,
) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:
"""Lasso regularization path
l1_strength_grid covers [l1_min, l1_max] in a logarithmic scale,
threshold determines which features are inactive (less than threshold away from zero)
"""
l1_strength_grid = np.logspace(np.log10(l1_min), np.log10(l1_max), n_l1_strength)
path = []
active_features_path = []
for l1_strength in l1_strength_grid:
self.l1_strength = l1_strength
self.fit()
path.append(self.theta)
active_features_path.append(self.n_active_features)
path = np.array(path).T
active_features_path = np.array(active_features_path)
if plot_path:
fig, ax = plt.subplots(nrows=1, ncols=1)
for i, theta in enumerate(path):
ax.plot(l1_strength_grid, theta, label='Feature {}'.format(i+1))
ax.scatter(l1_strength_grid, theta, marker='.')
ax.set_xlabel('l1 strength')
ax.set_ylabel(r'$\theta$ coefficients')
if add_legend:
ax.legend(loc='lower right')
plt.tight_layout()
plt.show()
if plot_active_features_path:
fig, ax = plt.subplots(nrows=1, ncols=1)
ax.plot(l1_strength_grid, active_features_path)
ax.set_xlabel('l1 strength')
ax.set_ylabel('Number of active features')
plt.tight_layout()
plt.show()
return path, active_features_path, l1_strength_grid
|
[
"noreply@github.com"
] |
sauxpa.noreply@github.com
|
aae6ec9804c5fab083ea57b08ea4e72f40f10236
|
dc95bde612acd19a37e6cf49143124307e98b8cd
|
/appdaemon/apps/localvars.py
|
04ed4dfbc98a41488ba297af4821f65090f20e57
|
[] |
no_license
|
kf-nz/Home-AssistantConfig
|
5741b06edf1fb2c7f043adb64cc2cf1f19945df1
|
11448d8571376c04e733aca15bef2a12a1ee24f5
|
refs/heads/master
| 2023-01-27T11:38:08.374457
| 2019-09-21T23:00:55
| 2019-09-21T23:00:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 25
|
py
|
Notify_Morning_Update = 0
|
[
"kyle@tai.net.au"
] |
kyle@tai.net.au
|
6b6f7b2b6ac85440527e29ad0de7b5beeefb88c0
|
fbe6b76073a94cbb25ae0cec763a18b0e9d19c46
|
/tests/common.py
|
9e19326d841517afadd3d42542cc9b11a5c4a5d7
|
[
"Apache-2.0"
] |
permissive
|
Algomorph/ext_argparse
|
19301bb75c4ec18d390c5b7d9c857208770182c5
|
fbca26f8a551f84677475a11fb5415ddda78abd9
|
refs/heads/main
| 2023-08-25T18:36:53.354766
| 2021-10-18T19:28:13
| 2021-10-18T19:28:13
| 401,475,082
| 3
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,578
|
py
|
import os
import pathlib
import typing
import pytest
from ext_argparse.parameter import Parameter
from ext_argparse.param_enum import ParameterEnum
from enum import Enum
class RoofMaterial(Enum):
SLATE = 0
METAL = 1
CONCRETE = 2
COMPOSITE = 3
SOLAR = 4
CLAY = 5
SYNTHETIC_BARREL = 6
SYNTHETIC_SLATE = 7
SYNTHETIC_CEDAR = 8
class HouseStyle(Enum):
CRAFTSMAN_BUNGALO = 0
CAPE_COD = 1
RANCH = 2
CONTEMPORARY = 3
QUEEN_ANNE = 4
COLONIAL_REVIVAL = 5
TUDOR_REVIVAL = 6
TOWNHOUSE = 7
PRAIRIE = 8
MID_CENTURY_MODERN = 9
NEOCLASSICAL = 10
MEDITERRANEAN = 11
class HouseRoofSettings(ParameterEnum):
year_changed = Parameter(arg_type=int, default=2010, arg_help="The last year when the roof tiles were changed.")
roof_material: typing.Type[RoofMaterial] = Parameter(arg_type=RoofMaterial, default=RoofMaterial.SLATE,
arg_help="Material of the roof tiles.")
class HouseParameters(ParameterEnum):
sturdiness = Parameter(arg_type=float, default=5.0, arg_help="Sturdiness of the house.", shorthand="stu")
year_built = Parameter(arg_type=int, default=2000, arg_help="The year the house was built.")
roof: typing.Type[HouseRoofSettings] = HouseRoofSettings
style = Parameter(arg_type=HouseStyle, default=HouseStyle.CRAFTSMAN_BUNGALO, arg_help="Style of da house.",
shorthand="sty")
@pytest.fixture
def test_data_dir():
return os.path.join(pathlib.Path(__file__).parent.resolve(), "test_data")
|
[
"algomorph@gmail.com"
] |
algomorph@gmail.com
|
7237a2efa1e08295933e872f5393278d2355d6dd
|
eeb6ce7ce2d2b058c72d1dd05f31aa3157f692a1
|
/plot16.py
|
95c8683fb8ee006b3ed62c963a33481308b8c39b
|
[] |
no_license
|
qiyang-ustc/2d-Ising-Dynamics
|
a894453a0421466bc42c692f4b2db8313ebae0c8
|
6b61dd784e6f5add6f9e7e0624b8e6bd10e3f61b
|
refs/heads/master
| 2020-09-16T19:04:55.644289
| 2019-12-15T08:50:31
| 2019-12-15T08:50:31
| 223,861,796
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,776
|
py
|
# Only for degeneracies:
import matplotlib.pyplot as plt
import numpy as np
import os
import platform
import math
L=16
dJ_set=['-0.1','-0.01','-0.001','-0.0005','-0.0002','-0.0001','0.0','0.0001','0.0002','0.0005','0.001','0.01','0.1']
color_map_name = 'plasma'
color_interval = 10
color_map = plt.get_cmap(color_map_name)
color_set= [color_map.colors[i*color_interval] for i in range(256//color_interval)]
fig,(ax1,ax2,ax3)= plt.subplots(nrows=1,ncols=3,figsize=(30,8))
for i in range(len(dJ_set)):
dJ = dJ_set[i]
color = [color_set[i]]
data = np.loadtxt('./Data/{},{}.dat'.format(L,dJ))
ave = np.log(np.abs(data[0,:])+0.00001)
# std = np.log(data[:,1])
tim = [np.log(i+1) for i in range(ave.size)]
ax1.scatter(tim,ave,s=1,c=color,marker='o',label="L={},dJ={}".format(L,dJ))
ax1.legend(loc='lower left')
ax1.set_title("M(t,L,J)")
ax1.set_xlabel("log(t)")
ax1.set_ylabel("log(M)")
ax1.set_ylim(-2.5,0)
ax1.set_xlim(0,7.5)
# std = np.log(data[:,1])
ave = data[0,:]
tim = np.array([i+1 for i in range(ave.size)])
ax2.scatter(tim,ave,s=1,c=color,marker='o',label="L={},dJ={}".format(L,dJ))
ax2.legend(loc='best')
ax2.set_title("M(t,L,J)")
ax2.set_xlabel("t")
ax2.set_ylabel("M")
ax2.set_ylim(0.0,1.0)
ax2.set_xlim(0,1600)
ave = np.log(np.abs(data[0,:])+0.00001)
tim = np.array([i+1 for i in range(ave.size)])
# ax3.errorbar(tim,ave,err,marker='o',label="L={},dJ={}".format(L,dJ))
ax3.scatter(tim,ave,s=1,c=color,marker='o',label="L={},dJ={}".format(L,dJ))
ax3.legend(loc='best')
ax3.set_title("M(t,L,J)")
ax3.set_xlabel("t")
ax3.set_ylabel("log(M)")
ax3.set_ylim(-2.5,0)
ax3.set_xlim(0,1600)
plt.savefig('./figure/fig{}.png'.format(L))
|
[
"qiyang@mail.ustc.edu.cn"
] |
qiyang@mail.ustc.edu.cn
|
80880417854f6d34fcd4c992d6162711060ddb99
|
c09b37459c38bb28ffce5abd6da85a4a77508f57
|
/app.py
|
4f7675c927fe461d4c23afbf274f7c01b0254e3f
|
[] |
no_license
|
avalonLZ/Flash_HomeMonitorSys
|
35edad68857d62819102beac46adf1598841ddba
|
f8121677b768462c9b44f052775dec7aecd0dab5
|
refs/heads/master
| 2021-09-01T22:46:12.462848
| 2017-12-29T01:27:39
| 2017-12-29T01:27:39
| 115,673,424
| 1
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 6,112
|
py
|
#coding:utf8
from flask import Flask,session,render_template,request,redirect,flash
import RPi.GPIO as GPIO
import time
import os
import random
import dht11
import motor
import ledstart
from apscheduler.schedulers.background import BackgroundScheduler
def my_job():
date=dht11.start()
#print date
sched = BackgroundScheduler()
sched.add_job(my_job,'interval',seconds=5)
app=Flask(__name__)
app.secret_key = 'some_secret'
user_list={'lz':'111'}
check=[]
date=[]
led1=[]
led2=[]
ledstart.webstart()
ledstart.ledstart()
@app.route('/', methods=['GET'])
def login_init():
# sched.start()# OK
# sched.shutdown(wait=True)
#date=dht11.start()
#date.append(dht11.start())
#print date
return render_template('login.html')
@app.route('/', methods=['POST'])
def login():
#date=dht11.start()
#sched.start()
#print date
if 'io1' in request.form:
if request.form['io1']=='1':
#flash('GPIO1 OPEN')
#print check
led1[0]='1'
GPIO.output(20, GPIO.HIGH)
return render_template('index.html',sopen=check[0],led1=led1[0],led2=led2[0],temperature=date[0][0],humidity=date[0][1])
else:
led1[0]='0'
GPIO.output(20, GPIO.LOW)
return render_template('index.html',sopen=check[0],led1=led1[0],led2=led2[0],temperature=date[0][0],humidity=date[0][1])
if 'io2' in request.form:
if request.form['io2']=='1':
#led2.append('1')
led2[0]='1'
GPIO.output(21, GPIO.HIGH)
return render_template('index.html',sopen=check[0],led1=led1[0],led2=led2[0],temperature=date[0][0],humidity=date[0][1])
else:
#del(led2[:len(led2)])
led2[0]='0'
GPIO.output(21, GPIO.LOW)
return render_template('index.html',sopen=check[0],led1=led1[0],led2=led2[0],temperature=date[0][0],humidity=date[0][1])
if 'yuntai' in request.form:
if request.form['yuntai']=='1':
motor.motorstart('l')
return render_template('index.html',sopen=check[0],led1=led1[0],led2=led2[0],temperature=date[0][0],humidity=date[0][1])
else:
motor.motorstart('r')
return render_template('index.html',sopen=check[0],led1=led1[0],led2=led2[0],temperature=date[0][0],humidity=date[0][1])
if 'sopen' in request.form:
if request.form['sopen']=='1':
os.system('sudo service motion start')
#time.sleep(0.5)
check[0]='1'
return render_template('index.html',sopen=check[0],led1=led1[0],led2=led2[0],temperature=date[0][0],humidity=date[0][1])
#return render_template('index.html',sopen='1')
else:
os.system('sudo service motion stop')
#time.sleep(0.2)
check[0]='0'
return render_template('index.html',sopen=check[0],led1=led1[0],led2=led2[0],temperature=date[0][0],humidity=date[0][1])
#return render_template('index.html',sopen='0')
if 'photo' in request.form:
if request.form['photo']=='1':
i=time.strftime('%m-%d-%H-%M-%S',time.localtime(time.time()))
st='sudo fswebcam --no-banner -r 640x480 /home/lz/Desktop/picture/i.jpg'
st=st[:62]+i+st[63:]
if check[0]=='1':
os.system('sudo service motion stop')
os.system(st)
os.system('sudo service motion start')
else:
os.system(st)
ledstart.ledstart()
return render_template('index.html',sopen=check[0],led1=led1[0],led2=led2[0],temperature=date[0][0],humidity=date[0][1])
else:
return 'error'
if 'teandhu' in request.form:
if request.form['teandhu']=='1':
date[0]=dht11.start()
print date
return render_template('index.html',sopen=check[0],led1=led1[0],led2=led2[0],temperature=date[0][0],humidity=date[0][1])
if 'qita' in request.form:
if request.form['qita']=='1':
dirlist=os.listdir('/dev')
if 'sda4' in dirlist:
os.system('sudo mount -t vfat /dev/sda4 /media/')
elif 'sdb4' in dirlist:
os.system('sudo mount -t vfat /dev/sdb4 /media/')
else:
return "Please input U Disk"
os.system('sudo cp -Rf /home/lz/motion-images/*.jpg /media/')
os.system('sudo cp -Rf /home/lz/Desktop/picture/*.jpg /media/')
os.system('sudo umount /media/')
os.system('sudo rm -r /home/lz/motion-images/*.jpg')
os.system('sudo rm -r /home/lz/Desktop/picture/*.jpg')
ledstart.ledstart()
return render_template('index.html',sopen=check[0],led1=led1[0],led2=led2[0],temperature=date[0][0],humidity=date[0][1])
if request.form['qita']=='2':
os.system('sudo shutdown -r -t 5 now &')
return '正在重启,请稍后...'
if request.form['qita']=='3':
os.system('sudo shutdown -h -t 5 now &')
return '正在关机,谢谢使用'
if 'user' and 'password' in request.form:
username=request.form['user']
password=request.form['password']
if username in user_list and password in user_list.values() and password==user_list[username]:
#GPIO.setmode(GPIO.BCM)
GPIO.setup(20, GPIO.OUT)
GPIO.setup(21, GPIO.OUT)
date.append(dht11.start())
led1.append('0')
led2.append('0')
check.append('0')
print date
return render_template('index.html',sopen=check[0],led1=led1[0],led2=led2[0],temperature=date[0][0],humidity=date[0][1])
else:
flash('User or Password error,Please reinput')
return render_template('login.html')
if __name__=='__main__':
# app.run(debug=True)
app.run('192.168.191.20')
# app.run('210.30.70.25')
# app.run('192.168.43.225')
|
[
"423810942@qq.com"
] |
423810942@qq.com
|
543322bde64805dbcb5094870aea0d23f6a307e4
|
7aafea72da8a8feec096e52a5d300566d8534b16
|
/env/bin/pip3
|
119719284667384eff7b7734617919ff97af2ae8
|
[] |
no_license
|
deepesh15/url-shortener
|
288bccbf2e16fbc399ce4a5f5c07f8e270e7d068
|
8aea52780562f92f650c6157ff71393e25db9191
|
refs/heads/master
| 2023-02-01T05:56:56.771395
| 2020-12-17T08:10:18
| 2020-12-17T08:10:18
| 322,223,057
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 249
|
#!/home/pop-py/url-shortner/env/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from pip._internal.cli.main import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
|
[
"juit.deepesh@gmail.com"
] |
juit.deepesh@gmail.com
|
|
84f283c2d6e32bf80d78a712642904b37a95f12a
|
1d0977590f9f8bee5a97964a6155d0efc98aed9e
|
/neighborhood/migrations/0007_auto_20191029_0844.py
|
deca23a3f05035d5e477559cfe6b3d1f9436d8e2
|
[
"MIT"
] |
permissive
|
josylad/My-Neighborhood
|
09530b65952654ecf0d4f3a5697af043dacc3038
|
1955da6b95792d62df0b01165147da79b8af9e55
|
refs/heads/master
| 2021-11-24T17:18:25.369748
| 2021-11-11T08:51:29
| 2021-11-11T08:51:29
| 217,216,983
| 0
| 3
|
MIT
| 2021-11-11T08:51:30
| 2019-10-24T05:17:54
|
Python
|
UTF-8
|
Python
| false
| false
| 569
|
py
|
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2019-10-29 08:44
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('neighborhood', '0006_auto_20191029_0813'),
]
operations = [
migrations.AlterField(
model_name='profile',
name='neighborhood',
field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='neighborhood.Neighborhood'),
),
]
|
[
"josylado@gmail.com"
] |
josylado@gmail.com
|
3ad50b0392c543c8b67eceb4bfdf27fe66d482ea
|
255021fadf9f739db042809ca95f5b9f75609ec5
|
/D3/5110 수열합치기.py
|
5c8bc3c8690a5b04fcd125f4897ac861916a08af
|
[] |
no_license
|
unsung107/Algorithm_study
|
13bfff518fc1bd0e7a020bb006c88375c9ccacb2
|
fb3b8563bae7640c52dbe9324d329ca9ee981493
|
refs/heads/master
| 2022-12-13T02:10:31.173333
| 2020-09-13T11:32:10
| 2020-09-13T11:32:10
| 295,137,458
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,634
|
py
|
class Node():
def __init__(self, value, nxt):
self.value = value
self.nxt = nxt
def __str__(self):
return '%d' %self.value
for ro in range(int(input())):
N, M = map(int,input().split())
lists = []
heads = []
for i in range(M):
lists.append(list(map(int,input().split())))
temp = Node(lists[i][-1], None)
for j in range(N - 2, -1, -1):
temp = Node(lists[i][j], temp)
heads.append(temp)
for i in range(1, M):
fir = heads[i].value
p = heads[0]
while True:
if p == heads[0] and p.value > fir:
temp = heads[0]
heads[0] = heads[i]
now = heads[i]
while now.nxt != None:
now = now.nxt
now.nxt = temp
break
if p.nxt == None:
p.nxt = heads[i]
break
elif p.nxt.value <= fir:
p = p.nxt
continue
elif p.nxt.value > fir:
temp = p.nxt
p.nxt = heads[i]
now = heads[i]
while now.nxt != None:
now = now.nxt
now.nxt = temp
break
result_list = []
p = heads[0]
while p.nxt != None:
result_list.append(p.value)
p = p.nxt
result_list.append(p.value)
result = result_list[N * M - 1: N * M - 11: -1]
result = list(map(str, result))
print('#%d %s' %(ro + 1, ' '.join(result)))
|
[
"unsung102@naver.com"
] |
unsung102@naver.com
|
2994a2c292b1c38a977c3cfd2b4fdecb1309fb7b
|
b83c9e6568a1328f9cb6fc4385224541db183c4d
|
/yatube/yatube/urls.py
|
21cccba3aaae6dcd805a4e5c760a6d80e166e196
|
[] |
no_license
|
diakonovmakar/yatube_final
|
fe074962d9970216c841c58d41227e31808b543a
|
43ce2864f26e6e76529d265efd89e6aaa5234f43
|
refs/heads/master
| 2023-07-03T07:07:44.249572
| 2021-08-17T00:13:53
| 2021-08-17T00:13:53
| 396,022,330
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,427
|
py
|
'''yatube URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
'''
from django.conf import settings
from django.conf.urls import handler404, handler500
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path
handler404 = 'posts.views.page_not_found' # noqa
handler500 = 'posts.views.server_error' # noqa
urlpatterns = [
path('about/', include('about.urls', namespace='about')),
path('auth/', include('users.urls')),
path('auth/', include('django.contrib.auth.urls')),
path('admin/', admin.site.urls),
path('', include('posts.urls', namespace='post')),
]
if settings.DEBUG:
urlpatterns += static(
settings.MEDIA_URL,
document_root=settings.MEDIA_ROOT
)
urlpatterns += static(
settings.STATIC_URL,
document_root=settings.STATIC_ROOT
)
|
[
"diakonov.makar@gmail.com"
] |
diakonov.makar@gmail.com
|
cdd69a753b645190928c19189c8cb35e338dd0ac
|
010bc1db26ae14ae6359dac6d064f30248ab9252
|
/src/utils/csrc/setup.py
|
c72838f55143af7eb3e2bfed58e188fd851b87fe
|
[
"MIT"
] |
permissive
|
ck196/yolo-pytorch
|
633756808d36202f07fb1a652696da977645280a
|
c2c9b129e0466f6cb4b5ec260d18f025399ed024
|
refs/heads/master
| 2020-05-15T13:11:58.672400
| 2019-04-17T02:46:25
| 2019-04-17T02:46:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,474
|
py
|
from distutils.core import setup
import numpy as np
from distutils.extension import Extension
from torch.utils.cpp_extension import BuildExtension, CppExtension
import torch
from torch.utils.cpp_extension import CUDA_HOME
from torch.utils.cpp_extension import CUDAExtension
import glob
import os
requirements = ["torch", "torchvision"]
print(torch.__version__)
this_dir = os.path.dirname(os.path.abspath(__file__))
main_file = glob.glob(os.path.join(this_dir, "*.cpp"))
source_cpu = glob.glob(os.path.join(this_dir, "cpu", "*.cpp"))
source_cuda = glob.glob(os.path.join(this_dir, "cuda", "*.cu"))
sources = main_file + source_cpu
extension = CppExtension
extra_compile_args = {"cxx": []}
define_macros = []
if (torch.cuda.is_available() and CUDA_HOME is not None) or os.getenv("FORCE_CUDA", "0") == "1":
extension = CUDAExtension
sources += source_cuda
define_macros += [("WITH_CUDA", None)]
extra_compile_args["nvcc"] = [
"-DCUDA_HAS_FP16=1",
"-D__CUDA_NO_HALF_OPERATORS__",
"-D__CUDA_NO_HALF_CONVERSIONS__",
"-D__CUDA_NO_HALF2_OPERATORS__"]
sources = [os.path.join(this_dir, s) for s in sources]
include_dirs = [this_dir]
print(sources)
ext_modules = [
extension(
"nms_module",
sources,
include_dirs=include_dirs,
define_macros=define_macros,
extra_compile_args=extra_compile_args,
)
]
setup(
ext_modules=ext_modules,
cmdclass={"build_ext": BuildExtension},
)
|
[
"tuananh.kirimaru@gmail.com"
] |
tuananh.kirimaru@gmail.com
|
7c28c0a4417fbfbf23a7a0f23fe8145ef948b579
|
5298919395285e0c11cd1cded557c1b05b36c6b1
|
/src/stock.py
|
4aa809f947991d11b2abca8354f2a43972e87e02
|
[
"Apache-2.0"
] |
permissive
|
sneharai4/Stock-Example
|
3fd5a8208d9433920977195f771d384b00c1fa31
|
3df25112be5badb6b75bca9f1a4afc0eb2c78a78
|
refs/heads/master
| 2020-04-14T15:40:51.977953
| 2019-01-09T08:52:13
| 2019-01-09T08:52:13
| 163,934,567
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 6,279
|
py
|
from datetime import datetime, timedelta
from math import isnan
import logging
import os
import pandas as pd
data = [
{'Stock Symbol': 'TEA', 'Type': 'Common', 'Last Dividend': 0, 'Fixed Dividend': '', 'Par Value': 100},
{'Stock Symbol': 'POP', 'Type': 'Common', 'Last Dividend': 8, 'Fixed Dividend': '', 'Par Value': 100},
{'Stock Symbol': 'ALE', 'Type': 'Common', 'Last Dividend': 23, 'Fixed Dividend': '', 'Par Value': 60},
{'Stock Symbol': 'GIN', 'Type': 'Preferred', 'Last Dividend': 8, 'Fixed Dividend': 0.02, 'Par Value': 100},
{'Stock Symbol': 'JOE', 'Type': 'Common', 'Last Dividend': 13, 'Fixed Dividend': '', 'Par Value': 250}]
trade_book = []
logging.basicConfig(filename=os.path.join(os.path.split(os.getcwd())[0], "stock.log"), format='%(asctime)s | %(message)s', filemode='w')
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
class Stock_Exchange(object):
"""
Sample stock exchange class
"""
def __init__(self):
self.df = pd.DataFrame(data)
def calculate_dividend(self, price, stock_symbol):
"""
Calculates Dividend Yield for stock symbol using its given price.
:param price: Price of the stock
:type price: Integer
:param stock_symbol: Stock Symbol
:type stock_symbol: String
:returns: Dividend yield
"""
logger.debug(' ************** Calculate Dividend ************** ')
div_yield = 0.0
calc_type = self.df[(self.df['Stock Symbol'] == stock_symbol)]['Type']
last_dividend = self.df[(self.df['Stock Symbol'] == stock_symbol)]['Last Dividend']
fixed_dividend = self.df[(self.df['Stock Symbol'] == stock_symbol)]['Fixed Dividend']
par_val = self.df[(self.df['Stock Symbol'] == stock_symbol)]['Par Value']
if price > 0:
if str(calc_type.iloc[0]) == 'Preferred':
if not isnan(fixed_dividend):
div_yield = (float(float(fixed_dividend)) * float(par_val))/price
else:
div_yield = float(last_dividend)/price
logger.info("For price %s and stock symbol %s dividend yield is %s" %(price, stock_symbol, div_yield))
return div_yield
def calculate_pe(self, price, stock_symbol):
"""
Calculates P/E ratio
:param price: Price of the stock
:type price: Integer
:param stock_symbol: Stock Symbol
:type stock_symbol: String
:returns: P/E Ratio
"""
logger.debug(' ************** Calculate P/E Ratio ************** ')
pe_ratio = 0
last = self.df[(self.df['Stock Symbol'] == stock_symbol)]['Last Dividend']
if float(last) > 0:
pe_ratio = price/float(last)
logger.info("For price %s and stock symbol %s P/E Ratio is %s" %(price, stock_symbol, pe_ratio))
return pe_ratio
def register_trade(self, price, stock_symbol, quantity, trade_type):
"""
Registers new trade information
:param price: Price of the stock
:type price: Integer
:param stock_symbol: Stock Symbol
:type stock_symbol: String
:param quantity: Quantity
:type quantity: Integer
:param trade_type: Trade type-Buy or Sell
:type trade_type: String
"""
logger.debug(' ************** Register Trade ************** ')
trade_book.append([stock_symbol, price, quantity, trade_type, datetime.now()])
logger.info("New trade registered for stock symbol %s with trade type %s is %s" %(stock_symbol, trade_type, trade_book))
def volume_weight_stock_price(self, stock_symbol):
"""
Calculates volume weighted stock price
:param stock_symbol: Stock Symbol
:type stock_symbol: String
:returns: Volume Weighted Stock Price
"""
logger.debug(' ************** Calculate Volume weight stock price ************** ')
vol_weighted_stock_price = 0
self.df = pd.DataFrame(trade_book)
timediff = datetime.now() - timedelta(minutes=5)
if not self.df.empty:
filtered_df = self.df[
(self.df[0] == stock_symbol) & (self.df[4] < datetime.now()) & (self.df[4] > timediff)]
sum_of_price = filtered_df[1].sum()
sum_of_quantity = filtered_df[2].sum()
vol_weighted_stock_price = (sum_of_price * sum_of_quantity) / sum_of_quantity
logger.info("For stock symbol %s Volume weighted stock price is %s" %(stock_symbol, vol_weighted_stock_price))
return vol_weighted_stock_price
def geometric_mean(self):
"""
Calculates Geometric mean of given 5 stock symbols in the table
:returns: Geometric Mean
"""
logger.debug(' ************** Calculate Geometric Mean ************** ')
tea = self.volume_weight_stock_price('TEA')
pop = self.volume_weight_stock_price('POP')
ale = self.volume_weight_stock_price('ALE')
gin = self.volume_weight_stock_price('GIN')
joe = self.volume_weight_stock_price('JOE')
all_vwsp_prod = tea * pop * ale * gin * joe
geometric_mean = all_vwsp_prod**(1/5)
logger.info("Geometric mean for all stock symbols is %s" %geometric_mean)
return geometric_mean
if __name__ == '__main__':
se = Stock_Exchange()
# Given any price as input, calculate the dividend yield
se.calculate_dividend(15, 'TEA')
se.calculate_dividend(5, 'POP')
se.calculate_dividend(5, 'ALE')
se.calculate_dividend(10, 'GIN')
se.calculate_dividend(0, 'JOE')
# Given any price as input, calculate the P/E Ratio
se.calculate_pe(10, 'TEA')
se.calculate_pe(5, 'POP')
se.calculate_pe(5, 'ALE')
se.calculate_pe(10, 'GIN')
se.calculate_pe(0, 'JOE')
# Trade
se.register_trade(2, 'TEA', 20, 'S')
se.register_trade(1, 'POP', 5, 'B')
se.register_trade(3, 'ALE', 15, 'B')
se.register_trade(5, 'GIN', 10, 'B')
se.register_trade(2, 'GIN', 10, 'S')
se.register_trade(5, 'JOE', 2, 'B')
# Volume weighted stock price
se.volume_weight_stock_price('TEA')
se.volume_weight_stock_price('JOE')
# Geometric mean
se.geometric_mean()
se = None
|
[
"sneha.rai@hpe.com"
] |
sneha.rai@hpe.com
|
39196d6112fbd470d9590ac6859aa7c02132f777
|
570eede1aca5b713e60dea9d2a6e78da573a2ca1
|
/todo_api/views.py
|
d174da6efdf25d06d756ee154944cf3c928dcf28
|
[
"MIT"
] |
permissive
|
MateuszKijewski/to-do-api
|
7bf540bf19bb8c0fd72e7a64e149f1d32bc9afd1
|
0c0b206b331753c92b730d8b4317ef060ced520b
|
refs/heads/master
| 2022-05-04T02:44:50.752939
| 2019-10-18T22:31:07
| 2019-10-18T22:31:07
| 211,272,581
| 0
| 0
|
MIT
| 2022-04-22T22:24:17
| 2019-09-27T08:29:10
|
Python
|
UTF-8
|
Python
| false
| false
| 4,591
|
py
|
import json
import random
from django.shortcuts import redirect
from django.urls import reverse
from django.utils import text
from rest_framework.response import Response
from rest_framework import status
from rest_framework import viewsets
from rest_framework.views import APIView
from rest_framework.authentication import TokenAuthentication
from rest_framework.permissions import IsAuthenticated
from rest_framework.authtoken.views import ObtainAuthToken
from rest_framework.settings import api_settings
from rest_framework import mixins
from todo_api import serializers
from todo_api import models
from todo_api import permissions
from todo_api import scrapers
class UserProfileViewSet(viewsets.ModelViewSet):
"""Handle creating and updating profiles"""
serializer_class = serializers.UserProfileSerializer
authentication_classes = (TokenAuthentication,)
permission_classes = (permissions.UpdateOwnProfile,)
queryset = models.UserProfile.objects.all()
class UserLoginApiView(ObtainAuthToken):
"""Handle creating user auth tokens"""
renderer_classes = api_settings.DEFAULT_RENDERER_CLASSES
class TodoTaskViewset(viewsets.ModelViewSet):
"""Handle creating and checking Tasks"""
serializer_class = serializers.TodoTaskSerializer
authentication_classes = (TokenAuthentication,)
permission_classes = (permissions.TodoListPermission, IsAuthenticated,)
filterset_fields = ['status']
def get_queryset(self):
"""Gets the queryset for an authenticated user"""
user = self.request.user
list_id = self.kwargs.get('list_id')
task_list = models.TodoTaskList.objects.get(id=list_id)
return models.TodoTask.objects.filter(user=user, task_list=task_list)
def perform_create(self, serializer):
"""Sets the user profile to the logged in user"""
list_id = self.kwargs.get('list_id')
task_list = models.TodoTaskList.objects.get(id=list_id)
serializer.save(
user=self.request.user,
task_list=task_list
)
class TodoListViewset(viewsets.ModelViewSet):
"""Handle managing todo-lists"""
serializer_class = serializers.TaskListSerializer
authentication_classes = (TokenAuthentication,)
permission_classes = (permissions.TodoListPermission, IsAuthenticated,)
def get_queryset(self):
"""Gets the queryset for authenticated user"""
user = self.request.user
return models.TodoTaskList.objects.filter(user=user)
def perform_create(self, serializer):
"""Sets the user profile to the logged in user"""
serializer.save(user=self.request.user)
class ObjectDelete(APIView):
"""Handle tasks deleting"""
authentication_classes = (TokenAuthentication,)
permission_classes = (permissions.DeletePermission, IsAuthenticated,)
queryset = None
def post(self, request, format=None):
"""Deletes objects that user posted"""
serializer = serializers.DeleteSerializer(data=request.data)
if serializer.is_valid():
ids = serializer.validated_data.get('ids')
for value in ids:
value = int(value)
try:
task = self.queryset.objects.get(pk=value)
except self.queryset.DoesNotExist:
return Response({'message': 'Some of the given objects doesnt exist'})
for value in ids:
task = self.queryset.objects.get(pk=value)
task.delete()
return Response({'message': 'Objects were succesfully deleted'})
return Response(
{
'errors': serializer.errors,
'request': request.data
}
)
class TaskDelete(ObjectDelete):
queryset = models.TodoTask
class TaskListDelete(ObjectDelete):
queryset = models.TodoTaskList
class InspirationalQuote(APIView):
"""Outputs a random inspirational quote"""
def get(self, request, format=None):
quote_group = models.QuoteGroup.objects.get(name="motivational_quotes")
quotes = json.loads(quote_group.quotes)
authors = json.loads(quote_group.authors)
quote_number = random.randint(0, (len(quotes)-1))
return Response({
'quote': quotes[quote_number],
'author': authors[quote_number]
})
class TestViewset(APIView):
"""Testing things"""
def get(self, request, **kwargs):
info = kwargs.get('info')
return Response({
'message': info
})
|
[
"mateuszkijewski2307@gmail.com"
] |
mateuszkijewski2307@gmail.com
|
ab90c1d450910b0d5483e6cc83580277e0f77401
|
8cad156f70f27af541be08b0bd4a7ba92826dcff
|
/hw4/train_VAE.py
|
37df4cd636dc8df01d7abc9a92cdd755ac646a47
|
[] |
no_license
|
tiffany70072/DLCV2018SPRING
|
4380356cee4a5f5cf7038bfd1afcd96ad78aaf60
|
807f9e6b01ba5ff0f2ed55b853075f1768cc3a35
|
refs/heads/master
| 2022-02-18T18:34:44.349119
| 2019-10-08T09:13:47
| 2019-10-08T09:13:47
| 125,210,328
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 2,997
|
py
|
from import_data import import_image
from model import autoencoder_1, VAE, VAE_encoder, VAE_decoder
from plot import output_32, output_20
import scipy.misc
from sklearn.metrics import mean_squared_error
import numpy as np
import sys
from keras.layers import Input, Conv2D, MaxPooling2D, UpSampling2D, Dropout
from keras.models import Sequential
from keras.models import Model
import tensorflow as tf
config = tf.ConfigProto()
config.gpu_options.per_process_gpu_memory_fraction = 0.2
sess = tf.Session(config=config)
import keras
keras.backend.set_session(sess)
def output(pred, name):
print("pred =", pred.shape)
for i in range(pred.shape[0]):
scipy.misc.imsave("output_VAE2/" + name + "_" + str(i) + '.png', pred[i])
def get_MSE(real, pred):
print("MSE =", mean_squared_error(real.reshape(-1, 64*64*3), pred.reshape(-1, 64*64*3)))
def problem3(model): # plot test image and calculate MSE
x_test = import_image(path = sys.argv[1])
decoded_imgs = model.predict(x_test)[0]
#output(decoded_imgs[:10], 'test')
pred = np.concatenate([x_test[:10], decoded_imgs], axis = 0)
output_20(pred, sys.argv[2] + "fig1_3.jpg", 80)
get_MSE(x_test, decoded_imgs)
def problem4(): # randomly plot
latent_dim = 1024
np.random.seed(3)
z = np.random.normal(0, 1, [32, latent_dim])
z_tensor = Input(shape=(latent_dim, ))
print("z =", z.shape)
decoder_output = VAE_decoder(z_tensor)
decoder = Model(z_tensor, decoder_output)
weights_path = 'saved_model/VAE_weights.h5'
decoder.load_weights(weights_path, by_name=True)
pred = decoder.predict(z)
output_32(pred, sys.argv[2] + "fig1_4.jpg", 60)
def problem5():
np.random.seed(0)
path = sys.argv[1]
x_test = import_image(sys.argv[1])
input_img = Input(shape=(64, 64, 3))
encoder_output = VAE_encoder(input_img)
encoder = Model(input_img, encoder_output)
weights_path = 'saved_model/VAE_weights.h5'
encoder.load_weights(weights_path, by_name=True)
h = encoder.predict(x_test)
print("h =", h.shape)
np.save('report/VAE_problem5_h', h)
def train_VAE():
model = VAE()
model.summary()
history = []
x_train = import_image(folder = 'train')
x_test = import_image(folder = 'test')
#x_train = import_image('test')
arbitrary = np.zeros([x_train.shape[0], 1024*2])
model.summary()
history = model.fit(x_train, [x_train, arbitrary], epochs=200, batch_size=128,
shuffle=True, verbose=1, validation_data=(x_test, [x_test, arbitrary[:x_test.shape[0]]]))
print("history =", history.history.keys())
output_loss1 = history.history['recons_loss']
output_loss2 = history.history['KLD_loss']
np.save('VAE2_recons_loss', output_loss1)
np.save('VAE2_KLD_loss', output_loss2)
model.save_weights('saved_model/VAE2_epochs60_weights.h5')
def load_VAE():
model = VAE()
model.summary()
#model.load_weights('saved_model/VAE2_epochs_weights.h5')
model.load_weights('saved_model/VAE_weights.h5')
return model
def main():
#train_VAE()
model = load_VAE()
problem3(model)
problem4()
problem5()
if __name__ == '__main__':
main()
|
[
"tiffany70072@gmail.com"
] |
tiffany70072@gmail.com
|
638c0d1f13b981105872cfe7e8d0bd8a58105f2a
|
61144246b8a33a1ac55936ab8c1643a3bd6ff90f
|
/server/namespaces.py
|
66b5d7854bee4a76ea0668784b8487585872e206
|
[] |
no_license
|
smorris93/jobservice
|
2c9e3bf02115dd2edebff27f280239b0c21bdc37
|
741abcbeec8558dbbf9f74645c7abecf68ccd41f
|
refs/heads/master
| 2021-01-18T09:46:59.456903
| 2014-11-05T20:00:33
| 2014-11-05T20:00:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 645
|
py
|
from socketio.namespace import BaseNamespace
from socketio.mixins import BroadcastMixin
class PushNamespace(BaseNamespace, BroadcastMixin):
def initialize(self):
PushNamespace.sModel.addListener(self)
def disconnect(self, *pArgs, **pKwargs):
super(PushNamespace, self).disconnect(*pArgs, **pKwargs)
PushNamespace.sModel.removeListener(self)
# called by client
def on_update(self, pParam):
self.updateProgress()
def updateProgress(self):
self.broadcast_event("progress", PushNamespace.sModel.getProgress())
def reset(self):
self.broadcast_event("reset_progress", "")
|
[
"rainer.poisel@gmail.com"
] |
rainer.poisel@gmail.com
|
cde7f232740ed7a8a2206205c568b3b4427573e8
|
17f8b15b186802031099fcac6be304df644fc371
|
/python/conversion_utility.py
|
7a07595c774b1b3595cf01b8036b4d5b2431f783
|
[] |
no_license
|
MattIrv/menumerations
|
a24c6b486fc939a6e58302db1e686eb3576c9e9d
|
29e00f6886c726f5bd705c70650b5274d615de4f
|
refs/heads/master
| 2020-03-29T10:28:48.488320
| 2014-10-18T02:44:58
| 2014-10-18T02:44:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 2,186
|
py
|
#@Martin Kellogg
import sys
import fractions
def unit_convert( val, unit ):
val_parts = val.split()
acc = 0
for item in val_parts:
try:
acc += float(fractions.Fraction(item))
except:
continue
if "cup" in unit or unit == "c" or unit == "c.":
return (acc, "cups")
elif "tablespoon" in unit or "tbl" in unit or "tbs" in unit or "tbsp" in unit or unit == "T" or unit == "T.":
return (acc/16., "cups")
elif "teaspoon" in unit or "tsp" in unit or unit == "t" or unit == "t.":
return (acc/48., "cups")
elif "quart" in unit or unit == "q" or unit == "qt" or unit == "fl qt":
return (acc/0.25, "cups")
elif "fluid ounce" in unit or "ounce" in unit or "fl oz" in unit or unit == "oz" or unit =="oz.":
return (acc*0.125, "cups")
elif "pint" in unit or unit == "p" or unit =="p." or unit == "pt" or "fl pt" in unit:
return (acc*2.0, "cups")
elif "gill" in unit:
return (acc*.5, "cups")
elif "gallon" in unit or unit =="g" or unit == "gal":
return (acc*16.0, "cups")
elif "mL" in unit or unit == "ml" or "milliliter" in unit or "millilitre" in unit or unit == "cc":
return (acc*0.00422675, "cups")
elif "litre" in unit or "liter" in unit or unit == "l" or unit == "L":
return (acc*0.422675, "cups")
elif "deciliter" in unit or "decilitre" in unit or unit == "dL" or unit == "dl":
return (acc* 0.0422675, "cups")
elif "pound" in unit or unit == "lbs" or unit == "lb" or unit =="#":
return (acc*.5, "cups")
elif unit == "g" or "gram" in unit or "gramme" in unit:
return (0.00220462*0.5*acc, "cups")
elif unit == "kg" or "kilogram" in unit or "kilogramme" in unit:
return (0.00220462*0.5*acc/1000.0, "cups")
else:
return (acc, unit)
def fract_parse(val):
val_parts = val.split()
acc = 0
for item in val_parts:
try:
acc += float(fractions.Fraction(item))
except:
continue
return acc
if __name__ == "__main__":
ret_val = unit_convert(raw_input(), raw_input())
print str(ret_val[0]) + " " + ret_val[1]
|
[
"mji7wb@virginia.edu"
] |
mji7wb@virginia.edu
|
438722461013057d03c29e4513b18e4c234e6efa
|
1d2301980e52955d5b8d06b340254bcafe13ff45
|
/build/simple_control/catkin_generated/generate_cached_setup.py
|
6ee5a396bc3d3beddcc0ca5932979212d6d63082
|
[] |
no_license
|
j-alicia-long/ros-sim-projects
|
3f4f74ef6ded867947aa29372a49bfe557c5bbcd
|
a77eea0510b6c8f80f7670b6f68aefe22dd311b5
|
refs/heads/master
| 2022-04-05T03:03:17.373721
| 2020-03-05T08:43:10
| 2020-03-05T08:43:10
| 241,970,605
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,348
|
py
|
# -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
import os
import stat
import sys
# find the import for catkin's python package - either from source space or from an installed underlay
if os.path.exists(os.path.join('/opt/ros/kinetic/share/catkin/cmake', 'catkinConfig.cmake.in')):
sys.path.insert(0, os.path.join('/opt/ros/kinetic/share/catkin/cmake', '..', 'python'))
try:
from catkin.environment_cache import generate_environment_script
except ImportError:
# search for catkin package in all workspaces and prepend to path
for workspace in "/home/robotclass/fastsim/devel;/opt/ros/kinetic".split(';'):
python_path = os.path.join(workspace, 'lib/python2.7/dist-packages')
if os.path.isdir(os.path.join(python_path, 'catkin')):
sys.path.insert(0, python_path)
break
from catkin.environment_cache import generate_environment_script
code = generate_environment_script('/home/robotclass/fastsim/devel/.private/simple_control/env.sh')
output_filename = '/home/robotclass/fastsim/build/simple_control/catkin_generated/setup_cached.sh'
with open(output_filename, 'w') as f:
#print('Generate script for cached setup "%s"' % output_filename)
f.write('\n'.join(code))
mode = os.stat(output_filename).st_mode
os.chmod(output_filename, mode | stat.S_IXUSR)
|
[
"j.alicia.long@gmail.com"
] |
j.alicia.long@gmail.com
|
ae7dcba6c0fdc7a613a199ba0229136f159ce5bd
|
5b2504f42c2bcbffcfae00bde549be74c9e62a60
|
/vb_simulation_pkgs/example_pkgs/pkg_moveit_examples/scripts/node_eg7_play_trajectory.py
|
d2af808e94fc35507ecfbadeecf2a3611ac7bc4e
|
[
"MIT"
] |
permissive
|
ROBODITYA/Eyantra-2021-Vargi-Bots
|
0996937b48b6ac61a90f55fb8a405c026aa83ce8
|
f1c6a82c46e6e84486a4832b3fbcd02625849447
|
refs/heads/main
| 2023-05-11T17:39:10.012824
| 2021-06-03T12:53:48
| 2021-06-03T12:53:48
| 369,171,672
| 0
| 0
|
MIT
| 2021-06-05T07:58:07
| 2021-05-20T10:38:28
|
C++
|
UTF-8
|
Python
| false
| false
| 5,278
|
py
|
#! /usr/bin/env python
import rospy
import moveit_commander
import moveit_msgs.msg
import geometry_msgs.msg
import actionlib
import rospkg
import yaml
import os
import math
import time
import sys
import copy
from std_srvs.srv import Empty
class Ur5Moveit:
# Constructor
def __init__(self, arg_robot_name):
rospy.init_node('node_moveit_eg7', anonymous=True)
self._robot_ns = '/' + arg_robot_name
self._planning_group = "manipulator"
self._commander = moveit_commander.roscpp_initialize(sys.argv)
self._robot = moveit_commander.RobotCommander(robot_description= self._robot_ns + "/robot_description", ns=self._robot_ns)
self._scene = moveit_commander.PlanningSceneInterface(ns=self._robot_ns)
self._group = moveit_commander.MoveGroupCommander(self._planning_group, robot_description= self._robot_ns + "/robot_description", ns=self._robot_ns)
self._display_trajectory_publisher = rospy.Publisher( self._robot_ns + '/move_group/display_planned_path', moveit_msgs.msg.DisplayTrajectory, queue_size=1)
self._exectute_trajectory_client = actionlib.SimpleActionClient( self._robot_ns + '/execute_trajectory', moveit_msgs.msg.ExecuteTrajectoryAction)
self._exectute_trajectory_client.wait_for_server()
self._planning_frame = self._group.get_planning_frame()
self._eef_link = self._group.get_end_effector_link()
self._group_names = self._robot.get_group_names()
self._box_name = ''
# Attribute to store computed trajectory by the planner
self._computed_plan = ''
# Current State of the Robot is needed to add box to planning scene
self._curr_state = self._robot.get_current_state()
rospy.loginfo(
'\033[94m' + "Planning Group: {}".format(self._planning_frame) + '\033[0m')
rospy.loginfo(
'\033[94m' + "End Effector Link: {}".format(self._eef_link) + '\033[0m')
rospy.loginfo(
'\033[94m' + "Group Names: {}".format(self._group_names) + '\033[0m')
rp = rospkg.RosPack()
self._pkg_path = rp.get_path('pkg_moveit_examples')
self._file_path = self._pkg_path + '/config/saved_trajectories/'
rospy.loginfo( "Package Path: {}".format(self._file_path) )
rospy.loginfo('\033[94m' + " >>> Ur5Moveit init done." + '\033[0m')
def clear_octomap(self):
clear_octomap_service_proxy = rospy.ServiceProxy(self._robot_ns + "/clear_octomap", Empty)
return clear_octomap_service_proxy()
def set_joint_angles(self, arg_list_joint_angles):
list_joint_values = self._group.get_current_joint_values()
# rospy.loginfo('\033[94m' + ">>> Current Joint Values:" + '\033[0m')
# rospy.loginfo(list_joint_values)
self._group.set_joint_value_target(arg_list_joint_angles)
self._computed_plan = self._group.plan()
flag_plan = self._group.go(wait=True)
list_joint_values = self._group.get_current_joint_values()
# rospy.loginfo('\033[94m' + ">>> Final Joint Values:" + '\033[0m')
# rospy.loginfo(list_joint_values)
pose_values = self._group.get_current_pose().pose
# rospy.loginfo('\033[94m' + ">>> Final Pose:" + '\033[0m')
# rospy.loginfo(pose_values)
if (flag_plan == True):
pass
# rospy.loginfo(
# '\033[94m' + ">>> set_joint_angles() Success" + '\033[0m')
else:
pass
# rospy.logerr(
# '\033[94m' + ">>> set_joint_angles() Failed." + '\033[0m')
return flag_plan
def hard_set_joint_angles(self, arg_list_joint_angles, arg_max_attempts):
number_attempts = 0
flag_success = False
while ( (number_attempts <= arg_max_attempts) and (flag_success is False) ):
number_attempts += 1
flag_success = self.set_joint_angles(arg_list_joint_angles)
rospy.logwarn("attempts: {}".format(number_attempts) )
# self.clear_octomap()
def moveit_play_planned_path_from_file(self, arg_file_path, arg_file_name):
file_path = arg_file_path + arg_file_name
with open(file_path, 'r') as file_open:
loaded_plan = yaml.load(file_open)
ret = self._group.execute(loaded_plan)
# rospy.logerr(ret)
return ret
def moveit_hard_play_planned_path_from_file(self, arg_file_path, arg_file_name, arg_max_attempts):
number_attempts = 0
flag_success = False
while ( (number_attempts <= arg_max_attempts) and (flag_success is False) ):
number_attempts += 1
flag_success = self.moveit_play_planned_path_from_file(arg_file_path, arg_file_name)
rospy.logwarn("attempts: {}".format(number_attempts) )
# # self.clear_octomap()
return True
# Destructor
def __del__(self):
moveit_commander.roscpp_shutdown()
rospy.loginfo(
'\033[94m' + "Object of class Ur5Moveit Deleted." + '\033[0m')
def main():
ur5 = Ur5Moveit(sys.argv[1])
while not rospy.is_shutdown():
rospy.logwarn("1. Playing AllZeros to Pose#1 Trajectory File")
ur5.moveit_hard_play_planned_path_from_file(ur5._file_path, 'zero_to_pose1.yaml', 5)
rospy.logwarn("2. Playing Pose#1 to Pose#2 Trajectory File")
ur5.moveit_hard_play_planned_path_from_file(ur5._file_path, 'pose1_to_pose2.yaml', 5)
rospy.logwarn("3. Playing Pose#2 to Pose#3 Trajectory File")
ur5.moveit_hard_play_planned_path_from_file(ur5._file_path, 'pose2_to_pose3.yaml', 5)
rospy.logwarn("4. Playing Pose#3 to AllZeros Trajectory File")
ur5.moveit_hard_play_planned_path_from_file(ur5._file_path, 'pose3_to_zero.yaml', 5)
del ur5
if __name__ == '__main__':
main()
|
[
"tejasphutane@gmail.com"
] |
tejasphutane@gmail.com
|
adf56f7b8eca22fc8ae2a9b79686086c8ae581f2
|
50bee36bef24c0ce4d866195acdbeb62edf13495
|
/chemprop/nn_utils.py
|
d701848b1016ba5d5c141573ef6522f83926cc32
|
[
"MIT"
] |
permissive
|
dmis-lab/PerceiverCPI
|
8419a45680fe7d4b3477c1b02696982e6f09492f
|
b73f9f0116fd5cab71cca91263fffee0b9d8f75e
|
refs/heads/main
| 2023-05-23T23:33:53.681441
| 2023-04-10T06:48:31
| 2023-04-10T06:48:31
| 477,911,910
| 29
| 3
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 8,606
|
py
|
import math
from typing import List, Union
import numpy as np
import torch
import torch.nn as nn
from torch.optim import Optimizer
from torch.optim.lr_scheduler import _LRScheduler
from tqdm import tqdm
from chemprop.data import MoleculeDataLoader, MoleculeDataset
def compute_pnorm(model: nn.Module) -> float:
"""
Computes the norm of the parameters of a model.
:param model: A PyTorch model.
:return: The norm of the parameters of the model.
"""
return math.sqrt(sum([p.norm().item() ** 2 for p in model.parameters()]))
def compute_gnorm(model: nn.Module) -> float:
"""
Computes the norm of the gradients of a model.
:param model: A PyTorch model.
:return: The norm of the gradients of the model.
"""
return math.sqrt(sum([p.grad.norm().item() ** 2 for p in model.parameters() if p.grad is not None]))
def param_count(model: nn.Module) -> int:
"""
Determines number of trainable parameters.
:param model: An PyTorch model.
:return: The number of trainable parameters in the model.
"""
return sum(param.numel() for param in model.parameters() if param.requires_grad)
def param_count_all(model: nn.Module) -> int:
"""
Determines number of trainable parameters.
:param model: An PyTorch model.
:return: The number of trainable parameters in the model.
"""
return sum(param.numel() for param in model.parameters())
def index_select_ND(source: torch.Tensor, index: torch.Tensor) -> torch.Tensor:
"""
Selects the message features from source corresponding to the atom or bond indices in :code:`index`.
:param source: A tensor of shape :code:`(num_bonds, hidden_size)` containing message features.
:param index: A tensor of shape :code:`(num_atoms/num_bonds, max_num_bonds)` containing the atom or bond
indices to select from :code:`source`.
:return: A tensor of shape :code:`(num_atoms/num_bonds, max_num_bonds, hidden_size)` containing the message
features corresponding to the atoms/bonds specified in index.
"""
index_size = index.size() # (num_atoms/num_bonds, max_num_bonds)
suffix_dim = source.size()[1:] # (hidden_size,)
final_size = index_size + suffix_dim # (num_atoms/num_bonds, max_num_bonds, hidden_size)
target = source.index_select(dim=0, index=index.view(-1)) # (num_atoms/num_bonds * max_num_bonds, hidden_size)
target = target.view(final_size) # (num_atoms/num_bonds, max_num_bonds, hidden_size)
return target
def get_activation_function(activation: str) -> nn.Module:
"""
Gets an activation function module given the name of the activation.
Supports:
* :code:`ReLU`
* :code:`LeakyReLU`
* :code:`PReLU`
* :code:`tanh`
* :code:`SELU`
* :code:`ELU`
:param activation: The name of the activation function.
:return: The activation function module.
"""
if activation == 'ReLU':
return nn.ReLU()
elif activation == 'LeakyReLU':
return nn.LeakyReLU(0.1)
elif activation == 'PReLU':
return nn.PReLU()
elif activation == 'tanh':
return nn.Tanh()
elif activation == 'SELU':
return nn.SELU()
elif activation == 'ELU':
return nn.ELU()
else:
raise ValueError(f'Activation "{activation}" not supported.')
def initialize_weights(model: nn.Module) -> None:
"""
Initializes the weights of a model in place.
:param model: An PyTorch model.
"""
for param in model.parameters():
if param.dim() == 1:
nn.init.constant_(param, 0)
else:
nn.init.xavier_normal_(param)
def compute_molecule_vectors(model: nn.Module,
data: MoleculeDataset,
batch_size: int,
num_workers: int = 8) -> List[np.ndarray]:
"""
Computes the molecule vectors output from the last layer of a :class:`~chemprop.models.MoleculeModel`.
:param model: A :class:`~chemprop.models.MoleculeModel`.
:param data: A :class:`~chemprop.data.MoleculeDataset`.
:param batch_size: Batch size.
:param num_workers: Number of parallel data loading workers.
:return: A list of 1D numpy arrays of length hidden_size containing
the molecule vectors generated by the model for each molecule provided.
"""
training = model.training
model.eval()
data_loader = MoleculeDataLoader(
dataset=data,
batch_size=batch_size,
num_workers=num_workers
)
vecs = []
for batch in tqdm(data_loader, total=len(data_loader)):
# Apply model to batch
with torch.no_grad():
batch_vecs = model.featurize(batch.batch_graph(), batch.features())
# Collect vectors
vecs.extend(batch_vecs.data.cpu().numpy())
if training:
model.train()
return vecs
class NoamLR(_LRScheduler):
"""
Noam learning rate scheduler with piecewise linear increase and exponential decay.
The learning rate increases linearly from init_lr to max_lr over the course of
the first warmup_steps (where :code:`warmup_steps = warmup_epochs * steps_per_epoch`).
Then the learning rate decreases exponentially from :code:`max_lr` to :code:`final_lr` over the
course of the remaining :code:`total_steps - warmup_steps` (where :code:`total_steps =
total_epochs * steps_per_epoch`). This is roughly based on the learning rate
schedule from `Attention is All You Need <https://arxiv.org/abs/1706.03762>`_, section 5.3.
"""
def __init__(self,
optimizer: Optimizer,
warmup_epochs: List[Union[float, int]],
total_epochs: List[int],
steps_per_epoch: int,
init_lr: List[float],
max_lr: List[float],
final_lr: List[float]):
"""
:param optimizer: A PyTorch optimizer.
:param warmup_epochs: The number of epochs during which to linearly increase the learning rate.
:param total_epochs: The total number of epochs.
:param steps_per_epoch: The number of steps (batches) per epoch.
:param init_lr: The initial learning rate.
:param max_lr: The maximum learning rate (achieved after :code:`warmup_epochs`).
:param final_lr: The final learning rate (achieved after :code:`total_epochs`).
"""
assert len(optimizer.param_groups) == len(warmup_epochs) == len(total_epochs) == len(init_lr) == \
len(max_lr) == len(final_lr)
self.num_lrs = len(optimizer.param_groups)
self.optimizer = optimizer
self.warmup_epochs = np.array(warmup_epochs)
self.total_epochs = np.array(total_epochs)
self.steps_per_epoch = steps_per_epoch
self.init_lr = np.array(init_lr)
self.max_lr = np.array(max_lr)
self.final_lr = np.array(final_lr)
self.current_step = 0
self.lr = init_lr
self.warmup_steps = (self.warmup_epochs * self.steps_per_epoch).astype(int)
self.total_steps = self.total_epochs * self.steps_per_epoch
self.linear_increment = (self.max_lr - self.init_lr) / self.warmup_steps
self.exponential_gamma = (self.final_lr / self.max_lr) ** (1 / (self.total_steps - self.warmup_steps))
super(NoamLR, self).__init__(optimizer)
def get_lr(self) -> List[float]:
"""
Gets a list of the current learning rates.
:return: A list of the current learning rates.
"""
return list(self.lr)
def step(self, current_step: int = None):
"""
Updates the learning rate by taking a step.
:param current_step: Optionally specify what step to set the learning rate to.
If None, :code:`current_step = self.current_step + 1`.
"""
if current_step is not None:
self.current_step = current_step
else:
self.current_step += 1
for i in range(self.num_lrs):
if self.current_step <= self.warmup_steps[i]:
self.lr[i] = self.init_lr[i] + self.current_step * self.linear_increment[i]
elif self.current_step <= self.total_steps[i]:
self.lr[i] = self.max_lr[i] * (self.exponential_gamma[i] ** (self.current_step - self.warmup_steps[i]))
else: # theoretically this case should never be reached since training should stop at total_steps
self.lr[i] = self.final_lr[i]
self.optimizer.param_groups[i]['lr'] = self.lr[i]
|
[
"noreply@github.com"
] |
dmis-lab.noreply@github.com
|
3ad7919837af743ea3c3f20f94b100470c79f92f
|
602cf847d868912cac9638daacab686d765e2a2d
|
/magedu/week02/job/num2.py
|
cd9eaec7f59975799988b4f0acdaa894fff46bf2
|
[] |
no_license
|
jiepy/byte
|
1a8096ccbcd39bc5bd90d37adae5caffcb59155d
|
e5cee9337c8be52fe9cee928f95a0931c18f0f5a
|
refs/heads/master
| 2021-01-21T13:56:38.548960
| 2016-05-28T15:12:00
| 2016-05-28T15:12:00
| 52,060,351
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 203
|
py
|
num = 58
lst = list(str(num))
while True:
if len(lst) >= 2:
num = 0
for x in lst:
num += int(x)
lst = list(str(num))
else:
print(lst)
break
|
[
"gengjie@outlook.com"
] |
gengjie@outlook.com
|
ac0267c670116e744e862d36c58a0b3758317289
|
8f24edb735e29028f6625b8ea587cdc47ac33a8e
|
/tests/resources.py
|
28c2e90fcf107eb624c9fe0cfb24a195d60cc54a
|
[
"BSD-2-Clause"
] |
permissive
|
philhodge/stistools
|
c28fd58a8cc69810c85d9b0c3e101f06abcdef0c
|
0ec0d56c6e4b8dc30ea2aa4493970fd7dc34fca7
|
refs/heads/master
| 2020-08-28T02:55:21.439731
| 2019-04-03T20:18:18
| 2019-04-03T20:18:18
| 217,567,690
| 0
| 1
|
NOASSERTION
| 2019-11-01T16:24:05
| 2019-10-25T15:53:19
| null |
UTF-8
|
Python
| false
| false
| 12,950
|
py
|
"""HSTCAL regression test helpers."""
from astropy.extern.six.moves import urllib
import getpass
import os
import sys
import math
from io import StringIO
import shutil
import datetime
from os.path import splitext
from difflib import unified_diff
import pytest
import requests
from astropy.io import fits
from astropy.io.fits import FITSDiff
from astropy.table import Table
from astropy.utils.data import conf
from .helpers.mark import require_bigdata
from .helpers.io import get_bigdata, upload_results
__all__ = ['download_crds',
'ref_from_image', 'raw_from_asn', 'BaseACS',
'BaseSTIS', 'BaseWFC3IR', 'BaseWFC3UVIS', 'BaseWFPC2']
def _download_file(url, filename, filemode='wb', timeout=None):
"""Generic remote data download."""
if url.startswith('http'):
r = requests.get(url, timeout=timeout)
with open(filename, filemode) as fout:
fout.write(r.content)
elif url.startswith('ftp'): # TODO: Support filemode and timeout.
urllib.request.urlretrieve(url, filename=filename)
else: # pragma: no cover
raise ValueError('Unsupported protocol for {}'.format(url))
def download_crds(refdir, refname, timeout=None):
"""Download a CRDS file from HTTP or FTP to current directory."""
# CRDS file for given name never changes, so no need to re-download.
if os.path.exists(refname):
return
try:
url = 'http://ssb.stsci.edu/cdbs/{}/{}'.format(refdir, refname)
local_file = os.path.abspath(refname)
print("Downloading CRDS file: {}".format(local_file))
_download_file(url, refname, timeout=timeout)
except Exception: # Fall back to FTP
url = 'ftp://ftp.stsci.edu/cdbs/{}/{}'.format(refdir, refname)
_download_file(url, refname, timeout=timeout)
def _get_reffile(hdr, key):
"""Get ref file from given key in given FITS header."""
ref_file = None
if key in hdr: # Keyword might not exist
ref_file = hdr[key].strip()
if ref_file.upper() == 'N/A': # Not all ref file is defined
ref_file = None
return ref_file
def ref_from_image(input_image):
"""
Return a list of reference filenames, as defined in the primary
header of the given input image, necessary for calibration; i.e.,
only those associated with ``*CORR`` set to ``PERFORM`` will be
considered.
"""
# NOTE: Add additional mapping as needed.
# Map mandatory CRDS reference file for instrument/detector combo.
reffile_lookup = ['BPIXTAB', 'DARKFILE', 'PFLTFILE', 'LFLTFILE', 'PHOTTAB',
'IMPHTTAB', 'APERTAB', 'CCDTAB', 'BIASFILE', 'CRREJTAB',
'IDCTAB', 'TDSTAB', 'SPTRCTAB', 'SDCTAB', 'PHOTTAB',
'PCTAB', 'TDCTAB', 'MLINTAB', 'GACTAB', 'WCPTAB',
'LAMPTAB', 'APDESTAB', 'XTRACTAB', 'DISPTAB', 'INANGTAB',
'CDSTAB', 'ECHSCTAB', 'EXSTAB', 'HALOTAB', 'TELTAB',
'RIPTAB', 'SRWTAB']
ref_files = []
hdr = fits.getheader(input_image, ext=0)
for reffile in reffile_lookup:
s = _get_reffile(hdr, reffile)
if s is not None:
ref_files.append(s)
return ref_files
def raw_from_asn(asn_file, suffix='_raw.fits'):
"""Return a list of RAW input files in a given ASN."""
raw_files = []
tab = Table.read(asn_file, format='fits')
for row in tab:
if row['MEMTYPE'].startswith('PROD'):
continue
pfx = row['MEMNAME'].lower().strip().replace('\x00', '')
raw_files.append(pfx + suffix)
return raw_files
# Base classes for actual tests.
# NOTE: Named in a way so pytest will not pick them up here.
# @pytest.mark.require_bigdata
class BaseCal(object):
prevdir = os.getcwd()
use_ftp_crds = True
timeout = 30 # seconds
tree = ''
results_root = 'datb-stistools/results'
# Numpy default for allclose comparison
rtol = 5e-7
atol = 0
# To be defined by instrument
refstr = ''
prevref = ''
input_loc = ''
ref_loc = ''
ignore_keywords = []
# To be defined by individual test
subdir = ''
@pytest.fixture(autouse=True)
def setup_class(self, tmpdir, envopt):
"""
Run test in own dir so we can keep results separate from
other tests.
"""
if not tmpdir.ensure(self.subdir, dir=True):
p = tmpdir.mkdir(self.subdir).strpath
else:
p = tmpdir.join(self.subdir).strpath
os.chdir(p)
# NOTE: This could be explicitly controlled using pytest fixture
# but too many ways to do the same thing would be confusing.
# Refine this logic if using pytest fixture.
# HSTCAL cannot open remote CRDS on FTP but central storage is okay.
# So use central storage if available to avoid FTP.
if self.prevref is None or self.prevref.startswith(('ftp', 'http')):
os.environ[self.refstr] = p + os.sep
self.use_ftp_crds = True
# Turn off Astrometry updates
os.environ['ASTROMETRY_STEP_CONTROL'] = 'OFF'
# This controls astropy.io.fits timeout
conf.remote_timeout = self.timeout
# Update tree to point to correct environment
self.tree = envopt
def teardown_class(self):
"""Reset path and variables."""
conf.reset('remote_timeout')
os.chdir(self.prevdir)
if self.use_ftp_crds and self.prevref is not None:
os.environ[self.refstr] = self.prevref
def get_data(self, *args):
"""
Download `filename` into working directory using
`helpers/io/get_bigdata`. This will then return the full path to
the local copy of the file.
"""
local_file = get_bigdata(self.tree, self.input_loc, *args)
return local_file
def get_input_file(self, *args, refsep='$'):
"""
Download or copy input file (e.g., RAW) into the working directory.
The associated CRDS reference files in ``refstr`` are also
downloaded, if necessary.
"""
filename = self.get_data(*args)
print(filename)
ref_files = ref_from_image(filename)
print("Looking for REF_FILES: {}".format(ref_files))
for ref_file in ref_files:
if ref_file.strip() == '':
continue
if refsep not in ref_file: # Local file
refname = self.get_data('customRef', ref_file)
else: # Download from FTP, if applicable
s = ref_file.split(refsep)
refdir = s[0]
refname = s[1]
if self.use_ftp_crds:
download_crds(refdir, refname, timeout=self.timeout)
return filename
def compare_outputs(self, outputs, raise_error=True, delete_history=False):
"""
Compare output with "truth" using appropriate
diff routine; namely,
``fitsdiff`` for FITS file comparisons
``unified_diff`` for ASCII products.
Parameters
----------
outputs : list of tuple
A list of tuples, each containing filename (without path)
of CALXXX output and truth, in that order.
raise_error : bool
Raise ``AssertionError`` if difference is found.
Returns
-------
report : str
Report from ``fitsdiff``.
This is part of error message if ``raise_error=True``.
"""
all_okay = True
creature_report = ''
# Create instructions for uploading results to artifactory for use
# as new comparison/truth files
testpath, testname = os.path.split(os.path.abspath(os.curdir))
# organize results by day test was run...could replace with git-hash
whoami = getpass.getuser() or 'nobody'
dt = datetime.datetime.now().strftime("%d%b%YT")
ttime = datetime.datetime.now().strftime("%H_%M_%S")
user_tag = 'NOT_CI_{}_{}'.format(whoami, ttime)
build_tag = os.environ.get('BUILD_TAG', user_tag)
build_suffix = os.environ.get('BUILD_MATRIX_SUFFIX', 'standalone')
testdir = "{}_{}_{}".format(testname, build_tag, build_suffix)
tree = os.path.join(self.results_root, self.input_loc,
dt, testdir) + os.sep
updated_outputs = []
for actual, desired in outputs:
# Get "truth" image
s = self.get_data('truth', desired)
if s is not None:
desired = s
if actual.endswith('fits'):
# Working with FITS files...
if delete_history is True:
actual = fits.open(actual)
desired = fits.open(desired)
if 'HISTORY' in actual[0].header:
del actual[0].header['HISTORY']
if 'HISTORY' in desired[0].header:
del desired[0].header['HISTORY']
fdiff = FITSDiff(actual, desired, rtol=self.rtol,
atol=self.atol,
ignore_keywords=self.ignore_keywords)
if delete_history is True:
actual.close()
desired.close()
creature_report += fdiff.report()
if not fdiff.identical:
# Only keep track of failed results which need to
# be used to replace the truth files (if OK).
updated_outputs.append((actual, desired))
if not fdiff.identical and all_okay:
all_okay = False
else:
# Try ASCII-based diff
with open(actual) as afile:
actual_lines = afile.readlines()
with open(desired) as dfile:
desired_lines = dfile.readlines()
udiff = unified_diff(actual_lines, desired_lines,
fromfile=actual, tofile=desired)
old_stdout = sys.stdout
udiffIO = StringIO()
sys.stdout = udiffIO
sys.stdout.writelines(udiff)
sys.stdout = old_stdout
udiff_report = udiffIO.getvalue()
creature_report += udiff_report
if len(udiff_report) > 2 and all_okay:
all_okay = False
if len(udiff_report) > 2:
# Only keep track of failed results which need to
# be used to replace the truth files (if OK).
updated_outputs.append((actual, desired))
if not all_okay:
# Write out JSON file to enable retention of different results
new_truths = [os.path.abspath(i[1]) for i in updated_outputs]
for files in updated_outputs:
print("Renaming {} as new 'truth' file: {}".format(
files[0], files[1]))
shutil.move(files[0], files[1])
log_pattern = [os.path.join(os.path.dirname(x), '*.log')
for x in new_truths]
upload_results(pattern=new_truths + log_pattern,
testname=testname,
target=tree)
if not all_okay and raise_error:
raise AssertionError(os.linesep + creature_report)
return creature_report
class BaseSTIS(BaseCal):
refstr = 'oref'
prevref = os.environ.get(refstr)
input_loc = ''
ref_loc = '/ref'
ignore_keywords = ['date', 'filename', 'iraf-tlm', 'fitsdate', 'history']
#''cal_ver']
def read_image(self, filename):
"""
Read the image from a fits file
"""
hdu = fits.open(filename)
image = hdu[1].data
hdu.close()
return image
def add_suffix(fname, suffix, range=None):
"""Add suffix to file name
Parameters
----------
fname: str
The file name to add the suffix to
suffix: str
The suffix to add_suffix
range: range
If specified, the set of indexes will be added to the
outputs.
Returns
-------
fname, fname_with_suffix
2-tuple of the original file name and name with suffix.
If `range` is defined, `fname_with_suffix` will be a list.
"""
fname_root, fname_ext = splitext(fname)
if range is None:
with_suffix = ''.join([
fname_root,
'_',
suffix,
fname_ext
])
else:
with_suffix = []
for idx in range:
with_suffix.append(''.join([
fname_root,
'_',
str(idx),
'_',
suffix,
fname_ext
]))
return fname, with_suffix
|
[
"ogaz@stsci.edu"
] |
ogaz@stsci.edu
|
cecd25afa69432766e8904b3989b94b251dec64b
|
08e3e50ba9c2c856fd90f6822ad7d785332126c2
|
/mymodule_demo2.py
|
125c606d17056b0e3e19b460a21d4e04213bebc8
|
[] |
no_license
|
mujker/PythonLearning
|
38cc11f49af1fbe69e28e792515d37105f8cb8c6
|
23db0061f8088e7ef44c9bf32f14f5bdb5482062
|
refs/heads/master
| 2021-01-19T14:45:16.628691
| 2017-08-22T02:35:05
| 2017-08-22T02:35:05
| 100,918,775
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 238
|
py
|
from mymodule import say_hi, __version__
# from mymodule import *
# 这将导入诸如 say_hi 等所有公共名称,但不会导入 __version__ 名称,因为后者以双下划线开头。
say_hi()
print('Version : ', __version__)
|
[
"mujker@163.com"
] |
mujker@163.com
|
2ec576a1b4171a171b0352d59eb63b30adba236e
|
9effef387b551c1ed86233182065d820a71c1f92
|
/TonguePlusData/PaperExp_Part1_Backbone_Exp4_InceptionV3/PaperExp_Part1_Backbone_Exp4_InceptionV3_Train.py
|
80ed88f921a7833f749d5d5b3d1843d8639ec291
|
[] |
no_license
|
tbe07tyg/MyPolyTongue
|
4df2a7e06439da23d19626cbcfd59be9f3b31a3a
|
8796a8a88c6ea9e0d656fbe959991f4548ab6595
|
refs/heads/master
| 2023-01-06T03:27:04.471478
| 2020-10-26T13:03:51
| 2020-10-26T13:03:51
| 286,447,117
| 2
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 79,145
|
py
|
#that is fork from https://github.com/qqwweee/keras-yolo3
#the modifications are as follows:
# - backbone uses squeeze-and-excitation blocks and has fewer parameters
# - the neck and head is new, it has single output scale
# - it is extended by the bounding polygon functionality
from datetime import datetime
import colorsys
import os
import sys
from functools import reduce
from functools import wraps
import math
import random as rd
import cv2 as cv
import tensorflow.keras.backend as K
import numpy as np
import tensorflow as tf
from PIL import Image
from tensorflow.keras.callbacks import TensorBoard, ModelCheckpoint, ReduceLROnPlateau, EarlyStopping, Callback
from tensorflow.keras.layers import Layer
from tensorflow.keras.layers import Conv2D, Add, ZeroPadding2D, UpSampling2D, Concatenate
from tensorflow.keras.layers import Input, GlobalAveragePooling2D, Reshape, Dense, Permute, multiply, Activation, add, Lambda, concatenate, MaxPooling2D
from tensorflow.keras.layers import Input, Lambda
from tensorflow.keras.layers import LeakyReLU
from tensorflow.keras.layers import BatchNormalization
from tensorflow.keras.models import Model
from tensorflow.keras.models import load_model
from tensorflow.keras.optimizers import Adadelta, Adagrad
from tensorflow.keras.regularizers import l2
from tensorflow.keras.utils import multi_gpu_model
from matplotlib.colors import rgb_to_hsv, hsv_to_rgb
from tensorflow.keras.utils import plot_model
from TonguePlusData.MyCustomCallbacks import TrainingPlotCallback, DeleteEarlySavedH5models
# os.environ["PATH"] += os.pathsep + 'C:\\Program Files (x86)\\Graphviz2.38\\bin'
from tensorflow.python.keras.utils.data_utils import Sequence, get_file
from keras_preprocessing.image import ImageDataGenerator, array_to_img, img_to_array, load_img
import random
import pandas as pd
import numpy as np
from glob import glob
from tensorflow.keras.preprocessing import image as krs_image
import cv2
from tensorflow.keras.applications.inception_v3 import InceptionV3
np.set_printoptions(precision=3, suppress=True)
MAX_VERTICES = 1000 #that allows the labels to have 1000 vertices per polygon at max. They are reduced for training
ANGLE_STEP = 17 #that means Poly-YOLO will detect 360/15=24 vertices per polygon at max
NUM_ANGLES3 = int(360 // ANGLE_STEP * 3) #72 = (360/15)*3
print("NUM_ANGLES3:", NUM_ANGLES3)
NUM_ANGLES = int(360 // ANGLE_STEP) # 24
# for mydatagenerator aug
rotation_range = 90
width_shift_range = 0.3
height_shift_range = 0.3
zoom_range = 0.2
shear_range=0.35
horizontal_flip=True
brightness_range=[0.5, 1.3]
grid_size_multiplier = 4 #that is resolution of the output scale compared with input. So it is 1/4
anchor_mask = [[0,1,2,3,4,5,6,7,8], [0,1,2,3,4,5,6,7,8], [0,1,2,3,4,5,6,7,8]] #that should be optimized
anchors_per_level = 9 #single scale and nine anchors
# for running the script
model_index = sys.argv[1]
# def mish(x):
# return x * tf.math.tanh(tf.math.softplus(x))
class Mish(Layer):
'''
Mish Activation Function.
.. math::
mish(x) = x * tanh(softplus(x)) = x * tanh(ln(1 + e^{x}))
Shape:
- Input: Arbitrary. Use the keyword argument `input_shape`
(tuple of integers, does not include the samples axis)
when using this layer as the first layer in a model.
- Output: Same shape as the input.
Examples:
>>> X_input = Input(input_shape)
>>> X = Mish()(X_input)
'''
def __init__(self, **kwargs):
super(Mish, self).__init__(**kwargs)
self.supports_masking = True
def call(self, inputs):
return inputs * K.tanh(K.softplus(inputs))
def get_config(self):
config = super(Mish, self).get_config()
return config
def compute_output_shape(self, input_shape):
return input_shape
# class MyGenerator(Sequence):
# def __init__(self, annotation_lines, batch_size, input_shape, anchors, num_classes, is_random) :
# self.annotation_lines = annotation_lines
# self.batch_size = batch_size
# self.input_shape = input_shape
# self.anchors = anchors
# self.num_classes = num_classes
# self.is_random = is_random
#
#
# def __len__(self) :
# return (np.ceil(len(self.annotation_lines) / float(self.batch_size))).astype(np.int)
#
#
# def __getitem__(self, idx) :
# return self.data_gen()
#
# def data_gen(self):
# """data generator for fit_generator"""
# n = len(self.annotation_lines)
# i = 0
# while True:
# image_data = []
# box_data = []
# for b in range(self.batch_size):
# if i == 0:
# np.random.shuffle(self.annotation_lines)
# image, box = self.get_random_data(self.annotation_lines[i], self.input_shape, random=self.is_random)
# image_data.append(image)
# box_data.append(box)
# i = (i + 1) % n
# image_data = np.array(image_data)
# # print("image_data:", image_data.shape)
# box_data = np.array(box_data)
# y_true = preprocess_true_boxes(box_data, self.input_shape, self.anchors, self.num_classes)
# return [image_data, *y_true], np.zeros(self.batch_size)
#
# def get_random_data(self, line, input_shape, random=True, max_boxes=80, hue_alter=20, sat_alter=30, val_alter=30,
# proc_img=True):
# # load data
# # the color conversion is later. it is not necessary to realize bgr->rgb->hsv->rgb
# # print("get_random_data line[0]:", line[0])
# # print(os.getcwd())
#
# image = cv.imread(line[0])
# # print("get_random_data image:", image)
#
# iw = image.shape[1]
# ih = image.shape[0]
# h, w = input_shape
# box = np.array([np.array(list(map(float, box.split(','))))
# for box in line[1:]])
# box_list = []
# for box in line[1:]:
# # print(box)
# box_list.append(box.split(','))
# print(box_list)
# if not random:
# # resize image
# scale = min(w / iw, h / ih)
# nw = int(iw * scale)
# nh = int(ih * scale)
# dx = (w - nw) // 2
# dy = (h - nh) // 2
# image_data = 0
# if proc_img:
# # image = image.resize((nw, nh), Image.BICUBIC)
# image = cv.cvtColor(
# cv.resize(image, (nw, nh), interpolation=cv.INTER_CUBIC), cv.COLOR_BGR2RGB)
# image = Image.fromarray(image)
# new_image = Image.new('RGB', (w, h), (128, 128, 128))
# new_image.paste(image, (dx, dy))
# image_data = np.array(new_image) / 255.
# # correct boxes
# box_data = np.zeros((max_boxes, 5 + NUM_ANGLES3))
# if len(box) > 0:
# np.random.shuffle(box)
# if len(box) > max_boxes:
# box = box[:max_boxes]
# box[:, [0, 2]] = box[:, [0, 2]] * scale + dx
# box[:, [1, 3]] = box[:, [1, 3]] * scale + dy
# box_data[:len(box), 0:5] = box[:, 0:5]
# for b in range(0, len(box)):
# for i in range(5, MAX_VERTICES * 2, 2):
# if box[b, i] == 0 and box[b, i + 1] == 0:
# continue
# box[b, i] = box[b, i] * scale + dx
# box[b, i + 1] = box[b, i + 1] * scale + dy
#
# # box_data[:, i:NUM_ANGLES3 + 5] = 0
#
# for i in range(0, len(box)):
# boxes_xy = (box[i, 0:2] + box[i, 2:4]) // 2
#
# for ver in range(5, MAX_VERTICES * 2, 2):
# if box[i, ver] == 0 and box[i, ver + 1] == 0:
# break
# dist_x = boxes_xy[0] - box[i, ver]
# dist_y = boxes_xy[1] - box[i, ver + 1]
# dist = np.sqrt(np.power(dist_x, 2) + np.power(dist_y, 2))
# if (dist < 1): dist = 1 # to avoid inf or nan in log in loss
#
# angle = np.degrees(np.arctan2(dist_y, dist_x))
# if (angle < 0): angle += 360
# iangle = int(angle) // ANGLE_STEP
# relative_angle = (angle - (iangle * int(ANGLE_STEP))) / ANGLE_STEP
#
# if dist > box_data[
# i, 5 + iangle * 3]: # check for vertex existence. only the most distant is taken
# box_data[i, 5 + iangle * 3] = dist
# box_data[i, 5 + iangle * 3 + 1] = relative_angle
# box_data[
# i, 5 + iangle * 3 + 2] = 1 # problbility mask to be 1 for the exsitance of the vertex otherwise =0
# return image_data, box_data
#
# # resize image
# random_scale = rd.uniform(.6, 1.4)
# scale = min(w / iw, h / ih)
# nw = int(iw * scale * random_scale)
# nh = int(ih * scale * random_scale)
#
# # force nw a nh to be an even
# if (nw % 2) == 1:
# nw = nw + 1
# if (nh % 2) == 1:
# nh = nh + 1
#
# # jitter for slight distort of aspect ratio
# if np.random.rand() < 0.3:
# if np.random.rand() < 0.5:
# nw = int(nw * rd.uniform(.8, 1.0))
# else:
# nh = int(nh * rd.uniform(.8, 1.0))
#
# image = cv.resize(image, (nw, nh), interpolation=cv.INTER_CUBIC)
# nwiw = nw / iw
# nhih = nh / ih
#
# # clahe. applied on resized image to save time. but before placing to avoid
# # the influence of homogenous background
# clahe = cv.createCLAHE(clipLimit=2, tileGridSize=(8, 8))
# lab = cv.cvtColor(image, cv.COLOR_BGR2LAB)
# l, a, b = cv.split(lab)
# cl = clahe.apply(l)
# limg = cv.merge((cl, a, b))
# image = cv.cvtColor(limg, cv.COLOR_LAB2BGR)
#
# # place image
# dx = rd.randint(0, max(w - nw, 0))
# dy = rd.randint(0, max(h - nh, 0))
#
# new_image = np.full((h, w, 3), 128, dtype='uint8')
# new_image, crop_coords, new_img_coords = random_crop(
# image, new_image)
#
# # flip image or not
# flip = rd.random() < .5
# if flip:
# new_image = cv.flip(new_image, 1)
#
# # distort image
# hsv = np.int32(cv.cvtColor(new_image, cv.COLOR_BGR2HSV))
#
# # linear hsv distortion
# hsv[..., 0] += rd.randint(-hue_alter, hue_alter)
# hsv[..., 1] += rd.randint(-sat_alter, sat_alter)
# hsv[..., 2] += rd.randint(-val_alter, val_alter)
#
# # additional non-linear distortion of saturation and value
# if np.random.rand() < 0.5:
# hsv[..., 1] = hsv[..., 1] * rd.uniform(.7, 1.3)
# hsv[..., 2] = hsv[..., 2] * rd.uniform(.7, 1.3)
#
# hsv[..., 0][hsv[..., 0] > 179] = 179
# hsv[..., 0][hsv[..., 0] < 0] = 0
# hsv[..., 1][hsv[..., 1] > 255] = 255
# hsv[..., 1][hsv[..., 1] < 0] = 0
# hsv[..., 2][hsv[..., 2] > 255] = 255
# hsv[..., 2][hsv[..., 2] < 0] = 0
#
# image_data = cv.cvtColor(
# np.uint8(hsv), cv.COLOR_HSV2RGB).astype('float32') / 255.0
#
# # add noise
# if np.random.rand() < 0.15:
# image_data = np.clip(image_data + np.random.rand() *
# image_data.std() * np.random.random(image_data.shape), 0, 1)
#
# # correct boxes
# box_data = np.zeros((max_boxes, 5 + NUM_ANGLES3))
#
# if len(box) > 0:
# np.random.shuffle(box)
# # rescaling separately because 5-th element is class
# box[:, [0, 2]] = box[:, [0, 2]] * nwiw # for x
# # rescale polygon vertices
# box[:, 5::2] = box[:, 5::2] * nwiw
# # rescale polygon vertices
# box[:, [1, 3]] = box[:, [1, 3]] * nhih # for y
# box[:, 6::2] = box[:, 6::2] * nhih
#
# # # mask out boxes that lies outside of croping window ## new commit deleted
# # mask = (box[:, 1] >= crop_coords[0]) & (box[:, 3] < crop_coords[1]) & (
# # box[:, 0] >= crop_coords[2]) & (box[:, 2] < crop_coords[3])
# # box = box[mask]
#
# # transform boxes to new coordinate system w.r.t new_image
# box[:, :2] = box[:, :2] - [crop_coords[2], crop_coords[0]] + [new_img_coords[2], new_img_coords[0]]
# box[:, 2:4] = box[:, 2:4] - [crop_coords[2], crop_coords[0]] + [new_img_coords[2], new_img_coords[0]]
# if flip:
# box[:, [0, 2]] = (w - 1) - box[:, [2, 0]]
#
# box[:, 0:2][box[:, 0:2] < 0] = 0
# box[:, 2][box[:, 2] >= w] = w - 1
# box[:, 3][box[:, 3] >= h] = h - 1
# box_w = box[:, 2] - box[:, 0]
# box_h = box[:, 3] - box[:, 1]
# box = box[np.logical_and(box_w > 1, box_h > 1)] # discard invalid box
#
# if len(box) > max_boxes:
# box = box[:max_boxes]
#
# box_data[:len(box), 0:5] = box[:, 0:5]
#
# # -------------------------------start polygon vertices processing-------------------------------#
# for b in range(0, len(box)):
# boxes_xy = (box[b, 0:2] + box[b, 2:4]) // 2
# for i in range(5, MAX_VERTICES * 2, 2):
# if box[b, i] == 0 and box[b, i + 1] == 0:
# break
# box[b, i:i + 2] = box[b, i:i + 2] - [crop_coords[2], crop_coords[0]] + [new_img_coords[2],
# new_img_coords[0]] # transform
# if flip: box[b, i] = (w - 1) - box[b, i]
# dist_x = boxes_xy[0] - box[b, i]
# dist_y = boxes_xy[1] - box[b, i + 1]
# dist = np.sqrt(np.power(dist_x, 2) + np.power(dist_y, 2))
# if (dist < 1): dist = 1
#
# angle = np.degrees(np.arctan2(dist_y, dist_x))
# if (angle < 0): angle += 360
# # num of section it belongs to
# iangle = int(angle) // ANGLE_STEP
#
# if iangle >= NUM_ANGLES: iangle = NUM_ANGLES - 1
#
# if dist > box_data[b, 5 + iangle * 3]: # check for vertex existence. only the most distant is taken
# box_data[b, 5 + iangle * 3] = dist
# box_data[b, 5 + iangle * 3 + 1] = (angle - (
# iangle * int(ANGLE_STEP))) / ANGLE_STEP # relative angle
# box_data[b, 5 + iangle * 3 + 2] = 1
# # ---------------------------------end polygon vertices processing-------------------------------#
# return image_data, box_data
#
# def preprocess_true_boxes(self, true_boxes, input_shape, anchors, num_classes):
# '''Preprocess true boxes to training input format
#
# Parameters
# ----------
# true_boxes: array, shape=(m, T, 5+69)
# Absolute x_min, y_min, x_max, y_max, class_id relative to input_shape
# input_shape: array-like, hw, multiples of 32
# anchors: array, shape=(N, 2), wh
# num_classes: integer
#
# Returns
# -------
# y_true: list of array, shape like yolo_outputs, xywh are reletive value
#
# '''
# assert (true_boxes[..., 4] < num_classes).all(), 'class id must be less than num_classes'
# true_boxes = np.array(true_boxes, dtype='float32')
# input_shape = np.array(input_shape, dtype='int32')
# boxes_xy = (true_boxes[..., 0:2] + true_boxes[..., 2:4]) // 2
# boxes_wh = true_boxes[..., 2:4] - true_boxes[..., 0:2]
#
# true_boxes[:, :, 5:NUM_ANGLES3 + 5:3] /= np.clip(
# np.expand_dims(np.sqrt(np.power(boxes_wh[:, :, 0], 2) + np.power(boxes_wh[:, :, 1], 2)), -1), 0.0001,
# 9999999)
# true_boxes[..., 0:2] = boxes_xy / input_shape[::-1]
# true_boxes[..., 2:4] = boxes_wh / input_shape[::-1]
#
# m = true_boxes.shape[0]
# grid_shapes = [input_shape // {0: grid_size_multiplier}[l] for l in range(1)]
# y_true = [
# np.zeros((m, grid_shapes[l][0], grid_shapes[l][1], len(anchor_mask[l]), 5 + num_classes + NUM_ANGLES3),
# dtype='float32') for l in range(1)]
#
# # Expand dim to apply broadcasting.
# anchors = np.expand_dims(anchors, 0)
# anchor_maxes = anchors / 2.
# anchor_mins = -anchor_maxes
# valid_mask = boxes_wh[..., 0] > 0
#
# for b in range(m):
# # Discard zero rows.
# wh = boxes_wh[b, valid_mask[b]]
# if len(wh) == 0: continue
# # Expand dim to apply broadcasting.
# wh = np.expand_dims(wh, -2)
# box_maxes = wh / 2.
# box_mins = -box_maxes
#
# intersect_mins = np.maximum(box_mins, anchor_mins)
# intersect_maxes = np.minimum(box_maxes, anchor_maxes)
# intersect_wh = np.maximum(intersect_maxes - intersect_mins, 0.)
# intersect_area = intersect_wh[..., 0] * intersect_wh[..., 1]
# box_area = wh[..., 0] * wh[..., 1]
# anchor_area = anchors[..., 0] * anchors[..., 1]
# iou = intersect_area / (box_area + anchor_area - intersect_area)
#
# # Find best anchor for each true box
# best_anchor = np.argmax(iou, axis=-1)
# for t, n in enumerate(best_anchor):
# l = 0
# if n in anchor_mask[l]:
# i = np.floor(true_boxes[b, t, 0] * grid_shapes[l][1]).astype('int32')
# j = np.floor(true_boxes[b, t, 1] * grid_shapes[l][0]).astype('int32')
# k = anchor_mask[l].index(n)
# c = true_boxes[b, t, 4].astype('int32')
#
# y_true[l][b, j, i, k, 0:4] = true_boxes[b, t, 0:4]
# y_true[l][b, j, i, k, 4] = 1
# y_true[l][b, j, i, k, 5 + c] = 1
# y_true[l][b, j, i, k, 5 + num_classes:5 + num_classes + NUM_ANGLES3] = true_boxes[b, t,
# 5: 5 + NUM_ANGLES3]
# return y_true
def compose(*funcs):
"""Compose arbitrarily many functions, evaluated left to right.
Reference: https://mathieularose.com/function-composition-in-python/
"""
# return lambda x: reduce(lambda v, f: f(v), funcs, x)
if funcs:
return reduce(lambda f, g: lambda *a, **kw: g(f(*a, **kw)), funcs)
else:
raise ValueError('Composition of empty sequence not supported.')
def letterbox_image(image, size):
'''resize image with unchanged aspect ratio using padding'''
iw = image.shape[1]
ih = image.shape[0]
w, h = size
scale = min(w / iw, h / ih)
nw = int(iw * scale)
nh = int(ih * scale)
cvi = cv.cvtColor(image, cv.COLOR_BGR2RGB)
cvi = cv.resize(cvi, (nw, nh), interpolation=cv.INTER_CUBIC)
dx = int((w - nw) // 2)
dy = int((h - nh) // 2)
new_image = np.zeros((h, w, 3), dtype='uint8')
new_image[...] = 128
if nw <= w and nh <= h:
new_image[dy:dy + nh, dx:dx + nw, :] = cvi
else:
new_image = cvi[-dy:-dy + h, -dx:-dx + w, :]
return new_image.astype('float32') / 255.0
def rand(a=0, b=1):
return np.random.rand() * (b - a) + a
# def get_random_data(line, input_shape, random=True, max_boxes=80, hue_alter=20, sat_alter=30, val_alter=30, proc_img=True):
# # load data
# # the color conversion is later. it is not necessary to realize bgr->rgb->hsv->rgb
# # print("get_random_data line[0]:", line[0])
# # print(os.getcwd())
#
# image = cv.imread(line[0])
# # print("get_random_data image:", image)
#
# iw = image.shape[1]
# ih = image.shape[0]
# h, w = input_shape
# box = np.array([np.array(list(map(float, box.split(','))))
# for box in line[1:]])
#
# if not random:
# # resize image
# scale = min(w / iw, h / ih)
# nw = int(iw * scale)
# nh = int(ih * scale)
# dx = (w - nw) // 2
# dy = (h - nh) // 2
# image_data = 0
# if proc_img:
# # image = image.resize((nw, nh), Image.BICUBIC)
# image = cv.cvtColor(
# cv.resize(image, (nw, nh), interpolation=cv.INTER_CUBIC), cv.COLOR_BGR2RGB)
# image = Image.fromarray(image)
# new_image = Image.new('RGB', (w, h), (128, 128, 128))
# new_image.paste(image, (dx, dy))
# image_data = np.array(new_image) / 255.
# # correct boxes
# box_data = np.zeros((max_boxes, 5 + NUM_ANGLES3))
# if len(box) > 0:
# np.random.shuffle(box)
# if len(box) > max_boxes:
# box = box[:max_boxes]
# box[:, [0, 2]] = box[:, [0, 2]] * scale + dx
# box[:, [1, 3]] = box[:, [1, 3]] * scale + dy
# box_data[:len(box), 0:5] = box[:, 0:5]
# for b in range(0, len(box)):
# for i in range(5, MAX_VERTICES * 2, 2):
# if box[b,i] == 0 and box[b, i + 1] == 0:
# continue
# box[b, i] = box[b, i] * scale + dx
# box[b, i + 1] = box[b, i + 1] * scale + dy
#
# box_data[:, i:NUM_ANGLES3 + 5] = 0
#
# for i in range(0, len(box)):
# boxes_xy = (box[i, 0:2] + box[i, 2:4]) // 2
#
# for ver in range(5, MAX_VERTICES * 2, 2):
# if box[i, ver] == 0 and box[i, ver + 1] == 0:
# break
# dist_x = boxes_xy[0] - box[i, ver]
# dist_y = boxes_xy[1] - box[i, ver + 1]
# dist = np.sqrt(np.power(dist_x, 2) + np.power(dist_y, 2))
# if (dist < 1): dist = 1 #to avoid inf or nan in log in loss
#
# angle = np.degrees(np.arctan2(dist_y, dist_x))
# if (angle < 0): angle += 360
# iangle = int(angle) // ANGLE_STEP
# relative_angle = (angle - (iangle * int(ANGLE_STEP))) / ANGLE_STEP
#
# if dist > box_data[i, 5 + iangle * 3]: # check for vertex existence. only the most distant is taken
# box_data[i, 5 + iangle * 3] = dist
# box_data[i, 5 + iangle * 3 + 1] = relative_angle
# box_data[i, 5 + iangle * 3 + 2] = 1 # problbility mask to be 1 for the exsitance of the vertex otherwise =0
# return image_data, box_data
#
#
# # resize image
# random_scale = rd.uniform(.6, 1.4)
# scale = min(w / iw, h / ih)
# nw = int(iw * scale * random_scale)
# nh = int(ih * scale * random_scale)
#
# # force nw a nh to be an even
# if (nw % 2) == 1:
# nw = nw + 1
# if (nh % 2) == 1:
# nh = nh + 1
#
# # jitter for slight distort of aspect ratio
# if np.random.rand() < 0.3:
# if np.random.rand() < 0.5:
# nw = int(nw*rd.uniform(.8, 1.0))
# else:
# nh = int(nh*rd.uniform(.8, 1.0))
#
# image = cv.resize(image, (nw, nh), interpolation=cv.INTER_CUBIC)
# nwiw = nw/iw
# nhih = nh/ih
#
# # clahe. applied on resized image to save time. but before placing to avoid
# # the influence of homogenous background
# clahe = cv.createCLAHE(clipLimit=2, tileGridSize=(8, 8))
# lab = cv.cvtColor(image, cv.COLOR_BGR2LAB)
# l, a, b = cv.split(lab)
# cl = clahe.apply(l)
# limg = cv.merge((cl, a, b))
# image = cv.cvtColor(limg, cv.COLOR_LAB2BGR)
#
# # place image
# dx = rd.randint(0, max(w - nw, 0))
# dy = rd.randint(0, max(h - nh, 0))
#
# new_image = np.full((h, w, 3), 128, dtype='uint8')
# new_image, crop_coords, new_img_coords = random_crop(
# image, new_image)
#
# # flip image or not
# flip = rd.random() < .5
# if flip:
# new_image = cv.flip(new_image, 1)
#
# # distort image
# hsv = np.int32(cv.cvtColor(new_image, cv.COLOR_BGR2HSV))
#
# # linear hsv distortion
# hsv[..., 0] += rd.randint(-hue_alter, hue_alter)
# hsv[..., 1] += rd.randint(-sat_alter, sat_alter)
# hsv[..., 2] += rd.randint(-val_alter, val_alter)
#
# # additional non-linear distortion of saturation and value
# if np.random.rand() < 0.5:
# hsv[..., 1] = hsv[..., 1]*rd.uniform(.7, 1.3)
# hsv[..., 2] = hsv[..., 2]*rd.uniform(.7, 1.3)
#
# hsv[..., 0][hsv[..., 0] > 179] = 179
# hsv[..., 0][hsv[..., 0] < 0] = 0
# hsv[..., 1][hsv[..., 1] > 255] = 255
# hsv[..., 1][hsv[..., 1] < 0] = 0
# hsv[..., 2][hsv[..., 2] > 255] = 255
# hsv[..., 2][hsv[..., 2] < 0] = 0
#
# image_data = cv.cvtColor(
# np.uint8(hsv), cv.COLOR_HSV2RGB).astype('float32') / 255.0
#
# # add noise
# if np.random.rand() < 0.15:
# image_data = np.clip(image_data + np.random.rand() *
# image_data.std() * np.random.random(image_data.shape), 0, 1)
#
# # correct boxes
# box_data = np.zeros((max_boxes, 5 + NUM_ANGLES3))
#
# if len(box) > 0:
# np.random.shuffle(box)
# # rescaling separately because 5-th element is class
# box[:, [0, 2]] = box[:, [0, 2]] * nwiw # for x
# # rescale polygon vertices
# box[:, 5::2] = box[:, 5::2] * nwiw
# # rescale polygon vertices
# box[:, [1, 3]] = box[:, [1, 3]] * nhih # for y
# box[:, 6::2] = box[:, 6::2] * nhih
#
# # # mask out boxes that lies outside of croping window ## new commit deleted
# # mask = (box[:, 1] >= crop_coords[0]) & (box[:, 3] < crop_coords[1]) & (
# # box[:, 0] >= crop_coords[2]) & (box[:, 2] < crop_coords[3])
# # box = box[mask]
#
# # transform boxes to new coordinate system w.r.t new_image
# box[:, :2] = box[:, :2] - [crop_coords[2], crop_coords[0]] + [new_img_coords[2], new_img_coords[0]]
# box[:, 2:4] = box[:, 2:4] - [crop_coords[2], crop_coords[0]] + [new_img_coords[2], new_img_coords[0]]
# if flip:
# box[:, [0, 2]] = (w-1) - box[:, [2, 0]]
#
# box[:, 0:2][box[:, 0:2] < 0] = 0
# box[:, 2][box[:, 2] >= w] = w-1
# box[:, 3][box[:, 3] >= h] = h-1
# box_w = box[:, 2] - box[:, 0]
# box_h = box[:, 3] - box[:, 1]
# box = box[np.logical_and(box_w > 1, box_h > 1)] # discard invalid box
#
# if len(box) > max_boxes:
# box = box[:max_boxes]
#
# box_data[:len(box), 0:5] = box[:, 0:5]
#
# #-------------------------------start polygon vertices processing-------------------------------#
# for b in range(0, len(box)):
# boxes_xy = (box[b, 0:2] + box[b, 2:4]) // 2
# for i in range(5, MAX_VERTICES * 2, 2):
# if box[b, i] == 0 and box[b, i + 1] == 0:
# break
# box[b, i:i+2] = box[b, i:i+2] - [crop_coords[2], crop_coords[0]] + [new_img_coords[2], new_img_coords[0]] # transform
# if flip: box[b, i] = (w - 1) - box[b, i]
# dist_x = boxes_xy[0] - box[b, i]
# dist_y = boxes_xy[1] - box[b, i + 1]
# dist = np.sqrt(np.power(dist_x, 2) + np.power(dist_y, 2))
# if (dist < 1): dist = 1
#
# angle = np.degrees(np.arctan2(dist_y, dist_x))
# if (angle < 0): angle += 360
# # num of section it belongs to
# iangle = int(angle) // ANGLE_STEP
#
# if iangle>=NUM_ANGLES: iangle = NUM_ANGLES-1
#
# if dist > box_data[b, 5 + iangle * 3]: # check for vertex existence. only the most distant is taken
# box_data[b, 5 + iangle * 3] = dist
# box_data[b, 5 + iangle * 3 + 1] = (angle - (iangle * int(ANGLE_STEP))) / ANGLE_STEP #relative angle
# box_data[b, 5 + iangle * 3 + 2] = 1
# #---------------------------------end polygon vertices processing-------------------------------#
# return image_data, box_data
def random_crop(img, new_img):
"""Creates random crop from img and insert it into new_img
Args:
img (numpy array): Image to be cropped
new_img (numpy array): Image to which the crop will be inserted into.
Returns:
tuple: Tuple of image containing the crop, list of coordinates used to crop img and list of coordinates where the crop
has been inserted into in new_img
"""
h, w = img.shape[:2]
crop_shape = new_img.shape[:2]
crop_coords = [0, 0, 0, 0]
new_pos = [0, 0, 0, 0]
# if image height is smaller than cropping window
if h < crop_shape[0]:
# cropping whole image [0,h]
crop_coords[1] = h
# randomly position whole img along height dimension
val = rd.randint(0, crop_shape[0]-h)
new_pos[0:2] = [val, val + h]
else:
# if image height is bigger than cropping window
# randomly position cropping window on image
crop_h_shift = rd.randint(crop_shape[0], h)
crop_coords[0:2] = [crop_h_shift - crop_shape[0], crop_h_shift]
new_pos[0:2] = [0, crop_shape[0]]
# same as above for image width
if w < crop_shape[1]:
crop_coords[3] = w
val = rd.randint(0, crop_shape[1] - w)
new_pos[2:4] = [val, val + w]
else:
crop_w_shift = rd.randint(crop_shape[1], w)
crop_coords[2:4] = [crop_w_shift - crop_shape[1], crop_w_shift]
new_pos[2:4] = [0, crop_shape[1]]
# slice, insert and return image including crop and coordinates used for cropping and inserting
# coordinates are later used for boxes adjustments.
new_img[new_pos[0]:new_pos[1], new_pos[2]:new_pos[3],
:] = img[crop_coords[0]:crop_coords[1], crop_coords[2]:crop_coords[3], :]
return new_img, crop_coords, new_pos
@wraps(Conv2D)
def DarknetConv2D(*args, **kwargs):
"""Wrapper to set Darknet parameters for Convolution2D."""
darknet_conv_kwargs = {'kernel_regularizer': l2(5e-4)}
darknet_conv_kwargs['padding'] = 'valid' if kwargs.get('strides') == (2, 2) else 'same'
darknet_conv_kwargs.update(kwargs)
return Conv2D(*args, **darknet_conv_kwargs)
def DarknetConv2D_BN_Leaky(*args, **kwargs):
"""Darknet Convolution2D followed by BatchNormalization and LeakyReLU."""
no_bias_kwargs = {'use_bias': False}
no_bias_kwargs.update(kwargs)
return compose(
DarknetConv2D(*args, **no_bias_kwargs),
BatchNormalization(),
LeakyReLU(alpha=0.1))
# def resblock_body(x, num_filters, num_blocks):
# '''A series of resblocks starting with a downsampling Convolution2D'''
# # Darknet uses left and top padding instead of 'same' mode
# x = ZeroPadding2D(((1, 0), (1, 0)))(x)
# x = DarknetConv2D_BN_Leaky(num_filters, (3, 3), strides=(2, 2))(x)
# for i in range(num_blocks):
# y = compose(
# DarknetConv2D_BN_Leaky(num_filters // 2, (1, 1)),
# DarknetConv2D_BN_Leaky(num_filters, (3, 3)))(x)
# y = squeeze_excite_block(y)
# x = Add()([x, y])
# return x
#taken from https://github.com/titu1994/keras-squeeze-excite-network/blob/master/keras_squeeze_excite_network/se_resnet.py
def squeeze_excite_block(tensor, ratio=16):
init = tensor
channel_axis = 1 if K.image_data_format() == "channels_first" else -1
filters = init.shape[channel_axis]
se_shape = (1, 1, filters)
se = GlobalAveragePooling2D()(init)
se = Reshape(se_shape)(se)
se = Dense(filters // ratio, kernel_initializer='he_normal', use_bias=False)(se)
se = LeakyReLU(alpha=0.1)(se)
se = Dense(filters, activation='sigmoid', kernel_initializer='he_normal', use_bias=False)(se)
if K.image_data_format() == 'channels_first':
se = Permute((3, 1, 2))(se)
x = multiply([init, se])
return x
def _tensor_shape(tensor):
return getattr(tensor, '_keras_shape')
# def darknet_body(x):
# '''Darknent body having 52 Convolution2D layers'''
# base = 6 # YOLOv3 has base=8, we have less parameters
# x = DarknetConv2D_BN_Leaky(base * 4, (3, 3))(x)
# x = resblock_body(x, base * 8, 1)
# x = resblock_body(x, base * 16, 2)
# tiny = x
# x = resblock_body(x, base * 32, 8)
# small = x
# x = resblock_body(x, base * 64, 8)
# medium = x
# x = resblock_body(x, base * 128, 8)
# big = x
# return tiny, small, medium, big
def yolo_body(inputs, num_anchors, num_classes):
"""Create Poly-YOLO model CNN body in Keras."""
# backbone and feature extraction ---------->
base_model = InceptionV3(input_tensor=inputs, weights=None, include_top=False) # random initialization
# extract features from each block end: ["add", "add_1", "add_10", "add_11"]
tiny = base_model.get_layer('activation_4').output # 64x64 : 1/4
small = base_model.get_layer('mixed2').output # 32x32 : 1/8
medium = base_model.get_layer('mixed7').output # 16x16 : 1/16
big = base_model.get_layer('mixed10').output # 8x8 : 1/32
# tiny, small, medium, big = darknet_body(inputs)
# # # check the layer names
# for i, layer in enumerate(base_model.layers):
# print(i, layer.name)
# base_model.summary()
# Neck ------------------------>
base = 6
tiny = DarknetConv2D_BN_Leaky(base*32, (1, 1))(tiny)
small = DarknetConv2D_BN_Leaky(base*32, (1, 1))(small)
medium = DarknetConv2D_BN_Leaky(base*32, (1, 1))(medium)
big = DarknetConv2D_BN_Leaky(base*32, (1, 1))(big)
#stairstep upsamplig
all = Add()([medium, UpSampling2D(2,interpolation='bilinear')(big)])
all = Add()([small, UpSampling2D(2,interpolation='bilinear')(all)])
all = Add()([tiny, UpSampling2D(2,interpolation='bilinear')(all)])
# Prediction Head
num_filters = base*32
x = compose(
DarknetConv2D_BN_Leaky(num_filters, (1, 1)),
DarknetConv2D_BN_Leaky(num_filters * 2, (3, 3)),
DarknetConv2D_BN_Leaky(num_filters, (1, 1)))(all)
print("x.shape:", x.shape)
print()
print("num_classes:", num_classes)
print("NUM_ANGLES3:", NUM_ANGLES3)
print("num_anchors:", num_anchors)
print()
all = compose(
DarknetConv2D_BN_Leaky(num_filters * 2, (3, 3)),
DarknetConv2D(num_anchors * (num_classes + 5 + NUM_ANGLES3), (1, 1)))(x)
print("all.shape:", all.shape)
return Model(inputs, all)
def yolo_head(feats, anchors, num_classes, input_shape, calc_loss=False):
"""Convert final layer features to bounding box parameters."""
print("feats in yolo head:", feats)
# feats in yolo head: Tensor("conv2d_68/Identity:0", shape=(None, None, None, 702), dtype=float32)
num_anchors = anchors_per_level
# Reshape to batch, height, width, num_anchors, box_params.
anchors_tensor = K.reshape(K.constant(anchors), [1, 1, 1, num_anchors, 2])
grid_shape = K.shape(feats)[1:3] # height, width
grid_y = K.tile(tf.reshape(K.arange(0, stop=grid_shape[0]), [-1, 1, 1, 1], name='yolo_head/tile/reshape/grid_y'),
[1, grid_shape[1], 1, 1])
grid_x = K.tile(tf.reshape(K.arange(0, stop=grid_shape[1]), [1, -1, 1, 1], name='yolo_head/tile/reshape/grid_x'),
[grid_shape[0], 1, 1, 1])
grid = tf.concat([grid_x, grid_y], axis=-1, name='yolo_head/concatenate/grid')
print("grid.shape:", grid)
grid = K.cast(grid, K.dtype(feats))
feats = tf.reshape(
feats, [-1, grid_shape[0], grid_shape[1], num_anchors, num_classes + 5 + NUM_ANGLES3], name='yolo_head/reshape/feats')
print("reshaped predictions:", feats)
# Adjust predictions to each spatial grid point and anchor size.
print("grid_shape[...,::-1]", grid_shape[...,::-1])
# left-up corner + grid possition = the center cordinates.
box_xy = (K.sigmoid(feats[..., :2]) + grid) / K.cast(grid_shape[...,::-1], K.dtype(feats))
print("box_xy from prediction +grid:", box_xy)
box_wh = K.exp(feats[..., 2:4]) * anchors_tensor / K.cast(input_shape[...,::-1], K.dtype(feats))
box_confidence = K.sigmoid(feats[..., 4:5])
box_class_probs = K.sigmoid(feats[..., 5:5 + num_classes])
polygons_confidence = K.sigmoid(feats[..., 5+num_classes+2:5+num_classes+NUM_ANGLES3:3])
print("polygons_confidence:", polygons_confidence)
polygons_x = K.exp(feats[..., 5 + num_classes:num_classes + 5 + NUM_ANGLES3:3])
print("polygons_x:", polygons_x) # shape=(None, None, None, 9, 24) , distance predictions from vertix to center (px)? (px, py)
dx = K.square(anchors_tensor[..., 0:1] / 2)
dy = K.square(anchors_tensor[..., 1:2] / 2)
d = K.cast(K.sqrt(dx + dy), K.dtype(polygons_x)) # anchors distance
print("input_shape[::-1]:", input_shape[::-1])
a = K.pow(input_shape[::-1], 2) # elementwise exponential of feature maps' size? (h^2, w^2)
a = K.cast(a, K.dtype(feats))
b= K.sum(a) # b = h^2 + w^2
diagonal = K.cast(K.sqrt(b), K.dtype(feats)) # calculate the diagonal distance according to the feature size
polygons_x = polygons_x * d / diagonal # see one note
# polar position (px, py), the following is py which is the angle prediction
polygons_y = feats[..., 5 + num_classes + 1:num_classes + 5 + NUM_ANGLES3:3]
polygons_y = K.sigmoid(polygons_y)
if calc_loss == True: # for calculating the loss use this other wise output the output
return grid, feats, box_xy, box_wh, polygons_confidence
return box_xy, box_wh, box_confidence, box_class_probs, polygons_x, polygons_y, polygons_confidence
def yolo_correct_boxes(box_xy, box_wh, input_shape, image_shape):
'''Get corrected boxes'''
box_yx = box_xy[..., ::-1]
box_hw = box_wh[..., ::-1]
input_shape = K.cast(input_shape, K.dtype(box_yx))
image_shape = K.cast(image_shape, K.dtype(box_yx))
new_shape = K.round(image_shape * K.min(input_shape / image_shape))
offset = (input_shape - new_shape) / 2. / input_shape
scale = input_shape / new_shape
box_yx = (box_yx - offset) * scale
box_hw *= scale
box_mins = box_yx - (box_hw / 2.)
box_maxes = box_yx + (box_hw / 2.)
boxes = K.concatenate([
box_mins[..., 0:1], # y_min
box_mins[..., 1:2], # x_min
box_maxes[..., 0:1], # y_max
box_maxes[..., 1:2] # x_max
])
# Scale boxes back to original image shape.
boxes *= K.concatenate([image_shape, image_shape])
return boxes
def yolo_correct_polygons(polygons_x, polygons_y, polygons_confidence, boxes, input_shape, image_shape):
polygons = K.concatenate([polygons_x, polygons_y, polygons_confidence])
return polygons
def yolo_boxes_and_scores(feats, anchors, num_classes, input_shape, image_shape):
'''Process Conv layer output'''
box_xy, box_wh, box_confidence, box_class_probs, polygons_x, polygons_y, polygons_confidence = yolo_head(feats, anchors, num_classes, input_shape)
boxes = yolo_correct_boxes(box_xy, box_wh, input_shape, image_shape)
boxes = K.reshape(boxes, [-1, 4])
box_scores = box_confidence * box_class_probs
box_scores = K.reshape(box_scores, [-1, num_classes])
polygons = yolo_correct_polygons(polygons_x, polygons_y, polygons_confidence, boxes, input_shape, image_shape)
polygons = K.reshape(polygons, [-1, NUM_ANGLES3]) # [[angle1, dist1, prob1], [angle2, dist2, prob2]...]
return boxes, box_scores, polygons
def yolo_eval(yolo_outputs,
anchors,
num_classes,
image_shape,
max_boxes=80,
score_threshold=.5,
iou_threshold=.5):
"""Evaluate YOLO model on given input and return filtered boxes."""
input_shape = K.shape(yolo_outputs)[1:3] * grid_size_multiplier
boxes = []
box_scores = []
polygons = []
for l in range(1):
_boxes, _box_scores, _polygons = yolo_boxes_and_scores(yolo_outputs,
anchors[anchor_mask[l]], num_classes, input_shape,
image_shape)
boxes.append(_boxes)
box_scores.append(_box_scores)
polygons.append(_polygons)
boxes = K.concatenate(boxes, axis=0)
box_scores = K.concatenate(box_scores, axis=0)
polygons = K.concatenate(polygons, axis=0)
mask = box_scores >= score_threshold
# box_scores >= score_threshold
max_boxes_tensor = K.constant(max_boxes, dtype='int32')
boxes_ = []
scores_ = []
classes_ = []
polygons_ = []
for c in range(num_classes):
# TODO: use keras backend instead of tf.
class_boxes = tf.boolean_mask(boxes, mask[:, c])
class_polygons = tf.boolean_mask(polygons, mask[:, c])
class_box_scores = tf.boolean_mask(box_scores[:, c], mask[:, c])
nms_index = tf.image.non_max_suppression(
class_boxes, class_box_scores, max_boxes_tensor, iou_threshold=iou_threshold)
class_boxes = K.gather(class_boxes, nms_index)
class_box_scores = K.gather(class_box_scores, nms_index)
class_polygons = K.gather(class_polygons, nms_index)
classes = K.ones_like(class_box_scores, 'int32') * c
boxes_.append(class_boxes)
scores_.append(class_box_scores)
classes_.append(classes)
polygons_.append(class_polygons)
polygons_ = K.concatenate(polygons_, axis=0)
boxes_ = K.concatenate(boxes_, axis=0)
scores_ = K.concatenate(scores_, axis=0)
classes_ = K.concatenate(classes_, axis=0)
return boxes_, scores_, classes_, polygons_
def preprocess_true_boxes(true_boxes, input_shape, anchors, num_classes):
'''Preprocess true boxes to training input format
Parameters
----------
true_boxes: array, shape=(m, T, 5+69)
Absolute x_min, y_min, x_max, y_max, class_id relative to input_shape
input_shape: array-like, hw, multiples of 32
anchors: array, shape=(N, 2), wh
num_classes: integer
Returns
-------
y_true: list of array, shape like yolo_outputs, xywh are reletive value
'''
assert (true_boxes[..., 4] < num_classes).all(), 'class id must be less than num_classes'
true_boxes = np.array(true_boxes, dtype='float32')
input_shape = np.array(input_shape, dtype='int32')
boxes_xy = (true_boxes[..., 0:2] + true_boxes[..., 2:4]) // 2
boxes_wh = true_boxes[..., 2:4] - true_boxes[..., 0:2]
true_boxes[:,:, 5:NUM_ANGLES3 + 5:3] /= np.clip(np.expand_dims(np.sqrt(np.power(boxes_wh[:, :, 0], 2) + np.power(boxes_wh[:, :, 1], 2)), -1), 0.0001, 9999999)
true_boxes[..., 0:2] = boxes_xy / input_shape[::-1]
true_boxes[..., 2:4] = boxes_wh / input_shape[::-1]
m = true_boxes.shape[0]
grid_shapes = [input_shape // {0: grid_size_multiplier}[l] for l in range(1)]
y_true = [np.zeros((m, grid_shapes[l][0], grid_shapes[l][1], len(anchor_mask[l]), 5 + num_classes + NUM_ANGLES3),
dtype='float32') for l in range(1)]
# Expand dim to apply broadcasting.
anchors = np.expand_dims(anchors, 0)
anchor_maxes = anchors / 2.
anchor_mins = -anchor_maxes
valid_mask = boxes_wh[..., 0] > 0
for b in range(m):
# Discard zero rows.
wh = boxes_wh[b, valid_mask[b]]
if len(wh) == 0: continue
# Expand dim to apply broadcasting.
wh = np.expand_dims(wh, -2)
box_maxes = wh / 2.
box_mins = -box_maxes
intersect_mins = np.maximum(box_mins, anchor_mins)
intersect_maxes = np.minimum(box_maxes, anchor_maxes)
intersect_wh = np.maximum(intersect_maxes - intersect_mins, 0.)
intersect_area = intersect_wh[..., 0] * intersect_wh[..., 1]
box_area = wh[..., 0] * wh[..., 1]
anchor_area = anchors[..., 0] * anchors[..., 1]
iou = intersect_area / (box_area + anchor_area - intersect_area)
# Find best anchor for each true box
best_anchor = np.argmax(iou, axis=-1)
for t, n in enumerate(best_anchor):
l = 0
if n in anchor_mask[l]:
i = np.floor(true_boxes[b, t, 0] * grid_shapes[l][1]).astype('int32')
j = np.floor(true_boxes[b, t, 1] * grid_shapes[l][0]).astype('int32')
k = anchor_mask[l].index(n)
c = true_boxes[b, t, 4].astype('int32')
y_true[l][b, j, i, k, 0:4] = true_boxes[b, t, 0:4]
y_true[l][b, j, i, k, 4] = 1
y_true[l][b, j, i, k, 5 + c] = 1
y_true[l][b, j, i, k, 5 + num_classes:5 + num_classes + NUM_ANGLES3] = true_boxes[b, t, 5: 5 + NUM_ANGLES3]
return y_true
def box_iou(b1, b2):
"""Return iou tensor
Parameters
----------
b1: tensor, shape=(i1,...,iN, 4), xywh
b2: tensor, shape=(j, 4), xywh
Returns
-------
iou: tensor, shape=(i1,...,iN, j)
"""
# Expand dim to apply broadcasting.
b1 = K.expand_dims(b1, -2)
b1_xy = b1[..., :2]
b1_wh = b1[..., 2:4]
b1_wh_half = b1_wh / 2.
b1_mins = b1_xy - b1_wh_half
b1_maxes = b1_xy + b1_wh_half
# Expand dim to apply broadcasting.
b2 = K.expand_dims(b2, 0)
b2_xy = b2[..., :2]
b2_wh = b2[..., 2:4]
b2_wh_half = b2_wh / 2.
b2_mins = b2_xy - b2_wh_half
b2_maxes = b2_xy + b2_wh_half
intersect_mins = K.maximum(b1_mins, b2_mins)
intersect_maxes = K.minimum(b1_maxes, b2_maxes)
intersect_wh = K.maximum(intersect_maxes - intersect_mins, 0.)
intersect_area = intersect_wh[..., 0] * intersect_wh[..., 1]
b1_area = b1_wh[..., 0] * b1_wh[..., 1]
b2_area = b2_wh[..., 0] * b2_wh[..., 1]
iou = intersect_area / (b1_area + b2_area - intersect_area)
return iou
def yolo_loss(args, anchors, num_classes, ignore_thresh=.5):
"""Return yolo_loss tensor
Parameters
----------
yolo_outputs: list of tensor, the output of yolo_body or tiny_yolo_body
y_true: list of array, the output of preprocess_true_boxes
anchors: array, shape=(N, 2), wh
num_classes: integer
ignore_thresh: float, the iou threshold whether to ignore object confidence loss
Returns
-------
loss: tensor, shape=(1,)
"""
num_layers = 1
yolo_outputs = args[:num_layers]
y_true = args[num_layers:]
print("yolo_outputs.shape", yolo_outputs)
print("y_true.shape", y_true)
g_y_true = y_true
# define a input shape as a 2d shape= (imgH,imgW)*grid_size_multiplier = feature map shape * 4 = (rawiput W, raw input H)
input_shape = K.cast(K.shape(yolo_outputs[0])[1:3] * grid_size_multiplier, K.dtype(y_true[0]))
print("input_shape in loss", input_shape)
grid_shapes = [K.cast(K.shape(yolo_outputs[l])[1:3], K.dtype(y_true[0])) for l in range(num_layers)]
loss = 0
m = K.shape(yolo_outputs[0])[0] # batch size, tensor
mf = K.cast(m, K.dtype(yolo_outputs[0]))
for layer in range(num_layers):
object_mask = y_true[layer][..., 4:5] ## [..., 4:5] = [:, 4:5], = y_true[..., 4] get the 4th element for all anchors in each pixel position of the feature map
print("object_mask:", object_mask)
# slice as seq[start:end:step] ==> [8, 78, step= 3], this is vertices sections
# remember NUM_ANGLES3 = int(360 // ANGLE_STEP * 3) =72
# recap: our output contains (4 boundingboxes, num_classes, polarangle, polardistance, problbilies for each section)
print("5 + num_classes + 2:", 5 + num_classes + 2)
print("5 + num_classes + NUM_ANGLES3:", 5 + num_classes + NUM_ANGLES3)
vertices_mask = y_true[layer][..., 5 + num_classes + 2:5 + num_classes + NUM_ANGLES3:3] # problabilies for each section
print("vertices_mask:", vertices_mask)
true_class_probs = y_true[layer][..., 5:5 + num_classes]
print("true_class_probs:", true_class_probs)
# return yolo_head: grid, feats, box_xy, box_wh, polygons_confidence
grid, raw_pred, pred_xy, pred_wh, pol_cnf = yolo_head(yolo_outputs[layer], anchors[anchor_mask[layer]], num_classes, input_shape, calc_loss=True)
pred_box = K.concatenate([pred_xy, pred_wh])
print("pred_box:", pred_box) # x,y , w, h for 9 anchors , with shape (None, None, None, 9, 4)
# found the left-up corner, which may be normalized with ground truth , since y_true[..., 2:] * Feature shapes
raw_true_xy = y_true[layer][..., :2] * grid_shapes[layer][::-1] - grid
# (px(distance), py(angle), pz(probability) ), should have 72 elements for all feature positions
raw_true_polygon0 = y_true[layer][..., 5 + num_classes: 5 + num_classes + NUM_ANGLES3]
print("raw_true_polygon0:", raw_true_polygon0)
# anchor_mask = = [[0,1,2,3,4,5,6,7,8], [0,1,2,3,4,5,6,7,8], [0,1,2,3,4,5,6,7,8]]
# anchors[anchor_mask[layer]]
# anchors = with shape [num, 2] ==>[9,2]
# anchors[anchor_mask[layer]] --> just choose all anchors
print("y_true[layer][..., 2:4]:", y_true[layer][..., 2:4]) # shape=(None, 104, 208, 9, 2)
# each ground truth w, h, find the value corresponding to our direct prediction deviation see one note calculation GM slides for 7.31 day
raw_true_wh = K.log(y_true[layer][..., 2:4] / anchors[anchor_mask[layer]] * input_shape[::-1])
print("raw_true_wh",raw_true_wh) # shape=(None, 104, 208, 9, 2)
# object_mask is the condidence score for the bbox
# k.switch to switch to different function accoding to the condience score.
# if the object_mask == False, generating all zeros for the same shape as raw_true_wh
raw_true_wh = K.switch(object_mask, raw_true_wh, K.zeros_like(raw_true_wh)) # avoid log(0)=-inf
raw_true_polygon_x = raw_true_polygon0[..., ::3] # ground truth, px,
raw_true_polygon_y = raw_true_polygon0[..., 1::3] # ground truth, py,
dx = K.square(anchors[anchor_mask[layer]][..., 0:1] / 2) # get gt anchor x
dy = K.square(anchors[anchor_mask[layer]][..., 1:2] / 2) # get gt anchor y
d = K.cast(K.sqrt(dx + dy), K.dtype(raw_true_polygon_x)) # get gt d
diagonal = K.sqrt(K.pow(input_shape[::-1][0], 2) + K.pow(input_shape[::-1][1], 2)) # get diagnoal of feature maps
raw_true_polygon_x = K.log(raw_true_polygon_x / d * diagonal) # the deviation of distances
# the same as bounding boxes , according to the mask probbilities to calculate distances from vertice to center
# if probilits all false, then give 0 distances
raw_true_polygon_x = K.switch(vertices_mask, raw_true_polygon_x, K.zeros_like(raw_true_polygon_x))
box_loss_scale = 2 - y_true[layer][..., 2:3] * y_true[layer][..., 3:4] # weighted factor, changed with prediction of w, h
# if w, h ground truth is small , then more loss weighted
# Find ignore mask, iterate over each of batch.
ignore_mask = tf.TensorArray(K.dtype(y_true[0]), size=1, dynamic_size=True)
object_mask_bool = K.cast(object_mask, 'bool') # acoording to the confidence score
# (0 prediction , will be ignored, only consider non-zero postion, of ground truth).
# only consider the positive anchors.
def loop_body(b, ignore_mask):
true_box = tf.boolean_mask(y_true[layer][b, ..., 0:4], object_mask_bool[b, ..., 0])
iou = box_iou(pred_box[b], true_box)
best_iou = K.max(iou, axis=-1)
ignore_mask = ignore_mask.write(b, K.cast(best_iou < ignore_thresh, K.dtype(true_box)))
return b + 1, ignore_mask
# iterate over batches calculate ignore_mask
_, ignore_mask = tf.while_loop(lambda b, *args: b < m, loop_body, [0, ignore_mask])
ignore_mask = ignore_mask.stack() # default axis = 0 # inorder to stack along the batch dimension
ignore_mask = K.expand_dims(ignore_mask, -1) # in order to concate last dimension
# K.binary_crossentropy is helpful to avoid exp overflow.
xy_loss = object_mask * box_loss_scale * K.binary_crossentropy(raw_true_xy, raw_pred[..., 0:2], from_logits=True)
wh_loss = object_mask * box_loss_scale * 0.5 * K.square(raw_true_wh - raw_pred[..., 2:4])
confidence_loss = object_mask * K.binary_crossentropy(object_mask, raw_pred[..., 4:5], from_logits=True) + (1 - object_mask) * K.binary_crossentropy(object_mask, raw_pred[..., 4:5],
from_logits=True) * ignore_mask
class_loss = object_mask * K.binary_crossentropy(true_class_probs, raw_pred[..., 5:5 + num_classes], from_logits=True)
polygon_loss_x = object_mask * vertices_mask * box_loss_scale * 0.5 * K.square(raw_true_polygon_x - raw_pred[..., 5 + num_classes:5 + num_classes + NUM_ANGLES3:3])
polygon_loss_y = object_mask * vertices_mask * box_loss_scale * K.binary_crossentropy(raw_true_polygon_y, raw_pred[..., 5 + num_classes + 1:5 + num_classes + NUM_ANGLES3:3], from_logits=True)
vertices_confidence_loss = object_mask * K.binary_crossentropy(vertices_mask, raw_pred[..., 5 + num_classes + 2:5 + num_classes + NUM_ANGLES3:3], from_logits=True)
print("finished losses")
xy_loss = K.sum(xy_loss) / mf # get the mean loss for each image
wh_loss = K.sum(wh_loss) / mf
class_loss = K.sum(class_loss) / mf
confidence_loss = K.sum(confidence_loss) / mf
vertices_confidence_loss = K.sum(vertices_confidence_loss) / mf
polygon_loss = K.sum(polygon_loss_x) / mf + K.sum(polygon_loss_y) / mf
print("finised losses for each image")
# there is a weight for special masks losses and also weighted focal according to the confidences score in total for each image ,then * for the enirebatch
loss += (xy_loss + wh_loss + confidence_loss + class_loss + 0.2 * polygon_loss + 0.2 * vertices_confidence_loss)/ (K.sum(object_mask) + 1)*mf
return loss
class YOLO(object):
_defaults = {
"model_path": 'model_data/yolo.h5',
"anchors_path": 'yolo_anchors.txt',
"classes_path": 'yolo_classes.txt',
"score": 0.2,
"iou": 0.4,
"model_image_size": (256, 256),
"gpu_num": 1,
}
@classmethod
def get_defaults(cls, n):
if n in cls._defaults:
return cls._defaults[n]
else:
return "Unrecognized attribute name '" + n + "'"
def __init__(self, **kwargs):
self.__dict__.update(self._defaults) # set up default values
self.__dict__.update(kwargs) # and update with user overrides
self.class_names = self._get_class()
self.anchors = self._get_anchors()
self.sess = K.get_session()
self.boxes, self.scores, self.classes, self.polygons = self.generate()
def _get_class(self):
classes_path = os.path.expanduser(self.classes_path)
with open(classes_path) as f:
class_names = f.readlines()
class_names = [c.strip() for c in class_names]
return class_names
def _get_anchors(self):
anchors_path = os.path.expanduser(self.anchors_path)
with open(anchors_path) as f:
anchors = f.readline()
anchors = [float(x) for x in anchors.split(',')]
return np.array(anchors).reshape(-1, 2)
def generate(self):
model_path = os.path.expanduser(self.model_path)
assert model_path.endswith('.h5'), 'Keras model or weights must be a .h5 file.'
# Load model, or construct model and load weights.
num_anchors = len(self.anchors)
num_classes = len(self.class_names)
try:
self.yolo_model = load_model(model_path, compile=False)
except:
self.yolo_model = yolo_body(Input(shape=(256, 256, 3)), anchors_per_level, num_classes)
self.yolo_model.load_weights(self.model_path) # make sure model, anchors and classes match
else:
# novy output
assert self.yolo_model.layers[-1].output_shape[-1] == \
num_anchors / len(self.yolo_model.output) * (num_classes + 5 + NUM_ANGLES3), \
'Mismatch between model and given anchor and class sizes'
print('{} model, anchors, and classes loaded.'.format(model_path))
# Generate output tensor targets for filtered bounding boxes.
self.input_image_shape = K.placeholder(shape=(2,))
if self.gpu_num >= 2:
self.yolo_model = multi_gpu_model(self.yolo_model, gpus=self.gpu_num)
boxes, scores, classes, polygons = yolo_eval(self.yolo_model.output, self.anchors,
len(self.class_names), self.input_image_shape,
score_threshold=self.score, iou_threshold=self.iou)
return boxes, scores, classes, polygons
def detect_image(self, image, raw_shape):
image = np.expand_dims(image, 0) # for input model
print("image.shape:", image.shape)
# if self.model_image_size != (None, None):
# assert self.model_image_size[0] % 32 == 0, 'Multiples of 32 required'
# assert self.model_image_size[1] % 32 == 0, 'Multiples of 32 required'
# boxed_image = letterbox_image(image, tuple(reversed(self.model_image_size)))
# else:
# print('THE functionality is not implemented!')
#
# image_data = np.expand_dims(boxed_image, 0) # Add batch dimension.
out_boxes, out_scores, out_classes, polygons = self.sess.run(
[self.boxes, self.scores, self.classes, self.polygons],
feed_dict={
self.yolo_model.input: image,
self.input_image_shape: [raw_shape[0], raw_shape[1]],
K.learning_phase(): 0
})
for b in range(0, out_boxes.shape[0]):
cy = (out_boxes[b, 0] + out_boxes[b, 2]) // 2
cx = (out_boxes[b, 1] + out_boxes[b, 3]) // 2
diagonal = np.sqrt(np.power(out_boxes[b, 3] - out_boxes[b, 1], 2.0) + np.power(out_boxes[b, 2] - out_boxes[b, 0], 2.0))
for i in range(0, NUM_ANGLES):
x1 = cx - math.cos(math.radians((polygons[b, i+NUM_ANGLES] + i) / NUM_ANGLES * 360)) * polygons[b, i] *diagonal# scale[1]
y1 = cy - math.sin(math.radians((polygons[b, i+NUM_ANGLES] + i) / NUM_ANGLES * 360)) * polygons[b, i] *diagonal# scale[0]
polygons[b, i] = x1
polygons[b, i+NUM_ANGLES] = y1
return out_boxes, out_scores, out_classes, polygons
def close_session(self):
self.sess.close()
def my_Gnearator(images_list, masks_list, batch_size, input_shape, anchors, num_classes, train_flag):
"""
:param images_list:
:param masks_list:
:param batch_size:
:param input_shape:
:param train_flag: STRING Train or else:
:return:
"""
n = len(images_list)
print("total_images:", n)
img_data_gen_args = dict(rotation_range=rotation_range,
width_shift_range=width_shift_range,
height_shift_range=height_shift_range,
zoom_range=zoom_range,
shear_range=shear_range,
horizontal_flip=horizontal_flip,
brightness_range=brightness_range
)
mask_data_gen_args = dict(rotation_range=rotation_range,
width_shift_range=width_shift_range,
height_shift_range=height_shift_range,
zoom_range=zoom_range,
shear_range=shear_range,
horizontal_flip=horizontal_flip
)
image_datagen = ImageDataGenerator(**img_data_gen_args)
mask_datagen = ImageDataGenerator(**mask_data_gen_args)
count = 0
while True:
image_data_list = []
box_data_list = []
# mask_data = []
# raw_img_path =[]
# raw_mask_path = []
# # mypolygon_data = []
# my_annotation = []
# print(images_list)
# print(masks_list)
ziped_img_mask_list = list(zip(images_list, masks_list))
b =0
while b< batch_size:
# print("True")
if count == 0 and train_flag == "Train":
np.random.shuffle(ziped_img_mask_list)
images_list, masks_list = zip(*ziped_img_mask_list)
temp_img_path = images_list[count]
temp_mask_path = masks_list[count]
img, box, myPolygon, aug_mask, annotation_line = my_get_random_data(temp_img_path, temp_mask_path, input_shape, image_datagen, mask_datagen,
train_or_test=train_flag)
# print("myPolygon.shape:", myPolygon.shape)
# check there is zero: if there is boundry points
# print("myPolygon.shape:", myPolygon.shape)
# # check there is zero: if there is boundry points
#
# print("count before next:", count)
# print("range polygon [{}, {}]".format(myPolygon.min(), myPolygon.max()))
count = (count + 1) % n
b += 1
# print(count)
# if np.any(myPolygon==0) or np.any(myPolygon==aug_image.shape[0]-1) or np.any(myPolygon==aug_image.shape[1]-1): # roll back.
#
# print("boundary image")
# count -=1
# b-=1
# continue
print("count after next:", count)
image_data_list.append(img)
# box_data.append(box)
box_data_list.append(box)
image_batch = np.array(image_data_list)
box_batch = np.array(box_data_list)
# preprocess the bbox into the regression targets
y_true = preprocess_true_boxes(box_batch, input_shape, anchors, num_classes)
yield [image_batch, *y_true], np.zeros(batch_size)
def my_get_random_data(img_path, mask_path, input_shape, image_datagen, mask_datagen, train_or_test):
# load data ------------------------>
# image_name = os.path.basename(img_path).replace('.JPG', '')
# mask_name = os.path.basename(mask_path).replace('.JPG', '')
# print("img name:", image_name)
# print("mask name:", mask_name)
image = krs_image.load_img(img_path, target_size=(input_shape[0], input_shape[1]))
mask = krs_image.load_img(mask_path, grayscale=True, target_size=(input_shape[0], input_shape[1]))
image = krs_image.img_to_array(image)
mask = krs_image.img_to_array(mask)
# image = np.expand_dims(image, 0)
# mask = np.expand_dims(mask, 0)
# print("img shape before aug:", image.shape)
# print("mask shape before aug:", mask.shape)
# augment data ----------------------->
if train_or_test == "Train":
# print("train aug")
seed = np.random.randint(0, 2147483647)
aug_image = image_datagen.random_transform(image, seed=seed)
aug_mask = mask_datagen.random_transform(mask, seed=seed)
copy_mask = aug_mask.copy().astype(np.uint8)
else:
# print("Test no aug")
aug_image = image
copy_mask = mask.copy().astype(np.uint8)
# print("mask shape after aug:", np.squeeze(aug_mask).shape)
# aug_image = krs_image.img_to_array(aug_image)
# aug_mask = krs_image.img_to_array(aug_mask)
# find polygons with augmask ------------------------------------>
# imgray = cv2.cvtColor(np.squeeze(copy_mask), cv2.COLOR_BGR2GRAY)
# print(copy_mask)
ret, thresh = cv2.threshold(copy_mask, 127, 255, 0) # this require the numpy array has to be the uint8 type
aug_mask =thresh
image, contours, hierarchy = cv2.findContours(thresh, cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE)
selected_coutours = []
for x in range(len(contours)):
# print("countour x:", x, contours[x].shape)
if contours[x].shape[0] > 8: # require one contour at lest 8 polygons(360/40=9)
selected_coutours.append(contours[x])
# print("# selected_coutours:", len(selected_coutours))
# encode contours into annotation lines ---->
annotation_line, myPolygon = encode_polygone(img_path, selected_coutours)
# if output_filename_full_path is not None:
# out = open(output_filename_full_path, 'w')
# print(annotation_line, file=out)
# decode contours annotation line into distance
box_data = decode_annotationline(annotation_line)
# normal the image ----------------->
aug_image = aug_image / 255.0
return aug_image, box_data, myPolygon, aug_mask, annotation_line
def encode_polygone(img_path, contours, MAX_VERTICES =1000):
"give polygons and encode as angle, ditance , probability"
skipped = 0
polygons_line = ''
c = 0
my_poly_list =[]
for obj in contours:
# print(obj.shape)
myPolygon = obj.reshape([-1, 2])
# print("mypolygon:", myPolygon.shape)
if myPolygon.shape[0] > MAX_VERTICES:
print()
print("too many polygons")
break
my_poly_list.append(myPolygon)
min_x = sys.maxsize
max_x = 0
min_y = sys.maxsize
max_y = 0
polygon_line = ''
# for po
for x, y in myPolygon:
# print("({}, {})".format(x, y))
if x > max_x: max_x = x
if y > max_y: max_y = y
if x < min_x: min_x = x
if y < min_y: min_y = y
polygon_line += ',{},{}'.format(x, y)
if max_x - min_x <= 1.0 or max_y - min_y <= 1.0:
skipped += 1
continue
polygons_line += ' {},{},{},{},{}'.format(min_x, min_y, max_x, max_y, c) + polygon_line
annotation_line = img_path + polygons_line
return annotation_line, my_poly_list
def decode_annotationline(encoded_annotationline, MAX_VERTICES=1000, max_boxes=80):
"""
:param encoded_annotationline: string for lines of img_path and objects c and its contours
:return:
"""
# NUM_ANGLES3 = int(360 // ANGLE_STEP * 3) # 72 = (360/15)*3
# NUM_ANGLES = int(360 // ANGLE_STEP)
# preprocessing of lines from string ---> very important otherwise can not well split
annotation_line = encoded_annotationline.split()
# print("len annotation_line:", annotation_line)
# print(lines[i])
for element in range(1, len(annotation_line)):
annotation_line = encoded_annotationline.split()
# print("len annotation_line:", annotation_line[element].count(','))
# print("MAX_VERTICES:", MAX_VERTICES)
for symbol in range(annotation_line[element].count(',') - 4, MAX_VERTICES * 2, 2):
# print("symbol:", symbol)
annotation_line[element] = annotation_line[element] + ',0,0'
# print(annotation_line[1:])
box = np.array([np.array(list(map(float, box.split(','))))
for box in annotation_line[1:]])
# correct boxes
box_data = np.zeros((max_boxes, 5 + NUM_ANGLES3))
if len(box) > 0:
np.random.shuffle(box)
if len(box) > max_boxes:
box = box[:max_boxes]
box_data[:len(box), 0:5] = box[:, 0:5]
# start polygon --->
for b in range(0, len(box)):
boxes_xy = (box[b, 0:2] + box[b, 2:4]) // 2
for i in range(5, MAX_VERTICES * 2, 2):
if box[b, i] == 0 and box[b, i + 1] == 0:
break
dist_x = boxes_xy[0] - box[b, i]
dist_y = boxes_xy[1] - box[b, i + 1]
dist = np.sqrt(np.power(dist_x, 2) + np.power(dist_y, 2))
if (dist < 1): dist = 1
angle = np.degrees(np.arctan2(dist_y, dist_x))
if (angle < 0): angle += 360
# num of section it belongs to
iangle = int(int(angle) // ANGLE_STEP)
# print("iangle:", iangle)
if iangle >= NUM_ANGLES: iangle = NUM_ANGLES - 1
if dist > box_data[b, 5 + iangle * 3]: # check for vertex existence. only the most distant is taken
box_data[b, 5 + iangle * 3] = dist
box_data[b, 5 + iangle * 3 + 1] = (angle - (
iangle * int(ANGLE_STEP))) / ANGLE_STEP # relative angle
box_data[b, 5 + iangle * 3 + 2] = 1
return box_data
def get_anchors(anchors_path):
"""loads the anchors from a file"""
with open(anchors_path) as f:
anchors = f.readline()
anchors = [float(x) for x in anchors.split(',')]
return np.array(anchors).reshape(-1, 2)
if __name__ == "__main__":
"""
Retrain the YOLO model for your own dataset.
"""
def _main():
project_name = 'PaperExp_Part1_Backbone_Exp4_InceptionV3_FullAug_AngleStep17_{}'.format(model_index)
phase = 1
print("current working dir:", os.getcwd())
cwd = os.getcwd()
# os.chdir("E:\\Projects\\poly-yolo\\simulator_dataset")
current_file_dir_path = os.path.dirname(os.path.realpath(__file__))
print("current file dir:", current_file_dir_path)
# annotation_path = current_file_dir_path+'/myTongueTrain.txt'
# validation_path = current_file_dir_path+'/myTongueTest.txt'
# for the lab
annotation_path = current_file_dir_path + '/myTongueTrainLab.txt'
validation_path = current_file_dir_path + '/myTongueTestLab.txt'
# log_dir = (current_file_dir_path + '/TongueModelsTang256x256_0.5lr_AngleStep{}_TonguePlus/').format(ANGLE_STEP)
log_dir = current_file_dir_path + '/'+ project_name +'/'
plot_folder = log_dir + 'Plots/'
if not os.path.exists(log_dir):
os.makedirs(log_dir)
if not os.path.exists(plot_folder):
os.makedirs(plot_folder)
classes_path = current_file_dir_path+'/yolo_classesTongue.txt'
anchors_path = current_file_dir_path+'/yolo_anchorsTongue.txt'
class_names = get_classes(classes_path)
num_classes = len(class_names)
anchors = get_anchors(anchors_path)
# input_shape = (416,832) # multiple of 32, hw
input_shape = (256, 256) # multiple of 32, hw
if phase == 1:
model = create_model(input_shape, anchors, num_classes, load_pretrained=False)
else:
model = create_model(input_shape, anchors, num_classes, load_pretrained=True, weights_path=log_dir+'poly_yolo.h5')
print(model.summary())
# "plot and save model"
# plot_model(model, to_file='model.png', show_shapes= True)
checkpoint = ModelCheckpoint(log_dir + 'ep{epoch:03d}-loss{loss:.3f}-val_loss{val_loss:.3f}.h5',
monitor='val_loss', save_weights_only=True, save_best_only=True, period=1, verbose=1)
reduce_lr = ReduceLROnPlateau(monitor='val_loss', factor=0.5, patience=3, verbose=1, delta=0.03)
early_stopping = EarlyStopping(monitor='val_loss', min_delta=0, patience=10, verbose=1)
# custom callback
plotCallBack = TrainingPlotCallback(save_path= plot_folder)
deleteOldH5 = DeleteEarlySavedH5models(modelSavedPath=log_dir)
# for my data generator
# for train dataset
# train_input_paths = glob('E:\\dataset\\Tongue\\tongue_dataset_tang_plus\\backup\\inputs\\Tongue/*')
# train_mask_paths = glob('E:\\dataset\\Tongue\\tongue_dataset_tang_plus\\backup\\binary_labels\\Tongue/*.jpg')
# print("len of train imgs:", len(train_input_paths))
#
# assert len(train_input_paths) == len(train_mask_paths), "train imgs and mask are not the same"
# # for validation dataset # we need or label and masks are the same shape
# val_input_paths = glob('E:\\dataset\\Tongue\\mytonguePolyYolo\\test\\test_inputs/*')
# val_mask_paths = glob('E:\\dataset\\Tongue\\mytonguePolyYolo\\test\\testLabel\\label512640/*.jpg')
# assert len(val_input_paths) == len(val_mask_paths), "val imgs and mask are not the same"
# # for train dataset for the lab
train_input_paths = glob('F:\\dataset\\tongue_dataset_tang_plus\\inputs/*')
train_mask_paths = glob('F:\\dataset\\tongue_dataset_tang_plus\\binary_labels/*.jpg')
print("len of train imgs:", len(train_input_paths))
assert len(train_input_paths) == len(train_mask_paths), "train imgs and mask are not the same"
# for validation dataset # we need or label and masks are the same shape
val_input_paths = glob('F:\\dataset\\mytonguePolyYolo\\test\\test_inputs/*')
val_mask_paths = glob('F:\\dataset\\mytonguePolyYolo\\test\\testLabel\\label512640/*.jpg')
assert len(val_input_paths) == len(val_mask_paths), "val imgs and mask are not the same"
print("total {} training samples read".format(len(train_input_paths)))
print("total {} val samples read".format(len(val_input_paths)))
# create data_generator
# for train:
train_Gen = my_Gnearator(train_input_paths, train_mask_paths, batch_size=4, input_shape=[256, 256],
anchors= anchors, num_classes=num_classes,
train_flag="Train")
val_Gen = my_Gnearator(val_input_paths, val_mask_paths, batch_size=4, input_shape=[256, 256],
anchors= anchors, num_classes=num_classes,
train_flag="test")
# with open(annotation_path) as f:
# lines = f.readlines()
# print("total {} training samples read".format(len(lines)))
# with open(validation_path) as f:
# lines_val = f.readlines()
# print("total {} val samples read".format(len(lines_val)))
# lines = tf.data.TextLineDataset(annotation_path)
# print("lines:", lines)
# for line in lines:
# print(line)
# lines_val = tf.data.TextLineDataset(validation_path)
# for i in range (0, len(lines)):
#
# lines[i] = lines[i].split()
# # print(lines[i])
# for element in range(1, len(lines[i])):
# for symbol in range(lines[i][element].count(',') - 4, MAX_VERTICES * 2, 2):
# lines[i][element] = lines[i][element] + ',0,0'
#
# for i in range(0, len(lines_val)):
# lines_val[i] = lines_val[i].split()
# for element in range(1, len(lines_val[i])):
# for symbol in range(lines_val[i][element].count(',') - 4, MAX_VERTICES * 2, 2):
# lines_val[i][element] = lines_val[i][element] + ',0,0'
num_val = int(len(val_input_paths))
num_train = len(train_input_paths)
batch_size = 4 # decrease/increase batch size according to your memory of your GPU
print('Train on {} samples, val on {} samples, with batch size {}.'.format(num_train, num_val, batch_size))
model.compile(optimizer=Adadelta(0.5), loss={'yolo_loss': lambda y_true, y_pred: y_pred})
epochs = 100
# os.chdir("/simulator_dataset/imgs") # for the simulator image path
model.fit_generator(train_Gen,
# steps_per_epoch=max(1, math.ceil(num_train/batch_size)),
steps_per_epoch=max(1, num_train // batch_size),
validation_data=val_Gen,
validation_steps=max(1, num_val // batch_size),
epochs=epochs,
initial_epoch=0,
callbacks=[reduce_lr, checkpoint, plotCallBack, deleteOldH5])
def get_classes(classes_path):
"""loads the classes"""
with open(classes_path) as f:
class_names = f.readlines()
class_names = [c.strip() for c in class_names]
return class_names
def create_model(input_shape, anchors, num_classes, load_pretrained=True, freeze_body=2,
weights_path='model_data/yolo_weights.h5'):
"""create the training model"""
K.clear_session() # get a new session
image_input = Input(shape=(256, 256, 3))
h, w = input_shape
num_anchors = len(anchors)
y_true = Input(shape=(h // grid_size_multiplier, w // grid_size_multiplier, anchors_per_level, num_classes + 5 + NUM_ANGLES3))
print("anchors_per_level:", anchors_per_level)
print("num_classes:", num_classes)
model_body = yolo_body(image_input, anchors_per_level, num_classes)
print("model_body.output.shape",model_body.outputs)
print('Create Poly-YOLO model with {} anchors and {} classes.'.format(num_anchors, num_classes))
if load_pretrained:
model_body.load_weights(weights_path, by_name=True, skip_mismatch=True)
print('Load weights {}.'.format(weights_path))
model_loss = Lambda(yolo_loss, output_shape=(1,), name='yolo_loss',
arguments={'anchors': anchors, 'num_classes': num_classes, 'ignore_thresh': 0.5})(
[model_body.output, y_true])
print("model_loss graph finished")
model = Model([model_body.input, y_true], model_loss)
# print(model.summary())
return model
# def data_generator(annotation_lines, batch_size, input_shape, anchors, num_classes, is_random):
# """data generator for fit_generator"""
# n = len(annotation_lines)
# i = 0
# while True:
# image_data = []
# box_data = []
# for b in range(batch_size):
# if i == 0:
# np.random.shuffle(annotation_lines)
# image, box = get_random_data(annotation_lines[i], input_shape, random=is_random)
# image_data.append(image)
# box_data.append(box)
# i = (i + 1) % n
# image_data = np.array(image_data)
# # print("image_data:", image_data.shape)
# box_data = np.array(box_data)
# y_true = preprocess_true_boxes (box_data, input_shape, anchors, num_classes) # return [xy, wh, F/B, one-hot of class, dists.(NUM_ANGLES)]
# yield [image_data, *y_true], np.zeros(batch_size)
#
# def data_generator_wrapper(annotation_lines, batch_size, input_shape, anchors, num_classes, random):
# n = len(annotation_lines)
# print("samples in data generator initial:", n)
# if n == 0 or batch_size <= 0: return None
# return data_generator(annotation_lines, batch_size, input_shape, anchors, num_classes, random)
#
if __name__ == '__main__':
_main()
|
[
"383441523@qq.com"
] |
383441523@qq.com
|
37868d9b4048229cc36cbafea3f537b3c05ce832
|
5541a71754a145c206c08530248d2c31e495b8f2
|
/python3/sdk/moderation_image_demo.py
|
e01cc75a0857c3e051d845661f27cae212b626e9
|
[
"Apache-2.0"
] |
permissive
|
zhouyluck/ais-sdk
|
94849d31935ca43830d00c19fb0363091ffe1690
|
1bfa939fbc3f4a3fc75d4ca892dea5feb1e67c77
|
refs/heads/master
| 2020-04-05T07:26:43.224542
| 2018-11-07T09:09:44
| 2018-11-07T09:10:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,494
|
py
|
# -*- coding:utf-8 -*-
from ais_sdk.gettoken import get_token
from ais_sdk.utils import encode_to_base64
from ais_sdk.moderation_image import moderation_image
from ais_sdk.moderation_image import moderation_image_aksk
if __name__ == '__main__':
#
# access moderation image,post data by token
#
user_name = '******'
password = '******'
account_name = '******' # the same as user_name in commonly use
demo_data_url = 'https://ais-sample-data.obs.myhwclouds.com/tagging-normal.jpg'
token = get_token(user_name, password, account_name)
# call interface use the local file
result = moderation_image(token, encode_to_base64('data/moderation-demo-1.jpg'), "", ['politics','terrorism'], "")
print(result)
# call interface use the url (token, image, url, threshold=0.95, scene=None)
result = moderation_image(token, "", demo_data_url, ['politics','terrorism'], "")
print(result)
#
# access moderation image,post data by ak,sk
#
app_key = "*************"
app_secret = "************"
demo_data_url = 'https://ais-sample-data.obs.myhwclouds.com/tagging-normal.jpg'
# call interface use the local file
result = moderation_image_aksk(app_key, app_secret, encode_to_base64('data/moderation-demo-1.jpg'), "", ['politics','terrorism'], "")
print(result)
# call interface use the url
result = moderation_image_aksk(app_key, app_secret, "", demo_data_url, ['politics','terrorism'], "")
print(result)
|
[
"17091412@qq.com"
] |
17091412@qq.com
|
60cb09da07fd38ca67b44dd6ec8f727e4136cc98
|
a11cd2f9385ffa06bc70743ace3c5bc81920f02e
|
/mainx/main.py
|
9ebcb513bff1e6526e5d1cd7a791703521fa2fe5
|
[] |
no_license
|
hevi9/etc-python
|
f58cb1b7c42f7693eac0b797abc522910f824986
|
edf02381972788bf4f22ca0d4e0449b522a6038d
|
refs/heads/master
| 2020-12-19T20:49:16.384025
| 2018-03-29T16:14:41
| 2018-03-29T16:14:41
| 17,981,430
| 4
| 1
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 137
|
py
|
from .util import TEST
import sys
def main():
print("HERE main", __name__, TEST, sys.argv)
if __name__ == "__main__":
main()
|
[
"hevi@lut.fi"
] |
hevi@lut.fi
|
0071de2e2326958290cbef070ff8de467c33db3d
|
a2381a5428a32a8dd5461e5c7fbb68f76b22c478
|
/Advanced Lane Finding/undistort_and_transform.py
|
1de28ca517237b224a95e8a7356c9fd6cc3fd3a0
|
[] |
no_license
|
ibiscp/Nanodegree_Self_Driving_Car
|
c12ceeb1952a5e8d76cee3c8a0be7be8d0e55158
|
bd9aac583e5a86de7bedab2a9acc72dbd94a8ee1
|
refs/heads/master
| 2020-06-13T12:25:39.798513
| 2017-02-19T15:03:55
| 2017-02-19T15:03:55
| 75,381,832
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 2,753
|
py
|
__author__ = 'Ibis'
import pickle
import cv2
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
# Read in the saved camera matrix and distortion coefficients
# These are the arrays you calculated using cv2.calibrateCamera()
dist_pickle = pickle.load( open( "wide_dist_pickle.p", "rb" ) )
mtx = dist_pickle["mtx"]
dist = dist_pickle["dist"]
# Read in an image
img = cv2.imread('test_image2.png')
nx = 8 # the number of inside corners in x
ny = 6 # the number of inside corners in y
# MODIFY THIS FUNCTION TO GENERATE OUTPUT
# THAT LOOKS LIKE THE IMAGE ABOVE
def corners_unwarp(img, nx, ny, mtx, dist):
# Pass in your image into this function
# Write code to do the following steps
# 1) Undistort using mtx and dist
dst = cv2.undistort(img, mtx, dist, None, mtx)
# 2) Convert to grayscale
gray = cv2.cvtColor(dst,cv2.COLOR_BGR2GRAY)
# 3) Find the chessboard corners
ret, corners = cv2.findChessboardCorners(gray, (8,6),None)
#print(img.shape)
# 4) If corners found:
if ret == True:
offset = 100 # offset for dst points
# Grab the image shape
img_size = (gray.shape[1], gray.shape[0])
# a) draw corners
img = cv2.drawChessboardCorners(dst, (8,6), corners, ret)
# b) define 4 source points src = np.float32([[,],[,],[,],[,]])
src = np.float32([corners[0], corners[nx-1], corners[-1], corners[-nx]])
#Note: you could pick any four of the detected corners
# as long as those four corners define a rectangle
#One especially smart way to do this would be to use four well-chosen
# corners that were automatically detected during the undistortion steps
#We recommend using the automatic detection of corners in your code
# c) define 4 destination points dst = np.float32([[,],[,],[,],[,]])
dst = np.float32([[offset, offset], [img_size[0]-offset, offset],
[img_size[0]-offset, img_size[1]-offset],
[offset, img_size[1]-offset]])
# d) use cv2.getPerspectiveTransform() to get M, the transform matrix
M = cv2.getPerspectiveTransform(src, dst)
# e) use cv2.warpPerspective() to warp your image to a top-down view
warped = cv2.warpPerspective(img, M, img_size, flags=cv2.INTER_LINEAR)
return warped, M
top_down, perspective_M = corners_unwarp(img, nx, ny, mtx, dist)
f, (ax1, ax2) = plt.subplots(1, 2, figsize=(24, 9))
f.tight_layout()
ax1.imshow(img)
ax1.set_title('Original Image', fontsize=50)
ax2.imshow(top_down)
ax2.set_title('Undistorted and Warped Image', fontsize=50)
plt.subplots_adjust(left=0., right=1, top=0.9, bottom=0.)
|
[
"ibiscp@gmail.com"
] |
ibiscp@gmail.com
|
2d4265c5038f40141c9a571ae184162ef9a3c7f2
|
21f2d0be3073718f40ee3f1bd7bd5b3bb5cdcf0e
|
/install_packages.py
|
933a8d87754feb94c32e37693b29d1454ce087af
|
[
"Apache-2.0"
] |
permissive
|
Mohsen-Kalantar/IEEE_CIS_Fuzzy
|
9ae9b06c3dd151f589dce3ca3b1aca2d96d06a55
|
3c5fc77494de3676095ced1afecb10752a1f2c3d
|
refs/heads/main
| 2023-04-30T11:59:31.653520
| 2021-05-16T01:08:46
| 2021-05-16T01:08:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 796
|
py
|
#!/usr/bin/env python
from pip._internal import main as pip
pip(['install', '--upgrade', 'pip'])
pip(['install', '--user', 'pandas'])
pip(['install', '--user', 'numpy'])
pip(['install', '--user', 'sklearn'])
pip(['install', '--user', 'catboost'])
pip(['install', '--user', 'pyarrow'])
pip(['install', '--upgrade', 'os'])
pip(['install', '--upgrade', 'sys'])
pip(['install', '--upgrade', 'site'])
pip(['install', '--upgrade', 'pyodbc'])
pip(['install', '--upgrade', 'imp'])
pip(['install', '--upgrade', 'yaml'])
pip(['install', '--upgrade', 'matplotlib'])
pip(['install', '--upgrade', 'dateutil'])
pip(['install', '--upgrade', 'datetime'])
pip(['install', '--upgrade', 'pylab'])
pip(['install', '--upgrade', 'copy'])
pip(['install', '--upgrade', 'pathlib'])
pip(['install', '--upgrade', 'shap'])
|
[
"kasun@192-168-1-101.tpgi.com.au"
] |
kasun@192-168-1-101.tpgi.com.au
|
b6728c152fc65f1ac75a040034784143700c7acd
|
b9a53a0f376e0121a07bbf1ee0940748976d1eb2
|
/fanfic/utils.py
|
5f43bc92a90166771b364468632e809233a7168c
|
[] |
no_license
|
davidmcclure/fanfic-crawler
|
41621b13ccc5f2083bad3be0f7a275dd64d8ba38
|
78ff96f94b9fa9cf1878c766399027b96ff9f320
|
refs/heads/master
| 2021-01-12T17:48:16.270816
| 2017-03-07T01:21:39
| 2017-03-07T01:21:39
| 69,393,449
| 0
| 1
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,059
|
py
|
import re
def extract_int(href: str) -> int:
"""Extract a numeric id from an href.
"""
# TODO: Should this always take the first match?
return int(re.search('[0-9]+', href).group())
def clean_string(value: str) -> str:
"""
- Strip whitespace.
- Replace whitespace strings with 1 space.
"""
return re.sub('\s+', ' ', value.strip())
def atoi(value: str) -> int:
"""Replace commas, parse int.
"""
return int(value.replace(',', ''))
def flatten_dict(d, root=True):
"""Flatten a dict into a list of tuples.
Args:
nested (dict)
Yields: ((key1, key2, ...), val)
"""
for k, v in d.items():
if isinstance(v, dict):
for item in flatten_dict(v, False):
# At root level, break away the key path from the value.
if root:
yield ((k,) + item[:-1], item[-1])
# Otherwise build up the key chain.
else:
yield (k,) + item
else:
yield (k, v)
|
[
"davidwilliammcclure@gmail.com"
] |
davidwilliammcclure@gmail.com
|
87240e1137ea2faf360234aaf1001a943f6fb854
|
59b5f2d56adf48f5ac9658327da16cac3c95e03c
|
/Exercise 21-Neural networks.py
|
0dced4bed4d72d23caea3459a277b3bfa02f9971
|
[] |
no_license
|
Leaves2018/Elements-of-AI-Building-Ai
|
3d87d317563f8d0339090cde5155932894321854
|
f4716d02ad8b6c2f623e4f429e5a1f7fa15b8e3a
|
refs/heads/main
| 2023-06-18T17:21:53.084227
| 2021-07-20T05:00:21
| 2021-07-20T05:00:21
| 385,882,919
| 1
| 0
| null | 2021-07-14T09:23:45
| 2021-07-14T09:23:44
| null |
UTF-8
|
Python
| false
| false
| 2,453
|
py
|
import numpy as np
w0 = np.array([[ 1.19627687e+01, 2.60163283e-01],
[ 4.48832507e-01, 4.00666119e-01],
[-2.75768443e-01, 3.43724167e-01],
[ 2.29138536e+01, 3.91783025e-01],
[-1.22397711e-02, -1.03029800e+00]])
w1 = np.array([[11.5631751 , 11.87043684],
[-0.85735419, 0.27114237]])
w2 = np.array([[11.04122165],
[10.44637262]])
b0 = np.array([-4.21310294, -0.52664488])
b1 = np.array([-4.84067881, -4.53335139])
b2 = np.array([-7.52942418])
x = np.array([[111, 13, 12, 1, 161],
[125, 13, 66, 1, 468],
[46, 6, 127, 2, 961],
[80, 9, 80, 2, 816],
[33, 10, 18, 2, 297],
[85, 9, 111, 3, 601],
[24, 10, 105, 2, 1072],
[31, 4, 66, 1, 417],
[56, 3, 60, 1, 36],
[49, 3, 147, 2, 179]])
y = np.array([335800., 379100., 118950., 247200., 107950., 266550., 75850.,
93300., 170650., 149000.])
def hidden_activation(z):
# ReLU activation. fix this!
# ReLU activation function returns either the input value of the function, or zero, whichever is the largest
return np.array([max(element, 0) for element in z])
def output_activation(z):
# identity (linear) activation. fix this!
# linear activation just returns the input as output
return z
x_test = [[82, 2, 65, 3, 516]]
for item in x_test:
h1_in = np.dot(item, w0) + b0 # this calculates the linear combination of inputs and weights
h1_out = hidden_activation(h1_in) # apply activation function
# fill out the missing parts:
# the output of the first hidden layer, h1_out, will need to go through
# the second hidden layer with weights w1 and bias b1
# and finally to the output layer with weights w2 and bias b2.
# remember correct activations: relu in the hidden layers and linear (identity) in the output
h2_in = np.dot(h1_out, w1) + b1
h2_out = hidden_activation(h2_in)
h3_in = np.dot(h2_out, w2) + b2
h3_out = output_activation(h3_in)
print(h3_out)
# What price does the neural network predict for a cabin described by input vector [82, 2, 65, 3, 516] ?
# roughly 257,100 euros
# What type of machine learning is this?
# supervised learning
# How can we make sure we are not overfitting the neural network to the data?
# use cross-validation
|
[
"yuanyufei1999@gmail.com"
] |
yuanyufei1999@gmail.com
|
711d78260156fbb049a2c66c0d29e63312fe1193
|
3d193be5bcbc0823c91fdb2504beef631d6da709
|
/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
|
1e111a4b6328307c609f9b7e66d8e089ad05ab6c
|
[
"BSD-3-Clause"
] |
permissive
|
a402539/highweb-webcl-html5spec
|
7a4285a729fdf98b5eea7c19a288d26d4759d7cc
|
644216ea0c2db67af15471b42753d76e35082759
|
refs/heads/master
| 2020-03-22T14:01:34.091922
| 2016-04-26T05:06:00
| 2016-05-03T12:58:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 22,594
|
py
|
# 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.
"""Generates C++ source files from a mojom.Module."""
import mojom.generate.generator as generator
import mojom.generate.module as mojom
import mojom.generate.pack as pack
from mojom.generate.template_expander import UseJinja
_kind_to_cpp_type = {
mojom.BOOL: "bool",
mojom.INT8: "int8_t",
mojom.UINT8: "uint8_t",
mojom.INT16: "int16_t",
mojom.UINT16: "uint16_t",
mojom.INT32: "int32_t",
mojom.UINT32: "uint32_t",
mojom.FLOAT: "float",
mojom.INT64: "int64_t",
mojom.UINT64: "uint64_t",
mojom.DOUBLE: "double",
}
_kind_to_cpp_literal_suffix = {
mojom.UINT8: "U",
mojom.UINT16: "U",
mojom.UINT32: "U",
mojom.FLOAT: "f",
mojom.UINT64: "ULL",
}
# TODO(rockot): Get rid of these globals. This requires some refactoring of the
# generator library code so that filters can use the generator as context.
_current_typemap = {}
_for_blink = False
# TODO(rockot, yzshen): The variant handling is kind of a hack currently. Make
# it right.
_variant = None
class _NameFormatter(object):
"""A formatter for the names of kinds or values."""
def __init__(self, token, variant):
self._token = token
self._variant = variant
def Format(self, separator, prefixed=False, internal=False,
include_variant=False, add_same_module_namespaces=False):
parts = []
if self._ShouldIncludeNamespace(add_same_module_namespaces):
if prefixed:
parts.append("")
parts.extend(self._GetNamespace())
if include_variant and self._variant:
parts.append(self._variant)
parts.extend(self._GetName(internal))
return separator.join(parts)
def FormatForCpp(self, add_same_module_namespaces=False, internal=False):
return self.Format(
"::", prefixed=True,
add_same_module_namespaces=add_same_module_namespaces,
internal=internal, include_variant=True)
def FormatForMojom(self):
return self.Format(".", add_same_module_namespaces=True)
def _MapKindName(self, token, internal):
if not internal:
return token.name
if (mojom.IsStructKind(token) or mojom.IsUnionKind(token) or
mojom.IsInterfaceKind(token) or mojom.IsEnumKind(token)):
return token.name + "_Data"
return token.name
def _GetName(self, internal):
name = []
if internal:
name.append("internal")
if self._token.parent_kind:
name.append(self._MapKindName(self._token.parent_kind, internal))
# Both variable and enum constants are constructed like:
# Namespace::Struct::CONSTANT_NAME
# For enums, CONSTANT_NAME is EnumName::ENUM_VALUE.
if isinstance(self._token, mojom.EnumValue):
name.extend([self._token.enum.name, self._token.name])
else:
name.append(self._MapKindName(self._token, internal))
return name
def _ShouldIncludeNamespace(self, add_same_module_namespaces):
return add_same_module_namespaces or self._token.imported_from
def _GetNamespace(self):
if self._token.imported_from:
return NamespaceToArray(self._token.imported_from["namespace"])
elif hasattr(self._token, "module"):
return NamespaceToArray(self._token.module.namespace)
return []
def ConstantValue(constant):
return ExpressionToText(constant.value, kind=constant.kind)
def DefaultValue(field):
if field.default:
if mojom.IsStructKind(field.kind):
assert field.default == "default"
return "%s::New()" % GetNameForKind(field.kind)
return ExpressionToText(field.default, kind=field.kind)
if mojom.IsArrayKind(field.kind) or mojom.IsMapKind(field.kind):
return "nullptr";
if mojom.IsStringKind(field.kind):
return "" if _for_blink else "nullptr"
return ""
def NamespaceToArray(namespace):
return namespace.split(".") if namespace else []
def GetNameForKind(kind, internal=False):
return _NameFormatter(kind, _variant).FormatForCpp(internal=internal)
def GetQualifiedNameForKind(kind, internal=False):
return _NameFormatter(kind, _variant).FormatForCpp(
internal=internal, add_same_module_namespaces=True)
def GetFullMojomNameForKind(kind):
return _NameFormatter(kind, _variant).FormatForMojom()
def IsTypemappedKind(kind):
return hasattr(kind, "name") and \
GetFullMojomNameForKind(kind) in _current_typemap
def IsCloneableKind(kind):
return mojom.IsCloneableKind(kind, IsTypemappedKind)
def IsNativeOnlyKind(kind):
return mojom.IsStructKind(kind) and kind.native_only
def GetNativeTypeName(typemapped_kind):
return _current_typemap[GetFullMojomNameForKind(typemapped_kind)]["typename"]
def GetCppType(kind):
if mojom.IsArrayKind(kind):
return "mojo::internal::Array_Data<%s>*" % GetCppType(kind.kind)
if mojom.IsMapKind(kind):
return "mojo::internal::Map_Data<%s, %s>*" % (
GetCppType(kind.key_kind), GetCppType(kind.value_kind))
if mojom.IsStructKind(kind):
return "%s*" % GetNameForKind(kind, internal=True)
if mojom.IsUnionKind(kind):
return "%s" % GetNameForKind(kind, internal=True)
if mojom.IsInterfaceKind(kind):
return "mojo::internal::Interface_Data"
if mojom.IsInterfaceRequestKind(kind):
return "mojo::internal::Handle_Data"
if mojom.IsAssociatedInterfaceKind(kind):
return "mojo::internal::AssociatedInterface_Data"
if mojom.IsAssociatedInterfaceRequestKind(kind):
return "mojo::internal::AssociatedInterfaceRequest_Data"
if mojom.IsEnumKind(kind):
return "int32_t"
if mojom.IsStringKind(kind):
return "mojo::internal::String_Data*"
if mojom.IsAnyHandleKind(kind):
return "mojo::internal::Handle_Data"
return _kind_to_cpp_type[kind]
def GetCppPodType(kind):
if mojom.IsStringKind(kind):
return "char*"
return _kind_to_cpp_type[kind]
def GetCppArrayArgWrapperType(kind):
if IsTypemappedKind(kind):
if mojom.IsStructKind(kind) and kind.native_only:
return GetNativeTypeName(kind)
else:
raise Exception(
"Cannot serialize containers of non-native typemapped structs yet!")
if mojom.IsEnumKind(kind):
return GetNameForKind(kind)
if mojom.IsStructKind(kind) or mojom.IsUnionKind(kind):
return "%sPtr" % GetNameForKind(kind)
if mojom.IsArrayKind(kind):
pattern = "mojo::WTFArray<%s>" if _for_blink else "mojo::Array<%s>"
return pattern % GetCppArrayArgWrapperType(kind.kind)
if mojom.IsMapKind(kind):
return "mojo::Map<%s, %s> " % (GetCppArrayArgWrapperType(kind.key_kind),
GetCppArrayArgWrapperType(kind.value_kind))
if mojom.IsInterfaceKind(kind):
raise Exception("Arrays of interfaces not yet supported!")
if mojom.IsInterfaceRequestKind(kind):
raise Exception("Arrays of interface requests not yet supported!")
if mojom.IsAssociatedInterfaceKind(kind):
raise Exception("Arrays of associated interfaces not yet supported!")
if mojom.IsAssociatedInterfaceRequestKind(kind):
raise Exception("Arrays of associated interface requests not yet "
"supported!")
if mojom.IsStringKind(kind):
return "WTF::String" if _for_blink else "mojo::String"
if mojom.IsGenericHandleKind(kind):
return "mojo::ScopedHandle"
if mojom.IsDataPipeConsumerKind(kind):
return "mojo::ScopedDataPipeConsumerHandle"
if mojom.IsDataPipeProducerKind(kind):
return "mojo::ScopedDataPipeProducerHandle"
if mojom.IsMessagePipeKind(kind):
return "mojo::ScopedMessagePipeHandle"
if mojom.IsSharedBufferKind(kind):
return "mojo::ScopedSharedBufferHandle"
return _kind_to_cpp_type[kind]
def GetCppResultWrapperType(kind):
if IsTypemappedKind(kind):
return "const %s&" % GetNativeTypeName(kind)
if mojom.IsEnumKind(kind):
return GetNameForKind(kind)
if mojom.IsStructKind(kind) or mojom.IsUnionKind(kind):
return "%sPtr" % GetNameForKind(kind)
if mojom.IsArrayKind(kind):
pattern = "mojo::WTFArray<%s>" if _for_blink else "mojo::Array<%s>"
return pattern % GetCppArrayArgWrapperType(kind.kind)
if mojom.IsMapKind(kind):
return "mojo::Map<%s, %s>" % (GetCppArrayArgWrapperType(kind.key_kind),
GetCppArrayArgWrapperType(kind.value_kind))
if mojom.IsInterfaceKind(kind):
return "%sPtr" % GetNameForKind(kind)
if mojom.IsInterfaceRequestKind(kind):
return "%sRequest" % GetNameForKind(kind.kind)
if mojom.IsAssociatedInterfaceKind(kind):
return "%sAssociatedPtrInfo" % GetNameForKind(kind.kind)
if mojom.IsAssociatedInterfaceRequestKind(kind):
return "%sAssociatedRequest" % GetNameForKind(kind.kind)
if mojom.IsStringKind(kind):
return "WTF::String" if _for_blink else "mojo::String"
if mojom.IsGenericHandleKind(kind):
return "mojo::ScopedHandle"
if mojom.IsDataPipeConsumerKind(kind):
return "mojo::ScopedDataPipeConsumerHandle"
if mojom.IsDataPipeProducerKind(kind):
return "mojo::ScopedDataPipeProducerHandle"
if mojom.IsMessagePipeKind(kind):
return "mojo::ScopedMessagePipeHandle"
if mojom.IsSharedBufferKind(kind):
return "mojo::ScopedSharedBufferHandle"
# TODO(rudominer) After improvements to compiler front end have landed,
# revisit strategy used below for emitting a useful error message when an
# undefined identifier is referenced.
val = _kind_to_cpp_type.get(kind)
if (val is not None):
return val
raise Exception("Unrecognized kind %s" % kind.spec)
def GetCppWrapperType(kind):
if IsTypemappedKind(kind):
return GetNativeTypeName(kind)
if mojom.IsEnumKind(kind):
return GetNameForKind(kind)
if mojom.IsStructKind(kind) or mojom.IsUnionKind(kind):
return "%sPtr" % GetNameForKind(kind)
if mojom.IsArrayKind(kind):
pattern = "mojo::WTFArray<%s>" if _for_blink else "mojo::Array<%s>"
return pattern % GetCppArrayArgWrapperType(kind.kind)
if mojom.IsMapKind(kind):
return "mojo::Map<%s, %s>" % (GetCppArrayArgWrapperType(kind.key_kind),
GetCppArrayArgWrapperType(kind.value_kind))
if mojom.IsInterfaceKind(kind):
return "%sPtr" % GetNameForKind(kind)
if mojom.IsInterfaceRequestKind(kind):
return "%sRequest" % GetNameForKind(kind.kind)
if mojom.IsAssociatedInterfaceKind(kind):
return "%sAssociatedPtrInfo" % GetNameForKind(kind.kind)
if mojom.IsAssociatedInterfaceRequestKind(kind):
return "%sAssociatedRequest" % GetNameForKind(kind.kind)
if mojom.IsStringKind(kind):
return "WTF::String" if _for_blink else "mojo::String"
if mojom.IsGenericHandleKind(kind):
return "mojo::ScopedHandle"
if mojom.IsDataPipeConsumerKind(kind):
return "mojo::ScopedDataPipeConsumerHandle"
if mojom.IsDataPipeProducerKind(kind):
return "mojo::ScopedDataPipeProducerHandle"
if mojom.IsMessagePipeKind(kind):
return "mojo::ScopedMessagePipeHandle"
if mojom.IsSharedBufferKind(kind):
return "mojo::ScopedSharedBufferHandle"
return _kind_to_cpp_type[kind]
def GetCppConstWrapperType(kind):
if IsTypemappedKind(kind):
return "const %s&" % GetNativeTypeName(kind)
if mojom.IsStructKind(kind) or mojom.IsUnionKind(kind):
return "%sPtr" % GetNameForKind(kind)
if mojom.IsArrayKind(kind):
pattern = "mojo::WTFArray<%s>" if _for_blink else "mojo::Array<%s>"
return pattern % GetCppArrayArgWrapperType(kind.kind)
if mojom.IsMapKind(kind):
return "mojo::Map<%s, %s>" % (GetCppArrayArgWrapperType(kind.key_kind),
GetCppArrayArgWrapperType(kind.value_kind))
if mojom.IsInterfaceKind(kind):
return "%sPtr" % GetNameForKind(kind)
if mojom.IsInterfaceRequestKind(kind):
return "%sRequest" % GetNameForKind(kind.kind)
if mojom.IsAssociatedInterfaceKind(kind):
return "%sAssociatedPtrInfo" % GetNameForKind(kind.kind)
if mojom.IsAssociatedInterfaceRequestKind(kind):
return "%sAssociatedRequest" % GetNameForKind(kind.kind)
if mojom.IsEnumKind(kind):
return GetNameForKind(kind)
if mojom.IsStringKind(kind):
return "const WTF::String&" if _for_blink else "const mojo::String&"
if mojom.IsGenericHandleKind(kind):
return "mojo::ScopedHandle"
if mojom.IsDataPipeConsumerKind(kind):
return "mojo::ScopedDataPipeConsumerHandle"
if mojom.IsDataPipeProducerKind(kind):
return "mojo::ScopedDataPipeProducerHandle"
if mojom.IsMessagePipeKind(kind):
return "mojo::ScopedMessagePipeHandle"
if mojom.IsSharedBufferKind(kind):
return "mojo::ScopedSharedBufferHandle"
if not kind in _kind_to_cpp_type:
print "missing:", kind.spec
return _kind_to_cpp_type[kind]
def GetCppFieldType(kind):
if mojom.IsStructKind(kind):
return ("mojo::internal::Pointer<%s>" %
GetNameForKind(kind, internal=True))
if mojom.IsUnionKind(kind):
return "%s" % GetNameForKind(kind, internal=True)
if mojom.IsArrayKind(kind):
return ("mojo::internal::Pointer<mojo::internal::Array_Data<%s>>" %
GetCppType(kind.kind))
if mojom.IsMapKind(kind):
return ("mojo::internal::Pointer<mojo::internal::Map_Data<%s, %s>>" %
(GetCppType(kind.key_kind), GetCppType(kind.value_kind)))
if mojom.IsInterfaceKind(kind):
return "mojo::internal::Interface_Data"
if mojom.IsInterfaceRequestKind(kind):
return "mojo::internal::Handle_Data"
if mojom.IsAssociatedInterfaceKind(kind):
return "mojo::internal::AssociatedInterface_Data"
if mojom.IsAssociatedInterfaceRequestKind(kind):
return "mojo::internal::AssociatedInterfaceRequest_Data"
if mojom.IsEnumKind(kind):
return "int32_t"
if mojom.IsStringKind(kind):
return "mojo::internal::Pointer<mojo::internal::String_Data>"
if mojom.IsAnyHandleKind(kind):
return "mojo::internal::Handle_Data"
return _kind_to_cpp_type[kind]
def GetCppUnionFieldType(kind):
if mojom.IsAnyHandleKind(kind):
return "mojo::internal::Handle_Data"
if mojom.IsInterfaceKind(kind):
return "uint64_t"
if mojom.IsEnumKind(kind):
return "int32_t"
if mojom.IsUnionKind(kind):
return ("mojo::internal::Pointer<%s>" % GetNameForKind(kind, internal=True))
return GetCppFieldType(kind)
def GetUnionGetterReturnType(kind):
if (mojom.IsStructKind(kind) or mojom.IsUnionKind(kind) or
mojom.IsArrayKind(kind) or mojom.IsMapKind(kind) or
mojom.IsAnyHandleKind(kind) or mojom.IsInterfaceKind(kind)
or mojom.IsAssociatedKind(kind)):
return "%s&" % GetCppWrapperType(kind)
return GetCppResultWrapperType(kind)
def TranslateConstants(token, kind):
if isinstance(token, mojom.NamedValue):
return _NameFormatter(token, _variant).FormatForCpp()
if isinstance(token, mojom.BuiltinValue):
if token.value == "double.INFINITY" or token.value == "float.INFINITY":
return "INFINITY";
if token.value == "double.NEGATIVE_INFINITY" or \
token.value == "float.NEGATIVE_INFINITY":
return "-INFINITY";
if token.value == "double.NAN" or token.value == "float.NAN":
return "NAN";
if (kind is not None and mojom.IsFloatKind(kind)):
return token if token.isdigit() else token + "f";
# Per C++11, 2.14.2, the type of an integer literal is the first of the
# corresponding list in Table 6 in which its value can be represented. In this
# case, the list for decimal constants with no suffix is:
# int, long int, long long int
# The standard considers a program ill-formed if it contains an integer
# literal that cannot be represented by any of the allowed types.
#
# As it turns out, MSVC doesn't bother trying to fall back to long long int,
# so the integral constant -2147483648 causes it grief: it decides to
# represent 2147483648 as an unsigned integer, and then warns that the unary
# minus operator doesn't make sense on unsigned types. Doh!
if kind == mojom.INT32 and token == "-2147483648":
return "(-%d - 1) /* %s */" % (
2**31 - 1, "Workaround for MSVC bug; see https://crbug.com/445618")
return "%s%s" % (token, _kind_to_cpp_literal_suffix.get(kind, ""))
def ExpressionToText(value, kind=None):
return TranslateConstants(value, kind)
def ShouldInlineStruct(struct):
# TODO(darin): Base this on the size of the wrapper class.
if len(struct.fields) > 4:
return False
for field in struct.fields:
if mojom.IsMoveOnlyKind(field.kind):
return False
return True
def ShouldInlineUnion(union):
return not any(mojom.IsMoveOnlyKind(field.kind) for field in union.fields)
def GetArrayValidateParamsCtorArgs(kind):
if mojom.IsStringKind(kind):
expected_num_elements = 0
element_is_nullable = False
element_validate_params = "nullptr"
enum_validate_func = "nullptr"
elif mojom.IsMapKind(kind):
expected_num_elements = 0
element_is_nullable = mojom.IsNullableKind(kind.value_kind)
element_validate_params = GetNewArrayValidateParams(kind.value_kind)
enum_validate_func = "nullptr"
else:
expected_num_elements = generator.ExpectedArraySize(kind) or 0
element_is_nullable = mojom.IsNullableKind(kind.kind)
element_validate_params = GetNewArrayValidateParams(kind.kind)
if mojom.IsEnumKind(kind.kind):
enum_validate_func = ("%s::Validate" %
GetQualifiedNameForKind(kind.kind, internal=True))
else:
enum_validate_func = "nullptr"
if enum_validate_func == "nullptr":
return "%d, %s, %s" % (expected_num_elements,
"true" if element_is_nullable else "false",
element_validate_params)
else:
return "%d, %s" % (expected_num_elements, enum_validate_func)
def GetNewArrayValidateParams(kind):
if (not mojom.IsArrayKind(kind) and not mojom.IsMapKind(kind) and
not mojom.IsStringKind(kind)):
return "nullptr"
return "new mojo::internal::ArrayValidateParams(%s)" % (
GetArrayValidateParamsCtorArgs(kind))
def GetMapValidateParamsCtorArgs(value_kind):
# Unlike GetArrayValidateParams, we are given the wrapped kind, instead of
# the raw array kind. So we wrap the return value of GetArrayValidateParams.
element_is_nullable = mojom.IsNullableKind(value_kind)
return "0, %s, %s" % ("true" if element_is_nullable else "false",
GetNewArrayValidateParams(value_kind))
class Generator(generator.Generator):
cpp_filters = {
"constant_value": ConstantValue,
"cpp_const_wrapper_type": GetCppConstWrapperType,
"cpp_field_type": GetCppFieldType,
"cpp_union_field_type": GetCppUnionFieldType,
"cpp_pod_type": GetCppPodType,
"cpp_result_type": GetCppResultWrapperType,
"cpp_type": GetCppType,
"cpp_union_getter_return_type": GetUnionGetterReturnType,
"cpp_wrapper_type": GetCppWrapperType,
"default_value": DefaultValue,
"expression_to_text": ExpressionToText,
"get_array_validate_params_ctor_args": GetArrayValidateParamsCtorArgs,
"get_map_validate_params_ctor_args": GetMapValidateParamsCtorArgs,
"get_name_for_kind": GetNameForKind,
"get_pad": pack.GetPad,
"get_qualified_name_for_kind": GetQualifiedNameForKind,
"has_callbacks": mojom.HasCallbacks,
"has_sync_methods": mojom.HasSyncMethods,
"should_inline": ShouldInlineStruct,
"should_inline_union": ShouldInlineUnion,
"is_array_kind": mojom.IsArrayKind,
"is_cloneable_kind": IsCloneableKind,
"is_enum_kind": mojom.IsEnumKind,
"is_integral_kind": mojom.IsIntegralKind,
"is_move_only_kind": mojom.IsMoveOnlyKind,
"is_native_only_kind": IsNativeOnlyKind,
"is_any_handle_kind": mojom.IsAnyHandleKind,
"is_interface_kind": mojom.IsInterfaceKind,
"is_interface_request_kind": mojom.IsInterfaceRequestKind,
"is_associated_interface_kind": mojom.IsAssociatedInterfaceKind,
"is_associated_interface_request_kind":
mojom.IsAssociatedInterfaceRequestKind,
"is_associated_kind": mojom.IsAssociatedKind,
"is_map_kind": mojom.IsMapKind,
"is_nullable_kind": mojom.IsNullableKind,
"is_object_kind": mojom.IsObjectKind,
"is_string_kind": mojom.IsStringKind,
"is_struct_kind": mojom.IsStructKind,
"is_typemapped_kind": IsTypemappedKind,
"is_union_kind": mojom.IsUnionKind,
"passes_associated_kinds": mojom.PassesAssociatedKinds,
"struct_size": lambda ps: ps.GetTotalSize() + _HEADER_SIZE,
"stylize_method": generator.StudlyCapsToCamel,
"under_to_camel": generator.UnderToCamel,
}
def GetExtraTraitsHeaders(self):
extra_headers = set()
for entry in self.typemap.itervalues():
extra_headers.update(entry.get("traits_headers", []))
return list(extra_headers)
def GetExtraPublicHeaders(self):
extra_headers = set()
for entry in self.typemap.itervalues():
extra_headers.update(entry.get("public_headers", []))
return list(extra_headers)
def GetJinjaExports(self):
return {
"module": self.module,
"namespace": self.module.namespace,
"namespaces_as_array": NamespaceToArray(self.module.namespace),
"imports": self.module.imports,
"kinds": self.module.kinds,
"enums": self.module.enums,
"structs": self.GetStructs(),
"unions": self.GetUnions(),
"interfaces": self.GetInterfaces(),
"variant": self.variant,
"extra_traits_headers": self.GetExtraTraitsHeaders(),
"extra_public_headers": self.GetExtraPublicHeaders(),
"for_blink": self.for_blink,
}
@staticmethod
def GetTemplatePrefix():
return "cpp_templates"
@classmethod
def GetFilters(cls):
return cls.cpp_filters
@UseJinja("module.h.tmpl")
def GenerateModuleHeader(self):
return self.GetJinjaExports()
@UseJinja("module-internal.h.tmpl")
def GenerateModuleInternalHeader(self):
return self.GetJinjaExports()
@UseJinja("module.cc.tmpl")
def GenerateModuleSource(self):
return self.GetJinjaExports()
def GenerateFiles(self, args):
global _current_typemap
_current_typemap = self.typemap
global _for_blink
_for_blink = self.for_blink
global _variant
_variant = self.variant
suffix = "-%s" % self.variant if self.variant else ""
self.Write(self.GenerateModuleHeader(),
self.MatchMojomFilePath("%s%s.h" % (self.module.name, suffix)))
self.Write(self.GenerateModuleInternalHeader(),
self.MatchMojomFilePath("%s%s-internal.h" % (self.module.name, suffix)))
self.Write(self.GenerateModuleSource(),
self.MatchMojomFilePath("%s%s.cc" % (self.module.name, suffix)))
|
[
"kimdh@infrawareglobal.com"
] |
kimdh@infrawareglobal.com
|
2f5056aae3675e28af27b4689c854bfc319a3d5e
|
2cc3aed1b5dfb91e3df165144d95c01a495bd54b
|
/142-Linked-List-Cycle-II.py
|
b866deca3fcb1fae2c867bb58c88e3937880da9d
|
[] |
no_license
|
listenviolet/leetcode
|
f38e996148cb5d4be8f08286daac16243b3c30e4
|
0c1efcbfd35e5ef036ec1ccd0c014cd7baf2ed2b
|
refs/heads/master
| 2020-05-01T07:35:23.462429
| 2019-12-11T12:44:32
| 2019-12-11T12:44:32
| 177,354,773
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 2,192
|
py
|
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def detectCycle(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
if head is None or head.next is None:
return
slow = head
fast = head
entry = head
while(fast.next is not None and fast.next.next is not None):
slow = slow.next
fast = fast.next.next
if slow == fast:
while slow != entry:
slow = slow.next
entry = entry.next
return entry
return
# Question:
# Given a linked list, return the node where the cycle begins. If there is no cycle, return null.
# Note: Do not modify the linked list.
# Follow up:
# Can you solve it without using extra space?
# Solution:
# 1. 用slower和faster方法判断是否有环;
# 2. 设链表的头节点是head,
# 环的入口节点是entry,
# slower和 faster 2个指针相遇的节点是meeting;
# 3. 设L1是head到entry的正向距离,
# L2是entry到meeting的正向距离,
# C是环的长度,
# n是faster指针在cycle里遍历的次数(不到一遍算0);
# 根据上面的定义,可知:
# 1. 当slower和faster相遇时,
# slower已经走了L1 + L2的距离,
# 也即head和meeting的距离;
# 2. 当slower和faster相遇时,faster已经走了L1 + L2 + n * C的距离;
# 3. 因为slower步进1,而faster步进2,
# 那么当slower和faster第一次相遇时,
# faster已经走的距离是slower已经走的距离的两倍,
# 即 2* (L1 + L2) = L1 + L2 + n * C
# => L1 = (n - 1) * C + (C - L2)
# L1 = (n - 1) * C + (C - L2) 这个等式表明,
# head和entry的距离(L1),等于meeting到entry的正向距离
# (链表是有遍历方向的)。
# 这是因为式子中的 (n - 1) * C相当于走n-1个循环,
# 对一个指向meeting的环内指针来说,走(n - 1) * C等于回到起点,
# 所以式子可以简化成 L1 = C - L2。
# Beats: 79.41%
# medium
|
[
"listenviolet@gmail.com"
] |
listenviolet@gmail.com
|
18d31ce26b142b55eafc0587a3f4b93eaf51f976
|
f4b79529109fbb4055f334d0d9c7c96cb0710447
|
/colour/difference/din99.py
|
f386a6173c77e60e5d2555ca4e31f35b4bc5ea9d
|
[
"BSD-3-Clause"
] |
permissive
|
trevorandersen/colour
|
167381b3d03e506a270a8d2a519a164808995437
|
02b595b26313c4b4f55adc41d599f90c4c9edbcd
|
refs/heads/develop
| 2021-07-15T04:48:19.585586
| 2021-01-23T23:51:44
| 2021-01-23T23:51:44
| 230,421,054
| 0
| 0
|
BSD-3-Clause
| 2019-12-28T12:54:20
| 2019-12-27T10:10:30
| null |
UTF-8
|
Python
| false
| false
| 3,016
|
py
|
# -*- coding: utf-8 -*-
"""
:math:`\\Delta E_{99}` DIN99 - Colour Difference Formula
========================================================
Defines the :math:`\\Delta E_{99}` *DIN99* colour difference formula:
- :func:`colour.difference.delta_E_DIN99`
References
----------
- :cite:`ASTMInternational2007` : ASTM International. (2007). ASTM D2244-07 -
Standard Practice for Calculation of Color Tolerances and Color Differences
from Instrumentally Measured Color Coordinates: Vol. i (pp. 1-10).
doi:10.1520/D2244-16
"""
from colour.algebra import euclidean_distance
from colour.models import Lab_to_DIN99
from colour.utilities import get_domain_range_scale
__author__ = 'Colour Developers'
__copyright__ = 'Copyright (C) 2013-2021 - Colour Developers'
__license__ = 'New BSD License - https://opensource.org/licenses/BSD-3-Clause'
__maintainer__ = 'Colour Developers'
__email__ = 'colour-developers@colour-science.org'
__status__ = 'Production'
__all__ = ['delta_E_DIN99']
def delta_E_DIN99(Lab_1, Lab_2, textiles=False):
"""
Returns the difference :math:`\\Delta E_{DIN99}` between two given
*CIE L\\*a\\*b\\** colourspace arrays using *DIN99* formula.
Parameters
----------
Lab_1 : array_like
*CIE L\\*a\\*b\\** colourspace array 1.
Lab_2 : array_like
*CIE L\\*a\\*b\\** colourspace array 2.
Returns
-------
numeric or ndarray
Colour difference :math:`\\Delta E_{DIN99}`.
Notes
-----
+------------+-----------------------+-------------------+
| **Domain** | **Scale - Reference** | **Scale - 1** |
+============+=======================+===================+
| ``Lab_1`` | ``L_1`` : [0, 100] | ``L_1`` : [0, 1] |
| | | |
| | ``a_1`` : [-100, 100] | ``a_1`` : [-1, 1] |
| | | |
| | ``b_1`` : [-100, 100] | ``b_1`` : [-1, 1] |
+------------+-----------------------+-------------------+
| ``Lab_2`` | ``L_2`` : [0, 100] | ``L_2`` : [0, 1] |
| | | |
| | ``a_2`` : [-100, 100] | ``a_2`` : [-1, 1] |
| | | |
| | ``b_2`` : [-100, 100] | ``b_2`` : [-1, 1] |
+------------+-----------------------+-------------------+
References
----------
:cite:`ASTMInternational2007`
Examples
--------
>>> import numpy as np
>>> Lab_1 = np.array([60.2574, -34.0099, 36.2677])
>>> Lab_2 = np.array([60.4626, -34.1751, 39.4387])
>>> delta_E_DIN99(Lab_1, Lab_2) # doctest: +ELLIPSIS
1.1772166...
"""
k_E = 2 if textiles else 1
k_CH = 0.5 if textiles else 1
factor = 100 if get_domain_range_scale() == '1' else 1
d_E = euclidean_distance(
Lab_to_DIN99(Lab_1, k_E, k_CH) * factor,
Lab_to_DIN99(Lab_2, k_E, k_CH) * factor)
return d_E
|
[
"thomas.mansencal@gmail.com"
] |
thomas.mansencal@gmail.com
|
20a76123d62775caac61987efbe1c94afac15e93
|
16047f965a69893a8cd2c8d18fbd7b9c86a07eb3
|
/src/kubernetes/client/models/v1beta1_ingress_backend.py
|
3b9ea01b4e62638976dff3f47f8b4d0f6ba8e523
|
[
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"MIT"
] |
permissive
|
guctum/aws-kube-codesuite
|
9ce2cc02fe5fa15c2e175fb697138014fb162f1e
|
5d62beaadc13bec745ac7d2fc18f07805e91cef3
|
refs/heads/master
| 2021-05-24T10:08:00.651840
| 2020-04-23T20:21:46
| 2020-04-23T20:21:46
| 253,511,083
| 0
| 0
|
Apache-2.0
| 2020-04-06T13:48:14
| 2020-04-06T13:48:13
| null |
UTF-8
|
Python
| false
| false
| 4,214
|
py
|
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.7.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class V1beta1IngressBackend(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self, service_name=None, service_port=None):
"""
V1beta1IngressBackend - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
"""
self.swagger_types = {
'service_name': 'str',
'service_port': 'str'
}
self.attribute_map = {
'service_name': 'serviceName',
'service_port': 'servicePort'
}
self._service_name = service_name
self._service_port = service_port
@property
def service_name(self):
"""
Gets the service_name of this V1beta1IngressBackend.
Specifies the name of the referenced service.
:return: The service_name of this V1beta1IngressBackend.
:rtype: str
"""
return self._service_name
@service_name.setter
def service_name(self, service_name):
"""
Sets the service_name of this V1beta1IngressBackend.
Specifies the name of the referenced service.
:param service_name: The service_name of this V1beta1IngressBackend.
:type: str
"""
if service_name is None:
raise ValueError("Invalid value for `service_name`, must not be `None`")
self._service_name = service_name
@property
def service_port(self):
"""
Gets the service_port of this V1beta1IngressBackend.
Specifies the port of the referenced service.
:return: The service_port of this V1beta1IngressBackend.
:rtype: str
"""
return self._service_port
@service_port.setter
def service_port(self, service_port):
"""
Sets the service_port of this V1beta1IngressBackend.
Specifies the port of the referenced service.
:param service_port: The service_port of this V1beta1IngressBackend.
:type: str
"""
if service_port is None:
raise ValueError("Invalid value for `service_port`, must not be `None`")
self._service_port = service_port
def to_dict(self):
"""
Returns the model properties as a dict
"""
result = {}
for attr, _ in iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
return result
def to_str(self):
"""
Returns the string representation of the model
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()
def __eq__(self, other):
"""
Returns true if both objects are equal
"""
if not isinstance(other, V1beta1IngressBackend):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""
Returns true if both objects are not equal
"""
return not self == other
|
[
"olari@784f435df7a4.ant.amazon.com"
] |
olari@784f435df7a4.ant.amazon.com
|
9e01cd2867c8dd87c381d8e40446a10643d503de
|
cc506603700471c58cc6fa922d4b990e4fa4c1c6
|
/reports/fippon/report.py
|
41e7a64cfab64fdd2a207fe26a00eaf7bcbfcb64
|
[] |
no_license
|
Thatweirdcodesman/Airflow
|
5cf85282deae750c8e0122bb84566a6054efbcd4
|
cd877541f5ded84e2f85c945cf859f5262feb4e5
|
refs/heads/master
| 2023-01-13T04:50:51.215400
| 2020-11-15T13:19:23
| 2020-11-15T13:19:23
| 293,459,595
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 109
|
py
|
import initializeDB as i
import generateReport as g
import exportAndDestroy as e
i.main()
g.main()
e.main()
|
[
"achyuthari2000@gmail.com"
] |
achyuthari2000@gmail.com
|
a7f69367dcfb8bc56dbcb6b6fcffaa3ca19fbd80
|
ef32b87973a8dc08ba46bf03c5601548675de649
|
/pytglib/api/types/push_message_content_video_note.py
|
99172cefb73e820d28fa587a393074904f236be3
|
[
"MIT"
] |
permissive
|
iTeam-co/pytglib
|
1a7580f0e0c9e317fbb0de1d3259c8c4cb90e721
|
d3b52d7c74ee5d82f4c3e15e4aa8c9caa007b4b5
|
refs/heads/master
| 2022-07-26T09:17:08.622398
| 2022-07-14T11:24:22
| 2022-07-14T11:24:22
| 178,060,880
| 10
| 9
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 942
|
py
|
from ..utils import Object
class PushMessageContentVideoNote(Object):
"""
A video note message
Attributes:
ID (:obj:`str`): ``PushMessageContentVideoNote``
Args:
video_note (:class:`telegram.api.types.videoNote`):
Message content; may be null
is_pinned (:obj:`bool`):
True, if the message is a pinned message with the specified content
Returns:
PushMessageContent
Raises:
:class:`telegram.Error`
"""
ID = "pushMessageContentVideoNote"
def __init__(self, video_note, is_pinned, **kwargs):
self.video_note = video_note # VideoNote
self.is_pinned = is_pinned # bool
@staticmethod
def read(q: dict, *args) -> "PushMessageContentVideoNote":
video_note = Object.read(q.get('video_note'))
is_pinned = q.get('is_pinned')
return PushMessageContentVideoNote(video_note, is_pinned)
|
[
"me@amirh.co"
] |
me@amirh.co
|
094cc32163da54a0fdcd050d817137505c7b6b74
|
65329299fca8dcf2e204132624d9b0f8f8f39af7
|
/napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/subTLVs/subTLVs_/max_reservable_link_bandwidth/state/__init__.py
|
b402f8bb5659f387eeb3352f8f0310daa86e68ea
|
[
"Apache-2.0"
] |
permissive
|
darylturner/napalm-yang
|
bf30420e22d8926efdc0705165ed0441545cdacf
|
b14946b884ad2019b896ee151285900c89653f44
|
refs/heads/master
| 2021-05-14T12:17:37.424659
| 2017-11-17T07:32:49
| 2017-11-17T07:32:49
| 116,404,171
| 0
| 0
| null | 2018-01-05T16:21:37
| 2018-01-05T16:21:36
| null |
UTF-8
|
Python
| false
| false
| 362,538
|
py
|
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from decimal import Decimal
from bitarray import bitarray
import __builtin__
class state(PybindBase):
"""
This class was auto-generated by the PythonClass plugin for PYANG
from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/subTLVs/subTLVs/max-reservable-link-bandwidth/state. Each member element of
the container is represented as a class variable - with a specific
YANG type.
YANG Description: State parameters of sub-TLV 10.
"""
__slots__ = ('_pybind_generated_by', '_path_helper', '_yang_name', '_extmethods', '__subtlv_type','__max_reservable_link_bandwidth',)
_yang_name = 'state'
_pybind_generated_by = 'container'
def __init__(self, *args, **kwargs):
self._path_helper = False
self._extmethods = False
self.__subtlv_type = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'ISIS_TLV23_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV242_SR_ALGORITHM': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV141_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV222_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV22_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV237_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV223_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV135_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV22_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV237_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV242_SR_CAPABILITY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV135_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV223_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV242_SR_CAPABILITY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV242_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV222_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV23_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV235_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV141_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV242_SR_ALGORITHM': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV235_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV236_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV236_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV242_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}},), is_leaf=True, yang_name="subtlv-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
self.__max_reservable_link_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': [u'32']}), is_leaf=True, yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
load = kwargs.pop("load", None)
if args:
if len(args) > 1:
raise TypeError("cannot create a YANG container with >1 argument")
all_attr = True
for e in self._pyangbind_elements:
if not hasattr(args[0], e):
all_attr = False
break
if not all_attr:
raise ValueError("Supplied object did not have the correct attributes")
for e in self._pyangbind_elements:
nobj = getattr(args[0], e)
if nobj._changed() is False:
continue
setmethod = getattr(self, "_set_%s" % e)
if load is None:
setmethod(getattr(args[0], e))
else:
setmethod(getattr(args[0], e), load=load)
def _path(self):
if hasattr(self, "_parent"):
return self._parent._path()+[self._yang_name]
else:
return [u'network-instances', u'network-instance', u'protocols', u'protocol', u'isis', u'levels', u'level', u'link-state-database', u'lsp', u'tlvs', u'tlv', u'mt-isn', u'neighbors', u'neighbor', u'subTLVs', u'subTLVs', u'max-reservable-link-bandwidth', u'state']
def _get_subtlv_type(self):
"""
Getter method for subtlv_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/subTLVs/subTLVs/max_reservable_link_bandwidth/state/subtlv_type (identityref)
YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
"""
return self.__subtlv_type
def _set_subtlv_type(self, v, load=False):
"""
Setter method for subtlv_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/subTLVs/subTLVs/max_reservable_link_bandwidth/state/subtlv_type (identityref)
If this variable is read-only (config: false) in the
source YANG file, then _set_subtlv_type is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_subtlv_type() directly.
YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'ISIS_TLV23_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV242_SR_ALGORITHM': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV141_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV222_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV22_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV237_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV223_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV135_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV22_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV237_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV242_SR_CAPABILITY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV135_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV223_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV242_SR_CAPABILITY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV242_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV222_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV23_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV235_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV141_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV242_SR_ALGORITHM': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV235_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV236_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV236_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV242_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}},), is_leaf=True, yang_name="subtlv-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """subtlv_type must be of a type compatible with identityref""",
'defined-type': "openconfig-network-instance:identityref",
'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'ISIS_TLV23_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV242_SR_ALGORITHM': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV141_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV222_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV22_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV237_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV223_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV135_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV22_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV237_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV242_SR_CAPABILITY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV135_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV223_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV242_SR_CAPABILITY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV242_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV222_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV23_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV235_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV141_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV242_SR_ALGORITHM': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV235_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV236_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV236_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV242_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}},), is_leaf=True, yang_name="subtlv-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
})
self.__subtlv_type = t
if hasattr(self, '_set'):
self._set()
def _unset_subtlv_type(self):
self.__subtlv_type = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'ISIS_TLV23_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV242_SR_ALGORITHM': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV141_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV222_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV22_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV237_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV223_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV135_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV22_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV237_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV242_SR_CAPABILITY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV135_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV223_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV242_SR_CAPABILITY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV242_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV222_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV23_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV235_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV141_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV242_SR_ALGORITHM': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV235_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV236_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV236_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV242_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}},), is_leaf=True, yang_name="subtlv-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
def _get_max_reservable_link_bandwidth(self):
"""
Getter method for max_reservable_link_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/subTLVs/subTLVs/max_reservable_link_bandwidth/state/max_reservable_link_bandwidth (oc-types:ieeefloat32)
YANG Description: The maximum amount of bandwidth that can be reserved in this
direction on this link. Note that for oversubscription
purposes, this can be greater than the bandwidth of the link.
It is encoded in 32 bits in IEEE floating point format. The
units are bytes (not bits!) per second.
"""
return self.__max_reservable_link_bandwidth
def _set_max_reservable_link_bandwidth(self, v, load=False):
"""
Setter method for max_reservable_link_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/subTLVs/subTLVs/max_reservable_link_bandwidth/state/max_reservable_link_bandwidth (oc-types:ieeefloat32)
If this variable is read-only (config: false) in the
source YANG file, then _set_max_reservable_link_bandwidth is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_max_reservable_link_bandwidth() directly.
YANG Description: The maximum amount of bandwidth that can be reserved in this
direction on this link. Note that for oversubscription
purposes, this can be greater than the bandwidth of the link.
It is encoded in 32 bits in IEEE floating point format. The
units are bytes (not bits!) per second.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': [u'32']}), is_leaf=True, yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """max_reservable_link_bandwidth must be of a type compatible with oc-types:ieeefloat32""",
'defined-type': "oc-types:ieeefloat32",
'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': [u'32']}), is_leaf=True, yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
})
self.__max_reservable_link_bandwidth = t
if hasattr(self, '_set'):
self._set()
def _unset_max_reservable_link_bandwidth(self):
self.__max_reservable_link_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': [u'32']}), is_leaf=True, yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
subtlv_type = __builtin__.property(_get_subtlv_type)
max_reservable_link_bandwidth = __builtin__.property(_get_max_reservable_link_bandwidth)
_pyangbind_elements = {'subtlv_type': subtlv_type, 'max_reservable_link_bandwidth': max_reservable_link_bandwidth, }
class state(PybindBase):
"""
This class was auto-generated by the PythonClass plugin for PYANG
from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/subTLVs/subTLVs/max-reservable-link-bandwidth/state. Each member element of
the container is represented as a class variable - with a specific
YANG type.
YANG Description: State parameters of sub-TLV 10.
"""
__slots__ = ('_pybind_generated_by', '_path_helper', '_yang_name', '_extmethods', '__subtlv_type','__max_reservable_link_bandwidth',)
_yang_name = 'state'
_pybind_generated_by = 'container'
def __init__(self, *args, **kwargs):
self._path_helper = False
self._extmethods = False
self.__subtlv_type = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'ISIS_TLV23_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV242_SR_ALGORITHM': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV141_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV222_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV22_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV237_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV223_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV135_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV22_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV237_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV242_SR_CAPABILITY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV135_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV223_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV242_SR_CAPABILITY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV242_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV222_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV23_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV235_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV141_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV242_SR_ALGORITHM': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV235_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV236_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV236_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV242_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}},), is_leaf=True, yang_name="subtlv-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
self.__max_reservable_link_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': [u'32']}), is_leaf=True, yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
load = kwargs.pop("load", None)
if args:
if len(args) > 1:
raise TypeError("cannot create a YANG container with >1 argument")
all_attr = True
for e in self._pyangbind_elements:
if not hasattr(args[0], e):
all_attr = False
break
if not all_attr:
raise ValueError("Supplied object did not have the correct attributes")
for e in self._pyangbind_elements:
nobj = getattr(args[0], e)
if nobj._changed() is False:
continue
setmethod = getattr(self, "_set_%s" % e)
if load is None:
setmethod(getattr(args[0], e))
else:
setmethod(getattr(args[0], e), load=load)
def _path(self):
if hasattr(self, "_parent"):
return self._parent._path()+[self._yang_name]
else:
return [u'network-instances', u'network-instance', u'protocols', u'protocol', u'isis', u'levels', u'level', u'link-state-database', u'lsp', u'tlvs', u'tlv', u'mt-isn', u'neighbors', u'neighbor', u'subTLVs', u'subTLVs', u'max-reservable-link-bandwidth', u'state']
def _get_subtlv_type(self):
"""
Getter method for subtlv_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/subTLVs/subTLVs/max_reservable_link_bandwidth/state/subtlv_type (identityref)
YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
"""
return self.__subtlv_type
def _set_subtlv_type(self, v, load=False):
"""
Setter method for subtlv_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/subTLVs/subTLVs/max_reservable_link_bandwidth/state/subtlv_type (identityref)
If this variable is read-only (config: false) in the
source YANG file, then _set_subtlv_type is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_subtlv_type() directly.
YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'ISIS_TLV23_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV242_SR_ALGORITHM': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV141_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV222_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV22_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV237_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV223_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV135_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV22_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV237_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV242_SR_CAPABILITY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV135_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV223_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV242_SR_CAPABILITY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV242_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV222_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV23_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV235_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV141_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV242_SR_ALGORITHM': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV235_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV236_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV236_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV242_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}},), is_leaf=True, yang_name="subtlv-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """subtlv_type must be of a type compatible with identityref""",
'defined-type': "openconfig-network-instance:identityref",
'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'ISIS_TLV23_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV242_SR_ALGORITHM': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV141_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV222_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV22_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV237_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV223_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV135_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV22_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV237_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV242_SR_CAPABILITY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV135_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV223_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV242_SR_CAPABILITY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV242_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV222_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV23_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV235_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV141_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV242_SR_ALGORITHM': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV235_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV236_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV236_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV242_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}},), is_leaf=True, yang_name="subtlv-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
})
self.__subtlv_type = t
if hasattr(self, '_set'):
self._set()
def _unset_subtlv_type(self):
self.__subtlv_type = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'ISIS_TLV23_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV242_SR_ALGORITHM': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV141_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV222_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV22_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV237_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV223_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV135_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV22_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV135_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV237_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV242_SR_CAPABILITY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV135_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV237_TAG': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV223_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV242_SR_CAPABILITY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV4_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV235_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_PREFIX_FLAGS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_IPV4_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_EXTENDED_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV242_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV222_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV23_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV23_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_BANDWIDTH_CONSTRAINTS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV236_IPV4_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV235_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV141_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_ADMIN_GROUP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV141_MAX_RESERVABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV235_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_DELAY_VARIATION': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV242_SR_ALGORITHM': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_ADJ_LAN_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_LINK_LOSS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV235_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV237_PREFIX_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_IPV6_INTERFACE_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV223_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_LINK_PROTECTION_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:ISIS_TLV236_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV135_IPV6_ROUTER_ID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV23_UNCONSTRAINED_LSP': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_LINK_ATTRIBUTES': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV236_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV141_AVAILABLE_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MAX_LINK_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV22_ADJ_SID': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV222_UNRESERVED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'TLV22_UTILIZED_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'ISIS_TLV242_SUBTLVS_TYPE': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_IPV6_NEIGHBOR_ADDRESS': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_TE_DEFAULT_METRIC': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV223_MIN_MAX_LINK_DELAY': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV236_TAG64': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}, u'oc-isis-lsdb-types:TLV222_RESIDUAL_BANDWIDTH': {'@namespace': u'http://openconfig.net/yang/isis-lsdb-types', '@module': u'openconfig-isis-lsdb-types'}},), is_leaf=True, yang_name="subtlv-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
def _get_max_reservable_link_bandwidth(self):
"""
Getter method for max_reservable_link_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/subTLVs/subTLVs/max_reservable_link_bandwidth/state/max_reservable_link_bandwidth (oc-types:ieeefloat32)
YANG Description: The maximum amount of bandwidth that can be reserved in this
direction on this link. Note that for oversubscription
purposes, this can be greater than the bandwidth of the link.
It is encoded in 32 bits in IEEE floating point format. The
units are bytes (not bits!) per second.
"""
return self.__max_reservable_link_bandwidth
def _set_max_reservable_link_bandwidth(self, v, load=False):
"""
Setter method for max_reservable_link_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/subTLVs/subTLVs/max_reservable_link_bandwidth/state/max_reservable_link_bandwidth (oc-types:ieeefloat32)
If this variable is read-only (config: false) in the
source YANG file, then _set_max_reservable_link_bandwidth is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_max_reservable_link_bandwidth() directly.
YANG Description: The maximum amount of bandwidth that can be reserved in this
direction on this link. Note that for oversubscription
purposes, this can be greater than the bandwidth of the link.
It is encoded in 32 bits in IEEE floating point format. The
units are bytes (not bits!) per second.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': [u'32']}), is_leaf=True, yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """max_reservable_link_bandwidth must be of a type compatible with oc-types:ieeefloat32""",
'defined-type': "oc-types:ieeefloat32",
'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': [u'32']}), is_leaf=True, yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
})
self.__max_reservable_link_bandwidth = t
if hasattr(self, '_set'):
self._set()
def _unset_max_reservable_link_bandwidth(self):
self.__max_reservable_link_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': [u'32']}), is_leaf=True, yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
subtlv_type = __builtin__.property(_get_subtlv_type)
max_reservable_link_bandwidth = __builtin__.property(_get_max_reservable_link_bandwidth)
_pyangbind_elements = {'subtlv_type': subtlv_type, 'max_reservable_link_bandwidth': max_reservable_link_bandwidth, }
|
[
"dbarrosop@dravetech.com"
] |
dbarrosop@dravetech.com
|
55cb8394c6b3fb21b36bb395f4b6ef5f6633ba0d
|
4f04ad7b7f3e5bf921e3328b0cf5b92fa4cbbd1c
|
/src/__init__.py
|
97e4a1cf2d15396564270756ecceba93192c37f0
|
[
"MIT"
] |
permissive
|
Manwholikespie/desumoin
|
dca76a72f5e14cb54d619534dd710fbf45280c29
|
8391462c00c82556bd1aa327965c655053f2f7fa
|
refs/heads/master
| 2023-05-27T17:16:52.935643
| 2019-10-17T02:43:18
| 2019-10-17T02:43:18
| 164,559,798
| 0
| 0
|
MIT
| 2023-05-01T20:31:25
| 2019-01-08T04:22:03
|
Python
|
UTF-8
|
Python
| false
| false
| 1,107
|
py
|
import logging
import uuid
import flask
from src.extensions import assets
from src.auth import auth_manager
from src.views import register_views
def create_app(config):
""" App factory. """
app = flask.Flask(__name__)
app.config.from_object(config)
# Debugging
if app.config['DEBUG']:
app.logger.setLevel(logging.DEBUG)
else:
app.logger.setLevel(logging.WARNING)
# Logging
if 'LOG_FILE' in app.config:
from logging.handlers import RotatingFileHandler
app.log_handler = RotatingFileHandler(
app.config['LOG_FILE'], maxBytes=10000, backupCount=1)
app.logger.addHandler(app.log_handler)
if not app.config['DEBUG']:
@app.errorhandler(500)
def internal_error(exception):
random_id = uuid.uuid4()
app.logger.error('Exception occurred. ID: %s' % random_id,
exc_info=exception)
# Database
# TODO: Add boilerplate code for setting up a database.
assets.init_app(app)
auth_manager.init_app(app)
register_views(app)
return app
|
[
"rdominguez@me.com"
] |
rdominguez@me.com
|
c9c4e9ad3822745d18f03d391e9f83130f245031
|
bf1130a1df6978eb528bebec358f9424135204eb
|
/split_store_backup_utfbscs_report_clean_check.py
|
63bba9162e3517425cd10dba40621b649d52a586
|
[] |
no_license
|
ookubo-soichi/hello-world
|
d1444f261abf909802b53e6e86c92999b518373b
|
c69ecf2b42bad232e7ee3e533ec4e2dd659c22be
|
refs/heads/master
| 2021-07-04T03:24:21.733984
| 2021-05-18T13:04:57
| 2021-05-18T13:04:57
| 22,738,902
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 7,460
|
py
|
import os
import re
import shutil
import ctypes
dll = ctypes.windll.trash
animetitle_long = ["通常攻撃が全体攻撃で二回攻撃のお母さんは好きですか",
"可愛ければ変態でも好きになってくれますか",
"この世の果てで恋を唄う少女",
"ありふれた職業で世界最強",
"世話やきキツネの仙狐さん",
"荒ぶる季節の乙女どもよ",
"かつて神だった獣たちへ",
"とある科学の一方通行",
"女子高生の無駄づかい",
"ダンベル何キロ持てる",
"異世界チート魔術師",
"フルーツバスケット",
"ロード・エルメロイ",
"うちの娘の為ならば",
"ヴィンランド・サガ",
"魔王様、リトライ",
"ナカノヒトゲノム",
"彼方のアストラ",
"まちカドまぞく",
"コップクラフト",
"トライナイツ",
"グランベルム",
"炎炎ノ消防隊",
"チューズデイ",
"STONE",
"サイコパス",
"鬼滅の刃",
"ギヴン",
"胡蝶綺",
"BEM",
]
animetitle_short = ["手品先輩",
"ソウナンですか",]
animetitle_long = list(set(animetitle_long))
animetitle = list(set(animetitle_long + animetitle_short))
utf_chs = ['チャンネル:TOKYO\u3000MX1\n',
'チャンネル:東海テレビ011\n',
'チャンネル:テレビ愛知1\n',
'チャンネル:中京テレビ1\n',
'チャンネル:CBCテレビ\n',
'チャンネル:テレビ東京1\n',
'チャンネル:フジテレビ\n',
'チャンネル:TBS1\n',
'チャンネル:日テレ1\n',
]
bscs_chs = ['チャンネル:BS11イレブン\n',
'チャンネル:BSアニマックス\n',
'チャンネル:BSフジ・181\n',
'チャンネル:BSジャパン\n',
'チャンネル:BS-TBS\n',
]
main_dir = "D:\\animeonair\\"
backup_dir = "F:\\animebackup\\"
bs = "BS\\"
utf = "UTF\\"
def existHDST(title):
for file in os.listdir():
if re.search(title+".*HD(-\d)?.*\.ts",file):
return 1
else:
pass
return 0
def error_or_drop(file):
is_error_or_drop = 0
for line in open(file,errors='ignore').readlines():
if ((re.search("総パケットエラー数",line)
and (not re.search("総パケットエラー数:0",line)))
or
(re.search("総パケットドロップ数",line)
and (not re.search("総パケットドロップ数:0",line)))):
is_error_or_drop = 1
else:
pass
return is_error_or_drop
for title in animetitle:
for d in [main_dir+bs, main_dir+utf, backup_dir+bs, backup_dir+utf]:
if not os.path.exists(d+title):
os.mkdir(d+title)
if not os.path.exists("その他"):
os.mkdir("その他")
wrong_short_flag = False
for title in animetitle_long:
for file in os.listdir():
if re.search(title+".*\.ts",file) and 1.5 * 1024 ** 3 > os.path.getsize(file):
print ('Short Title:'+title)
wrong_short_flag = True
if wrong_short_flag:
input()
sys.exit()
for title in animetitle:
for file in os.listdir():
if re.search(title+".*\.txt",file):
if error_or_drop(file):
print(file.split('.')[0])
for line in open(file,errors='ignore').readlines():
if re.search("チャンネル",line):
print(line.rstrip().split(":")[-1],end=", ")
elif re.search("総パケットエラー数",line):
print(line.rstrip(),end=", ")
elif re.search("総パケットドロップ数",line):
print(line.rstrip()+'\n')
else:
pass
for title in animetitle_long:
for file in os.listdir():
if re.search(title+".*\.ts",file):
os.system('TsSplitter -SD -1SEG -SEP2 -SEPA "'+file+'"')
pass
for title in animetitle_long:
for file in os.listdir():
if re.search(title+".*\.ts",file) and 1024 ** 3 > os.path.getsize(file):
dll.trash(file)
for title in animetitle:
for file in os.listdir():
if re.search(title+".*HD(-\d)?.*\.ts",file):
dll.trash(file.split('_')[0]+'.ts')
for title in animetitle_long:
for file in os.listdir():
if re.search(title+".*\.ts",file) and 1.6 * (1000 ** 3) > os.path.getsize(file):
print("Warning : File Size is Small")
print(file)
print("End of Warning")
for title in animetitle:
if existHDST(title):
for file in os.listdir():
if re.search(title+".*HD(-\d)?.*\.ts",file):
if open(file.split('_')[0]+'.txt', 'r', errors='ignore').readline() in utf_chs:
shutil.move(file,utf+title)
else:
shutil.move(file,bs+title)
elif re.search(title+".*\.ts",file):
if open(file.split('.')[0]+'.txt', 'r', errors='ignore').readline() in utf_chs:
shutil.move(file,utf+title)
else:
shutil.move(file,bs+title)
else:
pass
else:
for file in os.listdir():
if re.search(title+".*\.ts",file):
if open(file.split('.')[0]+'.txt', 'r', errors='ignore').readline() in utf_chs:
shutil.move(file,utf+title)
else:
shutil.move(file,bs+title)
else:
pass
for file in os.listdir():
if os.path.splitext(file)[1] == ".ts":
shutil.move(file,"その他")
for title in animetitle:
for file in os.listdir():
if re.search(title+".*\.txt",file):
dll.trash(file)
uncopyed_num = 0
copyed_num = 0
for title in animetitle:
for ch in [bs, utf]:
uncopyed_num += len(list(set(os.listdir(main_dir+ch+title)) - set(os.listdir(backup_dir+ch+title))))
for title in animetitle:
for ch in [bs, utf]:
for uncopyed in list(set(os.listdir(main_dir+ch+title))-set(os.listdir(backup_dir+ch+title))):
copyed_num += 1
print("copying %d/%d" % (copyed_num,uncopyed_num))
print(uncopyed)
shutil.copy(main_dir+ch+title+"\\"+uncopyed,backup_dir+ch+title)
for d in [main_dir+bs, main_dir+utf, backup_dir+bs, backup_dir+utf]:
folders = [x for x in os.listdir(d) if os.path.isdir(d)]
for f in folders:
if os.listdir(d+f) == []:
dll.trash(d+f)
|
[
"noreply@github.com"
] |
ookubo-soichi.noreply@github.com
|
9762e137224e3eece6dd68d78bd3f401c20ca4b3
|
65f6b3c99020bc06d13a5978042eb4a1e469fdd2
|
/db.py
|
cbc89eabf1ece7188a4de5f191092881c699ff57
|
[] |
no_license
|
shatiwa/Coding
|
b09ebf39826aed9c62f1aa0fa62dcf8ab3642b3f
|
089d113387c46be6f22add6254b0f155db214aee
|
refs/heads/master
| 2022-11-08T15:54:45.259013
| 2020-07-13T13:15:23
| 2020-07-13T13:15:23
| 279,384,013
| 0
| 0
| null | 2020-07-13T18:39:59
| 2020-07-13T18:39:58
| null |
UTF-8
|
Python
| false
| false
| 1,153
|
py
|
import sqlite3
class DB:
def __init__(self, dbname="details.sqlite"):
self.dbname = dbname
self.conn = sqlite3.connect(dbname)
def setup(self):
stmt = "CREATE TABLE IF NOT EXISTS INFO(Name text, College text, Sideproject text, Language text, Framework text, Board text, Confirm text)"
self.conn.execute(stmt)
self.conn.commit()
def add_item(self, Name, City, Locality, Pincode, Modeofcontact, MailID, Phone_Number, Requirements, Board, Standard, Medium, Subjects, Deal_Type):
stmt = "INSERT INTO INFO (Name, College, Sideproject, Language, Framework, Confirm) VALUES (?, ?, ?, ?, ?, ?)"
args = ( Name, College, Sideproject, Language, Framework, Confirm)
self.conn.execute(stmt, args)
self.conn.commit()
def delete_item(self, item_text):
stmt = "DELETE FROM items WHERE description = (?)"
args = (item_text, )
self.conn.execute(stmt, args)
self.conn.commit()
def get_items(self):
stmt = "SELECT Name, College, Sideproject, Language, Framework, Confirm FROM INFO"
return [x for x in self.conn.execute(stmt)]
|
[
"noreply@github.com"
] |
shatiwa.noreply@github.com
|
35ec3f9244dfe4fc94f5752e31bfe340d3af01f6
|
6676867d1b645bd6d8fc7c79d85d7e943a3a3550
|
/ROS/skinny/build/messages/catkin_generated/pkg.develspace.context.pc.py
|
1c89a5b220d0bc484b871b76fddd3217220ecb66
|
[] |
no_license
|
Razorbotz/RMC-Code-20-21
|
88604410293c5edb7a877365aa8bbf2a9cb4141b
|
f1a5a9c99a3af840188f8dc3a680c0453600ee02
|
refs/heads/master
| 2023-07-18T03:44:26.445419
| 2021-05-11T18:08:24
| 2021-05-11T18:08:24
| 336,593,274
| 3
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 493
|
py
|
# generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/team/SoftwareDevelopment/ROS/devel/include".split(';') if "/home/team/SoftwareDevelopment/ROS/devel/include" != "" else []
PROJECT_CATKIN_DEPENDS = "message_runtime".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "messages"
PROJECT_SPACE_DIR = "/home/team/SoftwareDevelopment/ROS/devel"
PROJECT_VERSION = "0.0.0"
|
[
"andrewburroughs17@gmail.com"
] |
andrewburroughs17@gmail.com
|
857a66af872eeadeb1b03d6408394cbbfd9e33dd
|
d4b68672c2e016ccafe3ab9175ecea46ffcab0c4
|
/python/files.py
|
ec41cf582cbd85d0fe537389c7664fd3b9ab7a49
|
[] |
no_license
|
ShivamSainier/socket_chat-in-python-
|
e00bda1bbc023faafb2c9ed2f4bc46e9858d8980
|
275fff8ccf9cdd2552f82813ada881e0eff8c2ff
|
refs/heads/master
| 2022-04-18T06:26:29.056682
| 2020-03-03T04:58:46
| 2020-03-03T04:58:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 100
|
py
|
# Reading and writing files in python
file=open('test.txt','r') # Open a file
print(file.read())
|
[
"ss1907364@gmail.com"
] |
ss1907364@gmail.com
|
64fca505a0e04157d06ac57fce5f84b1bdc24c9a
|
d79115d281b7e0b868e0aa1129e1b041cc7868c4
|
/KS201905271228/addons/plugin.video.vstream/resources/sites/streamzzz_com.py
|
3a81aa2276a021740abf68262c8cf1b93ecb540f
|
[] |
no_license
|
Salva59s/kodirepo
|
4989a2b322b23d9e17c333103cfbcee08ff520bc
|
3e5f58f6760d03cb2b8f3fb3dd6ae52dae125b4f
|
refs/heads/master
| 2020-05-27T17:55:18.890216
| 2020-03-14T14:25:14
| 2020-03-14T14:25:14
| 188,731,353
| 1
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 14,228
|
py
|
#-*- coding: utf-8 -*-
# https://github.com/Kodi-vStream/venom-xbmc-addons
#voir episode avec ex: 2 x 1 au lieu de 2 - 1
from resources.lib.gui.hoster import cHosterGui
from resources.lib.gui.gui import cGui
from resources.lib.handler.inputParameterHandler import cInputParameterHandler
from resources.lib.handler.outputParameterHandler import cOutputParameterHandler
from resources.lib.handler.requestHandler import cRequestHandler
from resources.lib.parser import cParser
from resources.lib.comaddon import progress
from resources.lib.util import cUtil
import re
SITE_IDENTIFIER = 'streamzzz_com'
SITE_NAME = 'Streamzzz'
SITE_DESC = 'Séries VF & VOSTFR en streaming.'
URL_MAIN = 'https://streamzzz.top/'
URL_SEARCH = (URL_MAIN + '?s=', 'showMovies')
URL_SEARCH_MOVIES = (URL_MAIN + '?s=', 'showMovies')
URL_SEARCH_SERIES = (URL_MAIN + '?s=', 'showMovies')
FUNCTION_SEARCH = 'showMovies'
MOVIE_NEWS = (URL_MAIN + 'movies/', 'showMovies')
MOVIE_MOVIE = (URL_MAIN + 'movies/', 'showMovies')
MOVIE_GENRES = (True, 'showGenres')
SERIE_NEWS = (URL_MAIN + 'episodes/', 'showMovies')
SERIE_SERIES = (URL_MAIN + 'series/', 'showMovies')
SERIE_VIEWS = (URL_MAIN + 'trending/', 'showMovies')
SERIE_NOTES = (URL_MAIN + 'ratings/', 'showMovies')
SERIE_LIST = (URL_MAIN + 'series-list/', 'showAlpha')
SERIE_GENRES = (True, 'showGenres')
UA = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:61.0) Gecko/20100101 Firefox/61.0'
def load():
oGui = cGui()
oOutputParameterHandler = cOutputParameterHandler()
oOutputParameterHandler.addParameter('siteUrl', 'http://venom/')
oGui.addDir(SITE_IDENTIFIER, 'showSearch', 'Recherche', 'search.png', oOutputParameterHandler)
oOutputParameterHandler = cOutputParameterHandler()
oOutputParameterHandler.addParameter('siteUrl', MOVIE_NEWS[0])
oGui.addDir(SITE_IDENTIFIER, MOVIE_NEWS[1], 'Films (Derniers ajouts)', 'news.png', oOutputParameterHandler)
oOutputParameterHandler = cOutputParameterHandler()
oOutputParameterHandler.addParameter('siteUrl', SERIE_NEWS[0])
oGui.addDir(SITE_IDENTIFIER, SERIE_NEWS[1], 'Séries (Derniers ajouts)', 'news.png', oOutputParameterHandler)
oOutputParameterHandler = cOutputParameterHandler()
oOutputParameterHandler.addParameter('siteUrl', SERIE_SERIES[0])
oGui.addDir(SITE_IDENTIFIER, SERIE_SERIES[1], 'Séries', 'series.png', oOutputParameterHandler)
oOutputParameterHandler = cOutputParameterHandler()
oOutputParameterHandler.addParameter('siteUrl', SERIE_VIEWS[0])
oGui.addDir(SITE_IDENTIFIER, SERIE_VIEWS[1], 'Séries (Les plus vues)', 'views.png', oOutputParameterHandler)
oOutputParameterHandler = cOutputParameterHandler()
oOutputParameterHandler.addParameter('siteUrl', SERIE_NOTES[0])
oGui.addDir(SITE_IDENTIFIER, SERIE_NOTES[1], 'Séries (Les mieux notés)', 'notes.png', oOutputParameterHandler)
oOutputParameterHandler = cOutputParameterHandler()
oOutputParameterHandler.addParameter('siteUrl', SERIE_LIST[0])
oGui.addDir(SITE_IDENTIFIER, SERIE_LIST[1], 'Séries (Liste)', 'az.png', oOutputParameterHandler)
oOutputParameterHandler = cOutputParameterHandler()
oOutputParameterHandler.addParameter('siteUrl', SERIE_GENRES[0])
oGui.addDir(SITE_IDENTIFIER, SERIE_GENRES[1], 'Séries (Genres)', 'genres.png', oOutputParameterHandler)
oGui.setEndOfDirectory()
def showSearch():
oGui = cGui()
sSearchText = oGui.showKeyBoard()
if (sSearchText != False):
sUrl = URL_SEARCH[0] + sSearchText
showMovies(sUrl)
oGui.setEndOfDirectory()
return
def showGenres():
oGui = cGui()
oParser = cParser()
oRequestHandler = cRequestHandler(URL_MAIN)
sHtmlContent = oRequestHandler.request()
sPattern = '<li class="cat-item cat-item.+?"><a href="([^<]+)" *>([^<]+)</a>.+?<i>([^<]+)</i>'
aResult = oParser.parse(sHtmlContent, sPattern)
if (aResult[0] == True):
for aEntry in aResult[1]:
sTitle = aEntry[1] + ' (' + aEntry[2] + ')'
sUrl = aEntry[0]
oOutputParameterHandler = cOutputParameterHandler()
oOutputParameterHandler.addParameter('siteUrl', sUrl)
oGui.addDir(SITE_IDENTIFIER, 'showMovies', sTitle, 'genres.png', oOutputParameterHandler)
oGui.setEndOfDirectory()
def showAlpha():
oGui = cGui()
oParser = cParser()
oRequestHandler = cRequestHandler(SERIE_LIST[0])
sHtmlContent = oRequestHandler.request()
sPattern = '<span style="color: red;">(.+?)<\/span>'
aResult = oParser.parse(sHtmlContent, sPattern)
if (aResult[0] == True):
total = len(aResult[1])
progress_ = progress().VScreate(SITE_NAME)
for aEntry in aResult[1]:
progress_.VSupdate(progress_, total)
if progress_.iscanceled():
break
sLetter = aEntry.replace('=', '')
dAZ = aEntry
oOutputParameterHandler = cOutputParameterHandler()
oOutputParameterHandler.addParameter('dAZ', dAZ)
oGui.addDir(SITE_IDENTIFIER, 'showList', 'Lettre [COLOR coral]' + sLetter + '[/COLOR]', 'az.png', oOutputParameterHandler)
progress_.VSclose(progress_)
oGui.setEndOfDirectory()
def showList():
oGui = cGui()
oParser = cParser()
oInputParameterHandler = cInputParameterHandler()
dAZ = oInputParameterHandler.getValue('dAZ')
oRequestHandler = cRequestHandler(SERIE_LIST[0])
sHtmlContent = oRequestHandler.request()
#Decoupage pour cibler une partie Film
sPattern = '<span style="color: red;">' + dAZ + '<(.+?)<(span style="color: red;">|/tbody>)'
aResult = oParser.parse(sHtmlContent, sPattern)
#regex pour listage films sur la partie decoupée
sPattern = '<a href="([^<]+)" *target="_blank">(.+?)<\/a>'
aResult = oParser.parse(aResult, sPattern)
if (aResult[0] == False):
oGui.addText(SITE_IDENTIFIER)
if (aResult[0] == True):
total = len(aResult[1])
progress_ = progress().VScreate(SITE_NAME)
for aEntry in aResult[1]:
progress_.VSupdate(progress_, total)
if progress_.iscanceled():
break
sUrl = aEntry[0]
sTitle = aEntry[1].decode("unicode_escape").encode("latin-1")
oOutputParameterHandler = cOutputParameterHandler()
oOutputParameterHandler.addParameter('siteUrl', sUrl)
oGui.addDir(SITE_IDENTIFIER, 'showSerieSaisons', sTitle, 'az.png', oOutputParameterHandler)
progress_.VSclose(progress_)
oGui.setEndOfDirectory()
def showMovies(sSearch = ''):
oGui = cGui()
if sSearch:
sUrl = sSearch.replace(' ','+')
else:
oInputParameterHandler = cInputParameterHandler()
sUrl = oInputParameterHandler.getValue('siteUrl')
oRequestHandler = cRequestHandler(sUrl)
sHtmlContent = oRequestHandler.request()
oParser = cParser()
sPattern = '<div class="(?:poster|result-item)".+?img src="(http[^"]+)" alt="([^"]+)".+?href="([^"]+)">'
aResult = oParser.parse(sHtmlContent, sPattern)
if (aResult[0] == False):
oGui.addText(SITE_IDENTIFIER)
if (aResult[0] == True):
total = len(aResult[1])
progress_ = progress().VScreate(SITE_NAME)
for aEntry in aResult[1]:
progress_.VSupdate(progress_, total)
if progress_.iscanceled():
break
sThumb = aEntry[0]
sTitle = aEntry[1].replace(':', '')
sUrl2 = aEntry[2]
sDesc = ''
#tris search
if sSearch and total > 3:
if cUtil().CheckOccurence(sSearch.replace(URL_SEARCH[0], ''), sTitle) == 0:
continue
oOutputParameterHandler = cOutputParameterHandler()
oOutputParameterHandler.addParameter('siteUrl', sUrl2)
oOutputParameterHandler.addParameter('sMovieTitle', sTitle)
oOutputParameterHandler.addParameter('sThumb', sThumb )
if '/episodes/' in sUrl2:
oGui.addTV(SITE_IDENTIFIER, 'showLinks', sTitle, '', sThumb, sDesc, oOutputParameterHandler)
elif '/movies/' in sUrl2:
oGui.addMovie(SITE_IDENTIFIER, 'showLinks', sTitle, '', sThumb, sDesc, oOutputParameterHandler)
else:
oGui.addTV(SITE_IDENTIFIER, 'showSerieSaisons', sTitle, '', sThumb, sDesc, oOutputParameterHandler)
progress_.VSclose(progress_)
sNextPage = __checkForNextPage(sHtmlContent)
if (sNextPage != False):
oOutputParameterHandler = cOutputParameterHandler()
oOutputParameterHandler.addParameter('siteUrl', sNextPage)
oGui.addNext(SITE_IDENTIFIER, 'showMovies', '[COLOR teal]Next >>>[/COLOR]', oOutputParameterHandler)
if not sSearch:
oGui.setEndOfDirectory()
def __checkForNextPage(sHtmlContent):
oParser = cParser()
sPattern = '<span class="current">.+?</span><a href=\'(.+?)\''
aResult = oParser.parse(sHtmlContent, sPattern)
if (aResult[0] == True):
return aResult[1][0]
return False
def showSerieSaisons():
oGui = cGui()
oInputParameterHandler = cInputParameterHandler()
sUrl = oInputParameterHandler.getValue('siteUrl')
sThumb = oInputParameterHandler.getValue('sThumb')
sMovieTitle = oInputParameterHandler.getValue('sMovieTitle')
oRequestHandler = cRequestHandler(sUrl)
sHtmlContent = oRequestHandler.request()
sPattern = '<div class="numerando">([^<]+)<\/div>.+?<a href="([^"]+)">([^<]+)<\/a>'
oParser = cParser()
aResult = oParser.parse(sHtmlContent, sPattern)
if (aResult[0] == True):
total = len(aResult[1])
progress_ = progress().VScreate(SITE_NAME)
for aEntry in aResult[1]:
progress_.VSupdate(progress_, total)
if progress_.iscanceled():
break
sUrl2 = aEntry[1]
#a voir
if 'x' in aEntry[0]:
sSXXEXX = str(aEntry[0]).replace(' ', '').split('x')
else:
sSXXEXX = str(aEntry[0]).replace(' ', '').split('-')
sTitle = "saison " + sSXXEXX[0] + 'episode' + sSXXEXX[1] + ' ' + aEntry[2]
oOutputParameterHandler = cOutputParameterHandler()
oOutputParameterHandler.addParameter('siteUrl', sUrl2)
oOutputParameterHandler.addParameter('sMovieTitle', sTitle)
oOutputParameterHandler.addParameter('sThumb', sThumb )
oGui.addTV(SITE_IDENTIFIER, 'showLinks', sTitle, '', sThumb, '', oOutputParameterHandler)
progress_.VSclose(progress_)
oGui.setEndOfDirectory()
def showLinks():
oGui = cGui()
oInputParameterHandler = cInputParameterHandler()
sUrl = oInputParameterHandler.getValue('siteUrl')
sThumb = oInputParameterHandler.getValue('sThumb')
sMovieTitle = oInputParameterHandler.getValue('sMovieTitle')
oParser = cParser()
oRequest = cRequestHandler(sUrl)
oRequest.addHeaderEntry('referer', URL_MAIN)
sHtmlContent = oRequest.request()
cook = oRequest.GetCookies()
#récupération du Synopsis
sDesc = ''
try:
sPattern = '<p>(.+?)<\/p>'
aResult = oParser.parse(sHtmlContent, sPattern)
if aResult[0]:
sDesc = aResult[1][0]
sDesc = sDesc.replace('…', '...')
except:
pass
sPattern = '<a href="#playex".+?<img src=".+?.googleusercontent.com.+?alt="([^"]+)">.+?document.getElementsByName.+?\(\'src\', \'(.+?)\'\);.+?<td>([^<]+)<\/td><td>'
aResult = oParser.parse(sHtmlContent, sPattern)
if (aResult[0] == True):
total = len(aResult[1])
progress_ = progress().VScreate(SITE_NAME)
for aEntry in aResult[1]:
progress_.VSupdate(progress_, total)
if progress_.iscanceled():
break
sHost = re.sub('\.\w+', '', aEntry[0])
if 'nowvideo' in sHost or 'youvid' in sHost:
continue
sHost = sHost.capitalize()
sUrl2 = aEntry[1]
sLang = aEntry[2]
sTitle = ('%s (%s) [COLOR coral]%s[/COLOR]') % (sMovieTitle, sLang, sHost)
oOutputParameterHandler = cOutputParameterHandler()
oOutputParameterHandler.addParameter('siteUrl', sUrl2)
oOutputParameterHandler.addParameter('sMovieTitle', sMovieTitle)
oOutputParameterHandler.addParameter('sThumb', sThumb )
oOutputParameterHandler.addParameter('sCook', cook)
oOutputParameterHandler.addParameter('ref',sUrl)
oGui.addLink(SITE_IDENTIFIER, 'showHosters', sTitle, sThumb, sDesc, oOutputParameterHandler)
progress_.VSclose(progress_)
oGui.setEndOfDirectory()
def showHosters():
oGui = cGui()
oInputParameterHandler = cInputParameterHandler()
sUrl = oInputParameterHandler.getValue('siteUrl')
sMovieTitle = oInputParameterHandler.getValue('sMovieTitle')
sThumb = oInputParameterHandler.getValue('sThumb')
sCook = oInputParameterHandler.getValue('sCook')
sRef = oInputParameterHandler.getValue('ref')
# pdata = 'action=url&episode='+sUrl
# oRequest = cRequestHandler('http://streamzzz.top/wp-content/themes/streamzzz/action.php')
# oRequest.setRequestType(1)
# oRequest.addHeaderEntry('User-Agent', UA)
# oRequest.addHeaderEntry('Cookie', sCook)
# oRequest.addHeaderEntry('Referer', ref)
# oRequest.addHeaderEntry('Accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8')
# oRequest.addHeaderEntry('Accept-Language', 'fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3')
# oRequest.addParametersLine(pdata)
# sUrl2 = oRequest.request()
oRequest = cRequestHandler(sUrl)
oRequest.addHeaderEntry('User-Agent', UA)
oRequest.addHeaderEntry('Cookie', sCook)
oRequest.addHeaderEntry('Referer', sRef)
sHtmlContent = oRequest.request()
sHosterUrl = oRequest.getRealUrl()
oHoster = cHosterGui().checkHoster(sHosterUrl)
if (oHoster != False):
oHoster.setDisplayName(sMovieTitle)
oHoster.setFileName(sMovieTitle)
cHosterGui().showHoster(oGui, oHoster, sHosterUrl, sThumb)
oGui.setEndOfDirectory()
|
[
"48624308+Salva59s@users.noreply.github.com"
] |
48624308+Salva59s@users.noreply.github.com
|
f8d37e2820659c14d76526cffac90b73ea471a17
|
c3f85d8d2d3d637829981a3758daeb0c360b4bba
|
/tests/test_utils.py
|
1cec0a1f896e85143d15a4882be971e3b89afb3b
|
[] |
no_license
|
edumotya/gstreamer-python
|
e95b0a6f03bb2d48231196845c8d5865eaef48eb
|
8704ee6cfb32b10e103b5ed8c37c808a10376973
|
refs/heads/master
| 2022-06-13T09:19:59.489904
| 2020-05-04T10:23:51
| 2020-05-04T10:23:51
| 255,419,719
| 0
| 0
| null | 2020-04-13T19:14:06
| 2020-04-13T19:14:05
| null |
UTF-8
|
Python
| false
| false
| 6,019
|
py
|
import os
import time
import math
import typing as typ
from random import randint
from fractions import Fraction
import numpy as np
import pytest
from gstreamer import GstVideo, Gst
import gstreamer as gst
import gstreamer.utils as utils
NUM_BUFFERS = 10
WIDTH, HEIGHT = 1920, 1080
FPS = 15
FORMAT = "RGB"
Frame = typ.NamedTuple(
'Frame', [
('buffer_format', GstVideo.VideoFormat),
('buffer', np.ndarray),
])
FRAMES = [
Frame(GstVideo.VideoFormat.RGB, np.random.randint(
low=0, high=255, size=(HEIGHT, WIDTH, 3), dtype=np.uint8)),
Frame(GstVideo.VideoFormat.RGBA, np.random.randint(
low=0, high=255, size=(HEIGHT, WIDTH, 4), dtype=np.uint8)),
Frame(GstVideo.VideoFormat.GRAY8, np.random.randint(
low=0, high=255, size=(HEIGHT, WIDTH), dtype=np.uint8)),
Frame(GstVideo.VideoFormat.GRAY16_BE, np.random.uniform(
0, 1, (HEIGHT, WIDTH)).astype(np.float32))
]
def test_video_sink():
num_buffers = NUM_BUFFERS
command = "appsrc emit-signals=True is-live=True ! videoconvert ! fakesink sync=false"
for frame in FRAMES:
h, w = frame.buffer.shape[:2]
with gst.GstContext(), gst.GstVideoSink(command, width=w, height=h, video_frmt=frame.buffer_format) as pipeline:
assert pipeline.total_buffers_count == 0
# wait pipeline to initialize
max_num_tries, num_tries = 5, 0
while not pipeline.is_active and num_tries <= max_num_tries:
time.sleep(.1)
num_tries += 1
assert pipeline.is_active
for _ in range(num_buffers):
pipeline.push(frame.buffer)
assert pipeline.total_buffers_count == num_buffers
def test_video_source():
num_buffers = NUM_BUFFERS
width, height = WIDTH, HEIGHT
formats = [GstVideo.VideoFormat.to_string(f.buffer_format) for f in FRAMES]
for fmt in formats:
caps_filter = 'capsfilter caps=video/x-raw,format={},width={},height={}'.format(
fmt, width, height)
command = 'videotestsrc num-buffers={} ! {} ! appsink emit-signals=True sync=false'.format(
num_buffers, caps_filter)
with gst.GstContext(), gst.GstVideoSource(command) as pipeline:
num_read = 0
while num_read < num_buffers:
buffer = pipeline.pop()
if buffer:
num_read += 1
h, w = buffer.data.shape[:2]
assert h == height and w == width
assert pipeline.total_buffers_count == num_buffers
def test_gst_pipeline():
command = "videotestsrc num-buffers=100 ! fakesink sync=false"
with gst.GstContext(), gst.GstPipeline(command) as pipeline:
assert isinstance(pipeline, gst.GstPipeline)
# @pytest.mark.skip
def test_video_src_to_source():
num_buffers = NUM_BUFFERS
for frame in FRAMES:
buffer = frame.buffer
h, w = buffer.shape[:2]
sink_cmd = "appsrc emit-signals=True is-live=True ! videoconvert ! fakesink sync=false"
fmt = GstVideo.VideoFormat.to_string(frame.buffer_format)
caps_filter = f'capsfilter caps=video/x-raw,format={fmt},width={w},height={h}'
src_cmd = f'videotestsrc num-buffers={num_buffers} ! {caps_filter} ! appsink emit-signals=True sync=false'
with gst.GstContext(), gst.GstVideoSink(sink_cmd, width=w, height=h, video_frmt=frame.buffer_format) as sink, \
gst.GstVideoSource(src_cmd) as src:
assert sink.total_buffers_count == 0
# wait pipeline to initialize
max_num_tries, num_tries = 5, 0
while not sink.is_active and num_tries <= max_num_tries:
time.sleep(.1)
num_tries += 1
assert sink.is_active
num_read = 0
while num_read < num_buffers:
buffer = src.pop()
if buffer:
num_read += 1
sink.push(buffer.data, pts=buffer.pts,
dts=buffer.dts, offset=buffer.offset)
assert src.total_buffers_count == num_buffers
assert sink.total_buffers_count == num_buffers
def test_metadata():
np_buffer = np.random.randint(
low=0, high=255, size=(HEIGHT, WIDTH, 3), dtype=np.uint8)
gst_buffer = gst.ndarray_to_gst_buffer(np_buffer)
from gstreamer.gst_objects_info_meta import gst_meta_write, gst_meta_get, gst_meta_remove
objects = [
{'class_name': "person", 'bounding_box': [
8, 10, 100, 100], 'confidence': 0.6, 'track_id': 1},
{'class_name': "person", 'bounding_box': [
10, 9, 120, 110], 'confidence': 0.67, 'track_id': 2},
]
# no metadata at the beginning
assert len(gst_meta_get(gst_buffer)) == 0
# write metadata
gst_meta_write(gst_buffer, objects)
# read metadata
meta_objects = gst_meta_get(gst_buffer)
assert len(gst_meta_get(gst_buffer)) == len(objects)
for gst_meta_obj, py_obj in zip(meta_objects, objects):
for key, val in py_obj.items():
if isinstance(gst_meta_obj[key], float):
assert math.isclose(gst_meta_obj[key], val, rel_tol=1e-07)
else:
assert gst_meta_obj[key] == val
# remove metadata
gst_meta_remove(gst_buffer)
assert len(gst_meta_get(gst_buffer)) == 0
def test_gst_buffer_to_ndarray():
caps = Gst.Caps.from_string(
"video/x-raw,format={},width={},height={}".format(FORMAT, WIDTH, HEIGHT))
video_format = utils.gst_video_format_from_string(FORMAT)
channels = utils.get_num_channels(video_format)
dtype = utils.get_np_dtype(video_format)
npndarray = np.random.randint(low=0, high=255, size=(
HEIGHT, WIDTH, channels), dtype=dtype)
gst_buffer = utils.ndarray_to_gst_buffer(npndarray)
res_npndarray = utils.gst_buffer_with_caps_to_ndarray(gst_buffer, caps)
assert (npndarray == res_npndarray).all()
|
[
"jackersson@meta.ua"
] |
jackersson@meta.ua
|
843549c01f6394022291fe0ead53d4d7656862d3
|
070c04673e045a20c3e26a566e9ff2c14c5540d1
|
/xknx/knx/dpt_scaling.py
|
c2d8567808e48c2462ededa70a44dd58ba35caa5
|
[
"MIT"
] |
permissive
|
MrChrisCool/xknx
|
81d71d2f5506f573b71d911e097a13aea538bdca
|
3215abc5c1ba08bd91218db1e9d184372436673e
|
refs/heads/master
| 2021-05-08T11:28:04.244641
| 2018-02-02T19:17:44
| 2018-02-02T19:17:44
| 119,739,688
| 0
| 0
| null | 2018-01-31T20:30:37
| 2018-01-31T20:30:36
| null |
UTF-8
|
Python
| false
| false
| 1,119
|
py
|
"""Implementation of Basic KNX DPT_Scaling (Percent) Values."""
from xknx.exceptions import ConversionError
from .dpt import DPTBase
class DPTScaling(DPTBase):
"""
Abstraction for KNX 1 Octet DPT_Scaling.
DPT 5.001
"""
value_min = 0
value_max = 100
unit = ""
resolution = 1
@classmethod
def from_knx(cls, raw):
"""Parse/deserialize from KNX/IP raw data."""
cls.test_bytesarray(raw, 1)
value = round((raw[0]/256)*100)
return value
@classmethod
def to_knx(cls, value):
"""Serialize to KNX/IP raw data."""
if not isinstance(value, (int, float)):
raise ConversionError("Cant serialize DPTScaling", value=value)
if not cls._test_boundaries(value):
raise ConversionError("Cant serialize DPTScaling", value=value)
knx_value = round(value/100*255.4)
return (knx_value,)
@classmethod
def _test_boundaries(cls, value):
"""Test if value is within defined range for this object."""
return value >= cls.value_min and \
value <= cls.value_max
|
[
"julius@mittenzwei.com"
] |
julius@mittenzwei.com
|
5bd973480a1f89b0932866675956bb5980cbadda
|
eec590deb889f088cd097d955c67596f7e33595a
|
/huffman.py
|
6acc20a13603b9380a11866c718f196a91ef90e4
|
[] |
no_license
|
songweiuliu/Data_structure
|
0cd513c304114e9f3809bc1e24066ecc9d28fe11
|
d3c31e6fc7ef1a55f8becafd3e94c7082f0f4ce1
|
refs/heads/master
| 2020-03-28T22:48:49.474385
| 2018-09-18T09:50:34
| 2018-09-18T09:50:34
| 149,259,481
| 1
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 2,580
|
py
|
# coding: utf-8
# About huffman encoding
from priqueue_heap import *
from Binarytree import Binnode,printallnode
#由于要基于优先序列(堆实现的)实现huffman编码,因此节点存储的数据是二叉树节点(父节点,左右子节点)
#因此要实现优先序列,必须实现序列中元素的可比性,也就是要给节点增加比较大小的属性
class Huffmannode(Binnode):
#对于派生类一般不用重新定义初始化函数,只定义不同的部分
# def __init__(self,elem_,left_=None,right_=None):
# Binnode.__init__(elem_,left_,right_)
def __lt__(self, other):
return self.data<other.data
def __gt__(self, other):
return self.data>other.data
def __le__(self, other):
return self.data<=other.data
def __ge__(self, other):
return self.data>=other.data
#基于优先队列Priqu_heap派生出一个衍生类,该类的是基于堆(二叉树实现的),
# 根节点优先级最高(最小),如果元素可比较的话,上面一定赋予了node可比较性
class Huffmanprioque(Prique_heap):
#对于派生类一般不用重新定义初始化函数,只定义不同的部分
# def __init__(self,elems_=[]):
# Prique_heap.__init__(elems_.copy())
#增加一个统计节点数目的性质
def nums(self):
return len(self.elem)
#基于以上两个类完成给定W向量的霍夫曼编码
def Huffmanencode(w):
if w ==[]:
raise INDEXerror('No elem to encoding')
hmque=Huffmanprioque()
for x in w:
hmque.enqueue(Huffmannode(x))
#Huffmanprioque(w) #可以达到同样的效果,直接初始化筛选排序
while hmque.nums()>1:
a=hmque.dequeue()
b=hmque.dequeue()
c=a.data+b.data
hmque.enqueue(Huffmannode(c,a,b)) #依次弹出父节点数值最小的两个节点(子树)(节点之间具有比较能力)
#然后将他们新组成的树加入优先序列(每次迭代序列元素数减一)
return hmque.dequeue() #得到最终的完整的huffman编码树,对应有限序列最后一个得到的树(节点)
if __name__=='__main__':
# 基于Binary tree里面的一些函数,堆最终得到的完整的树可以进行一些诸如遍历,还有打印等各种操作
weights=[2,2,5,10,4,3,7]
t=Huffmanencode(weights)
printallnode(t)
#由C,W还有具体的树,便可以得到各字符的编码,进而得到最优编码进行编解码
|
[
"songweiliu@hust.edu.cn"
] |
songweiliu@hust.edu.cn
|
d5a275e6a092e8f529444b0dedf3963b36cac54b
|
07d6565edb27e5366a55fc4d15f0e94fc610e5c4
|
/Models/DenseNet.py
|
99cf4771cb42644f4b8564a40db7473add700224
|
[
"Apache-2.0"
] |
permissive
|
Wenyuan-Vincent-Li/SSL_Seg_GAN
|
8b79069d1fb6cd374ce65e67791cc8b20509dbcd
|
8f6c45fd000ea12468dccf211b376fadbf4759c6
|
refs/heads/master
| 2022-04-10T22:34:54.985755
| 2020-02-27T19:35:29
| 2020-02-27T19:35:29
| 232,152,538
| 1
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 10,984
|
py
|
import torch
import torch.nn as nn
import torch.nn.functional as F
class DenseLayer(nn.Module):
def __init__(self, n_channels, growth_rate=16):
'''
DenseNet Layer, as described in Jegou 2017.
Returns concatenation of input and output along feature map
dimension `1`.
BN -> ReLU -> 3x3 Conv -> 2D Dropout (p=0.2)
Parameters
----------
n_channels : int. number of input channels.
growth_rate : int. growth rate `k`, number of feature maps to add
to the input before concatenation and output.
'''
super(DenseLayer, self).__init__()
self.n_channels = n_channels
self.growth_rate = growth_rate
self.bn = nn.BatchNorm2d(self.n_channels)
self.conv = nn.Conv2d(self.n_channels, self.growth_rate,
kernel_size=3, padding=1, bias=False)
# self.do = nn.Dropout2d(p=0.2)
def forward(self, x):
out0 = F.relu(self.bn(x))
out1 = self.conv(out0)
out2 = out1
# out2 = self.do(out1)
concat = torch.cat([x, out2], 1)
return concat
class TransitionDown(nn.Module):
def __init__(self, n_channels_in, n_channels_out=None):
'''
FC-DenseNet Transition Down module, as described in Jegou 2017.
Returns downsampled image, preserving the number of feature maps by
default.
BN -> ReLU -> 1x1 Conv -> 2D Dropout (p=0.2) -> Max Pooling
Parameters
----------
n_channels_in : int. number of input channels
n_channels_out : int, optional. number of output channels.
preserves input by default.
'''
super(TransitionDown, self).__init__()
self.n_channels_in = n_channels_in
if n_channels_out is not None:
self.n_channels_out = n_channels_out
else:
self.n_channels_out = self.n_channels_in
self.bn = nn.BatchNorm2d(self.n_channels_in)
self.conv = nn.Conv2d(self.n_channels_in, self.n_channels_out,
kernel_size=1, padding=0)
self.pool = nn.MaxPool2d((2,2), stride=2)
# self.do = nn.Dropout2d(p=0.2)
def forward(self, x):
out0 = F.relu(self.bn(x))
out1 = self.conv(out0)
out2=out1
# out2 = self.do(out1)
pooled = self.pool(out2)
return pooled
class TransitionUp(nn.Module):
def __init__(self, n_channels_in, n_channels_out=None):
'''
FC-DenseNet Transition Up module, as described in Jegou 2017.
Returns upsampled image by transposed convolution.
3 x 3 Transposed Conv stride = 2
Parameters
----------
n_channels_in : int. number of input channels
n_channels_out : int, optional. number of output channels.
preserves input by default.
'''
super(TransitionUp, self).__init__()
self.n_channels_in = n_channels_in
if n_channels_out is not None:
self.n_channels_out = n_channels_out
else:
self.n_channels_out = self.n_channels_in
# pad input and output by `1` to maintain (x,y) size
self.transconv = nn.ConvTranspose2d(
self.n_channels_in,
self.n_channels_out,
kernel_size=3, stride=2,
padding=1,
output_padding=1)
def forward(self, x):
upsamp = self.transconv(x)
return upsamp
class DenseBlock(nn.Module):
def __init__(self, n_layers, n_channels, growth_rate=12, keep_input=True):
'''
Builds a DenseBlock from DenseLayers.
As described in Jegou 2017.
Parameters
----------
n_layers : int. number of DenseLayers in the block.
n_channels : int. number of input channels.
growth_rate : int. growth rate `k`, number of feature maps to add
to the input before concatenation and output.
keep_input : boolean. concatenate the input to the newly added
feature maps from this DenseBlock. input concatenation is omitted
for DenseBlocks in the upsampling path of FC-DenseNet103.
'''
super(DenseBlock, self).__init__()
self.n_layers = n_layers
self.n_channels = n_channels
self.growth_rate = growth_rate
self.keep_input = keep_input
if self.keep_input:
self.n_channels_out = n_channels + self.growth_rate*self.n_layers
else:
self.n_channels_out = self.growth_rate*self.n_layers
self.block = self._build_block()
def forward(self, x):
out = self.block(x)
if not self.keep_input:
out = out[:,self.n_channels:,...] # omit input feature maps
return out
def _build_block(self):
n_channels = self.n_channels
layers = []
for i in range(self.n_layers):
l = DenseLayer(n_channels, self.growth_rate)
layers.append(l)
n_channels += self.growth_rate
stack = nn.Sequential(*layers)
return stack
class DenseNet(nn.Module):
def __init__(self, growth_rate=12, n_pool=3, n_classes=4,
n_channels_in=3,
n_channels_first=16,
n_layers_down=[4,5,7],
n_layers_up=[7,5,4],
verbose=False, opt = None):
'''
DenseNet 103 for semantic segmentation,
as described in Jegou 2017.
Parameters
----------
growth_rate : int. growth rate `k`, number of feature maps to add
to the input before concatenation and output.
n_pool : int. number of pooling layers to incorporate
in the downsampling and upsampling paths.
n_classes : int. number of classes.
n_channels_first : int. number of channels in the input.
n_channels_first : int. number of channels in the first 3x3 Conv layer.
n_layers_down : array-like of int. number of layers in downsampling
DenseBlocks. len == n_pool.
n_layers_up : array-like of int. number of layers in upsampling
DenseBlocks. len == n_pool.
verbose : boolean. print downsampling/upsampling dimensionality.
'''
super(DenseNet, self).__init__()
self.growth_rate = growth_rate
self.n_pool = n_pool
self.n_classes = n_classes
self.n_channels_in = n_channels_in
self.n_channels_first = n_channels_first
self.n_layers_down = n_layers_down
self.n_layers_up = n_layers_up
self.verbose = verbose
self.opt = opt
if len(n_layers_down) != n_pool:
raise ValueError('`n_layers_down` must be length `n_pool`')
elif len(n_layers_up) != n_pool:
raise ValueError('`n_layers_up` must be length `n_pool`')
else:
pass
self.conv0 = nn.Conv2d(self.n_channels_in, self.n_channels_first,
kernel_size=3, stride=1, padding=1)
# Downsampling path
down_channels = self.n_channels_first
skip_channels = []
for i in range(n_pool):
setattr(self, 'down_dblock' + str(i),
DenseBlock(n_layers=self.n_layers_down[i],
n_channels=down_channels,
growth_rate=self.growth_rate))
down_channels = getattr( self, 'down_dblock' + str(i) ).n_channels_out
setattr(self, 'td' + str(i),
TransitionDown(n_channels_in=down_channels))
skip_channels.append(down_channels)
# Bottleneck
self.bottleneck = DenseBlock(n_layers=10,
n_channels=getattr(self,
'down_dblock'+str(self.n_pool-1)).n_channels_out,
growth_rate=self.growth_rate,
keep_input=False)
# Upsampling path
up_channels = self.bottleneck.n_channels_out
for i in range(n_pool):
keep = False
setattr(self, 'tu' + str(i),
TransitionUp(n_channels_in=up_channels))
schan = skip_channels[-(i+1)]
udb_channels = up_channels + schan
setattr(self, 'up_dblock' + str(i),
DenseBlock(n_layers=self.n_layers_up[i],
n_channels=udb_channels,
growth_rate=self.growth_rate,
keep_input=keep))
up_channels = getattr(self, 'up_dblock' + str(i)).n_channels_out
self.conv1 = nn.Conv2d(
getattr(self, 'up_dblock' + str(self.n_pool-1)).n_channels_out,
self.n_classes,
kernel_size=1)
if self.opt.contour:
self.softmax = nn.Sigmoid()
else:
self.softmax = nn.Softmax2d()
def forward(self, x, segment):
"""
:param x: input image
:param segment: the segmentation mask generated by the lower scale
:return:
"""
x = torch.cat((x, segment), dim=1) ## concatenate image and mask
in_conv = self.conv0(x)
out = in_conv
# Downsampling path
self.dblock_outs = []
for i in range(self.n_pool):
dblock = getattr(self, 'down_dblock' + str(i))
td = getattr(self, 'td' + str(i))
db_x = dblock(out)
self.dblock_outs.append(db_x)
out = td(db_x)
if self.verbose:
print('m: ', out.size(1))
# Bottleneck
bneck = self.bottleneck(out)
if self.verbose:
print('bottleneck m: ', bneck.size(1) + out.size(1))
# Upsampling path
out = bneck
for i in range(self.n_pool):
tu = getattr(self, 'tu' + str(i))
ublock = getattr(self, 'up_dblock' + str(i))
skip = self.dblock_outs[-(i+1)]
up = tu(out)
cat = torch.cat([skip, up], 1)
out = ublock(cat)
if self.verbose:
print('Skip: ', skip.size())
print('Up: ', up.size())
print('Cat: ', cat.size())
print('Out: ', out.size())
print('m : ', cat.size(1) + out.size(1))
classif_logit = self.conv1(out)
classif_prob = self.softmax(classif_logit)
if self.opt.contour:
classif_prob = classif_prob[:,0:1,...]
segment_mask = (classif_prob > 0.5).float()
else:
_, segment_mask = torch.max(classif_logit, dim = 1, keepdim=True)
if self.verbose:
print('Classif: ', classif_logit.size())
return classif_logit, classif_prob, segment_mask
if __name__ == "__main__":
image = torch.randn(32, 3, 64, 64)
segment = torch.randn(32, 4, 64, 64)
DenseNet = DenseNet(n_channels_in=7)
o1, o2, o3 = DenseNet(image, segment)
print(o1.shape, o2.shape, o3.shape)
|
[
"liwenyuan.zju@gmail.com"
] |
liwenyuan.zju@gmail.com
|
73b82f1af015cdcd1a456fcc9601299bf0a44949
|
9bb01fa882e713aa59345051fec07f4e3d3478b0
|
/docs/developers/source/conf.py
|
d314b8e844c24fcf9a8014072e18dd2341ccd829
|
[] |
no_license
|
syarra/cysparse
|
f1169c496b54d61761fdecbde716328fd0fb131b
|
7654f7267ab139d0564d3aa3b21c75b364bcfe72
|
refs/heads/master
| 2020-05-25T16:15:38.160443
| 2017-03-14T21:17:39
| 2017-03-14T21:17:39
| 84,944,993
| 0
| 0
| null | 2017-03-14T12:11:48
| 2017-03-14T12:11:48
| null |
UTF-8
|
Python
| false
| false
| 7,219
|
py
|
# -*- coding: utf-8 -*-
#
#
# This file is execfile()d with the current directory set to its containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickleable (module imports are okay, they're removed automatically).
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
# If your extensions are in another directory, add it here. If the directory
# is relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
#sys.path.append(os.path.abspath('../../../Lib'))
sys.path.append('sphinxext')
# Import support for ipython console session syntax highlighting (lives
# in the sphinxext directory defined above)
import ipython_console_highlighting
import mathjax
import sphinx_bootstrap_theme
# General configuration
# ---------------------
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest']
extensions += ['sphinx.ext.todo']
extensions += ['sphinx.ext.inheritance_diagram']
extensions += ['ipython_console_highlighting']
extensions += ['mathjax']
mathjax_path = 'https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'
graphviz_output_format = 'svg'
inheritance_node_attrs = dict(shape='box', fontsize=12,
color='gray70', style='rounded')
inheritance_graph_attrs = dict(rankdir="TB", size='""', bgcolor="transparent")
# Add any paths that contain templates here, relative to this directory.
templates_path = ['.templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8'
# The master toctree document.
master_doc = 'contents'
# General information about the project.
project = u'CySparse'
copyright = u'2015, Dominique Orban, Sylvain Arreckx and Nikolaj van Omme'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
try:
from cysparse import __version__
# The short X.Y version.
version = '.'.join(__version__.split('.')[:2])
# The full version, including alpha/beta/rc tags.
release = __version__
except ImportError:
version = release = 'dev'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of documents that shouldn't be included in the build.
#unused_docs = []
# List of directories, relative to source directory, that shouldn't be searched
# for source files.
exclude_trees = []
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# TODO list
todo_include_todos = False
# Options for HTML output
# -----------------------
# The style sheet to use for HTML and HTML Help pages. A file of that name
# must exist either in Sphinx' static/ path, or in one of the custom paths
# given in html_static_path.
html_theme = "bootstrap"
html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
html_theme_options = {
'source_link_position': "footer",
# Bootswatch (http://bootswatch.com/) theme.
'bootswatch_theme': "spacelab",
}
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = 'spmatrix-logo.png'
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
html_index = 'index.html'
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {'index' : 'indexsidebar.html'}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {'index' : 'index.html'}
# If false, no module index is generated.
#html_use_modindex = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, the reST sources are included in the HTML build as _sources/<name>.
#html_copy_source = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = ''
# Output file base name for HTML help builder.
htmlhelp_basename = 'CySparse'
# Options for LaTeX output
# ------------------------
# The paper size ('letter' or 'a4').
#latex_paper_size = 'letter'
# The font size ('10pt', '11pt' or '12pt').
#latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, document class [howto/manual]).
latex_documents = [
('contents', 'cysparse_developers_manual.tex', ur"CySparse's developers manual",
ur'Nikolaj van Omme\\Sylvain Arreckx\\Dominique Orban', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
latex_logo = 'logo/cysparse_logo128.pdf'
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# Additional stuff for the LaTeX preamble.
latex_preamble = '\usepackage{amsfonts,amsmath}'
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_use_modindex = True
|
[
"nikolaj.van.omme@gmail.com"
] |
nikolaj.van.omme@gmail.com
|
33e385aebe31e3b1ffb5811cb47bb7521d66997a
|
ca7aa979e7059467e158830b76673f5b77a0f5a3
|
/Python_codes/p02422/s471361750.py
|
0cf878de52dfdcdb737e717b9de0b5ccae18f4d5
|
[] |
no_license
|
Aasthaengg/IBMdataset
|
7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901
|
f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8
|
refs/heads/main
| 2023-04-22T10:22:44.763102
| 2021-05-13T17:27:22
| 2021-05-13T17:27:22
| 367,112,348
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 831
|
py
|
import sys
string = raw_input()
string_list = list(string)
#print string_list
q = input()
for i in range(q):
x = map(str, raw_input().split())
if(x[0] == 'replace'):
k = 0
for j in range(int(x[1]), int(x[2])+1):
string_list[j] = x[3][k]
k += 1
#print "".join(string_list)
if(x[0] == 'reverse'):
temp = []
for j in range(int(x[1]), int(x[2])+1):
temp.append(str(string_list[j]))
temp.reverse()
#print temp
temp_list = list(temp)
k = 0
for j in range(int(x[1]), int(x[2])+1):
string_list[j] = temp[k]
k += 1
#print "".join(string_list)
if(x[0] == 'print'):
for i in range(int(x[1]), int(x[2])+1):
sys.stdout.write(string_list[i])
print
|
[
"66529651+Aastha2104@users.noreply.github.com"
] |
66529651+Aastha2104@users.noreply.github.com
|
070fd62c4d3a71b9cca0beefd35100a4e5a546ce
|
47df4f3b1a457771c7d40197e70b2404aec48e5f
|
/SetAntenaInHouse.py
|
15f90d761cba9ea4c541ca6f49e7fd316c33f3cc
|
[] |
no_license
|
jungmin0710/Algorithms
|
c42920b7f5e8d591e204917d03e485c908a78448
|
686cec1cf3703214c3abdd8a4220c9c383c966e1
|
refs/heads/main
| 2023-01-12T07:04:44.780105
| 2020-11-13T08:58:33
| 2020-11-13T08:58:33
| 303,243,065
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 823
|
py
|
##방법1: 합계를 계산해서 산출
#입력받기 + 정렬(최솟값이 여러개 나올 경우 앞 쪽 값을 먼저 산출)
n = int(input())
house = list(map(int,input().split(" ")))
s_house = sorted(house)
#임시변수 설정
result = []
sum = 0
#거리값을 계산해서 리스트에 넣기
for i in range(n):
for j in range(n):
sum += abs(house[j]-house[i])
result.append(sum)
sum = 0
#결과 리스트의 값이 최솟값이면 해당 인덱스의 위치값 반환하기
for i in range(len(result)):
if (result[i] == min(result)):
answer = house[i]
break;#만약 최솟값이 여러개에 해당하면 제일먼저 나온 값으로 반환
print(answer)
##방법 2: 중간값으로 산출
n = int(input())
a = list(map(int,input().split()))
a.sort()
print(a[(n-1)//2])
|
[
"noreply@github.com"
] |
jungmin0710.noreply@github.com
|
89db9473dc9b2a81e4c67e8785dcf077eb8f4294
|
a64f122dd4df3e20bc3e25aca31bb11ec9d55977
|
/Assignment 3/clustering.py
|
ee7908876a95d098ee73611bbbd0b2070aadb4b4
|
[] |
no_license
|
mbrine555/gatech_ML
|
f9de5e1e1c29e40693030fcf3dce4797339f3ada
|
2a3dea874ac7710104fb891a5199afa9f3c046af
|
refs/heads/master
| 2020-04-16T10:39:44.328425
| 2019-04-10T11:54:37
| 2019-04-10T11:54:37
| 165,512,336
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 4,837
|
py
|
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 16 10:38:28 2017
@author: jtay
"""
#%% Imports
import pandas as pd
import numpy as np
from sklearn.manifold import TSNE
from time import clock
from sklearn.preprocessing import StandardScaler
from sklearn.pipeline import Pipeline
from sklearn.cluster import KMeans as kmeans
from sklearn.mixture import GaussianMixture as GMM
from collections import defaultdict
from helpers import cluster_acc, myGMM,nn_arch,nn_reg
from sklearn.metrics import adjusted_mutual_info_score as ami
from sklearn.neural_network import MLPClassifier
from sklearn.model_selection import GridSearchCV
import sys
out = './{}/'.format(sys.argv[1])
np.random.seed(0)
digits = pd.read_hdf(out+'datasets.hdf','digits')
digitsX = digits.drop('Class',1).copy().values
digitsY = digits['Class'].copy().values
madelon = pd.read_hdf(out+'datasets.hdf','madelon')
madelonX = madelon.drop('Class',1).copy().values
madelonY = madelon['Class'].copy().values
madelonX = StandardScaler().fit_transform(madelonX)
digitsX= StandardScaler().fit_transform(digitsX)
clusters = [2,5,10,15,20,25,30,35,40]
#%% Data for 1-3
SSE = defaultdict(dict)
ll = defaultdict(dict)
acc = defaultdict(lambda: defaultdict(dict))
adjMI = defaultdict(lambda: defaultdict(dict))
km = kmeans(random_state=5)
gmm = GMM(random_state=5)
st = clock()
for k in clusters:
km.set_params(n_clusters=k)
gmm.set_params(n_components=k)
km.fit(madelonX)
gmm.fit(madelonX)
SSE[k]['Madelon'] = km.score(madelonX)
ll[k]['Madelon'] = gmm.score(madelonX)
acc[k]['Madelon']['Kmeans'] = cluster_acc(madelonY,km.predict(madelonX))
acc[k]['Madelon']['GMM'] = cluster_acc(madelonY,gmm.predict(madelonX))
adjMI[k]['Madelon']['Kmeans'] = ami(madelonY,km.predict(madelonX))
adjMI[k]['Madelon']['GMM'] = ami(madelonY,gmm.predict(madelonX))
km.fit(digitsX)
gmm.fit(digitsX)
SSE[k]['Digits'] = km.score(digitsX)
ll[k]['Digits'] = gmm.score(digitsX)
acc[k]['Digits']['Kmeans'] = cluster_acc(digitsY,km.predict(digitsX))
acc[k]['Digits']['GMM'] = cluster_acc(digitsY,gmm.predict(digitsX))
adjMI[k]['Digits']['Kmeans'] = ami(digitsY,km.predict(digitsX))
adjMI[k]['Digits']['GMM'] = ami(digitsY,gmm.predict(digitsX))
print(k, clock()-st)
SSE = (-pd.DataFrame(SSE)).T
SSE.rename(columns = lambda x: x+' SSE (left)',inplace=True)
ll = pd.DataFrame(ll).T
ll.rename(columns = lambda x: x+' log-likelihood',inplace=True)
acc = pd.Panel(acc)
adjMI = pd.Panel(adjMI)
SSE.to_csv(out+'SSE.csv')
ll.to_csv(out+'logliklihood.csv')
acc.ix[:,:,'Digits'].to_csv(out+'Digits acc.csv')
acc.ix[:,:,'Madelon'].to_csv(out+'Madelon acc.csv')
adjMI.ix[:,:,'Digits'].to_csv(out+'Digits adjMI.csv')
adjMI.ix[:,:,'Madelon'].to_csv(out+'Madelon adjMI.csv')
#%% NN fit data (2,3)
grid ={'km__n_clusters':clusters,'NN__alpha':nn_reg,'NN__hidden_layer_sizes':nn_arch}
mlp = MLPClassifier(activation='relu',max_iter=2000,early_stopping=True,random_state=5)
km = kmeans(random_state=5)
pipe = Pipeline([('km',km),('NN',mlp)])
gs = GridSearchCV(pipe,grid,verbose=10)
gs.fit(madelonX,madelonY)
tmp = pd.DataFrame(gs.cv_results_)
tmp.to_csv(out+'Madelon cluster Kmeans.csv')
grid ={'gmm__n_components':clusters,'NN__alpha':nn_reg,'NN__hidden_layer_sizes':nn_arch}
mlp = MLPClassifier(activation='relu',max_iter=2000,early_stopping=True,random_state=5)
gmm = myGMM(random_state=5)
pipe = Pipeline([('gmm',gmm),('NN',mlp)])
gs = GridSearchCV(pipe,grid,verbose=10,cv=5)
gs.fit(madelonX,madelonY)
tmp = pd.DataFrame(gs.cv_results_)
tmp.to_csv(out+'Madelon cluster GMM.csv')
grid ={'km__n_clusters':clusters,'NN__alpha':nn_reg,'NN__hidden_layer_sizes':nn_arch}
mlp = MLPClassifier(activation='relu',max_iter=2000,early_stopping=True,random_state=5)
km = kmeans(random_state=5)
pipe = Pipeline([('km',km),('NN',mlp)])
gs = GridSearchCV(pipe,grid,verbose=10,cv=5)
gs.fit(digitsX,digitsY)
tmp = pd.DataFrame(gs.cv_results_)
tmp.to_csv(out+'Digits cluster Kmeans.csv')
grid ={'gmm__n_components':clusters,'NN__alpha':nn_reg,'NN__hidden_layer_sizes':nn_arch}
mlp = MLPClassifier(activation='relu',max_iter=2000,early_stopping=True,random_state=5)
gmm = myGMM(random_state=5)
pipe = Pipeline([('gmm',gmm),('NN',mlp)])
gs = GridSearchCV(pipe,grid,verbose=10,cv=5)
gs.fit(digitsX,digitsY)
tmp = pd.DataFrame(gs.cv_results_)
tmp.to_csv(out+'Digits cluster GMM.csv')
# %% For chart 4/5
madelonX2D = TSNE(verbose=10,random_state=5).fit_transform(madelonX)
digitsX2D = TSNE(verbose=10,random_state=5).fit_transform(digitsX)
madelon2D = pd.DataFrame(np.hstack((madelonX2D,np.atleast_2d(madelonY).T)),columns=['x','y','target'])
digits2D = pd.DataFrame(np.hstack((digitsX2D,np.atleast_2d(digitsY).T)),columns=['x','y','target'])
madelon2D.to_csv(out+'madelon2D.csv')
digits2D.to_csv(out+'digits2D.csv')
|
[
"briner.15@osu.edu"
] |
briner.15@osu.edu
|
491144c1597f64c1a41b15ecc4b30ea1511b3f41
|
8ff1a1ba57644d794b48e01a27231299e12e6efc
|
/CactusTEAnnotator/findRepeats.py
|
ea0fab8e7a6e34999461b32592f70404214cf2c4
|
[] |
no_license
|
adderan/CactusTEAnnotator
|
f913e79d39b7addc663313f35ee826efda9f1512
|
9e711b8ef8eee66d9d3ebe2a2025c4f07cf1545f
|
refs/heads/master
| 2021-06-05T02:01:54.849797
| 2020-09-25T19:07:58
| 2020-09-25T19:07:58
| 109,070,521
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 12,544
|
py
|
import argparse
import random
import os
import shutil
import sys
import subprocess
from toil.job import Job
from toil.common import Toil
from sonLib.bioio import fastaRead, fastaWrite, catFiles, reverseComplement
def makeURL(path):
return "file://%s" % os.path.abspath(path)
dockerImage = "cactus-te-annotator:latest"
def runCmd(parameters, args, outfile=None, mode="w"):
if args.localBinaries:
cmd = parameters
else:
cmd = ["docker", "run", "-it", "--rm", "-v", "%s:/data" % os.getcwd(), dockerImage] + parameters
if outfile:
with open(outfile, mode=mode) as outfileWrite:
subprocess.check_call(cmd, stdout=outfileWrite)
else:
output = subprocess.check_output(cmd)
return output
def catFilesJobFn(job, fileIDs):
fileList = [job.fileStore.readGlobalFile(fileID) for fileID in fileIDs]
combinedFile = job.fileStore.getLocalTempFile()
catFiles(fileList, combinedFile)
return job.fileStore.writeGlobalFile(combinedFile)
class GffInfo:
def __init__(self, gffLine):
chrom, annotationType, name, start, end, score, strand, a, family = gffLine.split()
self.chrom = chrom
self.start = int(start)
self.end = int(end)
self.name = name
self.strand = strand
self.family = family
def printGff(self):
return getGffLine(chrom=self.chrom, name=self.name, strand=self.strand, start=self.start, end=self.end, family=self.family)
def getGffLine(chrom, name, strand, start, end, family):
return "%s\t%s\t%s\t%d\t%d\t%d\t%s\t%s\t%s\n" % (chrom, "cactus_repeat_annotation", name, start, end, 0, strand, '.', family)
def gffToFasta(job, hal, genome, gff, args):
fasta = job.fileStore.getLocalTempFile()
runCmd(parameters=["getSequencesFromHAL", hal, gff, genome], outfile=fasta, args=args)
return fasta
def getRootPath():
import CactusTEAnnotator
i = os.path.abspath(CactusTEAnnotator.__file__)
return os.path.split(i)[0]
def getTECandidatesOnBranch(job, halID, genome, args, includeReverse=True):
"""Use the HAL graph of the alignment to search for candidate TE insertions in this \
genome relative to its parent.
"""
returnValues = {}
if args.precomputedFiles:
assert "candidate_TEs.gff" in args.precomputedFileIDs
assert "candidate_TEs.fa" in args.precomputedFileIDs
assert "masked_candidate_TEs.fa" in args.precomputedFileIDs
job.fileStore.logToMaster("Using precomputed masked TEs file")
returnValues["gff"] = args.precomputedFileIDs["candidate_TEs.gff"]
returnValues["fasta"] = args.precomputedFileIDs["candidate_TEs.fa"]
returnValues["masked_fasta"] = args.precomputedFileIDs["masked_candidate_TEs.fa"]
return returnValues
hal = job.fileStore.readGlobalFile(halID)
gff = job.fileStore.getLocalTempFile()
fasta = job.fileStore.getLocalTempFile()
cmd = ["getTECandidates", os.path.basename(hal), genome, "--minLength", str(args.minTESize), "--maxLength", str(args.maxTESize), "--outGFF", os.path.basename(gff), "--outFasta", os.path.basename(fasta), "--maxSequences", str(args.maxTECandidatesToProcess)]
if not includeReverse:
cmd.extend(["--ignoreReverse"])
runCmd(parameters=cmd, args=args)
fastaID = job.fileStore.writeGlobalFile(fasta)
gffID = job.fileStore.writeGlobalFile(gff)
returnValues["gff"] = gffID
returnValues["fasta"] = fastaID
returnValues["masked_fasta"] = job.addChildJobFn(runTRF, fastaID=fastaID, args=args).rv()
return returnValues
def runTRF(job, fastaID, args):
fasta = job.fileStore.readGlobalFile(fastaID)
trfParameters = ["2", "5", "7", "80", "10", "50", "2000"]
maskedFasta = os.path.basename(fasta) + "." + ".".join(trfParameters) + ".mask"
runCmd(parameters=["trf", os.path.basename(fasta)] + trfParameters + ["-m", "-h", "-ngs"], args=args)
#TRF masks the low-complexity sequences with Ns, so discard
#sequences with too many
NFilteredFasta = job.fileStore.getLocalTempFile()
runCmd(parameters=["filterNs", maskedFasta, str(args.maxNFraction)], outfile=NFilteredFasta, args=args)
return job.fileStore.writeGlobalFile(NFilteredFasta)
def runLastz(job, fastaID, args, querydepth=None):
if args.precomputedFiles and "alignments.cigar" in args.precomputedFileIDs:
job.fileStore.logToMaster("Using precomputed lastz alignments file.")
return args.precomputedFileIDs["alignments.cigar"]
fasta = job.fileStore.readGlobalFile(fastaID)
alignments = job.fileStore.getLocalTempFile()
parameters = ["lastz", "--notrivial", "--format=cigar", "%s[multiple]" % os.path.basename(fasta), os.path.basename(fasta)]
if querydepth:
parameters.extend(["--querydepth=keep,nowarn:%i" % querydepth])
runCmd(parameters=parameters, outfile=alignments, args=args)
return job.fileStore.writeGlobalFile(alignments)
def sortAlignments(job, alignmentsID, args):
"""Sort a set of alignments in cigar format by highest to lowest
score.
"""
alignments = job.fileStore.readGlobalFile(alignmentsID)
sortedAlignments = job.fileStore.getLocalTempFile()
runCmd(parameters=["sort", os.path.basename(alignments), "-k10", "-n", "-r"], outfile=sortedAlignments, args=args)
return job.fileStore.writeGlobalFile(sortedAlignments)
def buildRepeatLibrary(job, alignmentsID, fastaID, args):
"""Construct a pinch graph from the set of pairwise alignments
representing the repeat family. Then use the graph to define repeat
element boundaries and extract the consensus sequence for each
defined family.
"""
alignments = job.fileStore.readGlobalFile(alignmentsID)
sequences = job.fileStore.readGlobalFile(fastaID)
repeatLibrary = job.fileStore.getLocalTempFile()
runCmd(parameters=["getConsensus", "--alignments", os.path.basename(alignments), "--sequences", os.path.basename(sequences)], outfile=repeatLibrary, args=args)
return job.fileStore.writeGlobalFile(repeatLibrary)
def runRepeatMasker(job, repeatLibraryID, seqID, args):
"""Use RepeatMasker to annotate the genome using a
custom repeat library.
"""
repeatLibrary = job.fileStore.readGlobalFile(repeatLibraryID)
seq = job.fileStore.readGlobalFile(seqID)
repeatMaskerOutput = job.fileStore.getLocalTempDir()
runCmd(parameters=["RepeatMasker", "-nolow", "-cutoff", "650", "-dir", os.path.basename(repeatMaskerOutput), "-lib", os.path.basename(repeatLibrary), os.path.basename(seq)], args=args)
outputGff = "%s/%s.out" % (repeatMaskerOutput, os.path.basename(seq))
job.fileStore.logToMaster("directory contents: %s" % os.listdir(repeatMaskerOutput))
outputGffID = job.fileStore.writeGlobalFile(outputGff)
return outputGffID
def alignmentDistances(job, sequencesID, alignmentsID, args):
alignments = job.fileStore.readGlobalFile(alignmentsID)
sequences = job.fileStore.readGlobalFile(sequencesID)
distances = job.fileStore.getLocalTempFile()
runCmd(parameters=["getAlignmentDistances", "--sequences", sequences, "--alignments", alignments], outfile=distances, args=args)
return job.fileStore.writeGlobalFile(distances)
def workflow(job, halID, genome, args):
returnValues = {}
parameters = job.fileStore.getLocalTempFile()
#with open(parameters, "w") as parametersFile:
# parametersFile.write("parameters for this run\n" \
returnValues["parameters.txt"] = job.fileStore.writeGlobalFile(parameters)
#Get candidate TE insertions from the cactus alignment
getTECandidatesJob = Job.wrapJobFn(getTECandidatesOnBranch, halID=halID, genome=genome, includeReverse=False, args=args)
job.addChild(getTECandidatesJob)
returnValues["candidate_TEs.gff"] = getTECandidatesJob.rv('gff')
returnValues["candidate_TEs.fa"] = getTECandidatesJob.rv('fasta')
returnValues["masked_candidate_TEs.fa"] = getTECandidatesJob.rv('masked_fasta')
fastaID = getTECandidatesJob.rv('masked_fasta')
if args.getCandidateTEsOnly:
return returnValues
alignmentsJob = Job.wrapJobFn(runLastz, fastaID=fastaID, querydepth=2, args=args)
getTECandidatesJob.addFollowOn(alignmentsJob)
alignmentsID = alignmentsJob.rv()
returnValues["alignments.cigar"] = alignmentsID
if args.skipConsensus:
return returnValues
buildRepeatLibraryJob = Job.wrapJobFn(buildRepeatLibrary, alignmentsID=alignmentsID, fastaID=fastaID, args=args)
alignmentsJob.addFollowOn(buildRepeatLibraryJob)
returnValues["library.fa"] = buildRepeatLibraryJob.rv()
if args.skipRepeatMasker:
finalGffID = None
else:
#Download a section of the genome to annotate
#with RepeatMasker, using the library we constructed
hal = job.fileStore.readGlobalFile(halID)
genomeFile = job.fileStore.getLocalTempFile()
hal2fastaCmd = ["hal2fasta", os.path.basename(hal), genome]
if args.chrom and args.start and args.end:
hal2fastaCmd.extend(["--sequence", args.chrom, "--start", str(start), "--length", str(end - start)])
runCmd(parameters=hal2fastaCmd, outfile=genomeFile, args=args)
genomeID = job.fileStore.writeGlobalFile(genomeFile)
repeatMaskerJob = Job.wrapJobFn(runRepeatMasker, repeatLibraryID=buildLibraryJob.rv(), seqID=genomeID, args=args)
buildRepeatLibraryJob.addFollowOn(repeatMaskerJob)
finalGffID = repeatMaskerJob.rv()
returnValues["annotations.gff"] = finalGffID
return returnValues
def importPrecomputedFiles(toil, args):
args.precomputedFileIDs = {}
files = os.listdir(args.precomputedFiles)
for file in files:
if os.path.isdir(os.path.join(args.precomputedFiles, file)):
continue
args.precomputedFileIDs[file] = toil.importFile(makeURL(os.path.join(args.precomputedFiles, file)))
def exportResultsFiles(toil, results, outDir):
for item in results:
if results[item] is None:
continue
if isinstance(results[item], dict):
#Store any extra files returned from a job in their own directory
subDir = os.path.join(outDir, item)
os.makedirs(subDir)
exportResultsFiles(toil=toil, results=results[item], outDir=subDir)
else:
toil.exportFile(results[item], makeURL(os.path.join(outDir, item)))
def main():
parser = argparse.ArgumentParser()
parser.add_argument("hal", type=str)
parser.add_argument("genome", type=str)
parser.add_argument("outDir", type=str)
parser.add_argument("--minTESize", type=int, default=100)
parser.add_argument("--maxTESize", type=int, default=10000)
parser.add_argument("--maxNFraction", type=float, default=0.2)
parser.add_argument("--maxTECandidatesToProcess", type=int, default=None)
parser.add_argument("--chrom", type=str, default=None)
parser.add_argument("--start", type=int, default=None)
parser.add_argument("--end", type=int, default=None)
parser.add_argument("--distanceThreshold", type=float, default=0.005)
parser.add_argument("--heaviestBundlingThreshold", type=float, default=0.8)
parser.add_argument("--kmerLength", type=int, default=5)
parser.add_argument("--substMatrix", type=str, default="blosum80.mat")
parser.add_argument("--getCandidateTEsOnly", action="store_true", default=False, help="")
parser.add_argument("--skipRepeatMasker", action="store_true", default=False)
parser.add_argument("--skipConsensus", action="store_true", default=False)
parser.add_argument("--localBinaries", action="store_true", default=False)
parser.add_argument("--precomputedFiles", type=str, default=None)
parser.add_argument("--minConsensusScore", type=int, default=200)
Job.Runner.addToilOptions(parser)
args = parser.parse_args()
if os.path.exists(args.outDir):
print("Directory %s already exists" % args.outDir)
exit()
else:
os.makedirs(args.outDir)
with Toil(args) as toil:
halID = toil.importFile(makeURL(args.hal))
args.substMatrixID = toil.importFile(makeURL(os.path.join(os.path.dirname(__file__), args.substMatrix)))
if args.precomputedFiles:
importPrecomputedFiles(toil, args)
rootJob = Job.wrapJobFn(workflow, halID=halID, genome=args.genome, args=args)
results = toil.start(rootJob)
exportResultsFiles(toil=toil, results=results, outDir=args.outDir)
if __name__ == "__main__":
main()
|
[
"adderan@ucsc.edu"
] |
adderan@ucsc.edu
|
f4b03bd5d4e1268c79ec8798a15c29305fcb51bf
|
34a3da4cd8dc3835cb7acc4e1a4232c5738e1f71
|
/part_three_functions_as_objects/chapter_6_design_patterns_first_class_func/stategy_pattern/function-oriented.py
|
64299410d050a4080323eb794b1d0f9e78fddf58
|
[] |
no_license
|
AlexMussell/fluent-python
|
eec6fd55bf932032cfa62d1d1411870ed91c755e
|
89885c16dc243164c589f7372f8eb8c832f33358
|
refs/heads/master
| 2020-12-26T22:41:00.406790
| 2020-03-03T21:39:48
| 2020-03-03T21:39:48
| 237,672,511
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 3,741
|
py
|
"""
# BEGIN STRATEGY_TESTS
>>> joe = Customer('John Doe', 0) # <1>
>>> ann = Customer('Ann Smith', 1100)
>>> cart = [LineItem('banana', 4, .5),
... LineItem('apple', 10, 1.5),
... LineItem('watermellon', 5, 5.0)]
>>> Order(joe, cart, fidelity_promo) # <2>
<Order total: 42.00 due: 42.00>
>>> Order(ann, cart, fidelity_promo)
<Order total: 42.00 due: 39.90>
>>> banana_cart = [LineItem('banana', 30, .5),
... LineItem('apple', 10, 1.5)]
>>> Order(joe, banana_cart, bulk_item_promo) # <3>
<Order total: 30.00 due: 28.50>
>>> long_order = [LineItem(str(item_code), 1, 1.0)
... for item_code in range(10)]
>>> Order(joe, long_order, large_order_promo)
<Order total: 10.00 due: 9.30>
>>> Order(joe, cart, large_order_promo)
<Order total: 42.00 due: 42.00>
"""
# BEGIN STRATEGY
from collections import namedtuple
Customer = namedtuple('Customer', 'name fidelity')
class LineItem:
def __init__(self, product, quantity, price):
self.product = product
self.quantity = quantity
self.price = price
def total(self):
return self.price * self.quantity
class Order: # the Context
def __init__(self, customer, cart, promotion=None):
self.customer = customer
self.cart = list(cart)
self.promotion = promotion
def total(self):
if not hasattr(self, '__total'):
self.__total = sum(item.total() for item in self.cart)
return self.__total
def due(self):
if self.promotion is None:
discount = 0
else:
discount = self.promotion(self)
return self.total() - discount
def __repr__(self):
fmt = '<Order total: {:.2f} due: {:.2f}>'
return fmt.format(self.total(), self.due())
def fidelity_promo(order):
"""5% discount for customers with 1000 or more fidelity points"""
return order.total() * .05 if order.customer.fidelity >= 1000 else 0
def bulk_item_promo(order):
"""10% discount for each LineItem with 20 or more units"""
discount = 0
for item in order.cart:
if item.quantity >= 20:
discount += item.total() * .1
return discount
def large_order_promo(order):
"""7% discount for orders with 10 or more distinct items"""
distinct_items = {item.product for item in order.cart}
if len(distinct_items) >= 10:
return order.total() * .07
return 0
# Note how this is very similar to the classic strat, however we do not specify an abstract base class.
# Instead we create functions which take an order and are passed into the Order class.
# Note how there is no need to instantiate the promo funcs as they are already in use. This reduces cost.
# We can now easily extend this example to have a meta-strat to choost the best promo for a person shop using this functions as object paradigm
promos = [fidelity_promo, large_order_promo, bulk_item_promo] # List of funcs that are already instantiated
def best_promo(order):
"""Select the best promotional offer"""
return max(promo(order) for promo in promos)
if __name__ == "__main__":
import doctest
doctest.testmod()
# Command Strat
# The goal of command is to decouple an object thgat invokes and operation, from the provider object that implements it/
# Put the comman object between the 2
# Means the onvoker does not need to know the interface of the reciever. Meaning different recievers can be adapted through command subclass.
# Commands are an OO replacement for callbacks
|
[
"alexander.mussell@hotmail.co.uk"
] |
alexander.mussell@hotmail.co.uk
|
e57da91920747c52a1bb059dfd2d2f81a8858e68
|
3c1a519e6ebcb25a23ad1ecf69fe9ec85aef0ffc
|
/challenge-triangle-app.py
|
4b167f4fb63e924d245965d740154a8c646f2388
|
[] |
no_license
|
mdev-qn95/python-code40
|
02ee1cc5e2e6772472f04387d846f4df0039d136
|
641c8f9c2e74f55f1aea1b32f81d0d6e39c78ec5
|
refs/heads/master
| 2022-12-01T03:57:18.920437
| 2020-08-15T13:28:31
| 2020-08-15T13:28:31
| 285,978,675
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 624
|
py
|
# Basic Data Types: Right Trangle Solver App
import math
print("Welcome to the Right Triangle Solver App")
# Get user input
side_a = float(input("\nWhat is the first leg of the triangle: "))
side_b = float(input("What is the second leg of the triangle: "))
# Calculations
side_c = math.sqrt(side_a**2 + side_b**2)
side_c = round(side_c, 3)
area = 0.5*side_a*side_b
area = round(area, 3)
# Summary
print("\nFor a triangle with legs of " + str(side_a) + " and " + str(side_b) + " the hypotenuse is " + str(side_c))
print("For a triangle with legs of " + str(side_a) + " and " + str(side_b) + " the area is " + str(area))
|
[
"thaivanphu.qn95@gmail.com"
] |
thaivanphu.qn95@gmail.com
|
c012f0bd2f4c43230a2dff624300815e0cf3ad9c
|
202dccf345d942f4a08d0cd54a39da96a8d4033b
|
/lib/dataset/DOTA.py
|
784d36883ba6a81790531d968a92dd8ee9fb73c9
|
[
"BSD-2-Clause-Views",
"MIT",
"LicenseRef-scancode-generic-cla",
"Apache-2.0",
"BSD-2-Clause"
] |
permissive
|
chinakook/Detection_and_Recognition_in_Remote_Sensing_Image
|
3dceed5a9314ca5256bea74d335631acfd7da4fa
|
201c7450ad45d203b59d8345fb6fad903fad8748
|
refs/heads/master
| 2020-05-22T14:35:58.648145
| 2019-03-06T08:34:59
| 2019-03-06T08:34:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 26,387
|
py
|
# --------------------------------------------------------
# Deformable Convolutional Networks
# Copyright (c) 2017 Microsoft
# Licensed under The Apache-2.0 License [see LICENSE for details]
# Modified by Haozhi Qi, from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn)
# --------------------------------------------------------
"""
Pascal VOC database
This class loads ground truth notations from standard Pascal VOC XML data formats
and transform them into IMDB format. Selective search is used for proposals, see roidb
function. Results are written as the Pascal VOC format. Evaluation is based on mAP
criterion.
"""
import cPickle
import os
import numpy as np
from imdb import IMDB
import cv2
import zipfile
from bbox.bbox_transform import bbox_overlaps, bbox_transform, bbox_transform_quadrangle, bbox_pred_quadrangle
from PIL import Image
import codecs
# the target of this class is to get DOTA roidb
class DOTA(IMDB):
def __init__(self, image_set, root_path, data_path, result_path=None, mask_size=-1, binary_thresh=None):
"""
fill basic information to initialize imdb
:param image_set: train, test etc.
:param root_path: 'selective_search_data' and 'cache'
:param data_path: data and results
:return: imdb object
"""
self.image_set = image_set
super(DOTA, self).__init__('DOTA', self.image_set, root_path, data_path, result_path) # set self.name
self.root_path = root_path
self.data_path = data_path
self.classes = ['__background__', # always index 0
'plane', 'baseball-diamond',
'bridge', 'ground-track-field',
'small-vehicle', 'large-vehicle',
'ship', 'tennis-court',
'basketball-court', 'storage-tank',
'soccer-ball-field', 'roundabout',
'harbor', 'swimming-pool',
'helicopter']
self.num_classes = len(self.classes)
## index changed to be basename
self.image_set_index = self.load_image_set_index()
self.num_images = len(self.image_set_index)
print 'num_images', self.num_images
self.mask_size = mask_size
self.binary_thresh = binary_thresh
self.config = {'comp_id': 'comp4',
'use_diff': False,
'min_size': 2}
def load_image_set_index(self):
"""
find out which indexes correspond to given image set (train or val)
:return:
"""
image_set_index_file = os.path.join(self.data_path, self.image_set + '.txt')
assert os.path.exists(image_set_index_file), 'Path does not exist: {}'.format(image_set_index_file)
with open(image_set_index_file, 'r') as f:
lines = f.readlines()
image_lists = [line.strip() for line in lines]
#image_lists = [os.path.join(self.data_path, 'images', line.strip() + '.jpg') for line in lines]
return image_lists
def image_path_from_index(self, index):
"""
given image index, find out full path
:param image_name: image name in the data dir
:return: full path of this image
"""
# hint: self.image_set means 'train' or 'test'
# TODO: when data ready, the entrance here should be changed
# Now, it has been changed
# image_file = os.path.join(self.data_path, self.image_set, index)
image_file = os.path.join(self.data_path, 'images', index + '.png')
assert os.path.exists(image_file), 'Path does not exist: {}'.format(image_file)
return image_file
def gt_roidb(self):
"""
return ground truth image regions database
:return: imdb[image_index]['boxes', 'gt_classes', 'gt_overlaps', 'flipped']
"""
cache_file = os.path.join(self.cache_path, self.name + '_gt_roidb.pkl')
if os.path.exists(cache_file):
with open(cache_file, 'rb') as fid:
roidb = cPickle.load(fid)
print '{} gt roidb loaded from {}'.format(self.name, cache_file)
return roidb
gt_roidb = [self.load_annotation(index) for index in self.image_set_index]
with open(cache_file, 'wb') as fid:
cPickle.dump(gt_roidb, fid, cPickle.HIGHEST_PROTOCOL)
print 'wrote gt roidb to {}'.format(cache_file)
return gt_roidb
def load_annotation(self, index):
"""
for a given index, load image and bounding boxes info from XML file
:param image_name: image name in the data dir
:return: record['boxes', 'gt_classes', 'gt_overlaps', 'flipped']
"""
# import xml.etree.ElementTree as ET
roi_rec = dict()
roi_rec['image'] = self.image_path_from_index(index)
# roi_rec['image_name'] = 'img_' + index + '.jpg'
# filename = os.path.join(self.data_path, 'labelTxt', os.path.splitext(os.path.basename(index))[0] + '.txt')
img_path = self.image_path_from_index(index)
w, h = Image.open(img_path).size
roi_rec['height'] = float(h)
roi_rec['width'] = float(w)
#f = codecs.open(filename, 'r', 'utf-16')
if self.image_set == 'train':
filename = os.path.join(self.data_path, 'labelTxt', index + '.txt')
f = codecs.open(filename, 'r')
objs = f.readlines()
objs = [obj.strip().split(' ') for obj in objs]
# objs = tree.findall('object')
if not self.config['use_diff']:
non_diff_objs = [obj for obj in objs if obj[9] != '1']
objs = non_diff_objs
num_objs = len(objs)
boxes = np.zeros((num_objs, 4), dtype=np.int16)
gt_classes = np.zeros((num_objs), dtype=np.int32)
overlaps = np.zeros((num_objs, self.num_classes), dtype=np.float32)
class_to_index = dict(zip(self.classes, range(self.num_classes)))
# Load object bounding boxes into a data frame.
for ix, obj in enumerate(objs):
bbox = obj
# Make pixel indexes 0-based
x1 = float(bbox[0]) - 1
y1 = float(bbox[1]) - 1
x2 = float(bbox[2]) - 1
y2 = float(bbox[3]) - 1
x3 = float(bbox[4]) - 1
y3 = float(bbox[5]) - 1
x4 = float(bbox[6]) - 1
y4 = float(bbox[7]) - 1
xmin = max(min(x1, x2, x3, x4), 0)
xmax = max(x1, x2, x3, x4)
ymin = max(min(y1, y2, y3, y4), 0)
ymax = max(y1, y2, y3, y4)
cls = class_to_index[obj[8].lower().strip()]
boxes[ix, :] = [xmin, ymin, xmax, ymax]
gt_classes[ix] = cls
overlaps[ix, cls] = 1.0
roi_rec.update({'boxes': boxes,
'gt_classes': gt_classes,
'gt_overlaps': overlaps,
'max_classes': overlaps.argmax(axis=1),
'max_overlaps': overlaps.max(axis=1),
'flipped': False})
return roi_rec
def evaluate_detections(self, detections):
"""
:param detections: [cls][image] = N x [x1, y1, x2, y2, x3, y3, x4, y4, score]
:return:
"""
detection_results_path = os.path.join(self.result_path, 'test_results')
info = ''
if not os.path.isdir(detection_results_path):
os.mkdir(detection_results_path)
self.write_DOTA_results(detections, threshold=0.0)
return info
def write_DOTA_results(self, all_boxes, threshold=0.2):
"""
write results files in pascal devkit path
:param all_boxes: boxes to be processed [bbox, confidence]
:return: None
"""
path = os.path.join(self.result_path, 'test_results')
if os.path.isdir(path):
print "delete original test results files!"
os.system("rm -r {}".format(path))
os.mkdir(path)
for cls_ind, cls in enumerate(self.classes):
if cls == '__background__':
continue
for im_ind, index in enumerate(self.image_set_index):
dets = all_boxes[cls_ind][im_ind]
# if dets.shape[0] == 0:
# print "no detection results in {}".format(index)
# f = open(os.path.join(self.result_path, 'test_results', 'res_{}'.format(os.path.splitext(os.path.basename(index))[0] + '.txt')), 'a')
f = open(os.path.join(self.result_path, 'test_results', '{}'.format(index + '.txt')), 'a')
# the VOCdevkit expects 1-based indices
for k in range(dets.shape[0]):
if dets[k, 4] <= threshold:
continue
f.write('{} {} {} {} {} {}\n'.format(int(dets[k, 0]), int(dets[k, 1]), int(dets[k, 2]),
int(dets[k, 3]),dets[k, 4],self.classes[cls_ind]))
# f.write('{} {} {} {} {} {} {} {} {} {}\n'.format(int(dets[k, 0]), int(dets[k, 1]),
# int(dets[k, 2]), int(dets[k, 1]),
# int(dets[k, 2]), int(dets[k, 3]),
# int(dets[k, 0]), int(dets[k, 3]),
# dets[k, 4], self.classes[cls_ind]))
# DOTA_oriented contains 8 coordinates, so we have to do data dealing
class DOTA_oriented(IMDB):
def __init__(self, image_set, root_path, data_path, result_path=None, mask_size=-1, binary_thresh=None):
"""
fill basic information to initialize imdb
:param image_set: train, test etc.
:param root_path: 'selective_search_data' and 'cache'
:param data_path: data and results
:return: imdb object
"""
self.image_set = image_set
super(DOTA_oriented, self).__init__('DOTA_oriented', self.image_set, root_path, data_path, result_path) # set self.name
self.root_path = root_path
self.data_path = data_path
self.classes = ['__background__', # always index 0
'plane', 'baseball-diamond',
'bridge', 'ground-track-field',
'small-vehicle', 'large-vehicle',
'ship', 'tennis-court',
'basketball-court', 'storage-tank',
'soccer-ball-field', 'roundabout',
'harbor', 'swimming-pool',
'helicopter']
self.num_classes = len(self.classes)
self.image_set_index = self.load_image_set_index()
self.num_images = len(self.image_set_index)
print 'num_images', self.num_images
self.mask_size = mask_size
self.binary_thresh = binary_thresh
self.config = {'comp_id': 'comp4',
'use_diff': False,
'min_size': 2}
def load_image_set_index(self):
"""
find out which indexes correspond to given image set (train or val)
:return:
"""
image_set_index_file = os.path.join(self.data_path, self.image_set + '.txt')
print 'now is',os.getcwd()
assert os.path.exists(image_set_index_file), 'Path does not exist: {}'.format(image_set_index_file)
with open(image_set_index_file, 'r') as f:
lines = f.readlines()
image_lists = [line.strip() for line in lines]
#image_lists = [os.path.join(self.data_path, 'images', line.strip() + '.jpg') for line in lines]
return image_lists
def image_path_from_index(self, index):
"""
given image index, find out full path
:param image_name: image name in the data dir
:return: full path of this image
"""
# hint: self.image_set means 'train' or 'test'
# TODO: when data ready, the entrance here should be changed
# image_file = os.path.join(self.data_path, self.image_set, index)
image_file = os.path.join(self.data_path, 'images', index + '.png')
assert os.path.exists(image_file), 'Path does not exist: {}'.format(image_file)
return image_file
def gt_roidb(self):
"""
return ground truth image regions database
:return: imdb[image_index]['boxes', 'gt_classes', 'gt_overlaps', 'flipped']
"""
cache_file = os.path.join(self.cache_path, self.name + '_gt_roidb.pkl')
if os.path.exists(cache_file):
with open(cache_file, 'rb') as fid:
roidb = cPickle.load(fid)
print '{} gt roidb loaded from {}'.format(self.name, cache_file)
return roidb
gt_roidb = [self.load_annotation(index) for index in self.image_set_index]
with open(cache_file, 'wb') as fid:
cPickle.dump(gt_roidb, fid, cPickle.HIGHEST_PROTOCOL)
print 'wrote gt roidb to {}'.format(cache_file)
return gt_roidb
def load_annotation(self, index):
"""
for a given index, load image and bounding boxes info from XML file
:param image_name: image name in the data dir
:return: record['boxes', 'gt_classes', 'gt_overlaps', 'flipped']
"""
# import xml.etree.ElementTree as ET
roi_rec = dict()
roi_rec['image'] = self.image_path_from_index(index)
# roi_rec['image_name'] = 'img_' + index + '.jpg'
# filename = os.path.join(self.data_path, 'labelTxt', os.path.splitext(os.path.basename(index))[0] + '.txt')
# tree = ET.parse(filename)
img_path = self.image_path_from_index(index)
w, h = Image.open(img_path).size
# size = tree.find('size')
roi_rec['height'] = float(h)
roi_rec['width'] = float(w)
# f = codecs.open(filename, 'r', 'utf-16')
if self.image_set == 'train':
filename = os.path.join(self.data_path, 'labelTxt', index + '.txt')
f = codecs.open(filename, 'r')
objs = f.readlines()
objs = [obj.strip().split(' ') for obj in objs]
# objs = tree.findall('object')
if not self.config['use_diff']:
non_diff_objs = [obj for obj in objs if obj[9] != '1']
objs = non_diff_objs
num_objs = len(objs)
boxes = np.zeros((num_objs, 8), dtype=np.uint16)
gt_classes = np.zeros((num_objs), dtype=np.int32)
overlaps = np.zeros((num_objs, self.num_classes), dtype=np.float32)
class_to_index = dict(zip(self.classes, range(self.num_classes)))
# Load object bounding boxes into a data frame.
for ix, obj in enumerate(objs):
bbox = obj
# Make pixel indexes 0-based
x1 = float(bbox[0]) - 1
y1 = float(bbox[1]) - 1
x2 = float(bbox[2]) - 1
y2 = float(bbox[3]) - 1
x3 = float(bbox[4]) - 1
y3 = float(bbox[5]) - 1
x4 = float(bbox[6]) - 1
y4 = float(bbox[7]) - 1
# xmin = min(x1, x2, x3, x4)
# xmax = max(x1, x2, x3, x4)
# ymin = min(y1, y2, y3, y4)
# ymax = max(y1, y2, y3, y4)
cls = class_to_index[obj[8].lower().strip()]
boxes[ix, :] = [x1, y1, x2, y2, x3, y3, x4, y4]
gt_classes[ix] = cls
overlaps[ix, cls] = 1.0
roi_rec.update({'boxes': boxes,
'gt_classes': gt_classes,
'gt_overlaps': overlaps,
'max_classes': overlaps.argmax(axis=1),
'max_overlaps': overlaps.max(axis=1),
'flipped': False})
return roi_rec
def evaluate_detections(self, detections):
"""
:param detections: [cls][image] = N x [x1, y1, x2, y2, x3, y3, x4, y4, score]
:return:
"""
detection_results_path = os.path.join(self.result_path, 'test_results')
info = ''
if not os.path.isdir(detection_results_path):
os.mkdir(detection_results_path)
# hmeam_max = 0.0
# recall = 0.0
# precision = 0.0
# max_thred = 0.0
# for th in xrange(20, 50):
# threshold = th / 100.0
# print 'now testing threshold = %f results:' % threshold
# self.write_DOTA_results(detections, threshold)
# resDict = self.do_python_eval()
# hmean = resDict['method']['hmean']
# if hmean > hmeam_max:
# hmeam_max = hmean
# recall = resDict['method']['recall']
# precision = resDict['method']['precision']
# max_thred = threshold
# print '\nmaximum hmean {} is gained at threshold {}.'.format(hmeam_max, max_thred)
# print 'recall is {}, and precision is {}'.format(recall, precision)
# info += 'maximum hmean {} is gained at threshold {}.'.format(hmeam_max, max_thred)
# info += 'recall is {}, and precision is {}'.format(recall, precision)
# print 'saving the highest results!'
self.write_DOTA_results(detections, threshold=0.0)
# self.write_results_by_class(detections, threshold=0.0)
return info
def draw_gt_and_detections(self, detections, thresh=0.2):
# gt_folder = os.path.join(self.result_path, 'gt_on_image')
det_folder = os.path.join(self.result_path, 'det_on_image')
# if not os.path.isdir(gt_folder):
# os.mkdir(gt_folder)
self.write_DOTA_results(detections, threshold=0.1)
if not os.path.isdir(det_folder):
os.mkdir(det_folder)
for im_ind, index in enumerate(self.image_set_index):
img_path = self.image_path_from_index(index)
gt_db = self.load_annotation(index)
gt_boxes = gt_db['boxes']
det_path = os.path.join(self.result_path, 'test_results', 'res_{}'.format(os.path.splitext(os.path.basename(index))[0] + '.txt'))
f = open(det_path, 'r')
det_boxes_results = f.readlines()
det_boxes = []
for result in det_boxes_results:
result = result.strip().split(',')
det_boxes.append([int(result[0]), int(result[1]), int(result[2]),int(result[3]),int(result[4]),int(result[5]),int(result[6]),int(result[7]),
float(result[8]),result[9]])
# det_boxes = detections[cls_ind][im_ind]
det_boxes = np.array(det_boxes)
img = cv2.imread(img_path)
img_height, img_width = img.shape[0], img.shape[1]
# original_img = img.copy()
for k in range(gt_boxes.shape[0]):
bbox = gt_boxes[k, :8]
bbox = map(int, bbox)
color = (0, 255, 0)
xmax = max(bbox[0], bbox[2], bbox[4], bbox[6])
ymax = max(bbox[1], bbox[3], bbox[5], bbox[7])
if xmax > img_width:
print "extreme xmax", xmax
if ymax > img_height:
print "extreme ymax", ymax
for i in range(3):
cv2.line(img, (bbox[i * 2], bbox[i * 2 + 1]), (bbox[(i + 1) * 2], bbox[(i + 1) * 2 + 1]),
color=color, thickness=1)
cv2.line(img, (bbox[6], bbox[7]), (bbox[0], bbox[1]), color=color, thickness=1)
# cv2.imwrite(os.path.join(gt_folder, 'img_{}.jpg'.format(index)), img)
# img = original_img
for k in range(det_boxes.shape[0]):
bbox = det_boxes[k, :8]
score = det_boxes[k, 8]
cls = det_boxes[k, 9]
if score < thresh:
continue
bbox = map(int, bbox)
color = (0, 255, 255)
for i in range(3):
cv2.line(img, (bbox[i * 2], bbox[i * 2 + 1]), (bbox[(i + 1) * 2], bbox[(i + 1) * 2 + 1]),
color=color, thickness=1)
cv2.line(img, (bbox[6], bbox[7]), (bbox[0], bbox[1]), color=color, thickness=1)
cv2.putText(img, '{} {}'.format(cls, score), (bbox[0], bbox[1] + 10),
color=(255, 255, 255), fontFace=cv2.FONT_HERSHEY_COMPLEX, fontScale=0.5)
print os.path.join(det_folder, os.path.basename(index))
cv2.imwrite(os.path.join(det_folder, os.path.basename(index)), img)
# def write_results_by_class(self, all_boxes, threshold=0.1):
# path = os.path.join(self.result_path, 'test_results_by_class')
# if os.path.isdir(path):
# print "delete original test results files!"
# os.system("rm -r {}".format(path))
# os.mkdir(path)
# for cls_ind, cls in enumerate(self.classes):
# if cls == '__background__':
# continue
# for im_ind, index in enumerate(self.image_set_index):
# dets = all_boxes[cls_ind][im_ind]
# # if dets.shape[0] == 0:
# # print "no detection results in {}".format(index)
# if not os.path.exists(os.path.join(self.result_path, 'test_results_by_class')):
# os.mkdir(os.path.join(self.result_path, 'test_results_by_class'))
# f = open(os.path.join(self.result_path, 'test_results_by_class',
# 'res_{}'.format(os.path.splitext(os.path.basename(index))[0] + '.txt')), 'a')
# # the VOCdevkit expects 1-based indices
# for k in range(dets.shape[0]):
# if dets[k, 8] <= threshold:
# continue
# if self.validate_clockwise_points(dets[k, 0:8]):
# f.write(
# '{},{},{},{},{},{},{},{},{},{}\n'.format(int(dets[k, 0]), int(dets[k, 1]), int(dets[k, 2]),
# int(dets[k, 3]),
# int(dets[k, 4]), int(dets[k, 5]), int(dets[k, 6]),
# int(dets[k, 7]), dets[k, 8],
# self.classes[cls_ind]))
# else:
# print 'A detected box is anti-clockwise! Index:{}'.format(index)
# print dets[k, 0:8]
def validate_clockwise_points(self, points):
"""
Validates that the points that the 4 points that dlimite a polygon are in clockwise order.
"""
if len(points) != 8:
raise Exception("Points list not valid." + str(len(points)))
point = [
[int(points[0]), int(points[1])],
[int(points[2]), int(points[3])],
[int(points[4]), int(points[5])],
[int(points[6]), int(points[7])]
]
edge = [
(point[1][0] - point[0][0]) * (point[1][1] + point[0][1]),
(point[2][0] - point[1][0]) * (point[2][1] + point[1][1]),
(point[3][0] - point[2][0]) * (point[3][1] + point[2][1]),
(point[0][0] - point[3][0]) * (point[0][1] + point[3][1])
]
summatory = edge[0] + edge[1] + edge[2] + edge[3];
if summatory > 0:
return False
else:
return True
def write_DOTA_results(self, all_boxes, threshold=0.2):
"""
write results files in pascal devkit path
:param all_boxes: boxes to be processed [bbox, confidence]
:return: None
"""
path = os.path.join(self.result_path, 'test_results')
if os.path.isdir(path):
print "delete original test results files!"
os.system("rm -r {}".format(path))
os.mkdir(path)
for cls_ind, cls in enumerate(self.classes):
if cls == '__background__':
continue
for im_ind, index in enumerate(self.image_set_index):
# dets = all_boxes[cls_ind][im_ind]
try:
dets = all_boxes[cls_ind][im_ind]
except:
print 'cls_ind:', cls_ind
print 'im_ind:', im_ind
return
else:
# if dets.shape[0] == 0:
# print "no detection results in {}".format(index)
if not os.path.exists(os.path.join(self.result_path, 'test_results')):
os.mkdir(os.path.join(self.result_path, 'test_results'))
# f = open(os.path.join(self.result_path, 'test_results', 'res_{}'.format(os.path.splitext(os.path.basename(index))[0] + '.txt')), 'a')
f = open(os.path.join(self.result_path, 'test_results', '{}'.format(index + '.txt')), 'a')
# the VOCdevkit expects 1-based indices
for k in range(dets.shape[0]):
if dets[k, 8] <= threshold:
continue
if self.validate_clockwise_points(dets[k, 0:8]):
f.write('{} {} {} {} {} {} {} {} {} {}\n'.format(int(dets[k, 0]), int(dets[k, 1]), int(dets[k, 2]),
int(dets[k, 3]),
int(dets[k, 4]), int(dets[k, 5]), int(dets[k, 6]),
int(dets[k, 7]), dets[k, 8],
self.classes[cls_ind]))
else:
print 'A detected box is anti-clockwise! Index:{}'.format(index)
print dets[k, 0:8]
|
[
"46738358+whywhs@users.noreply.github.com"
] |
46738358+whywhs@users.noreply.github.com
|
c24069a05746d28faf5c5f9a374f27631e8ab25c
|
f53212c4acbe6b5717dbde05e5a7af0a466f43bb
|
/fitting/xi_multi/norec/calcsigma.py
|
1319e78b3f9cf2f8481fbfc893dec55e2d72deed
|
[] |
no_license
|
qiongyu/CosmoCodes
|
7d913312b06c799ea7e4b4881d003fecf7f638eb
|
7847fad0b1a150756890d7dc4b72d66311fa20a0
|
refs/heads/master
| 2020-05-17T00:32:26.174850
| 2013-06-22T22:07:52
| 2013-06-22T22:07:52
| 10,871,922
| 3
| 1
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 3,798
|
py
|
import math
import numpy as np
import matplotlib
from matplotlib import pyplot
from matplotlib.backends.backend_pdf import PdfPages
a = np.loadtxt('grids.txt',dtype=({'names': ['infile'],'formats': ['S100']}))
infile = a['infile']
nf = np.size(infile)
malpha = np.zeros(nf)
mepsilon = np.zeros(nf)
calpha = np.zeros(nf)
cepsilon = np.zeros(nf)
cae = np.zeros(nf)
na = 241
dex = np.arange(0,na)
pa = np.zeros(na)
ca = np.zeros(na)
alpha = np.zeros(na)
ca_ez = np.zeros(na)
fout = open("stdevs.dat","w")
figout = PdfPages("chi2.pdf")
matplotlib.rcParams['font.size']=7
font0 = matplotlib.font_manager.FontProperties()
font0.set_size(10)
fig = pyplot.figure()
fig = pyplot.figure()
for i in range(0,nf):
ag, eg, cg = np.loadtxt(infile[i],unpack=True)
tophat = np.squeeze(np.where( (eg < 0.15) & (eg > -0.15) ))
ag = ag[tophat]
eg = eg[tophat]
cg = cg[tophat]
ne = np.size(tophat)/na
ce = np.zeros(ne)
pe = np.zeros(ne)
epsilon = np.zeros(ne)
pae = np.zeros(na*ne)
cg = cg+ (np.log(ag)/0.15)**2.
pg = np.exp(-0.5*cg)
for j in range(0,na): #at each alpha...
ld = j*ne
hd = (j+1)*ne
temp_pa = pg[ld:hd] #p(alpha) = sum[over epsilon] p(alpha,epsilon)
pa[j] = np.sum(temp_pa)
ca[j] = -2.*np.log(pa[j])
alpha[j] = ag[ld]
ca_ez[j] = cg[ld+ne/2]
for j in range(0,ne): #at each epsilon...
d = dex*ne+j
temp_pe = pg[d]
pe[j] = np.sum(temp_pe)
ce[j] = -2.*np.log(pe[j])
epsilon[j] = eg[d[0]]
norma = np.sum(pa)
pa = pa/norma
malpha[i] = np.sum(pa*alpha)
calpha[i] = np.sum(pa*(alpha-malpha[i])**2)
norme = np.sum(pe)
pe = pe/norme
mepsilon[i] = np.sum(pe*epsilon)
cepsilon[i] = np.sum(pe*(epsilon-mepsilon[i])**2)
for j in range(0,na*ne):
pae[j] = pg[j]*(ag[j]-malpha[i])*(eg[j]-mepsilon[i])
normp = np.sum(pg)
cae[i] = np.sum(pae)/normp
rho = cae[i]/(math.sqrt(calpha[i]*cepsilon[i]))
for j in range(0,na*ne):
pae[j] = pg[j]*(ag[j]-malpha[i])*(ag[j]-malpha[i])
testa = np.sum(pae)/normp
for j in range(0,na*ne):
pae[j] = pg[j]*(eg[j]-mepsilon[i])*(eg[j]-mepsilon[i])
teste = np.sum(pae)/normp
print testa, teste
print malpha[i], calpha[i], mepsilon[i], cepsilon[i], cae[i], rho
fout.write(str(malpha[i])+' '+str(calpha[i])+' '+str(mepsilon[i])+' '+str(cepsilon[i])+' '+str(cae[i])+' '+str(rho)+'\n')
ax = fig.add_subplot(221)
pyplot.plot(alpha, ca-ca.min(), 'k-')
pyplot.plot(alpha, ca_ez-ca_ez.min(), 'k--')
pyplot.xlabel(r"$\alpha$", fontproperties=font0)
pyplot.ylabel(r"$\Delta\chi^2(\alpha)$", fontproperties=font0)
pyplot.figtext(0.34,0.86,r'Min $\chi^2=%4.2f$'%ca.min(), fontproperties=font0)
ax = fig.add_subplot(222)
pyplot.plot(epsilon, ce-ce.min(), 'k-')
pyplot.xlabel(r"$\epsilon$", fontproperties=font0)
pyplot.ylabel(r"$\Delta\chi^2(\epsilon)$", fontproperties=font0)
pyplot.xlim(-0.3,0.3)
pyplot.figtext(0.76,0.86,r'Min $\chi^2=%4.2f$'%ce.min(), fontproperties=font0)
ax = fig.add_subplot(223)
pyplot.plot(alpha, pa, 'k-')
pyplot.xlabel(r"$\alpha$", fontproperties=font0)
pyplot.ylabel(r"$p(\alpha)$", fontproperties=font0)
pyplot.figtext(0.32,0.42,r'$\langle\alpha\rangle=%4.3f\pm%4.3f$'%(malpha[i],math.sqrt(calpha[i])), fontproperties=font0)
ax = fig.add_subplot(224)
pyplot.plot(epsilon, pe, 'k-')
pyplot.xlabel(r"$\epsilon$", fontproperties=font0)
pyplot.ylabel(r"$p(\epsilon)$", fontproperties=font0)
pyplot.xlim(-0.3,0.3)
pyplot.figtext(0.745,0.42,r'$\langle\epsilon\rangle=%4.3f\pm%4.3f$'%(mepsilon[i],math.sqrt(cepsilon[i])), fontproperties=font0)
pyplot.figtext(0.78,0.39,r'$C_{\alpha\epsilon}=%5.4f$'%(cae[i]), fontproperties=font0)
pyplot.figtext(0.784,0.36,r'$\rho_{\alpha\epsilon}=%4.2f$'%(rho), fontproperties=font0)
figout.savefig()
pyplot.clf()
fout.close()
figout.close()
|
[
"xiaoyingxu@cmu.edu"
] |
xiaoyingxu@cmu.edu
|
3e88a60d56a7aba5189017961bae770a9caccd0f
|
26e0c20d027e30a6477a4e17a2c85702a852b97e
|
/tutorial_14.py
|
96857963c3b8c6c1e0d046c7f4491515b9dc3214
|
[] |
no_license
|
chenbidong/tutorial
|
c41da7570a22ef11e7065bae3acf2bca75d0dc2b
|
f0f09be8faa9dc1088609a296e7914550cdded40
|
refs/heads/master
| 2020-03-24T16:12:47.388752
| 2018-07-30T02:57:20
| 2018-07-30T02:57:20
| 142,816,877
| 5
| 3
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 955
|
py
|
import cv2 as cv
import numpy as np
def big_image_binary(image):
print(image.shape)
cw = 256
ch = 256
h, w = image.shape[:2]
gray = cv.cvtColor(image, cv.COLOR_BGR2GRAY)
for row in range(0, h, ch):
for col in range(0, w, cw):
roi = gray[row:row+ch, col:cw+col]
print(np.std(roi), np.mean(roi))
dev = np.std(roi)
if dev < 15:
gray[row:row + ch, col:cw + col] = 255
else:
ret, dst = cv.threshold(roi, 0, 255, cv.THRESH_BINARY | cv.THRESH_OTSU)
gray[row:row + ch, col:cw + col] = dst
cv.imwrite("D:/vcprojects/result_binary.png", gray)
print("--------- Python OpenCV Tutorial ---------")
src = cv.imread("D:/opencvPictures/morph02.png")
#cv.namedWindow("input image", cv.WINDOW_AUTOSIZE)
#cv.imshow("input image", src)
big_image_binary(src)
cv.waitKey(0)
cv.destroyAllWindows()
|
[
"noreply@github.com"
] |
chenbidong.noreply@github.com
|
c09a6cea0ffaddecc2ab9c4b6dd24df58397ff34
|
404728244681a773f55be7f7b0c4933f439f3106
|
/walis/api/handler/analytics/transaction.py
|
7ce88bb159f9a77aa2de90c68f0b65de02636b86
|
[] |
no_license
|
limingjin10/walis
|
c4e22db27d964cefa068883edf979cabfedd74d6
|
198a4e94992c1790b7a9f2cd34b1686fefc87845
|
refs/heads/master
| 2021-05-29T04:50:34.091849
| 2015-06-15T14:19:23
| 2015-06-15T14:19:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 723
|
py
|
#! /usr/bin/env python2
# -*- coding:utf-8 -*-
from __future__ import absolute_import, division, print_function
from walis.utils.http import Arg, args_parser
from walis.api.handler.region.region import front_area_to_back_area
from walis.service.analytics import transaction as transaction_svc
def query_by_area():
arg_spec = {
'city_id': Arg(int),
'_area': Arg(list)
}
args = args_parser.parse(arg_spec)
points = []
for point_dic in args.get('_area', []):
points.append('{lng},{lat}'.format(**point_dic))
return transaction_svc.get_order_trs_by_area(args['city_id'], points)
def query_by_city(city_id):
return transaction_svc.count_all_daily_trs_by_city(city_id)
|
[
"shaofeirong2006@126.com"
] |
shaofeirong2006@126.com
|
e174499919655acbf684b14a3e824f5bdf9d08c0
|
4480b2a2c83e2e1ee25da406c1d06de5edeeca2b
|
/src/_version.py
|
c97218510d21e95d9e10a02280fa2062296b6e28
|
[
"MIT"
] |
permissive
|
IllDepence/anki_add_pitch_plugin
|
af9b49c2d155ccaa0dc1aaf45412382d80acc9c8
|
f901ba9784dd280eab61a47f753616761efe3992
|
refs/heads/master
| 2023-05-12T12:41:54.467424
| 2023-05-07T13:36:14
| 2023-05-07T13:36:14
| 205,711,163
| 28
| 12
|
MIT
| 2022-03-26T08:52:03
| 2019-09-01T17:41:09
|
Python
|
UTF-8
|
Python
| false
| false
| 51
|
py
|
""" Version information
"""
__version__ = '0.9.1'
|
[
"tareksaier@gmail.com"
] |
tareksaier@gmail.com
|
3b7e6d245def0f2cf7235e239d3dac0f35d6fc51
|
606f0fe4be1828e1750486f9b8dd1ff24f8c70ea
|
/pyWorker/info/consts.py
|
c11e6ebde84d3c155486804bc7f285d81042aa77
|
[] |
no_license
|
yyywrz/Currency_pairs
|
0e71f5b676a742a0b5f78a797643e312b471fd2e
|
3a14358248a441a102e5a2c083342dd4d8236be7
|
refs/heads/master
| 2022-03-26T22:47:00.310733
| 2019-12-30T10:00:06
| 2019-12-30T10:00:06
| 224,400,892
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 5,500
|
py
|
Europe = {'Germany', 'Austria', 'Belgium', 'Cyprus', 'Estonia',
'Finland', 'France', 'Greece', 'Ireland', 'Italy',
'Latvia', 'Lithuania', 'Luxembourg', 'Malta', 'Netherlands',
'Portugal', 'Slovakia', 'Slovenia', 'Spain'}
all_codes = {'USD', 'AED', 'ARS', 'AUD', 'BGN', 'BRL',
'BSD', 'CAD', 'CHF', 'CLP', 'CNY', 'COP',
'CZK', 'DKK', 'DOP', 'EGP', 'EUR', 'FJD',
'GBP', 'GTQ', 'HKD', 'HRK', 'HUF', 'IDR',
'ILS', 'INR', 'ISK', 'JPY', 'KRW', 'KZT',
'MXN', 'MYR', 'NOK', 'NZD', 'PAB', 'PEN',
'PHP', 'PKR', 'PLN', 'PYG', 'RON', 'RUB',
'SAR', 'SEK', 'SGD', 'THB', 'TRY', 'TWD',
'UAH', 'UYU', 'VND', 'ZAR'}
code_ref = [
{'Currency Code': 'AED', 'Currency Name': 'UAE Dirham', 'Region': 'United Arab Emirates'},
{'Currency Code': 'ARS', 'Currency Name': 'Argentine Peso', 'Region': 'Argentina'},
{'Currency Code': 'AUD', 'Currency Name': 'Australian Dollar', 'Region': 'Australia'},
{'Currency Code': 'BGN', 'Currency Name': 'Bulgarian Lev', 'Region': 'Bulgaria'},
{'Currency Code': 'BRL', 'Currency Name': 'Brazilian Real', 'Region': 'Brazil'},
{'Currency Code': 'BSD', 'Currency Name': 'Bahamian Dollar', 'Region': 'Bahamas'},
{'Currency Code': 'CAD', 'Currency Name': 'Canadian Dollar', 'Region': 'Canada'},
{'Currency Code': 'CHF', 'Currency Name': 'Swiss Franc', 'Region': 'Switzerland'},
{'Currency Code': 'CLP', 'Currency Name': 'Chilean Peso', 'Region': 'Chile'},
{'Currency Code': 'CNY', 'Currency Name': 'Chinese Renminbi', 'Region': 'China'},
{'Currency Code': 'COP', 'Currency Name': 'Colombian Peso', 'Region': 'Colombia'},
{'Currency Code': 'CZK', 'Currency Name': 'Czech Koruna', 'Region': 'Czech Republic'},
{'Currency Code': 'DKK', 'Currency Name': 'Danish Krone', 'Region': 'Denmark'},
{'Currency Code': 'DOP', 'Currency Name': 'Dominican Peso', 'Region': 'Dominican Republic'},
{'Currency Code': 'EGP', 'Currency Name': 'Egyptian Pound', 'Region': 'Egypt'},
{'Currency Code': 'EUR', 'Currency Name': 'Euro', 'Region': 'Europe'},
{'Currency Code': 'FJD', 'Currency Name': 'Fiji Dollar', 'Region': 'Fiji'},
{'Currency Code': 'GBP', 'Currency Name': 'Pound Sterling', 'Region': 'United Kingdom'},
{'Currency Code': 'GTQ', 'Currency Name': 'Guatemalan Quetzal', 'Region': 'Guatemala'},
{'Currency Code': 'HKD', 'Currency Name': 'Hong Kong Dollar', 'Region': 'Hong Kong'},
{'Currency Code': 'HRK', 'Currency Name': 'Croatian Kuna', 'Region': 'Croatian'},
{'Currency Code': 'HUF', 'Currency Name': 'Hungarian Forint', 'Region': 'Hungary'},
{'Currency Code': 'IDR', 'Currency Name': 'Indonesian Rupiah', 'Region': 'Indonesia'},
{'Currency Code': 'ILS', 'Currency Name': 'Israeli Shekel', 'Region': 'Israel'},
{'Currency Code': 'INR', 'Currency Name': 'Indian Rupee', 'Region': 'India'},
{'Currency Code': 'ISK', 'Currency Name': 'Icelandic Krona', 'Region': 'Iceland'},
{'Currency Code': 'JPY', 'Currency Name': 'Japanese Yen', 'Region': 'Japan'},
{'Currency Code': 'KRW', 'Currency Name': 'South Korean Won', 'Region': 'Korea'},
{'Currency Code': 'KZT', 'Currency Name': 'Kazakhstani Tenge', 'Region': 'Kazakhstan'},
{'Currency Code': 'MXN', 'Currency Name': 'Mexican Peso', 'Region': 'Mexico'},
{'Currency Code': 'MYR', 'Currency Name': 'Malaysian Ringgit', 'Region': 'Malaysia'},
{'Currency Code': 'NOK', 'Currency Name': 'Norwegian Krone', 'Region': 'Norway'},
{'Currency Code': 'NZD', 'Currency Name': 'New Zealand Dollar', 'Region': 'New Zealand'},
{'Currency Code': 'PAB', 'Currency Name': 'Panamanian Balboa', 'Region': 'Panama'},
{'Currency Code': 'PEN', 'Currency Name': 'Peruvian Nuevo Sol', 'Region': 'Peru'},
{'Currency Code': 'PHP', 'Currency Name': 'Philippine Peso', 'Region': 'Philippines'},
{'Currency Code': 'PKR', 'Currency Name': 'Pakistani Rupee', 'Region': 'Pakistan'},
{'Currency Code': 'PLN', 'Currency Name': 'Polish Zloty', 'Region': 'Poland'},
{'Currency Code': 'PYG', 'Currency Name': 'Paraguayan Guarani', 'Region': 'Paraguay'},
{'Currency Code': 'RON', 'Currency Name': 'Romanian Leu', 'Region': 'Romania'},
{'Currency Code': 'RUB', 'Currency Name': 'Russian Ruble', 'Region': 'Russian Federation'},
{'Currency Code': 'SAR', 'Currency Name': 'Saudi Riyal', 'Region': 'Saudi Arabia'},
{'Currency Code': 'SEK', 'Currency Name': 'Swedish Krona', 'Region': 'Sweden'},
{'Currency Code': 'SGD', 'Currency Name': 'Singapore Dollar', 'Region': 'Singapore'},
{'Currency Code': 'THB', 'Currency Name': 'Thai Baht', 'Region': 'Thailand'},
{'Currency Code': 'TRY', 'Currency Name': 'Turkish Lira', 'Region': 'Turkey'},
{'Currency Code': 'TWD', 'Currency Name': 'New Taiwan Dollar', 'Region': 'Taiwan'},
{'Currency Code': 'UAH', 'Currency Name': 'Ukrainian Hryvnia', 'Region': 'Ukraine'},
{'Currency Code': 'USD', 'Currency Name': 'US Dollar', 'Region': 'United States'},
{'Currency Code': 'UYU', 'Currency Name': 'Uruguayan Peso', 'Region': 'Uruguay'},
{'Currency Code': 'VND', 'Currency Name': 'Vietnamese Dong', 'Region': 'Vietnam'},
{'Currency Code': 'ZAR', 'Currency Name': 'South African Rand', 'Region': 'South Africa'}]
|
[
"45575275+yyywrz@users.noreply.github.com"
] |
45575275+yyywrz@users.noreply.github.com
|
28f9d903f83878d1ce387372b862dd32eb37db2b
|
4ee21d2625445ac814a0fe536fe45a2e64c41705
|
/someFunctions.py
|
3f3d51c3d20ffa760b69705928106ad31f66234a
|
[] |
no_license
|
CrisRu95/Prueba
|
128ab72e0cc1aff0e74ddc77aee21781cf8c7356
|
1fe912ba261b1fdd5f32e7a4d5be6d2389330eb2
|
refs/heads/main
| 2021-12-10T05:57:40.705842
| 2021-12-09T17:19:18
| 2021-12-09T17:19:18
| 253,436,547
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 48
|
py
|
def suma(n1, n2):
r = n1 + n2
return r
|
[
"ecrisru@alumni.uv.es"
] |
ecrisru@alumni.uv.es
|
327432950f4feb08518c20a1c661437c6748ce4c
|
b08f1485d0c2c18e57134d0d3d56220fdff3cc5e
|
/FlaskAPI_ENV/scripts/Section 6/Video 6.2/source_code/tests_route.py
|
c1e73a775fdba31d368d8d85330cc2f608ab9949
|
[] |
no_license
|
bithu30/myRepo
|
250c9383d31c296a9e116032aebf4ce947d1964e
|
64485bb10327ed3a84b3c15200b1dd6a90117a8e
|
refs/heads/master
| 2022-10-21T16:26:45.997395
| 2018-05-31T02:51:31
| 2018-05-31T02:51:31
| 41,030,617
| 5
| 18
| null | 2022-10-05T07:40:41
| 2015-08-19T11:43:00
|
Jupyter Notebook
|
UTF-8
|
Python
| false
| false
| 1,464
|
py
|
import app
import unittest
import json
class RoutesTestCase(unittest.TestCase):
def setUp(self):
app.app.config['TESTING'] = True
self.app = app.app.test_client()
def tearDown(self):
pass
def test_api_candidate_OK(self):
print("\nRunning: test_api_candidate_OK")
resp = self.app.get('/api/candidates')
tmp_data = json.loads(resp.data)
# we have 8 candidates
assert 8 == len (tmp_data['candidates'])
def test_api_candidate_by_id_OK(self):
print("\nRunning: test_api_candidate_by_id_OK")
resp = self.app.get('/api/candidates/5',
headers={"MY_AUTH_TOKEN":"81c4e12b6879000837a3e7206795ee9ca874986cc97984d383c64093f5cc352d"})
tmp_data = json.loads(resp.data)
canidate = tmp_data["candidate"][0]
assert canidate is not None
assert "Johnny" == canidate["first_name"]
assert 5 == canidate["id"]
def test_api_candidate_by_id_FAIL(self):
print("\nRunning: test_api_candidate_by_id_FAIL")
resp = self.app.get('/api/candidates/5',
headers={"MY_AUTH_TOKEN":"INVALID"})
assert 401 == resp.status_code
assert "9500" == resp.headers["X-APP-ERROR-CODE"]
assert "No valid authentication token found in request" == resp.headers["X-APP-ERROR-MESSAGE"]
if __name__ == '__main__':
unittest.main()
|
[
"bijith.komalan@gmail.com"
] |
bijith.komalan@gmail.com
|
17876fc2d595856a258c0709afa482be8d292718
|
cab0dcea0b9d90a3465a85dbcd7b7e437cafbacf
|
/main/migrations/0021_auto_20200908_0051.py
|
71c8b9e859eba8369edccfa6e47abda868422de7
|
[] |
no_license
|
Efrain96/SchedulerUEES
|
99c7a2a80a5587897a4a1db3040734c98b7b0813
|
1f474d642612ea83c6d0236554dbcd0d6e4cec6f
|
refs/heads/master
| 2022-12-14T23:57:41.591255
| 2020-09-09T01:37:30
| 2020-09-09T01:37:30
| 293,951,732
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 718
|
py
|
# Generated by Django 3.1.1 on 2020-09-08 05:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0020_auto_20200907_2316'),
]
operations = [
migrations.AlterField(
model_name='lineitemschedulemodel',
name='end_time',
field=models.CharField(blank=True, help_text='Hora fin', max_length=70, null=True, verbose_name='Hora fin'),
),
migrations.AlterField(
model_name='lineitemschedulemodel',
name='start_time',
field=models.CharField(blank=True, help_text='Hora inicio', max_length=70, null=True, verbose_name='Hora inicio'),
),
]
|
[
"vargasedwin463@gmail.com"
] |
vargasedwin463@gmail.com
|
c4cdbd70c8aa1ac30268890fedb9604f8884985e
|
5fb98bab6b44b6454faa4502d99bb71bbfe3040c
|
/train_net.py
|
8a2a048b5a0f6ee21179b2178f7d258f9662a3c3
|
[] |
no_license
|
martamaria96/deep-wnet
|
4e3646d16c45a1534e002ab174305e5d97a6b579
|
eb6557dd5a65daf1e03d32f1e098e22ffc20f4ce
|
refs/heads/master
| 2022-04-03T10:30:27.075239
| 2020-02-11T12:00:01
| 2020-02-11T12:00:01
| 170,550,258
| 2
| 1
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 5,148
|
py
|
from unet_model import *
from wnet_model import *
from gen_mask_neighbor import *
from gen_patches import *
from generator import *
from clr_callback import *
import os.path
import tensorflow as tf
import sys
import decimal
from keras.callbacks import CSVLogger
from keras.callbacks import ModelCheckpoint, EarlyStopping, ReduceLROnPlateau
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
sess = tf.Session(config=config)
#gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.9)
#sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options))
N_BANDS = 3
N_CLASSES = 6 # imp surface, car, building, background, low veg, tree
N_EPOCHS = 50
DATASET = 'vaihingen' # 'vaihingen'
MODEL = 'W'
ID = '34'
if DATASET == 'potsdam':
TRAIN_IDS = ['2_10', '2_11', '3_10', '3_11', '4_10', '4_11', '5_10', '5_11', '6_7', '6_8', '6_9', '6_10', '6_11',
'7_7', '7_8', '7_9', '7_10', '7_11']
VAL_IDS = ['2_12', '3_12', '4_12', '5_12', '6_12', '7_12']
path_img = '/home/mdias/datasets/potsdam/Images_lab_hist/top_potsdam_{}_RGB.tif'
path_full_img = '/home/mdias/datasets/potsdam/Images_lab_hist/top_potsdam_{}_RGB.tif'
path_mask = '/home/mdias/datasets/potsdam/Masks/top_potsdam_{}_label.tif'
path_patch_img = '/home/mdias/datasets/potsdam/Images_l_patch/'
path_patch_full_img = '/home/mdias/datasets/potsdam/Images_lab_hist_patch/'
path_patch_mask = '/home/mdias/datasets/potsdam/Masks_patch/'
PATCH_SZ = 320 # should divide by 16
VALIDATION_STEPS = 7873
if MODEL == 'U':
STEPS_PER_EPOCH = 8000
BATCH_SIZE = 32
MAX_QUEUE = 30
elif MODEL == 'W':
STEPS_PER_EPOCH = 10000
#STEPS_PER_EPOCH = 50
BATCH_SIZE = 2
#BATCH_SIZE = 5
MAX_QUEUE = 30
elif DATASET == 'vaihingen':
TRAIN_IDS = ['1', '3', '11', '13', '15', '17', '21', '26', '28', '30', '32', '34']#,
#'_rc_1', '_rc_3', '_rc_11', '_rc_13', '_rc_15', '_rc_17', '_rc_21', '_rc_26', '_rc_28', '_rc_30', '_rc_32', '_rc_34']
VAL_IDS = ['5', '7', '23', '37']
path_img = '/home/mdias/datasets/vaihingen/Images_l/top_mosaic_09cm_area{}.tif'
path_full_img = '/home/mdias/datasets/vaihingen/Images_lab_hist/top_mosaic_09cm_area{}.tif'
path_mask = '/home/mdias/datasets/vaihingen/Masks/top_mosaic_09cm_area{}.tif'
# Val paths
path_patch_img = '/home/mdias/datasets/vaihingen/Images_l_patch/'
path_patch_full_img = '/home/mdias/datasets/vaihingen/Images_lab_hist_patch/'
path_patch_mask = '/home/mdias/datasets/vaihingen/Masks_patch/'
PATCH_SZ = 320 # should divide by 16
BATCH_SIZE = 5
STEPS_PER_EPOCH = 10000
VALIDATION_STEPS = 1369
MAX_QUEUE = 10
def get_files_weights(path, train_ids):
files_weights = []
count_all = 0
for id in train_ids:
img = tiff.imread(path.format(id))
count = img.shape[0]*img.shape[1]
count_all+=count
files_weights.append(count)
files_weights = np.array(files_weights)
files_weights = files_weights / files_weights.sum()
return files_weights
def get_model():
if MODEL == 'U':
model = unet_model(N_CLASSES, PATCH_SZ, n_channels=N_BANDS)
elif MODEL == 'W':
model = wnet_model(N_CLASSES, PATCH_SZ, n_channels=N_BANDS)
return model
weights_path = '/home/mdias/weights/weights_' + MODEL + '_' + DATASET + '_' + ID
if not os.path.exists(weights_path):
os.makedirs(weights_path)
weights_path += '/weights.hdf5'
if __name__ == '__main__':
def train_net():
print("start train net")
model = get_model()
if os.path.isfile(weights_path):
model.load_weights(weights_path)
early_stopping = EarlyStopping(monitor='val_loss', restore_best_weights=True, patience=5, mode='min')
model_checkpoint = ModelCheckpoint(weights_path, monitor='val_loss', save_best_only=True, mode='min')
csv_logger = CSVLogger('log_unet.csv', append=True, separator=';')
step_size = (STEPS_PER_EPOCH // BATCH_SIZE) * 8
clr = CyclicLR(base_lr=10e-5, max_lr=10e-4, step_size=step_size, mode='triangular2')
files_weights = get_files_weights(path_img, TRAIN_IDS)
train_gen = image_generator(TRAIN_IDS, path_img, path_mask, path_full_img, files_weights, batch_size = BATCH_SIZE, patch_size = PATCH_SZ)
val_gen = val_generator(path_patch_img, path_patch_full_img, path_patch_mask, batch_size = BATCH_SIZE)
print('\n\n\n', (next(train_gen)[1][0]).shape, '\n\n\n')
model.fit_generator(train_gen,
steps_per_epoch=STEPS_PER_EPOCH,
nb_epoch=N_EPOCHS,
validation_data=val_gen,
validation_steps=VALIDATION_STEPS,
verbose=1, shuffle=True, max_queue_size=MAX_QUEUE,
callbacks=[model_checkpoint, csv_logger, early_stopping, clr]
)
return model
train_net()
|
[
"maria.ldias96@gmail.com"
] |
maria.ldias96@gmail.com
|
dffb4cca42d49ca3386e9c77de4f2bd2dd579da1
|
8948d56d9a27d455e62cb9dc6b0a976f543877d5
|
/test_topics_feedback.py
|
9d1e1161defb27f50c6a465bc214d21dfc9bcc71
|
[] |
no_license
|
saurabh241930/MQTT_TEST
|
624cfb13533cafecd0a1153d2dd6dab37068ae68
|
ee39ec80b6977aad97c31cd356774a56376d7726
|
refs/heads/main
| 2023-02-17T21:17:38.393985
| 2021-01-20T16:37:22
| 2021-01-20T16:37:22
| 331,363,424
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 509
|
py
|
import paho.mqtt.client as mqtt
from utils import connect_mqtt,subscribe
import random,time,os,sys
broker = 'broker.emqx.io'
port = 1883
topic = [("/Vehicle1/location/x/value",0),("/Vehicle1/location/y/value",1)]
# generate client ID with pub prefix randomly
client_id = f'python-mqtt-{random.randint(0, 1000)}'
# username = 'emqx'
# password = 'public
def run():
client = connect_mqtt(client_id,broker,port)
subscribe(client,topic)
client.loop_forever()
if __name__ == '__main__':
run()
|
[
"noreply@github.com"
] |
saurabh241930.noreply@github.com
|
a70453fb8640df1a235d3b8d3ec1e063a5c63249
|
6a8224bc267a892a2b05eae47d7de6221e05c636
|
/SCPI_TRX_Control.py
|
9bd914bdc5f6b5691dffda3f1f635b65eb32405c
|
[] |
no_license
|
jaffreyho/Pipit24
|
5cb31e4a938e886c2db61c22b816077906a555a4
|
156f68fac86bc9f33381c7b30c8941deb3312843
|
refs/heads/main
| 2023-04-03T18:49:36.379458
| 2021-04-15T05:20:51
| 2021-04-15T05:20:51
| 358,112,695
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 6,807
|
py
|
import os
import sys
import argparse
from SCPI_Client import SCPI_Client
class CHANNEL_CTRL_OBJECT(object):
IC_num: int
mode: int
module: int
channel_1_switch = 0
channel_2_switch = 0
channel_3_switch = 0
channel_4_switch = 0
channel_5_switch = 0
channel_6_switch = 0
channel_7_switch = 0
channel_8_switch = 0
channel_1_phase_step = 0
channel_2_phase_step = 0
channel_3_phase_step = 0
channel_4_phase_step = 0
channel_5_phase_step = 0
channel_6_phase_step = 0
channel_7_phase_step = 0
channel_8_phase_step = 0
channel_1_gain_step = 0
channel_2_gain_step = 0
channel_3_gain_step = 0
channel_4_gain_step = 0
channel_5_gain_step = 0
channel_6_gain_step = 0
channel_7_gain_step = 0
channel_8_gain_step = 0
channel_com1_gain_step = 0
channel_com2_gain_step = 0
def __init__(self):
self.IC_num = 2
self.mode = 1
self.chain_th = 1
def serial_mode(self):
cmd = "MODULE_CTRL_ " + str(self.IC_num) + \
"," + str(self.mode) + \
"," + str(self.chain_th) + \
"," + str(self.channel_1_switch) + \
"," + str(self.channel_2_switch) + \
"," + str(self.channel_3_switch) + \
"," + str(self.channel_4_switch) + \
"," + str(self.channel_1_phase_step) + \
"," + str(self.channel_2_phase_step) + \
"," + str(self.channel_3_phase_step) + \
"," + str(self.channel_4_phase_step) + \
"," + str(self.channel_1_gain_step) + \
"," + str(self.channel_2_gain_step) + \
"," + str(self.channel_3_gain_step) + \
"," + str(self.channel_4_gain_step) + \
"," + str(self.channel_com1_gain_step) + \
"," + str(self.channel_1_switch) + \
"," + str(self.channel_2_switch) + \
"," + str(self.channel_3_switch) + \
"," + str(self.channel_4_switch) + \
"," + str(self.channel_1_phase_step) + \
"," + str(self.channel_2_phase_step) + \
"," + str(self.channel_3_phase_step) + \
"," + str(self.channel_4_phase_step) + \
"," + str(self.channel_1_gain_step) + \
"," + str(self.channel_2_gain_step) + \
"," + str(self.channel_3_gain_step) + \
"," + str(self.channel_4_gain_step) + \
"," + str(self.channel_com2_gain_step) + \
" \n\r"
print("Send: \'%s\'" %cmd)
return cmd
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("--mode", help="Mode : 1 - TX_CTRL , 2 - RX_CTRL", type=int)
parser.add_argument("--chip1_ch1_switch", help="Channel_1 switch : 0 - on , 1 - off", type=int)
parser.add_argument("--chip1_ch2_switch", help="Channel_2 switch : 0 - on , 1 - off", type=int)
parser.add_argument("--chip1_ch3_switch", help="Channel_3 switch : 0 - on , 1 - off", type=int)
parser.add_argument("--chip1_ch4_switch", help="Channel_4 switch : 0 - on , 1 - off", type=int)
parser.add_argument("--chip1_ch1_phase", help="Channel_1 phase step : in range(0,63)", type=int)
parser.add_argument("--chip1_ch2_phase", help="Channel_2 phase step : in range(0,63)", type=int)
parser.add_argument("--chip1_ch3_phase", help="Channel_3 phase step : in range(0,63)", type=int)
parser.add_argument("--chip1_ch4_phase", help="Channel_4 phase step : in range(0,63)", type=int)
parser.add_argument("--chip1_ch1_gain", help="Channel_1 gain step : in range(0,15)", type=int)
parser.add_argument("--chip1_ch2_gain", help="Channel_2 gain step : in range(0,15)", type=int)
parser.add_argument("--chip1_ch3_gain", help="Channel_3 gain step : in range(0,15)", type=int)
parser.add_argument("--chip1_ch4_gain", help="Channel_4 gain step : in range(0,15)", type=int)
parser.add_argument("--chip1_com_gain", help="Channel_com gain step : in range(0,15)", type=int)
parser.add_argument("--chip2_ch1_switch", help="Channel_1 switch : 0 - on , 1 - off", type=int)
parser.add_argument("--chip2_ch2_switch", help="Channel_2 switch : 0 - on , 1 - off", type=int)
parser.add_argument("--chip2_ch3_switch", help="Channel_3 switch : 0 - on , 1 - off", type=int)
parser.add_argument("--chip2_ch4_switch", help="Channel_4 switch : 0 - on , 1 - off", type=int)
parser.add_argument("--chip2_ch1_phase", help="Channel_1 phase step : in range(0,63)", type=int)
parser.add_argument("--chip2_ch2_phase", help="Channel_2 phase step : in range(0,63)", type=int)
parser.add_argument("--chip2_ch3_phase", help="Channel_3 phase step : in range(0,63)", type=int)
parser.add_argument("--chip2_ch4_phase", help="Channel_4 phase step : in range(0,63)", type=int)
parser.add_argument("--chip2_ch1_gain", help="Channel_1 gain step : in range(0,15)", type=int)
parser.add_argument("--chip2_ch2_gain", help="Channel_2 gain step : in range(0,15)", type=int)
parser.add_argument("--chip2_ch3_gain", help="Channel_3 gain step : in range(0,15)", type=int)
parser.add_argument("--chip2_ch4_gain", help="Channel_4 gain step : in range(0,15)", type=int)
parser.add_argument("--chip2_com_gain", help="Channel_com gain step : in range(0,15)", type=int)
args = parser.parse_args()
if len(sys.argv)==1:
parser.print_help()
sys.exit(1)
channel_ctrl = CHANNEL_CTRL_OBJECT()
channel_ctrl.mode = args.mode
channel_ctrl.module = 0
channel_ctrl.channel_1_switch = args.chip1_ch1_switch
channel_ctrl.channel_2_switch = args.chip1_ch2_switch
channel_ctrl.channel_3_switch = args.chip1_ch3_switch
channel_ctrl.channel_4_switch = args.chip1_ch4_switch
channel_ctrl.channel_1_phase_step = args.chip1_ch1_phase
channel_ctrl.channel_2_phase_step = args.chip1_ch2_phase
channel_ctrl.channel_3_phase_step = args.chip1_ch3_phase
channel_ctrl.channel_4_phase_step = args.chip1_ch4_phase
channel_ctrl.channel_1_gain_step = args.chip1_ch1_gain
channel_ctrl.channel_2_gain_step = args.chip1_ch2_gain
channel_ctrl.channel_3_gain_step = args.chip1_ch3_gain
channel_ctrl.channel_4_gain_step = args.chip1_ch4_gain
channel_ctrl.channel_com1_gain_step = args.chip1_com_gain
channel_ctrl.channel_5_switch = args.chip2_ch1_switch
channel_ctrl.channel_6_switch = args.chip2_ch2_switch
channel_ctrl.channel_7_switch = args.chip2_ch3_switch
channel_ctrl.channel_8_switch = args.chip2_ch4_switch
channel_ctrl.channel_5_phase_step = args.chip2_ch1_phase
channel_ctrl.channel_6_phase_step = args.chip2_ch2_phase
channel_ctrl.channel_7_phase_step = args.chip2_ch3_phase
channel_ctrl.channel_8_phase_step = args.chip2_ch4_phase
channel_ctrl.channel_5_gain_step = args.chip2_ch1_gain
channel_ctrl.channel_6_gain_step = args.chip2_ch2_gain
channel_ctrl.channel_7_gain_step = args.chip2_ch3_gain
channel_ctrl.channel_8_gain_step = args.chip2_ch4_gain
channel_ctrl.channel_com2_gain_step = args.chip2_com_gain
client = SCPI_Client("192.168.100.111")
if client.Init_SCPI_client() == False:
os.system("pause")
sys.exit()
CMD = channel_ctrl.serial_mode()
recv = client.SendCmdThenWaitRSP(CMD, 0)
print(recv)
|
[
"noreply@github.com"
] |
jaffreyho.noreply@github.com
|
dc86eb20d5edb199c37f567c3128d97b26db9875
|
b6d4439d6be7c693148595be248455a538f3c6e7
|
/gamer/player_factory.py
|
8b4cc0a979150dd481d309b65eab0b4d24833396
|
[] |
no_license
|
ParkSanggi/black_jack_python
|
4823463757e788ade329adad51b999c23d1d263b
|
579035f60ef3b0ac51eab02df1c28814eae06854
|
refs/heads/master
| 2022-11-17T11:36:02.147998
| 2020-07-13T12:27:17
| 2020-07-13T12:27:17
| 276,088,153
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 456
|
py
|
from gamer.names import PlayerNames
from gamer.gamer import Player
from profit.betting_money import BettingMoney
class PlayerFactory:
@staticmethod
def create():
player_names = PlayerNames()
player_name = player_names.get_next_name()
players = list()
while player_name:
players.append(Player(player_name, BettingMoney()))
player_name = player_names.get_next_name()
return players
|
[
"sangpark@student.42seoul.kr"
] |
sangpark@student.42seoul.kr
|
30eb158a441dcc7ae4eaa97fa60be1ecfa86aaa4
|
fda201d7cca34e216a17d97665c8457c72e66cb2
|
/libya_elections/tests/test_schedule.py
|
b59346ae49540ddec35f1665aa5dcc8cc4da2da0
|
[
"Apache-2.0"
] |
permissive
|
SmartElect/SmartElect
|
94ab192beb32320e9ae8ae222f90ee531037c1c6
|
d6d35f2fa8f60e756ad5247f8f0a5f05830e92f8
|
refs/heads/develop
| 2020-12-26T04:04:42.753741
| 2019-07-17T17:08:25
| 2019-07-17T17:08:25
| 44,687,036
| 24
| 12
|
Apache-2.0
| 2020-06-06T07:16:48
| 2015-10-21T15:47:07
|
Python
|
UTF-8
|
Python
| false
| false
| 471
|
py
|
import datetime
from django.test import TestCase
from libya_elections.utils import at_noon
class ScheduleTest(TestCase):
def test_at_noon(self):
# at_noon returns a datetime with the right values
dt = datetime.datetime(1970, 2, 3, 4, 5, 6, 7)
result = at_noon(dt)
self.assertEqual(12, result.hour)
self.assertEqual(0, result.minute)
self.assertEqual(0, result.second)
self.assertEqual(0, result.microsecond)
|
[
"vinod@kurup.com"
] |
vinod@kurup.com
|
f9bfd7da0adfef7e954c1cf905f42db4317ebe94
|
20419c6c9f2cdd28b536ceef1f62c5f25516826d
|
/srp.py
|
8999daf937f6555d604d1b709571bc002ea37537
|
[] |
no_license
|
thermalbarker/matasano-crypto-fu
|
52868ed3218062ff9b864dfd359d9c3ea1d975ba
|
f6580c9a75ddd9a314c9fca186a76629bb47cd5e
|
refs/heads/master
| 2021-04-26T16:43:13.822008
| 2016-08-20T11:46:08
| 2016-08-20T11:46:08
| 30,983,425
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 6,843
|
py
|
import random
import hashlib
import hmac
from diffiehellman import dh_public_key, dh_shared_secret, tom_modexp, dh_encrypt, dh_decrypt
from cryptobuffer import cryptobuffer
class SrpCommon(object):
private_key_size = 2 ** 1024
def __init__(self, N, g, k, I, P, privkey = None):
self.N = N # modulus
self.g = g # exponent
self.k = k # SRP constant
self.I = I # username
self.P = P # password
if privkey is None:
privkey = random.randrange(0, self.private_key_size) % N
self.privkey = privkey
def getPint(self):
p = cryptobuffer()
p.mBytes = self.P
return p.toInt()
def get_pub_key(self):
return dh_public_key(self.N, self.g, self.privkey)
def hash(self, *args):
h = hashlib.sha256()
r = cryptobuffer()
for a in args:
b = cryptobuffer()
b.fromInt(a)
h.update(b.mBytes)
r.mBytes = h.digest()
return r.toInt()
def computeU(self, A, B):
return self.hash(A, B)
def computeH(self, salt, p):
return self.hash(salt, p)
# Secure remote password
# Challenge 36
class SrpServer(SrpCommon):
def __init__(self, N, g, k, I, P):
super(SrpServer, self).__init__(N, g, k, I, P)
self.salt = random.randint(0, 2 ** 32)
x = self.computeH(self.salt, self.getPint())
self.v = tom_modexp(self.g, x, self.N)
def getB(self):
return (self.k * self.v + tom_modexp(self.g, self.privkey, self.N)) % self.N
def getSalt(self):
return self.salt
def getU(self, A):
return self.computeU(A, self.getB())
def getK(self, A):
u = self.getU(A)
b = self.privkey
S = tom_modexp(A * tom_modexp(self.v, u, self.N), b, self.N)
K = self.hash(S)
return K
def getAuth(self, A):
K = cryptobuffer()
K.fromInt(self.getK(A))
s = cryptobuffer()
s.fromInt(self.salt)
return hmac.new(K.mBytes, s.mBytes, hashlib.sha1).digest()
def checkAuth(self, A, digest):
return (self.getAuth(A) == digest)
class SrpClient(SrpCommon):
def __init__(self, N, g, k, I, P):
super(SrpClient, self).__init__(N, g, k, I, P)
def getA(self):
return self.get_pub_key()
def getI(self):
return self.I
def getU(self, B):
return self.computeU(self.getA(), B)
def getK(self, salt, B):
x = self.computeH(salt, self.getPint())
u = self.getU(B)
a = self.privkey
S = tom_modexp(B - self.k * tom_modexp(self.g, x, self.N), a + u * x, self.N)
K = self.hash(S)
return K
def getAuth(self, B, salt):
K = cryptobuffer()
K.fromInt(self.getK(salt, B))
s = cryptobuffer()
s.fromInt(salt)
return hmac.new(K.mBytes, s.mBytes, hashlib.sha1).digest()
class ZeroKeyClient(SrpCommon):
def __init__(self, N, g, k, I, P, A = 0):
super(ZeroKeyClient, self).__init__(N, g, k, I, P)
self.A = A
def getA(self):
return self.A
def getI(self):
return self.I
def getU(self, B):
return self.computeU(self.getA(), B)
def getK(self, salt, B):
S = 0
K = self.hash(S)
return K
def getAuth(self, B, salt):
K = cryptobuffer()
K.fromInt(self.getK(salt, B))
s = cryptobuffer()
s.fromInt(salt)
return hmac.new(K.mBytes, s.mBytes, hashlib.sha1).digest()
# Secure remote password
# Challenge 36
class SrpSimpleServer(SrpCommon):
def __init__(self, N, g, k, I, P, privkey = None, salt = None, u = None):
super(SrpSimpleServer, self).__init__(N, g, k, I, P, privkey)
if salt is None:
salt = random.randint(0, 2 ** 32)
if u is None:
u = random.randint(0, 2 ** 128)
self.setSalt(salt)
self.setU(u)
def getB(self):
return tom_modexp(self.g, self.privkey, self.N)
def setSalt(self, salt):
self.salt = salt
x = self.computeH(self.salt, self.getPint())
self.v = tom_modexp(self.g, x, self.N)
def getSalt(self):
return self.salt
def setU(self, u):
self.u = u
def getU(self):
return self.u
def getK(self, A):
u = self.getU()
b = self.privkey
S = tom_modexp(A * tom_modexp(self.v, u, self.N), b, self.N)
K = self.hash(S)
return K
def getAuth(self, A):
K = cryptobuffer()
K.fromInt(self.getK(A))
s = cryptobuffer()
s.fromInt(self.salt)
return hmac.new(K.mBytes, s.mBytes, hashlib.sha1).digest()
def checkAuth(self, A, digest):
return (self.getAuth(A) == digest)
class SrpSimpleClient(SrpCommon):
def __init__(self, N, g, k, I, P):
super(SrpSimpleClient, self).__init__(N, g, k, I, P)
def getA(self):
return self.get_pub_key()
def getI(self):
return self.I
def getK(self, salt, B, u):
x = self.computeH(salt, self.getPint())
a = self.privkey
S = tom_modexp(B, a + u * x, self.N)
K = self.hash(S)
return K
def getAuth(self, B, salt, u):
K = cryptobuffer()
K.fromInt(self.getK(salt, B, u))
s = cryptobuffer()
s.fromInt(salt)
return hmac.new(K.mBytes, s.mBytes, hashlib.sha1).digest()
class SrpSimpleDictionaryAttack(object):
private_key_size = 2 ** 1024
def __init__(self, filename, N, g, k, I):
self.d = dict()
self.N = N
self.g = g
self.k = k
self.I = I
self.privkey = random.randrange(0, self.private_key_size) % N
self.salt = random.randint(0, 2 ** 32)
self.u = random.randint(0, 2 ** 128)
self.filename = filename
def CalcHashes(self, A, max = -1):
self.d.clear()
infile = open(self.filename, "r")
i = 0
for line in infile:
line = line.rstrip()
if (line is '') or (line.startswith("#!comment")):
continue
server = SrpSimpleServer(self.N, self.g, self.k, self.I, line, self.privkey, self.salt, self.u)
m = server.getAuth(A)
self.d[m] = line
i += 1
if (max > 0) and (i >= max):
break
infile.close()
def FindPassword(self, auth):
return self.d[auth]
def getB(self):
return tom_modexp(self.g, self.privkey, self.N)
def setSalt(self, salt):
self.salt = salt
x = self.computeH(self.salt, self.getPint())
self.v = tom_modexp(self.g, x, self.N)
def getSalt(self):
return self.salt
def getU(self):
return self.u
|
[
"thermalbarker@gmail.com"
] |
thermalbarker@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.