hexsha
string
size
int64
ext
string
lang
string
max_stars_repo_path
string
max_stars_repo_name
string
max_stars_repo_head_hexsha
string
max_stars_repo_licenses
list
max_stars_count
int64
max_stars_repo_stars_event_min_datetime
string
max_stars_repo_stars_event_max_datetime
string
max_issues_repo_path
string
max_issues_repo_name
string
max_issues_repo_head_hexsha
string
max_issues_repo_licenses
list
max_issues_count
int64
max_issues_repo_issues_event_min_datetime
string
max_issues_repo_issues_event_max_datetime
string
max_forks_repo_path
string
max_forks_repo_name
string
max_forks_repo_head_hexsha
string
max_forks_repo_licenses
list
max_forks_count
int64
max_forks_repo_forks_event_min_datetime
string
max_forks_repo_forks_event_max_datetime
string
content
string
avg_line_length
float64
max_line_length
int64
alphanum_fraction
float64
qsc_code_num_words_quality_signal
int64
qsc_code_num_chars_quality_signal
float64
qsc_code_mean_word_length_quality_signal
float64
qsc_code_frac_words_unique_quality_signal
float64
qsc_code_frac_chars_top_2grams_quality_signal
float64
qsc_code_frac_chars_top_3grams_quality_signal
float64
qsc_code_frac_chars_top_4grams_quality_signal
float64
qsc_code_frac_chars_dupe_5grams_quality_signal
float64
qsc_code_frac_chars_dupe_6grams_quality_signal
float64
qsc_code_frac_chars_dupe_7grams_quality_signal
float64
qsc_code_frac_chars_dupe_8grams_quality_signal
float64
qsc_code_frac_chars_dupe_9grams_quality_signal
float64
qsc_code_frac_chars_dupe_10grams_quality_signal
float64
qsc_code_frac_chars_replacement_symbols_quality_signal
float64
qsc_code_frac_chars_digital_quality_signal
float64
qsc_code_frac_chars_whitespace_quality_signal
float64
qsc_code_size_file_byte_quality_signal
float64
qsc_code_num_lines_quality_signal
float64
qsc_code_num_chars_line_max_quality_signal
float64
qsc_code_num_chars_line_mean_quality_signal
float64
qsc_code_frac_chars_alphabet_quality_signal
float64
qsc_code_frac_chars_comments_quality_signal
float64
qsc_code_cate_xml_start_quality_signal
float64
qsc_code_frac_lines_dupe_lines_quality_signal
float64
qsc_code_cate_autogen_quality_signal
float64
qsc_code_frac_lines_long_string_quality_signal
float64
qsc_code_frac_chars_string_length_quality_signal
float64
qsc_code_frac_chars_long_word_length_quality_signal
float64
qsc_code_frac_lines_string_concat_quality_signal
float64
qsc_code_cate_encoded_data_quality_signal
float64
qsc_code_frac_chars_hex_words_quality_signal
float64
qsc_code_frac_lines_prompt_comments_quality_signal
float64
qsc_code_frac_lines_assert_quality_signal
float64
qsc_codepython_cate_ast_quality_signal
float64
qsc_codepython_frac_lines_func_ratio_quality_signal
float64
qsc_codepython_cate_var_zero_quality_signal
bool
qsc_codepython_frac_lines_pass_quality_signal
float64
qsc_codepython_frac_lines_import_quality_signal
float64
qsc_codepython_frac_lines_simplefunc_quality_signal
float64
qsc_codepython_score_lines_no_logic_quality_signal
float64
qsc_codepython_frac_lines_print_quality_signal
float64
qsc_code_num_words
int64
qsc_code_num_chars
int64
qsc_code_mean_word_length
int64
qsc_code_frac_words_unique
null
qsc_code_frac_chars_top_2grams
int64
qsc_code_frac_chars_top_3grams
int64
qsc_code_frac_chars_top_4grams
int64
qsc_code_frac_chars_dupe_5grams
int64
qsc_code_frac_chars_dupe_6grams
int64
qsc_code_frac_chars_dupe_7grams
int64
qsc_code_frac_chars_dupe_8grams
int64
qsc_code_frac_chars_dupe_9grams
int64
qsc_code_frac_chars_dupe_10grams
int64
qsc_code_frac_chars_replacement_symbols
int64
qsc_code_frac_chars_digital
int64
qsc_code_frac_chars_whitespace
int64
qsc_code_size_file_byte
int64
qsc_code_num_lines
int64
qsc_code_num_chars_line_max
int64
qsc_code_num_chars_line_mean
int64
qsc_code_frac_chars_alphabet
int64
qsc_code_frac_chars_comments
int64
qsc_code_cate_xml_start
int64
qsc_code_frac_lines_dupe_lines
int64
qsc_code_cate_autogen
int64
qsc_code_frac_lines_long_string
int64
qsc_code_frac_chars_string_length
int64
qsc_code_frac_chars_long_word_length
int64
qsc_code_frac_lines_string_concat
null
qsc_code_cate_encoded_data
int64
qsc_code_frac_chars_hex_words
int64
qsc_code_frac_lines_prompt_comments
int64
qsc_code_frac_lines_assert
int64
qsc_codepython_cate_ast
int64
qsc_codepython_frac_lines_func_ratio
int64
qsc_codepython_cate_var_zero
int64
qsc_codepython_frac_lines_pass
int64
qsc_codepython_frac_lines_import
int64
qsc_codepython_frac_lines_simplefunc
int64
qsc_codepython_score_lines_no_logic
int64
qsc_codepython_frac_lines_print
int64
effective
string
hits
int64
7ad193bee6a72a81bbc3ea79990fa54580916668
2,042
py
Python
ultrades/petrinets.py
lacsed/UltraDES-Python
0b4dd04c0944363c0b6546d24256e03ad3c27d54
[ "MIT" ]
3
2020-08-05T21:27:39.000Z
2021-10-04T15:15:44.000Z
ultrades/petrinets.py
lacsed/UltraDES-Python
0b4dd04c0944363c0b6546d24256e03ad3c27d54
[ "MIT" ]
null
null
null
ultrades/petrinets.py
lacsed/UltraDES-Python
0b4dd04c0944363c0b6546d24256e03ad3c27d54
[ "MIT" ]
null
null
null
import clr clr.AddReference("UltraDES") clr.AddReference("System.Linq") clr.AddReference('System.Collections') from System.Collections.Generic import List, KeyValuePair from System import ValueTuple, UInt32 from UltraDES.PetriNets import PetriNet, Marking, Node, Place, Transition, Arc from IPython.core.display import HTML, Javascript, display def place(name): return Place(name) def transition(name): return Transition(name) def marking(pairs): marking_lst = List[KeyValuePair[Place, UInt32]]() for m in pairs: t = KeyValuePair[Place, UInt32](m[0], UInt32.Parse(str(m[1]))) marking_lst.Add(t) return Marking(marking_lst) def petri_net(arcs, name): arcs_lst = List[Arc]() for a in arcs: t = Arc(a[0], a[1], a[2]) arcs_lst.Add(t) return PetriNet(arcs_lst, name) def places(P): return list(P.Places) def transitions(P): return list(P.Transitions) def arcs(P): return list(P.Arcs) def inputs(P, b): return list(P.Inputs(b)) def outputs(P, b): return list(P.Outputs(b)) def weight(P, x, y): return P.Weight(x,y) def enabled_transitions(P, marking): return list(P.EnabledTransitions(marking)) def fire_transition(P, marking, transitions): return P.Fire(marking, transition) def is_siphon(P, places): return P.IsSiphon(places) def is_trap(P, places): return P.IsTrap(places) def coverability_tree(P, marking): return list(P.CoverabilityTree(marking)) def coverability_graph(P, marking): return list(P.CoverabilityGraph(marking)) def reachability_tree(P, marking): return list(P.ReachabilityTree(marking)) def incidence_matrix(P): return P.IncidenceMatrix(); def show_petri_net(P): html_code = ("element.innerHTML += (Viz(`{}`))").format(P.ToDotCode.replace("rankdir=TB", "rankdir=LR")) return Javascript(html_code, lib="https://github.com/mdaines/viz.js/releases/download/v1.8.1-pre.5/viz.js")
26.179487
123
0.669442
280
2,042
4.814286
0.335714
0.066766
0.073442
0.053412
0.081602
0.034125
0
0
0
0
0
0.010404
0.199804
2,042
77
124
26.519481
0.814565
0
0
0
0
0.018182
0.081425
0
0
0
0
0
0
1
0.345455
false
0
0.090909
0.290909
0.781818
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
2
7ad7d53bd0c5d8ca3f726d18de4bc9248981e917
318
py
Python
echome/identity/auth.py
mgtrrz/echome
b3a123391089d4a09b4eb6e240bb783ef5bc06cc
[ "MIT" ]
2
2022-01-31T19:32:51.000Z
2022-01-31T22:42:13.000Z
echome/identity/auth.py
mgtrrz/echome
b3a123391089d4a09b4eb6e240bb783ef5bc06cc
[ "MIT" ]
7
2021-04-04T01:15:53.000Z
2022-02-07T03:34:48.000Z
echome/identity/auth.py
mgtrrz/echome
b3a123391089d4a09b4eb6e240bb783ef5bc06cc
[ "MIT" ]
1
2022-02-01T11:34:50.000Z
2022-02-01T11:34:50.000Z
from .models import User def user_authentication_rule(user): # JWT (API) logins should only come from the Acess Key or Service user type. if isinstance(user, User): return user is not None and user.is_active and ( user.type == User.Type.SERVICE or user.type == User.Type.ACCESS_KEY ) return False
39.75
126
0.720126
51
318
4.411765
0.568627
0.177778
0.106667
0.142222
0
0
0
0
0
0
0
0
0.201258
318
8
127
39.75
0.885827
0.232704
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.8
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
7adbc4351ee762e5614460a69a229b2259e656a1
4,286
py
Python
python/randall/alife_randall_checkout/ai_webserver/login.py
josephlewis42/personal_codebase
aa0fff9a908ab90bc78d24aa69d1b91163c35314
[ "Unlicense" ]
3
2015-11-24T17:06:58.000Z
2018-05-01T14:03:57.000Z
python/randall/alife_randall_checkout/ai_webserver/login.py
josephlewis42/personal_codebase
aa0fff9a908ab90bc78d24aa69d1b91163c35314
[ "Unlicense" ]
null
null
null
python/randall/alife_randall_checkout/ai_webserver/login.py
josephlewis42/personal_codebase
aa0fff9a908ab90bc78d24aa69d1b91163c35314
[ "Unlicense" ]
null
null
null
# login.py # # Copyright 2011 Joseph Lewis <joehms22@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA. #Check password user_pass = {"admin":"21232f297a57a5a743894a0e4a801fc3"} if SESSION and 'login' in SESSION.keys() and SESSION['login']: #Redirect to the index page if already logged in. self.redirect('index.py') elif POST_DICT: try: #If the user validated correctly redirect. if POST_DICT['password'] == user_pass[POST_DICT['username']]: #Send headder SESSION['login'] = True SESSION['username'] = POST_DICT['username'] self.redirect('index.py') else: POST_DICT = [] except: POST_DICT = [] if not POST_DICT: self.send_200() page = ''' <!-- login.py Copyright 2010 Joseph Lewis <joehms22@gmail.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --> <html lang="en"> <head> <title>AI Webserver Login</title> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <LINK REL=StyleSheet HREF="assets/login.css" TYPE="text/css"> </LINK> <script type="text/javascript" src="assets/jquery.js"></script> <script type="text/javascript" src="assets/md5.js"></script> <script type="text/javascript"> function start() { $('#login').hide(); $('#login_text').hide(); $('#login').delay(1000).fadeIn(2000, function() {}); $('#login_text').fadeIn(2000, function() {}); } function hash() { //Hash the password before submission, not secure against //things like wireshark, but will at least hide plaintext. :) document.getElementById('pass').value = MD5(document.getElementById('pass').value); $('#bg').fadeOut(1000, function() {}); $('#login').fadeOut(2000, function() {}); $('#login_text').fadeOut(2000, function() {}); } </script> </head> <body id="login_page" onLoad="start()"> <!--Stretched background--> <img src="assets/earthrise.jpg" alt="background image" id="bg" /> <h1 id="login_text">AI Webserver Login</h1> <!--Login form--> <div id="login"> <form method="post"> <input type="text" name="username" placeholder="Username"/> <br /> <input type="password" id="pass" name="password" placeholder="Password"/> <br /> <input type="submit" value="Submit" onClick="hash()"/> </form> </div> </html> </body> ''' #Send body self.wfile.write(page)
37.929204
99
0.587028
507
4,286
4.932939
0.358974
0.022391
0.031188
0.045582
0.498201
0.498201
0.455818
0.455818
0.455818
0.455818
0
0.030212
0.297247
4,286
112
100
38.267857
0.800133
0.218852
0
0.054054
0
0.040541
0.851718
0.169078
0
0
0
0
0
1
0
false
0.067568
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
7ae25d43434813868d7d08530fb9198341419874
1,316
py
Python
QCompute/OpenConvertor/CircuitToJson/__init__.py
baidu/QCompute
04e9fd62e10b1e8bb2be4ec6cff4ea4f3a7d4025
[ "Apache-2.0" ]
52
2020-09-14T02:25:25.000Z
2022-02-17T07:43:01.000Z
QCompute/OpenConvertor/CircuitToJson/__init__.py
baidu/QCompute
04e9fd62e10b1e8bb2be4ec6cff4ea4f3a7d4025
[ "Apache-2.0" ]
null
null
null
QCompute/OpenConvertor/CircuitToJson/__init__.py
baidu/QCompute
04e9fd62e10b1e8bb2be4ec6cff4ea4f3a7d4025
[ "Apache-2.0" ]
10
2020-09-15T06:10:24.000Z
2021-09-15T07:26:27.000Z
#!/usr/bin/python3 # -*- coding: utf8 -*- # Copyright (c) 2020 Baidu, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ Convert the circuit to json """ from google.protobuf.json_format import MessageToJson from QCompute.OpenConvertor import ConvertorImplement from QCompute.QProtobuf import PBProgram class CircuitToJson(ConvertorImplement): """ Circuit to json """ def convert(self, program: PBProgram) -> str: """ Convert the circuit to json. Example: env.publish() # need to generate protobuf circuit data jsonStr = CircuitToJson().convert(env.program) :param program: Protobuf format of the circuit :return: json str """ return MessageToJson(program, preserving_proto_field_name=True)
27.416667
74
0.709726
170
1,316
5.470588
0.623529
0.064516
0.041935
0.034409
0.049462
0
0
0
0
0
0
0.009597
0.208207
1,316
47
75
28
0.882917
0.658055
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.5
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
7af0d3e591bbc41c4f18393b59dfe71c7a12161e
267
py
Python
lgp/abcd/action.py
dingmyu/hlsm
628702789d910f745c74e738efbdd65f0fdb654b
[ "BSD-3-Clause" ]
null
null
null
lgp/abcd/action.py
dingmyu/hlsm
628702789d910f745c74e738efbdd65f0fdb654b
[ "BSD-3-Clause" ]
null
null
null
lgp/abcd/action.py
dingmyu/hlsm
628702789d910f745c74e738efbdd65f0fdb654b
[ "BSD-3-Clause" ]
null
null
null
from abc import ABC, abstractmethod, abstractclassmethod class Action(ABC): def __init__(self): ... @abstractmethod def is_stop(self) -> bool: """ :return: True if this is a STOP-action, False otherwise. """ ...
19.071429
64
0.573034
28
267
5.285714
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.310861
267
13
65
20.538462
0.804348
0.209738
0
0.285714
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0
0.571429
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
2
bb08ed4539ac6b594a0a3bdd3c76da319d1b68cc
2,185
py
Python
iconsdk/utils/__init__.py
geometry-labs/icon-sdk-python
e530df02eb16b394c3022d2d7d0383bd972e129a
[ "Apache-2.0" ]
51
2018-08-29T04:15:36.000Z
2022-03-14T10:02:08.000Z
iconsdk/utils/__init__.py
geometry-labs/icon-sdk-python
e530df02eb16b394c3022d2d7d0383bd972e129a
[ "Apache-2.0" ]
24
2018-09-03T03:16:19.000Z
2022-01-17T08:28:04.000Z
iconsdk/utils/__init__.py
geometry-labs/icon-sdk-python
e530df02eb16b394c3022d2d7d0383bd972e129a
[ "Apache-2.0" ]
44
2018-09-06T22:36:16.000Z
2022-03-15T06:46:05.000Z
# -*- coding: utf-8 -*- # Copyright 2018 ICON Foundation # # 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. from functools import wraps from logging import StreamHandler, Formatter from os import path from time import time from iconsdk import logger def store_keystore_file_on_the_path(file_path, json_string): """Stores a created keystore string data which is JSON format on the file path. :param file_path: The path where the file will be saved. type(str) :param json_string: Contents of the keystore. """ if path.isfile(file_path): raise FileExistsError with open(file_path, 'wt') as f: f.write(json_string) def apply_to_return_value(callback): def outer(fn): @wraps(fn) def inner(*args, **kwargs): return callback(fn(*args, **kwargs)) return inner return outer to_dict = apply_to_return_value(dict) def set_logger(level, handler=StreamHandler(), format: str = '%(asctime)s %(name)-12s %(levelname)-5s ' '%(filename)-12s %(lineno)-4s %(funcName)-12s %(message)s') -> None: """ Set logger by setting level and handler :param level: the logging level of this logger. The level must be an int or a str. :param handler: the specified handler to be added to this logger :param format: the specified format strings which initialize the formatter with. :return: None """ formatter = Formatter(format) handler.setFormatter(formatter) logger.addHandler(handler) logger.setLevel(level) def get_timestamp() -> str: """Returns the timestamp in microseconds since the epoch""" return hex(int(time() * 10 ** 6))
31.214286
97
0.69611
309
2,185
4.854369
0.478964
0.04
0.017333
0.021333
0
0
0
0
0
0
0
0.011641
0.21373
2,185
69
98
31.666667
0.861467
0.503432
0
0
0
0
0.095984
0
0
0
0
0
0
1
0.222222
false
0
0.185185
0.037037
0.555556
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
bb112a5044a18e3752c6b483d699b12dd3c90774
371
py
Python
test_project/test_app/views.py
ninemoreminutes/django-site-utils
d0c9f360451593f20ce0e80866f7e76185c0764b
[ "BSD-3-Clause" ]
null
null
null
test_project/test_app/views.py
ninemoreminutes/django-site-utils
d0c9f360451593f20ce0e80866f7e76185c0764b
[ "BSD-3-Clause" ]
13
2020-05-07T03:57:03.000Z
2022-03-12T00:54:56.000Z
test_project/test_app/views.py
ninemoreminutes/django-site-utils
d0c9f360451593f20ce0e80866f7e76185c0764b
[ "BSD-3-Clause" ]
null
null
null
# Python from __future__ import unicode_literals # Django from django.core.exceptions import PermissionDenied, SuspiciousOperation from django.http import Http404 def bad_request(request): raise SuspiciousOperation def forbidden(request): raise PermissionDenied def not_found(request): raise Http404 def server_error(request): raise RuntimeError
16.130435
72
0.795148
42
371
6.833333
0.547619
0.167247
0
0
0
0
0
0
0
0
0
0.019169
0.156334
371
22
73
16.863636
0.897764
0.03504
0
0
0
0
0
0
0
0
0
0
0
1
0.363636
false
0
0.272727
0
0.636364
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
bb148d18ef3ba03b90ef01b5c9f9784893896d87
499
py
Python
snuba/datasets/storages/__init__.py
fpacifici/snuba
cf732b71383c948f9387fbe64e9404ca71f8e9c5
[ "Apache-2.0" ]
null
null
null
snuba/datasets/storages/__init__.py
fpacifici/snuba
cf732b71383c948f9387fbe64e9404ca71f8e9c5
[ "Apache-2.0" ]
null
null
null
snuba/datasets/storages/__init__.py
fpacifici/snuba
cf732b71383c948f9387fbe64e9404ca71f8e9c5
[ "Apache-2.0" ]
null
null
null
from enum import Enum class StorageKey(Enum): """ A storage key is a unique identifier for a storage. """ EVENTS = "events" EVENTS_RO = "events_ro" ERRORS = "errors" GROUPEDMESSAGES = "groupedmessages" GROUPASSIGNEES = "groupassignees" OUTCOMES_RAW = "outcomes_raw" OUTCOMES_HOURLY = "outcomes_hourly" QUERYLOG = "querylog" SESSIONS_RAW = "sessions_raw" SESSIONS_HOURLY = "sessions_hourly" SPANS = "spans" TRANSACTIONS = "transactions"
23.761905
55
0.673347
51
499
6.392157
0.470588
0.04908
0.116564
0
0
0
0
0
0
0
0
0
0.234469
499
20
56
24.95
0.853403
0.102204
0
0
0
0
0.298611
0
0
0
0
0
0
1
0
false
0.071429
0.071429
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
2
bb15eb67f8fa3accf870953bfbb588c1944d22ba
1,241
py
Python
bloock/config/repository/config_repository.py
enchainte/enchainte-sdk-py
d7e6803cb941ae929bca9bb00584aa5b4853689a
[ "MIT" ]
1
2021-11-21T22:02:49.000Z
2021-11-21T22:02:49.000Z
bloock/config/repository/config_repository.py
enchainte/enchainte-sdk-py
d7e6803cb941ae929bca9bb00584aa5b4853689a
[ "MIT" ]
1
2021-09-16T20:19:04.000Z
2021-09-16T20:19:04.000Z
bloock/config/repository/config_repository.py
enchainte/enchainte-sdk-py
d7e6803cb941ae929bca9bb00584aa5b4853689a
[ "MIT" ]
1
2021-12-10T10:22:30.000Z
2021-12-10T10:22:30.000Z
from ..entity.config_env_entity import ConfigEnv from ..entity.configuration_entity import Configuration, NetworkConfiguration from ..entity.networks_entity import Network from .config_data import ConfigData class ConfigRepository: ''' Repository in charge of managing Bloock API's configuration.''' def __init__(self, config_data: ConfigData): ''' Requieres a ConfigData object to be maintained.''' self.__config_data = config_data def getConfiguration(self) -> Configuration: ''' Returns a Configuration object with the current configuration for the API. ''' return self.__config_data.getConfiguration() def getNetworkConfiguration(self, network: Network) -> NetworkConfiguration: ''' Returns the configuration of a specified network.''' return self.__config_data.getNetworkConfiguration(network) def setHost(self, host: str): ''' Updates the Configuration host ''' self.__config_data.setHost(host) def setNetworkConfiguration(self, network: Network, config: NetworkConfiguration): ''' Overrides the selected network configuration value.''' self.__config_data.setNetworkConfiguration(network, config)
40.032258
86
0.722804
126
1,241
6.912698
0.380952
0.091848
0.096441
0.045924
0
0
0
0
0
0
0
0
0.195004
1,241
31
87
40.032258
0.871872
0.255439
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.266667
0
0.8
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
bb1c9f11a896900b4815a6c916c9cd6d64e72d93
132
py
Python
scale/config.py
tkisss/SCALE
ce3db38d01f704206885c0b9efcd7ccca2aaa351
[ "MIT" ]
1
2021-02-02T12:29:00.000Z
2021-02-02T12:29:00.000Z
scale/config.py
tkisss/SCALE
ce3db38d01f704206885c0b9efcd7ccca2aaa351
[ "MIT" ]
null
null
null
scale/config.py
tkisss/SCALE
ce3db38d01f704206885c0b9efcd7ccca2aaa351
[ "MIT" ]
null
null
null
epochs=300 batch_size=16 latent=10 lr=0.0002 weight_decay=5e-4 encode_dim=[3200, 1600, 800, 400] decode_dim=[] print_interval=10
11
33
0.765152
25
132
3.84
0.92
0
0
0
0
0
0
0
0
0
0
0.254237
0.106061
132
11
34
12
0.559322
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.125
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
bb29a42ccf5cc6ceadff6dd8d2dc6b7f8739400f
749
py
Python
backend/tests/streetlight_test_data.py
hack4impact-uiuc/c2tc-fall-2018
a64698ac47c35b244d32dc86019327b35d69e9ed
[ "MIT" ]
7
2018-10-03T23:40:31.000Z
2019-01-30T07:46:59.000Z
backend/tests/streetlight_test_data.py
hack4impact-uiuc/c2tc-fall-2018
a64698ac47c35b244d32dc86019327b35d69e9ed
[ "MIT" ]
46
2018-10-05T22:35:04.000Z
2019-01-30T07:49:11.000Z
backend/tests/streetlight_test_data.py
hack4impact-uiuc/c2tc-fall-2018
a64698ac47c35b244d32dc86019327b35d69e9ed
[ "MIT" ]
1
2020-02-07T21:26:01.000Z
2020-02-07T21:26:01.000Z
streetlights = [ { "_id": "5c33cb90633a6f0003bcb38b", "latitude": 40.109356050955824, "longitude": -88.23546712954632, }, { "_id": "5c33cb90633a6f0003bcb38c", "latitude": 40.10956288950609, "longitude": -88.23546931624688, }, { "_id": "5c33cb90633a6f0003bcb38d", "latitude": 40.11072693111868, "longitude": -88.23548184676547, }, { "_id": "5c33cb90633a6f0003bcb38e", "latitude": 40.11052593366689, "longitude": -88.23548345321224, }, { "_id": "5c33cb90633a6f0003bcb38f", "latitude": 40.1105317123791, "longitude": -88.23527189093869, }, ] def get_streetlights(): return streetlights
23.40625
42
0.572764
46
749
9.195652
0.521739
0.118203
0
0
0
0
0
0
0
0
0
0.439252
0.285714
749
31
43
24.16129
0.351402
0
0
0
0
0
0.293725
0.160214
0
0
0
0
0
1
0.034483
false
0
0
0.034483
0.068966
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
bb2bc10a3c12edf7f99b6b47f02d2a7f38cd182c
88
py
Python
Aulasatualizada/entendendoFuncao.py
swellington231/AulaPaython
7b72ddec4d85f4660c0c395de07a133993aa2c70
[ "MIT" ]
null
null
null
Aulasatualizada/entendendoFuncao.py
swellington231/AulaPaython
7b72ddec4d85f4660c0c395de07a133993aa2c70
[ "MIT" ]
null
null
null
Aulasatualizada/entendendoFuncao.py
swellington231/AulaPaython
7b72ddec4d85f4660c0c395de07a133993aa2c70
[ "MIT" ]
null
null
null
def contador(*num): for valor in num: print(num) contad contador(1, 2, 3,)
12.571429
21
0.590909
14
88
3.714286
0.785714
0
0
0
0
0
0
0
0
0
0
0.046875
0.272727
88
7
22
12.571429
0.765625
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0
0
0.2
0.2
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
bb2cc04daf5d0f3b62503e2f878f9c9f3cb69af2
303
py
Python
src/srvup/tasks.py
paveu/srvup_rest
97491df4106d5e8b951c6117770fe74072612e49
[ "MIT" ]
1
2015-10-10T16:49:30.000Z
2015-10-10T16:49:30.000Z
src/srvup/tasks.py
paveu/srvup_rest
97491df4106d5e8b951c6117770fe74072612e49
[ "MIT" ]
null
null
null
src/srvup/tasks.py
paveu/srvup_rest
97491df4106d5e8b951c6117770fe74072612e49
[ "MIT" ]
null
null
null
import os from django.conf import settings from srvup.celery import app from django.core.mail import send_mail @app.task() def sendFeedbackEmail(email, message): subject = "Feedback from %s" % email return send_mail(subject, str(message), str(email), ['omega8@o2.pl'], fail_silently=False)
30.3
94
0.742574
44
303
5.045455
0.636364
0.09009
0
0
0
0
0
0
0
0
0
0.007722
0.145215
303
10
95
30.3
0.849421
0
0
0
0
0
0.092105
0
0
0
0
0
0
1
0.125
false
0
0.5
0
0.75
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
bb30ab83e3effc7c7394bab86ba4def8046c8dab
604
py
Python
tests/stdlib/test_math.py
bozhiyeh/voc
3f7799a1e58f7beed1c6374ea2e57e32419ba1ee
[ "BSD-3-Clause" ]
null
null
null
tests/stdlib/test_math.py
bozhiyeh/voc
3f7799a1e58f7beed1c6374ea2e57e32419ba1ee
[ "BSD-3-Clause" ]
null
null
null
tests/stdlib/test_math.py
bozhiyeh/voc
3f7799a1e58f7beed1c6374ea2e57e32419ba1ee
[ "BSD-3-Clause" ]
null
null
null
import unittest from ..utils import TranspileTestCase class MathModuleTests(TranspileTestCase): def test_fabs(self): self.assertCodeExecution(""" import math print(math.fabs(10234)) print(math.fabs(0.0001)) print(math.fabs(0)) print(math.fabs(-1)) """) @unittest.expectedFailure def test_fail(self): self.assertCodeExecution(""" import math try: print(math.fabs('12334')) except Exception as e: print(type(e), e) """)
27.454545
41
0.52649
57
604
5.54386
0.473684
0.142405
0.205696
0.208861
0.234177
0
0
0
0
0
0
0.044156
0.362583
604
22
42
27.454545
0.776623
0
0
0.3
0
0
0.563636
0.119008
0
0
0
0
0.1
1
0.1
false
0
0.2
0
0.35
0.3
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
bb4603fbb0a5afa06361f97101f2c9896854ae58
497
py
Python
panoptes/analysis/urls.py
oberlin/panoptes
67d451ea4ffc58c23b5f347bfa5609fa7f853b45
[ "BSD-3-Clause" ]
2
2017-07-24T05:11:59.000Z
2017-08-27T19:17:42.000Z
panoptes/analysis/urls.py
oberlin/panoptes
67d451ea4ffc58c23b5f347bfa5609fa7f853b45
[ "BSD-3-Clause" ]
null
null
null
panoptes/analysis/urls.py
oberlin/panoptes
67d451ea4ffc58c23b5f347bfa5609fa7f853b45
[ "BSD-3-Clause" ]
null
null
null
from django.conf.urls.defaults import * location_patterns = patterns('panoptes.analysis.views', url(r'^/$', 'analysis', name="analysis"), ) lens_patterns = patterns('panoptes.analysis.views', url(r'^update-panels/$', 'update_supporting_panels', name="update-supporting-panels") ) urlpatterns = patterns('', url(r'^/?$', 'panoptes.analysis.views.index', name="analysis-index"), (r'^location/(?P<location_slug>[^/]+)', include(location_patterns)), (r'^lenses/', include(lens_patterns)) )
26.157895
86
0.704225
58
497
5.913793
0.413793
0.139942
0.183673
0.186589
0.239067
0.239067
0.239067
0
0
0
0
0
0.080483
497
18
87
27.611111
0.750547
0
0
0
0
0
0.439516
0.316532
0
0
0
0
0
1
0
false
0
0.083333
0
0.083333
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
bb47868826c639be555c1dcb3e4b83662ae8a79e
639
py
Python
tests/test_indented_code_block.py
jmholla/markflow
1accc4a23f9c06d9ab77d6c180c586da3d9ec69b
[ "Apache-2.0" ]
14
2020-08-14T03:09:53.000Z
2022-03-22T22:46:50.000Z
tests/test_indented_code_block.py
jmholla/markflow
1accc4a23f9c06d9ab77d6c180c586da3d9ec69b
[ "Apache-2.0" ]
6
2020-08-19T18:13:24.000Z
2021-02-11T03:56:34.000Z
tests/test_indented_code_block.py
jmholla/markflow
1accc4a23f9c06d9ab77d6c180c586da3d9ec69b
[ "Apache-2.0" ]
3
2020-08-13T16:40:13.000Z
2022-01-18T12:31:37.000Z
from markflow.formatters.indented_code_block import MarkdownIndentedCodeBlock from .util import create_section, render class TestIndentedCodeBlock: def test_simple(self) -> None: input_ = " import goods \n" "\n" " tariffs = good.audit() \n" expected = " import goods\n" "\n" " tariffs = good.audit()" code_block = create_section(MarkdownIndentedCodeBlock, input_) assert code_block.reformatted() == expected code_block = create_section(MarkdownIndentedCodeBlock, expected) assert code_block.reformatted() == expected assert render(expected) == render(input_)
42.6
80
0.690141
65
639
6.584615
0.430769
0.10514
0.056075
0.060748
0.514019
0.135514
0.135514
0
0
0
0
0
0.214398
639
14
81
45.642857
0.85259
0
0
0.181818
0
0
0.158059
0
0
0
0
0
0.272727
1
0.090909
false
0
0.363636
0
0.545455
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
2490333f4534c1b560b827b8f142e1eab8f5c88f
2,909
py
Python
week3.py
Zhamiliaa/FisrtProject
cc37050e15890637f44fc548ce19fba2eec19a11
[ "MIT" ]
null
null
null
week3.py
Zhamiliaa/FisrtProject
cc37050e15890637f44fc548ce19fba2eec19a11
[ "MIT" ]
null
null
null
week3.py
Zhamiliaa/FisrtProject
cc37050e15890637f44fc548ce19fba2eec19a11
[ "MIT" ]
null
null
null
# numbers = [10, 20, 30, 40, 7, 8, 9, 1, 2, 3, 4] # # for number in numbers: # if number % 2 == 0: # print(number) # try: # print('1'+'1') # except TypeError: # print('except') # finally: # print('finally') # names = ['vladimir', 'zhamilia', 'cholpon', 'begimai', 'erbol', 'bakyt', 'aliya'] # salaries = [0, 10000, 20000, None, 30000, None, None] # # i = 0 # while i < len(names): # try: # salaries[i] *= 2 # except TypeError: # salaries[i] = 0 # i += 1 # # print(salaries) # data = [ # {'dress':[ # {'name':'louis vuitton', # 'popularity':500, # 'price':1000 # }, # {'name':'versace', # 'popularity':21, # 'price':888 # }, # {'name':'supreme', # 'popularity':57, # 'price':765 # }, # ] # }, # {'jeans':[ # {'name':'adidas', # 'popularity':42, # 'price':2300 # }, # {'name':'armani', # 'popularity':678, # 'price':110 # }, # {'name':'casio', # 'popularity':230, # 'price':3000 # }, # ] # }, # {'t-shirt':[ # {'name':'tom ford', # 'popularity':999, # 'price':5000 # }, # {'name':'lacoste', # 'popularity':777, # 'price':230 # }, # {'name':'luxury', # 'popularity':876, # 'price':2300 # }, # ] # } # ] # # list1 = ['dress', 'jeans', 't-shirt'] # # i = 0 # category_price = {} # # for category in data: # category_sum = 0 # key = list1[i] # category_value = category[key] # for product in category_value: # category_sum += product['price'] # category_price[key] = category_sum # i += 1 # # print(max(category_price.values()), category_price) # # # list1 = ['dress', 'jeans', 't-shirt'] # # i = 0 # category_popular = {} # # for popularity in data: # popular_sum = 0 # key = list1[i] # popularity_value = popularity[key] # for most_popular in popularity_value: # popular_sum += most_popular['popularity'] # category_popular[key] = popular_sum # i += 1 # # print(max(category_popular.values()),category_popular) # # list1 = ['dress', 'jeans', 't-shirt'] # # i = 0 # price_list = [] # # for category in data: # # print(category) # key = list1[i] # value = category[key] # # print(value) # for product in value: # price_list.append(product['price']) # i += 1 # file1 = open('test.txt', 'w') # file1.write(str(max(price_list))) # #
21.07971
83
0.427982
268
2,909
4.559701
0.343284
0.008183
0.017185
0.03928
0.125205
0.103928
0.069558
0.050737
0
0
0
0.062783
0.392231
2,909
137
84
21.233577
0.628394
0.910278
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
2
2492b3471823b15b8f860247e39c99bc7b3b4417
765
py
Python
tests/utils/test_concurrency.py
bbetov-corelogic/OasisLMF
fcb9a595ec6eb30c2ed3b9b67152c2f27fc0082b
[ "BSD-3-Clause" ]
null
null
null
tests/utils/test_concurrency.py
bbetov-corelogic/OasisLMF
fcb9a595ec6eb30c2ed3b9b67152c2f27fc0082b
[ "BSD-3-Clause" ]
null
null
null
tests/utils/test_concurrency.py
bbetov-corelogic/OasisLMF
fcb9a595ec6eb30c2ed3b9b67152c2f27fc0082b
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import io import json from unittest import TestCase from hypothesis import ( given, HealthCheck, reproduce_failure, settings, ) from hypothesis.strategies import ( dictionaries, integers, floats, just, lists, sampled_from, text, tuples, ) from mock import patch, Mock from tempfile import NamedTemporaryFile from oasislmf.utils.concurrency import ( multiprocess as mp, multithread as mt, SignalHandler as Sh, Task as Tk, ) from oasislmf.utils.exceptions import OasisException class SignalHandler(TestCase): pass class Task(TestCase): pass class Multiprocess(TestCase): pass class Multithread(TestCase): pass
14.711538
52
0.708497
85
765
6.294118
0.552941
0.08972
0.095327
0
0
0
0
0
0
0
0
0.001692
0.227451
765
51
53
15
0.903553
0.027451
0
0.108108
0
0
0
0
0
0
0
0
0
1
0
true
0.108108
0.27027
0
0.378378
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
2
24932c156e5448a7acba2cb2dd01d9c76a539324
125
py
Python
MUNDO 1/Teste.py
Jonatas-Soares-Alves/Exercicios-do-Curso-de-Python
68a915beb295752b8790d480be047dc72bac2ed8
[ "MIT" ]
null
null
null
MUNDO 1/Teste.py
Jonatas-Soares-Alves/Exercicios-do-Curso-de-Python
68a915beb295752b8790d480be047dc72bac2ed8
[ "MIT" ]
null
null
null
MUNDO 1/Teste.py
Jonatas-Soares-Alves/Exercicios-do-Curso-de-Python
68a915beb295752b8790d480be047dc72bac2ed8
[ "MIT" ]
null
null
null
teste = 3 * 5 + 4 ** 2 s = 'prova de python' n = 'José' i = 25 print('Você se chama {} e tem {} anos de idade'.format(n, i))
20.833333
61
0.56
25
125
2.8
0.88
0
0
0
0
0
0
0
0
0
0
0.06383
0.248
125
6
61
20.833333
0.680851
0
0
0
0
0
0.460317
0
0
0
0
0
0
1
0
false
0
0
0
0
0.2
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
24a14106883b4c34c89991c28ca53fd0a6013647
4,092
py
Python
investing_algorithm_framework/core/performance/performance_service.py
investing-algorithms/investing-algorithm-framework
d579e142a3857e2e2dfb59b7d6e54202f7df5466
[ "Apache-2.0" ]
1
2019-12-23T21:23:45.000Z
2019-12-23T21:23:45.000Z
investing_algorithm_framework/core/performance/performance_service.py
investing-algorithms/investing-algorithm-framework
d579e142a3857e2e2dfb59b7d6e54202f7df5466
[ "Apache-2.0" ]
null
null
null
investing_algorithm_framework/core/performance/performance_service.py
investing-algorithms/investing-algorithm-framework
d579e142a3857e2e2dfb59b7d6e54202f7df5466
[ "Apache-2.0" ]
1
2019-12-23T21:23:50.000Z
2019-12-23T21:23:50.000Z
# from investing_algorithm_framework.core.models import PerformanceMetric, \ # TimeFrame # from investing_algorithm_framework.core.performance import \ # SnapshotAssetPriceCollection # # # class PerformanceService: # # @staticmethod # def of_metric(portfolio, metric: PerformanceMetric, time_frame: TimeFrame): # # Create SnapshotAssetPriceCollection object for iteration # snapshot_asset_price_collection = SnapshotAssetPriceCollection( # portfolio=portfolio, # time_frame=time_frame, # ) # # if PerformanceMetric.OVERALL_PERFORMANCE.equals(metric): # return PerformanceService().generate_overall_performance( # snapshot_asset_price_collection # ) # elif PerformanceMetric.DELTA.equals(metric): # return PerformanceService().generate_delta( # snapshot_asset_price_collection # ) # # raise NotImplementedError("Performance metric not supported") # # def generate_delta(self, snapshot_asset_price_collection): # """ # Performance calculation with Time Weighted Return # TWR = [(1 + HP_1) * (1 + HP_2) * ... * (1 + HP_n)] - 1 # # Where # TWR = Time weighted return # n = Number of sub-periods # HP = (Total Value - (Previous Total Value + Cash Flow)) # / (Previous Total Value + Cash Flow) # HP_n = Return for sub-period n # """ # points = [] # previous_snapshot = None # previous_asset_prices = None # previous_point = 1.0 # delta = 1 # # points.append(previous_point) # # for date, snapshot, asset_prices in snapshot_asset_price_collection: # points.append(1 + self.get_hp( # snapshot, # previous_snapshot, # asset_prices, # previous_asset_prices # )) # # previous_asset_prices = asset_prices # previous_snapshot = snapshot # # for point in points: # delta = delta * point # # return delta - 1 # # def generate_overall_performance(self, snapshot_asset_price_collection): # """ # Performance calculation with Time Weighted Return # TWR = [(1 + HP_1) * (1 + HP_2) * ... * (1 + HP_n)] - 1 # # Where # TWR = Time weighted return # n = Number of sub-periods # HP = (Total Value - (Previous Total Value + Cash Flow)) # / (Previous Total Value + Cash Flow) # HP_n = Return for sub-period n # """ # points = [] # previous_snapshot = None # previous_asset_prices = None # previous_point = 1.0 # # for date, snapshot, asset_prices in snapshot_asset_price_collection: # hp_value = 1 + self.get_hp( # snapshot, # previous_snapshot, # asset_prices, # previous_asset_prices # ) # # points.append( # { # "datetime": date, # "value": (previous_point * hp_value) - 1 # } # ) # # previous_asset_prices = asset_prices # previous_snapshot = snapshot # previous_point = (previous_point * hp_value) # # return points # # def get_hp( # self, # snapshot, # previous_snapshot, # current_asset_prices, # previous_asset_prices # ): # if snapshot is not None and previous_snapshot is not None: # return ( # snapshot.get_total_value(current_asset_prices) - # (previous_snapshot.get_total_value(previous_asset_prices) # + snapshot.cash_flow)) \ # / (previous_snapshot.get_total_value(previous_asset_prices) # + snapshot.cash_flow) # # return 0
34.677966
81
0.545699
368
4,092
5.790761
0.192935
0.087752
0.080244
0.091976
0.580948
0.492726
0.492726
0.492726
0.442046
0.442046
0
0.008501
0.367546
4,092
117
82
34.974359
0.814915
0.942326
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
2
24a968b7fd7ca012684e7e5d17e642aa7558b3a1
10,052
py
Python
staff_directory/migrations/0001_initial.py
m3brown/collab-staff-directory
b582e9a2d6e24e0c3e0b1318c0b4cdc251ca2d64
[ "CC0-1.0" ]
3
2015-01-05T21:10:35.000Z
2016-08-15T04:03:39.000Z
staff_directory/migrations/0001_initial.py
m3brown/collab-staff-directory
b582e9a2d6e24e0c3e0b1318c0b4cdc251ca2d64
[ "CC0-1.0" ]
6
2015-09-10T18:05:40.000Z
2018-04-09T14:56:56.000Z
staff_directory/migrations/0001_initial.py
m3brown/collab-staff-directory
b582e9a2d6e24e0c3e0b1318c0b4cdc251ca2d64
[ "CC0-1.0" ]
9
2015-05-01T02:14:42.000Z
2021-02-20T10:56:18.000Z
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Praise' db.create_table('staff_directory_praise', ( ('id', self.gf( 'django.db.models.fields.AutoField')(primary_key=True)), ('recipient', self.gf('django.db.models.fields.related.ForeignKey') (to=orm['core.person'])), ('praise_nominator', self.gf( 'django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), ('cfpb_value', self.gf( 'django.db.models.fields.CharField')(max_length=100)), ('reason', self.gf('django.db.models.fields.TextField')()), ('date_added', self.gf('django.db.models.fields.DateTimeField') (auto_now=True, blank=True)), )) db.send_create_signal('staff_directory', ['Praise']) def backwards(self, orm): # Deleting model 'Praise' db.delete_table('staff_directory_praise') models = { 'auth.group': { 'Meta': {'object_name': 'Group'}, 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) }, 'auth.permission': { 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, 'auth.user': { 'Meta': {'object_name': 'User'}, 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) }, 'contenttypes.contenttype': { 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) }, 'core.office_location': { 'Meta': {'object_name': 'OfficeLocation'}, 'city': ('django.db.models.fields.CharField', [], {'max_length': '56'}), 'id': ('django.db.models.fields.CharField', [], {'max_length': '12', 'primary_key': 'True'}), 'state': ('django.db.models.fields.CharField', [], {'max_length': '2'}), 'street': ('django.db.models.fields.CharField', [], {'max_length': '56'}), 'suite': ('django.db.models.fields.CharField', [], {'max_length': '56', 'null': 'True', 'blank': 'True'}), 'zip': ('django.db.models.fields.CharField', [], {'max_length': '10'}) }, 'core.orggroup': { 'Meta': {'object_name': 'OrgGroup'}, 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.OrgGroup']", 'null': 'True', 'blank': 'True'}), 'title': ('django.db.models.fields.CharField', [], {'max_length': '128'}) }, 'core.person': { 'Meta': {'object_name': 'Person'}, 'allow_tagging': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'current_projects': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 'desk_location': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), 'email_notifications': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'home_phone': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), 'office_location': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.OfficeLocation']", 'null': 'True', 'blank': 'True'}), 'office_phone': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), 'org_group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.OrgGroup']", 'null': 'True', 'blank': 'True'}), 'photo_file': ('core.thumbs.ImageWithThumbsField', [], {'default': "'avatars/default.jpg'", 'max_length': '100'}), 'schools_i_attended': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 'stub': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), 'stuff_ive_done': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 'things_im_good_at': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 'title': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}), 'what_i_do': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) }, 'staff_directory.praise': { 'Meta': {'object_name': 'Praise'}, 'cfpb_value': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'praise_nominator': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), 'reason': ('django.db.models.fields.TextField', [], {}), 'recipient': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.Person']"}) }, 'taggit.tag': { 'Meta': {'object_name': 'Tag'}, 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}), 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) }, 'taggit.category': { 'Meta': {'object_name': 'TagCategory'}, 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}) }, 'taggit.taggeditem': { 'Meta': {'object_name': 'TaggedItem'}, 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), 'create_timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}), 'tag_category': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['taggit.TagCategory']", 'null': 'True'}), 'tag_creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_related'", 'null': 'True', 'to': "orm['auth.User']"}) } } complete_apps = ['staff_directory']
72.316547
182
0.558496
1,030
10,052
5.319417
0.158252
0.112429
0.194196
0.277423
0.691002
0.66545
0.657419
0.596824
0.494616
0.394233
0
0.009787
0.196976
10,052
138
183
72.84058
0.668979
0.006665
0
0.077519
0
0
0.572187
0.32111
0
0
0
0
0
1
0.015504
false
0.007752
0.031008
0
0.069767
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
24adbec675b5a2df1f3740f9a75d60abc628878c
528
py
Python
src/AkamaiLibrary/builtinMethods.py
ynohat/robotframework-akamai
544f4890fb4459a695d7995380f928e90e28eb50
[ "MIT" ]
2
2020-06-15T13:41:06.000Z
2020-06-15T13:44:47.000Z
src/AkamaiLibrary/builtinMethods.py
ynohat/robotframework-akamai
544f4890fb4459a695d7995380f928e90e28eb50
[ "MIT" ]
null
null
null
src/AkamaiLibrary/builtinMethods.py
ynohat/robotframework-akamai
544f4890fb4459a695d7995380f928e90e28eb50
[ "MIT" ]
null
null
null
# Shared list of BuiltIn keywords that should be implemented # by specialized comparators. builtin_method_names = ( "should_be_equal", "should_not_be_equal", "should_be_empty", "should_not_be_empty", "should_match", "should_not_match", "should_match_regexp", "should_not_match_regexp", "should_contain", "should_not_contain", "should_contain_any", "should_not_contain_any", "should_start_with", "should_not_start_with", "should_end_with", "should_not_end_with", )
25.142857
60
0.712121
67
528
5.044776
0.358209
0.213018
0.076923
0
0
0
0
0
0
0
0
0
0.185606
528
20
61
26.4
0.786047
0.162879
0
0
0
0
0.642369
0.150342
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
24bc7ff05cba976ac8c858e17872860e3c3cb442
2,279
py
Python
releasing/release.py
Ibotta/mockito
8f85a53476f1d0253fdcf09510b4b852a6bcc0a3
[ "MIT" ]
1
2016-11-22T19:12:21.000Z
2016-11-22T19:12:21.000Z
releasing/release.py
Ibotta/mockito
8f85a53476f1d0253fdcf09510b4b852a6bcc0a3
[ "MIT" ]
null
null
null
releasing/release.py
Ibotta/mockito
8f85a53476f1d0253fdcf09510b4b852a6bcc0a3
[ "MIT" ]
null
null
null
#This script is not really portable. It's just to automate some manual steps I usually do when releasing. #It might evolve into someting more robust but for now it's ok for me. import os def run(cmd): print("\nRunning command: " + cmd) assert os.system(cmd) == 0, "\nCommand failed: " + cmd ant_cmd = 'ant test.release release.maven' raw_input("It is wise to run following command first: \n\n" + ant_cmd + "\n\nIt's because ant some times provides wrong return code.\nAny key to continue") run('ruby replace_headers.rb') ok = raw_input("Make sure NOW if all you need is checked in.\nTHERE SHOULD BE NO CHANGED FILES!!!.\nProceed? (Y/N):") if ok != "Y": print "Exited on user request" exit(1) ver = raw_input("Specify the version, e.g. 1.9:") branch = 'https://mockito.googlecode.com/svn/branches/' + ver run('svn copy -m "branched before release" https://mockito.googlecode.com/svn/trunk ' + branch) run('svn co ' + branch + ' ../../mockito-' + ver) print("Switching to ../../mockito-" + ver + " folder") branch_work_dir = '../../mockito-' + ver os.chdir(branch_work_dir) print("Updating version.properties to " + ver) f = open('version.properties', 'w') f.write('version=' + ver) f.close() run(ant_cmd) run('svn add javadoc/*') run('svn ps -R svn:mime-type text/html javadoc/*') run('svn ps -R svn:mime-type text/css javadoc/stylesheet.css') run('svn ci -m "released javadoc, updated version"') import release_maven release_maven.go('.') print("Tagging...") tag = 'https://mockito.googlecode.com/svn/tags/' + ver run('svn copy -m "Tagged new release" ' + branch + ' ' + tag) print("Removing 'latest' tag...") latest_tag = 'https://mockito.googlecode.com/svn/tags/latest' run('svn delete -m "Removed previous latest tag" ' + latest_tag) print("Creating new 'latest' tag...") run('svn copy -m "Tagged latest release" ' + branch + ' ' + latest_tag) print("") print("Last step! Please perform rsync command from folder '" + branch_work_dir + "'. This is how you do it:") print("Dry run:") print("rsync -rvn -e \"ssh -i ../rsync.mockito.key\" maven/repository/ mockito@wamblee.org:/") print("Run:") print("rsync -rv -e \"ssh -i ../rsync.mockito.key\" maven/repository/ mockito@wamblee.org:/")
36.174603
156
0.667398
347
2,279
4.331412
0.461095
0.035928
0.05855
0.066534
0.22821
0.157019
0.157019
0.110446
0.110446
0.069195
0
0.002104
0.165862
2,279
63
157
36.174603
0.788532
0.07591
0
0
0
0.023256
0.608419
0.031326
0
0
0
0
0.023256
0
null
null
0
0.046512
null
null
0.302326
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
2
24c39730d39cc9d8f8b5db4a243c18a508c502dc
3,886
py
Python
WebManager.py
isombyt/XiaQian
9e0a1a0d0413a677adb2fb50f22b4aff1c5b92b0
[ "MIT" ]
28
2015-01-05T08:00:46.000Z
2021-01-30T04:44:50.000Z
WebManager.py
isombyt/XiaQian
9e0a1a0d0413a677adb2fb50f22b4aff1c5b92b0
[ "MIT" ]
3
2015-09-12T04:53:40.000Z
2018-01-08T09:08:01.000Z
WebManager.py
isombyt/XiaQian
9e0a1a0d0413a677adb2fb50f22b4aff1c5b92b0
[ "MIT" ]
5
2015-04-17T06:48:09.000Z
2020-10-10T22:46:10.000Z
import web import gevent import gevent.monkey import gevent.pywsgi from db import xiamidb import time import traceback import os from libXiami import User gevent.monkey.patch_all() class Main: def GET(self): return file("static/index.html").read() def POST(self): args = web.input() email = args.pop("email") password = args.pop("password") user = User() user.login(email,password) if user.islogined: xiamidb.add(user["user_id"],email,password) account = xiamidb.get(user["user_id"]) account["last"] = time.time() account["cookie"] = user.dumpCookie() account["email"] = email if "savepw" in args: account["password"] = password else: account["password"] = None if "notifyme" in args: account["notify"] = True else: account["notify"] = False account["errcount"] = 0 account["nexttime"] = account["last"] account["days"] = int(user["sign"]["persist_num"]) xiamidb.update(**account) yield "email:%s\n"%email yield "uid:%s\n"%account['uid'] yield "cookie:\n%s"%account['cookie'] yield "days:%s\n"%account["days"] yield '\xe7\x99\xbb\xe8\xae\xb0\xe6\x88\x90\xe5\x8a\x9f\xef\xbc\x8c\xe8\xaf\xb7\xe5\x85\xb3\xe9\x97\xad\xe9\xa1\xb5\xe9\x9d\xa2' else: yield '\xe6\x97\xa0\xe6\xb3\x95\xe8\x8e\xb7\xe5\x8f\x96\xe7\x94\xa8\xe6\x88\xb7\xe4\xbf\xa1\xe6\x81\xaf\xef\xbc\x8c\xe8\xaf\xb7\xe6\xa3\x80\xe6\x9f\xa5\xe5\xb8\x90\xe5\x8f\xb7\xe6\x88\x96\xe5\xaf\x86\xe7\xa0\x81' class Ctrl: def GET(self): yield "uid\temail\t\t\tdays\tlastcheck\tnextcheck\terrcount\tstatus\n" accounts = xiamidb.scan() for account in accounts: account["last"] -= time.time() account["nexttime"] -= time.time() yield "%(uid)s\t%(email)s\t%(days)s\t%(last)s\t%(nexttime)s\t%(errcount)s\t%(status)s\n"%account class StaticFile: def GET(self,filename): path = "static/%s"%filename if os.path.exists(path): return file(path,"rb") return "404" def checkin(account): user = User() user.loadCookie(account["cookie"]) if not user.islogined and account["password"]: user.login(account["email"],account["password"]) if user.islogined: if not user.ischeckined: days = user.checkin() if days: account["days"] = days else: account["errcount"] += 1 account["nexttime"] = time.time() + 600 account["status"] = u'\u7b7e\u5230\u5931\u8d25' else: days = int(user["sign"]["persist_num"]) account["nexttime"] = time.time() + 3600 account["status"] = u'\u6ca1\u6709\u5f02\u5e38' else: account["errcount"] += 1 account["nexttime"] = time.time() + 600 account["status"] = u'\u767b\u5f55\u5931\u8d25' account["last"] = time.time() xiamidb.update (**account) def daemon(): while True: accounts = xiamidb.scan(where="errcount<3 and nexttime<%s"%time.time()) for account in accounts: try: checkin(account) except: traceback.print_exc() print "checkin error" time.sleep(5) time.sleep(5) urls = ( "/", "Main", "/Ctrl","Ctrl", "/(.*)","StaticFile", ) def serve_forever(): gevent.spawn(daemon) print web application = web.application(urls, globals()).wsgifunc() print 'Serving on 8888' server = gevent.pywsgi.WSGIServer(('', 8888), application) server.serve_forever() if __name__ == "__main__": serve_forever()
31.33871
224
0.560473
474
3,886
4.559072
0.345992
0.029616
0.035169
0.042573
0.119389
0.095326
0.05553
0.05553
0.05553
0.05553
0
0.054239
0.283582
3,886
123
225
31.593496
0.721983
0
0
0.224299
0
0.028037
0.245497
0.138446
0
0
0
0
0
0
null
null
0.065421
0.084112
null
null
0.037383
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
1
0
0
0
0
0
2
24d52641513363db6ebdb657e3d2042d4eb08424
800
py
Python
app/resume_builds.py
spraakbanken/sparv-backend
2bc82d97399dbe5e0f45491c0f47bc18486bf130
[ "MIT" ]
2
2018-11-27T13:51:52.000Z
2021-03-08T07:57:55.000Z
app/resume_builds.py
spraakbanken/sparv-backend
2bc82d97399dbe5e0f45491c0f47bc18486bf130
[ "MIT" ]
13
2018-11-12T09:54:48.000Z
2020-04-17T08:59:12.000Z
app/resume_builds.py
spraakbanken/sparv-backend
2bc82d97399dbe5e0f45491c0f47bc18486bf130
[ "MIT" ]
null
null
null
# Resumes builds that are in the pipeline directory when the script needs to # restart. Starts make in the corresponding directories in case they had # not finished. from threading import Thread import logging from build import Build from utils import get_build_directories try: from config import Config except ImportError: from config_default import Config log = logging.getLogger('pipeline.' + __name__) def resume_builds(): builds = {} def resume_worker(): for d in get_build_directories(Config.builds_dir): log.info("Reattaching build in directory %s", d) build = builds[d] = Build(None, None, init_from_hash=d, resuming=True) Build.run(build, 'xml') t = Thread(target=resume_worker, args=[]) t.start() return builds
27.586207
82
0.7075
109
800
5.055046
0.541284
0.018149
0.068966
0
0
0
0
0
0
0
0
0
0.21375
800
28
83
28.571429
0.875994
0.19875
0
0
0
0
0.070644
0
0
0
0
0
0
1
0.105263
false
0
0.368421
0
0.526316
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
24f9049b8dc271ef168476039d4269cad942618a
1,054
py
Python
unittests/test_cases.py
arieltrevisan/python-3-from-scratch-practices
09c83edeed7b1eb28e37568ff90a16a511b54ed8
[ "MIT" ]
null
null
null
unittests/test_cases.py
arieltrevisan/python-3-from-scratch-practices
09c83edeed7b1eb28e37568ff90a16a511b54ed8
[ "MIT" ]
null
null
null
unittests/test_cases.py
arieltrevisan/python-3-from-scratch-practices
09c83edeed7b1eb28e37568ff90a16a511b54ed8
[ "MIT" ]
null
null
null
import unittest as ut """ https://docs.python.org/3/library/unittest.html#test-discovery """ class TestClassOne(ut.TestCase): @classmethod def setUpClass(cls): # print("setupClass") pass @classmethod def tearDownClass(cls): # print("tearDownClass") pass # setup of each method def setUp(self): # print("setUp") pass # teardown of each method def tearDown(self): # print("tearDown") pass def test_bool(self): value = True self.assertTrue(value, "Not True") def test_equals(self): value_1 = 1 value_2 = 1 self.assertEqual(value_1, value_2) def test_raise(self): with self.assertRaises(ZeroDivisionError): 1 / 0 class TestClassTwo(ut.TestCase): def test_1(self): self.assertEqual(1, 1) def test_2(self): list_1 = [1, 2, 3] list_2 = [2, 3, 1] self.assertCountEqual(list_1, list_2) if __name__ == '__main__': ut.main(verbosity=2)
18.172414
62
0.581594
128
1,054
4.625
0.390625
0.059122
0.040541
0.050676
0
0
0
0
0
0
0
0.032698
0.303605
1,054
57
63
18.491228
0.773842
0.113852
0
0.193548
0
0
0.018713
0
0
0
0
0
0.16129
1
0.290323
false
0.129032
0.032258
0
0.387097
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
2
70022c27ba3230c673ce5a7f805de3a312f2a231
7,456
py
Python
src/ham/radio/d878/radio_channel_d878.py
n2qzshce/ham_radio_sync
ffe95a4ef88375b5d5e4503cf770e884644536cd
[ "CNRI-Python", "RSA-MD" ]
8
2021-03-01T17:28:45.000Z
2022-02-10T02:19:41.000Z
src/ham/radio/d878/radio_channel_d878.py
n2qzshce/ham_radio_sync
ffe95a4ef88375b5d5e4503cf770e884644536cd
[ "CNRI-Python", "RSA-MD" ]
7
2021-03-31T03:37:12.000Z
2021-06-12T20:30:05.000Z
src/ham/radio/d878/radio_channel_d878.py
n2qzshce/ham_radio_sync
ffe95a4ef88375b5d5e4503cf770e884644536cd
[ "CNRI-Python", "RSA-MD" ]
1
2021-02-24T21:39:51.000Z
2021-02-24T21:39:51.000Z
from src.ham.radio.radio_channel import RadioChannel from src.ham.util import radio_types class RadioChannelD878(RadioChannel): def __init__(self, cols, digital_contacts, dmr_ids): super().__init__(cols, digital_contacts, dmr_ids) self.name.set_alias(radio_types.D878, 'Channel Name') self.rx_freq.set_alias(radio_types.D878, 'Receive Frequency') self.digital_timeslot.set_alias(radio_types.D878, 'Slot') self.digital_color.set_alias(radio_types.D878, 'Color Code') self.tx_power.set_alias(radio_types.D878, 'Transmit Power') def skip_radio_csv(self): return False def headers(self): output = list() output.append(f"No.") # "No.," output.append(f"{self.name.get_alias(radio_types.D878)}") # "Channel Name," output.append(f"{self.rx_freq.get_alias(radio_types.D878)}") # "Receive Frequency," output.append(f"Transmit Frequency") # "Transmit Frequency," output.append(f"Channel Type") # "Channel Type," output.append(f"{self.tx_power.get_alias(radio_types.D878)}") # "Transmit Power," output.append(f"Band Width") # "Band Width," output.append(f"CTCSS/DCS Decode") # "CTCSS/DCS Decode," output.append(f"CTCSS/DCS Encode") # "CTCSS/DCS Encode," output.append(f"Contact") # "Contact," output.append(f"Contact Call Type") # "Contact Call Type," output.append(f"Contact TG/DMR ID") # "Contact TG/DMR ID," output.append(f"Radio ID") # "Radio ID," output.append(f"Busy Lock/TX Permit") # "Busy Lock/TX Permit," output.append(f"Squelch Mode") # "Squelch Mode," output.append(f"Optional Signal") # "Optional Signal," output.append(f"DTMF ID") # "DTMF ID," output.append(f"2Tone ID") # "2Tone ID," output.append(f"5Tone ID") # "5Tone ID," output.append(f"PTT ID") # "PTT ID," output.append(f"{self.digital_color.get_alias(radio_types.D878)}") # "Color Code," output.append(f"{self.digital_timeslot.get_alias(radio_types.D878)}") # "Slot," output.append(f"Scan List") # "Scan List," output.append(f"Receive Group List") # "Receive Group List," output.append(f"PTT Prohibit") # "PTT Prohibit," output.append(f"Reverse") # "Reverse," output.append(f"Simplex TDMA") # "Simplex TDMA," output.append(f"Slot Suit") # "Slot Suit," output.append(f"AES Digital Encryption") # "AES Digital Encryption," output.append(f"Digital Encryption") # "Digital Encryption," output.append(f"Call Confirmation") # "Call Confirmation," output.append(f"Talk Around(Simplex)") # "Talk Around(Simplex)," #todo dmr talkaround output.append(f"Work Alone") # "Work Alone," output.append(f"Custom CTCSS") # "Custom CTCSS," output.append(f"2TONE Decode") # "2TONE Decode," output.append(f"Ranging") # "Ranging," output.append(f"Through Mode") # "Through Mode," output.append(f"Digi APRS RX") # "Digi APRS RX," output.append(f"Analog APRS PTT Mode") # "Analog APRS PTT Mode," output.append(f"Digital APRS PTT Mode") # "Digital APRS PTT Mode," output.append(f"APRS Report Type") # "APRS Report Type," output.append(f"Digital APRS Report Channel") # "Digital APRS Report Channel," output.append(f"Correct Frequency[Hz]") # "Correct Frequency[Hz]," output.append(f"SMS Confirmation") # "SMS Confirmation," output.append(f"Exclude channel from roaming") # "Exclude channel from roaming," output.append(f"DMR MODE") # "DMR MODE," output.append(f"DataACK Disable") # "DataACK Disable," output.append(f"R5toneBot") # "R5toneBot," output.append(f"R5ToneEot") # "R5ToneEot," return output def output(self, channel_number): tx_frequency = self.rx_freq.fmt_val() + self.tx_offset.fmt_val(0) channel_type = 'A-Analog' busy_lock = 'Off' dmr_mode = 0 contact_call_type = 'All Call' contact = self.digital_contacts[self.digital_contact_id.fmt_val(0)] dmr_name = self.dmr_ids[1].name.fmt_val() contact_id = self.dmr_ids[1].radio_id.fmt_val() call_confirmation = 'Off' if self.is_digital(): channel_type = 'D-Digital' busy_lock = 'Always' dmr_mode = 1 contact_call_type = 'Group Call' contact_id = contact.digital_id.fmt_val() call_confirmation = 'On' ctcs_dcs_decode = 'Off' if self.rx_ctcss.fmt_val() is not None or self.rx_dcs.fmt_val() is not None: if self.rx_ctcss.fmt_val() is not None: ctcs_dcs_decode = f"{self.rx_ctcss.fmt_val():.1f}" if self.rx_dcs.fmt_val() is not None: polarity = 'N' if self.rx_dcs_invert.fmt_val(False): polarity = 'I' dcs_code = int(self.rx_dcs.fmt_val()) ctcs_dcs_decode = f"D{str(dcs_code).zfill(3)}{polarity}" ctcs_dcs_encode = 'Off' if self.tx_ctcss.fmt_val() is not None or self.tx_dcs.fmt_val() is not None: if self.tx_ctcss.fmt_val() is not None: ctcs_dcs_encode = f"{self.tx_ctcss.fmt_val():.1f}" if self.tx_dcs.fmt_val() is not None: polarity = 'N' if self.tx_dcs_invert.fmt_val(False): polarity = 'I' dcs_code = int(self.rx_dcs.fmt_val()) ctcs_dcs_encode = f"D{str(dcs_code).zfill(3)}{polarity}" output = list() output.append(f"{channel_number}") # "No.," output.append(f"{self.name.fmt_val():.16s}") # "Channel Name," output.append(f"{self.rx_freq.fmt_val():.5f}") # "Receive Frequency," output.append(f"{tx_frequency:.5f}") # "Transmit Frequency," output.append(f"{channel_type}") # "Channel Type," output.append(f"{self.tx_power.fmt_val()}") # "Transmit Power," output.append(f"12.5K") # "Band Width," output.append(f"{ctcs_dcs_decode}") # "CTCSS/DCS Decode," output.append(f"{ctcs_dcs_encode}") # "CTCSS/DCS Encode," output.append(f"{contact.name.fmt_val()}") # "Contact," output.append(f"{contact_call_type}") # "Contact Call Type," output.append(f"{contact_id}") # "Contact TG/DMR ID," output.append(f"{dmr_name}") # "Radio ID," output.append(f"{busy_lock}") # "Busy Lock/TX Permit," output.append(f"Carrier") # "Squelch Mode," output.append(f"Off") # "Optional Signal," output.append(f"1") # "DTMF ID," output.append(f"1") # "2Tone ID," output.append(f"1") # "5Tone ID," output.append(f"Off") # "PTT ID," output.append(f"{self.digital_color.fmt_val(1)}") # "Color Code," output.append(f"{self.digital_timeslot.fmt_val(1)}") # "Slot," output.append(f"None") # "Scan List," output.append(f"None") # "Receive Group List," output.append(f"Off") # "PTT Prohibit," output.append(f"Off") # "Reverse," output.append(f"Off") # "Simplex TDMA," output.append(f"Off") # "Slot Suit," output.append(f"Normal Encryption") # "AES Digital Encryption," output.append(f"Off") # "Digital Encryption," output.append(f"{call_confirmation}") # "Call Confirmation," output.append(f"Off") # "Talk Around(Simplex)," output.append(f"Off") # "Work Alone," output.append(f"251.1") # "Custom CTCSS," output.append(f"0") # "2TONE Decode," output.append(f"Off") # "Ranging," output.append(f"Off") # "Through Mode," output.append(f"Off") # "Digi APRS RX," output.append(f"Off") # "Analog APRS PTT Mode," output.append(f"Off") # "Digital APRS PTT Mode," output.append(f"Off") # "APRS Report Type," output.append(f"1") # "Digital APRS Report Channel," output.append(f"0") # "Correct Frequency[Hz]," output.append(f"Off") # "SMS Confirmation," output.append(f"0") # "Exclude channel from roaming," output.append(f"{dmr_mode}") # "DMR MODE," output.append(f"0") # "DataACK Disable," output.append(f"0") # "R5toneBot," output.append(f"0") # "R5ToneEot," return output
45.742331
88
0.682135
1,112
7,456
4.441547
0.120504
0.238105
0.257947
0.051832
0.708241
0.478639
0.37214
0.290747
0.193966
0.153877
0
0.012714
0.14552
7,456
162
89
46.024691
0.762518
0.230821
0
0.25
0
0
0.265531
0.092119
0
0
0
0.006173
0
1
0.026316
false
0
0.013158
0.006579
0.065789
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
70103b5743a52563367cdf8905f2ba1757eb50d7
568
py
Python
core/color.py
rrpg/world-editor
d67cb605103189da95a91e29843c896eeeb011ae
[ "MIT" ]
1
2016-01-15T01:03:25.000Z
2016-01-15T01:03:25.000Z
core/color.py
rrpg/world-editor
d67cb605103189da95a91e29843c896eeeb011ae
[ "MIT" ]
null
null
null
core/color.py
rrpg/world-editor
d67cb605103189da95a91e29843c896eeeb011ae
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from core import config from PyQt4.QtGui import QColor COLOR_BRUSH = 0 COLOR_PEN = 1 def getColorFromConfig(section, paint_type): if section not in config.colors.keys(): raise BaseException("Unknown color section") if paint_type != COLOR_BRUSH and paint_type != COLOR_PEN: raise BaseException("Unknown paint type") if config.colors[section][paint_type] is None: return QColor(0, 0, 0, 0) return QColor( config.colors[section][paint_type][0], config.colors[section][paint_type][1], config.colors[section][paint_type][2] )
23.666667
58
0.734155
84
568
4.833333
0.392857
0.17734
0.197044
0.236453
0.275862
0
0
0
0
0
0
0.022587
0.142606
568
23
59
24.695652
0.811088
0.036972
0
0
0
0
0.07156
0
0
0
0
0
0
1
0.0625
false
0
0.125
0
0.3125
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
703a23170c0064819eca7c97e7738c09c16cade0
154
py
Python
FileIO/FileWithWrite.py
koichi210/Python
9bc0be009bec15499540c1bf9ae802ffe1acfe10
[ "MIT" ]
null
null
null
FileIO/FileWithWrite.py
koichi210/Python
9bc0be009bec15499540c1bf9ae802ffe1acfe10
[ "MIT" ]
null
null
null
FileIO/FileWithWrite.py
koichi210/Python
9bc0be009bec15499540c1bf9ae802ffe1acfe10
[ "MIT" ]
null
null
null
path_name = "SampleWrite.txt" ### withを使ったファイル読み込み with open(path_name, mode='w') as f: f.write('hello new world!!') # close不要 # f.close()
15.4
36
0.623377
21
154
4.47619
0.809524
0.170213
0
0
0
0
0
0
0
0
0
0
0.207792
154
9
37
17.111111
0.770492
0.220779
0
0
0
0
0.292035
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
703ae7e2572675a0d9fb8fe4fd4c296088d77f2d
431
py
Python
Algorithmic Toolbox/Dynamic Programming/Money Change Again/money_change_again_unit_tests.py
ganeshbhandarkar/Python-Projects
a4df933122a6694d249c69d1e8e95b592cf036a0
[ "MIT" ]
9
2020-07-02T06:06:17.000Z
2022-02-26T11:08:09.000Z
Algorithmic Toolbox/Dynamic Programming/Money Change Again/money_change_again_unit_tests.py
ganeshbhandarkar/Python-Projects
a4df933122a6694d249c69d1e8e95b592cf036a0
[ "MIT" ]
1
2021-11-04T17:26:36.000Z
2021-11-04T17:26:36.000Z
Algorithmic Toolbox/Dynamic Programming/Money Change Again/money_change_again_unit_tests.py
ganeshbhandarkar/Python-Projects
a4df933122a6694d249c69d1e8e95b592cf036a0
[ "MIT" ]
8
2021-01-31T10:31:12.000Z
2022-03-13T09:15:55.000Z
import unittest from money_change_again import change, change_naive class MoneyChangeAgain(unittest.TestCase): def test_small(self): for money in range(1, 40): self.assertEqual(change(money), change_naive(money)) def test_large(self): for money, answer in ((200, 50), (239, 60), type here): self.assertEqual(change(money), answer) if __name__ == '__main__': unittest.main()
25.352941
64
0.668213
55
431
4.981818
0.563636
0.080292
0.087591
0.189781
0
0
0
0
0
0
0
0.038576
0.218097
431
16
65
26.9375
0.774481
0
0
0
0
0
0.018561
0
0
0
0
0
0.181818
0
null
null
0
0.181818
null
null
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
2
70478f765af93797fe79dc134dc3f0f3ebd11b10
2,377
py
Python
fidesctl/src/fidesctl/cli/generate_commands.py
sanders41/fides
014b4e5f90dac4a0c04f28f656314abd9e00a6c4
[ "Apache-2.0" ]
null
null
null
fidesctl/src/fidesctl/cli/generate_commands.py
sanders41/fides
014b4e5f90dac4a0c04f28f656314abd9e00a6c4
[ "Apache-2.0" ]
null
null
null
fidesctl/src/fidesctl/cli/generate_commands.py
sanders41/fides
014b4e5f90dac4a0c04f28f656314abd9e00a6c4
[ "Apache-2.0" ]
null
null
null
"""Contains the generate group of CLI commands for Fidesctl.""" import click from fidesctl.cli.options import include_null_flag from fidesctl.cli.utils import with_analytics from fidesctl.core import dataset as _dataset from fidesctl.core import system as _system @click.group(name="generate") @click.pass_context def generate(ctx: click.Context) -> None: """ Generate fidesctl resource types """ @generate.command(name="dataset") @click.pass_context @click.argument("connection_string", type=str) @click.argument("output_filename", type=str) @include_null_flag def generate_dataset( ctx: click.Context, connection_string: str, output_filename: str, include_null: bool ) -> None: """ Connect to a database directly via a SQLAlchemy-style connection string and generate a dataset manifest file that consists of every schema/table/field. This is a one-time operation that does not track the state of the database. It will need to be run again if the database schema changes. """ with_analytics( ctx, _dataset.generate_dataset, connection_string=connection_string, filename=output_filename, include_null=include_null, ) @generate.group(name="system") @click.pass_context def generate_system(ctx: click.Context) -> None: """ Generate fidesctl System resources """ @generate_system.command(name="aws") @click.pass_context @click.argument("output_filename", type=str) @include_null_flag @click.option("-o", "--organization", type=str, default="default_organization") def generate_system_aws( ctx: click.Context, output_filename: str, include_null: bool, organization: str, ) -> None: """ Connect to an aws account by leveraging a boto3 environment variable configuration and generate a system manifest file that consists of every tracked resource. Tracked resources: [Redshift, RDS] This is a one-time operation that does not track the state of the aws resources. It will need to be run again if the tracked resources change. """ config = ctx.obj["CONFIG"] with_analytics( ctx, _system.generate_system_aws, file_name=output_filename, include_null=include_null, organization_key=organization, url=config.cli.server_url, headers=config.user.request_headers, )
29.345679
88
0.72318
311
2,377
5.379421
0.321543
0.059175
0.038255
0.0263
0.372385
0.31321
0.153019
0.153019
0.153019
0.062164
0
0.000519
0.188894
2,377
80
89
29.7125
0.86722
0.317207
0
0.340426
1
0
0.073905
0
0
0
0
0
0
1
0.085106
false
0.085106
0.106383
0
0.191489
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
705793439448cf23453cd0a017dc234d6358ed19
331
py
Python
terminal/views.py
m4tx/hackthespace
7b0852eaaa78e230a51a2da084e916df6eec20da
[ "MIT" ]
8
2019-03-27T13:08:44.000Z
2021-11-23T06:44:50.000Z
terminal/views.py
m4tx/hackthespace
7b0852eaaa78e230a51a2da084e916df6eec20da
[ "MIT" ]
8
2021-04-08T18:51:27.000Z
2022-03-11T23:43:45.000Z
terminal/views.py
m4tx/hackthespace
7b0852eaaa78e230a51a2da084e916df6eec20da
[ "MIT" ]
null
null
null
from django.views.generic import TemplateView from game.decorators import puzzle, hidden_puzzle, requires_email @puzzle class TerminalPuzzleView(TemplateView): template_name = 'terminal/puzzle.html' @hidden_puzzle @requires_email class TerminalHiddenPuzzleView(TemplateView): template_name = 'game/hidden_puzzle.html'
22.066667
65
0.818731
37
331
7.135135
0.513514
0.136364
0.151515
0.189394
0
0
0
0
0
0
0
0
0.108761
331
14
66
23.642857
0.894915
0
0
0
0
0
0.129909
0.069486
0
0
0
0
0
1
0
false
0
0.222222
0
0.666667
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
705b32a078fe29fb17a58b94e9a1b96c1c1fe6b8
11,250
py
Python
clients/python/tensorio_models/repository_pb2_grpc.py
nkashy1/tensorio-models
b7f50b972f702fb4844e8d66992446f75dfd10e6
[ "Apache-2.0" ]
null
null
null
clients/python/tensorio_models/repository_pb2_grpc.py
nkashy1/tensorio-models
b7f50b972f702fb4844e8d66992446f75dfd10e6
[ "Apache-2.0" ]
null
null
null
clients/python/tensorio_models/repository_pb2_grpc.py
nkashy1/tensorio-models
b7f50b972f702fb4844e8d66992446f75dfd10e6
[ "Apache-2.0" ]
null
null
null
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from . import repository_pb2 as repository__pb2 class RepositoryStub(object): # missing associated documentation comment in .proto file pass def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.Healthz = channel.unary_unary( '/api.Repository/Healthz', request_serializer=repository__pb2.HealthCheckRequest.SerializeToString, response_deserializer=repository__pb2.HealthCheckResponse.FromString, ) self.Config = channel.unary_unary( '/api.Repository/Config', request_serializer=repository__pb2.ConfigRequest.SerializeToString, response_deserializer=repository__pb2.ConfigResponse.FromString, ) self.ListModels = channel.unary_unary( '/api.Repository/ListModels', request_serializer=repository__pb2.ListModelsRequest.SerializeToString, response_deserializer=repository__pb2.ListModelsResponse.FromString, ) self.CreateModel = channel.unary_unary( '/api.Repository/CreateModel', request_serializer=repository__pb2.CreateModelRequest.SerializeToString, response_deserializer=repository__pb2.CreateModelResponse.FromString, ) self.GetModel = channel.unary_unary( '/api.Repository/GetModel', request_serializer=repository__pb2.GetModelRequest.SerializeToString, response_deserializer=repository__pb2.GetModelResponse.FromString, ) self.UpdateModel = channel.unary_unary( '/api.Repository/UpdateModel', request_serializer=repository__pb2.UpdateModelRequest.SerializeToString, response_deserializer=repository__pb2.UpdateModelResponse.FromString, ) self.ListHyperparameters = channel.unary_unary( '/api.Repository/ListHyperparameters', request_serializer=repository__pb2.ListHyperparametersRequest.SerializeToString, response_deserializer=repository__pb2.ListHyperparametersResponse.FromString, ) self.CreateHyperparameters = channel.unary_unary( '/api.Repository/CreateHyperparameters', request_serializer=repository__pb2.CreateHyperparametersRequest.SerializeToString, response_deserializer=repository__pb2.CreateHyperparametersResponse.FromString, ) self.GetHyperparameters = channel.unary_unary( '/api.Repository/GetHyperparameters', request_serializer=repository__pb2.GetHyperparametersRequest.SerializeToString, response_deserializer=repository__pb2.GetHyperparametersResponse.FromString, ) self.UpdateHyperparameters = channel.unary_unary( '/api.Repository/UpdateHyperparameters', request_serializer=repository__pb2.UpdateHyperparametersRequest.SerializeToString, response_deserializer=repository__pb2.UpdateHyperparametersResponse.FromString, ) self.ListCheckpoints = channel.unary_unary( '/api.Repository/ListCheckpoints', request_serializer=repository__pb2.ListCheckpointsRequest.SerializeToString, response_deserializer=repository__pb2.ListCheckpointsResponse.FromString, ) self.CreateCheckpoint = channel.unary_unary( '/api.Repository/CreateCheckpoint', request_serializer=repository__pb2.CreateCheckpointRequest.SerializeToString, response_deserializer=repository__pb2.CreateCheckpointResponse.FromString, ) self.GetCheckpoint = channel.unary_unary( '/api.Repository/GetCheckpoint', request_serializer=repository__pb2.GetCheckpointRequest.SerializeToString, response_deserializer=repository__pb2.GetCheckpointResponse.FromString, ) class RepositoryServicer(object): # missing associated documentation comment in .proto file pass def Healthz(self, request, context): # missing associated documentation comment in .proto file pass context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def Config(self, request, context): # missing associated documentation comment in .proto file pass context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def ListModels(self, request, context): # missing associated documentation comment in .proto file pass context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def CreateModel(self, request, context): # missing associated documentation comment in .proto file pass context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def GetModel(self, request, context): # missing associated documentation comment in .proto file pass context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def UpdateModel(self, request, context): # missing associated documentation comment in .proto file pass context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def ListHyperparameters(self, request, context): # missing associated documentation comment in .proto file pass context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def CreateHyperparameters(self, request, context): # missing associated documentation comment in .proto file pass context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def GetHyperparameters(self, request, context): # missing associated documentation comment in .proto file pass context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def UpdateHyperparameters(self, request, context): # missing associated documentation comment in .proto file pass context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def ListCheckpoints(self, request, context): # missing associated documentation comment in .proto file pass context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def CreateCheckpoint(self, request, context): # missing associated documentation comment in .proto file pass context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def GetCheckpoint(self, request, context): # missing associated documentation comment in .proto file pass context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def add_RepositoryServicer_to_server(servicer, server): rpc_method_handlers = { 'Healthz': grpc.unary_unary_rpc_method_handler( servicer.Healthz, request_deserializer=repository__pb2.HealthCheckRequest.FromString, response_serializer=repository__pb2.HealthCheckResponse.SerializeToString, ), 'Config': grpc.unary_unary_rpc_method_handler( servicer.Config, request_deserializer=repository__pb2.ConfigRequest.FromString, response_serializer=repository__pb2.ConfigResponse.SerializeToString, ), 'ListModels': grpc.unary_unary_rpc_method_handler( servicer.ListModels, request_deserializer=repository__pb2.ListModelsRequest.FromString, response_serializer=repository__pb2.ListModelsResponse.SerializeToString, ), 'CreateModel': grpc.unary_unary_rpc_method_handler( servicer.CreateModel, request_deserializer=repository__pb2.CreateModelRequest.FromString, response_serializer=repository__pb2.CreateModelResponse.SerializeToString, ), 'GetModel': grpc.unary_unary_rpc_method_handler( servicer.GetModel, request_deserializer=repository__pb2.GetModelRequest.FromString, response_serializer=repository__pb2.GetModelResponse.SerializeToString, ), 'UpdateModel': grpc.unary_unary_rpc_method_handler( servicer.UpdateModel, request_deserializer=repository__pb2.UpdateModelRequest.FromString, response_serializer=repository__pb2.UpdateModelResponse.SerializeToString, ), 'ListHyperparameters': grpc.unary_unary_rpc_method_handler( servicer.ListHyperparameters, request_deserializer=repository__pb2.ListHyperparametersRequest.FromString, response_serializer=repository__pb2.ListHyperparametersResponse.SerializeToString, ), 'CreateHyperparameters': grpc.unary_unary_rpc_method_handler( servicer.CreateHyperparameters, request_deserializer=repository__pb2.CreateHyperparametersRequest.FromString, response_serializer=repository__pb2.CreateHyperparametersResponse.SerializeToString, ), 'GetHyperparameters': grpc.unary_unary_rpc_method_handler( servicer.GetHyperparameters, request_deserializer=repository__pb2.GetHyperparametersRequest.FromString, response_serializer=repository__pb2.GetHyperparametersResponse.SerializeToString, ), 'UpdateHyperparameters': grpc.unary_unary_rpc_method_handler( servicer.UpdateHyperparameters, request_deserializer=repository__pb2.UpdateHyperparametersRequest.FromString, response_serializer=repository__pb2.UpdateHyperparametersResponse.SerializeToString, ), 'ListCheckpoints': grpc.unary_unary_rpc_method_handler( servicer.ListCheckpoints, request_deserializer=repository__pb2.ListCheckpointsRequest.FromString, response_serializer=repository__pb2.ListCheckpointsResponse.SerializeToString, ), 'CreateCheckpoint': grpc.unary_unary_rpc_method_handler( servicer.CreateCheckpoint, request_deserializer=repository__pb2.CreateCheckpointRequest.FromString, response_serializer=repository__pb2.CreateCheckpointResponse.SerializeToString, ), 'GetCheckpoint': grpc.unary_unary_rpc_method_handler( servicer.GetCheckpoint, request_deserializer=repository__pb2.GetCheckpointRequest.FromString, response_serializer=repository__pb2.GetCheckpointResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'api.Repository', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
44.820717
94
0.761156
1,004
11,250
8.260956
0.099602
0.08464
0.0721
0.066916
0.569568
0.379913
0.379913
0.320352
0.320352
0.320352
0
0.005757
0.166222
11,250
250
95
45
0.878465
0.084889
0
0.322115
1
0
0.114219
0.041516
0
0
0
0
0
1
0.072115
false
0.072115
0.009615
0
0.091346
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
70603dbe2b205199eeb3e19a5f4002f163e954ae
137
py
Python
ec_code/fb_effect/default_vals.py
portugueslab/ec-code
c1704e07f6e1afc747f09865411826096e4bc2fa
[ "MIT" ]
null
null
null
ec_code/fb_effect/default_vals.py
portugueslab/ec-code
c1704e07f6e1afc747f09865411826096e4bc2fa
[ "MIT" ]
null
null
null
ec_code/fb_effect/default_vals.py
portugueslab/ec-code
c1704e07f6e1afc747f09865411826096e4bc2fa
[ "MIT" ]
null
null
null
# Default dt for the imaging DEF_DT = 0.2 # Parameters for cropping around bouts: PRE_INT_BT_S = 2 # before POST_INT_BT_S = 6 # after
19.571429
39
0.729927
26
137
3.576923
0.769231
0.107527
0.129032
0
0
0
0
0
0
0
0
0.036697
0.20438
137
6
40
22.833333
0.816514
0.562044
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
7089c1dc1c94883c5a99c614ae1cc647a03ef6f7
1,796
py
Python
code/old code/cnn.py
ujjwal95/tappe_project
c10ff68d2e6d9418fa4b59cb1c5c178a3ef7f07b
[ "MIT" ]
1
2019-12-02T22:45:12.000Z
2019-12-02T22:45:12.000Z
code/old code/cnn.py
ujjwal95/tappe_project
c10ff68d2e6d9418fa4b59cb1c5c178a3ef7f07b
[ "MIT" ]
null
null
null
code/old code/cnn.py
ujjwal95/tappe_project
c10ff68d2e6d9418fa4b59cb1c5c178a3ef7f07b
[ "MIT" ]
null
null
null
from keras.models import Sequential from keras import optimizers from keras.layers import Dense from keras.layers import Embedding from keras.layers import Input, Flatten from keras.layers import TimeDistributed from keras.layers import Conv1D, MaxPooling1D from sklearn.utils import class_weight from sklearn.model_selection import train_test_split import pandas as pd from numpy import array import numpy from glob import glob seed = 7 numpy.random.seed(seed) # class_weights = {0: 0.1, 1: 50000.} files = glob('/Users/karanjani/Desktop/csvWithVecs/TrainCSV/*.csv') features = ["GS%d" % d for d in range(4096)] + ['wordCount','chartStart','charEnd'] # Create Model model = Sequential() model.add(Conv1D(64, 5, input_shape=(len(features),1), activation='relu')) model.add(MaxPooling1D(pool_size=4)) model.add(Flatten()) model.add(Dense(1, activation='sigmoid')) # Compile model adam = optimizers.Adam(lr=0.001, beta_1=0.9, beta_2=0.999, epsilon=None, decay=0.0, amsgrad=False) #clippingGrads to avoid explodingGrad model.compile(loss='binary_crossentropy', optimizer=adam, metrics=['accuracy']) for file in files: print file df = pd.read_csv(file) df = df.dropna(axis=0, how='any') df = df[df.speakerID == 'doctor'] #only pulls the doctor utterances # split into input (X) and output (Y) variables dfX = df[features] X = array(dfX.values) X = numpy.expand_dims(X, axis=2) Y = array((df['PMH'] == 'yes').astype(int)) #for binary variables # Y = array(pd.get_dummies(df[['supportProvision']])) #for categorical variables # Weight classes to create a balanced dataset class_weights = class_weight.compute_class_weight('balanced',numpy.unique(Y),Y) # Fit the model model.fit(X, Y, epochs=10, batch_size=1,class_weight=class_weights) model.save('PMHCNNv2_hiddenLayers.h5')
32.071429
136
0.751114
274
1,796
4.846715
0.489051
0.04744
0.056476
0.079066
0
0
0
0
0
0
0
0.028427
0.118597
1,796
55
137
32.654545
0.810486
0.184855
0
0
0
0
0.114483
0.051724
0
0
0
0
0
0
null
null
0
0.361111
null
null
0.027778
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
2
560b881b41272f34c5de1c2ab5e4e06ab0e30486
589
py
Python
apps/students/models.py
jin-hao-chen/filegoback
830e77f92776c78bc758bdd8b74b254569050f58
[ "MIT" ]
null
null
null
apps/students/models.py
jin-hao-chen/filegoback
830e77f92776c78bc758bdd8b74b254569050f58
[ "MIT" ]
null
null
null
apps/students/models.py
jin-hao-chen/filegoback
830e77f92776c78bc758bdd8b74b254569050f58
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from apps import db class Student(db.Model): __tablename__ = 'student' id = db.Column(db.Integer, primary_key=True, autoincrement=True) sid = db.Column(db.String(10), nullable=False, unique=True) name = db.Column(db.String(32), nullable=False) is_admin = db.Column(db.Boolean, default=False) def __init__(self, sid, name, is_admin=False): self.sid = sid self.name = name self.is_admin = is_admin def __str__(self): return "<Student '%s'>" % self.sid def __repr__(self): return str(self)
25.608696
68
0.631579
82
589
4.280488
0.45122
0.091168
0.11396
0.091168
0
0
0
0
0
0
0
0.011013
0.229202
589
22
69
26.772727
0.762115
0.035654
0
0
0
0
0.037102
0
0
0
0
0
0
1
0.2
false
0
0.066667
0.133333
0.8
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
2
560e3d3e4a454d1931b6b0fe1116238a67092287
1,365
py
Python
.gdb_extend/gdb_events.py
valley666/debugger-utils
47a3ee2553e34eb7b22d887f4209f694a9299102
[ "MIT" ]
null
null
null
.gdb_extend/gdb_events.py
valley666/debugger-utils
47a3ee2553e34eb7b22d887f4209f694a9299102
[ "MIT" ]
null
null
null
.gdb_extend/gdb_events.py
valley666/debugger-utils
47a3ee2553e34eb7b22d887f4209f694a9299102
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -* import gdb import traceback #gdb events handler def exit_handler (event): if isinstance(event,gdb.Event): if type(event) == gdb.ExitedEvent: print type(event) #正常退出有exit_code字段,非正常退出没有exit_code字段 print ("exit code: %d" % (event.exit_code)) #gdb.events.exited.connect (exit_handler) def stop_handler (event): print ('stop handler called') if isinstance(event,gdb.Event): if type(event) == gdb.StopEvent: print type(event) print ("event __dict__",event.__dict__) elif type(event) == gdb.SignalEvent: print type(event) print ("event __dict__",event.__dict__) elif type(event) == gdb.BreakpointEvent: print type(event) print ("event __dict__", event.__dict__) #gdb.events.stop.connect(stop_handler) def stop_handler1(event): print ('stop handler1 called') gdb.events.stop.disconnect(stop_handler) #connectResult = gdb.events.stop.connect(stop_handler1) #print('connectResult:',type(connectResult)) def new_thread_handler (event): if isinstance(event,gdb.Event): if type(event) == gdb.NewThreadEvent: print type(event) print ("event __dict__",event.__dict__) gdb.events.new_thread.connect(new_thread_handler)
29.042553
55
0.63956
158
1,365
5.227848
0.227848
0.108959
0.072639
0.09201
0.457627
0.410412
0.410412
0.410412
0.410412
0.363196
0
0.00388
0.244689
1,365
46
56
29.673913
0.797284
0.181685
0
0.428571
0
0
0.097385
0
0
0
0
0
0
0
null
null
0
0.071429
null
null
0.428571
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
2
561f66635b30f4f1738d5e656db949817b1e8277
246
py
Python
src/astar/astar_agent.py
RobbinBaauw/CBMxSOC
cf9182e089041080868d0707f1238780dbaf667a
[ "MIT" ]
null
null
null
src/astar/astar_agent.py
RobbinBaauw/CBMxSOC
cf9182e089041080868d0707f1238780dbaf667a
[ "MIT" ]
null
null
null
src/astar/astar_agent.py
RobbinBaauw/CBMxSOC
cf9182e089041080868d0707f1238780dbaf667a
[ "MIT" ]
null
null
null
from src.data.agent import Agent from src.data.vertex import Vertex class AstarAgent(Agent): def __init__(self, id: str, start: Vertex, goal: Vertex) -> None: super().__init__(id) self.start = start self.goal = goal
24.6
69
0.658537
34
246
4.529412
0.5
0.090909
0.142857
0
0
0
0
0
0
0
0
0
0.231707
246
9
70
27.333333
0.814815
0
0
0
0
0
0
0
0
0
0
0
0
1
0.142857
false
0
0.285714
0
0.571429
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
5628545cc4c4215f5a1fa3e1932d23e2ade9ddf3
1,309
py
Python
Products/mcdutils/__init__.py
zms-publishing/Products.mcdutils
c5e88d85302dd09d62bfb6fa9cb0f68af1a995ab
[ "ZPL-2.1" ]
null
null
null
Products/mcdutils/__init__.py
zms-publishing/Products.mcdutils
c5e88d85302dd09d62bfb6fa9cb0f68af1a995ab
[ "ZPL-2.1" ]
5
2019-03-28T21:17:09.000Z
2021-09-03T10:30:16.000Z
Products/mcdutils/__init__.py
zms-publishing/Products.mcdutils
c5e88d85302dd09d62bfb6fa9cb0f68af1a995ab
[ "ZPL-2.1" ]
2
2020-12-31T20:03:23.000Z
2021-09-02T16:03:22.000Z
""" Product: mcdutils Implement Zope sessions using memcached as the backing store. """ class MemCacheError(IOError): pass def initialize(context): from .proxy import MemCacheProxy from .proxy import addMemCacheProxy from .proxy import addMemCacheProxyForm context.registerClass(MemCacheProxy, constructors=(addMemCacheProxyForm, addMemCacheProxy), icon='www/proxy.gif') from .sessiondata import MemCacheSessionDataContainer from .sessiondata import addMemCacheSessionDataContainer from .sessiondata import addMemCacheSessionDataContainerForm context.registerClass(MemCacheSessionDataContainer, constructors=(addMemCacheSessionDataContainerForm, addMemCacheSessionDataContainer), icon='www/sdc.gif') from .zcache import MemCacheZCacheManager from .zcache import addMemCacheZCacheManager from .zcache import addMemCacheZCacheManagerForm context.registerClass(MemCacheZCacheManager, constructors=(addMemCacheZCacheManagerForm, addMemCacheZCacheManager), icon='www/zcm.gif')
36.361111
76
0.642475
84
1,309
10.011905
0.464286
0.032105
0.053508
0
0
0
0
0
0
0
0
0
0.307869
1,309
35
77
37.4
0.928256
0.061879
0
0
0
0
0.028689
0
0
0
0
0
0
1
0.041667
false
0.041667
0.375
0
0.458333
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
2
564c0fb9c0613dd79e992b38eafe741d0ba1f66f
203
py
Python
deploy.py
dylanbhughes/reddit-daily
27da5a89211af7d255761b70f558b407f8ae1325
[ "MIT" ]
2
2019-04-18T23:38:01.000Z
2019-04-19T07:23:34.000Z
deploy.py
dylanbhughes/reddit-daily
27da5a89211af7d255761b70f558b407f8ae1325
[ "MIT" ]
null
null
null
deploy.py
dylanbhughes/reddit-daily
27da5a89211af7d255761b70f558b407f8ae1325
[ "MIT" ]
null
null
null
from prefect import Client from prefect.schedules import CronSchedule from reddit_daily import flow c = Client() s = CronSchedule("0 * * * *") flow.schedule = s flow.deploy(project="Dylan's Project")
18.454545
42
0.743842
28
203
5.357143
0.571429
0.146667
0
0
0
0
0
0
0
0
0
0.00578
0.147783
203
10
43
20.3
0.861272
0
0
0
0
0
0.118227
0
0
0
0
0
0
1
0
false
0
0.428571
0
0.428571
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
2
5650b2d478515dcbbdf4dd7d75fa77eaeb9bf44a
2,089
py
Python
test/tests/descriptors_callattr_cls_ics.py
kevinxucs/pyston
bdb87c1706ac74a0d15d9bc2bae53798678a5f14
[ "Apache-2.0" ]
1
2020-02-06T14:28:45.000Z
2020-02-06T14:28:45.000Z
test/tests/descriptors_callattr_cls_ics.py
kevinxucs/pyston
bdb87c1706ac74a0d15d9bc2bae53798678a5f14
[ "Apache-2.0" ]
null
null
null
test/tests/descriptors_callattr_cls_ics.py
kevinxucs/pyston
bdb87c1706ac74a0d15d9bc2bae53798678a5f14
[ "Apache-2.0" ]
1
2020-02-06T14:29:00.000Z
2020-02-06T14:29:00.000Z
# expected: statfail # run_args: -n # statcheck: stats['slowpath_callattr'] <= 100 # Right now this won't work because callattr involves two calls # one call to __get__ and then another call to the returned function. # Of course, if the callattr were split up into getattr and a call, # each could be re-written separately... # Not sure if this is a case worth handling or what is the best way # to handle it, but I'm throwing the test in here anyway to remind us. # Note: difference between DataDescriptor and NonDataDescriptor shouldn't matter # __enter__ is looked up via callattr with class_only set to true class DataDescriptor(object): def __get__(self, obj, typ): print '__get__ called' print type(self) print type(obj) print typ def enter(): print 'enter called (1)' return enter def __set__(self, obj, value): pass class NonDataDescriptor(object): def __get__(self, obj, typ): print '__get__ called' print type(self) print type(obj) print typ def enter(): print 'enter called (2)' return enter class C1(object): __enter__ = DataDescriptor() def __exit__(self, typ, value, traceback): pass class C2(object): __enter__ = NonDataDescriptor() def __exit__(self, typ, value, traceback): pass class C3(object): __enter__ = NonDataDescriptor() def __exit__(self, typ, value, traceback): pass class C4(object): def __exit__(self, typ, value, traceback): pass c1 = C1() c2 = C2() c3 = C3() c4 = C4() def enter3(type): print 'enter called (3)' c3.__enter__ = enter3 # this should not get called def enter4(type): print 'enter called (4)' c4.__enter__ = enter4 # this should not get called C4.__enter__ = DataDescriptor() def f(): with c1: print 'in with statement (1)' with c2: print 'in with statement (2)' with c3: print 'in with statement (3)' with c4: print 'in with statement (4)' for i in xrange(1000): f()
24.576471
80
0.642891
286
2,089
4.447552
0.388112
0.028302
0.050314
0.044025
0.337264
0.302673
0.302673
0.277516
0.248428
0.248428
0
0.024788
0.266156
2,089
84
81
24.869048
0.804958
0.308281
0
0.438596
0
0
0.122991
0
0
0
0
0
0
0
null
null
0.087719
0
null
null
0.280702
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
1
0
0
0
0
0
2
56535d202c5248fa8ad212ec87b660b206ab1a79
1,061
py
Python
accounts/models.py
sd2001/SR2.0
6586f172ef71fbf0aaad55706159f9cb03b305fc
[ "MIT" ]
null
null
null
accounts/models.py
sd2001/SR2.0
6586f172ef71fbf0aaad55706159f9cb03b305fc
[ "MIT" ]
null
null
null
accounts/models.py
sd2001/SR2.0
6586f172ef71fbf0aaad55706159f9cb03b305fc
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. class Customer(models.Model): name = models.CharField(max_length=200, null=True) phone = models.CharField(max_length=200, null=True) email = models.CharField(max_length=200, null=True) date_created = models.DateTimeField(auto_now_add=True, null=True) def __str__(self): return self.name class Product(models.Model): CATEGORY = ( ('Indoor', 'Indoor'), ('Out Door', 'Out Door'), ) name = models.CharField(max_length=200, null=True) price = models.FloatField(null=True) category = models.CharField(max_length=200, null=True, choices=CATEGORY) description = models.CharField(max_length=200, null=True) date_created = models.DateTimeField(auto_now_add=True, null=True) class Order(models.Model): STATUS = ( ('Pending', 'Pending'), ('Out for delivery', 'Out for delivery'), ('Delivered', 'Delivered'), ) #customer = #product = date_created = models.DateTimeField(auto_now_add=True, null=True) status = models.CharField(max_length=200, null=True, choices=STATUS)
28.675676
73
0.727615
142
1,061
5.295775
0.316901
0.117021
0.167553
0.223404
0.5625
0.5625
0.5625
0.515957
0.300532
0.300532
0
0.022826
0.132894
1,061
37
74
28.675676
0.794565
0.04147
0
0.192308
0
0
0.090819
0
0
0
0
0
0
1
0.038462
false
0
0.038462
0.038462
0.730769
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
565da181b049c755becd73e4cfe329f9e7dde440
4,935
py
Python
alis.py
libalis/alis
615c2fc3f7502767016fb6e089d2880f832a3614
[ "MIT" ]
1
2022-03-09T15:25:33.000Z
2022-03-09T15:25:33.000Z
alis.py
libalis/alis
615c2fc3f7502767016fb6e089d2880f832a3614
[ "MIT" ]
null
null
null
alis.py
libalis/alis
615c2fc3f7502767016fb6e089d2880f832a3614
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from subprocess import * def cmd(tmp): run(tmp, shell=True) key = input('Enter your keyboard layout (e.g., "de-latin1"): ') if key == '': while key == '': key = input('Enter your keyboard layout (e.g., "de-latin1"): ') else: pass cmd('loadkeys ' + key) dis = input('Enter your disk path (e.g., "/dev/sda"): ') if dis == '': while dis == '': dis = input('Enter your disk path (e.g., "/dev/sda"): ') else: pass cmd('cfdisk ' + dis) roo = input('Enter your / partition path (e.g., "/dev/sda1"): ') if roo == '': while roo == '': roo = input('Enter your / partition path (e.g., "/dev/sda1"): ') else: pass hom = input('Enter your /home partition path (e.g., "/dev/sda2"): ') boo = input('Enter your /boot partition path (e.g., "/dev/sda3"): ') swa = input('Enter you swap partition path (e.g., "/dev/sda4"): ') set = input('Do you want to setup WIFI? [Y/n] ') if set == '' or set == 'Y' or set == 'y': cmd('wifi-menu') else: pass sor = input('Do you want to sort the mirrors? [Y/n] ') hos = input('Enter your host name: ') if hos == '': while hos == '': hos = input('Enter your host name: ') else: pass loc = input('Enter your locale (e.g., "de_DE"): ') if loc == '': while loc == '': loc = input('Enter your locale (e.g., "de_DE"): ') else: pass tim = input('Enter you time zone (e.g., "Europe/Berlin"): ') if tim == '': while tim == '': tim = input('Enter you time zone (e.g., "Europe/Berlin"): ') else: pass rea = input('Enter your real name: ') if rea == '': while rea == '': rea = input('Enter your real name: ') else: pass use = input('Enter your user name (ONLY ONE WORD AND LOWERCASE LETTERS): ') if use == '': while use == '': use = input('Enter your user name (ONLY ONE WORD AND LOWERCASE LETTERS): ') else: pass pas = input('Enter your password (INCLUDE LOWERCASE LETTERS, UPPERCASE LETTERS AND NUMBERS): ') if pas == '': while pas == '': pas = input('Enter your password (INCLUDE LOWERCASE LETTERS, UPPERCASE LETTERS AND NUMBERS): ') else: pass fir = input('Enter your firmware type (UEFI or BIOS): ') while fir != 'UEFI' and fir != 'uefi' and fir != 'BIOS' and fir != 'bios': fir = input('Enter your firmware type (UEFI or BIOS): ') ins = input('Do you really want to start the installation? [y,N] ') if ins != 'Y'and ins != 'y': exit() else: pass cmd('mkfs.ext4 -L root ' + roo) cmd('mount -L root /mnt') if hom != '': cmd('mkfs.ext4 -L home ' + hom) cmd('mkdir /mnt/home') cmd('mount -L home /mnt/home') else: pass if boo != '': cmd('mkfs.fat -F 32 -n boot ' + boo) cmd('mkdir /mnt/boot') cmd('mount -L boot /mnt/boot') else: pass if swa != '': cmd('mkswap -L swap ' + swa) cmd('swapon -L swap') else: pass if sor == '' or sor == 'Y' or sor == 'y': cmd('cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak') cmd('echo "Sorting mirrors... (this could take a while)"') cmd('rankmirrors -n 6 /etc/pacman.d/mirrorlist.bak > /etc/pacman.d/mirrorlist') cmd('rm /etc/pacman.d/mirrorlist.bak') else: pass cmd('pacstrap /mnt base base-devel dialog wpa_supplicant linux-headers virtualbox-guest-utils intel-ucode amd-ucode bash-completion grub os-prober efibootmgr dosfstools gptfdisk acpid cronie avahi cups networkmanager xorg-server xorg-xinit xorg-drivers ttf-dejavu noto-fonts-emoji gnome') cmd('genfstab -Lp /mnt > /mnt/etc/fstab') cmd('arch-chroot /mnt echo ' + hos + ' > /etc/hostname') cmd('arch-chroot /mnt echo KEYMAP=' + key + ' > /etc/vconsole.conf') cmd('arch-chroot /mnt echo LANG=' + loc + '.UTF-8 > /etc/locale.conf') cmd('arch-chroot /mnt sed -i "s/^#' + loc + '/' + loc + '/" /etc/locale.gen') cmd('arch-chroot /mnt locale-gen') cmd('arch-chroot /mnt ln -sf /usr/share/zoneinfo/' + tim + ' /etc/localtime') cmd('arch-chroot /mnt sed -i "s/^ #%wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/" /etc/sudoers') cmd('arch-chroot /mnt useradd -m -g users -G wheel,audio,video,games,power -s /bin/bash -p ' + pas + ' -c "' + rea + '" ' + use) cmd('arch-chroot /mnt yes ' + pas + ' | passwd ' + use) cmd('arch-chroot /mnt passwd -d root') cmd('arch-chroot /mnt systemctl enable acpid') cmd('arch-chroot /mnt systemctl enable cronie') cmd('arch-chroot /mnt systemctl enable avahi-daemon') cmd('arch-chroot /mnt systemctl enable org.cups.cupsd') cmd('arch-chroot /mnt systemctl enable systemd-timesyncd') cmd('arch-chroot /mnt systemctl enable NetworkManager') cmd('arch-chroot /mnt systemctl enable bluetooth') cmd('arch-chroot /mnt systemctl enable gdm') if fir == 'UEFI' or fir == 'uefi': cmd('arch-chroot /mnt grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=ALIS') elif fir == 'BIOS' or fir == 'bios': cmd('arch-chroot /mnt grub-install ' + dis) else: pass cmd('arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg') cmd('reboot')
37.386364
288
0.619453
752
4,935
4.05984
0.289894
0.075336
0.08942
0.110056
0.481821
0.389781
0.241729
0.227972
0.227972
0.183426
0
0.004529
0.194732
4,935
131
289
37.671756
0.763714
0.004255
0
0.4
0
0.038462
0.607572
0.041522
0
0
0
0
0
1
0.007692
false
0.153846
0.007692
0
0.015385
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
566473ecf93afdd05508a395665216012e9ff1bb
101
py
Python
config.py
h01000110/gerenciador-oficina-web
f86fe4ae988ac8b94aac4165efe77a29d862a1cd
[ "MIT" ]
null
null
null
config.py
h01000110/gerenciador-oficina-web
f86fe4ae988ac8b94aac4165efe77a29d862a1cd
[ "MIT" ]
null
null
null
config.py
h01000110/gerenciador-oficina-web
f86fe4ae988ac8b94aac4165efe77a29d862a1cd
[ "MIT" ]
null
null
null
DEBUG = True SQLALCHEMY_DATABASE_URI = 'sqlite:///data.sqlite' SQLALCHEMY_TRACK_MODIFICATIONS = True
25.25
49
0.811881
12
101
6.5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.089109
101
3
50
33.666667
0.847826
0
0
0
0
0
0.207921
0.207921
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
5667f72dfc69b9aa47d14189ef196acc3e008400
396
py
Python
functions_advanced/exercise/02_odd_or_even.py
Galchov/python-advanced
1961205415a634948f4a50cf6e60b630ee645ad5
[ "MIT" ]
null
null
null
functions_advanced/exercise/02_odd_or_even.py
Galchov/python-advanced
1961205415a634948f4a50cf6e60b630ee645ad5
[ "MIT" ]
null
null
null
functions_advanced/exercise/02_odd_or_even.py
Galchov/python-advanced
1961205415a634948f4a50cf6e60b630ee645ad5
[ "MIT" ]
null
null
null
command = input() numbers_sequence = [int(x) for x in input().split()] odd_numbers = [] even_numbers = [] for number in numbers_sequence: if number % 2 == 0: even_numbers.append(number) else: odd_numbers.append(number) if command == 'Odd': print(sum(odd_numbers) * len(numbers_sequence)) elif command == 'Even': print(sum(even_numbers) * len(numbers_sequence))
23.294118
52
0.664141
53
396
4.773585
0.396226
0.237154
0.150198
0.197628
0
0
0
0
0
0
0
0.006289
0.19697
396
16
53
24.75
0.789308
0
0
0
0
0
0.017677
0
0
0
0
0
0
1
0
false
0
0
0
0
0.153846
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
5670050699655980aac13389bf361e57f70beee5
632
py
Python
commands/manual/mecanum_drive_with_joystick.py
DenfeldRobotics4009/2016_Dos_Point_Oh
efb6a189796e0488e2afcafd1c6cce6beb372ce3
[ "BSD-3-Clause" ]
null
null
null
commands/manual/mecanum_drive_with_joystick.py
DenfeldRobotics4009/2016_Dos_Point_Oh
efb6a189796e0488e2afcafd1c6cce6beb372ce3
[ "BSD-3-Clause" ]
null
null
null
commands/manual/mecanum_drive_with_joystick.py
DenfeldRobotics4009/2016_Dos_Point_Oh
efb6a189796e0488e2afcafd1c6cce6beb372ce3
[ "BSD-3-Clause" ]
null
null
null
__author__ = 'nikolojedison' from wpilib.command import Command class MecanumDriveWithJoystick(Command): ''' Have the robot drive mecanum style using the joystick until interrupted. ''' def __init__(self, robot): super().__init__() self.robot = robot self.requires(self.robot.drivetrain) def execute(self): self.robot.drivetrain.driveJoystick(self.robot.oi.getStick()) def isFinished(self): return False # Runs until interrupted def end(self): self.robot.drivetrain.driveManual(0,0,0) pass def interrupted(self): self.end()
22.571429
80
0.653481
70
632
5.728571
0.514286
0.134663
0.142145
0.114713
0
0
0
0
0
0
0
0.006303
0.246835
632
27
81
23.407407
0.836134
0.151899
0
0
0
0
0.025194
0
0
0
0
0
0
1
0.3125
false
0.0625
0.0625
0.0625
0.5
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
2
56777bd7045a70ceb2264596518586d81ffd0fab
3,318
py
Python
app/models.py
IanMK-1/my-blog
9f53f52d97fef12cebb7265f3bca5e0039a5a6e8
[ "MIT" ]
null
null
null
app/models.py
IanMK-1/my-blog
9f53f52d97fef12cebb7265f3bca5e0039a5a6e8
[ "MIT" ]
null
null
null
app/models.py
IanMK-1/my-blog
9f53f52d97fef12cebb7265f3bca5e0039a5a6e8
[ "MIT" ]
null
null
null
from . import db from werkzeug.security import generate_password_hash, check_password_hash from datetime import datetime from flask_login import UserMixin from . import login_manager class Writer(db.Model, UserMixin): __tablename__ = 'writers' id = db.Column(db.Integer, primary_key=True) full_name = db.Column(db.String(255), index=True) email = db.Column(db.String(255), unique=True, index=True) bio = db.Column(db.String(255)) profile_pic_path = db.Column(db.String()) writer_password = db.Column(db.String(255)) comment = db.relationship('Comment', backref='comment_id', lazy='dynamic') blog = db.relationship('Blog', backref='blog_id', lazy='dynamic') # return a printable representation of the object def __repr__(self): return f'Writer{self.full_name}' @property def password(self): raise AttributeError('You cannot read the password attribute') @password.setter def password(self, password): self.writer_password = generate_password_hash(password) def verify_password(self, password): return check_password_hash(self.writer_password, password) @login_manager.user_loader def load_user(writer_id): return Writer.query.get(int(writer_id)) class User(db.Model): __tablename__ = 'users' id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(255), index=True) email = db.Column(db.String(255), unique=True, index=True) def save_user_details(self): db.session.add(self) db.session.commit() class Blog(db.Model): __tablename__ = 'blogs' id = db.Column(db.Integer, primary_key=True) title = db.Column(db.String(255)) blog_post = db.Column(db.String()) posted_at = db.Column(db.DateTime, default=datetime.utcnow) writer_blog = db.Column(db.Integer, db.ForeignKey('writers.id')) blog_comment = db.relationship('Comment', backref='blog_comment_id', lazy='dynamic') def save_blog(self): db.session.add(self) db.session.commit() def delete_blog(self): db.session.delete(self) db.session.commit() @classmethod def update_blog(cls, id, blog_details, title_details): writer_blog = Blog.query.filter_by(id=id).update({"blog_post": blog_details, "title": title_details}) db.session.add(writer_blog) db.session.commit() @classmethod def obtain_all_blogs(cls): all_blogs = Blog.query.all() return all_blogs @classmethod def obtain_writer_blog(cls, id): writer_blog = Blog.query.filter_by(id=id).first() return writer_blog class Comment(db.Model): __tablename__ = 'comments' id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(255)) comment = db.Column(db.String()) writer_id = db.Column(db.Integer, db.ForeignKey('writers.id')) blog_id = db.Column(db.Integer, db.ForeignKey('blogs.id')) def save_comment(self): db.session.add(self) db.session.commit() def delete_comment(self): db.session.delete(self) db.session.commit() @classmethod def obtain_all_comments(cls, writer_blog): user_comments = Comment.query.filter_by(blog_comment_id=writer_blog).all() return user_comments
30.722222
109
0.685051
447
3,318
4.883669
0.208054
0.069629
0.087036
0.080623
0.4306
0.36601
0.36601
0.312414
0.237746
0.199267
0
0.008955
0.192285
3,318
107
110
31.009346
0.805597
0.014165
0
0.2625
1
0
0.060569
0.00673
0
0
0
0
0
1
0.175
false
0.1125
0.0625
0.0375
0.6875
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
567cadcc4e87dd3ab5f7c52dd6557099adf1499b
709
py
Python
tests/state/test_op_state_model.py
ska-telescope/lmc-base-classes
e3ac46a731aca4d49d53747b4352ec4be089ff5d
[ "BSD-3-Clause" ]
3
2019-04-18T20:46:02.000Z
2019-07-30T17:47:40.000Z
tests/state/test_op_state_model.py
ska-telescope/lmc-base-classes
e3ac46a731aca4d49d53747b4352ec4be089ff5d
[ "BSD-3-Clause" ]
26
2018-10-30T07:50:50.000Z
2020-07-13T12:50:36.000Z
tests/state/test_op_state_model.py
ska-telescope/lmc-base-classes
e3ac46a731aca4d49d53747b4352ec4be089ff5d
[ "BSD-3-Clause" ]
4
2019-01-16T07:47:59.000Z
2021-06-01T11:17:32.000Z
""" This module contains the tests for the :py:mod:`ska_tango_base.base.device_state_model` module. """ import pytest from ska_tango_base.base.op_state_model import _OpStateMachine from .conftest import load_state_machine_spec, TransitionsStateMachineTester @pytest.mark.state_machine_tester(load_state_machine_spec("op_state_machine")) class TestOpStateMachine(TransitionsStateMachineTester): """ This class contains the test for the _OpStateMachine class. """ @pytest.fixture def machine_under_test(self): """ Fixture that returns the state machine under test in this class :returns: the state machine under test """ yield _OpStateMachine()
27.269231
78
0.748942
87
709
5.83908
0.425287
0.141732
0.094488
0.062992
0.122047
0.122047
0
0
0
0
0
0
0.177715
709
25
79
28.36
0.871355
0.365303
0
0
0
0
0.040404
0
0
0
0
0
0
1
0.125
false
0
0.375
0
0.625
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
568691e683d1c0cc0063b0dcc30d1448a0dfb84e
5,831
py
Python
python/passwordbox.py
FreeCX/bunch-of-code
f1dc7d865f1a36994b1555ef5042d167975101a5
[ "BSD-3-Clause" ]
1
2020-11-09T10:02:56.000Z
2020-11-09T10:02:56.000Z
python/passwordbox.py
FreeCX/bunch-of-code
f1dc7d865f1a36994b1555ef5042d167975101a5
[ "BSD-3-Clause" ]
null
null
null
python/passwordbox.py
FreeCX/bunch-of-code
f1dc7d865f1a36994b1555ef5042d167975101a5
[ "BSD-3-Clause" ]
null
null
null
#!/bin/env python from pathlib import Path import argparse import secrets import random import string def generate(args): """Функция генерации данных для 'коробки'. Входные параметры: args.alphabet -- используемый алфавит args.length -- длина файла в символах args.box -- выходной файл """ with args.box.open('w') as f: box = [secrets.choice(args.alphabet) for _ in range(args.length)] f.write(''.join(box)) print(f'> Box `{args.box.name}` created') def read(args): """Функция чтения пароля из 'коробки'. Входные параметры: args.box -- входной файл args.seed -- зерно для функции random.seed args.length -- длина пароля """ alphabet = args.box.open().read() random.seed(args.seed) print(''.join(random.choices(alphabet, k=args.length))) def insert(args): """Функия добавления пароля в 'коробку'. Входные параметры: args.box -- входной файл args.seed -- зерно для функции random.seed args.password -- пароль для записи args.reseed -- автоматическая генерация нового seed args.max_seed -- максимальное число для генерации seed """ def rewrite_box(file, box, key, positions): for key, index in zip(key, positions): box[index] = key with file.open('w') as f: f.write(''.join(box)) print(f'> Box `{args.box.name}` updated') def pos(seed, box_size, key_size): random.seed(seed) box_iter = range(box_size) key_iter = range(key_size) return [random.choices(box_iter)[0] for _ in key_iter] def unique(data): return len(data) == len(set(data)) box = list(args.box.open().read()) if len(box) == 0: print('> Box is empty') return positions = pos(args.seed, len(box), len(args.password)) if unique(positions): rewrite_box(args.box, box, args.password, positions) elif args.reseed: nseed_counter = 0 while not unique(positions): new_seed = secrets.randbelow(args.max_seed) positions = pos(new_seed, len(box), len(args.password)) nseed_counter += 1 if nseed_counter > args.max_seed: print('> The number of attempts to generate new seed has been exceeded, please select a higher value max_seed') return print('> New seed: {new_seed}') rewrite_box(args.box, box, args.password, positions) else: print('> An intersection has occurred, please choose new seed value or use -r') def analyze(args): """Функция построения графика энтропии файла. Входные параметры: args.box -- входной файл для анализа args.save -- выходное файл для сохранения графика """ from collections import Counter import matplotlib.pyplot as plt data = args.box.open().read() box = dict(Counter(data)) xs = list(range(256)) total = len(data) ys = [box.get(chr(i), 0) / total for i in xs] plt.bar(xs, ys) plt.title('File entropy') plt.xlabel('Alphabet, [0, 255]') plt.ylabel('Percent count, %') plt.grid(alpha=0.5) if args.save: plt.savefig(args.save, bbox_inches='tight', pad_inches=0.1, dpi=300) print(f'> Plot `{args.save}` saved') else: plt.show() if __name__ == '__main__': alphabet = string.ascii_letters + string.digits + string.punctuation parser = argparse.ArgumentParser(description='get your password from the box') subparser = parser.add_subparsers() p_read = subparser.add_parser('read', help='read password from the box', aliases=['r']) p_read.add_argument('-b', dest='box', type=Path, required=True, help='input box file') p_read.add_argument('-s', dest='seed', metavar='seed', type=int, required=True, help='initial seed value') p_read.add_argument('-l', dest='length', metavar='length', type=int, default=16, help='password length') p_read.set_defaults(func=read) p_create = subparser.add_parser('generate', help='generate password box', aliases=['g', 'gen']) p_create.add_argument('-b', dest='box', metavar='box', type=Path, required=True, help='input box file') p_create.add_argument('-l', dest='length', metavar='length', type=int, required=True, help='box length') p_create.add_argument('-a', dest='alphabet', metavar='alphabet', type=str, default=alphabet, help='using alphabet') p_create.set_defaults(func=generate) p_insert = subparser.add_parser('insert', help='insert password to the box', aliases=['i', 'in']) p_insert.add_argument('-b', dest='box', metavar='box', type=Path, required=True, help='input box file') p_insert.add_argument('-s', dest='seed', metavar='seed', type=int, required=True, help='seed value') p_insert.add_argument('-p', dest='password', metavar='password', type=str, required=True, help='password to insert') p_insert.add_argument('-r', dest='reseed', metavar='reseed', type=bool, default=False, help='autogenerate new seed') p_insert.add_argument('-m', dest='max_seed', metavar='max_seed', type=int, default=1024, help='max seed value in reseed') p_insert.set_defaults(func=insert) p_analyze = subparser.add_parser('analyze', help='analyze file entropy', aliases=['a']) p_analyze.add_argument('-b', dest='box', metavar='box', type=Path, required=True, help='input box file') p_analyze.add_argument('-s', dest='save', metavar='save', type=Path, default=None, help='output plot file') p_analyze.set_defaults(func=analyze) args = parser.parse_args() if hasattr(args, 'func'): try: args.func(args) except FileNotFoundError: print(f'> File `{args.box}` not found') else: parser.print_help()
38.111111
127
0.642257
792
5,831
4.626263
0.263889
0.024836
0.034935
0.024563
0.228166
0.219432
0.196507
0.196507
0.174127
0.151201
0
0.005461
0.214886
5,831
153
128
38.111111
0.794889
0.135826
0
0.09
1
0
0.18333
0
0
0
0
0
0
1
0.07
false
0.1
0.07
0.01
0.18
0.1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
568ed26e9ab8d154e9107a949de157efd58b579f
7,296
py
Python
tests/test_feature_typecheck.py
smurfix/distkv
190b4c8f6cbe038b85bac4317a7fb13a9e742516
[ "Apache-2.0", "MIT" ]
10
2019-03-19T16:04:21.000Z
2020-06-04T20:11:10.000Z
tests/test_feature_typecheck.py
M-o-a-T/distkv
94f440e1480ecec04af63abdb66ec8f23859f871
[ "Apache-2.0", "MIT" ]
1
2020-02-05T18:32:52.000Z
2020-02-05T22:15:36.000Z
tests/test_feature_typecheck.py
smurfix/distkv
190b4c8f6cbe038b85bac4317a7fb13a9e742516
[ "Apache-2.0", "MIT" ]
1
2020-08-03T03:10:58.000Z
2020-08-03T03:10:58.000Z
import pytest import io from functools import partial from distkv.mock import run from distkv.mock.mqtt import stdtest from distkv.client import ServerError from distkv.util import PathLongener, P import logging logger = logging.getLogger(__name__) async def collect(i, path=()): res = [] pl = PathLongener(path) async for r in i: r.pop("tock", 0) r.pop("seq", 0) pl(r) res.append(r) return res @pytest.mark.trio async def test_71_basic(autojump_clock): # pylint: disable=unused-argument async with stdtest(args={"init": 123}, tocks=80) as st: async with st.client() as c: with pytest.raises(ServerError): await c._request( "set_internal", path=P("type.int"), value={ "bad": ["foo", None], "good": [0, 1, 2], "code": "if not isinstance(value,int): rise ValueError('not an int')", # yes this checks for the typo (SyntaxError= }, ) with pytest.raises(ServerError): await c._request( "set_internal", path=P("type.int"), value={ "bad": ["foo", None], "good": [0, 1, "dud"], "code": "if not isinstance(value,int): raise ValueError('not an int')", }, ) with pytest.raises(ServerError): await c._request( "set_internal", path=P("type.int"), value={ "bad": ["foo", 4], "good": [0, 1, 2], "code": "if not isinstance(value,int): raise ValueError('not an int')", }, ) with pytest.raises(ServerError): await c._request( "set_internal", path=P("type.int"), value={ "bad": [], "good": [0, 1, 2], "code": "if not isinstance(value,int): raise ValueError('not an int')", }, ) with pytest.raises(ServerError): await c._request( "set_internal", path=P("type.int"), value={ "bad": ["foo", None], "good": [1], "code": "if not isinstance(value,int): raise ValueError('not an int')", }, ) await c._request( "set_internal", path=P("type.int"), value={ "bad": ["foo", None], "good": [0, 1, 2], "code": "if not isinstance(value,int): raise ValueError('not an int')", }, ) with pytest.raises(ServerError): await c._request( "set_internal", path=P("type.int.percent"), value={ "bad": ["fuf", 101], "good": [0, 55, 100], "code": "if not 0<=value<=100: raise ValueError('not a percentage')", }, ) with pytest.raises(ServerError): await c._request( "set_internal", path=P("type.int.percent"), value={ "bad": ["fuf", 101], "good": [0, 5.5, 100], "code": "if not 0<=value<=100: raise ValueError('not a percentage')", }, ) await c._request( "set_internal", path=P("type.int.percent"), value={ "bad": [-1, 101], "good": [0, 55, 100], "code": "if not 0<=value<=100: raise ValueError('not a percentage')", }, ) with pytest.raises(ServerError): await c._request( "set_internal", path=P("match.one.+.two"), value={"tope": P("int.percent")} ) await c._request( "set_internal", path=P("match.one.+.two"), value={"type": P("int.percent")} ) await c.set(P("one.x.two"), value=99) with pytest.raises(ServerError): await c.set(P("one.y.two"), value=9.9) with pytest.raises(ServerError): await c.set(P("one.y.two"), value="zoz") await c.set(P("one.y"), value="zoz") pass # client end pass # server end @pytest.mark.trio async def test_72_cmd(autojump_clock, tmpdir): # pylint: disable=unused-argument async with stdtest(args={"init": 123}, tocks=80) as st: (s,) = st.s async with st.client() as c: h = p = None # pylint for h, p, *_ in s.ports: if h[0] != ":": break rr = partial(run, "client", "-h", h, "-p", p, do_stdout=False) path = tmpdir.join("foo") with io.open(path, "w") as f: f.write( """\ good: - 0 - 2 bad: - none - "Foo" code: "if not isinstance(value,int): raise ValueError('not an int')" """ ) await rr("type", "set", "-d", str(path), "int") with io.open(path, "w") as f: f.write("if not 0<=value<=100: raise ValueError('not a percentage')\n") with pytest.raises(ServerError): await rr( "type", "set", "-s", str(path), "-g", "0", "-g", "100", "-g", "50", "-b", "-1", "-b", "5.5", "int.percent", ) await rr( "type", "set", "-s", str(path), "-g", "0", "-g", "100", "-g", "50", "-b", "-1", "-b", "555", "int.percent", ) await rr("type", "match", "-t", "int.percent", "foo.+.bar") with pytest.raises(ServerError): await rr("data", "foo.dud.bar", "set", "-v", ":", "123") with pytest.raises(ServerError): await rr("data", "foo.dud.bar", "set", "-e", ":", "123") with pytest.raises(ServerError): await rr("data", "foo.dud.bar", "set", "-e", ":", "5.5") await rr("data", "foo.dud.bar", "set", "-e", ":", "55") assert (await c.get(P("foo.dud.bar"))).value == 55 pass # client end pass # server end
33.62212
95
0.382401
700
7,296
3.937143
0.194286
0.034833
0.081277
0.137155
0.772134
0.748186
0.68106
0.68106
0.672351
0.654935
0
0.02968
0.473547
7,296
216
96
33.777778
0.687842
0.021519
0
0.606383
0
0
0.185781
0.018806
0
0
0
0
0.005319
1
0
false
0.021277
0.042553
0
0.047872
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
56945b647c0211c5ba26d8d1a150a8f1b3e72dde
342
py
Python
phylobook/admin.py
MullinsLab/phylobook
2844295748586bfef4a4b4416018d5792ed9786d
[ "MIT" ]
null
null
null
phylobook/admin.py
MullinsLab/phylobook
2844295748586bfef4a4b4416018d5792ed9786d
[ "MIT" ]
null
null
null
phylobook/admin.py
MullinsLab/phylobook
2844295748586bfef4a4b4416018d5792ed9786d
[ "MIT" ]
null
null
null
from django.contrib import admin from phylobook.projects.models import Project from guardian.admin import GuardedModelAdmin class ProjectAdmin(GuardedModelAdmin): #prepopulated_fields = {"slug": ("title",)} list_display = ('name',) search_fields = ('name',) ordering = ('name',) admin.site.register(Project, ProjectAdmin)
24.428571
47
0.733918
36
342
6.888889
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.143275
342
14
48
24.428571
0.846416
0.122807
0
0
0
0
0.04
0
0
0
0
0
0
1
0
false
0
0.375
0
0.875
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
3b33aea13362bd67bad83eaa4e2c249a93dc5a8a
2,758
py
Python
ooobuild/lo/ui/xui_element.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/ui/xui_element.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/ui/xui_element.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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. # # Interface Class # this is a auto generated file generated by Cheetah # Libre Office Version: 7.3 # Namespace: com.sun.star.ui import typing from abc import abstractmethod, abstractproperty from ..uno.x_interface import XInterface as XInterface_8f010a43 if typing.TYPE_CHECKING: from ..frame.x_frame import XFrame as XFrame_7a570956 class XUIElement(XInterface_8f010a43): """ provides a function to retrieve a special purpose interface dependent on the user interface element type. The type of the interface depends on the real type of the user interface element. A menubar user interface element provides access to its com.sun.star.awt.XSystemDependentMenuBarPeer which supports to retrieve the system dependent menu handle. A floating window or a toolbar user interface element return a com.sun.star.awt.XWindow interface. See Also: `API XUIElement <https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1ui_1_1XUIElement.html>`_ """ __ooo_ns__: str = 'com.sun.star.ui' __ooo_full_ns__: str = 'com.sun.star.ui.XUIElement' __ooo_type_name__: str = 'interface' __pyunointerface__: str = 'com.sun.star.ui.XUIElement' @abstractmethod def getRealInterface(self) -> 'XInterface_8f010a43': """ returns an interface to get access to user interface type specific functions. """ @abstractproperty def Frame(self) -> 'XFrame_7a570956': """ determines the document frame to which this element is bound to. The life time of a user interface element does not explicitly depend on the frame itself but on the visible component attached to the frame. It is possible to exchange the visible component of a frame and that will lead to the end of life of all user interface elements. """ @abstractproperty def ResourceURL(self) -> str: """ a resource URL which is a unique identifier of a user interface element. """ @abstractproperty def Type(self) -> int: """ determines the type of the user interface element. """ __all__ = ['XUIElement']
39.971014
346
0.725526
387
2,758
5.062016
0.459948
0.059724
0.071465
0.024502
0.08831
0.064829
0
0
0
0
0
0.023277
0.205584
2,758
68
347
40.558824
0.870835
0.658086
0
0.157895
0
0
0.153257
0.066411
0
0
0
0
0
1
0.210526
false
0
0.210526
0
0.684211
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
3b34406a8f716f25d8ef046bec49c10a26840a6b
57
py
Python
app/viewers/__init__.py
Zo0x/hedhes
7cb933f49079f6b75f7a84ba275fff9721ca06d3
[ "MIT" ]
3
2017-08-29T13:06:50.000Z
2017-09-22T18:40:17.000Z
app/viewers/__init__.py
Zo0x/hedhes
7cb933f49079f6b75f7a84ba275fff9721ca06d3
[ "MIT" ]
1
2017-08-29T13:25:59.000Z
2017-08-29T13:46:57.000Z
app/viewers/__init__.py
Zo0x/hedhes
7cb933f49079f6b75f7a84ba275fff9721ca06d3
[ "MIT" ]
null
null
null
__all__ = ['general', 'utils', 'movies', 'tv', 'library']
57
57
0.596491
6
57
5
1
0
0
0
0
0
0
0
0
0
0
0
0.105263
57
1
57
57
0.588235
0
0
0
0
0
0.465517
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
3b3ec94b34559ed9236bdfd0533eb9fa0f59f99f
4,592
py
Python
cmsplugin_gridlayout/migrations/0001_initial.py
glomium/cmstemplate
6d51a6d97cf5a132e41ea6d2404bdfedf9edf25c
[ "BSD-3-Clause" ]
null
null
null
cmsplugin_gridlayout/migrations/0001_initial.py
glomium/cmstemplate
6d51a6d97cf5a132e41ea6d2404bdfedf9edf25c
[ "BSD-3-Clause" ]
null
null
null
cmsplugin_gridlayout/migrations/0001_initial.py
glomium/cmstemplate
6d51a6d97cf5a132e41ea6d2404bdfedf9edf25c
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-04-24 06:38 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('cms', '0016_auto_20160608_1535'), ] operations = [ migrations.CreateModel( name='Column', fields=[ ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='cmsplugin_gridlayout_column', serialize=False, to='cms.CMSPlugin')), ('xs', models.CharField(blank=True, choices=[('', 'Use default'), ('1', '1 Span'), ('2', '2 Span'), ('3', '3 Span'), ('4', '4 Span'), ('5', '5 Span'), ('6', '6 Span'), ('7', '7 Span'), ('8', '8 Span'), ('9', '9 Span'), ('10', '10 Span'), ('11', '11 Span'), ('12', '12 Span')], default='12', max_length=2, null=True, verbose_name='Phone')), ('sm', models.CharField(blank=True, choices=[('', 'Use default'), ('1', '1 Span'), ('2', '2 Span'), ('3', '3 Span'), ('4', '4 Span'), ('5', '5 Span'), ('6', '6 Span'), ('7', '7 Span'), ('8', '8 Span'), ('9', '9 Span'), ('10', '10 Span'), ('11', '11 Span'), ('12', '12 Span')], default='', max_length=2, null=True, verbose_name='Tablet')), ('md', models.CharField(blank=True, choices=[('', 'Use default'), ('1', '1 Span'), ('2', '2 Span'), ('3', '3 Span'), ('4', '4 Span'), ('5', '5 Span'), ('6', '6 Span'), ('7', '7 Span'), ('8', '8 Span'), ('9', '9 Span'), ('10', '10 Span'), ('11', '11 Span'), ('12', '12 Span')], default='', max_length=2, null=True, verbose_name='Laptop')), ('lg', models.CharField(blank=True, choices=[('', 'Use default'), ('1', '1 Span'), ('2', '2 Span'), ('3', '3 Span'), ('4', '4 Span'), ('5', '5 Span'), ('6', '6 Span'), ('7', '7 Span'), ('8', '8 Span'), ('9', '9 Span'), ('10', '10 Span'), ('11', '11 Span'), ('12', '12 Span')], default='', max_length=2, null=True, verbose_name='Desktop')), ('xl', models.CharField(blank=True, choices=[('', 'Use default'), ('1', '1 Span'), ('2', '2 Span'), ('3', '3 Span'), ('4', '4 Span'), ('5', '5 Span'), ('6', '6 Span'), ('7', '7 Span'), ('8', '8 Span'), ('9', '9 Span'), ('10', '10 Span'), ('11', '11 Span'), ('12', '12 Span')], default='', max_length=2, null=True, verbose_name='Large Desktop')), ('hidden', models.CharField(blank=True, choices=[('', 'Always visible'), ('hidden-sm-down', 'hidden-sm-down'), ('hidden-sm-up', 'hidden-sm-up'), ('hidden-md-down', 'hidden-md-down'), ('hidden-md-up', 'hidden-md-up'), ('hidden-lg-down', 'hidden-lg-down'), ('hidden-lg-up', 'hidden-lg-up')], default='', max_length=20, null=True, verbose_name='Hide Column')), ('css', models.CharField(blank=True, default='', max_length=40, null=True, verbose_name='Additional class')), ], options={ 'abstract': False, }, bases=('cms.cmsplugin',), ), migrations.CreateModel( name='Row', fields=[ ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='cmsplugin_gridlayout_row', serialize=False, to='cms.CMSPlugin')), ('css', models.CharField(blank=True, default='', max_length=40, null=True, verbose_name='Additional class')), ], options={ 'abstract': False, }, bases=('cms.cmsplugin',), ), migrations.CreateModel( name='Section', fields=[ ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='cmsplugin_gridlayout_section', serialize=False, to='cms.CMSPlugin')), ('name', models.CharField(blank=True, max_length=200, null=True, verbose_name='Name')), ('slug', models.SlugField(blank=True, max_length=200, null=True, verbose_name='Slug')), ('container', models.CharField(blank=True, choices=[('c', 'Fixed'), ('f', 'Fluid')], default='c', max_length=1, null=True, verbose_name='Container')), ('css', models.CharField(blank=True, max_length=200, null=True, verbose_name='CSS')), ], options={ 'abstract': False, }, bases=('cms.cmsplugin',), ), ]
75.278689
373
0.548998
577
4,592
4.272097
0.181976
0.043813
0.073022
0.092495
0.782961
0.68357
0.66856
0.656795
0.656795
0.640568
0
0.056812
0.210366
4,592
60
374
76.533333
0.623001
0.014808
0
0.442308
1
0
0.241982
0.022561
0
0
0
0
0
1
0
false
0
0.057692
0
0.134615
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
3b4ce6d5bb94db3f7f0a418bdaca1b966e3f95e3
1,341
py
Python
metaflow/plugins/kfp/tests/flows/foreach_linear_split.py
snehalshirgure/metaflow
1d316ddffa86f0877dd936f647fc5b1ae9a24906
[ "Apache-2.0" ]
7
2020-07-24T17:07:58.000Z
2021-05-19T21:47:12.000Z
metaflow/plugins/kfp/tests/flows/foreach_linear_split.py
snehalshirgure/metaflow
1d316ddffa86f0877dd936f647fc5b1ae9a24906
[ "Apache-2.0" ]
55
2020-07-20T16:56:27.000Z
2022-03-28T12:51:15.000Z
metaflow/plugins/kfp/tests/flows/foreach_linear_split.py
snehalshirgure/metaflow
1d316ddffa86f0877dd936f647fc5b1ae9a24906
[ "Apache-2.0" ]
6
2020-10-15T18:38:35.000Z
2021-06-20T03:05:43.000Z
from metaflow import FlowSpec, step class ForeachLinearSplit(FlowSpec): """ foreach -> linear -> split -> linear -> foreach -> join """ @step def start(self): self.x = "ab" self.next(self.linear_1, foreach="x") @step def linear_1(self): self.next(self.split_a_and_b) @step def split_a_and_b(self): self.next(self.a, self.b) @step def a(self): self.next(self.foreach_split_a) @step def b(self): self.next(self.foreach_split_b) @step def foreach_split_a(self): self.z = "ef" self.next(self.linear_2, foreach="z") @step def foreach_split_b(self): self.z = "ef" self.next(self.linear_3, foreach="z") @step def linear_2(self): self.next(self.foreach_join_a) @step def linear_3(self): self.next(self.foreach_join_b) @step def foreach_join_a(self, inputs): self.next(self.join_a_and_b) @step def foreach_join_b(self, inputs): self.next(self.join_a_and_b) @step def join_a_and_b(self, inputs): self.next(self.foreach_join_start) @step def foreach_join_start(self, inputs): self.next(self.end) @step def end(self): pass if __name__ == "__main__": ForeachLinearSplit()
18.887324
59
0.593587
189
1,341
3.952381
0.164021
0.131191
0.208835
0.128514
0.483266
0.358768
0.179384
0.179384
0.10174
0.10174
0
0.006244
0.283371
1,341
70
60
19.157143
0.771072
0.041014
0
0.367347
0
0
0.013386
0
0
0
0
0
0
1
0.285714
false
0.020408
0.020408
0
0.326531
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
2
3b50a4048f03048e7278d8b9cfe37fc7a618f21d
79,907
py
Python
ucsmsdk/mometa/fault/FaultSuppressPolicyItem.py
vesposito/ucsmsdk
03bc1e19b8582c68d3a94a20a939a48fe91332f8
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/fault/FaultSuppressPolicyItem.py
vesposito/ucsmsdk
03bc1e19b8582c68d3a94a20a939a48fe91332f8
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/fault/FaultSuppressPolicyItem.py
vesposito/ucsmsdk
03bc1e19b8582c68d3a94a20a939a48fe91332f8
[ "Apache-2.0" ]
null
null
null
"""This module contains the general information for FaultSuppressPolicyItem ManagedObject.""" from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class FaultSuppressPolicyItemConsts: CAUSE_CHASSIS_PROFILE_ASSIGNED = "ChassisProfile-assigned" CAUSE_CHASSIS_PROFILE_ASSOCIATED = "ChassisProfile-associated" CAUSE_CHASSIS_PROFILE_ASSOCIATING = "ChassisProfile-associating" CAUSE_CHASSIS_PROFILE_DEASSOCIATING = "ChassisProfile-deassociating" CAUSE_CHASSIS_PROFILE_UNASSIGNED = "ChassisProfile-unassigned" CAUSE_CHASSIS_PROFILE_UNASSOCIATED = "ChassisProfile-unassociated" CAUSE_A_FAILED = "a-failed" CAUSE_ACTIVATE_ADAPTOR_FAILED = "activate-adaptor-failed" CAUSE_ACTIVATE_ADAPTOR_NW_FW_LOCAL_FAILED = "activate-adaptor-nw-fw-local-failed" CAUSE_ACTIVATE_ADAPTOR_NW_FW_PEER_FAILED = "activate-adaptor-nw-fw-peer-failed" CAUSE_ACTIVATE_BIOS_FAILED = "activate-bios-failed" CAUSE_ACTIVATE_BRD_CTLR_FAILED = "activate-brd-ctlr-failed" CAUSE_ACTIVATE_CATALOG_FAILED = "activate-catalog-failed" CAUSE_ACTIVATE_CMC_FAILED = "activate-cmc-failed" CAUSE_ACTIVATE_FAILED = "activate-failed" CAUSE_ACTIVATE_LOCAL_DISK_FAILED = "activate-local-disk-failed" CAUSE_ACTIVATE_LOCAL_FAILED = "activate-local-failed" CAUSE_ACTIVATE_LOCALFI_FAILED = "activate-localfi-failed" CAUSE_ACTIVATE_PEER_FAILED = "activate-peer-failed" CAUSE_ACTIVATE_PSU_FAILED = "activate-psu-failed" CAUSE_ACTIVATE_REMOTEFI_FAILED = "activate-remotefi-failed" CAUSE_ACTIVATE_SAS_EXPANDER_FAILED = "activate-sas-expander-failed" CAUSE_ACTIVATE_STORAGE_CTLR_FAILED = "activate-storage-ctlr-failed" CAUSE_ACTIVATEIBMCFW_FAILED = "activateibmcfw-failed" CAUSE_ACTIVATEIOM_FAILED = "activateiom-failed" CAUSE_ACTIVATEUCSM_FAILED = "activateucsm-failed" CAUSE_ACTIVATEUCSMSERVICE_PACK_FAILED = "activateucsmservice-pack-failed" CAUSE_ACTIVATION_FAILED = "activation-failed" CAUSE_ACTIVE_FAILED = "active-failed" CAUSE_ADAPTOR_MISMATCH = "adaptor-mismatch" CAUSE_ANALYZE_IMPACT_FAILED = "analyze-impact-failed" CAUSE_ANOTHER_CONNECTION_ALREADY_ENABLED = "another-connection-already-enabled" CAUSE_ANY = "any" CAUSE_APPLY_CATALOG_FAILED = "apply-catalog-failed" CAUSE_APPLY_CONFIG_FAILED = "apply-config-failed" CAUSE_APPLY_DEFAULT_IDENTIFIERS_FAILED = "apply-default-identifiers-failed" CAUSE_APPLY_FAILED = "apply-failed" CAUSE_APPLY_IDENTIFIERS_FAILED = "apply-identifiers-failed" CAUSE_APPLY_MAINT_CONFIG_FAILED = "apply-maint-config-failed" CAUSE_APPLY_MO_PROPS_FAILED = "apply-mo-props-failed" CAUSE_APPLY_PHYSICAL_FAILED = "apply-physical-failed" CAUSE_APPLY_POLICIES_FAILED = "apply-policies-failed" CAUSE_APPLY_TEMPLATE_FAILED = "apply-template-failed" CAUSE_ARP_TARGETS_CONFIG_ERROR = "arp-targets-config-error" CAUSE_ASSERT_BYPASS_WAIT_FAILED = "assert-bypass-wait-failed" CAUSE_ASSIGNMENT_FAILED = "assignment-failed" CAUSE_ASSOCIATION_FAILED = "association-failed" CAUSE_AUTO_FIRMWARE_UPGRADE = "auto-firmware-upgrade" CAUSE_B_FAILED = "b-failed" CAUSE_BACKPLANE_PORT_PROBLEM = "backplane-port-problem" CAUSE_BACKUP_LOCAL_FAILED = "backup-local-failed" CAUSE_BEGIN_FAILED = "begin-failed" CAUSE_BEGIN_INVENTORY_FAILED = "begin-inventory-failed" CAUSE_BIOS_IMG_UPDATE_FAILED = "bios-img-update-failed" CAUSE_BIOS_POST_COMPLETION_FAILED = "bios-post-completion-failed" CAUSE_BLADE_BOOT_PNUOS_FAILED = "blade-boot-pnuos-failed" CAUSE_BLADE_BOOT_WAIT_FAILED = "blade-boot-wait-failed" CAUSE_BLADE_POWER_OFF_FAILED = "blade-power-off-failed" CAUSE_BLADE_POWER_ON_FAILED = "blade-power-on-failed" CAUSE_BLADE_READ_SMBIOS_FAILED = "blade-read-smbios-failed" CAUSE_BMC_CONFIG_PNUOS_FAILED = "bmc-config-pnuos-failed" CAUSE_BMC_CONFIGURE_CONN_LOCAL_FAILED = "bmc-configure-conn-local-failed" CAUSE_BMC_CONFIGURE_CONN_PEER_FAILED = "bmc-configure-conn-peer-failed" CAUSE_BMC_FACTORY_RESET_FAILED = "bmc-factory-reset-failed" CAUSE_BMC_INVENTORY_FAILED = "bmc-inventory-failed" CAUSE_BMC_PRE_CONFIG_PNUOSLOCAL_FAILED = "bmc-pre-config-pnuoslocal-failed" CAUSE_BMC_PRE_CONFIG_PNUOSPEER_FAILED = "bmc-pre-config-pnuospeer-failed" CAUSE_BMC_PRECONFIG_PNUOSLOCAL_FAILED = "bmc-preconfig-pnuoslocal-failed" CAUSE_BMC_PRECONFIG_PNUOSPEER_FAILED = "bmc-preconfig-pnuospeer-failed" CAUSE_BMC_PRESENCE_FAILED = "bmc-presence-failed" CAUSE_BMC_SHUTDOWN_DISCOVERED_FAILED = "bmc-shutdown-discovered-failed" CAUSE_BMC_UNCONFIG_PNUOS_FAILED = "bmc-unconfig-pnuos-failed" CAUSE_BOARD_CTRL_UPGRADED = "board-ctrl-upgraded" CAUSE_BOOT_HOST_FAILED = "boot-host-failed" CAUSE_BOOT_PNUOS_FAILED = "boot-pnuos-failed" CAUSE_BOOT_WAIT_FAILED = "boot-wait-failed" CAUSE_CALCULATE_VLAN_GROUP_FOR_HOSTOSLOCAL_FAILED = "calculate-vlan-group-for-hostoslocal-failed" CAUSE_CALCULATE_VLAN_GROUP_FOR_HOSTOSPEER_FAILED = "calculate-vlan-group-for-hostospeer-failed" CAUSE_CALLHOME_CONFIG_ERROR = "callhome-config-error" CAUSE_CAPACITY_EXCEEDED = "capacity-exceeded" CAUSE_CARTRIDGE_MOVED = "cartridge-moved" CAUSE_CERTIFICATE_EMPTY_PARAMS = "certificate-empty-params" CAUSE_CERTIFICATE_UNSUPPORTED = "certificate-unsupported" CAUSE_CHASSIS_INTRUSION = "chassis-intrusion" CAUSE_CHASSIS_LIMIT_EXCEEDED = "chassis-limit-exceeded" CAUSE_CHASSIS_PEER_ADAPTER_REBOOT_FAILED = "chassis-peer-adapter-reboot-failed" CAUSE_CHECK_ADAPTOR_FW40GCAP_FAILED = "check-adaptor-fw40gcap-failed" CAUSE_CHECK_ASSIGNED_DEFAULT_IDENTIFIERS_FOR_DUP_FAILED = "check-assigned-default-identifiers-for-dup-failed" CAUSE_CHECK_ASSIGNED_IDENTIFIERS_FOR_DUP_FAILED = "check-assigned-identifiers-for-dup-failed" CAUSE_CHECK_INVENTORY_STATUS_FAILED = "check-inventory-status-failed" CAUSE_CHECK_LICENSE_FAILED = "check-license-failed" CAUSE_CHECK_POWER_AVAILABILITY_FAILED = "check-power-availability-failed" CAUSE_CHECK_STATUS_FAILED = "check-status-failed" CAUSE_CIMC_FIRMWARE_MISMATCH = "cimc-firmware-mismatch" CAUSE_CIMC_PRESENCE_FAILED = "cimc-presence-failed" CAUSE_CIMCVLAN_CFG_LOCAL_FAILED = "cimcvlan-cfg-local-failed" CAUSE_CIMCVLAN_CFG_PEER_FAILED = "cimcvlan-cfg-peer-failed" CAUSE_CISCOOSOPEN_GATE_FAILED = "ciscoosopen-gate-failed" CAUSE_CLEAN_OLD_DATA_FAILED = "clean-old-data-failed" CAUSE_CLEAN_UPVIFS_FAILED = "clean-upvifs-failed" CAUSE_CLEANUP_ENTRIES_FAILED = "cleanup-entries-failed" CAUSE_CLEANUP_FAILED = "cleanup-failed" CAUSE_CLEANUP_LOCAL_FAILED = "cleanup-local-failed" CAUSE_CLEANUP_NIC_CONFIG_LOCAL_FAILED = "cleanup-nic-config-local-failed" CAUSE_CLEANUP_NIC_CONFIG_PEER_FAILED = "cleanup-nic-config-peer-failed" CAUSE_CLEANUP_PEER_FAILED = "cleanup-peer-failed" CAUSE_CLEANUP_PORT_CONFIG_LOCAL_FAILED = "cleanup-port-config-local-failed" CAUSE_CLEANUP_PORT_CONFIG_PEER_FAILED = "cleanup-port-config-peer-failed" CAUSE_CLEANUP_VNICS_LOCAL_FAILED = "cleanup-vnics-local-failed" CAUSE_CLEANUP_VNICS_PEER_FAILED = "cleanup-vnics-peer-failed" CAUSE_CLEANUPCIMC_FAILED = "cleanupcimc-failed" CAUSE_CLEAR_BIOS_UPDATE_FAILED = "clear-bios-update-failed" CAUSE_CLEAR_FAILED = "clear-failed" CAUSE_CLIENT_LOST_CONNECTIVITY = "client-lost-connectivity" CAUSE_CMC_VIF_DOWN = "cmc-vif-down" CAUSE_CMCVLAN_CFG_FAILED = "cmcvlan-cfg-failed" CAUSE_CMCVLAN_CFG_PEER_FAILED = "cmcvlan-cfg-peer-failed" CAUSE_COMM_SVC_CONFIG_ERROR = "comm-svc-config-error" CAUSE_COMMIT_STORAGE_FAILED = "commit-storage-failed" CAUSE_COMPLETE_FAILED = "complete-failed" CAUSE_COMPR_SETS_EXHAUSTED = "compr-sets-exhausted" CAUSE_CONDITION_CAUSE_CONFIGURATION_FAILURE = "condition-cause-configuration-failure" CAUSE_CONDITION_CAUSE_FAULT = "condition-cause-fault" CAUSE_CONDITION_CAUSE_HARDWARE_INVENTORY_MISMATCH = "condition-cause-hardware-inventory-mismatch" CAUSE_CONDITION_CAUSE_KERNEL_MEM_CRITICAL_THRESHOLD = "condition-cause-kernel-mem-critical-threshold" CAUSE_CONDITION_CAUSE_PCI_CONFIG_MISMATCH = "condition-cause-pci-config-mismatch" CAUSE_CONDITION_CAUSE_PERSISTENT_MEMORY_DETECTION = "condition-cause-persistent-memory-detection" CAUSE_CONFIG_BACKUP_OUTDATED = "config-backup-outdated" CAUSE_CONFIG_BIOS_FAILED = "config-bios-failed" CAUSE_CONFIG_CHASSIS_ADAPTER_CONNECTIVITY_FAILED = "config-chassis-adapter-connectivity-failed" CAUSE_CONFIG_CHASSIS_ID_FAILED = "config-chassis-id-failed" CAUSE_CONFIG_CIMCVMEDIA_FAILED = "config-cimcvmedia-failed" CAUSE_CONFIG_DISCOVERY_MODE_FAILED = "config-discovery-mode-failed" CAUSE_CONFIG_ERROR = "config-error" CAUSE_CONFIG_EXT_MGMT_GW_FAILED = "config-ext-mgmt-gw-failed" CAUSE_CONFIG_EXT_MGMT_RULES_FAILED = "config-ext-mgmt-rules-failed" CAUSE_CONFIG_FAILED = "config-failed" CAUSE_CONFIG_FAN_SPEED_FAILED = "config-fan-speed-failed" CAUSE_CONFIG_FE_LOCAL_FAILED = "config-fe-local-failed" CAUSE_CONFIG_FE_PEER_FAILED = "config-fe-peer-failed" CAUSE_CONFIG_FLEX_FLASH_FAILED = "config-flex-flash-failed" CAUSE_CONFIG_FLEX_FLASH_SCRUB_FAILED = "config-flex-flash-scrub-failed" CAUSE_CONFIG_HOST_OS_ANNOTATIONS_FAILED = "config-host-os-annotations-failed" CAUSE_CONFIG_KVM_MGMT_DEFAULT_SETTING_FAILED = "config-kvm-mgmt-default-setting-failed" CAUSE_CONFIG_MEMORY_POLICY_FAILED = "config-memory-policy-failed" CAUSE_CONFIG_MGMT_IP_RULES_FAILED = "config-mgmt-ip-rules-failed" CAUSE_CONFIG_MISMATCH = "config-mismatch" CAUSE_CONFIG_MISSING = "config-missing" CAUSE_CONFIG_NIV_MODE_FAILED = "config-niv-mode-failed" CAUSE_CONFIG_PROBLEM = "config-problem" CAUSE_CONFIG_SERVER_IDENTITY_FAILED = "config-server-identity-failed" CAUSE_CONFIG_SO_LFAILED = "config-so-lfailed" CAUSE_CONFIG_SW_AFAILED = "config-sw-afailed" CAUSE_CONFIG_SW_BFAILED = "config-sw-bfailed" CAUSE_CONFIG_SWITCH_LOCAL_FAILED = "config-switch-local-failed" CAUSE_CONFIG_SWITCH_PEER_FAILED = "config-switch-peer-failed" CAUSE_CONFIG_USER_ACCESS_FAILED = "config-user-access-failed" CAUSE_CONFIG_UUID_FAILED = "config-uuid-failed" CAUSE_CONFIGBMCPOWER_PARAMS_FAILED = "configbmcpower-params-failed" CAUSE_CONFIGURATION_APPLIED = "configuration-applied" CAUSE_CONFIGURATION_APPLYING = "configuration-applying" CAUSE_CONFIGURATION_ERROR = "configuration-error" CAUSE_CONFIGURATION_FAILED = "configuration-failed" CAUSE_CONFIGURATION_FAILURE = "configuration-failure" CAUSE_CONFIGURATION_IN_PROGRESS = "configuration-in-progress" CAUSE_CONFIGURATION_MISMATCH = "configuration-mismatch" CAUSE_CONFIGURATION_NOT_APPLIED = "configuration-not-applied" CAUSE_CONFIGURE_END_POINT_FAILED = "configure-end-point-failed" CAUSE_CONFIGURE_FAILED = "configure-failed" CAUSE_CONFIGURE_SW_MGMT_END_POINT_FAILED = "configure-sw-mgmt-end-point-failed" CAUSE_CONFIGURE_VIF_NS_FAILED = "configure-vif-ns-failed" CAUSE_CONNECTION_UNUSED = "connection-unused" CAUSE_CONNECTIVITY_PROBLEM = "connectivity-problem" CAUSE_COPY_ALL_IMAGES_TO_PEER_FAILED = "copy-all-images-to-peer-failed" CAUSE_COPY_CAT_FROM_REP_FAILED = "copy-cat-from-rep-failed" CAUSE_COPY_EXTERNAL_REP_TO_REMOTE_FAILED = "copy-external-rep-to-remote-failed" CAUSE_COPY_IMG_FROM_REP_FAILED = "copy-img-from-rep-failed" CAUSE_COPY_PRIMARY_FAILED = "copy-primary-failed" CAUSE_COPY_REMOTE_FAILED = "copy-remote-failed" CAUSE_COPY_SUB_FAILED = "copy-sub-failed" CAUSE_COPYIOMIMG_TO_SUB_FAILED = "copyiomimg-to-sub-failed" CAUSE_CREATE_LOCAL_FAILED = "create-local-failed" CAUSE_CREATE_REMOTE_FAILED = "create-remote-failed" CAUSE_DEASSERT_RESET_BYPASS_FAILED = "deassert-reset-bypass-failed" CAUSE_DECOMISSION_FAILED = "decomission-failed" CAUSE_DECOMMISSIONED = "decommissioned" CAUSE_DEFAULT_HOSTPACK_MISSING = "default-hostpack-missing" CAUSE_DEFAULT_HOSTPACK_MISSING_VERSIONS = "default-hostpack-missing-versions" CAUSE_DEFAULTAUTH_CONFIG_ERROR = "defaultauth-config-error" CAUSE_DELETE_ALL_MO_REFS_FAILED = "delete-all-mo-refs-failed" CAUSE_DELETE_CURL_DOWNLOADED_IMAGES_FAILED = "delete-curl-downloaded-images-failed" CAUSE_DELETE_IMAGES_REMOTE_FAILED = "delete-images-remote-failed" CAUSE_DELETE_LOCAL_FAILED = "delete-local-failed" CAUSE_DELETE_PRIMARY_FAILED = "delete-primary-failed" CAUSE_DELETE_REMOTE_FAILED = "delete-remote-failed" CAUSE_DELETE_SUB_FAILED = "delete-sub-failed" CAUSE_DEPLOY_FAILED = "deploy-failed" CAUSE_DEPRECATED = "deprecated" CAUSE_DEVICE_SHARED_STORAGE_IO_ERROR = "device-shared-storage-IO-error" CAUSE_DEVICE_SHARED_STORAGE_ERROR = "device-shared-storage-error" CAUSE_DISABLE_AFAILED = "disable-afailed" CAUSE_DISABLE_BFAILED = "disable-bfailed" CAUSE_DISABLE_END_POINT_FAILED = "disable-end-point-failed" CAUSE_DISABLE_FAILED = "disable-failed" CAUSE_DISABLE_SCRIPTABLEVMEDIA_FAILED = "disable-scriptablevmedia-failed" CAUSE_DISASSOCIATION_FAILED = "disassociation-failed" CAUSE_DISCOVER_CHASSIS_FAILED = "discover-chassis-failed" CAUSE_DISCOVER_SAS_EXPANDER_FAILED = "discover-sas-expander-failed" CAUSE_DISCOVERY_FAILED = "discovery-failed" CAUSE_DISCOVERY_IN_PROGRESS = "discovery-in-progress" CAUSE_DISK_ZONING_CONFIG_FAILED = "disk-zoning-config-failed" CAUSE_DOMAIN_CONFIG_ERROR = "domain-config-error" CAUSE_DOWNLOAD_IMAGES_FAILED = "download-images-failed" CAUSE_DOWNLOAD_LOCAL_FAILED = "download-local-failed" CAUSE_DUPLICATED_ASSIGNED = "duplicated-assigned" CAUSE_DVIF_EXHAUSTED = "dvif-exhausted" CAUSE_ELECTION_FAILURE = "election-failure" CAUSE_EMPTY_PIN_GROUP = "empty-pin-group" CAUSE_EMPTY_POOL = "empty-pool" CAUSE_ENABLE_AFAILED = "enable-afailed" CAUSE_ENABLE_BFAILED = "enable-bfailed" CAUSE_ENABLE_CHASSIS_FAILED = "enable-chassis-failed" CAUSE_ENABLE_FAILED = "enable-failed" CAUSE_ENABLE_PORT_FAILED = "enable-port-failed" CAUSE_END_INVENTORY_FAILED = "end-inventory-failed" CAUSE_EQUIPMENT_ACCESSIBILITY_PROBLEM = "equipment-accessibility-problem" CAUSE_EQUIPMENT_CONFIG_ERROR = "equipment-config-error" CAUSE_EQUIPMENT_CONFIG_NOT_MATCHING = "equipment-config-not-matching" CAUSE_EQUIPMENT_DEGRADED = "equipment-degraded" CAUSE_EQUIPMENT_DEPRECATED = "equipment-deprecated" CAUSE_EQUIPMENT_DISABLED = "equipment-disabled" CAUSE_EQUIPMENT_DISCONNECTED = "equipment-disconnected" CAUSE_EQUIPMENT_FAILED = "equipment-failed" CAUSE_EQUIPMENT_FRU_MISSING = "equipment-fru-missing" CAUSE_EQUIPMENT_HDDSLOT_SERVER2_OWNERSHIP_UNASSIGNED = "equipment-hddslot-server2-ownership-unassigned" CAUSE_EQUIPMENT_HOTSPARE_UNSUPPORTED = "equipment-hotspare-unsupported" CAUSE_EQUIPMENT_INACCESSIBLE = "equipment-inaccessible" CAUSE_EQUIPMENT_INOPERABLE = "equipment-inoperable" CAUSE_EQUIPMENT_INVENTORY = "equipment-inventory" CAUSE_EQUIPMENT_IOE_OWNERSHIP_UNASSIGNED = "equipment-ioe-ownership-unassigned" CAUSE_EQUIPMENT_LINK_DEGRADED = "equipment-link-degraded" CAUSE_EQUIPMENT_LINK_MISCONNECT = "equipment-link-misconnect" CAUSE_EQUIPMENT_MISSING = "equipment-missing" CAUSE_EQUIPMENT_NAMESPACE_NOT_MATCHING = "equipment-namespace-not-matching" CAUSE_EQUIPMENT_NON_OPTIMAL = "equipment-non-optimal" CAUSE_EQUIPMENT_OFFLINE = "equipment-offline" CAUSE_EQUIPMENT_OWNERSHIP_UNSUPPORTED = "equipment-ownership-unsupported" CAUSE_EQUIPMENT_PROBLEM = "equipment-problem" CAUSE_EQUIPMENT_REMOVED = "equipment-removed" CAUSE_EQUIPMENT_SECOND_CONTROLLER_ABSENT = "equipment-second-controller-absent" CAUSE_EQUIPMENT_UNACKNOWLEDGED = "equipment-unacknowledged" CAUSE_EQUIPMENT_UNAVAILABLE = "equipment-unavailable" CAUSE_EQUIPMENT_UNHEALTHY = "equipment-unhealthy" CAUSE_EQUIPPED_UNSUPPORTED = "equipped-unsupported" CAUSE_ESTIMATE_APPLY_CONFIG_FAILED = "estimate-apply-config-failed" CAUSE_EVALUATE_ASSOCIATION_FAILED = "evaluate-association-failed" CAUSE_EVALUATE_STATUS_FAILED = "evaluate-status-failed" CAUSE_EXECUTE_AFAILED = "execute-afailed" CAUSE_EXECUTE_BFAILED = "execute-bfailed" CAUSE_EXECUTE_FAILED = "execute-failed" CAUSE_EXECUTE_LOCAL_FAILED = "execute-local-failed" CAUSE_EXECUTE_PEER_FAILED = "execute-peer-failed" CAUSE_EXECUTEPMACTION_FAILED = "executepmaction-failed" CAUSE_EXECUTEVDACTION_FAILED = "executevdaction-failed" CAUSE_EXTRA_PRIMARY_VLANS = "extra-primary-vlans" CAUSE_EXTRA_SECONDARY_VLANS = "extra-secondary-vlans" CAUSE_EXTRA_SECONDARY_VLANS_PER_PRIMARY = "extra-secondary-vlans-per-primary" CAUSE_EXTRA_VIF = "extra-vif" CAUSE_FAB_EVAC_OFF_REMOTEFI_FAILED = "fab-evac-off-remotefi-failed" CAUSE_FAB_EVAC_ON_REMOTEFI_FAILED = "fab-evac-on-remotefi-failed" CAUSE_FABRIC_EVACUATED = "fabric-evacuated" CAUSE_FAIL_FAILED = "fail-failed" CAUSE_FAIL_OVER_TO_REMOTEFI_FAILED = "fail-over-to-remotefi-failed" CAUSE_FAN_REMOVAL = "fan-removal" CAUSE_FAULT = "fault" CAUSE_FC_PORTCHANNEL_MEMBERS_INCONSISTENT_SPEED = "fc-portchannel-members-inconsistent-speed" CAUSE_FC_STORAGEPORT_NPV_MODE = "fc-storageport-npv-mode" CAUSE_FC_ZONING_ENABLED = "fc-zoning-enabled" CAUSE_FCOE_STORAGEPORT_NPV_MODE = "fcoe-storageport-npv-mode" CAUSE_FCOE_UPLINK_PORT_CHANNEL_UNSUPPORTED_FI_SETTINGS = "fcoe-uplink-port-channel-unsupported-fi-settings" CAUSE_FCOE_UPLINK_UNSUPPORTED_FI_SETTINGS = "fcoe-uplink-unsupported-fi-settings" CAUSE_FEX_UNSUPPORTED = "fex-unsupported" CAUSE_FI_B_QUERIER_IP_EMPTY_OR_SAME_AS_PRIMARY = "fi-b-querier-ip-empty-or-same-as-primary" CAUSE_FILE_TRANSFER_FAILED = "file-transfer-failed" CAUSE_FINALIZE_FAILED = "finalize-failed" CAUSE_FIRMWARE_UPGRADE_PROBLEM = "firmware-upgrade-problem" CAUSE_FORMAT_FAILED = "format-failed" CAUSE_FRU_PROBLEM = "fru-problem" CAUSE_FSM_FAILED = "fsm-failed" CAUSE_FULL_INVENTORY_FAILED = "full-inventory-failed" CAUSE_GET_VERSION_FAILED = "get-version-failed" CAUSE_GRAPHICS_IMAGE_UPDATE_FAILED = "graphics-image-update-failed" CAUSE_GROUP_CAP_INSUFFICIENT = "group-cap-insufficient" CAUSE_GROUP_PERMIT_UNRESOLVED = "group-permit-unresolved" CAUSE_HA_NOT_READY = "ha-not-ready" CAUSE_HA_SSH_KEYS_MISMATCHED = "ha-ssh-keys-mismatched" CAUSE_HAG_CONNECT_FAILED = "hag-connect-failed" CAUSE_HAG_DISCONNECT_FAILED = "hag-disconnect-failed" CAUSE_HAG_HOSTOSCONNECT_FAILED = "hag-hostosconnect-failed" CAUSE_HAG_PNUOSCONNECT_FAILED = "hag-pnuosconnect-failed" CAUSE_HAG_PNUOSDISCONNECT_FAILED = "hag-pnuosdisconnect-failed" CAUSE_HANDLE_POOLING_FAILED = "handle-pooling-failed" CAUSE_HARDWARE_INVENTORY_MISMATCH = "hardware-inventory-mismatch" CAUSE_HARDWARE_MISMATCH = "hardware-mismatch" CAUSE_HBA_IMG_UPDATE_FAILED = "hba-img-update-failed" CAUSE_HEALTH_CRITICAL = "health-critical" CAUSE_HEALTH_INFO = "health-info" CAUSE_HEALTH_LED_AMBER = "health-led-amber" CAUSE_HEALTH_LED_AMBER_BLINKING = "health-led-amber-blinking" CAUSE_HEALTH_MAJOR = "health-major" CAUSE_HEALTH_MINOR = "health-minor" CAUSE_HEALTH_WARNING = "health-warning" CAUSE_HOSTOSCONFIG_FAILED = "hostosconfig-failed" CAUSE_HOSTOSCONNECT_FAILED = "hostosconnect-failed" CAUSE_HOSTOSIDENT_FAILED = "hostosident-failed" CAUSE_HOSTOSPOLICY_FAILED = "hostospolicy-failed" CAUSE_HOSTOSVALIDATE_FAILED = "hostosvalidate-failed" CAUSE_IDENTIFY_FAILED = "identify-failed" CAUSE_IDENTITY_UNESTABLISHABLE = "identity-unestablishable" CAUSE_IFTMC_PV_EXHAUSTED = "iftmc-pv-exhausted" CAUSE_IGMP_GROUP_EXHAUSTED = "igmp-group-exhausted" CAUSE_IMAGE_CANNOT_BOOT = "image-cannot-boot" CAUSE_IMAGE_CORRUPTED = "image-corrupted" CAUSE_IMAGE_DELETED = "image-deleted" CAUSE_IMAGE_UNUSABLE = "image-unusable" CAUSE_IN_MAINTENANCE = "in-maintenance" CAUSE_INACCESSIBLE_VLAN_REFERENCED = "inaccessible-vlan-referenced" CAUSE_INBAND_UNSUPPORTED_SERVER = "inband-unsupported-server" CAUSE_INCOMPATIBLE_SERVER_FIRMWARE = "incompatible-server-firmware" CAUSE_INCOMPATIBLE_SPEED = "incompatible-speed" CAUSE_INIT_IPTABLES_LOCAL_FAILED = "init-iptables-local-failed" CAUSE_INIT_IPTABLES_PEER_FAILED = "init-iptables-peer-failed" CAUSE_INOPERABLE = "inoperable" CAUSE_INSUFFICIENT_RESOURCES = "insufficient-resources" CAUSE_INSUFFICIENTLY_EQUIPPED = "insufficiently-equipped" CAUSE_INTERFACE_FAILED = "interface-failed" CAUSE_INTERFACE_MISCONFIGURED = "interface-misconfigured" CAUSE_INTERNAL_BACKUP_FAILED = "internal-backup-failed" CAUSE_INVALID_KEYRING_CERTIFICATE = "invalid-keyring-certificate" CAUSE_INVALID_KEYRING_MODULUS = "invalid-keyring-modulus" CAUSE_INVALID_PINNING = "invalid-pinning" CAUSE_INVALID_SERVER_GROUP = "invalid-server-group" CAUSE_INVALID_TARGET = "invalid-target" CAUSE_INVALID_TRUSTPOINT_CERT_CHAIN = "invalid-trustpoint-cert-chain" CAUSE_INVALID_VLAN_IN_THE_ALLOWED_VLAN_LIST = "invalid-vlan-in-the-allowed-vlan-list" CAUSE_INVENTORY_FAILED = "inventory-failed" CAUSE_KERNEL_MEM_CRITICAL_THRESHOLD = "kernel-mem-critical-threshold" CAUSE_KEYRING_CONFIG_ERROR = "keyring-config-error" CAUSE_KMIP_CERT_CONFIG_FAILED = "kmip-cert-config-failed" CAUSE_KMIP_FAULT = "kmip-fault" CAUSE_KMIP_SAVE_CERT_FAILED = "kmip-save-cert-failed" CAUSE_LEADERSHIP_CHANGE = "leadershipChange" CAUSE_LICENSE_FILE_NOT_DELETED = "license-file-not-deleted" CAUSE_LICENSE_FILE_UNINSTALLABLE = "license-file-uninstallable" CAUSE_LICENSE_GRACEPERIOD_10DAYS = "license-graceperiod-10days" CAUSE_LICENSE_GRACEPERIOD_119DAYS = "license-graceperiod-119days" CAUSE_LICENSE_GRACEPERIOD_30DAYS = "license-graceperiod-30days" CAUSE_LICENSE_GRACEPERIOD_60DAYS = "license-graceperiod-60days" CAUSE_LICENSE_GRACEPERIOD_90DAYS = "license-graceperiod-90days" CAUSE_LICENSE_GRACEPERIOD_ENTERED = "license-graceperiod-entered" CAUSE_LICENSE_GRACEPERIOD_EXPIRED = "license-graceperiod-expired" CAUSE_LICENSE_INSUFFICIENT = "license-insufficient" CAUSE_LIMIT_REACHED = "limit-reached" CAUSE_LINK_DOWN = "link-down" CAUSE_LINK_MISCONNECTED = "link-misconnected" CAUSE_LINK_MISSING = "link-missing" CAUSE_LOAD_CATALOG_FAILED = "load-catalog-failed" CAUSE_LOCAL_DISK_FW_UPDATE_FAILED = "local-disk-fw-update-failed" CAUSE_LOCAL_FAILED = "local-failed" CAUSE_LOCAL_INTERNAL_BACKUP_FAILED = "local-internal-backup-failed" CAUSE_LOCALE_CONFIG_ERROR = "locale-config-error" CAUSE_LOCALE_ORG_CONFIG_ERROR = "locale-org-config-error" CAUSE_LOG_CAPACITY = "log-capacity" CAUSE_LOG_TRANSFER_FAILED = "log-transfer-failed" CAUSE_MAINTENANCE_FAILED = "maintenance-failed" CAUSE_MANAGEMENT_SERVICES_FAILURE = "management-services-failure" CAUSE_MANAGEMENT_SERVICES_UNRESPONSIVE = "management-services-unresponsive" CAUSE_MARK_ADAPTER_FOR_REBOOT_FAILED = "mark-adapter-for-reboot-failed" CAUSE_MAX_VLAN_LIMIT_EXCEEDED = "max-vlan-limit-exceeded" CAUSE_MEMBERSHIP_DOWN = "membership-down" CAUSE_MEMORY_ERROR = "memory-error" CAUSE_MGMT_DB_CORRUPTION = "mgmt-db-corruption" CAUSE_MGMTIF_DOWN = "mgmtif-down" CAUSE_MISSING_PRIMARY_VLAN = "missing-primary-vlan" CAUSE_MOUNT_LOCAL_FAILED = "mount-local-failed" CAUSE_MOUNT_PEER_FAILED = "mount-peer-failed" CAUSE_MSWITCH_IMG_UPDATE_FAILED = "mswitch-img-update-failed" CAUSE_MULTICAST_MAC_EXHAUSTED = "multicast-mac-exhausted" CAUSE_MULTIPLE_CONNECTION_POLICIES = "multiple-connection-policies" CAUSE_NAMED_INBAND_VLAN_UNRESOLVED = "named-inband-vlan-unresolved" CAUSE_NAMED_POLICY_UNRESOLVED = "named-policy-unresolved" CAUSE_NAMED_VLAN_UNRESOLVED = "named-vlan-unresolved" CAUSE_NATIVE_VLAN_NOT_FOUND = "native-vlan-not-found" CAUSE_NDISC_TARGETS_CONFIG_ERROR = "ndisc-targets-config-error" CAUSE_NEAR_MAX_LIMIT = "near-max-limit" CAUSE_NETWORK_SAN_GROUP_DOES_NOT_EXIST = "network-san-group-does-not-exist" CAUSE_NETWORK_SAN_GROUP_MISCONFIGURED = "network-san-group-misconfigured" CAUSE_NEW_LINK = "new-link" CAUSE_NEW_VNIC_VCON_SCHEME_APPLIED = "new-vnic-vcon-scheme-applied" CAUSE_NIC_CONFIG_HOSTOSLOCAL_FAILED = "nic-config-hostoslocal-failed" CAUSE_NIC_CONFIG_HOSTOSPEER_FAILED = "nic-config-hostospeer-failed" CAUSE_NIC_CONFIG_LOCAL_FAILED = "nic-config-local-failed" CAUSE_NIC_CONFIG_PARAMS_HOSTOSLOCAL_FAILED = "nic-config-params-hostoslocal-failed" CAUSE_NIC_CONFIG_PARAMS_HOSTOSPEER_FAILED = "nic-config-params-hostospeer-failed" CAUSE_NIC_CONFIG_PEER_FAILED = "nic-config-peer-failed" CAUSE_NIC_CONFIG_PNUOSLOCAL_FAILED = "nic-config-pnuoslocal-failed" CAUSE_NIC_CONFIG_PNUOSPEER_FAILED = "nic-config-pnuospeer-failed" CAUSE_NIC_CONFIG_SERVICE_INFRA_LOCAL_FAILED = "nic-config-service-infra-local-failed" CAUSE_NIC_CONFIG_SERVICE_INFRA_PEER_FAILED = "nic-config-service-infra-peer-failed" CAUSE_NIC_IMG_UPDATE_FAILED = "nic-img-update-failed" CAUSE_NIC_INVENTORY_LOCAL_FAILED = "nic-inventory-local-failed" CAUSE_NIC_INVENTORY_PEER_FAILED = "nic-inventory-peer-failed" CAUSE_NIC_PRESENCE_LOCAL_FAILED = "nic-presence-local-failed" CAUSE_NIC_PRESENCE_PEER_FAILED = "nic-presence-peer-failed" CAUSE_NIC_UN_CONFIG_LOCAL_FAILED = "nic-un-config-local-failed" CAUSE_NIC_UN_CONFIG_PEER_FAILED = "nic-un-config-peer-failed" CAUSE_NIC_UNCONFIG_HOSTOSLOCAL_FAILED = "nic-unconfig-hostoslocal-failed" CAUSE_NIC_UNCONFIG_HOSTOSPEER_FAILED = "nic-unconfig-hostospeer-failed" CAUSE_NIC_UNCONFIG_PNUOSLOCAL_FAILED = "nic-unconfig-pnuoslocal-failed" CAUSE_NIC_UNCONFIG_PNUOSPEER_FAILED = "nic-unconfig-pnuospeer-failed" CAUSE_NIC_UNCONFIG_SERVICE_INFRA_LOCAL_FAILED = "nic-unconfig-service-infra-local-failed" CAUSE_NIC_UNCONFIG_SERVICE_INFRA_PEER_FAILED = "nic-unconfig-service-infra-peer-failed" CAUSE_NO_ACK_FROM_BIOS = "no-ack-from-bios" CAUSE_NO_CAP_FAIL = "no-cap-fail" CAUSE_NO_VLAN_OPTIMIZATION = "no-vlan-optimization" CAUSE_NON_EXISTENT_SCHEDULER = "non-existent-scheduler" CAUSE_NOT_SUPPORTED = "not-supported" CAUSE_OLD_CHASSIS_COMPONENT_FIRMWARE = "old-chassis-component-firmware" CAUSE_OLD_FIRMWARE = "old-firmware" CAUSE_OOB_DISK_SCRUB_FAILED = "oob-disk-scrub-failed" CAUSE_OOB_POLL_SAS_EXPANDER_ACTIVATE_STATUS_FAILED = "oob-poll-sas-expander-activate-status-failed" CAUSE_OOB_POLL_SAS_EXPANDER_BOOT_IMG_ACTIVATE_STATUS_FAILED = "oob-poll-sas-expander-boot-img-activate-status-failed" CAUSE_OOB_POLL_SAS_EXPANDER_UPDATE_STATUS_FAILED = "oob-poll-sas-expander-update-status-failed" CAUSE_OOB_SAS_EXPANDER_BOOT_IMG_ACTIVATE_FAILED = "oob-sas-expander-boot-img-activate-failed" CAUSE_OOB_SAS_EXPANDER_IMG_ACTIVATE_FAILED = "oob-sas-expander-img-activate-failed" CAUSE_OOB_SAS_EXPANDER_IMG_UPDATE_FAILED = "oob-sas-expander-img-update-failed" CAUSE_OOB_STORAGE_CONFIG_FAILED = "oob-storage-config-failed" CAUSE_OOB_STORAGE_INVENTORY_FAILED = "oob-storage-inventory-failed" CAUSE_OPERATION_FAILED = "operation-failed" CAUSE_OPERATIONAL_STATE_DOWN = "operational-state-down" CAUSE_PAIR_FAILED = "pair-failed" CAUSE_PCI_CONFIG_ISSUE = "pci-config-issue" CAUSE_PCI_CONFIG_MISMATCH = "pci-config-mismatch" CAUSE_PCI_SWITCH_IMAGE_UPDATE_FAILED = "pci-switch-image-update-failed" CAUSE_PEER_FAILED = "peer-failed" CAUSE_PERFORMANCE_PROBLEM = "performance-problem" CAUSE_PERSISTENT_MEMORY_DETECTION = "persistent-memory-detection" CAUSE_PERSISTENT_MEMORY_DIMM_FW_UPDATE_FAILED = "persistent-memory-dimm-fw-update-failed" CAUSE_PING_FAILED = "ping-failed" CAUSE_PINNING_MISCONFIG = "pinning-misconfig" CAUSE_PINNING_MISMATCH = "pinning-mismatch" CAUSE_PLD_FIRMWARE_MISMATCH = "pld-firmware-mismatch" CAUSE_PNUOS_BOOT_WAIT_FAILED = "pnuos-boot-wait-failed" CAUSE_PNUOSCATALOG_FAILED = "pnuoscatalog-failed" CAUSE_PNUOSCONFIG_FAILED = "pnuosconfig-failed" CAUSE_PNUOSCONN_STATUS_FAILED = "pnuosconn-status-failed" CAUSE_PNUOSCONNECTIVITY_FAILED = "pnuosconnectivity-failed" CAUSE_PNUOSIDENT_FAILED = "pnuosident-failed" CAUSE_PNUOSINVENTORY_FAILED = "pnuosinventory-failed" CAUSE_PNUOSLOCAL_DISK_CONFIG_FAILED = "pnuoslocal-disk-config-failed" CAUSE_PNUOSPERIPHERAL_COMPONENT_CONFIG_FAILED = "pnuosperipheral-component-config-failed" CAUSE_PNUOSPOLICY_FAILED = "pnuospolicy-failed" CAUSE_PNUOSPOWER_PROFILING_FAILED = "pnuospower-profiling-failed" CAUSE_PNUOSSCRUB_FAILED = "pnuosscrub-failed" CAUSE_PNUOSSELF_TEST_FAILED = "pnuosself-test-failed" CAUSE_PNUOSUNCONFIG_FAILED = "pnuosunconfig-failed" CAUSE_PNUOSUNLOAD_DRIVERS_FAILED = "pnuosunload-drivers-failed" CAUSE_PNUOSVALIDATE_FAILED = "pnuosvalidate-failed" CAUSE_POLL_ACTIVATE_OF_LOCALFI_FAILED = "poll-activate-of-localfi-failed" CAUSE_POLL_ACTIVATE_OF_REMOTEFI_FAILED = "poll-activate-of-remotefi-failed" CAUSE_POLL_ACTIVATE_OFIOM_FAILED = "poll-activate-ofiom-failed" CAUSE_POLL_ACTIVATE_OFUCSM_FAILED = "poll-activate-ofucsm-failed" CAUSE_POLL_ACTIVATE_OFUCSMSERVICE_PACK_FAILED = "poll-activate-ofucsmservice-pack-failed" CAUSE_POLL_ACTIVATE_STATUS_FAILED = "poll-activate-status-failed" CAUSE_POLL_ACTIVATION_FAILED = "poll-activation-failed" CAUSE_POLL_ADAPTOR_ACTIVATION_FAILED = "poll-adaptor-activation-failed" CAUSE_POLL_BIOS_ACTIVATE_STATUS_FAILED = "poll-bios-activate-status-failed" CAUSE_POLL_BIOS_UPDATE_STATUS_FAILED = "poll-bios-update-status-failed" CAUSE_POLL_BOARD_CTRL_POWER_CYCLE_FAILED = "poll-board-ctrl-power-cycle-failed" CAUSE_POLL_BOARD_CTRL_UPDATE_STATUS_FAILED = "poll-board-ctrl-update-status-failed" CAUSE_POLL_BRD_CTLR_ACTIVATION_FAILED = "poll-brd-ctlr-activation-failed" CAUSE_POLL_CLEAR_BIOS_UPDATE_STATUS_FAILED = "poll-clear-bios-update-status-failed" CAUSE_POLL_CLEAR_STATUS_FAILED = "poll-clear-status-failed" CAUSE_POLL_CMC_ACTIVATION_FAILED = "poll-cmc-activation-failed" CAUSE_POLL_FAB_EVAC_OFF_REMOTEFI_FAILED = "poll-fab-evac-off-remotefi-failed" CAUSE_POLL_FAB_EVAC_ON_REMOTEFI_FAILED = "poll-fab-evac-on-remotefi-failed" CAUSE_POLL_FAIL_OVER_TO_REMOTEFI_FAILED = "poll-fail-over-to-remotefi-failed" CAUSE_POLL_INTERNAL_BACKUP_FAILED = "poll-internal-backup-failed" CAUSE_POLL_LOCAL_DISK_ACTIVATE_FAILED = "poll-local-disk-activate-failed" CAUSE_POLL_POST_DISK_ZONE_STORAGE_INVCIMC_FAILED = "poll-post-disk-zone-storage-invcimc-failed" CAUSE_POLL_SAS_EXPANDER_ACTIVATE_FAILED = "poll-sas-expander-activate-failed" CAUSE_POLL_SAS_EXPANDER_CONFIG_FAILED = "poll-sas-expander-config-failed" CAUSE_POLL_SECURE_BOOT_STATUS_FAILED = "poll-secure-boot-status-failed" CAUSE_POLL_STORAGE_CTLR_ACTIVATION_FAILED = "poll-storage-ctlr-activation-failed" CAUSE_POLL_UPDATE_ADAPTOR_FAILED = "poll-update-adaptor-failed" CAUSE_POLL_UPDATE_CMC_FAILED = "poll-update-cmc-failed" CAUSE_POLL_UPDATE_OFIOM_FAILED = "poll-update-ofiom-failed" CAUSE_POLL_UPDATE_SAS_EXPANDER_FAILED = "poll-update-sas-expander-failed" CAUSE_POLL_UPDATE_STATUS_FAILED = "poll-update-status-failed" CAUSE_POLL_UPDATE_STATUS_LOCAL_FAILED = "poll-update-status-local-failed" CAUSE_POLL_UPDATE_STATUS_PEER_FAILED = "poll-update-status-peer-failed" CAUSE_POLL_UPDATE_STORAGE_INVCIMC_FAILED = "poll-update-storage-invcimc-failed" CAUSE_POLL_WAIT_FOR_USER_ACK_FAILED = "poll-wait-for-user-ack-failed" CAUSE_PORT_FAILED = "port-failed" CAUSE_PORT_INVENTORY_SW_AFAILED = "port-inventory-sw-afailed" CAUSE_PORT_INVENTORY_SW_BFAILED = "port-inventory-sw-bfailed" CAUSE_PORT_MISCONFIGURE = "port-misconfigure" CAUSE_POST_DISK_ZONE_STORAGE_INVCIMC_FAILED = "post-disk-zone-storage-invcimc-failed" CAUSE_POST_DISK_ZONE_STORAGE_INVCMC_FAILED = "post-disk-zone-storage-invcmc-failed" CAUSE_POST_SCRUB_OOB_STORAGE_INVENTORY_FAILED = "post-scrub-oob-storage-inventory-failed" CAUSE_POST_SET_KEY_RING_LOCAL_FAILED = "post-set-key-ring-local-failed" CAUSE_POST_SET_KEY_RING_PEER_FAILED = "post-set-key-ring-peer-failed" CAUSE_POWER_BUDGET_UNAVAILABLE = "power-budget-unavailable" CAUSE_POWER_BUTTON_LOCK_CONFIG_FAILED = "power-button-lock-config-failed" CAUSE_POWER_CAP_FAIL = "power-cap-fail" CAUSE_POWER_CONSUMPTION_HIT_LIMIT = "power-consumption-hit-limit" CAUSE_POWER_CYCLE_BOARD_FAILED = "power-cycle-board-failed" CAUSE_POWER_CYCLE_FAILED = "power-cycle-failed" CAUSE_POWER_DEPLOY_WAIT_FAILED = "power-deploy-wait-failed" CAUSE_POWER_DOWN = "power-down" CAUSE_POWER_OFF_FAILED = "power-off-failed" CAUSE_POWER_OFF_RECLAIM_FAILED = "power-off-reclaim-failed" CAUSE_POWER_OFF_SERVERS_FAILED = "power-off-servers-failed" CAUSE_POWER_OFF_WAIT_FAILED = "power-off-wait-failed" CAUSE_POWER_ON_FAILED = "power-on-failed" CAUSE_POWER_ON_PRE_CONFIG_FAILED = "power-on-pre-config-failed" CAUSE_POWER_ON_SERVERS_FAILED = "power-on-servers-failed" CAUSE_POWER_ON_WAIT_FAILED = "power-on-wait-failed" CAUSE_POWER_PROBLEM = "power-problem" CAUSE_POWERED_OFF = "powered-off" CAUSE_PRE_SANITIZE_FAILED = "pre-sanitize-failed" CAUSE_PRECLEANUP_PORT_CONFIG_FAILED = "precleanup-port-config-failed" CAUSE_PRECONFIG_VMEDIA_LOCAL_FAILED = "preconfig-vmedia-local-failed" CAUSE_PRECONFIG_VMEDIA_PEER_FAILED = "preconfig-vmedia-peer-failed" CAUSE_PREPARE_FOR_BOOT_FAILED = "prepare-for-boot-failed" CAUSE_PREPARE_FOR_UPDATE_FAILED = "prepare-for-update-failed" CAUSE_PRIMARY_FAILED = "primary-failed" CAUSE_PRIMARY_VLAN_MISSING_FOR_COMMUNITY = "primary-vlan-missing-for-community" CAUSE_PRIMARY_VLAN_MISSING_FOR_ISOLATED = "primary-vlan-missing-for-isolated" CAUSE_PROFILE_CONFIG_INCORRECT = "profile-config-incorrect" CAUSE_PROPOGATE_EP_SETTINGS_FAILED = "propogate-ep-settings-failed" CAUSE_PROPOGATE_EP_TIME_ZONE_SETTINGS_LOCAL_FAILED = "propogate-ep-time-zone-settings-local-failed" CAUSE_PROPOGATE_EP_TIME_ZONE_SETTINGS_PEER_FAILED = "propogate-ep-time-zone-settings-peer-failed" CAUSE_PROPOGATE_EP_TIME_ZONE_SETTINGS_TO_ADAPTORS_LOCAL_FAILED = "propogate-ep-time-zone-settings-to-adaptors-local-failed" CAUSE_PROPOGATE_EP_TIME_ZONE_SETTINGS_TO_ADAPTORS_PEER_FAILED = "propogate-ep-time-zone-settings-to-adaptors-peer-failed" CAUSE_PROPOGATE_EP_TIME_ZONE_SETTINGS_TO_FEX_IOM_LOCAL_FAILED = "propogate-ep-time-zone-settings-to-fex-iom-local-failed" CAUSE_PROPOGATE_EP_TIME_ZONE_SETTINGS_TO_FEX_IOM_PEER_FAILED = "propogate-ep-time-zone-settings-to-fex-iom-peer-failed" CAUSE_PROVIDER_GROUP_ALREADY_EXISTS = "provider-group-already-exists" CAUSE_PROVIDER_GROUP_SIZE_EMPTY = "provider-group-size-empty" CAUSE_PROVISION_STORAGE_FAILED = "provision-storage-failed" CAUSE_PSU_INSUFFICIENT = "psu-insufficient" CAUSE_PSU_MIXED_MODE = "psu-mixed-mode" CAUSE_PSU_REDUNDANCY_FAIL = "psu-redundancy-fail" CAUSE_PVLIF_VLAN_MBR_EXHAUSTED = "pvlif-vlan-mbr-exhausted" CAUSE_PVSYSTEM_EXHAUSTED = "pvsystem-exhausted" CAUSE_READ_SM_BIOS_FAILED = "read-sm-bios-failed" CAUSE_READ_SMBIOS_FAILED = "read-smbios-failed" CAUSE_RECONFIG_BIOS_FAILED = "reconfig-bios-failed" CAUSE_RECONFIG_UUID_FAILED = "reconfig-uuid-failed" CAUSE_REFERENCED_REMOTE_VLAN_UNRESOLVABLE = "referenced-remote-vlan-unresolvable" CAUSE_REFERENCED_REMOTE_VSAN_UNRESOLVABLE = "referenced-remote-vsan-unresolvable" CAUSE_REFERENCED_VLAN_UNRESOLVABLE = "referenced-vlan-unresolvable" CAUSE_REFERENCED_VSAN_UNRESOLVABLE = "referenced-vsan-unresolvable" CAUSE_REGISTER_CLIENT_FAILED = "register-client-failed" CAUSE_RELEASE_ALL_FAILED = "release-all-failed" CAUSE_RELEASE_FAILED = "release-failed" CAUSE_RELEASE_MANY_FAILED = "release-many-failed" CAUSE_REMOTE_FAILED = "remote-failed" CAUSE_REMOVE_FAILED = "remove-failed" CAUSE_REMOVE_LOCAL_FAILED = "remove-local-failed" CAUSE_REMOVE_PEER_FAILED = "remove-peer-failed" CAUSE_REPLICATION_FAILURE = "replication-failure" CAUSE_REPORT_ERROR_FAILED = "report-error-failed" CAUSE_REPORT_FAILED = "report-failed" CAUSE_REPORT_FAULT_INVENTORY_FAILED = "report-fault-inventory-failed" CAUSE_REPORT_ORG_INVENTORY_FAILED = "report-org-inventory-failed" CAUSE_REPORT_PHYSICAL_INVENTORY_FAILED = "report-physical-inventory-failed" CAUSE_REPORT_RESULTS_FAILED = "report-results-failed" CAUSE_REPORT_STORAGE_INVENTORY_FAILED = "report-storage-inventory-failed" CAUSE_REQUEST_FAILED = "request-failed" CAUSE_RESCAN_IMAGES_FAILED = "rescan-images-failed" CAUSE_RESET_CIMC_FAILED = "reset-cimc-failed" CAUSE_RESET_FAILED = "reset-failed" CAUSE_RESET_LOCAL_FAILED = "reset-local-failed" CAUSE_RESET_REMOTE_FAILED = "reset-remote-failed" CAUSE_RESET_SAS_EXPANDER_FAILED = "reset-sas-expander-failed" CAUSE_RESET_SECURE_BOOT_CONFIG_FAILED = "reset-secure-boot-config-failed" CAUSE_RESETIBMC_FAILED = "resetibmc-failed" CAUSE_RESOLVE_ALL_FAILED = "resolve-all-failed" CAUSE_RESOLVE_BOOT_CONFIG_FAILED = "resolve-boot-config-failed" CAUSE_RESOLVE_DEFAULT_IDENTIFIERS_FAILED = "resolve-default-identifiers-failed" CAUSE_RESOLVE_DISTRIBUTABLE_FAILED = "resolve-distributable-failed" CAUSE_RESOLVE_DISTRIBUTABLE_NAMES_FAILED = "resolve-distributable-names-failed" CAUSE_RESOLVE_FAILED = "resolve-failed" CAUSE_RESOLVE_FROM_OPS_MGR_FAILED = "resolve-from-ops-mgr-failed" CAUSE_RESOLVE_FROM_POLICY_MGR_FAILED = "resolve-from-policy-mgr-failed" CAUSE_RESOLVE_IDENTIFIERS_FAILED = "resolve-identifiers-failed" CAUSE_RESOLVE_IMAGES_FAILED = "resolve-images-failed" CAUSE_RESOLVE_MANY_FAILED = "resolve-many-failed" CAUSE_RESOLVE_NETWORK_POLICIES_FAILED = "resolve-network-policies-failed" CAUSE_RESOLVE_NETWORK_TEMPLATES_FAILED = "resolve-network-templates-failed" CAUSE_RESOLVE_POLICIES_FAILED = "resolve-policies-failed" CAUSE_RESOLVE_SCHEDULE_FAILED = "resolve-schedule-failed" CAUSE_RESOLVE_STORAGE_SCHEDULE_FAILED = "resolve-storage-schedule-failed" CAUSE_RESTORE_VD_STATUS_FAILED = "restore-vd-status-failed" CAUSE_ROLE_CONFIG_ERROR = "role-config-error" CAUSE_RUN_TESTS_FAILED = "run-tests-failed" CAUSE_SANITIZE_FAILED = "sanitize-failed" CAUSE_SAS_EXPANDER_CONFIG_FAILED = "sas-expander-config-failed" CAUSE_SAS_EXPANDER_IMG_UPDATE_FAILED = "sas-expander-img-update-failed" CAUSE_SATELLITE_CONNECTION_ABSENT = "satellite-connection-absent" CAUSE_SATELLITE_CONNECTION_INIT = "satellite-connection-init" CAUSE_SATELLITE_MIS_CONNECTED = "satellite-mis-connected" CAUSE_SECONDARY_FAILED = "secondary-failed" CAUSE_SEND_BMC_PROFILING_DONE_FAILED = "send-bmc-profiling-done-failed" CAUSE_SEND_BMC_PROFILING_INIT_FAILED = "send-bmc-profiling-init-failed" CAUSE_SERIAL_DEBUG_CONNECT_FAILED = "serial-debug-connect-failed" CAUSE_SERIAL_DEBUG_DISCONNECT_FAILED = "serial-debug-disconnect-failed" CAUSE_SERIAL_DEBUG_PNUOSCONNECT_FAILED = "serial-debug-pnuosconnect-failed" CAUSE_SERIAL_DEBUG_PNUOSDISCONNECT_FAILED = "serial-debug-pnuosdisconnect-failed" CAUSE_SERVER_ASSIGNED = "server-assigned" CAUSE_SERVER_ASSOCIATED = "server-associated" CAUSE_SERVER_ASSOCIATING = "server-associating" CAUSE_SERVER_DEASSOCIATING = "server-deassociating" CAUSE_SERVER_ERROR = "server-error" CAUSE_SERVER_FAILED = "server-failed" CAUSE_SERVER_IDENTIFICATION_PROBLEM = "server-identification-problem" CAUSE_SERVER_INACCESSIBLE = "server-inaccessible" CAUSE_SERVER_MOVED = "server-moved" CAUSE_SERVER_POWER_OFF_FAILED = "server-power-off-failed" CAUSE_SERVER_POWER_ON_FAILED = "server-power-on-failed" CAUSE_SERVER_UNASSIGNED = "server-unassigned" CAUSE_SERVER_UNASSOCIATED = "server-unassociated" CAUSE_SERVERS_POWER_OFF_COMPLETION_FAILED = "servers-power-off-completion-failed" CAUSE_SET_EP_AFAILED = "set-ep-afailed" CAUSE_SET_EP_BFAILED = "set-ep-bfailed" CAUSE_SET_EP_LOCAL_FAILED = "set-ep-local-failed" CAUSE_SET_EP_PEER_FAILED = "set-ep-peer-failed" CAUSE_SET_KEY_RING_LOCAL_FAILED = "set-key-ring-local-failed" CAUSE_SET_KEY_RING_PEER_FAILED = "set-key-ring-peer-failed" CAUSE_SET_LOCAL_FAILED = "set-local-failed" CAUSE_SET_PEER_FAILED = "set-peer-failed" CAUSE_SET_REALM_LOCAL_FAILED = "set-realm-local-failed" CAUSE_SET_REALM_PEER_FAILED = "set-realm-peer-failed" CAUSE_SET_USER_LOCAL_FAILED = "set-user-local-failed" CAUSE_SET_USER_PEER_FAILED = "set-user-peer-failed" CAUSE_SETUP_BOOT_ENVIRONMENT_FAILED = "setup-boot-environment-failed" CAUSE_SETUP_VMEDIA_FAILED = "setup-vmedia-failed" CAUSE_SETUP_VMEDIA_LOCAL_FAILED = "setup-vmedia-local-failed" CAUSE_SETUP_VMEDIA_PEER_FAILED = "setup-vmedia-peer-failed" CAUSE_SHARED_COMPONENTS_OOB_INVENTORY_FAILED = "shared-components-oob-inventory-failed" CAUSE_SHARED_COMPONENTS_OOB_INVENTORY_PEER_FAILED = "shared-components-oob-inventory-peer-failed" CAUSE_SHAREDIOMODULE_INVENTORY_FAILED = "sharediomodule-inventory-failed" CAUSE_SHUTDOWN_FAILED = "shutdown-failed" CAUSE_SLOW_DRAIN_RECOVERY_FAILURE = "slow-drain-recovery-failure" CAUSE_SNMP_CONFIG_ERROR = "snmp-config-error" CAUSE_SNMP_USER_CONFIG_ERROR = "snmp-user-config-error" CAUSE_SOFT_SHUTDOWN_FAILED = "soft-shutdown-failed" CAUSE_SOL_REDIRECT_DISABLE_FAILED = "sol-redirect-disable-failed" CAUSE_SOL_REDIRECT_ENABLE_FAILED = "sol-redirect-enable-failed" CAUSE_STANDBYCMCVLAN_CFG_FAILED = "standbycmcvlan-cfg-failed" CAUSE_START_FAILED = "start-failed" CAUSE_STOPVMEDIA_LOCAL_FAILED = "stopvmedia-local-failed" CAUSE_STOPVMEDIA_PEER_FAILED = "stopvmedia-peer-failed" CAUSE_STORAGE_CTLR_IMG_UPDATE_FAILED = "storage-ctlr-img-update-failed" CAUSE_STORAGE_INVENTORY_FAILED = "storage-inventory-failed" CAUSE_SUCCESS_FAILED = "success-failed" CAUSE_SUPPRESS_STATUS_CHANGE = "suppress-status-change" CAUSE_SUSPEND_MODE_ENTERED = "suspend-mode-entered" CAUSE_SVNIC_NOT_PRESENT = "svnic-not-present" CAUSE_SW_CONFIG_HOSTOSLOCAL_FAILED = "sw-config-hostoslocal-failed" CAUSE_SW_CONFIG_HOSTOSPEER_FAILED = "sw-config-hostospeer-failed" CAUSE_SW_CONFIG_LOCAL_FAILED = "sw-config-local-failed" CAUSE_SW_CONFIG_PEER_FAILED = "sw-config-peer-failed" CAUSE_SW_CONFIG_PNUOSLOCAL_FAILED = "sw-config-pnuoslocal-failed" CAUSE_SW_CONFIG_PNUOSPEER_FAILED = "sw-config-pnuospeer-failed" CAUSE_SW_CONFIG_PORT_NIV_LOCAL_FAILED = "sw-config-port-niv-local-failed" CAUSE_SW_CONFIG_PORT_NIV_PEER_FAILED = "sw-config-port-niv-peer-failed" CAUSE_SW_CONFIG_SERVICE_INFRA_LOCAL_FAILED = "sw-config-service-infra-local-failed" CAUSE_SW_CONFIG_SERVICE_INFRA_PEER_FAILED = "sw-config-service-infra-peer-failed" CAUSE_SW_CONFIGURE_CONN_LOCAL_FAILED = "sw-configure-conn-local-failed" CAUSE_SW_CONFIGURE_CONN_PEER_FAILED = "sw-configure-conn-peer-failed" CAUSE_SW_CONFIGURE_PORT_CHANNEL_LOCAL_FAILED = "sw-configure-port-channel-local-failed" CAUSE_SW_CONFIGURE_PORT_CHANNEL_PEER_FAILED = "sw-configure-port-channel-peer-failed" CAUSE_SW_HOSTOSCONFIGURE_PORT_CHANNEL_LOCAL_FAILED = "sw-hostosconfigure-port-channel-local-failed" CAUSE_SW_HOSTOSCONFIGURE_PORT_CHANNEL_PEER_FAILED = "sw-hostosconfigure-port-channel-peer-failed" CAUSE_SW_HOSTOSMULTI_PORT_CONNECTIVITY_LOCAL_FAILED = "sw-hostosmulti-port-connectivity-local-failed" CAUSE_SW_HOSTOSMULTI_PORT_CONNECTIVITY_PEER_FAILED = "sw-hostosmulti-port-connectivity-peer-failed" CAUSE_SW_PNUOSCONNECTIVITY_LOCAL_FAILED = "sw-pnuosconnectivity-local-failed" CAUSE_SW_PNUOSCONNECTIVITY_PEER_FAILED = "sw-pnuosconnectivity-peer-failed" CAUSE_SW_PORT_DETAILS_LOCAL_FAILED = "sw-port-details-local-failed" CAUSE_SW_PORT_DETAILS_PEER_FAILED = "sw-port-details-peer-failed" CAUSE_SW_UN_CONFIG_LOCAL_FAILED = "sw-un-config-local-failed" CAUSE_SW_UN_CONFIG_PEER_FAILED = "sw-un-config-peer-failed" CAUSE_SW_UNCONFIG_HOSTOSLOCAL_FAILED = "sw-unconfig-hostoslocal-failed" CAUSE_SW_UNCONFIG_HOSTOSPEER_FAILED = "sw-unconfig-hostospeer-failed" CAUSE_SW_UNCONFIG_PNUOSLOCAL_FAILED = "sw-unconfig-pnuoslocal-failed" CAUSE_SW_UNCONFIG_PNUOSPEER_FAILED = "sw-unconfig-pnuospeer-failed" CAUSE_SW_UNCONFIG_PORT_NIV_LOCAL_FAILED = "sw-unconfig-port-niv-local-failed" CAUSE_SW_UNCONFIG_PORT_NIV_PEER_FAILED = "sw-unconfig-port-niv-peer-failed" CAUSE_SW_UNCONFIGURE_LOCAL_FAILED = "sw-unconfigure-local-failed" CAUSE_SW_UNCONFIGURE_PEER_FAILED = "sw-unconfigure-peer-failed" CAUSE_SWITCH_FAILED = "switch-failed" CAUSE_SYNC_BLADEAGLOCAL_FAILED = "sync-bladeaglocal-failed" CAUSE_SYNC_BLADEAGREMOTE_FAILED = "sync-bladeagremote-failed" CAUSE_SYNC_FAILED = "sync-failed" CAUSE_SYNC_HOSTAGENTAGLOCAL_FAILED = "sync-hostagentaglocal-failed" CAUSE_SYNC_HOSTAGENTAGREMOTE_FAILED = "sync-hostagentagremote-failed" CAUSE_SYNC_NICAGLOCAL_FAILED = "sync-nicaglocal-failed" CAUSE_SYNC_NICAGREMOTE_FAILED = "sync-nicagremote-failed" CAUSE_SYNC_PORTAGLOCAL_FAILED = "sync-portaglocal-failed" CAUSE_SYNC_PORTAGREMOTE_FAILED = "sync-portagremote-failed" CAUSE_SYNC_POWER_STATE_FAILED = "sync-power-state-failed" CAUSE_TEAR_DOWN_BOOT_ENVIRONMENT_FAILED = "tear-down-boot-environment-failed" CAUSE_TEAR_DOWNVMEDIA_LOCAL_FAILED = "tear-downvmedia-local-failed" CAUSE_TEAR_DOWNVMEDIA_PEER_FAILED = "tear-downvmedia-peer-failed" CAUSE_TEARDOWN_VMEDIA_LOCAL_FAILED = "teardown-vmedia-local-failed" CAUSE_TEARDOWN_VMEDIA_PEER_FAILED = "teardown-vmedia-peer-failed" CAUSE_TFTP_SERVER_ERROR = "tftp-server-error" CAUSE_THERMAL_PROBLEM = "thermal-problem" CAUSE_THRESHOLD_CROSSED = "threshold-crossed" CAUSE_TIMEZONE_FILE_NOT_EXISTS = "timezone-file-not-exists" CAUSE_TPM_MISMATCH = "tpm-mismatch" CAUSE_TPM_ON_SLAVE_BOARD = "tpm-on-slave-board" CAUSE_TRANSCEIVER_MISMATCH = "transceiver-mismatch" CAUSE_TRANSITION = "transition" CAUSE_UCSM_PROCESS_FAILURE = "ucsm-process-failure" CAUSE_UDLD_LINK_DOWN = "udld-link-down" CAUSE_UN_IDENTIFY_LOCAL_FAILED = "un-identify-local-failed" CAUSE_UN_IDENTIFY_PEER_FAILED = "un-identify-peer-failed" CAUSE_UNASSOCIATED = "unassociated" CAUSE_UNCLAIMED_DEVICE = "unclaimed-device" CAUSE_UNCONFIG_BIOS_FAILED = "unconfig-bios-failed" CAUSE_UNCONFIG_CIMCVMEDIA_FAILED = "unconfig-cimcvmedia-failed" CAUSE_UNCONFIG_EXT_MGMT_GW_FAILED = "unconfig-ext-mgmt-gw-failed" CAUSE_UNCONFIG_EXT_MGMT_RULES_FAILED = "unconfig-ext-mgmt-rules-failed" CAUSE_UNCONFIG_FLEX_FLASH_FAILED = "unconfig-flex-flash-failed" CAUSE_UNCONFIG_SERVER_IDENTITY_FAILED = "unconfig-server-identity-failed" CAUSE_UNCONFIG_SO_LFAILED = "unconfig-so-lfailed" CAUSE_UNCONFIG_UUID_FAILED = "unconfig-uuid-failed" CAUSE_UNCONFIG_VMEDIA_FAILED = "unconfig-vmedia-failed" CAUSE_UNCONFIGURATION_IN_PROGRESS = "unconfiguration-in-progress" CAUSE_UNDER_TEST = "under-test" CAUSE_UNEXPECTED_NUMBER_OF_LINKS = "unexpected-number-of-links" CAUSE_UNICAST_MAC_EXHAUSTED = "unicast-mac-exhausted" CAUSE_UNIDENTIFIABLE_FRU = "unidentifiable-fru" CAUSE_UNKNOWN = "unknown" CAUSE_UNLOCK_FIRMWARE_IMAGE_FAILED = "unlock-firmware-image-failed" CAUSE_UNMOUNT_LOCAL_FAILED = "unmount-local-failed" CAUSE_UNMOUNT_PEER_FAILED = "unmount-peer-failed" CAUSE_UNPACK_LOCAL_FAILED = "unpack-local-failed" CAUSE_UNREGISTER_FAILED = "unregister-failed" CAUSE_UNSECURE_ADAPTOR = "unsecure-adaptor" CAUSE_UNSUPPORTED_CIMC_FIRMWARE = "unsupported-cimc-firmware" CAUSE_UNSUPPORTED_CONFIG = "unsupported-config" CAUSE_UNSUPPORTED_CONNECTIVITY = "unsupported-connectivity" CAUSE_UNSUPPORTED_CONNECTIVITY_CONFIGURATION = "unsupported-connectivity-configuration" CAUSE_UNSUPPORTED_POLICY_CONFIG = "unsupported-policy-config" CAUSE_UNSUPPORTED_TRANSCEIVER = "unsupported-transceiver" CAUSE_UPDATE_ADAPTOR_FAILED = "update-adaptor-failed" CAUSE_UPDATE_ADAPTOR_NW_FW_LOCAL_FAILED = "update-adaptor-nw-fw-local-failed" CAUSE_UPDATE_ADAPTOR_NW_FW_PEER_FAILED = "update-adaptor-nw-fw-peer-failed" CAUSE_UPDATE_BIOS_REQUEST_FAILED = "update-bios-request-failed" CAUSE_UPDATE_BOARD_CTRL_REQUEST_FAILED = "update-board-ctrl-request-failed" CAUSE_UPDATE_CMC_FAILED = "update-cmc-failed" CAUSE_UPDATE_CONNECTIVITY_FAILED = "update-connectivity-failed" CAUSE_UPDATE_ETH_FLOW_MON_FAILED = "update-eth-flow-mon-failed" CAUSE_UPDATE_ETH_MON_FAILED = "update-eth-mon-failed" CAUSE_UPDATE_FAILED = "update-failed" CAUSE_UPDATE_FC_MON_FAILED = "update-fc-mon-failed" CAUSE_UPDATE_FLASH_LIFE_FAILED = "update-flash-life-failed" CAUSE_UPDATE_LOCAL_FAILED = "update-local-failed" CAUSE_UPDATE_REMOTE_FAILED = "update-remote-failed" CAUSE_UPDATE_REQUEST_FAILED = "update-request-failed" CAUSE_UPDATE_REQUEST_LOCAL_FAILED = "update-request-local-failed" CAUSE_UPDATE_REQUEST_PEER_FAILED = "update-request-peer-failed" CAUSE_UPDATE_SAS_EXPANDER_FAILED = "update-sas-expander-failed" CAUSE_UPDATE_SP_LOCAL_FAILED = "update-sp-local-failed" CAUSE_UPDATE_SP_REMOTE_FAILED = "update-sp-remote-failed" CAUSE_UPDATE_STORAGE_INVCIMC_FAILED = "update-storage-invcimc-failed" CAUSE_UPDATE_STORAGE_INVCMC_FAILED = "update-storage-invcmc-failed" CAUSE_UPDATE_TOKENS_FAILED = "update-tokens-failed" CAUSE_UPDATE_VLAN_GROUPS_FAILED = "update-vlan-groups-failed" CAUSE_UPDATE_ZONES_FAILED = "update-zones-failed" CAUSE_UPDATEIBMCFW_FAILED = "updateibmcfw-failed" CAUSE_UPDATEIOM_FAILED = "updateiom-failed" CAUSE_UPLOAD_FAILED = "upload-failed" CAUSE_USER_CONFIG_ERROR = "user-config-error" CAUSE_USER_LOCALE_CONFIG_ERROR = "user-locale-config-error" CAUSE_USER_ROLE_CONFIG_ERROR = "user-role-config-error" CAUSE_VALIDATE_CONFIGURATION_FAILED = "validate-configuration-failed" CAUSE_VALIDATE_LOCAL_FAILED = "validate-local-failed" CAUSE_VALIDATE_POLICY_OWNERSHIP_FAILED = "validate-policy-ownership-failed" CAUSE_VALIDATE_REMOTE_FAILED = "validate-remote-failed" CAUSE_VALIDATE_REMOVAL_FAILED = "validate-removal-failed" CAUSE_VERIFY_BREAKOUT_CONFIG_FAILED = "verify-breakout-config-failed" CAUSE_VERIFY_FAILED = "verify-failed" CAUSE_VERIFY_FC_ZONE_CONFIG_FAILED = "verify-fc-zone-config-failed" CAUSE_VERIFY_GUID_FAILED = "verify-guid-failed" CAUSE_VERIFY_LOCAL_FAILED = "verify-local-failed" CAUSE_VERIFY_PHYS_CONFIG_FAILED = "verify-phys-config-failed" CAUSE_VERIFY_REGISTRATION_FAILED = "verify-registration-failed" CAUSE_VERIFY_REMOTE_FAILED = "verify-remote-failed" CAUSE_VERIFY_USER_ZONE_CONFIG_FAILED = "verify-user-zone-config-failed" CAUSE_VERSION_INCOMPATIBLE = "version-incompatible" CAUSE_VERSION_HOLDER_CHANGE = "versionHolderChange" CAUSE_VHBA_NOT_SUPPORTED = "vhba-not-supported" CAUSE_VIF_DOWN = "vif-down" CAUSE_VIF_IDS_MISMATCH = "vif-ids-mismatch" CAUSE_VLAN_COMP_GRP_COUNT_EXCEEDS_LIMIT = "vlan-comp-grp-count-exceeds-limit" CAUSE_VLAN_COMPRESSION = "vlan-compression" CAUSE_VLAN_CONFLICT_PERMIT = "vlan-conflict-permit" CAUSE_VLAN_ERROR_ASSOC_PRIMARY = "vlan-error-assoc-primary" CAUSE_VLAN_MCAST_POLICY_MISCONFIGURED = "vlan-mcast-policy-misconfigured" CAUSE_VLAN_MISCONFIGURED = "vlan-misconfigured" CAUSE_VLAN_MISMATCH = "vlan-mismatch" CAUSE_VLAN_PERMIT_UNRESOLVED = "vlan-permit-unresolved" CAUSE_VM_NETWORK_REFERENCE_INCORRECT = "vm-network-reference-incorrect" CAUSE_VMEDIA_MOUNT_INACCESSIBLE = "vmedia-mount-inaccessible" CAUSE_VOLTAGE_PROBLEM = "voltage-problem" CAUSE_VSAN_EXCEED_LIMIT = "vsan-exceed-limit" CAUSE_VSAN_MISCONFIGURED = "vsan-misconfigured" CAUSE_WAIT_BEFORE_INSTALLATION_FAILED = "wait-before-installation-failed" CAUSE_WAIT_FAILED = "wait-failed" CAUSE_WAIT_FOR_ACK_FAILED = "wait-for-ack-failed" CAUSE_WAIT_FOR_ACTIVATION_FAILED = "wait-for-activation-failed" CAUSE_WAIT_FOR_ADAPTOR_NW_FW_UPDATE_LOCAL_FAILED = "wait-for-adaptor-nw-fw-update-local-failed" CAUSE_WAIT_FOR_ADAPTOR_NW_FW_UPDATE_PEER_FAILED = "wait-for-adaptor-nw-fw-update-peer-failed" CAUSE_WAIT_FOR_ASSOC_COMPLETION_FAILED = "wait-for-assoc-completion-failed" CAUSE_WAIT_FOR_BORDER_CONFIG_COMPLETION_LOCAL_FAILED = "wait-for-border-config-completion-local-failed" CAUSE_WAIT_FOR_BORDER_CONFIG_COMPLETION_PEER_FAILED = "wait-for-border-config-completion-peer-failed" CAUSE_WAIT_FOR_COMMIT_STORAGE_FAILED = "wait-for-commit-storage-failed" CAUSE_WAIT_FOR_CONN_READY_FAILED = "wait-for-conn-ready-failed" CAUSE_WAIT_FOR_DEBUG_FAILED = "wait-for-debug-failed" CAUSE_WAIT_FOR_DEPLOY_FAILED = "wait-for-deploy-failed" CAUSE_WAIT_FOR_MAINT_PERMISSION_FAILED = "wait-for-maint-permission-failed" CAUSE_WAIT_FOR_MAINT_WINDOW_FAILED = "wait-for-maint-window-failed" CAUSE_WAIT_FOR_POWER_OFF_FAILED = "wait-for-power-off-failed" CAUSE_WAIT_FOR_STORAGE_PROVISION_FAILED = "wait-for-storage-provision-failed" CAUSE_WAIT_FOR_USER_ACK_FAILED = "wait-for-user-ack-failed" CAUSE_WAIT_FORIBMCFW_UPDATE_FAILED = "wait-foribmcfw-update-failed" CAUSE_WAIT_ON_PHYS_FAILED = "wait-on-phys-failed" CAUSE_WAIT_ON_SW_CONFIG_HOST_FAILED = "wait-on-sw-config-host-failed" TYPE_ANY = "any" TYPE_CHASSIS_PROFILE = "chassis-profile" TYPE_CONFIGURATION = "configuration" TYPE_CONNECTIVITY = "connectivity" TYPE_ENVIRONMENTAL = "environmental" TYPE_EQUIPMENT = "equipment" TYPE_FORWARD = "forward" TYPE_FSM = "fsm" TYPE_GENERIC = "generic" TYPE_MANAGEMENT = "management" TYPE_NETWORK = "network" TYPE_OPERATIONAL = "operational" TYPE_SECURITY = "security" TYPE_SERVER = "server" TYPE_SYSDEBUG = "sysdebug" class FaultSuppressPolicyItem(ManagedObject): """This is FaultSuppressPolicyItem class.""" consts = FaultSuppressPolicyItemConsts() naming_props = set(['type', 'cause']) mo_meta = MoMeta("FaultSuppressPolicyItem", "faultSuppressPolicyItem", "item-[type]-[cause]", VersionMeta.Version211a, "InputOutput", 0xff, [], ["read-only"], ['faultSuppressPolicy'], [], [None]) prop_meta = { "cause": MoPropertyMeta("cause", "cause", "string", VersionMeta.Version211a, MoPropertyMeta.NAMING, 0x2, None, None, None, ["ChassisProfile-assigned", "ChassisProfile-associated", "ChassisProfile-associating", "ChassisProfile-deassociating", "ChassisProfile-unassigned", "ChassisProfile-unassociated", "a-failed", "activate-adaptor-failed", "activate-adaptor-nw-fw-local-failed", "activate-adaptor-nw-fw-peer-failed", "activate-bios-failed", "activate-brd-ctlr-failed", "activate-catalog-failed", "activate-cmc-failed", "activate-failed", "activate-local-disk-failed", "activate-local-failed", "activate-localfi-failed", "activate-peer-failed", "activate-psu-failed", "activate-remotefi-failed", "activate-sas-expander-failed", "activate-storage-ctlr-failed", "activateibmcfw-failed", "activateiom-failed", "activateucsm-failed", "activateucsmservice-pack-failed", "activation-failed", "active-failed", "adaptor-mismatch", "analyze-impact-failed", "another-connection-already-enabled", "any", "apply-catalog-failed", "apply-config-failed", "apply-default-identifiers-failed", "apply-failed", "apply-identifiers-failed", "apply-maint-config-failed", "apply-mo-props-failed", "apply-physical-failed", "apply-policies-failed", "apply-template-failed", "arp-targets-config-error", "assert-bypass-wait-failed", "assignment-failed", "association-failed", "auto-firmware-upgrade", "b-failed", "backplane-port-problem", "backup-local-failed", "begin-failed", "begin-inventory-failed", "bios-img-update-failed", "bios-post-completion-failed", "blade-boot-pnuos-failed", "blade-boot-wait-failed", "blade-power-off-failed", "blade-power-on-failed", "blade-read-smbios-failed", "bmc-config-pnuos-failed", "bmc-configure-conn-local-failed", "bmc-configure-conn-peer-failed", "bmc-factory-reset-failed", "bmc-inventory-failed", "bmc-pre-config-pnuoslocal-failed", "bmc-pre-config-pnuospeer-failed", "bmc-preconfig-pnuoslocal-failed", "bmc-preconfig-pnuospeer-failed", "bmc-presence-failed", "bmc-shutdown-discovered-failed", "bmc-unconfig-pnuos-failed", "board-ctrl-upgraded", "boot-host-failed", "boot-pnuos-failed", "boot-wait-failed", "calculate-vlan-group-for-hostoslocal-failed", "calculate-vlan-group-for-hostospeer-failed", "callhome-config-error", "capacity-exceeded", "cartridge-moved", "certificate-empty-params", "certificate-unsupported", "chassis-intrusion", "chassis-limit-exceeded", "chassis-peer-adapter-reboot-failed", "check-adaptor-fw40gcap-failed", "check-assigned-default-identifiers-for-dup-failed", "check-assigned-identifiers-for-dup-failed", "check-inventory-status-failed", "check-license-failed", "check-power-availability-failed", "check-status-failed", "cimc-firmware-mismatch", "cimc-presence-failed", "cimcvlan-cfg-local-failed", "cimcvlan-cfg-peer-failed", "ciscoosopen-gate-failed", "clean-old-data-failed", "clean-upvifs-failed", "cleanup-entries-failed", "cleanup-failed", "cleanup-local-failed", "cleanup-nic-config-local-failed", "cleanup-nic-config-peer-failed", "cleanup-peer-failed", "cleanup-port-config-local-failed", "cleanup-port-config-peer-failed", "cleanup-vnics-local-failed", "cleanup-vnics-peer-failed", "cleanupcimc-failed", "clear-bios-update-failed", "clear-failed", "client-lost-connectivity", "cmc-vif-down", "cmcvlan-cfg-failed", "cmcvlan-cfg-peer-failed", "comm-svc-config-error", "commit-storage-failed", "complete-failed", "compr-sets-exhausted", "condition-cause-configuration-failure", "condition-cause-fault", "condition-cause-hardware-inventory-mismatch", "condition-cause-kernel-mem-critical-threshold", "condition-cause-pci-config-mismatch", "condition-cause-persistent-memory-detection", "config-backup-outdated", "config-bios-failed", "config-chassis-adapter-connectivity-failed", "config-chassis-id-failed", "config-cimcvmedia-failed", "config-discovery-mode-failed", "config-error", "config-ext-mgmt-gw-failed", "config-ext-mgmt-rules-failed", "config-failed", "config-fan-speed-failed", "config-fe-local-failed", "config-fe-peer-failed", "config-flex-flash-failed", "config-flex-flash-scrub-failed", "config-host-os-annotations-failed", "config-kvm-mgmt-default-setting-failed", "config-memory-policy-failed", "config-mgmt-ip-rules-failed", "config-mismatch", "config-missing", "config-niv-mode-failed", "config-problem", "config-server-identity-failed", "config-so-lfailed", "config-sw-afailed", "config-sw-bfailed", "config-switch-local-failed", "config-switch-peer-failed", "config-user-access-failed", "config-uuid-failed", "configbmcpower-params-failed", "configuration-applied", "configuration-applying", "configuration-error", "configuration-failed", "configuration-failure", "configuration-in-progress", "configuration-mismatch", "configuration-not-applied", "configure-end-point-failed", "configure-failed", "configure-sw-mgmt-end-point-failed", "configure-vif-ns-failed", "connection-unused", "connectivity-problem", "copy-all-images-to-peer-failed", "copy-cat-from-rep-failed", "copy-external-rep-to-remote-failed", "copy-img-from-rep-failed", "copy-primary-failed", "copy-remote-failed", "copy-sub-failed", "copyiomimg-to-sub-failed", "create-local-failed", "create-remote-failed", "deassert-reset-bypass-failed", "decomission-failed", "decommissioned", "default-hostpack-missing", "default-hostpack-missing-versions", "defaultauth-config-error", "delete-all-mo-refs-failed", "delete-curl-downloaded-images-failed", "delete-images-remote-failed", "delete-local-failed", "delete-primary-failed", "delete-remote-failed", "delete-sub-failed", "deploy-failed", "deprecated", "device-shared-storage-IO-error", "device-shared-storage-error", "disable-afailed", "disable-bfailed", "disable-end-point-failed", "disable-failed", "disable-scriptablevmedia-failed", "disassociation-failed", "discover-chassis-failed", "discover-sas-expander-failed", "discovery-failed", "discovery-in-progress", "disk-zoning-config-failed", "domain-config-error", "download-images-failed", "download-local-failed", "duplicated-assigned", "dvif-exhausted", "election-failure", "empty-pin-group", "empty-pool", "enable-afailed", "enable-bfailed", "enable-chassis-failed", "enable-failed", "enable-port-failed", "end-inventory-failed", "equipment-accessibility-problem", "equipment-config-error", "equipment-config-not-matching", "equipment-degraded", "equipment-deprecated", "equipment-disabled", "equipment-disconnected", "equipment-failed", "equipment-fru-missing", "equipment-hddslot-server2-ownership-unassigned", "equipment-hotspare-unsupported", "equipment-inaccessible", "equipment-inoperable", "equipment-inventory", "equipment-ioe-ownership-unassigned", "equipment-link-degraded", "equipment-link-misconnect", "equipment-missing", "equipment-namespace-not-matching", "equipment-non-optimal", "equipment-offline", "equipment-ownership-unsupported", "equipment-problem", "equipment-removed", "equipment-second-controller-absent", "equipment-unacknowledged", "equipment-unavailable", "equipment-unhealthy", "equipped-unsupported", "estimate-apply-config-failed", "evaluate-association-failed", "evaluate-status-failed", "execute-afailed", "execute-bfailed", "execute-failed", "execute-local-failed", "execute-peer-failed", "executepmaction-failed", "executevdaction-failed", "extra-primary-vlans", "extra-secondary-vlans", "extra-secondary-vlans-per-primary", "extra-vif", "fab-evac-off-remotefi-failed", "fab-evac-on-remotefi-failed", "fabric-evacuated", "fail-failed", "fail-over-to-remotefi-failed", "fan-removal", "fault", "fc-portchannel-members-inconsistent-speed", "fc-storageport-npv-mode", "fc-zoning-enabled", "fcoe-storageport-npv-mode", "fcoe-uplink-port-channel-unsupported-fi-settings", "fcoe-uplink-unsupported-fi-settings", "fex-unsupported", "fi-b-querier-ip-empty-or-same-as-primary", "file-transfer-failed", "finalize-failed", "firmware-upgrade-problem", "format-failed", "fru-problem", "fsm-failed", "full-inventory-failed", "get-version-failed", "graphics-image-update-failed", "group-cap-insufficient", "group-permit-unresolved", "ha-not-ready", "ha-ssh-keys-mismatched", "hag-connect-failed", "hag-disconnect-failed", "hag-hostosconnect-failed", "hag-pnuosconnect-failed", "hag-pnuosdisconnect-failed", "handle-pooling-failed", "hardware-inventory-mismatch", "hardware-mismatch", "hba-img-update-failed", "health-critical", "health-info", "health-led-amber", "health-led-amber-blinking", "health-major", "health-minor", "health-warning", "hostosconfig-failed", "hostosconnect-failed", "hostosident-failed", "hostospolicy-failed", "hostosvalidate-failed", "identify-failed", "identity-unestablishable", "iftmc-pv-exhausted", "igmp-group-exhausted", "image-cannot-boot", "image-corrupted", "image-deleted", "image-unusable", "in-maintenance", "inaccessible-vlan-referenced", "inband-unsupported-server", "incompatible-server-firmware", "incompatible-speed", "init-iptables-local-failed", "init-iptables-peer-failed", "inoperable", "insufficient-resources", "insufficiently-equipped", "interface-failed", "interface-misconfigured", "internal-backup-failed", "invalid-keyring-certificate", "invalid-keyring-modulus", "invalid-pinning", "invalid-server-group", "invalid-target", "invalid-trustpoint-cert-chain", "invalid-vlan-in-the-allowed-vlan-list", "inventory-failed", "kernel-mem-critical-threshold", "keyring-config-error", "kmip-cert-config-failed", "kmip-fault", "kmip-save-cert-failed", "leadershipChange", "license-file-not-deleted", "license-file-uninstallable", "license-graceperiod-10days", "license-graceperiod-119days", "license-graceperiod-30days", "license-graceperiod-60days", "license-graceperiod-90days", "license-graceperiod-entered", "license-graceperiod-expired", "license-insufficient", "limit-reached", "link-down", "link-misconnected", "link-missing", "load-catalog-failed", "local-disk-fw-update-failed", "local-failed", "local-internal-backup-failed", "locale-config-error", "locale-org-config-error", "log-capacity", "log-transfer-failed", "maintenance-failed", "management-services-failure", "management-services-unresponsive", "mark-adapter-for-reboot-failed", "max-vlan-limit-exceeded", "membership-down", "memory-error", "mgmt-db-corruption", "mgmtif-down", "missing-primary-vlan", "mount-local-failed", "mount-peer-failed", "mswitch-img-update-failed", "multicast-mac-exhausted", "multiple-connection-policies", "named-inband-vlan-unresolved", "named-policy-unresolved", "named-vlan-unresolved", "native-vlan-not-found", "ndisc-targets-config-error", "near-max-limit", "network-san-group-does-not-exist", "network-san-group-misconfigured", "new-link", "new-vnic-vcon-scheme-applied", "nic-config-hostoslocal-failed", "nic-config-hostospeer-failed", "nic-config-local-failed", "nic-config-params-hostoslocal-failed", "nic-config-params-hostospeer-failed", "nic-config-peer-failed", "nic-config-pnuoslocal-failed", "nic-config-pnuospeer-failed", "nic-config-service-infra-local-failed", "nic-config-service-infra-peer-failed", "nic-img-update-failed", "nic-inventory-local-failed", "nic-inventory-peer-failed", "nic-presence-local-failed", "nic-presence-peer-failed", "nic-un-config-local-failed", "nic-un-config-peer-failed", "nic-unconfig-hostoslocal-failed", "nic-unconfig-hostospeer-failed", "nic-unconfig-pnuoslocal-failed", "nic-unconfig-pnuospeer-failed", "nic-unconfig-service-infra-local-failed", "nic-unconfig-service-infra-peer-failed", "no-ack-from-bios", "no-cap-fail", "no-vlan-optimization", "non-existent-scheduler", "not-supported", "old-chassis-component-firmware", "old-firmware", "oob-disk-scrub-failed", "oob-poll-sas-expander-activate-status-failed", "oob-poll-sas-expander-boot-img-activate-status-failed", "oob-poll-sas-expander-update-status-failed", "oob-sas-expander-boot-img-activate-failed", "oob-sas-expander-img-activate-failed", "oob-sas-expander-img-update-failed", "oob-storage-config-failed", "oob-storage-inventory-failed", "operation-failed", "operational-state-down", "pair-failed", "pci-config-issue", "pci-config-mismatch", "pci-switch-image-update-failed", "peer-failed", "performance-problem", "persistent-memory-detection", "persistent-memory-dimm-fw-update-failed", "ping-failed", "pinning-misconfig", "pinning-mismatch", "pld-firmware-mismatch", "pnuos-boot-wait-failed", "pnuoscatalog-failed", "pnuosconfig-failed", "pnuosconn-status-failed", "pnuosconnectivity-failed", "pnuosident-failed", "pnuosinventory-failed", "pnuoslocal-disk-config-failed", "pnuosperipheral-component-config-failed", "pnuospolicy-failed", "pnuospower-profiling-failed", "pnuosscrub-failed", "pnuosself-test-failed", "pnuosunconfig-failed", "pnuosunload-drivers-failed", "pnuosvalidate-failed", "poll-activate-of-localfi-failed", "poll-activate-of-remotefi-failed", "poll-activate-ofiom-failed", "poll-activate-ofucsm-failed", "poll-activate-ofucsmservice-pack-failed", "poll-activate-status-failed", "poll-activation-failed", "poll-adaptor-activation-failed", "poll-bios-activate-status-failed", "poll-bios-update-status-failed", "poll-board-ctrl-power-cycle-failed", "poll-board-ctrl-update-status-failed", "poll-brd-ctlr-activation-failed", "poll-clear-bios-update-status-failed", "poll-clear-status-failed", "poll-cmc-activation-failed", "poll-fab-evac-off-remotefi-failed", "poll-fab-evac-on-remotefi-failed", "poll-fail-over-to-remotefi-failed", "poll-internal-backup-failed", "poll-local-disk-activate-failed", "poll-post-disk-zone-storage-invcimc-failed", "poll-sas-expander-activate-failed", "poll-sas-expander-config-failed", "poll-secure-boot-status-failed", "poll-storage-ctlr-activation-failed", "poll-update-adaptor-failed", "poll-update-cmc-failed", "poll-update-ofiom-failed", "poll-update-sas-expander-failed", "poll-update-status-failed", "poll-update-status-local-failed", "poll-update-status-peer-failed", "poll-update-storage-invcimc-failed", "poll-wait-for-user-ack-failed", "port-failed", "port-inventory-sw-afailed", "port-inventory-sw-bfailed", "port-misconfigure", "post-disk-zone-storage-invcimc-failed", "post-disk-zone-storage-invcmc-failed", "post-scrub-oob-storage-inventory-failed", "post-set-key-ring-local-failed", "post-set-key-ring-peer-failed", "power-budget-unavailable", "power-button-lock-config-failed", "power-cap-fail", "power-consumption-hit-limit", "power-cycle-board-failed", "power-cycle-failed", "power-deploy-wait-failed", "power-down", "power-off-failed", "power-off-reclaim-failed", "power-off-servers-failed", "power-off-wait-failed", "power-on-failed", "power-on-pre-config-failed", "power-on-servers-failed", "power-on-wait-failed", "power-problem", "powered-off", "pre-sanitize-failed", "precleanup-port-config-failed", "preconfig-vmedia-local-failed", "preconfig-vmedia-peer-failed", "prepare-for-boot-failed", "prepare-for-update-failed", "primary-failed", "primary-vlan-missing-for-community", "primary-vlan-missing-for-isolated", "profile-config-incorrect", "propogate-ep-settings-failed", "propogate-ep-time-zone-settings-local-failed", "propogate-ep-time-zone-settings-peer-failed", "propogate-ep-time-zone-settings-to-adaptors-local-failed", "propogate-ep-time-zone-settings-to-adaptors-peer-failed", "propogate-ep-time-zone-settings-to-fex-iom-local-failed", "propogate-ep-time-zone-settings-to-fex-iom-peer-failed", "provider-group-already-exists", "provider-group-size-empty", "provision-storage-failed", "psu-insufficient", "psu-mixed-mode", "psu-redundancy-fail", "pvlif-vlan-mbr-exhausted", "pvsystem-exhausted", "read-sm-bios-failed", "read-smbios-failed", "reconfig-bios-failed", "reconfig-uuid-failed", "referenced-remote-vlan-unresolvable", "referenced-remote-vsan-unresolvable", "referenced-vlan-unresolvable", "referenced-vsan-unresolvable", "register-client-failed", "release-all-failed", "release-failed", "release-many-failed", "remote-failed", "remove-failed", "remove-local-failed", "remove-peer-failed", "replication-failure", "report-error-failed", "report-failed", "report-fault-inventory-failed", "report-org-inventory-failed", "report-physical-inventory-failed", "report-results-failed", "report-storage-inventory-failed", "request-failed", "rescan-images-failed", "reset-cimc-failed", "reset-failed", "reset-local-failed", "reset-remote-failed", "reset-sas-expander-failed", "reset-secure-boot-config-failed", "resetibmc-failed", "resolve-all-failed", "resolve-boot-config-failed", "resolve-default-identifiers-failed", "resolve-distributable-failed", "resolve-distributable-names-failed", "resolve-failed", "resolve-from-ops-mgr-failed", "resolve-from-policy-mgr-failed", "resolve-identifiers-failed", "resolve-images-failed", "resolve-many-failed", "resolve-network-policies-failed", "resolve-network-templates-failed", "resolve-policies-failed", "resolve-schedule-failed", "resolve-storage-schedule-failed", "restore-vd-status-failed", "role-config-error", "run-tests-failed", "sanitize-failed", "sas-expander-config-failed", "sas-expander-img-update-failed", "satellite-connection-absent", "satellite-connection-init", "satellite-mis-connected", "secondary-failed", "send-bmc-profiling-done-failed", "send-bmc-profiling-init-failed", "serial-debug-connect-failed", "serial-debug-disconnect-failed", "serial-debug-pnuosconnect-failed", "serial-debug-pnuosdisconnect-failed", "server-assigned", "server-associated", "server-associating", "server-deassociating", "server-error", "server-failed", "server-identification-problem", "server-inaccessible", "server-moved", "server-power-off-failed", "server-power-on-failed", "server-unassigned", "server-unassociated", "servers-power-off-completion-failed", "set-ep-afailed", "set-ep-bfailed", "set-ep-local-failed", "set-ep-peer-failed", "set-key-ring-local-failed", "set-key-ring-peer-failed", "set-local-failed", "set-peer-failed", "set-realm-local-failed", "set-realm-peer-failed", "set-user-local-failed", "set-user-peer-failed", "setup-boot-environment-failed", "setup-vmedia-failed", "setup-vmedia-local-failed", "setup-vmedia-peer-failed", "shared-components-oob-inventory-failed", "shared-components-oob-inventory-peer-failed", "sharediomodule-inventory-failed", "shutdown-failed", "slow-drain-recovery-failure", "snmp-config-error", "snmp-user-config-error", "soft-shutdown-failed", "sol-redirect-disable-failed", "sol-redirect-enable-failed", "standbycmcvlan-cfg-failed", "start-failed", "stopvmedia-local-failed", "stopvmedia-peer-failed", "storage-ctlr-img-update-failed", "storage-inventory-failed", "success-failed", "suppress-status-change", "suspend-mode-entered", "svnic-not-present", "sw-config-hostoslocal-failed", "sw-config-hostospeer-failed", "sw-config-local-failed", "sw-config-peer-failed", "sw-config-pnuoslocal-failed", "sw-config-pnuospeer-failed", "sw-config-port-niv-local-failed", "sw-config-port-niv-peer-failed", "sw-config-service-infra-local-failed", "sw-config-service-infra-peer-failed", "sw-configure-conn-local-failed", "sw-configure-conn-peer-failed", "sw-configure-port-channel-local-failed", "sw-configure-port-channel-peer-failed", "sw-hostosconfigure-port-channel-local-failed", "sw-hostosconfigure-port-channel-peer-failed", "sw-hostosmulti-port-connectivity-local-failed", "sw-hostosmulti-port-connectivity-peer-failed", "sw-pnuosconnectivity-local-failed", "sw-pnuosconnectivity-peer-failed", "sw-port-details-local-failed", "sw-port-details-peer-failed", "sw-un-config-local-failed", "sw-un-config-peer-failed", "sw-unconfig-hostoslocal-failed", "sw-unconfig-hostospeer-failed", "sw-unconfig-pnuoslocal-failed", "sw-unconfig-pnuospeer-failed", "sw-unconfig-port-niv-local-failed", "sw-unconfig-port-niv-peer-failed", "sw-unconfigure-local-failed", "sw-unconfigure-peer-failed", "switch-failed", "sync-bladeaglocal-failed", "sync-bladeagremote-failed", "sync-failed", "sync-hostagentaglocal-failed", "sync-hostagentagremote-failed", "sync-nicaglocal-failed", "sync-nicagremote-failed", "sync-portaglocal-failed", "sync-portagremote-failed", "sync-power-state-failed", "tear-down-boot-environment-failed", "tear-downvmedia-local-failed", "tear-downvmedia-peer-failed", "teardown-vmedia-local-failed", "teardown-vmedia-peer-failed", "tftp-server-error", "thermal-problem", "threshold-crossed", "timezone-file-not-exists", "tpm-mismatch", "tpm-on-slave-board", "transceiver-mismatch", "transition", "ucsm-process-failure", "udld-link-down", "un-identify-local-failed", "un-identify-peer-failed", "unassociated", "unclaimed-device", "unconfig-bios-failed", "unconfig-cimcvmedia-failed", "unconfig-ext-mgmt-gw-failed", "unconfig-ext-mgmt-rules-failed", "unconfig-flex-flash-failed", "unconfig-server-identity-failed", "unconfig-so-lfailed", "unconfig-uuid-failed", "unconfig-vmedia-failed", "unconfiguration-in-progress", "under-test", "unexpected-number-of-links", "unicast-mac-exhausted", "unidentifiable-fru", "unknown", "unlock-firmware-image-failed", "unmount-local-failed", "unmount-peer-failed", "unpack-local-failed", "unregister-failed", "unsecure-adaptor", "unsupported-cimc-firmware", "unsupported-config", "unsupported-connectivity", "unsupported-connectivity-configuration", "unsupported-policy-config", "unsupported-transceiver", "update-adaptor-failed", "update-adaptor-nw-fw-local-failed", "update-adaptor-nw-fw-peer-failed", "update-bios-request-failed", "update-board-ctrl-request-failed", "update-cmc-failed", "update-connectivity-failed", "update-eth-flow-mon-failed", "update-eth-mon-failed", "update-failed", "update-fc-mon-failed", "update-flash-life-failed", "update-local-failed", "update-remote-failed", "update-request-failed", "update-request-local-failed", "update-request-peer-failed", "update-sas-expander-failed", "update-sp-local-failed", "update-sp-remote-failed", "update-storage-invcimc-failed", "update-storage-invcmc-failed", "update-tokens-failed", "update-vlan-groups-failed", "update-zones-failed", "updateibmcfw-failed", "updateiom-failed", "upload-failed", "user-config-error", "user-locale-config-error", "user-role-config-error", "validate-configuration-failed", "validate-local-failed", "validate-policy-ownership-failed", "validate-remote-failed", "validate-removal-failed", "verify-breakout-config-failed", "verify-failed", "verify-fc-zone-config-failed", "verify-guid-failed", "verify-local-failed", "verify-phys-config-failed", "verify-registration-failed", "verify-remote-failed", "verify-user-zone-config-failed", "version-incompatible", "versionHolderChange", "vhba-not-supported", "vif-down", "vif-ids-mismatch", "vlan-comp-grp-count-exceeds-limit", "vlan-compression", "vlan-conflict-permit", "vlan-error-assoc-primary", "vlan-mcast-policy-misconfigured", "vlan-misconfigured", "vlan-mismatch", "vlan-permit-unresolved", "vm-network-reference-incorrect", "vmedia-mount-inaccessible", "voltage-problem", "vsan-exceed-limit", "vsan-misconfigured", "wait-before-installation-failed", "wait-failed", "wait-for-ack-failed", "wait-for-activation-failed", "wait-for-adaptor-nw-fw-update-local-failed", "wait-for-adaptor-nw-fw-update-peer-failed", "wait-for-assoc-completion-failed", "wait-for-border-config-completion-local-failed", "wait-for-border-config-completion-peer-failed", "wait-for-commit-storage-failed", "wait-for-conn-ready-failed", "wait-for-debug-failed", "wait-for-deploy-failed", "wait-for-maint-permission-failed", "wait-for-maint-window-failed", "wait-for-power-off-failed", "wait-for-storage-provision-failed", "wait-for-user-ack-failed", "wait-foribmcfw-update-failed", "wait-on-phys-failed", "wait-on-sw-config-host-failed"], []), "child_action": MoPropertyMeta("child_action", "childAction", "string", VersionMeta.Version211a, MoPropertyMeta.INTERNAL, 0x4, None, None, r"""((deleteAll|ignore|deleteNonPresent),){0,2}(deleteAll|ignore|deleteNonPresent){0,1}""", [], []), "descr": MoPropertyMeta("descr", "descr", "string", VersionMeta.Version211a, MoPropertyMeta.READ_WRITE, 0x8, None, None, r"""[ !#$%&\(\)\*\+,\-\./:;\?@\[\]_\{\|\}~a-zA-Z0-9]{0,256}""", [], []), "dn": MoPropertyMeta("dn", "dn", "string", VersionMeta.Version211a, MoPropertyMeta.READ_ONLY, 0x10, 0, 256, None, [], []), "rn": MoPropertyMeta("rn", "rn", "string", VersionMeta.Version211a, MoPropertyMeta.READ_ONLY, 0x20, 0, 256, None, [], []), "sacl": MoPropertyMeta("sacl", "sacl", "string", VersionMeta.Version302c, MoPropertyMeta.READ_ONLY, None, None, None, r"""((none|del|mod|addchild|cascade),){0,4}(none|del|mod|addchild|cascade){0,1}""", [], []), "status": MoPropertyMeta("status", "status", "string", VersionMeta.Version211a, MoPropertyMeta.READ_WRITE, 0x40, None, None, r"""((removed|created|modified|deleted),){0,3}(removed|created|modified|deleted){0,1}""", [], []), "type": MoPropertyMeta("type", "type", "string", VersionMeta.Version211a, MoPropertyMeta.NAMING, 0x80, None, None, None, ["any", "chassis-profile", "configuration", "connectivity", "environmental", "equipment", "forward", "fsm", "generic", "management", "network", "operational", "security", "server", "sysdebug"], []), } prop_map = { "cause": "cause", "childAction": "child_action", "descr": "descr", "dn": "dn", "rn": "rn", "sacl": "sacl", "status": "status", "type": "type", } def __init__(self, parent_mo_or_dn, type, cause, **kwargs): self._dirty_mask = 0 self.type = type self.cause = cause self.child_action = None self.descr = None self.sacl = None self.status = None ManagedObject.__init__(self, "FaultSuppressPolicyItem", parent_mo_or_dn, **kwargs)
87.906491
23,398
0.784975
10,020
79,907
5.960579
0.072156
0.100193
0.017145
0.005726
0.506438
0.328656
0.169125
0.104127
0.066103
0.050113
0
0.001584
0.091494
79,907
908
23,399
88.003304
0.82112
0.001577
0
0
0
0.003352
0.510443
0.377122
0
0
0.000364
0
0.003352
1
0.001117
false
0.003352
0.003352
0
0.97095
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
3b5d662efebfe5c9bfd7a609e8377c7cafbaf6e2
292
py
Python
config.py
mn3711698/wrobot
c29fffb58f47c39d4f142d430f81712d00e02f18
[ "MIT" ]
23
2020-09-22T14:25:40.000Z
2021-11-07T20:27:52.000Z
config.py
a04512/wrobot
d8ae9e23637ba0a984c15a868e5c0093fdc74c23
[ "MIT" ]
null
null
null
config.py
a04512/wrobot
d8ae9e23637ba0a984c15a868e5c0093fdc74c23
[ "MIT" ]
6
2021-02-03T02:15:40.000Z
2022-02-10T14:05:48.000Z
# -*- coding: utf-8 -*- ############################################################################## #Author:QQ173782910 ############################################################################## CLIENT_NAME = 'wrobot'#注意:这个是项目名 DEBUG='1' L_no=['newscontent','text_contents']#不判断副文本
26.545455
78
0.315068
18
292
4.944444
1
0
0
0
0
0
0
0
0
0
0
0.039855
0.054795
292
10
79
29.2
0.282609
0.184932
0
0
0
0
0.413333
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
3b949b44ff68c1fb90088c87aea4a63df7a2740f
2,676
py
Python
thingpark/utils.py
asalminen/DjangoHttpBroker-Thingpark
04dcac78baefce1f30d9b0f337f81edbe398ed27
[ "MIT" ]
null
null
null
thingpark/utils.py
asalminen/DjangoHttpBroker-Thingpark
04dcac78baefce1f30d9b0f337f81edbe398ed27
[ "MIT" ]
null
null
null
thingpark/utils.py
asalminen/DjangoHttpBroker-Thingpark
04dcac78baefce1f30d9b0f337f81edbe398ed27
[ "MIT" ]
2
2020-05-05T12:57:47.000Z
2020-08-14T13:33:56.000Z
import base64 import json import datetime import influxdb import pytz from django.contrib.auth import authenticate from django.utils import timezone from django.utils.timezone import get_default_timezone def get_influxdb_client(host='127.0.0.1', port=8086, database='mydb'): iclient = influxdb.InfluxDBClient(host=host, port=port, database=database) return iclient def create_influxdb_obj(devid, measurement, fields, timestamp=None, extratags=None): # Make sure timestamp is timezone aware and in UTC time if timestamp is None: timestamp = pytz.UTC.localize(datetime.datetime.utcnow()) elif timestamp.tzinfo is None or timestamp.tzinfo.utcoffset(timestamp) is None: timestamp = get_default_timezone().localize(timestamp) timestamp = timestamp.astimezone(pytz.UTC) for k, v in fields.items(): fields[k] = float(v) measurement = { "measurement": measurement, "tags": { "dev-id": devid, }, "time": timestamp.strftime("%Y-%m-%dT%H:%M:%S.%fZ"), # is in UTC time "fields": fields } if extratags is not None: measurement['tags'].update(extratags) return measurement def basicauth(request): """Check for valid basic auth header.""" uname, passwd, user = None, None, None if 'HTTP_AUTHORIZATION' in request.META: auth = request.META['HTTP_AUTHORIZATION'].split() if len(auth) == 2: if auth[0].lower() == "basic": a = auth[1].encode('utf8') s = base64.b64decode(a) uname, passwd = s.decode('utf8').split(':') user = authenticate(username=uname, password=passwd) return uname, passwd, user def get_datalogger(devid, name='', update_activity=False): # FIXME: Shit, this import can't be in the beginning of the file or we'll get: # "django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet." # It can be imported if you run django.setup() before import, but it messes up loading # import django # django.setup() from broker.models import Datalogger datalogger, created = Datalogger.objects.get_or_create(devid=devid) changed = False if created: datalogger.name = name changed = True if update_activity: datalogger.activity_at = timezone.now() changed = True if changed: datalogger.save() return datalogger, created def decode_json_body(body): body_str = body.decode('utf8', "backslashreplace") try: data = json.loads(body_str) return True, data except json.decoder.JSONDecodeError as err: return False, err
33.45
90
0.659567
336
2,676
5.193452
0.431548
0.017192
0.017192
0.027507
0
0
0
0
0
0
0
0.010737
0.234305
2,676
79
91
33.873418
0.840898
0.136398
0
0.032787
0
0
0.060461
0.009134
0
0
0
0.012658
0
1
0.081967
false
0.065574
0.147541
0
0.327869
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
1
0
0
0
0
0
2
8e648fdb9af955e77c9a6dcefd6cedf95058d92b
7,285
py
Python
ServerComponent/venv/Lib/site-packages/pythonrv/test/dbc_contract_test.py
CDU55/FakeNews
707bd48dd78851081d98ad21bbdadfc2720bd644
[ "MIT" ]
2
2019-01-06T13:31:10.000Z
2020-12-11T04:05:44.000Z
pythonrv/test/dbc_contract_test.py
tgwizard/pythonrv
e50198cc6d48d8c6c6badbe8a1cd46eb0182839a
[ "MIT" ]
37
2020-10-20T08:30:53.000Z
2020-12-22T13:15:45.000Z
pythonrv/test/dbc_contract_test.py
tgwizard/pythonrv
e50198cc6d48d8c6c6badbe8a1cd46eb0182839a
[ "MIT" ]
1
2020-10-19T14:55:23.000Z
2020-10-19T14:55:23.000Z
# -*- coding: utf-8 -*- import unittest from pythonrv import dbc class TestOnFunctions(unittest.TestCase): def test_return_value(self): def pre(x): return 17 def post(x): return 'adsf' @dbc.contract(pre=pre, post=post) def m(x): return x+2 res = m(3) self.assertEquals(res, 5) def test_pre(self): def pa(): pa.val += 'a' pa.val = 'q' @dbc.contract(pre=pa) def m(): pass m(); m(); m() self.assertEquals(pa.val, 'qaaa') def test_post(self): def pa(): pa.val += 'a' pa.val = 'q' @dbc.contract(post=pa) def m(): pass m(); m(); m() self.assertEquals(pa.val, 'qaaa') def test_iterables(self): def a(self): self.val += 'a' def b(self): self.val += 'b' def c(self): self.val += 'c' class Aloha(object): @dbc.contract(pre=(a, b), post=c) def m(self): self.val += 'm' @dbc.contract(pre=(), post=()) def s(self): self.val += 's' @dbc.contract(pre=(a,(b,a),b), post=(c,a,((b)))) def n(self): self.val += 'n' obj = Aloha() obj.val = 'q' obj.m() self.assertEquals(obj.val, 'qabmc') obj.val = 'q' obj.s() self.assertEquals(obj.val, 'qs') obj.val = 'q' obj.n() self.assertEquals(obj.val, 'qababncab') def test_requires_ensure(self): def a(self): self.val += 'a' def b(self): self.val += 'b' def c(self): self.val += 'c' class Aloha(object): @dbc.contract(pre=(a), requires=b, post=c) def m(self): self.val += 'm' @dbc.contract(requires=(), ensures=()) def s(self): self.val += 's' @dbc.contract(requires=(a,(b,a),b), ensures=(c,a,((b)))) def n(self): self.val += 'n' obj = Aloha() obj.val = 'q' obj.m() self.assertEquals(obj.val, 'qabmc') obj.val = 'q' obj.s() self.assertEquals(obj.val, 'qs') obj.val = 'q' obj.n() self.assertEquals(obj.val, 'qababncab') def test_arguments(self): def pa(*args, **kwargs): raise ValueError("%s %s" % (args, kwargs)) def pb(x): raise ValueError(x) @dbc.contract(pre=pa) def m(x, y): return x + y with self.assertRaises(ValueError) as e: m(2,3) self.assertEquals(e.exception.message, "(2, 3) {}") @dbc.contract(post=pa) def n(x, *args, **kwargs): return x + kwargs['y'] with self.assertRaises(ValueError) as e: n(2, 17, 20, y=4) self.assertEquals(e.exception.message, "(2, 17, 20) {'y': 4}") @dbc.contract(pre=pb) def o(z): return z+1 with self.assertRaises(ValueError) as e: o(2) self.assertEquals(e.exception.message, 2) @dbc.contract(post=pb) def p(z): return z+1 with self.assertRaises(ValueError) as e: p(2) self.assertEquals(e.exception.message, 2) def test_argument_mutability(self): def p(x={}): x['val'] -= 17 @dbc.contract(pre=p, post=p) def m(x): return x['val'] d = {'val': 17} self.assertEquals(m(d), 0) self.assertEquals(d['val'], -17) def test_func_attrib(self): def p(*args, **kwargs): pass @dbc.contract(pre=p, post=p) def m(x): m.val = x m(7) self.assertEquals(m.val, 7) @dbc.contract(pre=p, post=p) def n(x): n.val += x n.val = 1 n(2); n(3); n(10) self.assertEquals(n.val, 16) def test_explicit_call(self): def p(x): p.val = 'x' if not hasattr(p, 'val') else p.val + 'y' def m(x): return x n = dbc.contract(pre=p, post=p)(m) res = n(7) self.assertEquals(res, 7) self.assertEquals(p.val, 'xy') class TestOnClassFunctions(unittest.TestCase): def test_method_attachment(self): def p(self): self.val += 'p' class Aloha(): def q(self): self.val += 'q' @dbc.contract(pre=p) def m(self): return 'm' @dbc.contract(post=q) def n(self): return 'n' @dbc.contract(pre=q, post=p) def x(self): return 'x' obj = Aloha() obj.val = 'a' res = obj.m(); self.assertEquals(res, 'm') self.assertEquals(obj.val, 'ap') res = obj.n(); self.assertEquals(res, 'n') self.assertEquals(obj.val, 'apq') res = obj.x(); self.assertEquals(res, 'x') self.assertEquals(obj.val, 'apqqp') def test_class_method_attachment(self): def p(x): x.val += 'p' class Aloha(): def q(x): x.val += 'q' @classmethod def a(cls): cls.val = 'a' return 'a' @dbc.contract(pre=p) @classmethod def m(cls): return 'm' @dbc.contract(post=q) @classmethod def n(cls): return 'n' @dbc.contract(pre=q, post=p) @classmethod def x(klass): return 'x' res = Aloha.a(); self.assertEquals(res, 'a') self.assertEquals(Aloha.val, 'a') res = Aloha.m(); self.assertEquals(res, 'm') self.assertEquals(Aloha.val, 'ap') res = Aloha.n(); self.assertEquals(res, 'n') self.assertEquals(Aloha.val, 'apq') res = Aloha.x(); self.assertEquals(res, 'x') self.assertEquals(Aloha.val, 'apqqp') def test_static_method_attachment(self): def p(): Aloha.val += 'p' class Aloha(): def q(): Aloha.val += 'q' @staticmethod def a(): Aloha.val = 'a' return 'a' @dbc.contract(pre=p) @staticmethod def m(): return 'm' @dbc.contract(post=q) @staticmethod def n(): return 'n' @dbc.contract(pre=q, post=p) @staticmethod def x(): return 'x' res = Aloha.a(); self.assertEquals(res, 'a') self.assertEquals(Aloha.val, 'a') res = Aloha.m(); self.assertEquals(res, 'm') self.assertEquals(Aloha.val, 'ap') res = Aloha.n(); self.assertEquals(res, 'n') self.assertEquals(Aloha.val, 'apq') res = Aloha.x(); self.assertEquals(res, 'x') self.assertEquals(Aloha.val, 'apqqp')
24.042904
70
0.445985
868
7,285
3.717742
0.108295
0.203285
0.078091
0.061357
0.669662
0.617911
0.538271
0.453982
0.396033
0.380539
0
0.010592
0.403844
7,285
302
71
24.122517
0.732443
0.002883
0
0.59751
0
0
0.0252
0
0
0
0
0
0.186722
1
0.253112
false
0.012448
0.008299
0.074689
0.373444
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
2
8e696d0fd3fbf6a42b554bb892a1c39dee30e6d8
947
py
Python
runpandarun/storage/filesystem.py
simonwoerpel/runpandarun
6ea5f4c7fdda92775ed87c8930442a605d005551
[ "MIT" ]
3
2020-03-28T14:51:49.000Z
2020-04-02T10:53:15.000Z
runpandarun/storage/filesystem.py
simonwoerpel/simple-datastore
6ea5f4c7fdda92775ed87c8930442a605d005551
[ "MIT" ]
null
null
null
runpandarun/storage/filesystem.py
simonwoerpel/simple-datastore
6ea5f4c7fdda92775ed87c8930442a605d005551
[ "MIT" ]
null
null
null
import os from ..util import get_files from .backend import Backend def ensure_directory(fp): fp = os.path.abspath(fp) if not os.path.isdir(fp): os.makedirs(fp) return fp class FilesystemBackend(Backend): def get_base_path(self): return ensure_directory(self.config.data_root) def exists(self, path): p = self.get_path(path) return any((os.path.isfile(p), os.path.isdir(p))) def store(self, path, content, publish=False): path = self.get_path(path) ensure_directory(os.path.split(path)[0]) with open(path, 'w') as f: f.write(content) return path def _fetch(self, path): path = self.get_path(path) with open(path) as f: content = f.read().strip() return content def get_children(self, path, condition=lambda x: True): path = self.get_path(path) return get_files(path, condition)
24.921053
59
0.620908
134
947
4.283582
0.365672
0.052265
0.076655
0.10453
0.146341
0
0
0
0
0
0
0.001433
0.262936
947
37
60
25.594595
0.820917
0
0
0.107143
0
0
0.001056
0
0
0
0
0
0
1
0.214286
false
0
0.107143
0.035714
0.571429
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
8e7468d88607fbc5382da61bbccee2728493aa59
1,880
py
Python
scripts/ais_names.py
rolker/noaadata
052a4b7d634e0a3a92a348b543e5db536ae24f02
[ "Apache-2.0" ]
35
2015-02-15T17:23:00.000Z
2022-01-27T01:49:43.000Z
scripts/ais_names.py
rolker/noaadata
052a4b7d634e0a3a92a348b543e5db536ae24f02
[ "Apache-2.0" ]
2
2017-10-04T17:24:38.000Z
2017-10-04T18:22:00.000Z
scripts/ais_names.py
rolker/noaadata
052a4b7d634e0a3a92a348b543e5db536ae24f02
[ "Apache-2.0" ]
22
2015-02-08T13:29:58.000Z
2022-03-09T03:03:16.000Z
#!/usr/bin/env python """Get the name and mmsi (User ID) for each msg 5 identification message. This program requires that the nmea strings be sorted such that the 2nd part of the message comes directly after the first. You can do this by grepping for the USCG N-AIS station name. This will prevent interleaving of msg 5 nmea strings. @requires: U{epydoc<http://epydoc.sourceforge.net/>} > 3.0alpha3 @author: '''+__author__+''' @version: ''' + __version__ +''' @var __date__: Date of last svn commit @undocumented: __version__ __author__ __doc__ parser @status: under development @license: Apache 2.0 TODO(schwehr):is this a repeat of merge5? """ from optparse import OptionParser import os import sys from ais import ais_msg_5 from aisutils import binary from aisutils import aisstring def getNameMMSI(logfile,outfile): for line in logfile: fields = line.split(',')[:6] if '1'!=fields[2]: # Must be the start of a sequence continue if len(fields[5])<39: continue bv = binary.ais6tobitvec(fields[5][:39]) # Hacked for speed mmsi = ais_msg_5.decodeUserID(bv) name = aisstring.unpad(ais_msg_5.decodename(bv)) outfile.write(str(mmsi)+' '+str(name)+'\n') if __name__=='__main__': parser = OptionParser(usage="%prog [options] logfile1 [logfile2 logfile3 ...] ", version="%prog "+__version__) parser.add_option('-o','--output',dest='outputFileName',default=None, help='Name of the file to write [default: stdout]') (options,args) = parser.parse_args() outfile = sys.stdout if None!=options.outputFileName: print 'outfilename=',options.outputFileName outfile = file(options.outputFileName,'w') if 0==len(args): getNameMMSI(sys.stdin,outfile) else: for filename in args: getNameMMSI(file(filename),outfile)
32.413793
114
0.682447
253
1,880
4.897233
0.541502
0.016142
0.016949
0
0
0
0
0
0
0
0
0.017299
0.200532
1,880
57
115
32.982456
0.807053
0.036702
0
0
0
0
0.125743
0
0
0
0
0.017544
0
0
null
null
0
0.2
null
null
0.033333
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
1
0
0
0
0
0
0
0
0
2
8e8bc871fda21a0d7884e4214900dd34d5c3adee
197
py
Python
basics/ch2__VARIABLES_AND_SIMPLE_DATA_TYPES/4_full_name.py
bedoyama/python-crash-course
39101237c478cd9c97f1a47f866408d2754c849f
[ "Apache-2.0" ]
null
null
null
basics/ch2__VARIABLES_AND_SIMPLE_DATA_TYPES/4_full_name.py
bedoyama/python-crash-course
39101237c478cd9c97f1a47f866408d2754c849f
[ "Apache-2.0" ]
null
null
null
basics/ch2__VARIABLES_AND_SIMPLE_DATA_TYPES/4_full_name.py
bedoyama/python-crash-course
39101237c478cd9c97f1a47f866408d2754c849f
[ "Apache-2.0" ]
null
null
null
first_name = "Hannah" last_name = "Louisa" full_name = f"{first_name} {last_name}" print(full_name) print(f"Hello, {full_name.upper()}") message = f"Howdy, {full_name.title()}" print(message)
15.153846
39
0.700508
30
197
4.333333
0.433333
0.246154
0
0
0
0
0
0
0
0
0
0
0.116751
197
12
40
16.416667
0.747126
0
0
0
0
0
0.446701
0
0
0
0
0
0
1
0
false
0
0
0
0
0.428571
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
2
8e97818e84bbe9e5e9c390ad120b252d5e2c6186
138
py
Python
testdata/clean_geojson.py
prune998/regionagogo
5a250f997807dd7da07dbf84c54c51003ce0a322
[ "MIT" ]
80
2016-02-29T06:13:26.000Z
2020-06-23T23:20:24.000Z
testdata/clean_geojson.py
Acidburn0zzz/regionagogo
5a250f997807dd7da07dbf84c54c51003ce0a322
[ "MIT" ]
2
2016-06-14T02:17:44.000Z
2016-10-27T16:21:56.000Z
testdata/clean_geojson.py
Acidburn0zzz/regionagogo
5a250f997807dd7da07dbf84c54c51003ce0a322
[ "MIT" ]
18
2016-06-14T00:24:30.000Z
2020-03-19T16:10:58.000Z
import json f = open("files.txt", 'r') for line in f: json_data = open(line.strip()) data = json.load(json_data) print(data)
17.25
34
0.623188
23
138
3.652174
0.608696
0.190476
0
0
0
0
0
0
0
0
0
0
0.217391
138
7
35
19.714286
0.777778
0
0
0
0
0
0.072464
0
0
0
0
0
0
1
0
false
0
0.166667
0
0.166667
0.166667
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
8e9c3fee5dda22f193aa6a873ae553d9cae918bd
30,086
py
Python
pysnmp/DOCS-MCAST-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/DOCS-MCAST-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/DOCS-MCAST-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module DOCS-MCAST-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DOCS-MCAST-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 18:38:33 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ValueRangeConstraint") clabProjDocsis, = mibBuilder.importSymbols("CLAB-DEF-MIB", "clabProjDocsis") DocsSAId, DocsBpkmDataEncryptAlg = mibBuilder.importSymbols("DOCS-IETF-BPI2-MIB", "DocsSAId", "DocsBpkmDataEncryptAlg") ChSetId, Dsid = mibBuilder.importSymbols("DOCS-IF3-MIB", "ChSetId", "Dsid") CounterBasedGauge64, = mibBuilder.importSymbols("HCNUM-TC", "CounterBasedGauge64") ifIndex, InterfaceIndex = mibBuilder.importSymbols("IF-MIB", "ifIndex", "InterfaceIndex") InetAddress, InetAddressType, InetAddressPrefixLength = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddress", "InetAddressType", "InetAddressPrefixLength") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup") Counter64, MibIdentifier, Unsigned32, Integer32, Counter32, TimeTicks, Gauge32, IpAddress, iso, ModuleIdentity, NotificationType, Bits, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "MibIdentifier", "Unsigned32", "Integer32", "Counter32", "TimeTicks", "Gauge32", "IpAddress", "iso", "ModuleIdentity", "NotificationType", "Bits", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity") RowStatus, MacAddress, TextualConvention, TruthValue, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "MacAddress", "TextualConvention", "TruthValue", "DisplayString") docsMcastMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18)) docsMcastMib.setRevisions(('2015-04-22 00:00', '2014-07-29 00:00', '2007-08-03 00:00', '2006-12-07 17:00',)) if mibBuilder.loadTexts: docsMcastMib.setLastUpdated('201504220000Z') if mibBuilder.loadTexts: docsMcastMib.setOrganization('Cable Television Laboratories, Inc.') docsMcastMibObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1)) docsMcastCmtsGrpCfgTable = MibTable((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1), ) if mibBuilder.loadTexts: docsMcastCmtsGrpCfgTable.setStatus('current') docsMcastCmtsGrpCfgEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1), ).setIndexNames((0, "DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgId")) if mibBuilder.loadTexts: docsMcastCmtsGrpCfgEntry.setStatus('current') docsMcastCmtsGrpCfgId = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: docsMcastCmtsGrpCfgId.setStatus('current') docsMcastCmtsGrpCfgRulePriority = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpCfgRulePriority.setStatus('current') docsMcastCmtsGrpCfgPrefixAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 3), InetAddressType()).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpCfgPrefixAddrType.setStatus('current') docsMcastCmtsGrpCfgSrcPrefixAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 4), InetAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpCfgSrcPrefixAddr.setStatus('current') docsMcastCmtsGrpCfgSrcPrefixLen = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 5), InetAddressPrefixLength()).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpCfgSrcPrefixLen.setStatus('current') docsMcastCmtsGrpCfgGrpPrefixAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 6), InetAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpCfgGrpPrefixAddr.setStatus('current') docsMcastCmtsGrpCfgGrpPrefixLen = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 7), InetAddressPrefixLength()).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpCfgGrpPrefixLen.setStatus('current') docsMcastCmtsGrpCfgTosLow = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 8), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpCfgTosLow.setStatus('current') docsMcastCmtsGrpCfgTosHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 9), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpCfgTosHigh.setStatus('current') docsMcastCmtsGrpCfgTosMask = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 10), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpCfgTosMask.setStatus('current') docsMcastCmtsGrpCfgQosConfigId = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 11), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpCfgQosConfigId.setStatus('current') docsMcastCmtsGrpCfgEncryptConfigId = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 12), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpCfgEncryptConfigId.setStatus('current') docsMcastCmtsGrpCfgPhsConfigId = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 13), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpCfgPhsConfigId.setStatus('current') docsMcastCmtsGrpCfgRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 14), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpCfgRowStatus.setStatus('current') docsMcastCmtsGrpEncryptCfgTable = MibTable((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 2), ) if mibBuilder.loadTexts: docsMcastCmtsGrpEncryptCfgTable.setStatus('current') docsMcastCmtsGrpEncryptCfgEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 2, 1), ).setIndexNames((0, "DOCS-MCAST-MIB", "docsMcastCmtsGrpEncryptCfgId")) if mibBuilder.loadTexts: docsMcastCmtsGrpEncryptCfgEntry.setStatus('current') docsMcastCmtsGrpEncryptCfgId = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 2, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))) if mibBuilder.loadTexts: docsMcastCmtsGrpEncryptCfgId.setStatus('current') docsMcastCmtsGrpEncryptCfgCtrl = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("cmts", 1), ("mgmt", 2))).clone('mgmt')).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpEncryptCfgCtrl.setStatus('current') docsMcastCmtsGrpEncryptCfgAlg = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 2, 1, 3), DocsBpkmDataEncryptAlg().clone('des56CbcMode')).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpEncryptCfgAlg.setStatus('current') docsMcastCmtsGrpEncryptCfgRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 2, 1, 4), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpEncryptCfgRowStatus.setStatus('current') docsMcastCmtsGrpPhsCfgTable = MibTable((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3), ) if mibBuilder.loadTexts: docsMcastCmtsGrpPhsCfgTable.setStatus('current') docsMcastCmtsGrpPhsCfgEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3, 1), ).setIndexNames((0, "DOCS-MCAST-MIB", "docsMcastCmtsGrpPhsCfgId")) if mibBuilder.loadTexts: docsMcastCmtsGrpPhsCfgEntry.setStatus('current') docsMcastCmtsGrpPhsCfgId = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))) if mibBuilder.loadTexts: docsMcastCmtsGrpPhsCfgId.setStatus('current') docsMcastCmtsGrpPhsCfgPhsField = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpPhsCfgPhsField.setStatus('current') docsMcastCmtsGrpPhsCfgPhsMask = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpPhsCfgPhsMask.setStatus('current') docsMcastCmtsGrpPhsCfgPhsSize = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setUnits('Bytes').setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpPhsCfgPhsSize.setStatus('current') docsMcastCmtsGrpPhsCfgPhsVerify = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3, 1, 5), TruthValue().clone('false')).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpPhsCfgPhsVerify.setStatus('current') docsMcastCmtsGrpPhsCfgRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3, 1, 6), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpPhsCfgRowStatus.setStatus('current') docsMcastCmtsGrpQosCfgTable = MibTable((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4), ) if mibBuilder.loadTexts: docsMcastCmtsGrpQosCfgTable.setStatus('current') docsMcastCmtsGrpQosCfgEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4, 1), ).setIndexNames((0, "DOCS-MCAST-MIB", "docsMcastCmtsGrpQosCfgId")) if mibBuilder.loadTexts: docsMcastCmtsGrpQosCfgEntry.setStatus('current') docsMcastCmtsGrpQosCfgId = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))) if mibBuilder.loadTexts: docsMcastCmtsGrpQosCfgId.setStatus('current') docsMcastCmtsGrpQosCfgServiceClassName = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4, 1, 2), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(1, 15)).clone(hexValue="")).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpQosCfgServiceClassName.setStatus('current') docsMcastCmtsGrpQosCfgQosCtrl = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("singleSsession", 1), ("aggregateSession", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpQosCfgQosCtrl.setStatus('current') docsMcastCmtsGrpQosCfgAggSessLimit = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpQosCfgAggSessLimit.setStatus('current') docsMcastCmtsGrpQosCfgAppId = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4, 1, 5), Unsigned32()).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpQosCfgAppId.setStatus('current') docsMcastCmtsGrpQosCfgRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4, 1, 6), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsMcastCmtsGrpQosCfgRowStatus.setStatus('current') docsMcastCmtsReplSessTable = MibTable((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5), ) if mibBuilder.loadTexts: docsMcastCmtsReplSessTable.setStatus('current') docsMcastCmtsReplSessEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1), ).setIndexNames((0, "DOCS-MCAST-MIB", "docsMcastCmtsReplSessPrefixAddrType"), (0, "DOCS-MCAST-MIB", "docsMcastCmtsReplSessGrpPrefix"), (0, "DOCS-MCAST-MIB", "docsMcastCmtsReplSessSrcPrefix"), (0, "DOCS-MCAST-MIB", "docsMcastCmtsReplSessMdIfIndex"), (0, "DOCS-MCAST-MIB", "docsMcastCmtsReplSessDcsId"), (0, "DOCS-MCAST-MIB", "docsMcastCmtsReplSessServiceFlowId")) if mibBuilder.loadTexts: docsMcastCmtsReplSessEntry.setStatus('current') docsMcastCmtsReplSessPrefixAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 1), InetAddressType()) if mibBuilder.loadTexts: docsMcastCmtsReplSessPrefixAddrType.setStatus('current') docsMcastCmtsReplSessGrpPrefix = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 2), InetAddress()) if mibBuilder.loadTexts: docsMcastCmtsReplSessGrpPrefix.setStatus('current') docsMcastCmtsReplSessSrcPrefix = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 3), InetAddress()) if mibBuilder.loadTexts: docsMcastCmtsReplSessSrcPrefix.setStatus('current') docsMcastCmtsReplSessMdIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 4), InterfaceIndex()) if mibBuilder.loadTexts: docsMcastCmtsReplSessMdIfIndex.setStatus('current') docsMcastCmtsReplSessDcsId = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 5), ChSetId()) if mibBuilder.loadTexts: docsMcastCmtsReplSessDcsId.setStatus('current') docsMcastCmtsReplSessServiceFlowId = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 6), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: docsMcastCmtsReplSessServiceFlowId.setStatus('current') docsMcastCmtsReplSessDsid = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 7), Dsid()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsMcastCmtsReplSessDsid.setStatus('current') docsMcastCmtsReplSessSaid = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 8), DocsSAId()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsMcastCmtsReplSessSaid.setStatus('current') docsMcastDefGrpSvcClass = MibIdentifier((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 6)) docsMcastDefGrpSvcClassDef = MibScalar((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 6, 1), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 15)).clone(hexValue="")).setMaxAccess("readwrite") if mibBuilder.loadTexts: docsMcastDefGrpSvcClassDef.setStatus('current') docsMcastDsidPhsTable = MibTable((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 7), ) if mibBuilder.loadTexts: docsMcastDsidPhsTable.setStatus('current') docsMcastDsidPhsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 7, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "DOCS-MCAST-MIB", "docsMcastDsidPhsDsid")) if mibBuilder.loadTexts: docsMcastDsidPhsEntry.setStatus('current') docsMcastDsidPhsDsid = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 7, 1, 1), Dsid()) if mibBuilder.loadTexts: docsMcastDsidPhsDsid.setStatus('current') docsMcastDsidPhsPhsField = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 7, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsMcastDsidPhsPhsField.setStatus('current') docsMcastDsidPhsPhsMask = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 7, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsMcastDsidPhsPhsMask.setStatus('current') docsMcastDsidPhsPhsSize = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 7, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsMcastDsidPhsPhsSize.setStatus('current') docsMcastDsidPhsPhsVerify = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 7, 1, 5), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsMcastDsidPhsPhsVerify.setStatus('current') docsMcastStatsTable = MibTable((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8), ) if mibBuilder.loadTexts: docsMcastStatsTable.setStatus('current') docsMcastStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "DOCS-MCAST-MIB", "docsMcastStatsGrpAddrType"), (0, "DOCS-MCAST-MIB", "docsMcastStatsGrpAddr"), (0, "DOCS-MCAST-MIB", "docsMcastStatsGrpPrefixLen"), (0, "DOCS-MCAST-MIB", "docsMcastStatsSrcAddrType"), (0, "DOCS-MCAST-MIB", "docsMcastStatsSrcAddr"), (0, "DOCS-MCAST-MIB", "docsMcastStatsSrcPrefixLen")) if mibBuilder.loadTexts: docsMcastStatsEntry.setStatus('current') docsMcastStatsGrpAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 1), InetAddressType()) if mibBuilder.loadTexts: docsMcastStatsGrpAddrType.setStatus('current') docsMcastStatsGrpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 2), InetAddress()) if mibBuilder.loadTexts: docsMcastStatsGrpAddr.setStatus('current') docsMcastStatsGrpPrefixLen = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 3), InetAddressPrefixLength()) if mibBuilder.loadTexts: docsMcastStatsGrpPrefixLen.setStatus('current') docsMcastStatsSrcAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 4), InetAddressType()) if mibBuilder.loadTexts: docsMcastStatsSrcAddrType.setStatus('current') docsMcastStatsSrcAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 5), InetAddress()) if mibBuilder.loadTexts: docsMcastStatsSrcAddr.setStatus('current') docsMcastStatsSrcPrefixLen = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 6), InetAddressPrefixLength()) if mibBuilder.loadTexts: docsMcastStatsSrcPrefixLen.setStatus('current') docsMcastStatsDroppedPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsMcastStatsDroppedPkts.setStatus('current') docsMcastStatsDroppedOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsMcastStatsDroppedOctets.setStatus('current') docsMcastCpeListTable = MibTable((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9), ) if mibBuilder.loadTexts: docsMcastCpeListTable.setStatus('current') docsMcastCpeListEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "DOCS-MCAST-MIB", "docsMcastCpeListGrpAddrType"), (0, "DOCS-MCAST-MIB", "docsMcastCpeListGrpAddr"), (0, "DOCS-MCAST-MIB", "docsMcastCpeListGrpPrefixLen"), (0, "DOCS-MCAST-MIB", "docsMcastCpeListSrcAddrType"), (0, "DOCS-MCAST-MIB", "docsMcastCpeListSrcAddr"), (0, "DOCS-MCAST-MIB", "docsMcastCpeListSrcPrefixLen"), (0, "DOCS-MCAST-MIB", "docsMcastCpeListCmMacAddr")) if mibBuilder.loadTexts: docsMcastCpeListEntry.setStatus('current') docsMcastCpeListGrpAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 1), InetAddressType()) if mibBuilder.loadTexts: docsMcastCpeListGrpAddrType.setStatus('current') docsMcastCpeListGrpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 2), InetAddress()) if mibBuilder.loadTexts: docsMcastCpeListGrpAddr.setStatus('current') docsMcastCpeListGrpPrefixLen = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 3), InetAddressPrefixLength()) if mibBuilder.loadTexts: docsMcastCpeListGrpPrefixLen.setStatus('current') docsMcastCpeListSrcAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 4), InetAddressType()) if mibBuilder.loadTexts: docsMcastCpeListSrcAddrType.setStatus('current') docsMcastCpeListSrcAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 5), InetAddress()) if mibBuilder.loadTexts: docsMcastCpeListSrcAddr.setStatus('current') docsMcastCpeListSrcPrefixLen = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 6), InetAddressPrefixLength()) if mibBuilder.loadTexts: docsMcastCpeListSrcPrefixLen.setStatus('current') docsMcastCpeListCmMacAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 7), MacAddress()) if mibBuilder.loadTexts: docsMcastCpeListCmMacAddr.setStatus('current') docsMcastCpeListDsid = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 8), Dsid()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsMcastCpeListDsid.setStatus('current') docsMcastCpeListCpeMacAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 9), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsMcastCpeListCpeMacAddr.setStatus('current') docsMcastCpeListCpeIpAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 10), InetAddressType()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsMcastCpeListCpeIpAddrType.setStatus('current') docsMcastCpeListCpeIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 11), InetAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsMcastCpeListCpeIpAddr.setStatus('current') docsMcastBandwidthTable = MibTable((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 10), ) if mibBuilder.loadTexts: docsMcastBandwidthTable.setStatus('current') docsMcastBandwidthEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 10, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: docsMcastBandwidthEntry.setStatus('current') docsMcastBandwidthAdmittedAggrBW = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 10, 1, 1), CounterBasedGauge64()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsMcastBandwidthAdmittedAggrBW.setStatus('current') docsMcastBandwidthAdmittedAggrLowWater = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 10, 1, 2), CounterBasedGauge64()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsMcastBandwidthAdmittedAggrLowWater.setStatus('current') docsMcastBandwidthAdmittedAggrHighWater = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 10, 1, 3), CounterBasedGauge64()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsMcastBandwidthAdmittedAggrHighWater.setStatus('current') docsMcastMibConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 2)) docsMcastMibCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 2, 1)) docsMcastMibGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 2, 2)) docsMcastCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 2, 1, 1)).setObjects(("DOCS-MCAST-MIB", "docsMcastGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): docsMcastCompliance = docsMcastCompliance.setStatus('current') docsMcastGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 2, 2, 1)).setObjects(("DOCS-MCAST-MIB", "docsMcastCmtsReplSessDsid"), ("DOCS-MCAST-MIB", "docsMcastCmtsReplSessSaid"), ("DOCS-MCAST-MIB", "docsMcastDefGrpSvcClassDef"), ("DOCS-MCAST-MIB", "docsMcastDsidPhsPhsField"), ("DOCS-MCAST-MIB", "docsMcastDsidPhsPhsMask"), ("DOCS-MCAST-MIB", "docsMcastDsidPhsPhsSize"), ("DOCS-MCAST-MIB", "docsMcastDsidPhsPhsVerify"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgRulePriority"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgPrefixAddrType"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgSrcPrefixAddr"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgSrcPrefixLen"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgGrpPrefixAddr"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgGrpPrefixLen"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgTosLow"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgTosHigh"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgTosMask"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgQosConfigId"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgEncryptConfigId"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgPhsConfigId"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgRowStatus"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpQosCfgServiceClassName"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpQosCfgQosCtrl"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpQosCfgAggSessLimit"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpQosCfgAppId"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpQosCfgRowStatus"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpEncryptCfgCtrl"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpEncryptCfgAlg"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpEncryptCfgRowStatus"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpPhsCfgPhsField"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpPhsCfgPhsMask"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpPhsCfgPhsSize"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpPhsCfgPhsVerify"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpPhsCfgRowStatus"), ("DOCS-MCAST-MIB", "docsMcastStatsDroppedPkts"), ("DOCS-MCAST-MIB", "docsMcastStatsDroppedOctets"), ("DOCS-MCAST-MIB", "docsMcastCpeListDsid"), ("DOCS-MCAST-MIB", "docsMcastCpeListCpeMacAddr"), ("DOCS-MCAST-MIB", "docsMcastCpeListCpeIpAddrType"), ("DOCS-MCAST-MIB", "docsMcastCpeListCpeIpAddr"), ("DOCS-MCAST-MIB", "docsMcastBandwidthAdmittedAggrBW"), ("DOCS-MCAST-MIB", "docsMcastBandwidthAdmittedAggrLowWater"), ("DOCS-MCAST-MIB", "docsMcastBandwidthAdmittedAggrHighWater")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): docsMcastGroup = docsMcastGroup.setStatus('current') mibBuilder.exportSymbols("DOCS-MCAST-MIB", docsMcastCmtsGrpEncryptCfgCtrl=docsMcastCmtsGrpEncryptCfgCtrl, docsMcastCpeListDsid=docsMcastCpeListDsid, docsMcastCmtsReplSessDsid=docsMcastCmtsReplSessDsid, docsMcastDsidPhsDsid=docsMcastDsidPhsDsid, docsMcastDsidPhsPhsMask=docsMcastDsidPhsPhsMask, docsMcastCpeListCmMacAddr=docsMcastCpeListCmMacAddr, docsMcastCmtsGrpEncryptCfgTable=docsMcastCmtsGrpEncryptCfgTable, docsMcastStatsDroppedOctets=docsMcastStatsDroppedOctets, docsMcastCmtsReplSessServiceFlowId=docsMcastCmtsReplSessServiceFlowId, docsMcastCpeListSrcAddrType=docsMcastCpeListSrcAddrType, docsMcastCmtsGrpCfgRowStatus=docsMcastCmtsGrpCfgRowStatus, docsMcastCmtsGrpEncryptCfgAlg=docsMcastCmtsGrpEncryptCfgAlg, docsMcastGroup=docsMcastGroup, docsMcastCmtsReplSessMdIfIndex=docsMcastCmtsReplSessMdIfIndex, docsMcastCmtsGrpCfgTosHigh=docsMcastCmtsGrpCfgTosHigh, docsMcastCmtsGrpEncryptCfgId=docsMcastCmtsGrpEncryptCfgId, docsMcastCmtsGrpCfgQosConfigId=docsMcastCmtsGrpCfgQosConfigId, docsMcastCmtsGrpPhsCfgRowStatus=docsMcastCmtsGrpPhsCfgRowStatus, docsMcastMibObjects=docsMcastMibObjects, docsMcastStatsGrpAddr=docsMcastStatsGrpAddr, docsMcastCmtsGrpQosCfgAppId=docsMcastCmtsGrpQosCfgAppId, docsMcastCmtsGrpQosCfgEntry=docsMcastCmtsGrpQosCfgEntry, docsMcastCpeListGrpPrefixLen=docsMcastCpeListGrpPrefixLen, docsMcastDsidPhsTable=docsMcastDsidPhsTable, docsMcastCmtsReplSessDcsId=docsMcastCmtsReplSessDcsId, docsMcastCmtsGrpPhsCfgPhsSize=docsMcastCmtsGrpPhsCfgPhsSize, docsMcastCmtsGrpCfgGrpPrefixAddr=docsMcastCmtsGrpCfgGrpPrefixAddr, docsMcastCmtsGrpCfgSrcPrefixAddr=docsMcastCmtsGrpCfgSrcPrefixAddr, docsMcastMibGroups=docsMcastMibGroups, docsMcastCmtsReplSessPrefixAddrType=docsMcastCmtsReplSessPrefixAddrType, docsMcastStatsSrcAddrType=docsMcastStatsSrcAddrType, docsMcastCmtsGrpCfgGrpPrefixLen=docsMcastCmtsGrpCfgGrpPrefixLen, docsMcastCmtsGrpCfgPrefixAddrType=docsMcastCmtsGrpCfgPrefixAddrType, docsMcastDsidPhsPhsSize=docsMcastDsidPhsPhsSize, docsMcastCmtsGrpPhsCfgPhsField=docsMcastCmtsGrpPhsCfgPhsField, docsMcastStatsSrcAddr=docsMcastStatsSrcAddr, docsMcastCmtsGrpCfgTosMask=docsMcastCmtsGrpCfgTosMask, docsMcastDsidPhsEntry=docsMcastDsidPhsEntry, docsMcastCmtsReplSessSrcPrefix=docsMcastCmtsReplSessSrcPrefix, docsMcastCmtsGrpCfgRulePriority=docsMcastCmtsGrpCfgRulePriority, docsMcastCmtsGrpQosCfgTable=docsMcastCmtsGrpQosCfgTable, docsMcastCmtsGrpQosCfgServiceClassName=docsMcastCmtsGrpQosCfgServiceClassName, docsMcastMib=docsMcastMib, docsMcastCmtsGrpCfgId=docsMcastCmtsGrpCfgId, docsMcastCmtsGrpPhsCfgId=docsMcastCmtsGrpPhsCfgId, docsMcastCmtsGrpQosCfgId=docsMcastCmtsGrpQosCfgId, docsMcastCmtsReplSessSaid=docsMcastCmtsReplSessSaid, docsMcastCmtsGrpQosCfgRowStatus=docsMcastCmtsGrpQosCfgRowStatus, docsMcastCmtsReplSessEntry=docsMcastCmtsReplSessEntry, docsMcastCmtsGrpEncryptCfgRowStatus=docsMcastCmtsGrpEncryptCfgRowStatus, docsMcastCpeListGrpAddrType=docsMcastCpeListGrpAddrType, docsMcastStatsTable=docsMcastStatsTable, docsMcastDsidPhsPhsField=docsMcastDsidPhsPhsField, docsMcastCmtsGrpQosCfgQosCtrl=docsMcastCmtsGrpQosCfgQosCtrl, docsMcastStatsDroppedPkts=docsMcastStatsDroppedPkts, docsMcastBandwidthAdmittedAggrBW=docsMcastBandwidthAdmittedAggrBW, docsMcastCmtsGrpCfgSrcPrefixLen=docsMcastCmtsGrpCfgSrcPrefixLen, docsMcastCmtsGrpPhsCfgEntry=docsMcastCmtsGrpPhsCfgEntry, docsMcastMibConformance=docsMcastMibConformance, docsMcastCmtsGrpCfgPhsConfigId=docsMcastCmtsGrpCfgPhsConfigId, docsMcastBandwidthEntry=docsMcastBandwidthEntry, docsMcastCmtsReplSessTable=docsMcastCmtsReplSessTable, docsMcastCpeListSrcPrefixLen=docsMcastCpeListSrcPrefixLen, docsMcastCpeListCpeIpAddrType=docsMcastCpeListCpeIpAddrType, docsMcastStatsGrpAddrType=docsMcastStatsGrpAddrType, docsMcastCmtsReplSessGrpPrefix=docsMcastCmtsReplSessGrpPrefix, PYSNMP_MODULE_ID=docsMcastMib, docsMcastCmtsGrpEncryptCfgEntry=docsMcastCmtsGrpEncryptCfgEntry, docsMcastStatsEntry=docsMcastStatsEntry, docsMcastCpeListGrpAddr=docsMcastCpeListGrpAddr, docsMcastCmtsGrpQosCfgAggSessLimit=docsMcastCmtsGrpQosCfgAggSessLimit, docsMcastCpeListSrcAddr=docsMcastCpeListSrcAddr, docsMcastCmtsGrpCfgTable=docsMcastCmtsGrpCfgTable, docsMcastCpeListTable=docsMcastCpeListTable, docsMcastDefGrpSvcClassDef=docsMcastDefGrpSvcClassDef, docsMcastCmtsGrpPhsCfgPhsMask=docsMcastCmtsGrpPhsCfgPhsMask, docsMcastStatsGrpPrefixLen=docsMcastStatsGrpPrefixLen, docsMcastCmtsGrpCfgTosLow=docsMcastCmtsGrpCfgTosLow, docsMcastDsidPhsPhsVerify=docsMcastDsidPhsPhsVerify, docsMcastMibCompliances=docsMcastMibCompliances, docsMcastCompliance=docsMcastCompliance, docsMcastCmtsGrpPhsCfgTable=docsMcastCmtsGrpPhsCfgTable, docsMcastDefGrpSvcClass=docsMcastDefGrpSvcClass, docsMcastCpeListCpeMacAddr=docsMcastCpeListCpeMacAddr, docsMcastBandwidthTable=docsMcastBandwidthTable, docsMcastCmtsGrpPhsCfgPhsVerify=docsMcastCmtsGrpPhsCfgPhsVerify, docsMcastCpeListCpeIpAddr=docsMcastCpeListCpeIpAddr, docsMcastCmtsGrpCfgEntry=docsMcastCmtsGrpCfgEntry, docsMcastBandwidthAdmittedAggrLowWater=docsMcastBandwidthAdmittedAggrLowWater, docsMcastCpeListEntry=docsMcastCpeListEntry, docsMcastStatsSrcPrefixLen=docsMcastStatsSrcPrefixLen, docsMcastBandwidthAdmittedAggrHighWater=docsMcastBandwidthAdmittedAggrHighWater, docsMcastCmtsGrpCfgEncryptConfigId=docsMcastCmtsGrpCfgEncryptConfigId)
146.048544
5,229
0.784684
3,020
30,086
7.816556
0.087417
0.009235
0.012582
0.015589
0.319199
0.278023
0.214564
0.206261
0.19728
0.179573
0
0.070145
0.075052
30,086
205
5,230
146.760976
0.778137
0.010703
0
0.010152
0
0
0.160612
0.063855
0
0
0
0
0
1
0
false
0
0.06599
0
0.06599
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
8ea4ff60dbd45c87a48eac14c5b632ff27ce3332
15,415
py
Python
tests/basic/sessions_client.py
billmcchesney1/sessionOffload
816d1572bff5f2b60bd402c22b7973f0370e1c47
[ "Apache-2.0" ]
null
null
null
tests/basic/sessions_client.py
billmcchesney1/sessionOffload
816d1572bff5f2b60bd402c22b7973f0370e1c47
[ "Apache-2.0" ]
null
null
null
tests/basic/sessions_client.py
billmcchesney1/sessionOffload
816d1572bff5f2b60bd402c22b7973f0370e1c47
[ "Apache-2.0" ]
null
null
null
#============LICENSE_START============================================================================================================= # Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. #=================================================================== # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #============LICENSE_END=============================================================================================================== from __future__ import print_function import random import logging import socket import struct import sys import grpc import openoffload_pb2 import openoffload_pb2_grpc class Sessions: ''' ''' def __init__(self): self._sessions= list() def addSessionMembers(self, session): self._sessions.append(session) def __iter__(self): ''' Returns the Iterator object ''' return SessionsIterator(self) class SessionsIterator: ''' Iterator class ''' def __init__(self, session_list): # Sessions object reference self._session_list = session_list # member variable to keep track of current index self._index = 0 def __next__(self): ''''Returns the next value from team object's lists ''' if self._index < (len(self._session_list._sessions) ) : result = (self._session_list._sessions[self._index]) self._index +=1 return result # End of Iteration raise StopIteration def session_addSession(stub): session=openoffload_pb2.sessionRequest() session.sessionId= 12345678910 session.inLif= 1 session.outLif= 2 session.sourceIp=int.from_bytes(socket.inet_pton(socket.AF_INET, "10.0.0.1"), byteorder=sys.byteorder) session.sourcePort=12345 session.destinationIp=int.from_bytes(socket.inet_pton(socket.AF_INET, "10.1.0.3"), byteorder=sys.byteorder) session.destinationPort=80 session.protocolId=openoffload_pb2._TCP session.ipVersion=openoffload_pb2._IPV4 session.action.actionType=openoffload_pb2._FORWARD session.action.actionNextHop = int.from_bytes(socket.inet_pton(socket.AF_INET,"12.2.3.4"),byteorder=sys.byteorder) sessions_value=Sessions() sessions_value.addSessionMembers(session) session_iterator=iter(sessions_value) addSessionResponse = stub.addSession( session_iterator) print("addSessionResponse:",addSessionResponse.requestStatus) return addSessionResponse.requestStatus def session_addSession_ipv6(stub): session=openoffload_pb2.sessionRequest() session.sessionId= 12345678910 session.inLif= 1 session.outLif= 2 session.sourceIpV6=socket.inet_pton(socket.AF_INET6, "2001:0db8:85a3:0000:0000:8a2e:0370:7332") session.sourcePort=4430 session.destinationIpV6=socket.inet_pton(socket.AF_INET6, "2001:0db8:85a3:0000:0000:8a03:0370:234F") session.destinationPort=80 session.protocolId=openoffload_pb2._TCP session.ipVersion=openoffload_pb2._IPV6 session.action.actionType=openoffload_pb2._FORWARD session.action.actionNextHop =int.from_bytes(socket.inet_pton(socket.AF_INET, "12.2.3.4"), byteorder=sys.byteorder) sessions_value=Sessions() sessions_value.addSessionMembers(session) session_iterator=iter(sessions_value) addSessionResponse = stub.addSession( session_iterator) print("addSessionResponse:",addSessionResponse.requestStatus) return addSessionResponse.requestStatus def session_getSession(stub): sessionResponse = stub.getSession( openoffload_pb2.sessionId(sessionId=1001)) print("Getting Session") print("SessionId:", sessionResponse.sessionId) print("Session State:", openoffload_pb2._SESSION_STATE.values_by_number[sessionResponse.sessionState].name) print("Session RequestStatus:",sessionResponse.requestStatus) print("Session SessionCloseCode:",sessionResponse.sessionCloseCode) print("Session InPackets",sessionResponse.inPackets) print("Session OutPackets",sessionResponse.outPackets) print("Session startTime",sessionResponse.startTime) print("Session endTime",sessionResponse.endTime) def session_deleteSession(stub): sessionResponse = stub.deleteSession( openoffload_pb2.sessionId(sessionId=1001)) print("Getting Session") print("SessionId:", sessionResponse.sessionId) print("Session RequestStatus:",sessionResponse.requestStatus) print("Session State:", openoffload_pb2._SESSION_STATE.values_by_number[sessionResponse.sessionState].name) print("Session RequestStatus:",sessionResponse.requestStatus) print("Session SessionCloseCode:",sessionResponse.sessionCloseCode) print("Session InPackets",sessionResponse.inPackets) print("Session OutPackets",sessionResponse.outPackets) print("Session startTime",sessionResponse.startTime) print("Session endTime",sessionResponse.endTime) def session_addMirrorSession(stub): session=openoffload_pb2.sessionRequest() session.sessionId= 12345678910 session.inLif= 1 session.outLif= 2 session.sourceIp=int.from_bytes(socket.inet_pton(socket.AF_INET, "10.0.0.1"), byteorder=sys.byteorder) session.sourcePort=12345 session.destinationIp=int.from_bytes(socket.inet_pton(socket.AF_INET, "10.1.0.4"), byteorder=sys.byteorder) session.destinationPort=80 session.protocolId=openoffload_pb2._UDP session.action.actionType=openoffload_pb2._MIRROR session.action.actionNextHop=int.from_bytes(socket.inet_pton(socket.AF_INET, "12.2.3.4"), byteorder=sys.byteorder) sessions_value=Sessions() sessions_value.addSessionMembers(session) session_iterator=iter(sessions_value) sessionResponse = stub.addSession( session_iterator) print("SessionResponse:",sessionResponse.requestStatus) return sessionResponse.requestStatus def session_getClosedSessions(stub): for sessionResponse in stub.getClosedSessions(openoffload_pb2.statisticsRequestArgs(pageSize=0)): print("### RECEIVED SESSION #####") print("SessionId:", sessionResponse.sessionId) print("Session State:", openoffload_pb2._SESSION_STATE.values_by_number[sessionResponse.sessionState].name) print("Session RequestStatus:",sessionResponse.requestStatus) print("Session SessionCloseCode:",sessionResponse.sessionCloseCode) print("Session InPackets",sessionResponse.inPackets) print("Session OutPackets",sessionResponse.outPackets) print("Session startTime",sessionResponse.startTime) print("Session endTime",sessionResponse.endTime) print("##########################") def session_getAllSessions(stub): for sessionResponse in stub.getClosedSessions(openoffload_pb2.statisticsRequestArgs(pageSize=0)): print("### RECEIVED SESSION #####") print("SessionId:", sessionResponse.sessionId) print("Session State:", openoffload_pb2._SESSION_STATE.values_by_number[sessionResponse.sessionState].name) print("Session RequestStatus:",sessionResponse.requestStatus) print("Session SessionCloseCode:",sessionResponse.sessionCloseCode) print("Session InPackets",sessionResponse.inPackets) print("Session OutPackets",sessionResponse.outPackets) print("Session startTime",sessionResponse.startTime) print("Session endTime",sessionResponse.endTime) print("##########################") def activation_registerDevice(stub): register = openoffload_pb2.deviceDescription() register.name="Acme-1" register.description = "Acme SmartNIC" register.type= openoffload_pb2._SMARTNIC register.sessionCapacity = 2000000 register.sessionRate = 100000 register.tcpSessionTimeout = 15 register.udpSessionTimeout = 30 registerResponse = stub.registerOffloadDevice(register) print("Adding Device Description: ", register.name) print("Status: ", openoffload_pb2._REGISTRATION_STATUS_TYPE.values_by_number[registerResponse.status].name) register = openoffload_pb2.deviceDescription() register.name="XDP" register.description = "Software Implementation" register.type= openoffload_pb2._SOFTWARE register.sessionCapacity = 200000 register.sessionRate = 10000 register.tcpSessionTimeout = 15 register.udpSessionTimeout = 30 registerResponse = stub.registerOffloadDevice(register) print("Adding Device Description: ", register.name) print("Status: ", openoffload_pb2._REGISTRATION_STATUS_TYPE.values_by_number[registerResponse.status].name) def activation_getAllDevices(stub): Devices = stub.getRegisteredOffloadDevices(openoffload_pb2.Empty()) listDevices = Devices.devices for device in listDevices: print("### Registered Device ####") print("Name: ", device.name) print("Description: ", device.description) print("Type: ", openoffload_pb2._INTERFACE_TYPE.values_by_number[device.type].name) print("Session Capacity: ", device.sessionCapacity) print("Session Rate: ",device.sessionRate) print("TCP Session Timeout: ", device.tcpSessionTimeout) print("UDP Session Timeout: ",device.udpSessionTimeout) def activation_activateDevice(stub): register = openoffload_pb2.deviceDescription() print("### Activating Device ####") register.name="Acme-1" register.description = "Acme SmartNIC" register.type= openoffload_pb2._SMARTNIC register.sessionCapacity = 2000000 register.sessionRate = 100000 register.tcpSessionTimeout = 15 register.udpSessionTimeout = 30 activateStatus = stub.activateOffload(register) print("Activated Device: ", register.name) print("Status: ", openoffload_pb2._ACTIVATION_STATUS_TYPE.values_by_number[activateStatus.status].name) def run_add_session_ipv4(): with open('ssl/server.crt', 'rb') as f: creds = grpc.ssl_channel_credentials(f.read()) channel = grpc.secure_channel('localhost:3443', creds) stub = openoffload_pb2_grpc.SessionTableStub(channel) print("-------------- Add IPv4 Session --------------") result = session_addSession(stub) print("Request Status=",result) def run_add_session_ipv6(): with open('ssl/server.crt', 'rb') as f: creds = grpc.ssl_channel_credentials(f.read()) channel = grpc.secure_channel('localhost:3443', creds) stub = openoffload_pb2_grpc.SessionTableStub(channel) print("-------------- Add IPv6 Session --------------") result = session_addSession_ipv6(stub) print("RequestStatus=",result) def run_get_session(): with open('ssl/server.crt', 'rb') as f: creds = grpc.ssl_channel_credentials(f.read()) channel = grpc.secure_channel('localhost:3443', creds) stub = openoffload_pb2_grpc.SessionTableStub(channel) print("-------------- Get Session --------------") session_getSession(stub) def run_delete_session(): with open('ssl/server.crt', 'rb') as f: creds = grpc.ssl_channel_credentials(f.read()) channel = grpc.secure_channel('localhost:3443', creds) stub = openoffload_pb2_grpc.SessionTableStub(channel) print("-------------- Delete Session --------------") session_deleteSession(stub) def run_add_mirror_session(): with open('ssl/server.crt', 'rb') as f: creds = grpc.ssl_channel_credentials(f.read()) channel = grpc.secure_channel('localhost:3443', creds) stub = openoffload_pb2_grpc.SessionTableStub(channel) print("-------------- Add Mirror Session --------------") result=session_addMirrorSession(stub) print("SESSIONID=",result) def run_get_closed_sessions(): with open('ssl/server.crt', 'rb') as f: creds = grpc.ssl_channel_credentials(f.read()) channel = grpc.secure_channel('localhost:3443', creds) stub = openoffload_pb2_grpc.SessionTableStub(channel) print("-------------- Check for Closed Sessions --------------") session_getClosedSessions(stub) def run_get_all_sessions(): with open('ssl/server.crt', 'rb') as f: creds = grpc.ssl_channel_credentials(f.read()) channel = grpc.secure_channel('localhost:3443', creds) stub = openoffload_pb2_grpc.SessionTableStub(channel) print("-------------- Get All Sessions --------------") session_getAllSessions(stub) def run_activation_sequence(): with open('ssl/server.crt', 'rb') as f: creds = grpc.ssl_channel_credentials(f.read()) activationChannel = grpc.secure_channel('localhost:3445',creds) activationStub = openoffload_pb2_grpc.ActivationStub(activationChannel) print("\n\n------------Creating new devices---------------------\n") activation_registerDevice(activationStub) print("\n------------- Listing available Devices --------------------\n") activation_getAllDevices(activationStub) print("\n------------- Activating Device --------------------\n") activation_activateDevice(activationStub) print("\n------------- Activation Tests Complete --------------------\n") def run(): # NOTE(gRPC Python Team): openoffload_pb2.close() is possible on a channel and should be # used in circumstances in which the with statement does not fit the needs # of the code. with open('ssl/server.crt', 'rb') as f: creds = grpc.ssl_channel_credentials(f.read()) channel = grpc.secure_channel('localhost:3443', creds) stub = openoffload_pb2_grpc.SessionTableStub(channel) print("-------------- Add IPv4 Session --------------") session_addSession(stub) print("-------------- Add IPv6 Session --------------") session_addSession_ipv6(stub) print("-------------- Get Session --------------") session_getSession(stub) print("-------------- Delete Session --------------") session_deleteSession(stub) print("-------------- Add Mirror and Forward Session --------------") session_addMirrorSession(stub) print("-------------- Check for Closed Sessions --------------") session_getClosedSessions(stub) session_getAllSessions(stub) with open('ssl/server.crt', 'rb') as f: creds = grpc.ssl_channel_credentials(f.read()) activationChannel = grpc.secure_channel('localhost:3445',creds) activationStub = openoffload_pb2_grpc.ActivationStub(activationChannel) print("\n\n------------Creating new devices---------------------\n") activation_registerDevice(activationStub) print("\n------------- Listing available Devices --------------------\n") activation_getAllDevices(activationStub) print("\n------------- Activating Device --------------------\n") activation_activateDevice(activationStub) print("\n------------- Activation Tests Complete --------------------\n") if __name__ == '__main__': logging.basicConfig() run()
46.996951
135
0.684333
1,578
15,415
6.513308
0.174905
0.058572
0.019264
0.01654
0.723001
0.703833
0.677564
0.673575
0.663359
0.663359
0
0.024343
0.155238
15,415
327
136
47.140673
0.764936
0.083166
0
0.663004
0
0
0.188725
0.026271
0
0
0
0
0
1
0.087912
false
0
0.032967
0
0.14652
0.300366
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
8eba1807a586b5e5836e265aee586f7917f0883d
541
py
Python
example.py
heironeous/mijiahygrothermolib
ebc8fbe1c964cf17dfb9c5846eed8d0498d8300b
[ "MIT" ]
null
null
null
example.py
heironeous/mijiahygrothermolib
ebc8fbe1c964cf17dfb9c5846eed8d0498d8300b
[ "MIT" ]
null
null
null
example.py
heironeous/mijiahygrothermolib
ebc8fbe1c964cf17dfb9c5846eed8d0498d8300b
[ "MIT" ]
null
null
null
from mijiahygrothermo import MijiaHygrothermo for device in MijiaHygrothermo.discover(): data = device.get_latest_properties() print("- {}".format(data['macAddress'])) print(" name: {}".format(data['name'])) print(" firmware: {}".format(data['firmwareVersion'])) print(" battery level: {}%".format(data['batteryPercentage'])) print(" temperature: {}*C".format(data['temperature'])) print(" humidity: {}%".format(data['humidity'])) print(" last data read: {}%".format(data['lastDataRead'])) print()
41.615385
67
0.648799
53
541
6.584906
0.490566
0.200573
0
0
0
0
0
0
0
0
0
0
0.144177
541
12
68
45.083333
0.75378
0
0
0
0
0
0.332717
0
0
0
0
0
0
1
0
false
0
0.090909
0
0.090909
0.727273
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
2
8ec520973d935ba2239967b3351035f72538ac71
2,551
py
Python
vmware_nsx/db/migration/alembic_migrations/versions/newton/expand/aede17d51d0f_timestamps.py
mail2nsrajesh/vmware-nsx
63154b510b9fd95c10fffae86bfc49073cafeb40
[ "Apache-2.0" ]
null
null
null
vmware_nsx/db/migration/alembic_migrations/versions/newton/expand/aede17d51d0f_timestamps.py
mail2nsrajesh/vmware-nsx
63154b510b9fd95c10fffae86bfc49073cafeb40
[ "Apache-2.0" ]
null
null
null
vmware_nsx/db/migration/alembic_migrations/versions/newton/expand/aede17d51d0f_timestamps.py
mail2nsrajesh/vmware-nsx
63154b510b9fd95c10fffae86bfc49073cafeb40
[ "Apache-2.0" ]
1
2019-06-21T18:07:53.000Z
2019-06-21T18:07:53.000Z
# Copyright 2016 VMware, Inc. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """add timestamp Revision ID: aede17d51d0f Revises: 5e564e781d77 Create Date: 2016-04-21 10:45:32.278433 """ # revision identifiers, used by Alembic. revision = 'aede17d51d0f' down_revision = '5e564e781d77' from alembic import op import sqlalchemy as sa tables = [ 'nsxv_router_bindings', 'nsxv_edge_vnic_bindings', 'nsxv_edge_dhcp_static_bindings', 'nsxv_internal_networks', 'nsxv_internal_edges', 'nsxv_security_group_section_mappings', 'nsxv_rule_mappings', 'nsxv_port_vnic_mappings', 'nsxv_router_ext_attributes', 'nsxv_tz_network_bindings', 'nsxv_port_index_mappings', 'nsxv_firewall_rule_bindings', 'nsxv_spoofguard_policy_network_mappings', 'nsxv_vdr_dhcp_bindings', 'nsxv_lbaas_loadbalancer_bindings', 'nsxv_lbaas_listener_bindings', 'nsxv_lbaas_pool_bindings', 'nsxv_lbaas_monitor_bindings', 'nsxv_lbaas_certificate_bindings', 'nsxv_subnet_ext_attributes', 'tz_network_bindings', 'neutron_nsx_network_mappings', 'neutron_nsx_security_group_mappings', 'neutron_nsx_firewall_section_mappings', 'neutron_nsx_rule_mappings', 'neutron_nsx_port_mappings', 'neutron_nsx_router_mappings', 'neutron_nsx_service_bindings', 'neutron_nsx_dhcp_bindings', 'multi_provider_networks', 'networkconnections', 'networkgatewaydevicereferences', 'networkgatewaydevices', 'networkgateways', 'maclearningstates', 'lsn_port', 'lsn', 'qosqueues', 'portqueuemappings', 'networkqueuemappings', 'nsx_l2gw_connection_mappings', 'neutron_nsx_qos_policy_mappings', 'vcns_router_bindings'] def upgrade(): for table in tables: op.add_column( table, sa.Column(u'created_at', sa.DateTime(), nullable=True) ) op.add_column( table, sa.Column(u'updated_at', sa.DateTime(), nullable=True) )
29.321839
78
0.71815
302
2,551
5.721854
0.5
0.076389
0.072917
0.018519
0.056713
0.028935
0.028935
0
0
0
0
0.02767
0.192474
2,551
86
79
29.662791
0.811165
0.290082
0
0.068966
0
0
0.600335
0.462269
0
0
0
0
0
1
0.017241
false
0
0.034483
0
0.051724
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
8ed9d714b91fc8772d59c6eaa3f24fa2364d9321
1,911
py
Python
py-use_api/examples/nhts_api.py
beenorgone-notebook/python-notebook
48e42b5be70e7ca06e8440a75516c055c961371c
[ "MIT" ]
null
null
null
py-use_api/examples/nhts_api.py
beenorgone-notebook/python-notebook
48e42b5be70e7ca06e8440a75516c055c961371c
[ "MIT" ]
null
null
null
py-use_api/examples/nhts_api.py
beenorgone-notebook/python-notebook
48e42b5be70e7ca06e8440a75516c055c961371c
[ "MIT" ]
1
2018-04-08T13:24:39.000Z
2018-04-08T13:24:39.000Z
# Use NHTSA API to Evaluate the Safety of your Car # NHTSA API: http://www.nhtsa.gov/webapi/Default.aspx?SafetyRatings/API/5 import requests from json import loads def print_result(apiUrl, apiParam, outputFormat): # Combine all three variables to make up the complete request URL response = requests.get(apiUrl + apiParam + outputFormat) # code below is only to handle JSON response object/format # use equivalent sets of commands to handle xml response object/format json_obj = response.json() # Load the Result (vehicle collection) from the JSON response print('------------------------------') print(' Result ') print('------------------------------') for objectCollection in json_obj['Results']: # Loop each vehicle in the vehicles collection for safetyRatingAttribute, safetyRatingValue in objectCollection.items(): print('{}: {}'.format(safetyRatingAttribute, safetyRatingValue)) # I. Discover available model years apiurl = 'http://www.nhtsa.gov/webapi/api/SafetyRatings' apiParam = '' outputFormat = '?format=json' print_result(apiUrl, apiParam, outputFormat) # II. Get a list of vehicle makers for a given model year. apiParam = '/modelyear/2013' print_result(apiUrl, apiParam, outputFormat) # III. Get a list of vehicle models for a given make and model year apiParam = '/modelyear/2013/make/VOLVO' print_result(apiUrl, apiParam, outputFormat) # IV. Get a list of vehicle versions for a given model year, make and model print_result(apiUrl, apiParam, outputFormat) ''' ------------------------------ Result ------------------------------ VehicleDescription : 2013 Volvo XC90 SUV AWD VehicleId : 7001 VehicleDescription : 2013 Volvo XC90 SUV FWD VehicleId : 7002 ''' # V. Get Detailed Safety Data apiParam = '/VehicleId/7002/' print_result(apiUrl, apiParam, outputFormat)
30.822581
76
0.676086
228
1,911
5.631579
0.416667
0.124611
0.141745
0.116822
0.366044
0
0
0
0
0
0
0.0211
0.18158
1,911
61
77
31.327869
0.799872
0.352695
0
0.304348
0
0
0.215064
0.085233
0
0
0
0
0
0
null
null
0
0.086957
null
null
0.434783
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
2
8ed9e4244b840a0c8861b92b9279742ab35944fb
26,668
py
Python
pysnmp-with-texts/CISCO-VOICE-ATM-DIAL-CONTROL-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/CISCO-VOICE-ATM-DIAL-CONTROL-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/CISCO-VOICE-ATM-DIAL-CONTROL-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module CISCO-VOICE-ATM-DIAL-CONTROL-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-VOICE-ATM-DIAL-CONTROL-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:19:12 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion, ConstraintsIntersection, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsUnion", "ConstraintsIntersection", "ValueRangeConstraint") cCallHistoryIndex, = mibBuilder.importSymbols("CISCO-DIAL-CONTROL-MIB", "cCallHistoryIndex") ciscoExperiment, = mibBuilder.importSymbols("CISCO-SMI", "ciscoExperiment") CvcSpeechCoderRate, CvcInBandSignaling, CvcGUid, CvcFaxTransmitRate = mibBuilder.importSymbols("CISCO-VOICE-COMMON-DIAL-CONTROL-MIB", "CvcSpeechCoderRate", "CvcInBandSignaling", "CvcGUid", "CvcFaxTransmitRate") callActiveSetupTime, callActiveIndex = mibBuilder.importSymbols("DIAL-CONTROL-MIB", "callActiveSetupTime", "callActiveIndex") ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex") ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance") NotificationType, Bits, Counter64, ObjectIdentity, IpAddress, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, Gauge32, iso, ModuleIdentity, Counter32, TimeTicks, Integer32, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "Bits", "Counter64", "ObjectIdentity", "IpAddress", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Gauge32", "iso", "ModuleIdentity", "Counter32", "TimeTicks", "Integer32", "Unsigned32") DisplayString, TruthValue, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TruthValue", "TextualConvention") ciscoVoiceAtmDialControlMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 10, 35)) ciscoVoiceAtmDialControlMIB.setRevisions(('2002-11-17 00:00', '1999-03-20 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: ciscoVoiceAtmDialControlMIB.setRevisionsDescriptions(('Modify the following objects: [1] Add a new enum definition in CvAtmSessionProtocol [2] Change the default value in cvAtmPeerCfgInBandSignaling ', 'Add new objects for handling the following: [1] Call History object ids 6-17 to bring MIB inline with stored Call History record. [2] Added Call Active Entry objects [3] Added Dialpeer Objects for VoATM ',)) if mibBuilder.loadTexts: ciscoVoiceAtmDialControlMIB.setLastUpdated('200211170000Z') if mibBuilder.loadTexts: ciscoVoiceAtmDialControlMIB.setOrganization('Cisco Systems, Inc.') if mibBuilder.loadTexts: ciscoVoiceAtmDialControlMIB.setContactInfo(' Cisco Systems Customer Service Postal: 170 W. Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-voice@cisco.com') if mibBuilder.loadTexts: ciscoVoiceAtmDialControlMIB.setDescription('This MIB module enhances the IETF Dial Control MIB (RFC2128) by providing ATM management information over a data network.') ciscoVoiceAtmDialControlMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 1)) cvAtmCallHistory = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1)) cvAtmCallActive = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2)) cvAtmDialPeer = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3)) class CvAtmSessionProtocol(TextualConvention, Integer32): description = 'Represents a Session Protocol used by Voice calls between a local and remote router via the ATM backbone. other - none of the following. ciscoSwitched - cisco proprietary ATM session protocol. ' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("other", 1), ("ciscoSwitched", 2), ("aal2Trunk", 3)) cvAtmCallHistoryTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1), ) if mibBuilder.loadTexts: cvAtmCallHistoryTable.setStatus('current') if mibBuilder.loadTexts: cvAtmCallHistoryTable.setDescription('This table is the ATM extension to the call history table of IETF Dial Control MIB. It contains ATM call leg information about specific voice over ATM call.') cvAtmCallHistoryEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1), ).setIndexNames((0, "CISCO-DIAL-CONTROL-MIB", "cCallHistoryIndex")) if mibBuilder.loadTexts: cvAtmCallHistoryEntry.setStatus('current') if mibBuilder.loadTexts: cvAtmCallHistoryEntry.setDescription('The information regarding a single ATM call leg. An entry of this table is created when its associated call history entry in the IETF Dial Control MIB is created and the call history entry contains information for the call establishment to the peer on the data network backbone via a voice over ATM peer. Th the IETF Dial Control MIB is deleted.') cvAtmCallHistoryConnectionId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 1), CvcGUid()).setMaxAccess("readonly") if mibBuilder.loadTexts: cvAtmCallHistoryConnectionId.setStatus('current') if mibBuilder.loadTexts: cvAtmCallHistoryConnectionId.setDescription('The global call identifier for the ATM call.') cvAtmCallHistoryVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly") if mibBuilder.loadTexts: cvAtmCallHistoryVpi.setStatus('current') if mibBuilder.loadTexts: cvAtmCallHistoryVpi.setDescription('The VPI used for this ATM connection.') cvAtmCallHistoryVci = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: cvAtmCallHistoryVci.setStatus('current') if mibBuilder.loadTexts: cvAtmCallHistoryVci.setDescription('The VCI used for this ATM connection.') cvAtmCallHistoryLowerIfName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cvAtmCallHistoryLowerIfName.setStatus('current') if mibBuilder.loadTexts: cvAtmCallHistoryLowerIfName.setDescription('The ifName of the ATM interface associated with this call.') cvAtmCallHistorySessionTarget = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cvAtmCallHistorySessionTarget.setStatus('current') if mibBuilder.loadTexts: cvAtmCallHistorySessionTarget.setDescription('The object indicates the session target of the peer that was used for the voice over ATM call. A zero length string indicates that the value is unavailable.') cvAtmCallHistorySubchannelID = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: cvAtmCallHistorySubchannelID.setStatus('current') if mibBuilder.loadTexts: cvAtmCallHistorySubchannelID.setDescription('The subchannel used for this ATM connection.') cvAtmCallHistorySessionProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 7), CvAtmSessionProtocol()).setMaxAccess("readonly") if mibBuilder.loadTexts: cvAtmCallHistorySessionProtocol.setStatus('current') if mibBuilder.loadTexts: cvAtmCallHistorySessionProtocol.setDescription('Indicates the session protocol used on this call.') cvAtmCallHistoryCalledNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 8), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cvAtmCallHistoryCalledNumber.setStatus('current') if mibBuilder.loadTexts: cvAtmCallHistoryCalledNumber.setDescription('Indicates the called party number for trunk connection calls. A zero length string indicates that this data is unavailable.') cvAtmCallHistoryDtmfRelay = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 9), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: cvAtmCallHistoryDtmfRelay.setStatus('current') if mibBuilder.loadTexts: cvAtmCallHistoryDtmfRelay.setDescription('Indicates if Dtmf Relay was enabled for the call.') cvAtmCallHistoryUseSeqNumbers = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 10), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: cvAtmCallHistoryUseSeqNumbers.setStatus('current') if mibBuilder.loadTexts: cvAtmCallHistoryUseSeqNumbers.setDescription('Indicates if Sequence Numbers were used on the voice data packets.') cvAtmCallActiveTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1), ) if mibBuilder.loadTexts: cvAtmCallActiveTable.setStatus('current') if mibBuilder.loadTexts: cvAtmCallActiveTable.setDescription('This table is the ATM extension to the active call table of IETF Dial Control MIB. It contains ATM call leg information about specific voice over ATM call.') cvAtmCallActiveEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1), ).setIndexNames((0, "DIAL-CONTROL-MIB", "callActiveSetupTime"), (0, "DIAL-CONTROL-MIB", "callActiveIndex")) if mibBuilder.loadTexts: cvAtmCallActiveEntry.setStatus('current') if mibBuilder.loadTexts: cvAtmCallActiveEntry.setDescription('The information regarding a single ATM call leg. An entry of this table is created when its associated call active entry in the IETF Dial Control MIB is created. The call active entry contains information for the call establishment to the peer on the data network backbone via a voice over ATM peer. The entry is deleted when its associated call active entry in the IETF Dial Control MIB is deleted.') cvAtmCallActiveConnectionId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 1), CvcGUid()).setMaxAccess("readonly") if mibBuilder.loadTexts: cvAtmCallActiveConnectionId.setStatus('current') if mibBuilder.loadTexts: cvAtmCallActiveConnectionId.setDescription('The global call identifier for the ATM call.') cvAtmCallActiveVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly") if mibBuilder.loadTexts: cvAtmCallActiveVpi.setStatus('current') if mibBuilder.loadTexts: cvAtmCallActiveVpi.setDescription('The VPI used for this ATM connection.') cvAtmCallActiveVci = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: cvAtmCallActiveVci.setStatus('current') if mibBuilder.loadTexts: cvAtmCallActiveVci.setDescription('The VCI used for this ATM connection.') cvAtmCallActiveLowerIfName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cvAtmCallActiveLowerIfName.setStatus('current') if mibBuilder.loadTexts: cvAtmCallActiveLowerIfName.setDescription('The ifName of the ATM interface associated with this call.') cvAtmCallActiveSessionTarget = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cvAtmCallActiveSessionTarget.setStatus('current') if mibBuilder.loadTexts: cvAtmCallActiveSessionTarget.setDescription('The object indicates the session target of the peer that is used for the voice over ATM call. A null string indicates that the value is unavailable.') cvAtmCallActiveSubchannelID = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: cvAtmCallActiveSubchannelID.setStatus('current') if mibBuilder.loadTexts: cvAtmCallActiveSubchannelID.setDescription('The subchannel used for this ATM connection.') cvAtmCallActiveSessionProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 7), CvAtmSessionProtocol()).setMaxAccess("readonly") if mibBuilder.loadTexts: cvAtmCallActiveSessionProtocol.setStatus('current') if mibBuilder.loadTexts: cvAtmCallActiveSessionProtocol.setDescription('Indicates the session protocol being used on this call.') cvAtmCallActiveCalledNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 8), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cvAtmCallActiveCalledNumber.setStatus('current') if mibBuilder.loadTexts: cvAtmCallActiveCalledNumber.setDescription('Indicates the called party number for trunk connection calls. A null string indicates that this data is unavailable.') cvAtmCallActiveDtmfRelay = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 9), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: cvAtmCallActiveDtmfRelay.setStatus('current') if mibBuilder.loadTexts: cvAtmCallActiveDtmfRelay.setDescription('Indicates if Dtmf Relay is enabled for the call.') cvAtmCallActiveUseSeqNumbers = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 10), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: cvAtmCallActiveUseSeqNumbers.setStatus('current') if mibBuilder.loadTexts: cvAtmCallActiveUseSeqNumbers.setDescription('Indicates if Sequence Numbers are used on the voice data packets.') cvAtmPeerCfgTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1), ) if mibBuilder.loadTexts: cvAtmPeerCfgTable.setStatus('current') if mibBuilder.loadTexts: cvAtmPeerCfgTable.setDescription('The table contains the Voice over ATM (ATM) peer specific information that is required to accept or place voice calls via the ATM backbone with the session protocol specified in cvAtmPeerCfgSessionProtocol.') cvAtmPeerCfgEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: cvAtmPeerCfgEntry.setStatus('current') if mibBuilder.loadTexts: cvAtmPeerCfgEntry.setDescription("A single ATM specific Peer. One entry per ATM encapsulation. The entry is created when its associated 'voiceOverATM(152)' encapsulation ifEntry is created. This entry is deleted when its associated ifEntry is deleted.") cvAtmPeerCfgSessionProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 1), CvAtmSessionProtocol().clone('ciscoSwitched')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cvAtmPeerCfgSessionProtocol.setStatus('current') if mibBuilder.loadTexts: cvAtmPeerCfgSessionProtocol.setDescription('The object specifies the session protocol to be used for Internet call between local and remote router via ATM backbone.') cvAtmPeerCfgInterfaceName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cvAtmPeerCfgInterfaceName.setStatus('current') if mibBuilder.loadTexts: cvAtmPeerCfgInterfaceName.setDescription('The object specifies the ifName on which the call will go out. A zero length string indicates that no interface has been assigned.') cvAtmPeerCfgVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cvAtmPeerCfgVpi.setStatus('current') if mibBuilder.loadTexts: cvAtmPeerCfgVpi.setDescription('The VPI used for this ATM connection.') cvAtmPeerCfgVci = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cvAtmPeerCfgVci.setStatus('current') if mibBuilder.loadTexts: cvAtmPeerCfgVci.setDescription('The VCI used for this ATM connection.') cvAtmPeerCfgVcName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cvAtmPeerCfgVcName.setStatus('current') if mibBuilder.loadTexts: cvAtmPeerCfgVcName.setDescription('The VC Name used for this ATM connection.') cvAtmPeerCfgCoderRate = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 6), CvcSpeechCoderRate().clone('g729Ar8000')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cvAtmPeerCfgCoderRate.setStatus('current') if mibBuilder.loadTexts: cvAtmPeerCfgCoderRate.setDescription('This object specifies the default voice coder rate of speech for the ATM peer.') cvAtmPeerCfgCodecBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 240)).clone(30)).setMaxAccess("readwrite") if mibBuilder.loadTexts: cvAtmPeerCfgCodecBytes.setStatus('current') if mibBuilder.loadTexts: cvAtmPeerCfgCodecBytes.setDescription('This object specifies the payload size for the voice packets to be transmitted during the call.') cvAtmPeerCfgFaxRate = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 8), CvcFaxTransmitRate().clone('voiceRate')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cvAtmPeerCfgFaxRate.setStatus('current') if mibBuilder.loadTexts: cvAtmPeerCfgFaxRate.setDescription("This object specifies the default transmit rate of FAX for the ATM peer. If the value of this object is 'none', then the Fax relay feature is disabled; otherwise the Fax relay feature is enabled.") cvAtmPeerCfgFaxBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 240)).clone(30)).setMaxAccess("readwrite") if mibBuilder.loadTexts: cvAtmPeerCfgFaxBytes.setStatus('current') if mibBuilder.loadTexts: cvAtmPeerCfgFaxBytes.setDescription('This object specifies the payload size for the fax packets to be transmitted during the call.') cvAtmPeerCfgInBandSignaling = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 10), CvcInBandSignaling().clone('cas')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cvAtmPeerCfgInBandSignaling.setStatus('current') if mibBuilder.loadTexts: cvAtmPeerCfgInBandSignaling.setDescription('This object specifies the type of in-band signaling used between the two end points of the call and is used by the router to determine how to interpret the ABCD signaling bits sent as part of the voice payload data.') cvAtmPeerCfgVADEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 11), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cvAtmPeerCfgVADEnable.setStatus('current') if mibBuilder.loadTexts: cvAtmPeerCfgVADEnable.setDescription("This object specifies whether or not VAD (Voice Activity Detection) is enabled. If the object value is 'false', then the voice data is continuously transmitted to ATM backbone.") cvAtmPeerCfgUseSeqNumbers = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 12), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cvAtmPeerCfgUseSeqNumbers.setStatus('current') if mibBuilder.loadTexts: cvAtmPeerCfgUseSeqNumbers.setDescription('This object specifies whether or not Sequence Numbers are generated on voice packets.') cvAtmPeerCfgDtmfRelay = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 13), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cvAtmPeerCfgDtmfRelay.setStatus('current') if mibBuilder.loadTexts: cvAtmPeerCfgDtmfRelay.setDescription('This object specifies whether or not Dtmf Relay is enabled. If it is then dtmf digits are transported as FRF11 Annex C packets, instead of being encoded as speech.') ciscoVoiceAtmDialControlMIBNotificationPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 2)) ciscoVoiceAtmDialControlMIBNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 2, 0)) ciscoVoiceAtmDialControlMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 3)) ciscoVoiceAtmDialControlMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 3, 1)) ciscoVoiceAtmDialControlMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 3, 2)) ciscoVoiceAtmDialControlMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 10, 35, 3, 1, 1)).setObjects(("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallHistoryGroup"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallActiveGroup"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoVoiceAtmDialControlMIBCompliance = ciscoVoiceAtmDialControlMIBCompliance.setStatus('current') if mibBuilder.loadTexts: ciscoVoiceAtmDialControlMIBCompliance.setDescription('The compliance statement for entities which implement the CISCO VOICE ATM DIAL CONTROL MIB') cvAtmCallHistoryGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 35, 3, 2, 1)).setObjects(("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallHistoryConnectionId"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallHistoryVpi"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallHistoryVci"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallHistoryLowerIfName"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallHistorySessionTarget"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallHistorySubchannelID"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallHistorySessionProtocol"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallHistoryCalledNumber"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallHistoryDtmfRelay"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallHistoryUseSeqNumbers")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cvAtmCallHistoryGroup = cvAtmCallHistoryGroup.setStatus('current') if mibBuilder.loadTexts: cvAtmCallHistoryGroup.setDescription('A collection of objects providing the ATM Call History entry capability.') cvAtmCallActiveGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 35, 3, 2, 2)).setObjects(("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallActiveConnectionId"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallActiveVpi"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallActiveVci"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallActiveLowerIfName"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallActiveSessionTarget"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallActiveSubchannelID"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallActiveSessionProtocol"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallActiveCalledNumber"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallActiveDtmfRelay"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallActiveUseSeqNumbers")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cvAtmCallActiveGroup = cvAtmCallActiveGroup.setStatus('current') if mibBuilder.loadTexts: cvAtmCallActiveGroup.setDescription('A collection of objects providing the ATM Call Active entry capability.') cvAtmPeerCfgGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 35, 3, 2, 3)).setObjects(("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgSessionProtocol"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgInterfaceName"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgVpi"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgVci"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgVcName"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgCoderRate"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgCodecBytes"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgFaxRate"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgFaxBytes"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgInBandSignaling"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgVADEnable"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgUseSeqNumbers"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgDtmfRelay")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cvAtmPeerCfgGroup = cvAtmPeerCfgGroup.setStatus('current') if mibBuilder.loadTexts: cvAtmPeerCfgGroup.setDescription('A collection of objects providing the ATM Dialpeer capability. These objects have been implemented as read-only.') mibBuilder.exportSymbols("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", cvAtmPeerCfgFaxRate=cvAtmPeerCfgFaxRate, cvAtmCallActiveSessionTarget=cvAtmCallActiveSessionTarget, cvAtmCallHistoryGroup=cvAtmCallHistoryGroup, cvAtmCallHistoryUseSeqNumbers=cvAtmCallHistoryUseSeqNumbers, ciscoVoiceAtmDialControlMIBConformance=ciscoVoiceAtmDialControlMIBConformance, cvAtmPeerCfgGroup=cvAtmPeerCfgGroup, cvAtmCallHistoryVpi=cvAtmCallHistoryVpi, cvAtmCallActiveVpi=cvAtmCallActiveVpi, cvAtmCallActiveDtmfRelay=cvAtmCallActiveDtmfRelay, cvAtmCallHistorySessionTarget=cvAtmCallHistorySessionTarget, cvAtmCallActiveSubchannelID=cvAtmCallActiveSubchannelID, cvAtmCallHistoryEntry=cvAtmCallHistoryEntry, cvAtmCallActiveUseSeqNumbers=cvAtmCallActiveUseSeqNumbers, cvAtmPeerCfgTable=cvAtmPeerCfgTable, cvAtmCallHistoryConnectionId=cvAtmCallHistoryConnectionId, cvAtmCallActiveSessionProtocol=cvAtmCallActiveSessionProtocol, cvAtmCallActive=cvAtmCallActive, cvAtmPeerCfgVci=cvAtmPeerCfgVci, ciscoVoiceAtmDialControlMIBNotifications=ciscoVoiceAtmDialControlMIBNotifications, cvAtmCallActiveLowerIfName=cvAtmCallActiveLowerIfName, cvAtmCallHistoryTable=cvAtmCallHistoryTable, cvAtmCallActiveEntry=cvAtmCallActiveEntry, cvAtmCallActiveCalledNumber=cvAtmCallActiveCalledNumber, cvAtmPeerCfgInterfaceName=cvAtmPeerCfgInterfaceName, cvAtmCallActiveTable=cvAtmCallActiveTable, ciscoVoiceAtmDialControlMIB=ciscoVoiceAtmDialControlMIB, cvAtmCallHistorySessionProtocol=cvAtmCallHistorySessionProtocol, cvAtmPeerCfgVcName=cvAtmPeerCfgVcName, cvAtmCallHistoryDtmfRelay=cvAtmCallHistoryDtmfRelay, ciscoVoiceAtmDialControlMIBCompliance=ciscoVoiceAtmDialControlMIBCompliance, cvAtmPeerCfgEntry=cvAtmPeerCfgEntry, cvAtmPeerCfgCoderRate=cvAtmPeerCfgCoderRate, ciscoVoiceAtmDialControlMIBObjects=ciscoVoiceAtmDialControlMIBObjects, cvAtmCallActiveConnectionId=cvAtmCallActiveConnectionId, cvAtmPeerCfgSessionProtocol=cvAtmPeerCfgSessionProtocol, CvAtmSessionProtocol=CvAtmSessionProtocol, cvAtmDialPeer=cvAtmDialPeer, cvAtmPeerCfgInBandSignaling=cvAtmPeerCfgInBandSignaling, cvAtmPeerCfgFaxBytes=cvAtmPeerCfgFaxBytes, cvAtmPeerCfgVpi=cvAtmPeerCfgVpi, cvAtmCallHistoryVci=cvAtmCallHistoryVci, cvAtmPeerCfgUseSeqNumbers=cvAtmPeerCfgUseSeqNumbers, cvAtmPeerCfgVADEnable=cvAtmPeerCfgVADEnable, cvAtmPeerCfgDtmfRelay=cvAtmPeerCfgDtmfRelay, cvAtmCallActiveVci=cvAtmCallActiveVci, cvAtmCallHistoryCalledNumber=cvAtmCallHistoryCalledNumber, ciscoVoiceAtmDialControlMIBNotificationPrefix=ciscoVoiceAtmDialControlMIBNotificationPrefix, cvAtmPeerCfgCodecBytes=cvAtmPeerCfgCodecBytes, ciscoVoiceAtmDialControlMIBGroups=ciscoVoiceAtmDialControlMIBGroups, cvAtmCallHistoryLowerIfName=cvAtmCallHistoryLowerIfName, cvAtmCallActiveGroup=cvAtmCallActiveGroup, PYSNMP_MODULE_ID=ciscoVoiceAtmDialControlMIB, ciscoVoiceAtmDialControlMIBCompliances=ciscoVoiceAtmDialControlMIBCompliances, cvAtmCallHistory=cvAtmCallHistory, cvAtmCallHistorySubchannelID=cvAtmCallHistorySubchannelID)
149.820225
2,912
0.793873
3,061
26,668
6.915714
0.132636
0.049317
0.086305
0.010015
0.483868
0.359488
0.30129
0.267372
0.233455
0.17587
0
0.043777
0.089471
26,668
177
2,913
150.666667
0.828021
0.013424
0
0.02994
0
0.11976
0.341774
0.076575
0
0
0
0
0
1
0
false
0
0.065868
0
0.095808
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
8eda27f4296deeabe0ac133ba85e5d620cffa145
1,183
py
Python
pythonaulas/Aula 18/Desafio 087.py
jrwarg/Estudos-Phyton
2207ec1ee9880501e12fbfecf7dfaaf38bb2ebca
[ "MIT" ]
null
null
null
pythonaulas/Aula 18/Desafio 087.py
jrwarg/Estudos-Phyton
2207ec1ee9880501e12fbfecf7dfaaf38bb2ebca
[ "MIT" ]
null
null
null
pythonaulas/Aula 18/Desafio 087.py
jrwarg/Estudos-Phyton
2207ec1ee9880501e12fbfecf7dfaaf38bb2ebca
[ "MIT" ]
null
null
null
""" DESAFIO 087: Mais Sobre Matriz em Python Aprimore o desafio anterior, mostrando no final: A) A soma de todos os valores pares digitados. B) A soma dos valores da terceira coluna. C) O maior valor da segunda linha. 0 [_][_][_] 1 [_][_][_] 2 [_][_][_] 0 1 2 """ matriz = [ [], [], [] ] pares = terceira = maior = 0 for linha in range(3): for coluna in range(3): n = int(input(f'Digite o valor para [{linha}, {coluna}]: ')) matriz[linha].append(n) print('-=' * 30) for linha in range(3): for coluna in range(3): print(f'[ {matriz[linha][coluna]} ]', end='') if matriz[linha][coluna] % 2 == 0: pares += matriz[linha][coluna] if coluna == 3 - 1: terceira += matriz[linha][coluna] if linha == 2 - 1: if coluna == 0: maior = matriz[linha][coluna] else: if matriz[linha][coluna] > maior: maior = matriz[linha][coluna] print() print('-=' * 30) print(f'A soma dos valores pares é {pares}.') print(f'A soma dos valores da terceira coluna é {terceira}.') print(f'O maior valor da segunda linha é {maior}.')
24.645833
68
0.554522
163
1,183
3.969325
0.312883
0.136012
0.183926
0.069552
0.316847
0.316847
0.197836
0.102009
0.102009
0.102009
0
0.029904
0.293322
1,183
47
69
25.170213
0.744019
0.222316
0
0.344828
0
0
0.218202
0.025219
0
0
0
0.021277
0
1
0
false
0
0
0
0
0.241379
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
2
8ee03759a83210f987674ce56679b12cc3407310
325
py
Python
longest_word.py
Aladeusi/python_algorithm_test_cases
552ac8e3a70a274ed7da0e9de37307b418f76a75
[ "Apache-2.0" ]
null
null
null
longest_word.py
Aladeusi/python_algorithm_test_cases
552ac8e3a70a274ed7da0e9de37307b418f76a75
[ "Apache-2.0" ]
null
null
null
longest_word.py
Aladeusi/python_algorithm_test_cases
552ac8e3a70a274ed7da0e9de37307b418f76a75
[ "Apache-2.0" ]
null
null
null
# this code returns longest word in a phrase or sentence def get_longest_word(sentence): longest_word="" for word in str(sentence).split(" "): longest_word=word if len(word) > len(longest_word) else longest_word return longest_word print get_longest_word("This is the begenning of algorithm")
29.545455
110
0.716923
48
325
4.666667
0.520833
0.392857
0.125
0
0
0
0
0
0
0
0
0
0.206154
325
11
111
29.545455
0.868217
0.166154
0
0
0
0
0.12963
0
0
0
0
0
0
0
null
null
0
0
null
null
0.2
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
2
8ee1e47e347f702d0bbef1018c0cd90f3ff138dc
539
py
Python
plugins/Limbo.py
Pr0Ger/SGSB
6adf8dc7ce3bf3d4b84f46b7d97aad376440e175
[ "MIT" ]
2
2015-05-10T01:48:36.000Z
2015-05-11T09:52:01.000Z
plugins/Limbo.py
Pr0Ger/SGSB
6adf8dc7ce3bf3d4b84f46b7d97aad376440e175
[ "MIT" ]
null
null
null
plugins/Limbo.py
Pr0Ger/SGSB
6adf8dc7ce3bf3d4b84f46b7d97aad376440e175
[ "MIT" ]
null
null
null
import os from lib.base_plugin import BasePlugin from lib.paths import SteamCloudPath, SteamGamesPath class LIMBOPlugin(BasePlugin): Name = "LIMBO" support_os = ["Windows", "Darwin"] def backup(self, _): _.add_folder('Data', os.path.join(SteamCloudPath, '48000'), 'remote') def restore(self, _): _.restore_folder('Data', os.path.join(SteamCloudPath, '48000'), 'remote') def detect(self): if os.path.isdir(os.path.join(SteamGamesPath, 'limbo')): return True return False
26.95
81
0.658627
63
539
5.507937
0.539683
0.069164
0.086455
0.092219
0.276657
0.276657
0.276657
0.276657
0.276657
0
0
0.023419
0.207792
539
19
82
28.368421
0.789227
0
0
0
0
0
0.09833
0
0
0
0
0
0
1
0.214286
false
0
0.214286
0
0.785714
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
8ef3f43f301ee2ae8e59946a36c7730f24602e33
665
py
Python
algorithms/code/leetcode/lc242_valid_anagram/lc242_valid_anagram.py
altermarkive/training
6a13f5b2f466156ad5db0e25da0e601d2404b4c3
[ "MIT" ]
null
null
null
algorithms/code/leetcode/lc242_valid_anagram/lc242_valid_anagram.py
altermarkive/training
6a13f5b2f466156ad5db0e25da0e601d2404b4c3
[ "MIT" ]
1
2022-02-16T11:28:56.000Z
2022-02-16T11:28:56.000Z
algorithms/code/leetcode/lc242_valid_anagram/lc242_valid_anagram.py
altermarkive/training
6a13f5b2f466156ad5db0e25da0e601d2404b4c3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # https://leetcode.com/problems/valid-anagram/ import unittest class Solution: def isAnagram(self, s: str, t: str) -> bool: if len(s) != len(t): return False s = set(s) t = set(t) return s == t class TestCode(unittest.TestCase): def test_aa_a(self): self.assertFalse(Solution().isAnagram('aa', 'a')) def test_a_b(self): self.assertFalse(Solution().isAnagram('a', 'b')) def test_anagram_nagaram(self): self.assertTrue(Solution().isAnagram('anagram', 'nagaram')) def test_rat_car(self): self.assertFalse(Solution().isAnagram('rat', 'car'))
23.75
67
0.607519
86
665
4.604651
0.430233
0.070707
0.143939
0.204545
0.272727
0
0
0
0
0
0
0.001957
0.231579
665
27
68
24.62963
0.772994
0.099248
0
0
0
0
0.041876
0
0
0
0
0
0.235294
1
0.294118
false
0
0.058824
0
0.588235
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
2
d6fe4c234417dcd08c96e7b3a51b683755aef2b8
1,613
py
Python
saveFiles.py
DrewDaddio/Automate-Python
552c8f4041c53c9ce1d6a7e1b8c11f640695453c
[ "Unlicense" ]
null
null
null
saveFiles.py
DrewDaddio/Automate-Python
552c8f4041c53c9ce1d6a7e1b8c11f640695453c
[ "Unlicense" ]
null
null
null
saveFiles.py
DrewDaddio/Automate-Python
552c8f4041c53c9ce1d6a7e1b8c11f640695453c
[ "Unlicense" ]
null
null
null
# Reading and Writing Plain Text Files print("""Steps to reading and writing text files in Python: Open 1. open() function: open's the file helloFile = open('<file name.txt>') helloFile.read() helloFile.close() Read 2. readlines() method: returns all of the lines as strings inside of a list. helloFile = open('<file name.txt>') helloFile.readlines() helloFile.close() Write mode 1. helloFile = open('<file name.txt>', 'w') # the w will turn the function into write mode. Write mode will overwrite items in the text file. helloFile.read() helloFile.close() Append mode 1. helloFile = open('<file name.txt>', 'a') # the w will turn the function into append mode. Append mode will add on to the file. helloFile.read() helloFile.close() For both the write & append mode then it will automatically create the file. helloFile.write(<text input>) helloFile.close() Relative filepath: If you don't put a directory in write mode then it will use the current working directory Shelve Module Used to save variables (list, dictionaries, complex data files) into the python program to binary shelf files using the shelve module. Then in the future you can call back to shelved data in order to use the it. They are stored as .bak, .dat, .dir file types. The files are binary files so they cannot be read in notepad. import shelve shelfFile = shelve.open('mydata') shelfFile['cats'] = ['zophie, 'Pooka', 'Simon', 'Fat-tail', 'Cleo] shelfFile.close() Keys Method shelfFile = shelve.open('mydata') shelfFile.keys .ist(shelfFile.keys()) list(shelfFile.values()) """)
32.26
187
0.721017
248
1,613
4.689516
0.423387
0.060189
0.058469
0.072227
0.264832
0.153052
0.096303
0
0
0
0
0.003019
0.178549
1,613
49
188
32.918367
0.874717
0.022319
0
0.333333
0
0.166667
0.989515
0.08519
0
0
0
0
0
1
0
true
0
0.027778
0
0.027778
0.027778
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
2
d9098d763335ec956248d7e1546c8eea6604a231
2,741
py
Python
test/runtime/operators_test/col2im_test.py
gunpowder78/webdnn
c659ea49007f91d178ce422a1eebe289516a71ee
[ "MIT" ]
1
2018-07-26T13:52:21.000Z
2018-07-26T13:52:21.000Z
test/runtime/operators_test/col2im_test.py
gunpowder78/webdnn
c659ea49007f91d178ce422a1eebe289516a71ee
[ "MIT" ]
null
null
null
test/runtime/operators_test/col2im_test.py
gunpowder78/webdnn
c659ea49007f91d178ce422a1eebe289516a71ee
[ "MIT" ]
null
null
null
import numpy as np from test.util import generate_kernel_test_case from webdnn.graph.graph import Graph from webdnn.graph.operators.col2im import Col2Im from webdnn.graph.order import OrderNHWC from webdnn.graph.variable import Variable def generate_data_311(): v_col = np.array([[[[[ [0, 0, 0], [0, 1, 2], [0, 3, 4], ], [ [0, 0, 0], [1, 2, 0], [3, 4, 0], ]], [[ [0, 1, 2], [0, 3, 4], [0, 0, 0], ], [ [1, 2, 0], [3, 4, 0], [0, 0, 0], ]]], [[[ [0, 0, 0], [0, 5, 6], [0, 7, 8], ], [ [0, 0, 0], [5, 6, 0], [7, 8, 0], ]], [[ [0, 5, 6], [0, 7, 8], [0, 0, 0], ], [ [5, 6, 0], [7, 8, 0], [0, 0, 0], ]]]]]).astype(np.float) # Order: (N, C, H, W, KH, KW) v_col = np.rollaxis(v_col, 1, 6).reshape(1, 2, 2, 3 * 3 * 2) # Order: NHWC v_col /= 4 v_im = np.array([[[ [1, 2], [3, 4] ], [ [5, 6], [7, 8] ]]]).astype(np.float) # Order: NCHW v_im = np.rollaxis(v_im, 1, 4) # Order: NHWC return v_im, v_col def generate_data_212(): v_col = np.array([[[[[ [0, 0], [0, 1] ], [ [0, 0], [2, 0] ]], [[ [0, 3], [0, 0], ], [ [4, 0], [0, 0] ]]], [[[ [0, 0], [0, 5] ], [ [0, 0], [6, 0] ]], [[ [0, 7], [0, 0] ], [ [8, 0], [0, 0], ]]]]]).astype(np.float) # Order: (N, C, H, W, KH, KW) v_col = np.rollaxis(v_col, 1, 6).reshape(1, 2, 2, 2 * 2 * 2) # Order: NHWC v_im = np.array([[[ [1, 2], [3, 4] ], [ [5, 6], [7, 8] ]]]).astype(np.float) # Order: NCHW v_im = np.rollaxis(v_im, 1, 4) # Order: NHWC return v_im, v_col def test_NHWC(): v_im, v_col = generate_data_311() col = Variable(v_col.shape, order=OrderNHWC) im, = Col2Im(None, ksize=3, padding=1, stride=1)(col) im.change_order(OrderNHWC) generate_kernel_test_case( description=f"Col2Im output=NHWC", backend=["webgpu", "webgl", "webassembly"], graph=Graph([col], [im]), inputs={col: v_col}, expected={im: v_im} ) def test_wide_stride_NHWC(): v_im, v_col = generate_data_212() col = Variable(v_col.shape, order=OrderNHWC) im, = Col2Im(None, ksize=2, padding=1, stride=2)(col) generate_kernel_test_case( description=f"Col2Im output=NHWC stride=2", backend=["webgpu", "webgl", "webassembly"], graph=Graph([col], [im]), inputs={col: v_col}, expected={im: v_im} )
21.084615
79
0.436702
390
2,741
2.94359
0.161538
0.066202
0.052265
0.034843
0.674216
0.674216
0.674216
0.602787
0.602787
0.515679
0
0.094911
0.361912
2,741
129
80
21.248062
0.561464
0.046333
0
0.727273
1
0
0.034165
0
0
0
0
0
0
1
0.036364
false
0
0.054545
0
0.109091
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
d90c5e886874eeadd6ac36224981356fd7d211a3
327
py
Python
{{cookiecutter.directory_name}}/utils/admin.py
walison17/cookiecutter-django
b3e3af9e012fa6be1424c01bfd6e695b06bae12f
[ "BSD-3-Clause" ]
12
2018-08-28T12:00:02.000Z
2020-03-13T23:19:00.000Z
{{cookiecutter.directory_name}}/utils/admin.py
walison17/cookiecutter-django
b3e3af9e012fa6be1424c01bfd6e695b06bae12f
[ "BSD-3-Clause" ]
1
2019-10-16T22:08:09.000Z
2019-10-16T22:08:09.000Z
{{cookiecutter.directory_name}}/utils/admin.py
walison17/cookiecutter-django
b3e3af9e012fa6be1424c01bfd6e695b06bae12f
[ "BSD-3-Clause" ]
4
2018-08-28T14:01:29.000Z
2020-01-07T11:51:48.000Z
#!coding:utf-8 from django.contrib import admin DATE_INPUT_FORMATS = "Y/m/d" class BaseAdmin(admin.ModelAdmin): exclude = ['created', 'updated'] class ReadOnlyAdmin(BaseAdmin): list_display = ['__str__'] def get_readonly_fields(self, *args, **kwargs): return [f.name for f in self.model._meta.fields]
20.4375
56
0.697248
44
327
4.954545
0.863636
0
0
0
0
0
0
0
0
0
0
0.003676
0.168196
327
15
57
21.8
0.797794
0.039755
0
0
0
0
0.083067
0
0
0
0
0
0
1
0.125
false
0
0.125
0.125
0.875
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
2
d916200126fb8583231565d8b59068a8258eb535
338
py
Python
dropkickApp/admin.py
wangvictoria/dropkick
99c5cbbd8642807f411e39acdae5bf43cf311897
[ "MIT" ]
null
null
null
dropkickApp/admin.py
wangvictoria/dropkick
99c5cbbd8642807f411e39acdae5bf43cf311897
[ "MIT" ]
null
null
null
dropkickApp/admin.py
wangvictoria/dropkick
99c5cbbd8642807f411e39acdae5bf43cf311897
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import MyFile, CustomParam, Contact # Register your models here. class MyFileAdmin(admin.ModelAdmin): list_display = ('uploaded_at', 'name') list_filter = ('uploaded_at', 'name') admin.site.register(MyFile, MyFileAdmin) admin.site.register(CustomParam) admin.site.register(Contact)
28.166667
48
0.769231
42
338
6.095238
0.52381
0.105469
0.199219
0
0
0
0
0
0
0
0
0
0.115385
338
12
49
28.166667
0.856187
0.076923
0
0
0
0
0.096463
0
0
0
0
0
0
1
0
false
0
0.25
0
0.625
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
d94c6a1530995ef5f7e5aab9c9fd784458bb3f04
1,996
py
Python
tests/test_matcher_truth_tables.py
sanjioh/django-header-filter
d348449619c71bdd6a2c957ee47c1c67a57bdec2
[ "MIT" ]
11
2016-12-03T21:45:30.000Z
2022-01-11T08:57:55.000Z
tests/test_matcher_truth_tables.py
sanjioh/django-header-filter
d348449619c71bdd6a2c957ee47c1c67a57bdec2
[ "MIT" ]
17
2019-07-12T20:36:40.000Z
2020-01-09T15:03:40.000Z
tests/test_matcher_truth_tables.py
sanjioh/django-header-filter
d348449619c71bdd6a2c957ee47c1c67a57bdec2
[ "MIT" ]
null
null
null
from operator import and_, or_, xor import pytest from header_filter.matchers import Header def test_not_true_equals_false(rf): h_name, h_value = 'HTTP_X_A', 'val_x' matcher = ~Header(h_name, h_value) request = rf.get('/', **{h_name: h_value}) assert matcher.match(request) is False def test_not_false_equals_true(rf): matcher = ~Header('HTTP_X_A', 'val_x') request = rf.get('/', **{'HTTP_X_B': 'val_y'}) assert matcher.match(request) is True @pytest.mark.parametrize('op,result', [(and_, True), (or_, True), (xor, False)], ids=['and', 'or', 'xor']) def test_true_op_true(op, result, rf): h_name_1, h_value_1 = 'HTTP_X_A', 'val_x' h_name_2, h_value_2 = 'HTTP_X_B', 'val_y' matcher = op(Header(h_name_1, h_value_1), Header(h_name_2, h_value_2)) request = rf.get('/', **{h_name_1: h_value_1, h_name_2: h_value_2}) assert matcher.match(request) is result @pytest.mark.parametrize('op,result', [(and_, False), (or_, True), (xor, True)], ids=['and', 'or', 'xor']) def test_true_op_false(op, result, rf): h_name, h_value = 'HTTP_X_A', 'val_x' matcher = op(Header(h_name, h_value), Header('HTTP_X_B', 'val_y')) request = rf.get('/', **{h_name: h_value, 'HTTP_X_C': 'val_z'}) assert matcher.match(request) is result @pytest.mark.parametrize('op,result', [(and_, False), (or_, True), (xor, True)], ids=['and', 'or', 'xor']) def test_false_op_true(op, result, rf): h_name, h_value = 'HTTP_X_B', 'val_y' matcher = op(Header('HTTP_X_A', 'val_x'), Header(h_name, h_value)) request = rf.get('/', **{h_name: h_value, 'HTTP_X_C': 'val_z'}) assert matcher.match(request) is result @pytest.mark.parametrize('op,result', [(and_, False), (or_, False), (xor, False)], ids=['and', 'or', 'xor']) def test_false_op_false(op, result, rf): matcher = Header('HTTP_X_A', 'val_w') | Header('HTTP_X_B', 'val_x') request = rf.get('/', **{'HTTP_X_C': 'val_y', 'HTTP_X_D': 'val_z'}) assert matcher.match(request) is result
39.137255
108
0.654309
340
1,996
3.494118
0.126471
0.063131
0.045455
0.083333
0.860269
0.737374
0.640572
0.54798
0.4133
0.38468
0
0.007067
0.149299
1,996
50
109
39.92
0.69258
0
0
0.277778
0
0
0.13477
0
0
0
0
0
0.166667
1
0.166667
false
0
0.083333
0
0.25
0
0
0
0
null
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
d95a44fce2db3fe25e77f87ab254f268a0da46c8
794
py
Python
HealthChecker/migrations/0009_auto_20200730_1113.py
ThePiz/ApiWatchTower
6e55053003d8f28d74565d0124c4d82e19e790e2
[ "MIT" ]
7
2021-04-23T12:05:33.000Z
2022-02-16T14:02:43.000Z
HealthChecker/migrations/0009_auto_20200730_1113.py
ThePiz/ApiWatchTower
6e55053003d8f28d74565d0124c4d82e19e790e2
[ "MIT" ]
4
2021-05-25T15:30:59.000Z
2021-07-15T20:24:07.000Z
HealthChecker/migrations/0009_auto_20200730_1113.py
ThePiz/ApiWatchTower
6e55053003d8f28d74565d0124c4d82e19e790e2
[ "MIT" ]
1
2021-04-23T12:05:39.000Z
2021-04-23T12:05:39.000Z
# Generated by Django 2.2.14 on 2020-07-30 09:13 from django.db import models, migrations from django.contrib.auth.models import User import os def apply_migration(apps, schema_editor): User.objects.create_superuser(os.environ.get('AWT_ADMIN', 'admin'), os.environ.get('AWT_EMAIL', 'admin@django.com'), os.environ.get('AWT_PASS', 'admin')) def revert_migration(apps, schema_editor): pass class Migration(migrations.Migration): dependencies = [ ('HealthChecker', '0008_auto_20200708_1902'), #('contenttypes', '__latest__'), #('auth', '__latest__'), #('admin', '__latest__'), #('dashboard', '__latest__'), #('sessions', '__latest__'), ] operations = [ migrations.RunPython(apply_migration, revert_migration) ]
29.407407
157
0.668766
91
794
5.472527
0.549451
0.054217
0.072289
0.090361
0
0
0
0
0
0
0
0.04908
0.178841
794
26
158
30.538462
0.714724
0.225441
0
0
1
0
0.144737
0.037829
0
0
0
0
0
1
0.142857
false
0.142857
0.214286
0
0.571429
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
d9621e47f3c0390d005d4a54f99c9015ce1d80bd
1,207
py
Python
python/test/year2020/test_day13.py
Farbfetzen/Advent_of_Code
246a7db8992bcff19fc0848cc6e5f556ab77cbfc
[ "MIT" ]
4
2021-12-07T14:06:11.000Z
2022-03-05T04:23:11.000Z
python/test/year2020/test_day13.py
Farbfetzen/Advent_of_Code
246a7db8992bcff19fc0848cc6e5f556ab77cbfc
[ "MIT" ]
6
2021-11-23T20:50:18.000Z
2022-03-06T13:42:21.000Z
python/test/year2020/test_day13.py
Farbfetzen/Advent_of_Code
246a7db8992bcff19fc0848cc6e5f556ab77cbfc
[ "MIT" ]
5
2021-12-11T23:22:22.000Z
2022-01-25T13:35:02.000Z
from unittest import TestCase from src.util.load_data import load_data from src.year2020.day13 import part_1, part_2, part_2_without_crt, prepare_data from test.decorators import sample data = load_data(2020, 13) @sample class Test2020Day13Samples(TestCase): prepared_data: list[str] @classmethod def setUpClass(cls) -> None: cls.prepared_data = prepare_data(data.samples[0]) def test_part_1(self) -> None: self.assertEqual(295, part_1(self.prepared_data)) def test_part_2(self) -> None: self.assertEqual(1068781, part_2(self.prepared_data)) def test_part_2_without_crt(self): self.assertEqual(1068781, part_2_without_crt(self.prepared_data)) class Test2020Day13(TestCase): prepared_data: list[str] @classmethod def setUpClass(cls) -> None: cls.prepared_data = prepare_data(data.input) def test_part_1(self) -> None: self.assertEqual(3882, part_1(self.prepared_data)) def test_part_2(self) -> None: self.assertEqual(867295486378319, part_2(self.prepared_data)) def test_part_2_without_crt(self) -> None: self.assertEqual(867295486378319, part_2_without_crt(self.prepared_data))
26.23913
81
0.726595
168
1,207
4.940476
0.244048
0.060241
0.079518
0.090361
0.713253
0.678313
0.678313
0.544578
0.460241
0.460241
0
0.091365
0.174814
1,207
45
82
26.822222
0.741968
0
0
0.357143
0
0
0
0
0
0
0
0
0.214286
1
0.285714
false
0
0.142857
0
0.571429
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
d9649b9f2f2357b4f0b680f595a3e205215edc5c
577
py
Python
at_tmp/model/FUNC/USERINFO/USER_OPT_INFO.py
zuoleilei3253/zuoleilei
e188b15a0aa4a9fde00dba15e8300e4b87973e2d
[ "Apache-2.0" ]
null
null
null
at_tmp/model/FUNC/USERINFO/USER_OPT_INFO.py
zuoleilei3253/zuoleilei
e188b15a0aa4a9fde00dba15e8300e4b87973e2d
[ "Apache-2.0" ]
null
null
null
at_tmp/model/FUNC/USERINFO/USER_OPT_INFO.py
zuoleilei3253/zuoleilei
e188b15a0aa4a9fde00dba15e8300e4b87973e2d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/10/31 10:41 # @Author : bxf # @File : USER_OPT_INFO.py # @Software: PyCharm from model.util.TMP_DB_OPT import * from model.FUNC.USERINFO.LOG_IN import * from model.util.TMP_MODEL import * ''' 操作数据: { "opt_uri":"", "opt_common":"", "opt_user":"", "opt_ip":"", } ''' class USER_OPT: def insertUserOpt(self,data): try: return_data=insertToDatabase("t_user_opt_info",toDict(data)) except Exception as e: return "用户操作信息插入失败,请检查"+str(e)
19.896552
73
0.592721
77
577
4.246753
0.675325
0.085627
0.067278
0.097859
0
0
0
0
0
0
0
0.029817
0.244367
577
28
74
20.607143
0.720183
0.22877
0
0
0
0
0.086826
0
0
0
0
0
0
1
0.111111
false
0
0.333333
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
d99073254e88d222fe83b91a143a9fd17d772043
77
py
Python
addons/iqbrims/settings/local-dist.py
tsukaeru/RDM-osf.io
2dc3e539322b6110e51772f8bd25ebdeb8e12d0e
[ "Apache-2.0" ]
11
2018-12-11T16:39:40.000Z
2022-02-26T09:51:32.000Z
addons/iqbrims/settings/local-dist.py
tsukaeru/RDM-osf.io
2dc3e539322b6110e51772f8bd25ebdeb8e12d0e
[ "Apache-2.0" ]
52
2018-04-13T05:03:21.000Z
2022-03-22T02:56:19.000Z
addons/iqbrims/settings/local-dist.py
tsukaeru/RDM-osf.io
2dc3e539322b6110e51772f8bd25ebdeb8e12d0e
[ "Apache-2.0" ]
16
2018-07-09T01:44:51.000Z
2021-06-30T01:57:16.000Z
# IQB-RIMS app credentials CLIENT_ID = 'changeme' CLIENT_SECRET = 'changeme'
19.25
26
0.766234
10
77
5.7
0.8
0
0
0
0
0
0
0
0
0
0
0
0.12987
77
3
27
25.666667
0.850746
0.311688
0
0
0
0
0.313725
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
d9928ec8949fb2faa42742a3698b82903f030a2f
316
py
Python
stack/tests/m_online_stock_span_test.py
dhrubach/python-code-recipes
14356c6adb1946417482eaaf6f42dde4b8351d2f
[ "MIT" ]
null
null
null
stack/tests/m_online_stock_span_test.py
dhrubach/python-code-recipes
14356c6adb1946417482eaaf6f42dde4b8351d2f
[ "MIT" ]
null
null
null
stack/tests/m_online_stock_span_test.py
dhrubach/python-code-recipes
14356c6adb1946417482eaaf6f42dde4b8351d2f
[ "MIT" ]
null
null
null
from stack.m_online_stock_span import StockSpanner class TestStockSpanner: def test_stock_span(self): sp = StockSpanner() sp.next(100) sp.next(80) sp.next(60) assert sp.next(70) == 2 sp.next(60) assert sp.next(75) == 4 assert sp.next(85) == 6
18.588235
50
0.572785
44
316
4
0.568182
0.238636
0.204545
0.159091
0.227273
0.227273
0
0
0
0
0
0.083333
0.316456
316
16
51
19.75
0.731481
0
0
0.181818
0
0
0
0
0
0
0
0
0.272727
1
0.090909
false
0
0.090909
0
0.272727
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
7943a0d84e5541c5310d3b230ae410809c8ec659
2,479
py
Python
util/compute_bootstrap.py
AnneBeyer/tgen
f7d7d13a85b8fd35919097c7d11345ddb9775d26
[ "Apache-2.0" ]
222
2015-06-15T14:39:41.000Z
2022-03-12T03:45:32.000Z
util/compute_bootstrap.py
AnneBeyer/tgen
f7d7d13a85b8fd35919097c7d11345ddb9775d26
[ "Apache-2.0" ]
40
2015-12-02T10:42:44.000Z
2021-12-05T17:31:11.000Z
util/compute_bootstrap.py
AnneBeyer/tgen
f7d7d13a85b8fd35919097c7d11345ddb9775d26
[ "Apache-2.0" ]
72
2015-07-27T08:11:48.000Z
2022-03-24T14:25:37.000Z
#!/usr/bin/env python # -"- coding: utf-8 -"- from argparse import ArgumentParser import os import re from subprocess import call from tgen.logf import log_info MY_PATH = os.path.dirname(os.path.abspath(__file__)) def lcall(arg_str): log_info(arg_str) return call(arg_str, shell=True) def get_confidence(metric, lines): for idx, line in enumerate(lines): if line.startswith(metric): lines = lines[idx:] break for idx, line in enumerate(lines): if line.startswith('Confidence of [Sys1'): return line.strip() return '???' def process_all(args): join_sets = os.path.join(MY_PATH, 'join_sets.pl') gen_log = os.path.join(MY_PATH, 'mteval-v13a-sig.pl') bootstrap = os.path.join(MY_PATH, 'paired_bootstrap_resampling_bleu_v13a.pl') # create the test and source files lcall("%s %s/s*/test-conc.sgm > %s/test-conc.sgm" % (join_sets, args.experiment_dirs[0], args.target_dir)) lcall("%s %s/s*/test-das.sgm > %s/test-das.sgm" % (join_sets, args.experiment_dirs[0], args.target_dir)) exp_nums = [] for exp_dir in args.experiment_dirs: exp_num = int(re.search(r'(?:^|/)([0-9]+)', exp_dir).group(1)) exp_nums.append(exp_num) lcall("%s %s/s*/out-text.sgm > %s/%d.sgm" % (join_sets, exp_dir, args.target_dir, exp_num)) os.chdir(args.target_dir) for exp_num in exp_nums: lcall("%s -s test-das.sgm -r test-conc.sgm -t %d.sgm -f %d.log.txt > %d.score.txt" % (gen_log, exp_num, exp_num, exp_num)) for skip, exp_num1 in enumerate(exp_nums): for exp_num2 in exp_nums[skip + 1:]: # recompute only if not done already (TODO switch for this) out_file = 'bootstrap.%dvs%d.txt' % (exp_num1, exp_num2) if not os.path.isfile(out_file) or os.stat(out_file).st_size == 0: lcall("%s %s.log.txt %s.log.txt 1000 0.01 > %s" % (bootstrap, exp_num1, exp_num2, out_file)) with open(out_file) as fh: bootstrap_data = fh.readlines() print "%dvs%d BLEU: %s" % (exp_num1, exp_num2, bootstrap_data[0].strip()) if __name__ == '__main__': ap = ArgumentParser() ap.add_argument('target_dir', type=str, help='Target directory for bootstrap logs') ap.add_argument('experiment_dirs', nargs='+', type=str, help='Experiment directories to use') args = ap.parse_args() process_all(args)
34.915493
99
0.626059
381
2,479
3.868766
0.349081
0.010855
0.023745
0.024423
0.176391
0.115332
0.115332
0.115332
0.115332
0.058345
0
0.015183
0.229528
2,479
70
100
35.414286
0.756545
0.053651
0
0.08
0
0.08
0.198975
0.017079
0
0
0
0.014286
0
0
null
null
0
0.1
null
null
0.02
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
1
0
0
0
0
0
0
0
0
2
79459e2f8419dcd519ea82a9a4ca9bd6bcf9d818
1,142
py
Python
Final/Final/71410.py
EllisBarnes00/COP-1000
8509e59e8a566c77295c714ddcb0f557c470358b
[ "Unlicense" ]
null
null
null
Final/Final/71410.py
EllisBarnes00/COP-1000
8509e59e8a566c77295c714ddcb0f557c470358b
[ "Unlicense" ]
null
null
null
Final/Final/71410.py
EllisBarnes00/COP-1000
8509e59e8a566c77295c714ddcb0f557c470358b
[ "Unlicense" ]
null
null
null
file = open("BoyNames.txt", "r") data = file.read() boys_names = data.split('\n') file = open("GirlNames.txt", "r") data = file.read() girls_names = data.split('\n') file.close() choice = input("Enter 'boy', 'girl', or 'both':") if choice == "boy": name = input("Enter a boy's name:") if name in boys_names: print(f"{name} was a popular boy's name between 2000 and 2009.") else: print(f"{name} was not a popular boy's name between 2000 and 2009.") elif choice == "girl": name = input("Enter a girl's name:") if name in girls_names: print(f"{name} was a popular girl's name between 2000 and 2009.") else: print(f"{name} was not a popular girl's name between 2000 and 2009.") elif choice == "both": bname = input("Enter a boy's name:") if bname in boys_names: print(f"{bname} was a popular boy's name between 2000 and 2009.") else: print(f"{bname} was not a popular boy's name between 2000 and 2009.") gname = input("Enter a girl's name:") if gname in girls_names: print(f"{gname} was a popular girl's name between 2000 and 2009.") else: print(f"{gname} was not a popular girl's name between 2000 and 2009.")
30.052632
72
0.671629
204
1,142
3.730392
0.191176
0.078844
0.12615
0.1682
0.817346
0.651774
0.651774
0.499343
0.473062
0.473062
0
0.068158
0.177758
1,142
37
73
30.864865
0.742279
0
0
0.193548
0
0
0.531524
0
0
0
0
0
0
1
0
false
0
0
0
0
0.258065
0
0
0
null
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
79585311fc6bb6f0adae7eb7844cadffacb1cf89
393
py
Python
climbing-stairs/climbing-stairs.py
rams1996/Dynamic-Programming
61e7b7d1576202215b5d0159372830c356f8dea8
[ "MIT" ]
null
null
null
climbing-stairs/climbing-stairs.py
rams1996/Dynamic-Programming
61e7b7d1576202215b5d0159372830c356f8dea8
[ "MIT" ]
null
null
null
climbing-stairs/climbing-stairs.py
rams1996/Dynamic-Programming
61e7b7d1576202215b5d0159372830c356f8dea8
[ "MIT" ]
null
null
null
class Solution:    def climbStairs(self, n: int) -> int:        dp={}        def dfs(total,c):            if total in dp:                return dp[total]            if total==n:                return 1            if total>n:                return 0            a=dfs(total+1,c+1)            b=dfs(total+2,c+1)            dp[total]=a+b            return a+b        return dfs(0,0)
24.5625
41
0.402036
53
393
2.981132
0.358491
0.151899
0.101266
0.177215
0
0
0
0
0
0
0
0.039801
0.48855
393
15
42
26.2
0.746269
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
2
7966c3e6ecd622eb59f2a7143aeea0a4bb431b40
5,870
py
Python
demo/settings/__init__.py
devkral/oscar-web-payments
0c5f5c780e503aab5eaa56541b4d9bf976f7e833
[ "BSD-2-Clause" ]
1
2018-05-29T18:32:59.000Z
2018-05-29T18:32:59.000Z
demo/settings/__init__.py
devkral/oscar-web-payments
0c5f5c780e503aab5eaa56541b4d9bf976f7e833
[ "BSD-2-Clause" ]
1
2018-05-28T08:28:19.000Z
2018-05-28T08:28:19.000Z
demo/settings/__init__.py
devkral/oscar-web-payments
0c5f5c780e503aab5eaa56541b4d9bf976f7e833
[ "BSD-2-Clause" ]
null
null
null
""" Django settings for django_dummy project. Generated by 'django-admin startproject' using Django 2.0.2. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os from oscar.defaults import * from oscar import OSCAR_MAIN_TEMPLATE_DIR from oscar import get_core_apps from oscar_web_payments import WEB_PAYMENTS_TEMPLATE_DIR from django.contrib.messages import constants as message_constants # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) MESSAGE_LEVEL = message_constants.DEBUG # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'NOTREALLY' # 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', 'django.contrib.sites', 'django.contrib.flatpages', 'django.contrib.sitemaps', 'wtforms_django', 'web_payments.django', ] + get_core_apps(['oscar_web_payments.checkout', 'oscar_web_payments.payment']) HAYSTACK_CONNECTIONS = { 'default': { 'ENGINE': 'haystack.backends.simple_backend.SimpleEngine', }, } MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'oscar.apps.basket.middleware.BasketMiddleware', 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', ] ROOT_URLCONF = 'demo.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [ os.path.join(BASE_DIR, "demo", 'templates'), WEB_PAYMENTS_TEMPLATE_DIR, OSCAR_MAIN_TEMPLATE_DIR ], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.template.context_processors.i18n', 'django.contrib.messages.context_processors.messages', 'oscar.apps.search.context_processors.search_form', 'oscar.apps.promotions.context_processors.promotions', 'oscar.apps.checkout.context_processors.checkout', 'oscar.apps.customer.notifications.context_processors.notifications', 'oscar.core.context_processors.metadata', ], 'libraries': { # should be autoloaded but is ignored "wtforms": "wtforms_django.templatetags.wtforms" }, }, }, ] WSGI_APPLICATION = 'demo.wsgi.application' # Database # https://docs.djangoproject.com/en/2.0/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } } # Password validation # https://docs.djangoproject.com/en/2.0/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', }, ] AUTHENTICATION_BACKENDS = ( 'oscar.apps.customer.auth_backends.EmailBackend', 'django.contrib.auth.backends.ModelBackend', ) SITE_ID=1 # overwrite in real applications EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' # Internationalization # https://docs.djangoproject.com/en/2.0/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True OSCAR_INITIAL_ORDER_STATUS = 'Pending' OSCAR_INITIAL_LINE_STATUS = 'Pending' OSCAR_ORDER_STATUS_PIPELINE = { 'Pending': ('Being processed', 'Cancelled',), 'Being processed': ('Processed', 'Cancelled',), 'Cancelled': (), } OSCAR_ALLOW_ANON_CHECKOUT = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/2.0/howto/static-files/ STATIC_URL = '/static/' STATIC_ROOT = 'static/' PAYMENT_MODEL = 'payment.Source' PAYMENT_HOST = 'localhost:8000' PAYMENT_PROTOCOL = "http" PAYMENT_VARIANTS_API = { 'dummy_capture': ('web_payments_dummy.DummyProvider', {}, {"verbose_name": "dummy capturing"}), 'dummy_nocapture': ('web_payments_dummy.DummyProvider', {"capture": False}, {"verbose_name": "dummy not capturing"}), 'directwithform': ('web_payments_externalpayments.DirectPaymentProvider', {'skipform': False, 'confirm': True}, {"verbose_name": "direct payment with form"}), 'direct': ('web_payments_externalpayments.DirectPaymentProvider', {}, {"verbose_name": "direct payment"}), 'iban': ('web_payments_externalpayments.BankTransferProvider', { "iban": "XX5604449899990000", "bic": "DABAIE2D"}, {"verbose_name": "IBAN"} ), }
30.894737
162
0.701193
623
5,870
6.433387
0.365971
0.068114
0.033932
0.043663
0.129491
0.116766
0.077844
0.077844
0.02994
0
0
0.010049
0.169336
5,870
189
163
31.058201
0.811936
0.180409
0
0.032258
1
0
0.534893
0.404513
0
0
0
0
0
1
0
false
0.040323
0.048387
0
0.048387
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
7974ee3f60fcf561fdeafa302735107b71a82437
916
py
Python
bin/rdbox/k8s_response_helper.py
rdbox-intec/rdbox-middleware
e7469c68ba745187d1db5514494663a3593164df
[ "MIT" ]
4
2019-04-25T06:30:18.000Z
2020-03-21T05:46:38.000Z
bin/rdbox/k8s_response_helper.py
fukuta-tatsuya-intec/rdbox-middleware
fc1612c655438aaebe5ec289764854b5fa887e09
[ "MIT" ]
21
2020-01-10T02:22:55.000Z
2021-09-27T07:30:46.000Z
bin/rdbox/k8s_response_helper.py
rdbox-intec/rdbox-middleware
e7469c68ba745187d1db5514494663a3593164df
[ "MIT" ]
5
2019-06-21T06:18:05.000Z
2020-09-18T02:28:25.000Z
#!/usr/bin/env python3 # coding: utf-8 class K8sResponseHelper(object): LOCATION_NOT_DEFINE = "NOT_DEFINE" NGINX_INGRESS_SUFFIX = "nginx-ingress-controller" def __init__(self): self.input_data_list = None def set_input_data_list(self, input_data_list): """ :return: K8sResponseHelper """ self.input_data_list = input_data_list return self def get_input_data_list(self): """ :return: InputDataList[kubernetes/client/models/*] """ return self.input_data_list def parse(self): """ Parse InputDataList[kubernetes/client/models/*] to list[K8sResponseExternal]. InputDataList[kubernetes/client/models/*] set by K8sResponseHelper.set_input_data_list() Execute From K8sResponseExternalList.call() :return: list[K8sResponseExternal] """ assert False
26.941176
100
0.648472
96
916
5.895833
0.427083
0.127208
0.183746
0.120141
0
0
0
0
0
0
0
0.011696
0.253275
916
33
101
27.757576
0.815789
0.400655
0
0
0
0
0.07489
0.052863
0
0
0
0
0.083333
1
0.333333
false
0
0
0
0.75
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
2
797bfa9a9b554b228bb5a92e77b673e7f5f1d24a
1,438
py
Python
upwork/namespaces.py
alexandru-grajdeanu/python-upwork
ffe7994c084c88c455a386791e4ec62a93bb7b6a
[ "Apache-2.0", "BSD-3-Clause" ]
1
2020-05-17T17:13:28.000Z
2020-05-17T17:13:28.000Z
upwork/namespaces.py
frolenkov-nikita/python-upwork
d052f5caedc632c73ad770b1f822a8a494f6b34b
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
upwork/namespaces.py
frolenkov-nikita/python-upwork
d052f5caedc632c73ad770b1f822a8a494f6b34b
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# Python bindings to Upwork API # python-upwork version 0.5 # (C) 2010-2015 Upwork from .compatibility import urlparse from .config import BASE_URL __all__ = ['Namespace', 'GdsNamespace'] class Namespace(object): """ A special 'proxy' class to keep API methods organized. Use this class for defining new routers. """ base_url = urlparse.urljoin(BASE_URL, 'api/') api_url = None version = 1 def __init__(self, client): self.client = client def full_url(self, url): """ Gets relative URL of API method and returns a full URL """ return "{0}{1}v{2}/{3}".format(self.base_url, self.api_url, self.version, url) #Proxied client's methods def get(self, url, data=None): return self.client.get(self.full_url(url), data) def post(self, url, data=None): return self.client.post(self.full_url(url), data) def put(self, url, data=None): return self.client.put(self.full_url(url), data) def delete(self, url, data=None): return self.client.delete(self.full_url(url), data) class GdsNamespace(Namespace): """Gds API only allows GET requests.""" base_url = urlparse.urljoin(BASE_URL, 'gds/') def post(self, url, data=None): return None def put(self, url, data=None): return None def delete(self, url, data=None): return None
24.793103
71
0.622392
200
1,438
4.37
0.325
0.088101
0.088101
0.120137
0.426773
0.406178
0.273455
0
0
0
0
0.014071
0.258693
1,438
57
72
25.22807
0.805816
0.199583
0
0.321429
0
0
0.039126
0
0
0
0
0
0
1
0.321429
false
0
0.071429
0.25
0.892857
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
2
7989bf8703cab399a92523616aa4bc94e49416c9
611
py
Python
ZhangBlogIdea/config/admin.py
huajianzhanggithub/ZhangBlogIdea
d125335352d8b7d4089fbb5da03462c8d489564d
[ "MIT" ]
1
2019-11-23T06:27:51.000Z
2019-11-23T06:27:51.000Z
ZhangBlogIdea/config/admin.py
huajianzhanggithub/ZhangBlogIdea
d125335352d8b7d4089fbb5da03462c8d489564d
[ "MIT" ]
null
null
null
ZhangBlogIdea/config/admin.py
huajianzhanggithub/ZhangBlogIdea
d125335352d8b7d4089fbb5da03462c8d489564d
[ "MIT" ]
null
null
null
from ZhangBlogIdea.base_admin import BaseOwnerAdmin from ZhangBlogIdea.custom_site import custom_site from django.contrib import admin from .models import Link, Sidebar # Register your models here. @admin.register(Link, site=custom_site) class LinkAdmin(BaseOwnerAdmin): list_display = ('title', 'href', 'status', 'weight', 'created_time') fields = ('title', 'href', 'status', 'weight') @admin.register(Sidebar, site=custom_site) class SidebarAdmin(BaseOwnerAdmin): list_display = ('title', 'display_type', 'content', 'status', 'created_time') fields = ('title', 'display_type', 'content')
32.157895
81
0.738134
72
611
6.111111
0.416667
0.090909
0.063636
0.086364
0
0
0
0
0
0
0
0
0.124386
611
18
82
33.944444
0.82243
0.042553
0
0
0
0
0.205832
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.833333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
798c19a416757ea9aa6cf6205b13241d52c1d6c7
870
py
Python
src/currency/migrations/0009_auto_20200510_0826.py
amediantsev/currency_exchange
55b4faca9878bf69e6ea8c1f6ef9308bcc64e6b5
[ "MIT" ]
null
null
null
src/currency/migrations/0009_auto_20200510_0826.py
amediantsev/currency_exchange
55b4faca9878bf69e6ea8c1f6ef9308bcc64e6b5
[ "MIT" ]
2
2021-09-08T01:46:19.000Z
2022-03-12T00:18:54.000Z
src/currency/migrations/0009_auto_20200510_0826.py
amediantsev/currency_exchange
55b4faca9878bf69e6ea8c1f6ef9308bcc64e6b5
[ "MIT" ]
null
null
null
# Generated by Django 2.2.10 on 2020-05-10 08:26 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('currency', '0008_auto_20200323_1117'), ] operations = [ migrations.AlterModelOptions( name='rate', options={}, ), migrations.AlterField( model_name='rate', name='buy', field=models.DecimalField(decimal_places=3, max_digits=5), ), migrations.AlterField( model_name='rate', name='currency', field=models.PositiveSmallIntegerField(choices=[(1, 'USD'), (2, 'EUR'), (3, 'RUB')]), ), migrations.AlterField( model_name='rate', name='sale', field=models.DecimalField(decimal_places=3, max_digits=5), ), ]
26.363636
97
0.550575
83
870
5.650602
0.554217
0.06823
0.159915
0.185501
0.4371
0.4371
0.200426
0.200426
0.200426
0
0
0.065657
0.317241
870
32
98
27.1875
0.723906
0.052874
0
0.461538
1
0
0.086375
0.027981
0
0
0
0
0
1
0
false
0
0.038462
0
0.153846
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
79a6789dcf2d2225a8acb764579a377cd6ff58d2
176
py
Python
perfplot/__init__.py
NicholasWon47/perfplot
9355dc5916ca270417f9d730df1fe7a7b43930ce
[ "MIT" ]
null
null
null
perfplot/__init__.py
NicholasWon47/perfplot
9355dc5916ca270417f9d730df1fe7a7b43930ce
[ "MIT" ]
null
null
null
perfplot/__init__.py
NicholasWon47/perfplot
9355dc5916ca270417f9d730df1fe7a7b43930ce
[ "MIT" ]
null
null
null
from perfplot.__about__ import __version__ from perfplot.main import bench, plot, save, show __all__ = [ "__version__", "bench", "plot", "show", "save", ]
16
49
0.636364
19
176
5.052632
0.578947
0.25
0
0
0
0
0
0
0
0
0
0
0.232955
176
10
50
17.6
0.711111
0
0
0
0
0
0.159091
0
0
0
0
0
0
1
0
false
0
0.222222
0
0.222222
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
79abbd91436b042579d82d42932029970b13ceb4
353
py
Python
neo/io/intanio.py
Mario-Kart-Felix/python-neo
951c97cf9eb56f5489da88940de920329e0f4c1b
[ "BSD-3-Clause" ]
199
2015-01-20T13:49:13.000Z
2022-03-21T18:35:29.000Z
neo/io/intanio.py
Mario-Kart-Felix/python-neo
951c97cf9eb56f5489da88940de920329e0f4c1b
[ "BSD-3-Clause" ]
905
2015-01-07T09:21:15.000Z
2022-03-31T16:29:44.000Z
neo/io/intanio.py
Mario-Kart-Felix/python-neo
951c97cf9eb56f5489da88940de920329e0f4c1b
[ "BSD-3-Clause" ]
178
2015-01-05T12:34:39.000Z
2022-02-20T23:06:52.000Z
from neo.io.basefromrawio import BaseFromRaw from neo.rawio.intanrawio import IntanRawIO class IntanIO(IntanRawIO, BaseFromRaw): __doc__ = IntanRawIO.__doc__ _prefered_signal_group_mode = 'group-by-same-units' def __init__(self, filename): IntanRawIO.__init__(self, filename=filename) BaseFromRaw.__init__(self, filename)
29.416667
55
0.76204
40
353
6.125
0.55
0.097959
0.195918
0
0
0
0
0
0
0
0
0
0.155807
353
11
56
32.090909
0.822148
0
0
0
0
0
0.053824
0
0
0
0
0
0
1
0.125
false
0
0.25
0
0.75
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
79b9a4e49784c3d214b1d569d4c04c35037639f7
846
py
Python
{{cookiecutter.project_slug}}/backend/app/app/api/api_v1/endpoints/utils.py
abnerjacobsen/full-stack
f9c08f65a8c8ef68127c671f12c43d29656dcf16
[ "MIT" ]
5
2020-04-23T16:40:56.000Z
2021-11-14T20:43:29.000Z
{{cookiecutter.project_slug}}/backend/app/app/api/api_v1/endpoints/utils.py
abnerjacobsen/full-stack
f9c08f65a8c8ef68127c671f12c43d29656dcf16
[ "MIT" ]
null
null
null
{{cookiecutter.project_slug}}/backend/app/app/api/api_v1/endpoints/utils.py
abnerjacobsen/full-stack
f9c08f65a8c8ef68127c671f12c43d29656dcf16
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Import installed modules # Import installed packages from webargs import fields from flask_apispec import doc, use_kwargs, marshal_with from flask_jwt_extended import jwt_required # Import app code from app.main import app from app.api.api_v1.api_docs import docs, security_params from app.core import config from app.core.celery_app import celery_app # Import Schemas from app.schemas.msg import MsgSchema # Import models @docs.register @doc(description="Test Celery worker", security=security_params, tags=["utils"]) @app.route(f"{config.API_V1_STR}/test-celery/", methods=["POST"]) @use_kwargs({"word": fields.String(required=True)}) @marshal_with(MsgSchema()) @jwt_required def route_test_celery(word): celery_app.send_task("app.worker.test_celery", args=[word]) return ({"msg": "Word received"}, 201)
28.2
80
0.769504
126
846
4.992063
0.444444
0.055644
0.034976
0
0
0
0
0
0
0
0
0.007968
0.109929
846
29
81
29.172414
0.827357
0.138298
0
0
0
0
0.139889
0.074792
0
0
0
0
0
1
0.058824
false
0
0.470588
0
0.588235
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
79c6bba799f167041d6728931c57ffacdc40ebff
1,717
py
Python
src/scs_dev/cmd/cmd_control_receiver.py
south-coast-science/scs_dev
b746adda020498b911cb92f28d4f07b14df996a2
[ "MIT" ]
2
2017-04-24T14:58:28.000Z
2020-05-27T08:53:46.000Z
src/scs_dev/cmd/cmd_control_receiver.py
south-coast-science/scs_dev
b746adda020498b911cb92f28d4f07b14df996a2
[ "MIT" ]
1
2020-07-13T14:33:59.000Z
2021-03-27T08:52:04.000Z
src/scs_dev/cmd/cmd_control_receiver.py
south-coast-science/scs_dev
b746adda020498b911cb92f28d4f07b14df996a2
[ "MIT" ]
1
2018-08-24T09:55:01.000Z
2018-08-24T09:55:01.000Z
""" Created on 17 Apr 2017 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) """ import optparse # -------------------------------------------------------------------------------------------------------------------- class CmdControlReceiver(object): """unix command line handler""" def __init__(self): """ Constructor """ self.__parser = optparse.OptionParser(usage="%prog [-r] [-e] [-v]", version="%prog 1.0") # optional... self.__parser.add_option("--receipt", "-r", action="store_true", dest="receipt", default=False, help="print receipt to stdout") self.__parser.add_option("--echo", "-e", action="store_true", dest="echo", default=False, help="echo data to stdout") self.__parser.add_option("--verbose", "-v", action="store_true", dest="verbose", default=False, help="report narrative to stderr") self.__opts, self.__args = self.__parser.parse_args() # ---------------------------------------------------------------------------------------------------------------- @property def receipt(self): return self.__opts.receipt @property def echo(self): return self.__opts.echo @property def verbose(self): return self.__opts.verbose # ---------------------------------------------------------------------------------------------------------------- def print_help(self, file): self.__parser.print_help(file) def __str__(self, *args, **kwargs): return "CmdControlReceiver:{receipt:%s, verbose:%s}" % (self.receipt, self.verbose)
29.101695
118
0.464764
150
1,717
5.06
0.413333
0.079051
0.051383
0.075099
0.071146
0.071146
0
0
0
0
0
0.005988
0.221899
1,717
58
119
29.603448
0.562126
0.277228
0
0.125
0
0
0.181364
0.02579
0
0
0
0
0
1
0.25
false
0
0.041667
0.166667
0.5
0.125
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
2
79d23c38ed92df2f18c112ae42927bcccb79779b
672
py
Python
a3/utils.py
CaoYuchen/16726
06ab1263de89056a6a4b20e79a8f089bbbd0cda2
[ "MIT" ]
null
null
null
a3/utils.py
CaoYuchen/16726
06ab1263de89056a6a4b20e79a8f089bbbd0cda2
[ "MIT" ]
null
null
null
a3/utils.py
CaoYuchen/16726
06ab1263de89056a6a4b20e79a8f089bbbd0cda2
[ "MIT" ]
null
null
null
# CMU 16-726 Learning-Based Image Synthesis / Spring 2022, Assignment 3 # The code base is based on the great work from CSC 321, U Toronto # https://www.cs.toronto.edu/~rgrosse/courses/csc321_2018/assignments/a4-code.zip import os import torch def to_var(x): """Converts numpy to variable.""" if torch.cuda.is_available(): x = x.cuda() return x def to_data(x): """Converts variable to numpy.""" if torch.cuda.is_available(): x = x.cpu() return x.detach().numpy() def create_dir(directory): """Creates a directory if it does not already exist. """ if not os.path.exists(directory): os.makedirs(directory)
23.172414
81
0.66369
102
672
4.313725
0.627451
0.022727
0.05
0.059091
0.109091
0.109091
0.109091
0
0
0
0
0.039623
0.21131
672
28
82
24
0.790566
0.485119
0
0.153846
0
0
0
0
0
0
0
0
0
1
0.230769
false
0
0.153846
0
0.538462
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
79dfb7587b30a68ce2ace3df0b3d276ad03886c9
4,062
py
Python
PikaBus/abstractions/AbstractPikaBus.py
alexbodn/PikaBus
5faf2e48f4d4deecb4428707f94bcf72a81cc3ee
[ "MIT" ]
7
2020-03-21T12:22:18.000Z
2022-02-10T11:43:51.000Z
PikaBus/abstractions/AbstractPikaBus.py
alexbodn/PikaBus
5faf2e48f4d4deecb4428707f94bcf72a81cc3ee
[ "MIT" ]
null
null
null
PikaBus/abstractions/AbstractPikaBus.py
alexbodn/PikaBus
5faf2e48f4d4deecb4428707f94bcf72a81cc3ee
[ "MIT" ]
1
2021-06-21T10:56:56.000Z
2021-06-21T10:56:56.000Z
import abc import datetime from typing import Union, List class AbstractPikaBus(abc.ABC): @property @abc.abstractmethod def connection(self): """ returns connection. :rtype: pika.adapters.blocking_connection """ pass @property @abc.abstractmethod def channel(self): """ returns channel. :rtype: pika.adapters.blocking_connection.BlockingChannel """ pass @abc.abstractmethod def Send(self, payload: dict, queue: str = None, headers: dict = None, messageType: str = None, exchange: str = None): """ :param dict payload: Payload to send :param str queue: Destination queue. If None, then it it sent back to the listener queue. :param dict headers: Optional headers to add or override :param str messageType: Specify message type if necessary. :param str exchange: Optional exchange to override with. """ pass @abc.abstractmethod def Publish(self, payload: dict, topic: str, headers: dict = None, messageType: str = None, exchange: str = None, mandatory: bool = True): """ :param dict payload: Payload to publish :param str topic: Topic. :param dict headers: Optional headers to add or override :param str messageType: Specify message type if necessary. :param str exchange: Optional exchange to override with. :param bool mandatory: Mandatory delivery to at least one consumer. """ pass @abc.abstractmethod def Reply(self, payload: dict, headers: dict = None, messageType: str = None, exchange: str = None): """ :param dict payload: Payload to reply :param dict headers: Optional headers to add or override :param str messageType: Specify message type if necessary. :param str exchange: Optional exchange to override with. """ pass @abc.abstractmethod def Defer(self, payload: dict, delay: datetime.timedelta, queue: str = None, headers: dict = None, messageType: str = None, exchange: str = None): """ :param dict payload: Payload to send :param datetime.timedelta delay: Delayed relative time from now to process the message. :param str queue: Destination queue. If None, then it it sent back to the listener queue. :param dict headers: Optional headers to add or override :param str messageType: Specify message type if necessary. :param str exchange: Optional exchange to override with. """ pass @abc.abstractmethod def Subscribe(self, topic: Union[str, List[str]], queue: str = None, exchange: str = None): """ :param str | [str] topic: A topic or a list of topics to subscribe. :param str queue: Queue to bind the topic(s). If None, then default listener queue is used. :param exchange: Optional exchange to override with. """ pass @abc.abstractmethod def Unsubscribe(self, topic: Union[str, List[str]], queue: str = None, exchange: str = None): """ :param str | [str] topic: A topic or a list of topics to unsubscribe. :param str queue: Queue to unbind the topic(s). If None, then default listener queue is used. :param exchange: Optional exchange to override with. """ pass @abc.abstractmethod def StartTransaction(self): """ Start a bus transaction. All outgoing messages will be stored until CommitTransaction() is triggered. """ pass @abc.abstractmethod def CommitTransaction(self): """ Commit ongoing bus transaction to send stored outgoing messages. """ pass
33.85
109
0.592319
450
4,062
5.342222
0.211111
0.049917
0.083195
0.079867
0.670965
0.614809
0.614809
0.614809
0.614809
0.594842
0
0
0.33161
4,062
119
110
34.134454
0.885451
0.477105
0
0.709091
0
0
0
0
0
0
0
0
0
1
0.181818
false
0.181818
0.054545
0
0.254545
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
8dbc813fa3d62f97fe5de5055aa8da29bb94b6ba
393
py
Python
users/models.py
KittLao/Whiteboard
10e292dcbc4348dd2d57f47034a30f643056a228
[ "MIT" ]
null
null
null
users/models.py
KittLao/Whiteboard
10e292dcbc4348dd2d57f47034a30f643056a228
[ "MIT" ]
null
null
null
users/models.py
KittLao/Whiteboard
10e292dcbc4348dd2d57f47034a30f643056a228
[ "MIT" ]
5
2020-09-15T07:26:31.000Z
2020-12-12T13:53:11.000Z
from django.db import models from django.contrib.auth.models import AbstractUser class User(AbstractUser): is_student = models.BooleanField() is_teacher = models.BooleanField() def __str__(self): return self.username class Student(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) def __str__(self): return self.user.username
21.833333
63
0.727735
48
393
5.729167
0.5
0.072727
0.072727
0.116364
0.145455
0
0
0
0
0
0
0
0.183206
393
17
64
23.117647
0.856698
0
0
0.181818
0
0
0
0
0
0
0
0
0
1
0.181818
false
0
0.181818
0.181818
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
2
8dc4c44e82af0450ea9094c71ca9cf1a62032ec2
346
py
Python
src/heights/rosalind_qs.py
cowboysmall/rosalind
021e4392a8fc946b97bbf86bbb8227b28bb5e462
[ "MIT" ]
null
null
null
src/heights/rosalind_qs.py
cowboysmall/rosalind
021e4392a8fc946b97bbf86bbb8227b28bb5e462
[ "MIT" ]
null
null
null
src/heights/rosalind_qs.py
cowboysmall/rosalind
021e4392a8fc946b97bbf86bbb8227b28bb5e462
[ "MIT" ]
null
null
null
import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), '../tools')) import files import sorts def main(argv): data = files.read_lines_of_ints(argv[0]) n = data[0][0] A = data[1] print ' '.join(str(item) for item in sorts.quick_sort(A, 0, n - 1)) if __name__ == "__main__": main(sys.argv[1:])
18.210526
71
0.630058
58
346
3.482759
0.551724
0.059406
0
0
0
0
0
0
0
0
0
0.025271
0.199422
346
18
72
19.222222
0.703971
0
0
0
0
0
0.049133
0
0
0
0
0
0
0
null
null
0
0.333333
null
null
0.083333
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
2
8dcbf4f90024ccd6bee1113b1fd6eae2c353cd5d
179
py
Python
src/example.py
1028sqnatc/aircraftmath
c61647d92d60cfe3afb200442c78fff9c6ab67d3
[ "Apache-2.0" ]
null
null
null
src/example.py
1028sqnatc/aircraftmath
c61647d92d60cfe3afb200442c78fff9c6ab67d3
[ "Apache-2.0" ]
null
null
null
src/example.py
1028sqnatc/aircraftmath
c61647d92d60cfe3afb200442c78fff9c6ab67d3
[ "Apache-2.0" ]
null
null
null
import math # https://docs.python.org/2/library/math.html def myFunc(x,a,b,c): d = (a * math.pow(x,2) ) + (b * x) + (c) return d def addAll(x,a,b,c): return x + a + b + c
17.9
45
0.564246
38
179
2.657895
0.5
0.059406
0.089109
0.118812
0
0
0
0
0
0
0
0.014184
0.212291
179
10
46
17.9
0.702128
0.240223
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0.166667
0.833333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
2