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
ed6a3ab7b10d68f5a936266b4ec7064d1ae865c6
313
py
Python
utils/mgmt.py
robinagist/manic
b1bdefbb11c7489164a0c08bb092ffecb5900261
[ "MIT" ]
2
2018-09-06T05:39:11.000Z
2020-10-13T21:40:06.000Z
utils/mgmt.py
robinagist/manic
b1bdefbb11c7489164a0c08bb092ffecb5900261
[ "MIT" ]
20
2018-01-20T05:00:23.000Z
2018-01-25T17:55:00.000Z
utils/mgmt.py
robinagist/Manic-Mapped-Memory-Server
b1bdefbb11c7489164a0c08bb092ffecb5900261
[ "MIT" ]
null
null
null
from utils.data import load_memfile_configs from utils.server import plain_response from sanic import response def get_mappedfile_configs(): cfgs = load_memfile_configs() return response.json(plain_response(cfgs, 0), status=200) def created_mapped_file(): pass def delete_mapped_file(): pass
19.5625
61
0.776358
44
313
5.25
0.568182
0.077922
0.155844
0
0
0
0
0
0
0
0
0.015094
0.153355
313
16
62
19.5625
0.856604
0
0
0.2
0
0
0
0
0
0
0
0
0
1
0.3
false
0.2
0.3
0
0.7
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
ed84e43c822be0079982b64c82f1405fcf82f103
1,114
py
Python
poll/models/telemetry_models.py
mirokrastev/poll-website
4f26cce3f838ab05de91f0e1dba34d9bc59927b4
[ "MIT" ]
3
2021-07-03T19:05:56.000Z
2022-02-02T17:22:17.000Z
poll/models/telemetry_models.py
mirokrastev/poll-website
4f26cce3f838ab05de91f0e1dba34d9bc59927b4
[ "MIT" ]
null
null
null
poll/models/telemetry_models.py
mirokrastev/poll-website
4f26cce3f838ab05de91f0e1dba34d9bc59927b4
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth import get_user_model from poll.models.poll_models import Poll class BasePollTelemetry(models.Model): """ This Base class gives a hint that in the future more Telemetry classes could be implemented. """ poll = models.ForeignKey(db_index=True, to=Poll, on_delete=models.CASCADE) def __str__(self): return str(self.poll) class Meta: abstract = True class AnonymousUserPollTelemetry(models.Model): """ To "store" the anonymous users that have viewed the Poll, I need to store their IP Addresses. It will NEVER be displayed outside the admin panel. """ anonymous_user = models.GenericIPAddressField(blank=True, null=True) def __str__(self): return self.anonymous_user class UsersPollTelemetry(BasePollTelemetry): users = models.ManyToManyField(db_index=True, to=get_user_model()) anonymous_users = models.ManyToManyField(db_index=True, to=AnonymousUserPollTelemetry) class Meta: verbose_name = 'PollTelemetry' verbose_name_plural = 'PollTelemetry'
27.85
91
0.72711
139
1,114
5.661871
0.489209
0.038119
0.041931
0.049555
0.099111
0.099111
0.099111
0
0
0
0
0
0.195691
1,114
39
92
28.564103
0.878348
0.213645
0
0.210526
0
0
0.031063
0
0
0
0
0
0
1
0.105263
false
0
0.157895
0.105263
0.842105
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
ed874fc7d5498d0b2a5744718551a9a50f16e262
141
py
Python
recumpiler/__init__.py
Toasterstein/recumpiler
390957cfaa8f60ffeb24adb43b91981dd445c6b9
[ "MIT" ]
null
null
null
recumpiler/__init__.py
Toasterstein/recumpiler
390957cfaa8f60ffeb24adb43b91981dd445c6b9
[ "MIT" ]
8
2021-03-23T21:54:29.000Z
2021-03-30T23:17:06.000Z
recumpiler/__init__.py
nklapste/recumpiler
80efcfad995211c010f4d962221ab576ca50229f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """recumpiler Recompile text to be semi-readable memey garbage. """ __version__ = (0, 0, 0)
14.1
49
0.638298
20
141
4.3
0.9
0.046512
0
0
0
0
0
0
0
0
0
0.034188
0.170213
141
9
50
15.666667
0.700855
0.737589
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
ed88b978abfea5e45767847b3da18555a2c06112
2,268
py
Python
python/clx/analytics/detector.py
mdemoret-nv/clx
3737706187d8f5720561e10b85cbd638c77b9267
[ "Apache-2.0" ]
null
null
null
python/clx/analytics/detector.py
mdemoret-nv/clx
3737706187d8f5720561e10b85cbd638c77b9267
[ "Apache-2.0" ]
null
null
null
python/clx/analytics/detector.py
mdemoret-nv/clx
3737706187d8f5720561e10b85cbd638c77b9267
[ "Apache-2.0" ]
null
null
null
import logging import torch import torch.nn as nn from abc import ABC, abstractmethod log = logging.getLogger(__name__) class Detector(ABC): def __init__(self, lr=0.001): self.lr = lr self.__model = None self.__optimizer = None self.__criterion = nn.CrossEntropyLoss() @property def model(self): return self.__model @property def optimizer(self): return self.__optimizer @property def criterion(self): return self.__criterion @abstractmethod def init_model(self, char_vocab, hidden_size, n_domain_type, n_layers): pass @abstractmethod def train_model(self, epoch, train_dataset): pass @abstractmethod def predict(self, epoch, train_dataset): pass def load_model(self, file_path): """ This function load already saved model and sets cuda parameters. :param file_path: File path of a model to loaded. :type file_path: string """ model = torch.load(file_path) model.eval() self.__model = model self.__set_model2cuda() self.__set_optimizer() def save_model(self, file_path): """ This function saves model to given location. :param file_path: File path to save model. :type file_path: string """ torch.save(self.model, file_path) def __set_parallelism(self): gpu_count = torch.cuda.device_count() if gpu_count > 1: log.info("%s GPUs!" % (gpu_count)) self.__model = nn.DataParallel(self.model) self.__set_model2cuda() else: self.__set_model2cuda() def __set_optimizer(self): self.__optimizer = torch.optim.RMSprop( self.model.parameters(), self.lr, weight_decay=0.0 ) def __set_model2cuda(self): if torch.cuda.is_available(): log.info("Setting cuda") self.model.cuda() def leverage_model(self, model): """This function leverages model by setting parallelism parameters. :param model: Model instance. :type model: RNNClassifier """ self.__model = model self.__set_parallelism() self.__set_optimizer()
25.772727
76
0.618166
266
2,268
4.966165
0.323308
0.06813
0.031794
0.031794
0.145344
0.043906
0
0
0
0
0
0.006845
0.291446
2,268
87
77
26.068966
0.815184
0.165344
0
0.280702
0
0
0.011111
0
0
0
0
0
0
1
0.22807
false
0.052632
0.070175
0.052632
0.368421
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
ed89a6742f6b5bd9686166ceba6ffc217d6833e0
5,366
py
Python
street_score/project/models.py
openplans/streetscore
ea27f70399b070d3199f236d99575c5962943d67
[ "MIT" ]
4
2017-01-02T22:30:44.000Z
2019-10-08T20:50:02.000Z
street_score/project/models.py
openplans/streetscore
ea27f70399b070d3199f236d99575c5962943d67
[ "MIT" ]
3
2020-02-11T21:42:47.000Z
2021-06-10T17:28:28.000Z
street_score/project/models.py
openplans/streetscore
ea27f70399b070d3199f236d99575c5962943d67
[ "MIT" ]
2
2017-03-09T12:24:57.000Z
2019-12-20T20:39:24.000Z
import math import random from django.db import models class TimeStampedModel (models.Model): """ Base model class for when you want to keep track of created and updated times for model instances. """ created_datetime = models.DateTimeField(auto_now_add=True) updated_datetime = models.DateTimeField(auto_now=True) class Meta: abstract = True class Rating (TimeStampedModel): criterion = models.ForeignKey('Criterion', related_name='ratings') """ The criterion that this rating is for. """ place1 = models.ForeignKey('Place', related_name='+') """ The first place that this rating compares """ place2 = models.ForeignKey('Place', related_name='+') """ The second place that this rating compares """ score = models.IntegerField() """ The rating score. 1 means that place1 "wins" over place2 for the given criterion. -1 means that place2 "wins". """ user_info = models.ForeignKey('sessions.UserInfo', null=True, related_name='ratings') """ The information for the user that made this rating. Not required, but useful for data analysis. """ def __unicode__(self): meaning = ({ -1: 'more {0} than', 1: 'less {0} than', 0: 'as {0} as', }) return ('Place #{p1} is {rating} place #{p2}').format( p1=self.place1, p2=self.place2, rating=meaning[self.score].format(self.criterion.prompt)) @property def question(self): """ The question string to which the rating is a response. """ return self.criterion.prompt class Criterion (models.Model): prompt = models.TextField() """ The question prompt, i.e. 'How clean is the street?'. """ def __unicode__(self): return self.prompt class Meta: verbose_name_plural = "criteria" class Place (models.Model): lat = models.FloatField() lon = models.FloatField() def __unicode__(self): return '({0}, {1})'.format(self.lat, self.lon) class UserInfo (TimeStampedModel): lat = models.FloatField(null=True) lon = models.FloatField(null=True) """ The user's location. """ SOURCES = ( ('ip', 'IP Address'), ('html5', 'HTML5 Geolocation API'), ) location_source = models.CharField(max_length=32, choices=SOURCES) location_data = models.CharField(max_length=2048) """ The method by which the location was obtained, and any additional information required to recreate the location. """ session = models.OneToOneField('sessions.Session') """ The Django browser session. """ def __unicode__(self): return u'User for session {key}'.format(key=self.session.session_key) class Meta: app_label = 'sessions' db_table = 'project_userinfo' verbose_name_plural = 'User info' class SiteConfiguration (models.Model): site = models.OneToOneField('sites.Site', related_name='config') google_analytics_key = models.CharField(max_length=256, null=True, blank=True) addthis_key = models.CharField(max_length=256, null=True, blank=True) addthis_title = models.CharField(max_length=256, null=True, blank=True) about_title = models.CharField(max_length=256, null=True, blank=True) about_text = models.TextField(null=True, blank=True) about_text_is_html = models.BooleanField(blank=True, default=False) def __unicode__(self): return 'Configuration for {0}'.format(self.site.name) class Meta: app_label = 'sites' db_table = 'project_siteconfiguration' class SurveySession (object): """ """ def __init__(self, questions=None, places=None): self.__questions = questions self.__places = places @property def questions(self): """ Get the set of questions for this survey. """ return self.__questions or self.init_questions() @property def places(self): """ Get the block for this session. """ return self.__places or self.init_places() def init_places(self): """ Load two places at random. TODO: Order the places by those that have the least questions answered about them first. """ places = Place.objects.all().order_by('?')[:2] self.__places = places return self.__places def init_questions(self): """ Load a set of questions at random. """ all_questions = ( Criterion.objects.all() .annotate(num_ratings=models.Count('ratings')) ) self.__questions = all_questions return self.__questions @classmethod def make_surveys(cls, count=1): # TODO: Choose the places and questions more smartly. Use the init_... # methods defined above (and make them better too). places = list(Place.objects.all().order_by('?')[:(count * 2)]) questions = list(Criterion.objects.all()) surveys = [] for i in range(count): place1 = places[2 * i] place2 = places[2 * i + 1] surveys.append(cls(places=[place1, place2], questions=questions)) return surveys
28.391534
89
0.617965
622
5,366
5.186495
0.307074
0.019839
0.033478
0.044637
0.149411
0.097954
0.066956
0.066956
0.066956
0.066956
0
0.013265
0.269474
5,366
188
90
28.542553
0.809694
0.095416
0
0.14433
0
0
0.081658
0.006281
0
0
0
0.010638
0
1
0.123711
false
0
0.030928
0.041237
0.618557
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
0
0
0
1
0
0
2
71ea1c59255a1948249d1ed69284c07777e83df9
669
py
Python
estafeta/core/__init__.py
Solunest/pyestafeta
cd24cea4973f5184f4cc7e72a653de8b22e32f69
[ "MIT" ]
null
null
null
estafeta/core/__init__.py
Solunest/pyestafeta
cd24cea4973f5184f4cc7e72a653de8b22e32f69
[ "MIT" ]
null
null
null
estafeta/core/__init__.py
Solunest/pyestafeta
cd24cea4973f5184f4cc7e72a653de8b22e32f69
[ "MIT" ]
null
null
null
from estafeta.core.client import EstafetaClient user = None password = None id = None account_number = None production = None from estafeta.core.error import EstafetaWrongData, EstafetaEmptyField __url_label__ = [ 'https://labelqa.estafeta.com/EstafetaLabel20/services/EstafetaLabelWS?wsdl', 'https://label.estafeta.com/EstafetaLabel20/services/EstafetaLabelWS?wsdl', ] __url_tracking__ = [ 'https://trackingqa.estafeta.com/Service.asmx?wsdl', 'https://tracking.estafeta.com/Service.asmx?wsdl', ] __url_quote__ = [ 'http://frecuenciacotizador.estafeta.com/Service.asmx?wsdl', 'http://frecuenciacotizador.estafeta.com/Service.asmx?wsdl', ]
25.730769
81
0.762332
74
669
6.675676
0.432432
0.133603
0.145749
0.178138
0.518219
0.412955
0.198381
0
0
0
0
0.0067
0.107623
669
25
82
26.76
0.820771
0
0
0.105263
0
0
0.532934
0
0
0
0
0
0
1
0
false
0.052632
0.105263
0
0.105263
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
1
0
0
0
0
0
2
71eac23074999fc487a373bc24fa920adcc09f2f
355
py
Python
yunionclient/api/flavors.py
tb365/mcclient_python
06647e7496b9e2c3aeb5ade1276c81871063159b
[ "Apache-2.0" ]
3
2021-09-22T11:34:08.000Z
2022-03-13T04:55:17.000Z
yunionclient/api/flavors.py
xhw20190116/python_yunionsdk
eb7c8c08300d38dac204ec4980a775abc9c7083a
[ "Apache-2.0" ]
13
2019-06-06T08:25:41.000Z
2021-07-16T07:26:10.000Z
yunionclient/api/flavors.py
xhw20190116/python_yunionsdk
eb7c8c08300d38dac204ec4980a775abc9c7083a
[ "Apache-2.0" ]
7
2019-03-31T05:43:36.000Z
2021-03-04T09:59:05.000Z
from yunionclient.common import base class FlavorManager(base.StandaloneManager): keyword = 'flavor' keyword_plural = 'flavors' _columns = ['ID', 'Name', 'VCPU_count', 'VMEM_size', 'Disk_size', 'Disk_backend', 'Ext_Bandwidth', 'Int_Bandwidth', 'is_public', 'Description', 'Aggregate_strategy', 'Flavor_type']
35.5
78
0.659155
36
355
6.194444
0.833333
0.071749
0
0
0
0
0
0
0
0
0
0
0.202817
355
9
79
39.444444
0.787986
0
0
0
0
0
0.377465
0
0
0
0
0
0
1
0
false
0
0.142857
0
0.714286
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
71eb86a2745c8b7f4f02262f1b986e3f1a2ff12c
238
py
Python
app.py
MaggieChege/New_App
75a2be55d50cf21305036c875af2120607ac33c0
[ "MIT" ]
null
null
null
app.py
MaggieChege/New_App
75a2be55d50cf21305036c875af2120607ac33c0
[ "MIT" ]
null
null
null
app.py
MaggieChege/New_App
75a2be55d50cf21305036c875af2120607ac33c0
[ "MIT" ]
null
null
null
from flask import Blueprint from flask_restful import Api # from restful import Api from resources.Hello import CategoryResource api_bp = Blueprint('api', __name__) api = Api(api_bp) # Route api.add_resource(CategoryResource, '/Hello')
21.636364
44
0.794118
33
238
5.484848
0.424242
0.099448
0.176796
0.220994
0
0
0
0
0
0
0
0
0.12605
238
11
45
21.636364
0.870192
0.121849
0
0
0
0
0.043478
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0.333333
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
1
0
0
0
0
2
71eee010313a8cf81a43634e4dc40236254335a2
464
py
Python
kaneda/tasks/rq.py
APSL/kaneda
739db48588d2237dd7710b16f23921d489182868
[ "MIT" ]
59
2016-05-03T20:17:59.000Z
2019-09-05T18:35:21.000Z
kaneda/tasks/rq.py
APSL/kaneda
739db48588d2237dd7710b16f23921d489182868
[ "MIT" ]
2
2018-07-25T21:51:18.000Z
2019-07-31T22:51:09.000Z
kaneda/tasks/rq.py
APSL/kaneda
739db48588d2237dd7710b16f23921d489182868
[ "MIT" ]
11
2016-05-20T19:07:46.000Z
2021-09-10T17:43:58.000Z
from __future__ import absolute_import from redis import Redis from rq.decorators import job from kaneda.utils import get_backend backend = get_backend() @job(queue='kaneda', connection=Redis()) def report(name, metric, value, tags, id_): """ RQ job to report metrics to the configured backend in kanedasettings.py To run the worker execute this command: rqworker [queue] """ return backend.report(name, metric, value, tags, id_)
23.2
75
0.724138
64
464
5.109375
0.546875
0.061162
0.097859
0.12844
0.165138
0.165138
0
0
0
0
0
0
0.19181
464
19
76
24.421053
0.872
0.286638
0
0
0
0
0.019544
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
71f079a62757b3209f276ed71f4e310438ef3cc4
248
py
Python
fibo.py
Baibhabswain/pythonPrograms
38380174f22e73b766b98754b00cd78a56b4bf59
[ "MIT" ]
1
2019-03-29T04:32:09.000Z
2019-03-29T04:32:09.000Z
fibo.py
Baibhabswain/pythonPrograms
38380174f22e73b766b98754b00cd78a56b4bf59
[ "MIT" ]
null
null
null
fibo.py
Baibhabswain/pythonPrograms
38380174f22e73b766b98754b00cd78a56b4bf59
[ "MIT" ]
null
null
null
def main(): a=input("The enter the first number :") b=input("The enter the second number :") range=input("Please enter the range") i=0;count=0; print a print b while count!=range: c=a+b count +=1 print c a=b b=c main()
17.714286
42
0.608871
45
248
3.355556
0.422222
0.15894
0.172185
0.211921
0
0
0
0
0
0
0
0.016129
0.25
248
14
43
17.714286
0.795699
0
0
0
0
0
0.334746
0
0
0
0
0
0
0
null
null
0
0
null
null
0.214286
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
71f7f60857c1f64d4455062df57530ef2f07c039
4,146
py
Python
wrappers/python/virgil_crypto_lib/foundation/kdf1.py
odidev/virgil-crypto-c
3d5d5cb19fdcf81eab08cdc63647f040117ecbd8
[ "BSD-3-Clause" ]
26
2018-12-17T13:45:25.000Z
2022-01-16T20:00:04.000Z
wrappers/python/virgil_crypto_lib/foundation/kdf1.py
odidev/virgil-crypto-c
3d5d5cb19fdcf81eab08cdc63647f040117ecbd8
[ "BSD-3-Clause" ]
4
2019-01-03T12:08:52.000Z
2021-12-02T05:21:13.000Z
wrappers/python/virgil_crypto_lib/foundation/kdf1.py
odidev/virgil-crypto-c
3d5d5cb19fdcf81eab08cdc63647f040117ecbd8
[ "BSD-3-Clause" ]
8
2019-01-24T08:22:06.000Z
2022-02-07T11:37:00.000Z
# Copyright (C) 2015-2021 Virgil Security, Inc. # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # (1) Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # (2) Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # # (3) Neither the name of the copyright holder nor the names of its # contributors may be used to endorse or promote products derived from # this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # # Lead Maintainer: Virgil Security Inc. <[email protected]> from ctypes import * from ._c_bridge import VscfKdf1 from ._c_bridge import VscfImplTag from ._c_bridge import VscfStatus from virgil_crypto_lib.common._c_bridge import Data from virgil_crypto_lib.common._c_bridge import Buffer from .alg import Alg from .kdf import Kdf class Kdf1(Alg, Kdf): """Virgil Security implementation of the KDF1 (ISO-18033-2) algorithm.""" def __init__(self): """Create underlying C context.""" self._lib_vscf_kdf1 = VscfKdf1() self._c_impl = None self._ctx = None self.ctx = self._lib_vscf_kdf1.vscf_kdf1_new() def __delete__(self, instance): """Destroy underlying C context.""" self._lib_vscf_kdf1.vscf_kdf1_delete(self.ctx) def set_hash(self, hash): self._lib_vscf_kdf1.vscf_kdf1_use_hash(self.ctx, hash.c_impl) def alg_id(self): """Provide algorithm identificator.""" result = self._lib_vscf_kdf1.vscf_kdf1_alg_id(self.ctx) return result def produce_alg_info(self): """Produce object with algorithm information and configuration parameters.""" result = self._lib_vscf_kdf1.vscf_kdf1_produce_alg_info(self.ctx) instance = VscfImplTag.get_type(result)[0].take_c_ctx(cast(result, POINTER(VscfImplTag.get_type(result)[1]))) return instance def restore_alg_info(self, alg_info): """Restore algorithm configuration from the given object.""" status = self._lib_vscf_kdf1.vscf_kdf1_restore_alg_info(self.ctx, alg_info.c_impl) VscfStatus.handle_status(status) def derive(self, data, key_len): """Derive key of the requested length from the given data.""" d_data = Data(data) key = Buffer(key_len) self._lib_vscf_kdf1.vscf_kdf1_derive(self.ctx, d_data.data, key_len, key.c_buffer) return key.get_bytes() @classmethod def take_c_ctx(cls, c_ctx): inst = cls.__new__(cls) inst._lib_vscf_kdf1 = VscfKdf1() inst.ctx = c_ctx return inst @classmethod def use_c_ctx(cls, c_ctx): inst = cls.__new__(cls) inst._lib_vscf_kdf1 = VscfKdf1() inst.ctx = inst._lib_vscf_kdf1.vscf_kdf1_shallow_copy(c_ctx) return inst @property def c_impl(self): return self._c_impl @property def ctx(self): return self._ctx @ctx.setter def ctx(self, value): self._ctx = self._lib_vscf_kdf1.vscf_kdf1_shallow_copy(value) self._c_impl = self._lib_vscf_kdf1.vscf_kdf1_impl(self.ctx)
37.017857
117
0.7137
592
4,146
4.766892
0.342905
0.065202
0.050673
0.053154
0.245571
0.228561
0.193125
0.134656
0.086464
0.086464
0
0.01459
0.206464
4,146
111
118
37.351351
0.843161
0.455379
0
0.181818
0
0
0
0
0
0
0
0
0
1
0.218182
false
0
0.145455
0.036364
0.509091
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
71f886304dcb6c6099a9de6e408e657ec12b3bde
497
py
Python
mysite/zoo/tests.py
leixiayang/django-python
8faa84867af5645d3d3d8e67fe8020be4dc68551
[ "Apache-2.0" ]
54
2015-07-13T14:23:01.000Z
2021-08-05T10:51:00.000Z
mysite/zoo/tests.py
leixiayang/django-python
8faa84867af5645d3d3d8e67fe8020be4dc68551
[ "Apache-2.0" ]
32
2015-07-16T08:58:00.000Z
2020-04-30T09:41:57.000Z
mysite/zoo/tests.py
leixiayang/django-python
8faa84867af5645d3d3d8e67fe8020be4dc68551
[ "Apache-2.0" ]
31
2015-07-13T15:32:01.000Z
2022-02-19T17:19:51.000Z
#!/usr/bin/env python # encoding: utf-8 from django.test import TestCase from zoo import models class AnimalTestCase(TestCase): """Test animals' sound """ def test_dog_says(self): """test dog says woof or not """ dog = models.Dog(name='Snoopy') self.assertEqual(dog.says(), 'woof') def test_cat_says(self): """test cat says meow of not """ cat = models.Cat(name='Garfield') self.assertEqual(cat.says(), 'meow')
18.407407
44
0.593561
64
497
4.546875
0.5
0.072165
0.075601
0
0
0
0
0
0
0
0
0.002747
0.267606
497
26
45
19.115385
0.796703
0.259557
0
0
0
0
0.062678
0
0
0
0
0
0.222222
1
0.222222
false
0
0.222222
0
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
71fa640b3932ba3d1df289310da43d75dd4a2089
4,239
py
Python
litex_boards/platforms/myminieye_runber.py
chmousset/litex-boards
c081177d77f37a4ea6cff150d42a69bd6f0abbc2
[ "BSD-2-Clause" ]
null
null
null
litex_boards/platforms/myminieye_runber.py
chmousset/litex-boards
c081177d77f37a4ea6cff150d42a69bd6f0abbc2
[ "BSD-2-Clause" ]
null
null
null
litex_boards/platforms/myminieye_runber.py
chmousset/litex-boards
c081177d77f37a4ea6cff150d42a69bd6f0abbc2
[ "BSD-2-Clause" ]
null
null
null
# # This file is part of LiteX-Boards. # # Copyright (c) 2021 Gwenhael Goavec-Merou <[email protected]> # SPDX-License-Identifier: BSD-2-Clause from migen import * from litex.build.generic_platform import * from litex.build.gowin.platform import GowinPlatform from litex.build.openfpgaloader import OpenFPGALoader # IOs ---------------------------------------------------------------------------------------------- _io = [ # Clk / Rst ("clk12", 0, Pins("4"), IOStandard("LVCMOS33")), # Leds ("user_led", 0, Pins("23"), IOStandard("LVCMOS33")), ("user_led", 1, Pins("24"), IOStandard("LVCMOS33")), ("user_led", 2, Pins("25"), IOStandard("LVCMOS33")), ("user_led", 3, Pins("26"), IOStandard("LVCMOS33")), ("user_led", 4, Pins("27"), IOStandard("LVCMOS33")), ("user_led", 5, Pins("28"), IOStandard("LVCMOS33")), ("user_led", 6, Pins("29"), IOStandard("LVCMOS33")), ("user_led", 7, Pins("30"), IOStandard("LVCMOS33")), # RGB led, active-low ("rgb_led", 0, Subsignal("r", Pins("112")), Subsignal("g", Pins("114")), Subsignal("b", Pins("113")), IOStandard("LVCMOS33"), ), ("rgb_led", 1, Subsignal("r", Pins("106")), Subsignal("g", Pins("111")), Subsignal("b", Pins("110")), IOStandard("LVCMOS33"), ), ("rgb_led", 2, Subsignal("r", Pins("101")), Subsignal("g", Pins("104")), Subsignal("b", Pins("102")), IOStandard("LVCMOS33"), ), ("rgb_led", 3, Subsignal("r", Pins("98")), Subsignal("g", Pins("100")), Subsignal("b", Pins("99")), IOStandard("LVCMOS33"), ), # Switches ("user_sw", 0, Pins("75"), IOStandard("LVCMOS33")), ("user_sw", 1, Pins("76"), IOStandard("LVCMOS33")), ("user_sw", 2, Pins("78"), IOStandard("LVCMOS33")), ("user_sw", 3, Pins("79"), IOStandard("LVCMOS33")), ("user_sw", 4, Pins("80"), IOStandard("LVCMOS33")), ("user_sw", 5, Pins("81"), IOStandard("LVCMOS33")), ("user_sw", 6, Pins("82"), IOStandard("LVCMOS33")), ("user_sw", 7, Pins("83"), IOStandard("LVCMOS33")), # Buttons. ("user_btn", 0, Pins("58"), IOStandard("LVCMOS33")), ("user_btn", 1, Pins("59"), IOStandard("LVCMOS33")), ("user_btn", 2, Pins("60"), IOStandard("LVCMOS33")), ("user_btn", 3, Pins("61"), IOStandard("LVCMOS33")), ("user_btn", 4, Pins("62"), IOStandard("LVCMOS33")), ("user_btn", 5, Pins("63"), IOStandard("LVCMOS33")), ("user_btn", 6, Pins("64"), IOStandard("LVCMOS33")), ("user_btn", 7, Pins("65"), IOStandard("LVCMOS33")), # Serial. # FT232H has only one interface -> use (arbitrary) two pins from J2 to # connect an external USB<->serial adapter ("serial", 0, Subsignal("tx", Pins("116")), # J2.17 Subsignal("rx", Pins("115")), # J2.18 IOStandard("LVCMOS33") ), # Seven Segment ("seven_seg_dig", 0, Pins("137"), IOStandard("LVCMOS33")), ("seven_seg_dig", 1, Pins("140"), IOStandard("LVCMOS33")), ("seven_seg_dig", 2, Pins("141"), IOStandard("LVCMOS33")), ("seven_seg_dig", 3, Pins("7"), IOStandard("LVCMOS33")), ("seven_seg", 0, Pins("138 142 9 11 12 139 8 10"), IOStandard("LVCMOS33")), ] # Connectors --------------------------------------------------------------------------------------- _connectors = [ ["J1", "- 38 39 40 41 42 43 44 66 67 68 69 70 71 72 96 95 94 93 -"], ["J2", "- 136 135 134 133 132 131 130 129 128 123 122 121 120 119 118 117 116 115 -"], ] # Platform ----------------------------------------------------------------------------------------- class Platform(GowinPlatform): default_clk_name = "clk12" default_clk_period = 1e9/12e6 def __init__(self, toolchain="gowin"): GowinPlatform.__init__(self, "GW1N-UV4LQ144C6/I5", _io, _connectors, toolchain=toolchain, devicename="GW1N-4") self.toolchain.options["use_mspi_as_gpio"] = 1 def create_programmer(self): return OpenFPGALoader("runber") def do_finalize(self, fragment): GowinPlatform.do_finalize(self, fragment) self.add_period_constraint(self.lookup_request("clk12", loose=True), 1e9/12e6)
36.543103
118
0.550366
490
4,239
4.632653
0.406122
0.277533
0.203524
0.077093
0.038326
0
0
0
0
0
0
0.103147
0.190375
4,239
115
119
36.86087
0.558275
0.152394
0
0.1125
0
0
0.256927
0
0
0
0
0
0
1
0.0375
false
0
0.05
0.0125
0.1375
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
9c013815ab64fbbe61aec8c1d395c39f802c887c
361
py
Python
2020/day_01/__main__.py
d02d33pak/Advent-Of-Code
765b0302c256ad61864095a537a3f6379901b1c2
[ "MIT" ]
null
null
null
2020/day_01/__main__.py
d02d33pak/Advent-Of-Code
765b0302c256ad61864095a537a3f6379901b1c2
[ "MIT" ]
null
null
null
2020/day_01/__main__.py
d02d33pak/Advent-Of-Code
765b0302c256ad61864095a537a3f6379901b1c2
[ "MIT" ]
null
null
null
""" Day 1 Main Module """ from day01 import parse_input, part1, part2 if __name__ == "__main__": # trying out the new walrus[:=] oprtr in python if (part := int(input("Enter Part: "))) == 1: print(part1(parse_input("input.txt"))) elif part == 2: print(part2(parse_input("input.txt"))) else: print("Wrong choice [1|2]")
24.066667
51
0.595568
50
361
4.08
0.62
0.147059
0.147059
0.176471
0
0
0
0
0
0
0
0.039855
0.235457
361
14
52
25.785714
0.699275
0.177285
0
0
0
0
0.193772
0
0
0
0
0
0
1
0
true
0
0.125
0
0.125
0.375
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
1
0
0
0
0
0
0
2
9c01b072850e72696bc89430b3763e9313e105ec
4,406
py
Python
quiz_app/settings.py
ignasgri/Django_Quiz
c98969d4181350eaaf8883f3930d0e800c240a44
[ "MIT" ]
null
null
null
quiz_app/settings.py
ignasgri/Django_Quiz
c98969d4181350eaaf8883f3930d0e800c240a44
[ "MIT" ]
6
2020-06-05T19:26:57.000Z
2022-03-11T23:33:08.000Z
quiz_app/settings.py
ignasgri/Django_Quiz
c98969d4181350eaaf8883f3930d0e800c240a44
[ "MIT" ]
null
null
null
""" Django settings for quiz_app project. Generated by 'django-admin startproject' using Django 2.1.2. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ SITE_ID = 1 import os import dj_database_url # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = os.environ.get('SECRET_KEY') # SECURITY WARNING: don't run with debug turned on in production! DEBUG = os.environ.get('DEBUG', False) ALLOWED_HOSTS = ['ignas-quiz.herokuapp.com','localhost','127.0.0.1'] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.sites', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'storages', 'quiz', 'multichoice', 'true_false', 'essay', ] MIDDLEWARE_CLASSES = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] ROOT_URLCONF = 'quiz_app.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'django.template.context_processors.media', ], }, }, ] WSGI_APPLICATION = 'quiz_app.wsgi.application' # Database # https://docs.djangoproject.com/en/2.1/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.1/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', }, { 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', }, ] # Internationalization # https://docs.djangoproject.com/en/2.1/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/2.1/howto/static-files/ STATIC_URL = '/static/' # STATIC_ROOT = 'staticfiles' STATICFILES_DIRS= ( os.path.join(BASE_DIR, "static"), ) MEDIA_ROOT = os.path.join(BASE_DIR, 'media') MEDIA_URL = '/media/' DATABASES = {'default': dj_database_url.parse(os.environ.get('DATABASE_URL')) } AWS_HEADERS = { # see http://developer.yahoo.com/performance/rules.html#expires 'Expires': 'Thu, 31 Dec 2099 20:00:00 GMT', 'Cache-Control': 'max-age=94608000', } AWS_STORAGE_BUCKET_NAME = os.environ.get("AWS_STORAGE_BUCKET_NAME") AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY") AWS_S3_HOST = 's3-eu-west-1.amazonaws.com' AWS_S3_CUSTOM_DOMAIN = '%s.s3.amazonaws.com' % AWS_STORAGE_BUCKET_NAME STATICFILES_LOCATION = 'static' STATICFILES_STORAGE = 'custom_storages.StaticStorage' STATIC_URL = "https://%s/%s/" % (AWS_S3_CUSTOM_DOMAIN, STATICFILES_LOCATION) MEDIAFILES_LOCATION = 'media' MEDIA_URL = "https://%s/%s/" % (AWS_S3_CUSTOM_DOMAIN, MEDIAFILES_LOCATION) DEFAULT_FILE_STORAGE = 'custom_storages.MediaStorage'
27.886076
91
0.70631
529
4,406
5.706994
0.357278
0.068897
0.05101
0.057966
0.191123
0.157999
0.106327
0.106327
0.039748
0
0
0.015826
0.153881
4,406
158
92
27.886076
0.793991
0.276441
0
0
1
0
0.486221
0.360786
0
0
0
0
0
1
0
false
0.05618
0.022472
0
0.022472
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
9c0f818ceccab853bd37e280f6cc450a37f8fe46
267
bzl
Python
test/com/facebook/buck/skylark/parser/testdata/rule_with_wrong_types/attr_value_type/subdir/foo.bzl
Unknoob/buck
2dfc734354b326f2f66896dde7746a11965d5a13
[ "Apache-2.0" ]
8,027
2015-01-02T05:31:44.000Z
2022-03-31T07:08:09.000Z
test/com/facebook/buck/skylark/parser/testdata/rule_with_wrong_types/attr_value_type/subdir/foo.bzl
Unknoob/buck
2dfc734354b326f2f66896dde7746a11965d5a13
[ "Apache-2.0" ]
2,355
2015-01-01T15:30:53.000Z
2022-03-30T20:21:16.000Z
test/com/facebook/buck/skylark/parser/testdata/rule_with_wrong_types/attr_value_type/subdir/foo.bzl
Unknoob/buck
2dfc734354b326f2f66896dde7746a11965d5a13
[ "Apache-2.0" ]
1,280
2015-01-09T03:29:04.000Z
2022-03-30T15:14:14.000Z
""" Module docstring """ def _impl(_ctx): """ Function docstring """ pass some_rule = rule( attrs = { "attr1": attr.int( default = 2, mandatory = False, ), "attr2": 5, }, implementation = _impl, )
15.705882
30
0.468165
23
267
5.26087
0.869565
0
0
0
0
0
0
0
0
0
0
0.02439
0.385768
267
16
31
16.6875
0.713415
0.134831
0
0
0
0
0.046083
0
0
0
0
0
0
1
0.083333
false
0.083333
0
0
0.083333
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
1
0
0
0
0
0
2
9c10fde5b8d2158f51d8de9c32ce3619970e9b19
304
py
Python
reservation_management/migrations/0021_delete_greenpass.py
mattiolato98/reservation-ninja
0e50b218dd9d90f134868bade2ec2934283c12b5
[ "MIT" ]
1
2022-03-10T11:34:14.000Z
2022-03-10T11:34:14.000Z
reservation_management/migrations/0021_delete_greenpass.py
mattiolato98/reservation-ninja
0e50b218dd9d90f134868bade2ec2934283c12b5
[ "MIT" ]
null
null
null
reservation_management/migrations/0021_delete_greenpass.py
mattiolato98/reservation-ninja
0e50b218dd9d90f134868bade2ec2934283c12b5
[ "MIT" ]
null
null
null
# Generated by Django 3.2.7 on 2021-10-22 14:23 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('reservation_management', '0020_greenpass'), ] operations = [ migrations.DeleteModel( name='GreenPass', ), ]
17.882353
53
0.615132
31
304
5.967742
0.83871
0
0
0
0
0
0
0
0
0
0
0.086364
0.276316
304
16
54
19
0.754545
0.148026
0
0
1
0
0.175097
0.085603
0
0
0
0
0
1
0
false
0.2
0.1
0
0.4
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
9c120e73dce5cc77395baa84f359e42ae9ad94b0
3,878
py
Python
demos/iaf_pop_demo.py
bionet/ted.python
1698a7f792db23123003ae4e2d39b4c18f25f347
[ "BSD-3-Clause" ]
4
2015-12-07T14:02:36.000Z
2018-11-27T22:07:38.000Z
demos/iaf_pop_demo.py
bionet/ted.python
1698a7f792db23123003ae4e2d39b4c18f25f347
[ "BSD-3-Clause" ]
null
null
null
demos/iaf_pop_demo.py
bionet/ted.python
1698a7f792db23123003ae4e2d39b4c18f25f347
[ "BSD-3-Clause" ]
2
2016-10-06T06:01:05.000Z
2021-01-22T18:41:18.000Z
#!/usr/bin/env python """ Demos of encoding and decoding algorithms using populations of IAF neurons. """ # Copyright (c) 2009-2015, Lev Givon # All rights reserved. # Distributed under the terms of the BSD license: # http://www.opensource.org/licenses/bsd-license import sys import numpy as np # Set matplotlib backend so that plots can be generated without a # display: import matplotlib matplotlib.use('AGG') from bionet.utils.misc import func_timer import bionet.utils.band_limited as bl import bionet.utils.plotting as pl import bionet.ted.iaf as iaf # For determining output plot file names: output_name = 'iaf_pop_demo_' output_count = 0 output_ext = '.png' # Define algorithm parameters and input signal: dur = 0.1 dt = 1e-6 f = 32 bw = 2*np.pi*f t = np.arange(0, dur, dt) np.random.seed(0) noise_power = None if noise_power == None: fig_title = 'IAF Input Signal with No Noise' else: fig_title = 'IAF Input Signal with %d dB of Noise' % noise_power print fig_title u = func_timer(bl.gen_band_limited)(dur, dt, f, noise_power) pl.plot_signal(t, u, fig_title, output_name + str(output_count) + output_ext) # Test leaky IAF algorithms: b1 = 3.5 # bias d1 = 0.7 # threshold R1 = 10.0 # resistance C1 = 0.01 # capacitance try: iaf.iaf_recoverable(u, bw, b1, d1, R1, C1) except ValueError('reconstruction condition not satisfied'): sys.exit() b2 = 3.4 # bias d2 = 0.8 # threshold R2 = 9.0 # resistance C2 = 0.01 # capacitance try: iaf.iaf_recoverable(u, bw, b2, d2, R2, C2) except ValueError('reconstruction condition not satisfied'): sys.exit() b_list = np.array([b1, b2]) d_list = np.array([d1, d2]) R_list = np.array([R1, R2]) C_list = np.array([C1, C2]) output_count += 1 fig_title = 'Signal Encoded Using Leaky IAF Encoder' print fig_title s_list = func_timer(iaf.iaf_encode_pop)([u, u], dt, b_list, d_list, R_list, C_list) pl.plot_encoded(t, u, s_list[0], fig_title + ' #1', output_name + str(output_count) + output_ext) output_count += 1 pl.plot_encoded(t, u, s_list[1], fig_title + ' #2', output_name + str(output_count) + output_ext) output_count += 1 fig_title = 'Signal Decoded Using Leaky IAF Population Decoder' print fig_title u_rec = func_timer(iaf.iaf_decode_pop)(s_list, dur, dt, bw, b_list, d_list, R_list, C_list) pl.plot_compare(t, u, u_rec, fig_title, output_name + str(output_count) + output_ext) # Test ideal IAF algorithms: b1 = 3.5 # bias d1 = 0.7 # threshold R1 = np.inf # resistance C1 = 0.01 # capacitance try: iaf.iaf_recoverable(u, bw, b1, d1, R1, C1) except ValueError('reconstruction condition not satisfied'): sys.exit() b2 = 3.4 # bias d2 = 0.8 # threshold R2 = np.inf # resistance C2 = 0.01 # capacitance try: iaf.iaf_recoverable(u, bw, b2, d2, R2, C2) except ValueError('reconstruction condition not satisfied'): sys.exit() b_list = [b1, b2] d_list = [d1, d2] R_list = [R1, R2] C_list = [C1, C2] output_count += 1 fig_title = 'Signal Encoded Using Ideal IAF Encoder' print fig_title s_list = func_timer(iaf.iaf_encode_pop)([u, u], dt, b_list, d_list, R_list, C_list) pl.plot_encoded(t, u, s_list[0], fig_title + ' #1', output_name + str(output_count) + output_ext) output_count += 1 pl.plot_encoded(t, u, s_list[1], fig_title + ' #2', output_name + str(output_count) + output_ext) output_count += 1 fig_title = 'Signal Decoded Using Ideal IAF Population Decoder' print fig_title u_rec = func_timer(iaf.iaf_decode_pop)(s_list, dur, dt, bw, b_list, d_list, R_list, C_list) pl.plot_compare(t, u, u_rec, fig_title, output_name + str(output_count) + output_ext)
27.309859
83
0.65936
623
3,878
3.913323
0.255217
0.059065
0.037326
0.054553
0.649303
0.649303
0.627974
0.627974
0.627974
0.627974
0
0.037692
0.226921
3,878
141
84
27.503546
0.775517
0.138216
0
0.6
0
0
0.131229
0
0
0
0
0
0
0
null
null
0
0.07
null
null
0.05
0
0
0
null
0
0
0
0
0
0
0
0
1
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
9c1cb579481d40405b2d799f908616a3f2aa3b49
2,769
py
Python
background/forms.py
BFlameSwift/AirplaneReservationSystem
bbabb0e258c72eb50fcbbf7ade437e38a39e6f02
[ "MIT" ]
3
2021-06-19T09:40:13.000Z
2021-06-19T17:09:54.000Z
background/forms.py
BFlameSwift/AirplaneReservationSystem
bbabb0e258c72eb50fcbbf7ade437e38a39e6f02
[ "MIT" ]
null
null
null
background/forms.py
BFlameSwift/AirplaneReservationSystem
bbabb0e258c72eb50fcbbf7ade437e38a39e6f02
[ "MIT" ]
1
2021-12-05T14:51:51.000Z
2021-12-05T14:51:51.000Z
from django import forms class FlightrForm(forms.Form): flight_number = forms.CharField(max_length=30, label="航班号", widget=forms.TextInput(attrs={'class': 'form-control'})) plane_type_choices = [ ('波音', ( ('1', '747'), ('2', '777'), ('3', '787'), ) ), ('空客', ( ('4', 'A300'), ('5', 'A310'), ('6', 'A320'), ('7', 'A350'), ) ), ] plane_type = forms.ChoiceField(label='飞机型号', choices=plane_type_choices,widget=forms.Select) origination = forms.CharField(max_length=30,label="始发地", widget=forms.TextInput(attrs={'class': 'form-control'})) destination = forms.CharField(max_length=30,label="目的地", widget=forms.TextInput(attrs={'class': 'form-control'})) starting_time = forms.TimeField(label="始发时间",widget=forms.TimeInput(attrs={'class': 'form-control'})) departure_airport = forms.CharField(max_length=64, label="始发机场", widget=forms.TextInput(attrs={'class': 'form-control'})) landing_airport = forms.CharField(max_length=64, label="目的机场", widget=forms.TextInput(attrs={'class': 'form-control'})) arrival_time = forms.TimeField(label="到达时间",widget=forms.TimeInput(attrs={'class': 'form-control'})) first_class_price = forms.FloatField(label="头等舱价格",widget=forms.NumberInput(attrs={'class': 'form-control'})) # highlevel_economy_class_price = forms.FloatField(label="高级经济舱价格",widget=forms.NumberInput(attrs={'class': 'form-control'})) business_class_price = forms.FloatField(label="商务舱价格",widget=forms.NumberInput(attrs={'class': 'form-control'})) economy_class_price = forms.FloatField(label="经济舱价格",widget=forms.NumberInput(attrs={'class': 'form-control'})) starting_date = forms.DateField(label="始发日期", widget=forms.DateInput(attrs={'class': 'form-control'})) ending_date = forms.DateField(label="终止日期", widget=forms.DateInput(attrs={'class': 'form-control'})) class StartStopDateForm(forms.Form): starting_date = forms.DateField(label="始发日期", widget=forms.DateInput(attrs={'class': 'form-control'})) ending_date = forms.DateField(label="终止日期", widget=forms.DateInput(attrs={'class': 'form-control'})) flight_number = forms.CharField(max_length=30, label="航班号", widget=forms.TextInput(attrs={'class': 'form-control'})) # book_sum = forms.IntegerField(label="订票总数") # plane_capacity = forms.IntegerField(label="飞机容量") class flight_number_Form(forms.Form): flight_number = forms.CharField(max_length=30, label="航班号", widget=forms.TextInput(attrs={'class': 'form-control'})) class concrete_flight_id_Form(forms.Form): concrete_flight_id = forms.CharField(max_length=30, label="航班id", widget=forms.TextInput(attrs={'class': 'form-control'}))
60.195652
129
0.679307
331
2,769
5.555891
0.256798
0.113649
0.137031
0.205546
0.734638
0.692224
0.603045
0.313214
0.313214
0.313214
0
0.018372
0.135067
2,769
46
130
60.195652
0.749478
0.078368
0
0.236842
0
0
0.155024
0
0
0
0
0
0
1
0
false
0
0.026316
0
0.631579
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
9c2218dead1aba52c67ce0344013c8ad1bd43a62
109
py
Python
engine/config/constant.py
infiniteloop98/lazies-cmd
46ac58f9b31942c6fa63b7ffa8d409e3a6b4df26
[ "MIT" ]
1
2022-02-19T08:39:17.000Z
2022-02-19T08:39:17.000Z
engine/config/constant.py
infiniteloop98/lazies-cmd
46ac58f9b31942c6fa63b7ffa8d409e3a6b4df26
[ "MIT" ]
null
null
null
engine/config/constant.py
infiniteloop98/lazies-cmd
46ac58f9b31942c6fa63b7ffa8d409e3a6b4df26
[ "MIT" ]
null
null
null
APP_PROFILE_DIRECTORY_NAME = 'lazies-cmd' DOSKEY_FILE_NAME = 'doskey.bat' AUTO_RUN_REGISTRY_NAME = 'AutoRun'
27.25
41
0.816514
16
109
5.0625
0.8125
0
0
0
0
0
0
0
0
0
0
0
0.082569
109
3
42
36.333333
0.81
0
0
0
0
0
0.247706
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
9c2374c54ba5c88122db3264039ec597c5b837e3
1,530
py
Python
src/test/python/programmingtheiot/part01/unit/system/SystemMemUtilTaskTest.py
Zhengrui-Liu/FireAlarmingSysCDA
26db6375a21ee9bdccba3d137e30d2e63ad6395c
[ "MIT" ]
null
null
null
src/test/python/programmingtheiot/part01/unit/system/SystemMemUtilTaskTest.py
Zhengrui-Liu/FireAlarmingSysCDA
26db6375a21ee9bdccba3d137e30d2e63ad6395c
[ "MIT" ]
null
null
null
src/test/python/programmingtheiot/part01/unit/system/SystemMemUtilTaskTest.py
Zhengrui-Liu/FireAlarmingSysCDA
26db6375a21ee9bdccba3d137e30d2e63ad6395c
[ "MIT" ]
null
null
null
##### # # This class is part of the Programming the Internet of Things # project, and is available via the MIT License, which can be # found in the LICENSE file at the top level of this repository. # # Copyright (c) 2020 by Andrew D. King # import logging import unittest from programmingtheiot.cda.system.SystemMemUtilTask import SystemMemUtilTask class SystemMemUtilTaskTest(unittest.TestCase): """ This test case class contains very basic unit tests for SystemMemUtilTask. It should not be considered complete, but serve as a starting point for the student implementing additional functionality within their Programming the IoT environment. """ @classmethod def setUpClass(self): logging.basicConfig(format = '%(asctime)s:%(module)s:%(levelname)s:%(message)s', level = logging.DEBUG) logging.info("Testing SystemMemUtilTask class...") self.memUtilTask = SystemMemUtilTask() def setUp(self): pass def tearDown(self): pass #@unittest.skip("Ignore for now.") def testGenerateTelemetry(self): """Test get memory utilization from sensor data """ sd = self.memUtilTask.generateTelemetry() self.assertIsNotNone(sd) self.assertGreaterEqual(sd.getValue(), 0.0) logging.info("Virtual memory SensorData: %s", str(sd)) def testGetTelemetryValue(self): """Test get memory utilization """ val = self.memUtilTask.getTelemetryValue() self.assertGreaterEqual(val, 0.0) logging.info("Virtual memory utilization: %s", str(val)) if __name__ == "__main__": unittest.main()
26.842105
105
0.739869
190
1,530
5.915789
0.584211
0.029359
0.019573
0.030249
0.096085
0.046263
0
0
0
0
0
0.006192
0.155556
1,530
57
106
26.842105
0.863777
0.396732
0
0.083333
0
0
0.162664
0.052402
0
0
0
0
0.125
1
0.208333
false
0.083333
0.125
0
0.375
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
9c25aa6fdaf3676c5515d5ada4dd3bbb5e192b55
25,225
py
Python
src/fabricflow/fibc/api/fibcapis_pb2_grpc.py
RudSmith/beluganos
7a3f8524e1d9d9313d96476c783a96096180654c
[ "Apache-2.0" ]
119
2017-10-05T11:37:37.000Z
2022-02-23T05:01:54.000Z
src/fabricflow/fibc/api/fibcapis_pb2_grpc.py
RudSmith/beluganos
7a3f8524e1d9d9313d96476c783a96096180654c
[ "Apache-2.0" ]
5
2017-10-23T00:49:09.000Z
2020-08-17T14:58:16.000Z
src/fabricflow/fibc/api/fibcapis_pb2_grpc.py
RudSmith/beluganos
7a3f8524e1d9d9313d96476c783a96096180654c
[ "Apache-2.0" ]
17
2017-10-21T12:33:44.000Z
2022-02-03T10:55:18.000Z
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc import fibcapi_pb2 as fibcapi__pb2 import fibcapis_pb2 as fibcapis__pb2 class FIBCApApiStub(object): # missing associated documentation comment in .proto file pass def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.Monitor = channel.unary_stream( '/fibcapi.FIBCApApi/Monitor', request_serializer=fibcapis__pb2.ApMonitorRequest.SerializeToString, response_deserializer=fibcapis__pb2.ApMonitorReply.FromString, ) self.GetPortStats = channel.unary_stream( '/fibcapi.FIBCApApi/GetPortStats', request_serializer=fibcapis__pb2.ApGetPortStatsRequest.SerializeToString, response_deserializer=fibcapi__pb2.FFPortStats.FromString, ) self.ModPortStats = channel.unary_unary( '/fibcapi.FIBCApApi/ModPortStats', request_serializer=fibcapis__pb2.ApModPortStatsRequest.SerializeToString, response_deserializer=fibcapis__pb2.ApModPortStatsReply.FromString, ) self.GetPortEntries = channel.unary_stream( '/fibcapi.FIBCApApi/GetPortEntries', request_serializer=fibcapis__pb2.ApGetPortEntriesRequest.SerializeToString, response_deserializer=fibcapis__pb2.DbPortEntry.FromString, ) self.GetIDEntries = channel.unary_stream( '/fibcapi.FIBCApApi/GetIDEntries', request_serializer=fibcapis__pb2.ApGetIdEntriesRequest.SerializeToString, response_deserializer=fibcapis__pb2.DbIdEntry.FromString, ) self.GetDpEntries = channel.unary_stream( '/fibcapi.FIBCApApi/GetDpEntries', request_serializer=fibcapis__pb2.ApGetDpEntriesRequest.SerializeToString, response_deserializer=fibcapis__pb2.DbDpEntry.FromString, ) self.AddPortEntry = channel.unary_unary( '/fibcapi.FIBCApApi/AddPortEntry', request_serializer=fibcapis__pb2.DbPortEntry.SerializeToString, response_deserializer=fibcapis__pb2.ApAddPortEntryReply.FromString, ) self.AddIDEntry = channel.unary_unary( '/fibcapi.FIBCApApi/AddIDEntry', request_serializer=fibcapis__pb2.DbIdEntry.SerializeToString, response_deserializer=fibcapis__pb2.ApAddIdEntryReply.FromString, ) self.DelPortEntry = channel.unary_unary( '/fibcapi.FIBCApApi/DelPortEntry', request_serializer=fibcapis__pb2.DbPortKey.SerializeToString, response_deserializer=fibcapis__pb2.ApDelPortEntryReply.FromString, ) self.DelIDEntry = channel.unary_unary( '/fibcapi.FIBCApApi/DelIDEntry', request_serializer=fibcapis__pb2.DbIdEntry.SerializeToString, response_deserializer=fibcapis__pb2.ApDelIdEntryReply.FromString, ) self.GetStats = channel.unary_stream( '/fibcapi.FIBCApApi/GetStats', request_serializer=fibcapis__pb2.ApGetStatsRequest.SerializeToString, response_deserializer=fibcapis__pb2.StatsEntry.FromString, ) self.RunOAM = channel.unary_unary( '/fibcapi.FIBCApApi/RunOAM', request_serializer=fibcapi__pb2.OAM.Request.SerializeToString, response_deserializer=fibcapis__pb2.OAMReplyAck.FromString, ) class FIBCApApiServicer(object): # missing associated documentation comment in .proto file pass def Monitor(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 GetPortStats(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 ModPortStats(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 GetPortEntries(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 GetIDEntries(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 GetDpEntries(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 AddPortEntry(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 AddIDEntry(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 DelPortEntry(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 DelIDEntry(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 GetStats(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 RunOAM(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_FIBCApApiServicer_to_server(servicer, server): rpc_method_handlers = { 'Monitor': grpc.unary_stream_rpc_method_handler( servicer.Monitor, request_deserializer=fibcapis__pb2.ApMonitorRequest.FromString, response_serializer=fibcapis__pb2.ApMonitorReply.SerializeToString, ), 'GetPortStats': grpc.unary_stream_rpc_method_handler( servicer.GetPortStats, request_deserializer=fibcapis__pb2.ApGetPortStatsRequest.FromString, response_serializer=fibcapi__pb2.FFPortStats.SerializeToString, ), 'ModPortStats': grpc.unary_unary_rpc_method_handler( servicer.ModPortStats, request_deserializer=fibcapis__pb2.ApModPortStatsRequest.FromString, response_serializer=fibcapis__pb2.ApModPortStatsReply.SerializeToString, ), 'GetPortEntries': grpc.unary_stream_rpc_method_handler( servicer.GetPortEntries, request_deserializer=fibcapis__pb2.ApGetPortEntriesRequest.FromString, response_serializer=fibcapis__pb2.DbPortEntry.SerializeToString, ), 'GetIDEntries': grpc.unary_stream_rpc_method_handler( servicer.GetIDEntries, request_deserializer=fibcapis__pb2.ApGetIdEntriesRequest.FromString, response_serializer=fibcapis__pb2.DbIdEntry.SerializeToString, ), 'GetDpEntries': grpc.unary_stream_rpc_method_handler( servicer.GetDpEntries, request_deserializer=fibcapis__pb2.ApGetDpEntriesRequest.FromString, response_serializer=fibcapis__pb2.DbDpEntry.SerializeToString, ), 'AddPortEntry': grpc.unary_unary_rpc_method_handler( servicer.AddPortEntry, request_deserializer=fibcapis__pb2.DbPortEntry.FromString, response_serializer=fibcapis__pb2.ApAddPortEntryReply.SerializeToString, ), 'AddIDEntry': grpc.unary_unary_rpc_method_handler( servicer.AddIDEntry, request_deserializer=fibcapis__pb2.DbIdEntry.FromString, response_serializer=fibcapis__pb2.ApAddIdEntryReply.SerializeToString, ), 'DelPortEntry': grpc.unary_unary_rpc_method_handler( servicer.DelPortEntry, request_deserializer=fibcapis__pb2.DbPortKey.FromString, response_serializer=fibcapis__pb2.ApDelPortEntryReply.SerializeToString, ), 'DelIDEntry': grpc.unary_unary_rpc_method_handler( servicer.DelIDEntry, request_deserializer=fibcapis__pb2.DbIdEntry.FromString, response_serializer=fibcapis__pb2.ApDelIdEntryReply.SerializeToString, ), 'GetStats': grpc.unary_stream_rpc_method_handler( servicer.GetStats, request_deserializer=fibcapis__pb2.ApGetStatsRequest.FromString, response_serializer=fibcapis__pb2.StatsEntry.SerializeToString, ), 'RunOAM': grpc.unary_unary_rpc_method_handler( servicer.RunOAM, request_deserializer=fibcapi__pb2.OAM.Request.FromString, response_serializer=fibcapis__pb2.OAMReplyAck.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'fibcapi.FIBCApApi', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) class FIBCVmApiStub(object): # missing associated documentation comment in .proto file pass def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.SendHello = channel.unary_unary( '/fibcapi.FIBCVmApi/SendHello', request_serializer=fibcapi__pb2.Hello.SerializeToString, response_deserializer=fibcapis__pb2.HelloReply.FromString, ) self.SendPortConfig = channel.unary_unary( '/fibcapi.FIBCVmApi/SendPortConfig', request_serializer=fibcapi__pb2.PortConfig.SerializeToString, response_deserializer=fibcapis__pb2.PortConfigReply.FromString, ) self.SendFlowMod = channel.unary_unary( '/fibcapi.FIBCVmApi/SendFlowMod', request_serializer=fibcapi__pb2.FlowMod.SerializeToString, response_deserializer=fibcapis__pb2.FlowModReply.FromString, ) self.SendGroupMod = channel.unary_unary( '/fibcapi.FIBCVmApi/SendGroupMod', request_serializer=fibcapi__pb2.GroupMod.SerializeToString, response_deserializer=fibcapis__pb2.GroupModReply.FromString, ) self.SendOAMReply = channel.unary_unary( '/fibcapi.FIBCVmApi/SendOAMReply', request_serializer=fibcapis__pb2.OAMReply.SerializeToString, response_deserializer=fibcapis__pb2.OAMReplyAck.FromString, ) self.Monitor = channel.unary_stream( '/fibcapi.FIBCVmApi/Monitor', request_serializer=fibcapis__pb2.VmMonitorRequest.SerializeToString, response_deserializer=fibcapis__pb2.VmMonitorReply.FromString, ) class FIBCVmApiServicer(object): # missing associated documentation comment in .proto file pass def SendHello(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 SendPortConfig(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 SendFlowMod(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 SendGroupMod(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 SendOAMReply(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 Monitor(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_FIBCVmApiServicer_to_server(servicer, server): rpc_method_handlers = { 'SendHello': grpc.unary_unary_rpc_method_handler( servicer.SendHello, request_deserializer=fibcapi__pb2.Hello.FromString, response_serializer=fibcapis__pb2.HelloReply.SerializeToString, ), 'SendPortConfig': grpc.unary_unary_rpc_method_handler( servicer.SendPortConfig, request_deserializer=fibcapi__pb2.PortConfig.FromString, response_serializer=fibcapis__pb2.PortConfigReply.SerializeToString, ), 'SendFlowMod': grpc.unary_unary_rpc_method_handler( servicer.SendFlowMod, request_deserializer=fibcapi__pb2.FlowMod.FromString, response_serializer=fibcapis__pb2.FlowModReply.SerializeToString, ), 'SendGroupMod': grpc.unary_unary_rpc_method_handler( servicer.SendGroupMod, request_deserializer=fibcapi__pb2.GroupMod.FromString, response_serializer=fibcapis__pb2.GroupModReply.SerializeToString, ), 'SendOAMReply': grpc.unary_unary_rpc_method_handler( servicer.SendOAMReply, request_deserializer=fibcapis__pb2.OAMReply.FromString, response_serializer=fibcapis__pb2.OAMReplyAck.SerializeToString, ), 'Monitor': grpc.unary_stream_rpc_method_handler( servicer.Monitor, request_deserializer=fibcapis__pb2.VmMonitorRequest.FromString, response_serializer=fibcapis__pb2.VmMonitorReply.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'fibcapi.FIBCVmApi', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) class FIBCVsApiStub(object): # missing associated documentation comment in .proto file pass def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.SendHello = channel.unary_unary( '/fibcapi.FIBCVsApi/SendHello', request_serializer=fibcapi__pb2.FFHello.SerializeToString, response_deserializer=fibcapis__pb2.FFHelloReply.FromString, ) self.SendFFPacket = channel.unary_unary( '/fibcapi.FIBCVsApi/SendFFPacket', request_serializer=fibcapi__pb2.FFPacket.SerializeToString, response_deserializer=fibcapis__pb2.FFPacketReply.FromString, ) self.SendPacketIn = channel.unary_unary( '/fibcapi.FIBCVsApi/SendPacketIn', request_serializer=fibcapi__pb2.FFPacketIn.SerializeToString, response_deserializer=fibcapis__pb2.FFPacketInReply.FromString, ) self.SendOAMReply = channel.unary_unary( '/fibcapi.FIBCVsApi/SendOAMReply', request_serializer=fibcapis__pb2.OAMReply.SerializeToString, response_deserializer=fibcapis__pb2.OAMReplyAck.FromString, ) self.Monitor = channel.unary_stream( '/fibcapi.FIBCVsApi/Monitor', request_serializer=fibcapis__pb2.VsMonitorRequest.SerializeToString, response_deserializer=fibcapis__pb2.VsMonitorReply.FromString, ) class FIBCVsApiServicer(object): # missing associated documentation comment in .proto file pass def SendHello(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 SendFFPacket(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 SendPacketIn(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 SendOAMReply(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 Monitor(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_FIBCVsApiServicer_to_server(servicer, server): rpc_method_handlers = { 'SendHello': grpc.unary_unary_rpc_method_handler( servicer.SendHello, request_deserializer=fibcapi__pb2.FFHello.FromString, response_serializer=fibcapis__pb2.FFHelloReply.SerializeToString, ), 'SendFFPacket': grpc.unary_unary_rpc_method_handler( servicer.SendFFPacket, request_deserializer=fibcapi__pb2.FFPacket.FromString, response_serializer=fibcapis__pb2.FFPacketReply.SerializeToString, ), 'SendPacketIn': grpc.unary_unary_rpc_method_handler( servicer.SendPacketIn, request_deserializer=fibcapi__pb2.FFPacketIn.FromString, response_serializer=fibcapis__pb2.FFPacketInReply.SerializeToString, ), 'SendOAMReply': grpc.unary_unary_rpc_method_handler( servicer.SendOAMReply, request_deserializer=fibcapis__pb2.OAMReply.FromString, response_serializer=fibcapis__pb2.OAMReplyAck.SerializeToString, ), 'Monitor': grpc.unary_stream_rpc_method_handler( servicer.Monitor, request_deserializer=fibcapis__pb2.VsMonitorRequest.FromString, response_serializer=fibcapis__pb2.VsMonitorReply.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'fibcapi.FIBCVsApi', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) class FIBCDpApiStub(object): # missing associated documentation comment in .proto file pass def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.SendHello = channel.unary_unary( '/fibcapi.FIBCDpApi/SendHello', request_serializer=fibcapi__pb2.FFHello.SerializeToString, response_deserializer=fibcapis__pb2.FFHelloReply.FromString, ) self.SendPacketIn = channel.unary_unary( '/fibcapi.FIBCDpApi/SendPacketIn', request_serializer=fibcapi__pb2.FFPacketIn.SerializeToString, response_deserializer=fibcapis__pb2.FFPacketInReply.FromString, ) self.SendPortStatus = channel.unary_unary( '/fibcapi.FIBCDpApi/SendPortStatus', request_serializer=fibcapi__pb2.FFPortStatus.SerializeToString, response_deserializer=fibcapis__pb2.FFPortStatusReply.FromString, ) self.SendL2AddrStatus = channel.unary_unary( '/fibcapi.FIBCDpApi/SendL2AddrStatus', request_serializer=fibcapi__pb2.FFL2AddrStatus.SerializeToString, response_deserializer=fibcapis__pb2.L2AddrStatusReply.FromString, ) self.SendMultipartReply = channel.unary_unary( '/fibcapi.FIBCDpApi/SendMultipartReply', request_serializer=fibcapis__pb2.DpMultipartReply.SerializeToString, response_deserializer=fibcapis__pb2.DpMultipartReplyAck.FromString, ) self.SendOAMReply = channel.unary_unary( '/fibcapi.FIBCDpApi/SendOAMReply', request_serializer=fibcapis__pb2.OAMReply.SerializeToString, response_deserializer=fibcapis__pb2.OAMReplyAck.FromString, ) self.Monitor = channel.unary_stream( '/fibcapi.FIBCDpApi/Monitor', request_serializer=fibcapis__pb2.DpMonitorRequest.SerializeToString, response_deserializer=fibcapis__pb2.DpMonitorReply.FromString, ) class FIBCDpApiServicer(object): # missing associated documentation comment in .proto file pass def SendHello(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 SendPacketIn(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 SendPortStatus(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 SendL2AddrStatus(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 SendMultipartReply(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 SendOAMReply(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 Monitor(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_FIBCDpApiServicer_to_server(servicer, server): rpc_method_handlers = { 'SendHello': grpc.unary_unary_rpc_method_handler( servicer.SendHello, request_deserializer=fibcapi__pb2.FFHello.FromString, response_serializer=fibcapis__pb2.FFHelloReply.SerializeToString, ), 'SendPacketIn': grpc.unary_unary_rpc_method_handler( servicer.SendPacketIn, request_deserializer=fibcapi__pb2.FFPacketIn.FromString, response_serializer=fibcapis__pb2.FFPacketInReply.SerializeToString, ), 'SendPortStatus': grpc.unary_unary_rpc_method_handler( servicer.SendPortStatus, request_deserializer=fibcapi__pb2.FFPortStatus.FromString, response_serializer=fibcapis__pb2.FFPortStatusReply.SerializeToString, ), 'SendL2AddrStatus': grpc.unary_unary_rpc_method_handler( servicer.SendL2AddrStatus, request_deserializer=fibcapi__pb2.FFL2AddrStatus.FromString, response_serializer=fibcapis__pb2.L2AddrStatusReply.SerializeToString, ), 'SendMultipartReply': grpc.unary_unary_rpc_method_handler( servicer.SendMultipartReply, request_deserializer=fibcapis__pb2.DpMultipartReply.FromString, response_serializer=fibcapis__pb2.DpMultipartReplyAck.SerializeToString, ), 'SendOAMReply': grpc.unary_unary_rpc_method_handler( servicer.SendOAMReply, request_deserializer=fibcapis__pb2.OAMReply.FromString, response_serializer=fibcapis__pb2.OAMReplyAck.SerializeToString, ), 'Monitor': grpc.unary_stream_rpc_method_handler( servicer.Monitor, request_deserializer=fibcapis__pb2.DpMonitorRequest.FromString, response_serializer=fibcapis__pb2.DpMonitorReply.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'fibcapi.FIBCDpApi', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
40.949675
83
0.745966
2,401
25,225
7.565598
0.058726
0.058134
0.066061
0.077402
0.775888
0.628957
0.627195
0.568346
0.568346
0.552931
0
0.006402
0.176373
25,225
615
84
41.01626
0.867925
0.094509
0
0.515091
1
0
0.117994
0.039683
0
0
0
0
0
1
0.076459
false
0.076459
0.006036
0
0.098592
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
9c28065db1d863fb5b79db27e4909a5e2d4c5505
4,501
py
Python
deepchem/metrics/score_function.py
hsjang001205/deepchem
02fce35729826b1ef12a1cfa6519b491510217be
[ "MIT" ]
1
2020-08-19T17:25:27.000Z
2020-08-19T17:25:27.000Z
deepchem/metrics/score_function.py
swpper/deepchem
510b9bf1805bc5a472c1a519700e6b128e06c651
[ "MIT" ]
1
2020-09-22T18:42:21.000Z
2020-09-22T18:42:21.000Z
deepchem/metrics/score_function.py
swpper/deepchem
510b9bf1805bc5a472c1a519700e6b128e06c651
[ "MIT" ]
1
2020-10-06T13:31:21.000Z
2020-10-06T13:31:21.000Z
"""Evaluation metrics.""" import numpy as np from sklearn.metrics import matthews_corrcoef # noqa from sklearn.metrics import recall_score # noqa from sklearn.metrics import cohen_kappa_score from sklearn.metrics import r2_score # noqa from sklearn.metrics import mean_squared_error from sklearn.metrics import mean_absolute_error from sklearn.metrics import precision_score # noqa from sklearn.metrics import precision_recall_curve from sklearn.metrics import auc from sklearn.metrics import jaccard_score from sklearn.metrics import f1_score from sklearn.metrics import roc_auc_score # noqa from sklearn.metrics import accuracy_score # noqa from sklearn.metrics import balanced_accuracy_score # noqa from scipy.stats import pearsonr # kappa_score is an alias for `sklearn.metrics.cohen_kappa_score` kappa_score = cohen_kappa_score def pearson_r2_score(y: np.ndarray, y_pred: np.ndarray) -> float: """Computes Pearson R^2 (square of Pearson correlation). Parameters ---------- y: np.ndarray ground truth array y_pred: np.ndarray predicted array Returns ------- float The Pearson-R^2 score. """ return pearsonr(y, y_pred)[0]**2 def jaccard_index(y: np.ndarray, y_pred: np.ndarray) -> float: """Computes Jaccard Index which is the Intersection Over Union metric which is commonly used in image segmentation tasks. DEPRECATED: WILL BE REMOVED IN A FUTURE VERSION OF DEEEPCHEM. USE `jaccard_score` instead. Parameters ---------- y: np.ndarray ground truth array y_pred: np.ndarray predicted array Returns ------- score: float The jaccard index. A number between 0 and 1. """ return jaccard_score(y, y_pred) def pixel_error(y: np.ndarray, y_pred: np.ndarray) -> float: """An error metric in case y, y_pred are images. Defined as 1 - the maximal F-score of pixel similarity, or squared Euclidean distance between the original and the result labels. Parameters ---------- y: np.ndarray ground truth array y_pred: np.ndarray predicted array Returns ------- score: float The pixel-error. A number between 0 and 1. """ return 1 - f1_score(y, y_pred) def prc_auc_score(y: np.ndarray, y_pred: np.ndarray) -> float: """Compute area under precision-recall curve Parameters ---------- y: np.ndarray A numpy array of shape `(N, n_classes)` or `(N,)` with true labels y_pred: np.ndarray Of shape `(N, n_classes)` with class probabilities. Returns ------- float The area under the precision-recall curve. A number between 0 and 1. """ precision, recall, _ = precision_recall_curve(y[:, 1], y_pred[:, 1]) return auc(recall, precision) def rms_score(y_true: np.ndarray, y_pred: np.ndarray) -> float: """Computes RMS error.""" return np.sqrt(mean_squared_error(y_true, y_pred)) def mae_score(y_true: np.ndarray, y_pred: np.ndarray) -> float: """Computes MAE.""" return mean_absolute_error(y_true, y_pred) def bedroc_score(y_true: np.ndarray, y_pred: np.ndarray, alpha: float = 20.0): """Compute BEDROC metric. BEDROC metric implemented according to Truchon and Bayley that modifies the ROC score by allowing for a factor of early recognition. Please confirm details from [1]_. Parameters ---------- y_true: np.ndarray Binary class labels. 1 for positive class, 0 otherwise y_pred: np.ndarray Predicted labels alpha: float, default 20.0 Early recognition parameter Returns ------- float Value in [0, 1] that indicates the degree of early recognition Notes ----- This function requires RDKit to be installed. References ---------- .. [1] Truchon et al. "Evaluating virtual screening methods: good and bad metrics for the “early recognition” problem." Journal of chemical information and modeling 47.2 (2007): 488-508. """ try: from rdkit.ML.Scoring.Scoring import CalcBEDROC except ModuleNotFoundError: raise ValueError("This function requires RDKit to be installed.") # validation assert len(y_true) == len(y_pred), 'Number of examples do not match' assert np.array_equal( np.unique(y_true).astype(int), [0, 1]), ('Class labels must be binary: %s' % np.unique(y_true)) yt = np.asarray(y_true) yp = np.asarray(y_pred) yt = yt.flatten() yp = yp[:, 1].flatten() # Index 1 because one_hot predictions scores = list(zip(yt, yp)) scores = sorted(scores, key=lambda pair: pair[1], reverse=True) return CalcBEDROC(scores, 0, alpha)
27.278788
92
0.709842
661
4,501
4.712557
0.298033
0.069342
0.080899
0.107865
0.364045
0.273515
0.202889
0.16244
0.15313
0.10626
0
0.013359
0.18507
4,501
164
93
27.445122
0.835878
0.486559
0
0
0
0
0.050663
0
0
0
0
0
0.043478
1
0.152174
false
0
0.369565
0
0.673913
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
9c47b2d078f8bff3deaa6bb4fad2e317c962efca
2,657
py
Python
mistral/mistral/api/controllers/v2/service.py
Toure/openstack_mistral_wip
1c3d028cb7c918de74a3cb018c84d6c5ee42e3f1
[ "Apache-2.0" ]
null
null
null
mistral/mistral/api/controllers/v2/service.py
Toure/openstack_mistral_wip
1c3d028cb7c918de74a3cb018c84d6c5ee42e3f1
[ "Apache-2.0" ]
null
null
null
mistral/mistral/api/controllers/v2/service.py
Toure/openstack_mistral_wip
1c3d028cb7c918de74a3cb018c84d6c5ee42e3f1
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Huawei Technologies Co., Ltd. # # 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 oslo_config import cfg from oslo_log import log as logging from pecan import rest import six import tooz.coordination import wsmeext.pecan as wsme_pecan from mistral.api import access_control as acl from mistral.api.controllers.v2 import resources # TODO(rakhmerov): invalid dependency, a REST controller must not depend on # a launch script. from mistral.cmd import launch from mistral import context from mistral import exceptions as exc from mistral.service import coordination from mistral.utils import rest_utils LOG = logging.getLogger(__name__) class ServicesController(rest.RestController): @rest_utils.wrap_wsme_controller_exception @wsme_pecan.wsexpose(resources.Services) def get_all(self): """Return all services.""" acl.enforce('services:list', context.ctx()) LOG.info("Fetch services.") if not cfg.CONF.coordination.backend_url: raise exc.CoordinationException("Service API is not supported.") service_coordinator = coordination.get_service_coordinator() if not service_coordinator.is_active(): raise exc.CoordinationException( "Failed to connect to coordination backend." ) services_list = [] service_group = ['%s_group' % i for i in launch.LAUNCH_OPTIONS] try: for group in service_group: members = service_coordinator.get_members(group) services_list.extend( [resources.Service.from_dict( {'type': group, 'name': member}) for member in members] ) except tooz.coordination.ToozError as e: # In the scenario of network interruption or manually shutdown # connection shutdown, ToozError will be raised. raise exc.CoordinationException( "Failed to get service members from coordination backend. %s" % six.text_type(e) ) return resources.Services(services=services_list)
35.905405
79
0.686865
329
2,657
5.449848
0.468085
0.042945
0.048522
0.017847
0.041272
0
0
0
0
0
0
0.004493
0.246142
2,657
73
80
36.39726
0.890664
0.306361
0
0.047619
0
0
0.095552
0
0
0
0
0.013699
0
1
0.02381
false
0
0.309524
0
0.380952
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
0
1
0
0
0
0
2
9c49fd2b9580ad32f0138ff3ca8bca4fa9148e22
526
py
Python
rsa-cipher/makeRsaKeys.py
mumbo-pro/cyrptography-algorithm
8e08c027c361f94c547f8b4ede723401399c93ed
[ "Apache-2.0" ]
1
2021-02-23T09:53:19.000Z
2021-02-23T09:53:19.000Z
rsa-cipher/makeRsaKeys.py
mumbo-pro/cyrptography-algorithm
8e08c027c361f94c547f8b4ede723401399c93ed
[ "Apache-2.0" ]
1
2019-09-18T08:24:05.000Z
2019-09-18T08:24:05.000Z
rsa-cipher/makeRsaKeys.py
mumbo-pro/cyrptography-algorithm
8e08c027c361f94c547f8b4ede723401399c93ed
[ "Apache-2.0" ]
null
null
null
# RSA Key Generator 2. # http://inventwithpython.com/hacking (BSD Licensed) 3. 4. import random, sys, os, rabinMiller, cryptomath The program imports the rabinMiller and cryptomath modules that we created in the last chapter, along with a few others. Chapter 24 – Public Key Cryptography and the RSA Cipher 387 makeRsaKeys.py 7. def main(): 8. # create a public/private keypair with 1024 bit keys 9. print('Making key files...') 10. makeKeyFiles('al_sweigart', 1024) 11. print('Key files made.')
65.75
188
0.714829
79
526
4.759494
0.78481
0.042553
0
0
0
0
0
0
0
0
0
0.054374
0.195817
526
7
189
75.142857
0.832151
0.547529
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0.2
null
null
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
1
0
0
0
0
0
0
0
0
2
9c4f8c513227a59417c089b50d394e43f128a12b
478
py
Python
20.py
dexinl/kids_math
48f6c37e221bbd2484ad19861c61e5ed7d3aa09e
[ "Apache-2.0" ]
null
null
null
20.py
dexinl/kids_math
48f6c37e221bbd2484ad19861c61e5ed7d3aa09e
[ "Apache-2.0" ]
null
null
null
20.py
dexinl/kids_math
48f6c37e221bbd2484ad19861c61e5ed7d3aa09e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python import random count = 20 test_set = [] while count: a = random.randrange(3,20) b = random.randrange(3,20) if a > b and a - b > 1: if (b, a-b) not in test_set: test_set.append((b, a-b)) count -= 1 elif b > a and b - a > 1: if (a, b-a) not in test_set: test_set.append((a, b-a)) count -= 1 else: continue for (a,b) in test_set: print " %2d + %2d = " % (a,b)
19.12
37
0.479079
80
478
2.7875
0.325
0.071749
0.121076
0.161435
0.224215
0.224215
0.224215
0
0
0
0
0.046667
0.372385
478
24
38
19.916667
0.696667
0.033473
0
0.111111
0
0
0.034707
0
0
0
0
0
0
0
null
null
0
0.055556
null
null
0.055556
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
9c5339840ef805187717d24fa9d11f6cf4589f50
6,574
py
Python
e2e_tests/tests/config.py
winding-lines/determined
231e1ac1df9d77cabc09b724ca2f8070eac0da73
[ "Apache-2.0" ]
null
null
null
e2e_tests/tests/config.py
winding-lines/determined
231e1ac1df9d77cabc09b724ca2f8070eac0da73
[ "Apache-2.0" ]
null
null
null
e2e_tests/tests/config.py
winding-lines/determined
231e1ac1df9d77cabc09b724ca2f8070eac0da73
[ "Apache-2.0" ]
null
null
null
import os from pathlib import Path from typing import Any, Dict from determined.common import util MASTER_SCHEME = "http" MASTER_IP = "localhost" MASTER_PORT = "8080" DET_VERSION = None DEFAULT_MAX_WAIT_SECS = 1800 MAX_TASK_SCHEDULED_SECS = 30 MAX_TRIAL_BUILD_SECS = 90 DEFAULT_TF1_CPU_IMAGE = "determinedai/environments:py-3.7-pytorch-1.7-tf-1.15-cpu-08f9c9b" DEFAULT_TF2_CPU_IMAGE = ( "determinedai/environments:py-3.8-pytorch-1.9-lightning-1.3-tf-2.4-cpu-08f9c9b" ) DEFAULT_TF1_GPU_IMAGE = "determinedai/environments:cuda-10.2-pytorch-1.7-tf-1.15-gpu-08f9c9b" DEFAULT_TF2_GPU_IMAGE = ( "determinedai/environments:cuda-11.1-pytorch-1.9-lightning-1.3-tf-2.4-gpu-08f9c9b" ) TF1_CPU_IMAGE = os.environ.get("TF1_CPU_IMAGE") or DEFAULT_TF1_CPU_IMAGE TF2_CPU_IMAGE = os.environ.get("TF2_CPU_IMAGE") or DEFAULT_TF2_CPU_IMAGE TF1_GPU_IMAGE = os.environ.get("TF1_GPU_IMAGE") or DEFAULT_TF1_GPU_IMAGE TF2_GPU_IMAGE = os.environ.get("TF2_GPU_IMAGE") or DEFAULT_TF2_GPU_IMAGE GPU_ENABLED = os.environ.get("DET_TEST_GPU_ENABLED", "1") not in ("0", "false") PROJECT_ROOT_PATH = Path(__file__).resolve().parents[2] def fixtures_path(path: str) -> str: return os.path.join(os.path.dirname(__file__), "fixtures", path) def tutorials_path(path: str) -> str: return os.path.join(os.path.dirname(__file__), "../../examples/tutorials", path) def cv_examples_path(path: str) -> str: return os.path.join(os.path.dirname(__file__), "../../examples/computer_vision", path) def nlp_examples_path(path: str) -> str: return os.path.join(os.path.dirname(__file__), "../../examples/nlp", path) def nas_examples_path(path: str) -> str: return os.path.join(os.path.dirname(__file__), "../../examples/nas", path) def meta_learning_examples_path(path: str) -> str: return os.path.join(os.path.dirname(__file__), "../../examples/meta_learning", path) def gan_examples_path(path: str) -> str: return os.path.join(os.path.dirname(__file__), "../../examples/gan", path) def decision_trees_examples_path(path: str) -> str: return os.path.join(os.path.dirname(__file__), "../../examples/decision_trees", path) def features_examples_path(path: str) -> str: return os.path.join(os.path.dirname(__file__), "../../examples/features", path) def model_hub_examples_path(path: str) -> str: return os.path.join(os.path.dirname(__file__), "../../model_hub/examples", path) def graphs_examples_path(path: str) -> str: return os.path.join(os.path.dirname(__file__), "../../examples/graphs", path) def load_config(config_path: str) -> Any: with open(config_path) as f: config = util.safe_load_yaml_with_exceptions(f) return config def make_master_url(suffix: str = "") -> str: return "{}://{}:{}/{}".format(MASTER_SCHEME, MASTER_IP, MASTER_PORT, suffix) def set_global_batch_size(config: Dict[Any, Any], batch_size: int) -> Dict[Any, Any]: config = config.copy() config["hyperparameters"]["global_batch_size"] = batch_size return config def set_slots_per_trial(config: Dict[Any, Any], slots: int) -> Dict[Any, Any]: config = config.copy() config.setdefault("resources", {}) config["resources"]["slots_per_trial"] = slots return config def set_max_length(config: Dict[Any, Any], max_length: Dict[str, int]) -> Dict[Any, Any]: config = config.copy() config["searcher"]["max_length"] = max_length return config def set_min_validation_period( config: Dict[Any, Any], min_validation_period: Dict[str, int] ) -> Dict[Any, Any]: config = config.copy() config["min_validation_period"] = min_validation_period return config def set_min_checkpoint_period( config: Dict[Any, Any], min_checkpoint_period: Dict[str, int] ) -> Dict[Any, Any]: config = config.copy() config["min_checkpoint_period"] = min_checkpoint_period return config def set_aggregation_frequency(config: Dict[Any, Any], aggregation_frequency: int) -> Dict[Any, Any]: config = config.copy() config.setdefault("optimizations", {}) config["optimizations"]["aggregation_frequency"] = aggregation_frequency return config def set_tensor_auto_tuning(config: Dict[Any, Any], auto_tune: bool) -> Dict[Any, Any]: config = config.copy() config.setdefault("optimizations", {}) config["optimizations"]["auto_tune_tensor_fusion"] = auto_tune return config def set_image(config: Dict[Any, Any], cpu_image: str, gpu_image: str) -> Dict[Any, Any]: config = config.copy() config.setdefault("environment", {}) config["environment"]["image"] = {"cpu": cpu_image, "gpu": gpu_image} return config def set_tf1_image(config: Dict[Any, Any]) -> Dict[Any, Any]: return set_image(config, TF1_CPU_IMAGE, TF1_GPU_IMAGE) def set_tf2_image(config: Dict[Any, Any]) -> Dict[Any, Any]: return set_image(config, TF2_CPU_IMAGE, TF2_GPU_IMAGE) def set_shared_fs_data_layer(config: Dict[Any, Any]) -> Dict[Any, Any]: config = config.copy() config["data_layer"] = {} config["data_layer"]["type"] = "shared_fs" return config def set_s3_data_layer(config: Dict[Any, Any]) -> Dict[Any, Any]: config = config.copy() config["data_layer"] = {} config["data_layer"]["type"] = "s3" config["data_layer"]["bucket"] = "yogadl-test" config["data_layer"]["bucket_directory_path"] = "determined_integration_tests" return config def set_random_seed(config: Dict[Any, Any], seed: int) -> Dict[Any, Any]: config = config.copy() config.setdefault("reproducibility", {}) config["reproducibility"]["experiment_seed"] = seed return config def set_hparam(config: Dict[Any, Any], name: str, value: Any) -> Dict[Any, Any]: config = config.copy() config["hyperparameters"][name] = {"type": "const", "val": value} return config def set_perform_initial_validation(config: Dict[Any, Any], init_val: bool) -> Dict[Any, Any]: config = config.copy() config["perform_initial_validation"] = init_val return config def set_pod_spec(config: Dict[Any, Any], pod_spec: Dict[Any, Any]) -> Dict[Any, Any]: config = config.copy() config.setdefault("environment", {}) config["environment"]["pod_spec"] = pod_spec return config def set_profiling_enabled(config: Dict[Any, Any]) -> Dict[Any, Any]: config = config.copy() config.setdefault("profiling", {}) config["profiling"]["enabled"] = True return config def set_entrypoint(config: Dict[Any, Any], entrypoint: str) -> Dict[Any, Any]: config = config.copy() config["entrypoint"] = entrypoint return config
32.068293
100
0.702616
930
6,574
4.697849
0.170968
0.059281
0.084688
0.065919
0.500572
0.434882
0.401007
0.401007
0.360266
0.327993
0
0.01542
0.141771
6,574
204
101
32.22549
0.758951
0
0
0.301471
0
0.029412
0.182537
0.095528
0
0
0
0
0
1
0.227941
false
0
0.029412
0.102941
0.485294
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
9c60736edd01d240f5a84615880cdfb0c36592cb
2,876
py
Python
services/model.py
theallknowng/eKheti
85e74f26bde7454293617ba727002c5c81402140
[ "MIT" ]
1
2020-04-14T20:29:09.000Z
2020-04-14T20:29:09.000Z
services/model.py
theallknowng/eKheti
85e74f26bde7454293617ba727002c5c81402140
[ "MIT" ]
5
2020-09-26T01:11:17.000Z
2022-02-10T02:01:36.000Z
services/model.py
theallknowng/eKheti
85e74f26bde7454293617ba727002c5c81402140
[ "MIT" ]
null
null
null
import pandas from keras.models import Sequential from keras.layers import Dense from keras.wrappers.scikit_learn import KerasClassifier from keras.utils import np_utils from sklearn.model_selection import cross_val_score from sklearn.model_selection import KFold from sklearn.preprocessing import LabelEncoder from sklearn.pipeline import Pipeline import keras import sys import json import requests import numpy as np # define baseline model def baseline_model(): # create model model = Sequential() model.add(Dense(56, input_dim=28, activation='relu')) model.add(Dense(112, input_dim=56, activation='relu')) model.add(Dense(7, activation='softmax')) # Compile model model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy']) return model model = baseline_model() model.load_weights("../model1.h5") # data = sys.argv[1] # data = '{"pH min":5.7,"pH max":7,"nitrogen min":109,"nitrogen max":146,"phosphorus min":20,"phosphorus max":30,"potasium min":78,"potasium max":115,"calcium min":270,"calcium max":990,"magnesium min":46,"magnesium max":96,"sulphur min":10,"sulphur max":10,"iron min":44,"iron max":46,"zinc min":3.87,"zinc max":5.87,"manganese min":4.81,"manganese max":4.81,"copper min":21,"copper max":26,"boron min":1.25,"boron max":2.25,"temperature min":25,"temperature max":35,"precipitation min":50,"precipitation max":60,"irrigation":"yes ","region":"barshi"}' # data = '{"pH min":7.6,"pH max":7.6,"nitrogen min":150.53,"nitrogen max":150.53,"phosphorus min":55.96,"phosphorus max":55.96,"potasium min":728,"potasium max":728,"calcium min":45.56,"calcium max":45.56,"magnesium min":36.46,"magnesium max":36.46,"sulphur min":44.69,"sulphur max":44.69,"iron min":2.7,"iron max":2.7,"zinc min":0.49,"zinc max":0.49,"manganese min":2.16,"manganese max":2.16,"copper min":3.5,"copper max":3.5,"boron min":0.63,"boron max":0.63,"temperature min":21,"temperature max":31,"precipitation min":60.18,"precipitation max":60.18,"irrigation":"yes ","region":"barshi"}' data= '{"pH min":5.7,"pH max":7,"nitrogen min":109,"nitrogen max":146,"phosphorus min":20,"phosphorus max":30,"potasium min":78,"potasium max":115,"calcium min":270,"calcium max":990,"magnesium min":46,"magnesium max":96,"sulphur min":10,"sulphur max":10,"iron min":44,"iron max":46,"zinc min":3.87,"zinc max":5.87,"manganese min":4.81,"manganese max":4.81,"copper min":21,"copper max":26,"boron min":1.25,"boron max":2.25,"temperature min":25,"temperature max":35,"precipitation min":50,"precipitation max":60,"irrigation":"yes ","region":"barshi"}' data = json.loads(data) dataframe = pandas.DataFrame(data,index=[0]) dataset = dataframe.values X = dataset[:,0:28].astype(float) op=model.predict(X) #op = model.predict_classes(X) #print(op) #classes = np.argmax(op) #print(classes) best_n = np.argsort(op, axis=1)[:,-7:] print(best_n[0])
54.264151
594
0.719402
473
2,876
4.342495
0.283298
0.017527
0.018987
0.036514
0.449854
0.393379
0.393379
0.378773
0.378773
0.378773
0
0.091875
0.084145
2,876
52
595
55.307692
0.687927
0.447497
0
0
0
0.032258
0.38364
0.072923
0
0
0
0
0
1
0.032258
false
0
0.451613
0
0.516129
0.032258
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
9c6d0e66968fb03790c987f71d690038a6f4abfa
3,029
py
Python
contrib/functional_tests/functional/test_reorg.py
electrumsv/electrumsv
a2d9027ccec338cadfca778888e6ef7f077b1651
[ "MIT" ]
136
2019-01-10T15:49:09.000Z
2022-02-20T04:46:39.000Z
contrib/functional_tests/functional/test_reorg.py
electrumsv/electrumsv
a2d9027ccec338cadfca778888e6ef7f077b1651
[ "MIT" ]
790
2019-01-07T01:53:35.000Z
2022-03-30T23:04:28.000Z
contrib/functional_tests/functional/test_reorg.py
electrumsv/electrumsv
a2d9027ccec338cadfca778888e6ef7f077b1651
[ "MIT" ]
65
2019-01-10T23:55:30.000Z
2021-12-19T06:47:13.000Z
""" Warning - this will reset all components back to a blank state before running the simulation Runs node1, electrumx1 and electrumsv1 and loads the default wallet on the daemon (so that newly submitted blocks will be synchronized by ElectrumSV reorged txid: 'a1fa9460ca105c1396cd338f7fa202bf79a9d244d730e91e19f6302a05b2f07a' """ import asyncio import os from pathlib import Path import pytest import pytest_asyncio from electrumsv_node import electrumsv_node from electrumsv_sdk import utils import logging import requests from contrib.functional_tests.websocket_client import TxStateWSClient MODULE_DIR = os.path.dirname(os.path.abspath(__file__)) logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger("simulate-fresh-reorg") async def wait_for_reog_transaction_update(reorged_txids, reorg_height): MAX_WAIT_TIME = 10 # seconds async with TxStateWSClient() as ws_client: try: await asyncio.wait_for(ws_client.block_until_confirmed_and_height_updated( reorged_txids, reorg_height), MAX_WAIT_TIME) except asyncio.TimeoutError: logger.exception(f"timed out after {MAX_WAIT_TIME} seconds") raise class TestReorg: @classmethod def setup_class(cls): pass @classmethod def teardown_class(cls): pass @pytest.mark.asyncio def test_reorg(self, event_loop): async def test_reorg(): payload = { "password": "test" } REORGED_TXIDS = "a1fa9460ca105c1396cd338f7fa202bf79a9d244d730e91e19f6302a05b2f07a" # Load the default wallet on ElectrumSV daemon url = f"http://127.0.0.1:9999/v1/regtest/dapp/wallets/worker1.sqlite/load_wallet" result = requests.post(url, json=payload) result.raise_for_status() # Submit node1 blocks to node if electrumsv_node.is_node_running(): utils.submit_blocks_from_file(node_id='node1', filepath=Path(MODULE_DIR).joinpath('../reorg_blocks/node1_blocks.dat')) else: logger.exception("node unavailable") try: await wait_for_reog_transaction_update([REORGED_TXIDS], 201) # Todo check state of get_balance; get_coin_state; get_transaction_history # Submit node2 blocks to node if electrumsv_node.is_node_running(): utils.submit_blocks_from_file(node_id='node1', filepath=Path(MODULE_DIR).joinpath('../reorg_blocks/node2_blocks.dat')) else: logger.exception("node unavailable") await wait_for_reog_transaction_update([REORGED_TXIDS], 202) except asyncio.TimeoutError: pytest.xfail("work in progress alongside refactoring changes...") # Todo check state of get_balance; get_coin_state; get_transaction_history event_loop.run_until_complete(test_reorg())
35.22093
96
0.678772
348
3,029
5.66092
0.451149
0.030457
0.016751
0.033503
0.316751
0.316751
0.316751
0.224365
0.17868
0.17868
0
0.048899
0.250578
3,029
85
97
35.635294
0.818943
0.191482
0
0.290909
0
0.018182
0.148604
0.052545
0
0
0
0.011765
0
1
0.054545
false
0.054545
0.181818
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
0
0
0
0
0
null
0
0
1
0
0
0
0
1
0
0
0
0
0
2
9c6f86bf35dea92442e86d8e34f3dfcb1923875e
1,336
py
Python
BasicScripts/basics.py
TomasBelskis/PythonAutomation
dd2e30abb214e37d84a8952deb834074abdc84a2
[ "MIT" ]
null
null
null
BasicScripts/basics.py
TomasBelskis/PythonAutomation
dd2e30abb214e37d84a8952deb834074abdc84a2
[ "MIT" ]
null
null
null
BasicScripts/basics.py
TomasBelskis/PythonAutomation
dd2e30abb214e37d84a8952deb834074abdc84a2
[ "MIT" ]
null
null
null
# Python Basics # String concatenaton added_strings = str(32) + "_342" # Getting input input_from_user = input() # Basic print function print(input_from_user) # Mixing boolean and comparison operations if (4 < 5) and (5 < 6): print("True") # Basic if & if else flow if name == 'Alice': print('Hi, Alice.') elif age < 12: print("You are not Alice, kiddo.") elif age > 2000: print('Unlike you, Alice is not an undead, immortal vampire.') elif age > 100: print('You are not Alice, grannie.') # Loops in Python 3 spam = 0 while spam < 5: print('Spam, spam!') spam = spam + 1 # Access loop while True: print('Who are you?') name = input() if name != 'Joe': continue print('Hello, Joe. What is the password? (It is a fish.)') password = input() if password = 'swordfish': break print('Access granted.') # For loops using range function print("My name is") for i in range(5): print('Jimmy Five Times (' + str(i) + ')') # Using starting range for i in range(12, 16): print(i) # Importing modules import random for i in range(5): print(random.randint(1, 10)) # Exiting a python program import sys while True: print('Type exit to exit.') response = input() if response == 'exit': sys.exit() print('You typed ' + response + '.')
19.940299
66
0.624251
195
1,336
4.246154
0.476923
0.025362
0.021739
0.039855
0.086957
0.041063
0
0
0
0
0
0.030632
0.242515
1,336
66
67
20.242424
0.787549
0.193862
0
0.095238
0
0
0.271617
0
0
0
0
0
0
0
null
null
0.071429
0.047619
null
null
0.380952
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
9c7a5adb483cec8b62999237b4fa84739552c994
2,414
py
Python
databoard/databoard/default_config.py
glemaitre/ramp-board-1
a5e9b423a55d196d38232fd94b2f7d53fb35d9d8
[ "BSD-3-Clause" ]
null
null
null
databoard/databoard/default_config.py
glemaitre/ramp-board-1
a5e9b423a55d196d38232fd94b2f7d53fb35d9d8
[ "BSD-3-Clause" ]
null
null
null
databoard/databoard/default_config.py
glemaitre/ramp-board-1
a5e9b423a55d196d38232fd94b2f7d53fb35d9d8
[ "BSD-3-Clause" ]
null
null
null
import os class Config(object): # FLASK GENERAL CONFIG PARAMETERS SECRET_KEY = os.getenv('DATABOARD_SECRET_KEY', 'abcdefghijkl') # abs max upload file size, to throw 413, before saving it WTF_CSRF_ENABLED = True LOG_FILENAME = None # if None, output to screen MAX_CONTENT_LENGTH = 1024 * 1024 * 1024 DEBUG = False TESTING = False # FLASK MAIL CONFIG PARAMETERS MAIL_SERVER = os.getenv('DATABOARD_MAIL_SERVER', 'smtp.gmail.com') MAIL_PORT = os.getenv('DATABOARD_MAIL_PORT', 587) MAIL_USERNAME = os.getenv('DATABOARD_MAIL_USERNAME', 'user') MAIL_PASSWORD = os.getenv('DATABOARD_MAIL_PASSWORD', 'password') MAIL_DEFAULT_SENDER = ( os.getenv('DATABOARD_MAIL_SENDER_ALIAS', 'RAMP admin'), os.getenv('DATABOARD_MAIL_SENDER', '[email protected]') ) MAIL_RECIPIENTS = [] MAIL_USE_TLS = False MAIL_USE_SSL = True MAIL_DEBUG = False SQLALCHEMY_TRACK_MODIFICATIONS = True SQLALCHEMY_DATABASE_URI = os.getenv('DATABOARD_DB_URL') SQLALCHEMY_MIGRATE_REPO = os.getenv('DATABOARD_DB_MIGRATE_REPO') SQLALCHEMY_RECORD_QUERIES = ( True if os.getenv('DATABOARD_DB_PERF', 0) else False ) class RampConfig(object): RAMP_ADMIN_MAILS = os.getenv('DATABOARD_ADMIN_MAILS', []) RAMP_KITS_DIR = 'ramp-kits' RAMP_DATA_DIR = 'ramp-data' RAMP_SUBMISSIONS_DIR = 'submissions' RAMP_SANDBOX_DIR = 'starting_kit' RAMP_SERVER_PORT = 8080 # make it False if parallel training is not working # is_parallelize RAMP_PARALLELIZE = bool(os.getenv('DATABOARD_PARALLELIZE', 1)) ###################################################################### class ProductionConfig(Config): DEPLOYMENT_PATH = os.getenv( 'DATABOARD_DEPLOYMENT_PATH', '/tmp/databoard') class DevelopmentConfig(Config): DEBUG = True MAIL_DEBUG = True SQLALCHEMY_DATABASE_URI = os.getenv( 'DATABOARD_DB_URL_TEST', 'postgresql://mrramp:mrramp@localhost/databoard_test' ) DEPLOYMENT_PATH = os.getenv( 'DATABOARD_DEPLOYMENT_PATH_TEST', '/tmp/databoard_test') class TestingConfig(Config): TESTING = True SQLALCHEMY_DATABASE_URI = os.getenv( 'DATABOARD_DB_URL_TEST', 'postgresql://mrramp:mrramp@localhost/databoard_test' ) DEPLOYMENT_PATH = os.getenv( 'DATABOARD_DEPLOYMENT_PATH_TEST', '/tmp/databoard_test', )
30.948718
70
0.681856
284
2,414
5.471831
0.362676
0.087516
0.185972
0.081081
0.299871
0.265122
0.265122
0.236165
0.236165
0.20592
0
0.012358
0.195526
2,414
77
71
31.350649
0.787848
0.086164
0
0.160714
0
0
0.302489
0.193048
0
0
0
0
0
1
0
false
0.017857
0.017857
0
0.714286
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
9c7dd63e969ee9cd5df33ca5c30412f39a0774ab
366
py
Python
tests/utils/test_metrics.py
haochuanwei/hover
53eb38c718e44445b18a97e391b7f90270802b04
[ "MIT" ]
251
2020-11-22T15:02:30.000Z
2022-03-23T23:29:28.000Z
tests/utils/test_metrics.py
MaxCodeXTC/hover
feeb0e0c59295a3c883823ccef918dfe388b603c
[ "MIT" ]
22
2020-12-03T07:50:27.000Z
2022-02-26T01:43:41.000Z
tests/utils/test_metrics.py
MaxCodeXTC/hover
feeb0e0c59295a3c883823ccef918dfe388b603c
[ "MIT" ]
14
2020-11-18T06:46:02.000Z
2022-03-03T08:14:18.000Z
from hover.utils.metrics import classification_accuracy import numpy as np def test_classification_accuracy(): true = np.array([1, 2, 3, 4, 5, 6, 7, 7]) pred = np.array([1, 2, 3, 4, 5, 6, 7, 8]) accl = classification_accuracy(true, pred) accr = classification_accuracy(pred, true) assert np.allclose(accl, 7/8) assert np.allclose(accr, 7/8)
33.272727
55
0.677596
59
366
4.118644
0.457627
0.36214
0.213992
0.074074
0.115226
0.115226
0.115226
0.115226
0.115226
0
0
0.06734
0.188525
366
10
56
36.6
0.750842
0
0
0
0
0
0
0
0
0
0
0
0.222222
1
0.111111
false
0
0.222222
0
0.333333
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
92c00c62a4d73688ee5500b37708447cbeae1913
557
py
Python
Authentication/migrations/0004_auto_20201115_1105.py
CHESyrian/Estebyan
015c0a8e95d033af04ba949942da79a4f5a90488
[ "MIT" ]
null
null
null
Authentication/migrations/0004_auto_20201115_1105.py
CHESyrian/Estebyan
015c0a8e95d033af04ba949942da79a4f5a90488
[ "MIT" ]
null
null
null
Authentication/migrations/0004_auto_20201115_1105.py
CHESyrian/Estebyan
015c0a8e95d033af04ba949942da79a4f5a90488
[ "MIT" ]
null
null
null
# Generated by Django 3.0.6 on 2020-11-15 09:05 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Authentication', '0003_auto_20201113_2210'), ] operations = [ migrations.AlterField( model_name='profiles', name='Qu_Shares', field=models.IntegerField(default=0), ), migrations.AlterField( model_name='profiles', name='Questionnais', field=models.IntegerField(default=0), ), ]
23.208333
54
0.587074
54
557
5.944444
0.666667
0.124611
0.155763
0.180685
0.448598
0.255452
0
0
0
0
0
0.084833
0.301616
557
23
55
24.217391
0.74036
0.08079
0
0.470588
1
0
0.145098
0.045098
0
0
0
0
0
1
0
false
0
0.058824
0
0.235294
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
92c68dfb6fa34afab6acdb9718f1d8ef9da011d5
670
py
Python
input_handler.py
Wyverns010/Body-Keypoints-Detection
980445da5e87c898a00a8ef1c9e1e143d09d4643
[ "Apache-2.0" ]
1
2021-06-06T07:08:27.000Z
2021-06-06T07:08:27.000Z
input_handler.py
Wyverns010/Body-Keypoints-Detection
980445da5e87c898a00a8ef1c9e1e143d09d4643
[ "Apache-2.0" ]
null
null
null
input_handler.py
Wyverns010/Body-Keypoints-Detection
980445da5e87c898a00a8ef1c9e1e143d09d4643
[ "Apache-2.0" ]
null
null
null
import os import traceback class InputHandler: IMAGES_PARENT_FOLDER = './images' def __init__(self): filesList = [] def listFiles(self,path=''): if path != '': self.IMAGES_PARENT_FOLDER = path try: self.listFiles = [os.path.join(self.IMAGES_PARENT_FOLDER,imageFile) for imageFile in os.listdir(self.IMAGES_PARENT_FOLDER)\ if os.path.isfile(os.path.join(self.IMAGES_PARENT_FOLDER,imageFile))] except: print(traceback.print_exec()) return self.listFiles if __name__ == '__main__': obj = InputHandler() print(obj.listFiles())
25.769231
135
0.60597
73
670
5.246575
0.39726
0.156658
0.234987
0.229765
0.214099
0.214099
0.214099
0.214099
0
0
0
0
0.286567
670
26
136
25.769231
0.801255
0
0
0
0
0
0.023845
0
0
0
0
0
0
1
0.111111
false
0
0.111111
0
0.388889
0.111111
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
92d42a0f362d457b4431027767a7c26d248663c3
6,206
py
Python
contrib/antlrqueryparser/src/python/generate_asts.py
marblestation/montysolr
50917b4d53caac633fe9d1965f175401b3edc77d
[ "Apache-2.0" ]
24
2015-03-23T17:57:47.000Z
2021-11-01T17:08:58.000Z
contrib/antlrqueryparser/src/python/generate_asts.py
marblestation/montysolr
50917b4d53caac633fe9d1965f175401b3edc77d
[ "Apache-2.0" ]
138
2015-01-02T16:47:51.000Z
2022-02-26T02:44:07.000Z
contrib/antlrqueryparser/src/python/generate_asts.py
marblestation/montysolr
50917b4d53caac633fe9d1965f175401b3edc77d
[ "Apache-2.0" ]
10
2015-03-11T19:49:51.000Z
2020-12-09T09:22:02.000Z
import sys import subprocess as sub import os """ Simple utility script to generate HTML charts of how ANTLR parses every query and what is the resulting AST. """ def run(grammar_name, basedir='', cp='.:/dvt/antlr-142/lib/antlr-3.4-complete.jar:/x/dev/antlr-34/lib/antlr-3.4-complete.jar', grammardir='', java_executable='java', dot_executable='dot' ): if not basedir: basedir = os.path.abspath('../../../../../../../../../../bin') old_dir = os.getcwd() thisdir = grammardir if not thisdir: thisdir = os.path.dirname(os.path.abspath(__file__)) os.chdir(thisdir) cp += os.pathsep + basedir #print "We'll generate ANTLR graphs\ngramar: %s\nbasedir: %s\nclasspath: %s\nparserdir: %s" % (grammar_name, basedir, cp, thisdir) grammar_file = os.path.join(thisdir, grammar_name + '.g') if not os.path.exists(grammar_file): raise Exception('Grammar %s does not exist in classpath: %s' % (grammar_file, cp)) tmp_file = os.path.join(basedir, 'ast-tree.dot') index_file = os.path.join(basedir, '%s.html' % grammar_name) gunit_file = os.path.join(thisdir, grammar_name + '.gunit') generate_ast_command = '%s -cp %s org.apache.lucene.queryparser.flexible.aqp.parser.BuildAST %s "%%s"' % (java_executable, cp, grammar_name) generate_svg_command = '%s -Tsvg %s' % (dot_executable, tmp_file) test_cases = load_gunit_file(gunit_file) index_fo = open(index_file, 'w') index_fo.write('<h1>Test cases generated from grammar: %s</h1>\n' % grammar_name) out_lines = [] i = 0 cmds = generate_ast_command.split() cmds_svg = generate_svg_command.split() total = sum(map(lambda x: len(x), test_cases.values())) toc = [] data = [] toc.append('<a name="toc" />') for section,values in test_cases.items(): output = tree = svg = '' toc.append('The rule: <a href="#anchor%s"><pre>%s</pre></a><br/>' % (section, section)) # generate AST tree for query in values: i += 1 cmds[-1] = query #tmp_dot = os.path.join(basedir, 'tmp-%s.dot' % i) tmp_dot = tmp_file if os.path.exists(tmp_dot): os.remove(tmp_dot) toc.append('%s. <a href="#anchor%s"><pre>%s</pre></a><br/>' % (i, i, query)) print '// %s/%s :: %s' % (i, total, query) #generate graph p = sub.Popen(cmds,stdout=sub.PIPE,stderr=sub.PIPE) output, errors = p.communicate() if output: fo = open(tmp_dot, 'w') fo.write(output) fo.close() else: print 'Error generating AST for: ' + query print errors if 'java.lang.ClassNotFoundException' in errors: raise Exception('Please fix your classpath') continue #generate tree cmds.append(section) cmds.append("tree") p = sub.Popen(cmds,stdout=sub.PIPE,stderr=sub.PIPE) tree, errors = p.communicate() if tree: q = query.replace('\\', '\\\\').replace('"', '\\"').replace('\'', '\\\'') t = tree.strip().replace('\\', '\\\\').replace('"', '\\"').replace("'", "\\'") print "\"%s\" -> \"%s\"" % (q, t) else: print 'Error generating AST for: ' + query print errors tree = errors cmds.pop() cmds.pop() cmds_svg[-1] = tmp_dot try: p = sub.Popen(cmds_svg,stdout=sub.PIPE,stderr=sub.PIPE) except Exception, e: print "The following command failed:" print ' '.join(cmds_svg) raise e output, errors = p.communicate() data.append(' <a name="anchor%s"/><h3>%s. <pre">%s</pre>&nbsp;&nbsp; <a href="#toc">^</a> </h3>' % (i, i, query)) data.append(output) data.append('<br/><pre>' + tree + '</pre>') data.append('<br/>') index_fo.write(''' <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <style type="text/css"> pre {display:inline;} </style> </head> </body> ''') index_fo.write('\n'.join(toc)) index_fo.write('\n'.join(data)) index_fo.write(''' </body> </html> ''') index_fo.close() print 'HTML charts generated into:', index_fo.name os.chdir(old_dir) def load_gunit_file(gunit_file): fi = open(gunit_file, 'r') test_cases = {} section = None for line in fi: l = line.strip() if not l or l[:2] == '//': continue parts = split_line(l) if len(parts) == 1 and parts[0][-1] == ':': section = parts[0][:-1] test_cases.setdefault(section, []) elif len(parts) > 1 and parts[1].lower() != 'fails': query = parts[0] query = query.replace('\\\"', '"').replace('\\\'', '\'').replace('\\\\', '\\') test_cases[section].append(query) fi.close() return test_cases def split_line(line): line = line.replace('->', '') start = 0 last_pos = None parts = [] while line.find('"', start) > -1: p = line.index('"', start) start = p+1 if line[p-1] != '\\': if last_pos is None: last_pos = p else: parts.append(line[last_pos+1:p]) parts.append(line[p+1:].strip()) last_pos = None break if not parts: parts.append(line.strip()) return parts if __name__ == '__main__': if len(sys.argv) == 1: sys.argv.insert(1, "StandardLuceneGrammar") run(*sys.argv[1:])
30.722772
144
0.496616
728
6,206
4.120879
0.271978
0.02
0.016667
0.018667
0.166667
0.115333
0.092667
0.071333
0.071333
0.026
0
0.008808
0.341444
6,206
201
145
30.875622
0.725226
0.035933
0
0.158621
1
0.041379
0.175427
0.07099
0
0
0
0
0
0
null
null
0
0.02069
null
null
0.062069
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
1
0
0
0
0
0
0
0
0
2
92dbf0257f2cb3330104352818f4db40e27c4927
513
py
Python
guifw/models/port.py
luizerico/PyGuiFW
d79347db7d4bd9e09fbc53215d79c06ccf16bad5
[ "MIT" ]
1
2021-02-05T02:58:19.000Z
2021-02-05T02:58:19.000Z
guifw/models/port.py
luizerico/PyGuiFW
d79347db7d4bd9e09fbc53215d79c06ccf16bad5
[ "MIT" ]
1
2018-11-09T16:10:50.000Z
2018-11-09T16:10:50.000Z
guifw/models/port.py
luizerico/PyGuiFW
d79347db7d4bd9e09fbc53215d79c06ccf16bad5
[ "MIT" ]
null
null
null
from django.db import models from django import forms from audit_log.models.managers import AuditLog # Create your models here. class Port(models.Model): name = models.CharField(max_length=250) port = models.CharField(max_length=250) description = models.TextField(blank=True) audit_log = AuditLog() #icon = models.ImageField(upload_to='images', blank=True) def __str__(self): return self.name class FormPort(forms.ModelForm): pass class Meta: model = Port
20.52
61
0.707602
67
513
5.283582
0.567164
0.056497
0.101695
0.135593
0.152542
0
0
0
0
0
0
0.014634
0.20078
513
25
62
20.52
0.84878
0.155945
0
0
0
0
0
0
0
0
0
0
0
1
0.071429
false
0.071429
0.214286
0.071429
0.857143
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
92dc4e7fbdb299e18e1175c0718307d433b0cb15
386
py
Python
app/backend/arm/migrations/0002_auto_20190924_1712.py
karstenv/nmp-arm
47e45f0391820000f461ab6e994e20eacfffb457
[ "Apache-2.0" ]
2
2019-08-12T22:06:23.000Z
2019-10-22T20:50:32.000Z
app/backend/arm/migrations/0002_auto_20190924_1712.py
karstenv/nmp-arm
47e45f0391820000f461ab6e994e20eacfffb457
[ "Apache-2.0" ]
12
2019-07-10T18:11:31.000Z
2022-02-10T08:47:57.000Z
app/backend/arm/migrations/0002_auto_20190924_1712.py
karstenv/nmp-arm
47e45f0391820000f461ab6e994e20eacfffb457
[ "Apache-2.0" ]
6
2019-07-03T21:24:11.000Z
2021-04-29T17:31:34.000Z
# Generated by Django 2.2.5 on 2019-09-25 00:12 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('arm', '0001_initial'), ] operations = [ migrations.DeleteModel( name='CautionMessage', ), migrations.DeleteModel( name='RiskRatingValue', ), ]
19.3
48
0.546632
34
386
6.176471
0.764706
0.2
0.238095
0
0
0
0
0
0
0
0
0.075397
0.34715
386
19
49
20.315789
0.757937
0.11658
0
0.307692
1
0
0.1375
0
0
0
0
0
0
1
0
false
0
0.076923
0
0.307692
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
92df7af4ff3a17d2d4ea5d2cff4ae315569f3502
830
py
Python
tests/dummy_repo/tvm/python/tvm/api.py
csullivan/ffi-navigator
ed47678f9cb8c6d3637bf3219d3cf7b2754b84bb
[ "Apache-2.0" ]
148
2019-12-28T19:02:17.000Z
2022-03-27T07:30:13.000Z
tests/dummy_repo/tvm/python/tvm/api.py
csullivan/ffi-navigator
ed47678f9cb8c6d3637bf3219d3cf7b2754b84bb
[ "Apache-2.0" ]
21
2019-12-28T17:29:24.000Z
2021-11-24T09:59:35.000Z
tests/dummy_repo/tvm/python/tvm/api.py
csullivan/ffi-navigator
ed47678f9cb8c6d3637bf3219d3cf7b2754b84bb
[ "Apache-2.0" ]
17
2019-12-29T01:46:13.000Z
2022-01-10T09:56:46.000Z
from ._ffi.base import string_types from ._ffi.object import register_object, Object from ._ffi.node import register_node, NodeBase from ._ffi.node import convert_to_node as _convert_to_node from ._ffi.node_generic import _scalar_type_inference from ._ffi.function import Function from ._ffi.function import _init_api, register_func, get_global_func, extract_ext_funcs from ._ffi.function import convert_to_tvm_func as _convert_tvm_func from ._ffi.runtime_ctypes import TVMType from . import _api_internal from . import make as _make from . import expr as _expr from . import tensor as _tensor from . import schedule as _schedule from . import container as _container from . import tag as _tag int8 = "int8" int32 = "int32" float32 = "float32" handle = "handle" def min_value(dtype): return _api_internal._min_value(dtype)
31.923077
87
0.812048
128
830
4.890625
0.359375
0.100639
0.052716
0.100639
0
0
0
0
0
0
0
0.01385
0.13012
830
25
88
33.2
0.853186
0
0
0
0
0
0.026506
0
0
0
0
0
0
1
0.045455
false
0
0.727273
0.045455
0.818182
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
92f361f8ed017247a610edc6823b43b8f1e0fefd
290
py
Python
registerapp/api.py
RajapandiR/django-register
cf20829fe3515bdd3112a88a890d83d852f09bde
[ "MIT" ]
null
null
null
registerapp/api.py
RajapandiR/django-register
cf20829fe3515bdd3112a88a890d83d852f09bde
[ "MIT" ]
6
2021-03-19T04:17:51.000Z
2021-09-22T19:07:17.000Z
registerapp/api.py
RajapandiR/django-register
cf20829fe3515bdd3112a88a890d83d852f09bde
[ "MIT" ]
null
null
null
from rest_framework import viewsets from rest_framework.views import APIView from registerapp import serializers from registerapp import models class RegisterViewSet(viewsets.ModelViewSet): serializer_class = serializers.RegisterSerializer queryset = models.RegisterPage.objects.all()
26.363636
50
0.855172
32
290
7.65625
0.59375
0.065306
0.138776
0
0
0
0
0
0
0
0
0
0.1
290
10
51
29
0.938697
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.571429
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
92f9e01e28f69fd9e75ceb00e00af2fc86419292
1,618
py
Python
api/models/indicator/child_objects/properties.py
taco-chainalysis/pypulsedive
e89a2651e1ef41a1a51ddbeabc1f914a0d4e467d
[ "MIT" ]
null
null
null
api/models/indicator/child_objects/properties.py
taco-chainalysis/pypulsedive
e89a2651e1ef41a1a51ddbeabc1f914a0d4e467d
[ "MIT" ]
null
null
null
api/models/indicator/child_objects/properties.py
taco-chainalysis/pypulsedive
e89a2651e1ef41a1a51ddbeabc1f914a0d4e467d
[ "MIT" ]
1
2021-11-10T16:50:32.000Z
2021-11-10T16:50:32.000Z
from .grandchild_objects import Cookies from .grandchild_objects import Dns from .grandchild_objects import Dom from .grandchild_objects import Geo #from .grandchild_objects import Http #from .grandchild_objects import Meta from .grandchild_objects import Ssl #from .grandchild_objects import WhoIs class Properties(object): FIELD_MAP = { "cookies": "cookies", "dns": "dns", "dom": "dom", "geo": "geo", "http": "http", "meta": "meta", "ssl": "ssl", "whois": "whois" } def __init__(self): self.cookies = "" self.dns = "" self.dom = "" self.geo = "" self.http = "" self.meta = "" self.ssl = "" self.whois = "" @staticmethod def from_dictionary(properties_dict: dict): properties = Properties() field_map = getattr(properties.__class__, "FIELD_MAP") for key_name in field_map: if key_name in properties_dict: setattr(properties, field_map[key_name], properties_dict[key_name]) properties.cookies = Cookies.from_dictionary(properties.cookies) properties.dns = Dns.from_dictionary(properties.dns) properties.dom = Dom.from_dictionary(properties.dom) properties.geo = Geo.from_dictionary(properties.geo) #properties.http = Http.from_dictionary(properties.http) #properties.meta = Meta.from_dictionary(properties.meta) properties.ssl = Ssl.from_dictionary(properties.ssl) #properties.whois = WhoIs.from_dictionary(properties.whois) return properties
33.708333
83
0.642769
176
1,618
5.698864
0.176136
0.125623
0.215354
0.215354
0
0
0
0
0
0
0
0
0.249073
1,618
48
84
33.708333
0.825514
0.171199
0
0
0
0
0.054641
0
0
0
0
0
0
1
0.052632
false
0
0.131579
0
0.263158
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
92feee19e193679cb75cdd6152ceb20caad92e8b
389
gyp
Python
notification/app/node_modules/hiredis/binding.gyp
c2gconsulting/bulkpay
224a52427f80a71f66613c367a5596cbd5e97294
[ "MIT" ]
208
2015-01-07T03:50:56.000Z
2022-03-21T03:34:12.000Z
binding.gyp
badboy/hiredis-node-win
d113945a182ba1d616f8fba06e2d80dc9f09552b
[ "BSD-3-Clause" ]
72
2015-01-11T09:54:16.000Z
2019-11-21T14:07:43.000Z
binding.gyp
badboy/hiredis-node-win
d113945a182ba1d616f8fba06e2d80dc9f09552b
[ "BSD-3-Clause" ]
55
2015-01-10T20:54:13.000Z
2022-02-02T14:08:01.000Z
{ 'targets': [ { 'target_name': 'hiredis', 'sources': [ 'src/hiredis.cc' , 'src/reader.cc' ], 'include_dirs': ["<!(node -e \"require('nan')\")"], 'dependencies': [ 'deps/hiredis.gyp:hiredis-c' ], 'defines': [ '_GNU_SOURCE' ], 'cflags': [ '-Wall', '-O3' ] } ] }
16.913043
57
0.375321
29
389
4.896552
0.827586
0
0
0
0
0
0
0
0
0
0
0.004367
0.411311
389
22
58
17.681818
0.615721
0
0
0.136364
0
0
0.403599
0.066838
0
0
0
0
0
1
0
true
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
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
2
1310f38eea5f3635000289a9e4355d5205ba5668
551
py
Python
mmdet/ops/orn/functions/__init__.py
JarvisUSTC/DARDet
debbf476e9750030db67f030a40cf8d4f03e46ee
[ "Apache-2.0" ]
274
2021-04-06T15:46:06.000Z
2022-03-31T02:00:10.000Z
mmdet/ops/orn/functions/__init__.py
JarvisUSTC/DARDet
debbf476e9750030db67f030a40cf8d4f03e46ee
[ "Apache-2.0" ]
136
2021-07-11T11:26:54.000Z
2022-03-31T02:45:34.000Z
mmdet/ops/orn/functions/__init__.py
JarvisUSTC/DARDet
debbf476e9750030db67f030a40cf8d4f03e46ee
[ "Apache-2.0" ]
84
2021-05-29T06:58:14.000Z
2022-03-31T07:44:10.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import torch from .active_rotating_filter import active_rotating_filter from .active_rotating_filter import ActiveRotatingFilter from .rotation_invariant_encoding import rotation_invariant_encoding from .rotation_invariant_encoding import RotationInvariantEncoding from .rotation_invariant_pooling import RotationInvariantPooling __all__ = ['ActiveRotatingFilter', 'active_rotating_filter', 'rotation_invariant_encoding', 'RotationInvariantEncoding', 'RotationInvariantPooling']
61.222222
148
0.874773
56
551
8.214286
0.410714
0.184783
0.173913
0.104348
0.282609
0
0
0
0
0
0
0
0.072595
551
9
148
61.222222
0.900196
0.125227
0
0
0
0
0.245322
0.203742
0
0
0
0
0
1
0
false
0
0.857143
0
0.857143
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
1
0
0
0
0
2
131ebdee55bb427354a422cace3807e8ec4ae9ed
3,039
py
Python
src/production_ecommerce/account/models.py
sheriffbarrow/production-ecommerce
cb1a29795ff8e9b4aa95a78df50bb8aa3e5f4350
[ "MIT" ]
1
2020-08-18T16:23:03.000Z
2020-08-18T16:23:03.000Z
src/production_ecommerce/account/models.py
sheriffbarrow/production-ecommerce
cb1a29795ff8e9b4aa95a78df50bb8aa3e5f4350
[ "MIT" ]
8
2020-06-06T01:06:35.000Z
2021-09-08T01:35:58.000Z
src/production_ecommerce/account/models.py
sheriffbarrow/production-ecommerce
cb1a29795ff8e9b4aa95a78df50bb8aa3e5f4350
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractBaseUser, BaseUserManager class MyAccountManager(BaseUserManager): def create_user(self, email, username, password=None): if not email: raise ValueError('Users must have an email address') if not username: raise ValueError('Users must have a username') user = self.model( email=self.normalize_email(email), username=username, ) user.set_password(password) user.save(using=self._db) return user def create_superuser(self, email, username, password): user = self.create_user( email=self.normalize_email(email), password=password, username=username, ) user.is_admin = True user.is_staff = True user.is_superuser = True user.save(using=self._db) return user class UserVendor(AbstractBaseUser): email = models.EmailField(verbose_name='email address',max_length=255,unique=True) contact = models.IntegerField(null=True, blank=True) username = models.CharField(max_length=30) location = models.CharField(max_length=30) profession = models.CharField(max_length=30) experience = models.CharField(max_length=30) verified_id = models.CharField(max_length=255) date_joined = models.DateTimeField(verbose_name='date joined', auto_now_add=True) is_active = models.BooleanField(default=True) is_admin = models.BooleanField(default=False) is_staff = models.BooleanField(default=False) image = models.ImageField(default='profile1.png' ,upload_to='profiles/images/', null=True, blank=True) # notice the absence of a "Password field", that is built in. objects = MyAccountManager() USERNAME_FIELD = 'email' REQUIRED_FIELDS = ['username'] # Email & Password are required by default. def __str__(self): return self.email # For checking permissions. to keep it simple all admin have ALL permissons def has_perm(self, perm, obj=None): return self.is_admin # Does this user have permission to view this app? (ALWAYS YES FOR SIMPLICITY) def has_module_perms(self, app_label): return True class Client(AbstractBaseUser): email = models.EmailField(verbose_name='email address',max_length=255,unique=True) contact = models.IntegerField(null=True, blank=True) username = models.CharField(max_length=30) location = models.CharField(max_length=30) date_joined = models.DateTimeField(verbose_name='date joined', auto_now_add=True) is_active = models.BooleanField(default=True) is_admin = models.BooleanField(default=False) is_staff = models.BooleanField(default=False) # notice the absence of a "Password field", that is built in. objects = MyAccountManager() USERNAME_FIELD = 'email' REQUIRED_FIELDS = ['username'] # Email & Password are required by default. def __str__(self): return self.email # For checking permissions. to keep it simple all admin have ALL permissons def has_perm(self, perm, obj=None): return self.is_admin # Does this user have permission to view this app? (ALWAYS YES FOR SIMPLICITY) def has_module_perms(self, app_label): return True
33.395604
103
0.763738
418
3,039
5.409091
0.272727
0.035825
0.055728
0.074303
0.749226
0.676692
0.676692
0.651039
0.651039
0.651039
0
0.008403
0.138532
3,039
90
104
33.766667
0.855233
0.166173
0
0.636364
0
0
0.063366
0
0
0
0
0
0
1
0.121212
false
0.060606
0.030303
0.090909
0.712121
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
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
13209dfae3637157d917f9f553a882a2aac83180
758
py
Python
dbtmetabase/models/config.py
fernandobrito/dbt-metabase
a1fa5a2c7c5e3cf12ead8806d39f6bd3a212fb83
[ "MIT" ]
null
null
null
dbtmetabase/models/config.py
fernandobrito/dbt-metabase
a1fa5a2c7c5e3cf12ead8806d39f6bd3a212fb83
[ "MIT" ]
1
2021-08-01T19:29:59.000Z
2021-08-01T19:29:59.000Z
dbtmetabase/models/config.py
fernandobrito/dbt-metabase
a1fa5a2c7c5e3cf12ead8806d39f6bd3a212fb83
[ "MIT" ]
null
null
null
from dataclasses import dataclass, field from typing import Optional, Iterable, Union @dataclass class MetabaseConfig: # Metabase Client database: str host: str user: str password: str # Metabase additional connection opts use_http: bool = False verify: Union[str, bool] = True # Metabase Sync sync_skip: bool = False sync_timeout: Optional[int] = None @dataclass class DbtConfig: # dbt Reader database: str manifest_path: Optional[str] = None path: Optional[str] = None # dbt Target Models schema: Optional[str] = None schema_excludes: Iterable = field(default_factory=list) includes: Iterable = field(default_factory=list) excludes: Iterable = field(default_factory=list)
24.451613
59
0.700528
90
758
5.811111
0.5
0.063098
0.086042
0.154876
0.208413
0.14914
0
0
0
0
0
0
0.224274
758
30
60
25.266667
0.889456
0.124011
0
0.190476
0
0
0
0
0
0
0
0
0
1
0
true
0.047619
0.095238
0
0.904762
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
0
0
0
1
0
0
2
1325914730cb3ee047b3e9ac93790891768376c5
4,269
py
Python
nps/migrations/0013_auto_20180314_1805.py
jak0203/nps-dash
9a3bdb0e55e0c857bcce8ed8df04b52a2b71872f
[ "MIT" ]
null
null
null
nps/migrations/0013_auto_20180314_1805.py
jak0203/nps-dash
9a3bdb0e55e0c857bcce8ed8df04b52a2b71872f
[ "MIT" ]
1
2018-03-19T04:08:10.000Z
2018-03-19T04:08:10.000Z
nps/migrations/0013_auto_20180314_1805.py
jak0203/nps-dash
9a3bdb0e55e0c857bcce8ed8df04b52a2b71872f
[ "MIT" ]
null
null
null
# Generated by Django 2.0.3 on 2018-03-15 01:05 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nps', '0012_auto_20180314_1600'), ] operations = [ migrations.CreateModel( name='ClientAggregations', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('client', models.CharField(max_length=30)), ('survey', models.CharField(max_length=30)), ('user_type', models.CharField(blank=True, default=None, max_length=30, null=True)), ('nps_score', models.FloatField()), ('total_responses', models.IntegerField()), ('promoters', models.IntegerField()), ('detractors', models.IntegerField()), ('neutral', models.IntegerField()), ('percent_detractors', models.FloatField(blank=True, default=None, null=True)), ('percent_promoters', models.FloatField(blank=True, default=None, null=True)), ('percent_neutral', models.FloatField(blank=True, default=None, null=True)), ('statistically_significant', models.BooleanField(default=False)), ], ), migrations.DeleteModel( name='AggregatedResults', ), migrations.DeleteModel( name='ProductUsers', ), migrations.RenameField( model_name='productaggregations', old_name='total_detractors', new_name='detractors', ), migrations.RenameField( model_name='productaggregations', old_name='total_neutral', new_name='neutral', ), migrations.RenameField( model_name='productaggregations', old_name='number_clients_negative', new_name='num_clients_negative', ), migrations.RenameField( model_name='productaggregations', old_name='number_clients_positive', new_name='num_clients_positive', ), migrations.RenameField( model_name='productaggregations', old_name='total_promoters', new_name='promoters', ), migrations.RenameField( model_name='surveyaggregations', old_name='total_detractors', new_name='detractors', ), migrations.RenameField( model_name='surveyaggregations', old_name='total_neutral', new_name='neutral', ), migrations.RenameField( model_name='surveyaggregations', old_name='number_clients_negative', new_name='num_clients_negative', ), migrations.RenameField( model_name='surveyaggregations', old_name='number_clients_positive', new_name='num_clients_positive', ), migrations.RenameField( model_name='surveyaggregations', old_name='total_promoters', new_name='promoters', ), migrations.RemoveField( model_name='productaggregations', name='number_clients_neutral', ), migrations.RemoveField( model_name='productaggregations', name='percent_clients_neutral', ), migrations.RemoveField( model_name='surveyaggregations', name='number_clients_neutral', ), migrations.RemoveField( model_name='surveyaggregations', name='percent_clients_neutral', ), migrations.AddField( model_name='productaggregations', name='user_type', field=models.CharField(blank=True, default=None, max_length=30, null=True), ), migrations.AddField( model_name='surveyaggregations', name='user_type', field=models.CharField(blank=True, default=None, max_length=30, null=True), ), migrations.AlterUniqueTogether( name='clientaggregations', unique_together={('client', 'survey', 'user_type')}, ), ]
36.177966
114
0.575076
352
4,269
6.724432
0.235795
0.060837
0.109844
0.126743
0.689058
0.651035
0.624842
0.624842
0.417406
0.34305
0
0.013955
0.311783
4,269
117
115
36.487179
0.791695
0.010541
0
0.738739
1
0
0.231644
0.054477
0
0
0
0
0
1
0
false
0
0.009009
0
0.036036
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
1328cd1366c0161d1070168617ce0f27d9f43e15
246
py
Python
virtual/lib/python3.6/site-packages/mako/__init__.py
kenmutuma001/Blog
6b19a77b71694bbe9f5e84207de46c68f87ebc5e
[ "Unlicense" ]
1
2019-04-24T21:53:37.000Z
2019-04-24T21:53:37.000Z
virtual/lib/python3.6/site-packages/mako/__init__.py
kenmutuma001/Blog
6b19a77b71694bbe9f5e84207de46c68f87ebc5e
[ "Unlicense" ]
5
2021-03-19T00:19:04.000Z
2022-01-13T01:12:44.000Z
virtual/lib/python3.6/site-packages/mako/__init__.py
kenmutuma001/Blog
6b19a77b71694bbe9f5e84207de46c68f87ebc5e
[ "Unlicense" ]
2
2019-11-30T10:33:16.000Z
2021-02-03T06:29:40.000Z
# mako/__init__.py # Copyright (C) 2006-2016 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php __version__ = '1.0.9'
27.333333
78
0.743902
40
246
4.375
0.8
0.114286
0
0
0
0
0
0
0
0
0
0.052381
0.146341
246
8
79
30.75
0.780952
0.857724
0
0
0
0
0.172414
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
1338002c0bb58e1ef6c0115a4fcc0293761a19a5
764
py
Python
example/first_example/window/inputWindow/view.py
suuperhu/Pyside2MVCFramework
c28bd0fbb6b53bb2cdad8d0723b4251fc93319d6
[ "MIT" ]
1
2021-03-11T13:34:41.000Z
2021-03-11T13:34:41.000Z
example/first_example/window/inputWindow/view.py
suuperhu/Pyside2MVCFramework
c28bd0fbb6b53bb2cdad8d0723b4251fc93319d6
[ "MIT" ]
null
null
null
example/first_example/window/inputWindow/view.py
suuperhu/Pyside2MVCFramework
c28bd0fbb6b53bb2cdad8d0723b4251fc93319d6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ # @SoftwareIDE : PyCharm2020Pro # @ProjectName : PySide2MVCFramework # @FileName : view.py # @Author : 胡守杰 # @Email : [email protected] # @ZhFileDescription : # @EnFileDescription : """ import os from pyside2mvcframework.core.view import View from conf.global_settings import BASE_PATH class InputWindowView(View): uiFilePath = os.path.join(BASE_PATH, "src\\window\\inputWindow\\inputWindow.ui") if __name__ == '__main__': print("unit test from {filename}".format(filename=__file__)) import sys from PySide2.QtWidgets import QApplication app = QApplication(sys.argv) view = InputWindowView().birth() view.show() sys.exit(app.exec_())
26.344828
84
0.649215
78
764
6.153846
0.679487
0.033333
0
0
0
0
0
0
0
0
0
0.030457
0.22644
764
28
85
27.285714
0.781726
0.352094
0
0
0
0
0.149897
0.082136
0
0
0
0
0
1
0
false
0
0.384615
0
0.538462
0.076923
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
135906a75c8644d17899cd5046a70589324b71a2
3,595
py
Python
python/py3study/pytorch-lab/demo-cifar.py
sillyemperor/langstudy
937a11d97984e10e4ead54f3b7b7d6a1f2ef24a1
[ "MIT" ]
null
null
null
python/py3study/pytorch-lab/demo-cifar.py
sillyemperor/langstudy
937a11d97984e10e4ead54f3b7b7d6a1f2ef24a1
[ "MIT" ]
null
null
null
python/py3study/pytorch-lab/demo-cifar.py
sillyemperor/langstudy
937a11d97984e10e4ead54f3b7b7d6a1f2ef24a1
[ "MIT" ]
null
null
null
import torch import torchvision import torchvision.transforms as transforms import os.path BASE_DIR = os.path.dirname(os.path.abspath(__file__)) transform = transforms.Compose( [transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))]) root = os.path.join(BASE_DIR, '../data/') trainset = torchvision.datasets.CIFAR10(root=root, train=True, download=True, transform=transform) trainloader = torch.utils.data.DataLoader(trainset, shuffle=True, num_workers=2) testset = torchvision.datasets.CIFAR10(root=root, train=False, download=True, transform=transform) testloader = torch.utils.data.DataLoader(testset, shuffle=False, num_workers=2) import torch.nn as nn import torch.nn.functional as F class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.conv1 = nn.Conv2d(3, 6, 5) self.pool = nn.MaxPool2d(2, 2) self.conv2 = nn.Conv2d(6, 16, 5) self.fc1 = nn.Linear(16 * 5 * 5, 120) self.fc2 = nn.Linear(120, 84) self.fc3 = nn.Linear(84, 10) def forward(self, x): # print(x.shape) x = self.pool(F.relu(self.conv1(x))) # print(x.shape) x = self.pool(F.relu(self.conv2(x))) # print(x.shape) x = x.view(-1, 16 * 5 * 5) # print(x.shape) x = F.relu(self.fc1(x)) # print(x.shape) x = F.relu(self.fc2(x)) # print(x.shape) x = self.fc3(x) # print(x.shape) return x # torch.Size([1, 3, 32, 32]) # torch.Size([1, 6, 14, 14]) # torch.Size([1, 16, 5, 5]) # torch.Size([1, 400]) # torch.Size([1, 120]) # torch.Size([1, 84]) # torch.Size([1, 100]) model = Net() import torch.optim as optim criterion = nn.CrossEntropyLoss() optimizer = optim.SGD(model.parameters(), lr=0.0002, momentum=0.9) from util import train_eval train_eval(model, criterion, trainloader, testloader, optimizer, epochs=5) # [1, 5000] loss: 2.293 # [1, 10000] loss: 2.075 # [1, 15000] loss: 1.876 # [1, 20000] loss: 1.754 # [1, 25000] loss: 1.658 # [1, 30000] loss: 1.625 # [1, 35000] loss: 1.558 # [1, 40000] loss: 1.520 # [1, 45000] loss: 1.494 # [1, 50000] loss: 1.459 # 1/5 4456/10000 44.56% (107.18255376815796s) # [2, 5000] loss: 1.413 # [2, 10000] loss: 1.398 # [2, 15000] loss: 1.386 # [2, 20000] loss: 1.379 # [2, 25000] loss: 1.358 # [2, 30000] loss: 1.324 # [2, 35000] loss: 1.333 # [2, 40000] loss: 1.280 # [2, 45000] loss: 1.296 # [2, 50000] loss: 1.304 # 2/5 5357/10000 53.56999999999999% (105.8866639137268s) # [3, 5000] loss: 1.226 # [3, 10000] loss: 1.231 # [3, 15000] loss: 1.215 # [3, 20000] loss: 1.235 # [3, 25000] loss: 1.199 # [3, 30000] loss: 1.187 # [3, 35000] loss: 1.192 # [3, 40000] loss: 1.194 # [3, 45000] loss: 1.196 # [3, 50000] loss: 1.191 # 3/5 5729/10000 57.29% (105.63971090316772s) # [4, 5000] loss: 1.117 # [4, 10000] loss: 1.096 # [4, 15000] loss: 1.121 # [4, 20000] loss: 1.123 # [4, 25000] loss: 1.107 # [4, 30000] loss: 1.120 # [4, 35000] loss: 1.124 # [4, 40000] loss: 1.094 # [4, 45000] loss: 1.105 # [4, 50000] loss: 1.102 # 4/5 5829/10000 58.29% (112.56915497779846s) # [5, 5000] loss: 1.034 # [5, 10000] loss: 1.024 # [5, 15000] loss: 1.040 # [5, 20000] loss: 1.027 # [5, 25000] loss: 1.043 # [5, 30000] loss: 1.049 # [5, 35000] loss: 1.024 # [5, 40000] loss: 1.042 # [5, 45000] loss: 1.027 # [5, 50000] loss: 1.027 # 5/5 6178/10000 61.78% (109.75669193267822s) # 61.0% (541.0347754955292s)
28.307087
75
0.585535
584
3,595
3.57363
0.292808
0.114998
0.036895
0.034499
0.106852
0.100144
0.054624
0.034499
0.034499
0.034499
0
0.28437
0.231154
3,595
126
76
28.531746
0.470695
0.465925
0
0.047619
0
0
0.004329
0
0
0
0
0
0
1
0.047619
false
0
0.190476
0
0.285714
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
135ad256377f1febc7ff1ea7598a8c696743a758
165
py
Python
publishtimer/__init__.py
paragguruji/publishtimer
b0b68d6c4d450a2cc22d29725e43c2a1261f0f74
[ "BSD-2-Clause" ]
null
null
null
publishtimer/__init__.py
paragguruji/publishtimer
b0b68d6c4d450a2cc22d29725e43c2a1261f0f74
[ "BSD-2-Clause" ]
null
null
null
publishtimer/__init__.py
paragguruji/publishtimer
b0b68d6c4d450a2cc22d29725e43c2a1261f0f74
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Mar 28 15:28:24 2016 @author: Parag Guruji, [email protected] """ from .helpers import setup_env done = setup_env()
16.5
44
0.678788
26
165
4.230769
0.884615
0.145455
0
0
0
0
0
0
0
0
0
0.094203
0.163636
165
10
45
16.5
0.702899
0.630303
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
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
136a6f790e3bad7ef05103763b29d85ab9987e87
595
py
Python
day22.py
p88h/aoc2017
a929a8c0894559b0d7dd3d0b58c076295087f4c8
[ "Unlicense" ]
1
2021-12-26T21:28:47.000Z
2021-12-26T21:28:47.000Z
day22.py
p88h/aoc2017
a929a8c0894559b0d7dd3d0b58c076295087f4c8
[ "Unlicense" ]
null
null
null
day22.py
p88h/aoc2017
a929a8c0894559b0d7dd3d0b58c076295087f4c8
[ "Unlicense" ]
null
null
null
import io grid = {} y = 0 x = 0 for l in io.open("day22.in").read().splitlines(): for x in range(len(l)): grid[(y,x)] = l[x] y += 1 y = y // 2 x = x // 2 dx = 0 dy = -1 r = 0 for iter in range(10000000): if (y,x) not in grid or grid[(y,x)] == '.': (dy, dx) = (-dx, dy) grid[(y,x)] = 'W' elif grid[(y,x)] == 'W': grid[(y,x)] = '#' r += 1 elif grid[(y,x)] == '#': (dy, dx) = (dx, -dy) grid[(y,x)] = 'F' elif grid[(y,x)] == 'F': (dy, dx) = (-dy, -dx) grid[(y,x)] = '.' y += dy x += dx print(r)
19.833333
49
0.381513
104
595
2.182692
0.278846
0.220264
0.237885
0.132159
0.176211
0.176211
0.176211
0.176211
0.176211
0.176211
0
0.049351
0.352941
595
30
50
19.833333
0.54026
0
0
0
0
0
0.026846
0
0
0
0
0
0
1
0
false
0
0.034483
0
0.034483
0.034483
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
136e61a21e482a156b8b710f63c002d29a6f7812
2,136
py
Python
books/model/Instrumentation.py
nudglabs/books-python-wrappers
8844eca8fe681542644a70749b72a6dc4e48c171
[ "MIT" ]
9
2015-04-01T08:59:49.000Z
2022-01-27T01:27:45.000Z
books/model/Instrumentation.py
nudglabs/books-python-wrappers
8844eca8fe681542644a70749b72a6dc4e48c171
[ "MIT" ]
3
2020-05-14T04:22:22.000Z
2021-08-06T11:19:03.000Z
books/model/Instrumentation.py
nudglabs/books-python-wrappers
8844eca8fe681542644a70749b72a6dc4e48c171
[ "MIT" ]
11
2016-04-14T10:59:36.000Z
2020-08-19T13:26:05.000Z
#$Id$ class Instrumentation: """This class is used tocreate object for instrumentation.""" def __init__(self): """Initialize parameters for Instrumentation object.""" self.query_execution_time = '' self.request_handling_time = '' self.response_write_time = '' self.page_context_write_time = '' def set_query_execution_time(self, query_execution_time): """Set query execution time. Args: query_execution_time(str): Query execution time. """ self.query_execution_time = query_execution_time def get_query_execution_time(self): """Get query execution time. Returns: str: Query execution time. """ return self.query_execution_time def set_request_handling_time(self, request_handling_time): """Set request handling time. Args: request_handling_time(str): Request handling time. """ self.request_handling_time = request_handling_time def get_request_handling_time(self): """Get request handling time. Returns: str: Request handling time. """ return self.request_handling_time def set_response_write_time(self, response_write_time): """Set response write time. Args: response_write_time(str): Response write time. """ self.response_write_time = response_write_time def get_response_write_time(self): """Get response write time. Returns: str: Response write time. """ return self.response_write_time def set_page_context_write_time(self, page_context_write_time): """Set page context write time. Args: page_context_write_time(str): Page context write time. """ self.page_context_write_time = page_context_write_time def get_page_context_write_time(self): """Get page context write time. Returns: str: Page context write time. """ return self.page_context_write_time
25.428571
67
0.627341
239
2,136
5.25523
0.121339
0.171975
0.171975
0.191083
0.43949
0.28742
0.28742
0.070064
0.070064
0
0
0
0.295412
2,136
83
68
25.73494
0.834552
0.348315
0
0
0
0
0
0
0
0
0
0
0
1
0.409091
false
0
0
0
0.636364
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
136ff9b25221822f1896aad526fbb94d03b405cd
4,887
py
Python
pcf/particle/gcp/storage/storage.py
davidyum/Particle-Cloud-Framework
f6325a60a3838f86bd73bf4071438e12f9c68f8d
[ "Apache-2.0" ]
null
null
null
pcf/particle/gcp/storage/storage.py
davidyum/Particle-Cloud-Framework
f6325a60a3838f86bd73bf4071438e12f9c68f8d
[ "Apache-2.0" ]
null
null
null
pcf/particle/gcp/storage/storage.py
davidyum/Particle-Cloud-Framework
f6325a60a3838f86bd73bf4071438e12f9c68f8d
[ "Apache-2.0" ]
null
null
null
from pcf.core.gcp_resource import GCPResource from pcf.core import State import logging from google.cloud import storage from google.cloud import exceptions logger = logging.getLogger(__name__) class Storage(GCPResource): """ This is the implementation of Google's storage service. """ flavor = "storage" equivalent_states = { State.running: 1, State.stopped: 0, State.terminated: 0 } UNIQUE_KEYS = ["gcp_resource.name"] def __init__(self, particle_definition): super(Storage, self).__init__(particle_definition=particle_definition, resource=storage) self.bucket_name = self.desired_state_definition["name"] self._set_unique_keys() def _set_unique_keys(self): """ Logic that sets keys from state definition that are used to uniquely identify the storage bucket """ self.unique_keys = Storage.UNIQUE_KEYS def get_status(self): """ Determines if the bucket exists Returns: status (dict) """ try: bucket = self.client.get_bucket(self.bucket_name) return bucket except exceptions.NotFound: return {"status": "missing"} def _terminate(self): """ Deletes the storage bucket Returns: response of gcp delete """ return self.client.bucket(bucket_name=self.bucket_name).delete() def _start(self): """ Creates the storage bucket Returns: response of create_bucket """ # create_definition = pcf_util.keep_and_replace_keys(self.get_desired_state_definition(), # S3Bucket.START_PARAMS) return self.client.bucket(bucket_name=self.bucket_name).create() def _stop(self): """ S3 bucket does not have a stopped state so it calls terminate. """ return self.terminate() def sync_state(self): """ Calls get status and then sets the current state. """ full_status = self.get_status() if full_status: if isinstance(full_status, self.resource.Bucket): self.state = State.running else: self.state = State.terminated self.current_state_definition = self.desired_state_definition def download_object(self, blob_name, file_obj, **kwargs): """ Downloads a file from the S3 bucket. Args: blob_name (str): Object name (Required) file_obj (str): file name for the download (Required) **kwargs: Options for boto3 get_object (optional) """ bucket = self.client.get_bucket(self.bucket_name) return self.resource.Blob(blob_name, bucket).download_file(file_obj, **kwargs) def delete_object(self, blob_name): """ Deletes an object in the storage bucket. Args: blob_name (str): Object Key name (Required) """ bucket = self.client.get_bucket(self.bucket_name) return bucket.delete_blob(blob_name) def list_objects(self, **kwargs): """ Lists all objects in the storage bucket. Args: **kwargs: Options for boto3 list_objects (optional) """ bucket = self.client.get_bucket(self.bucket_name) return list(bucket.list_blobs(**kwargs)) def put_object(self, blob_name, file_obj, **kwargs): """ Puts an object in the S3 bucket. Args: blob_name (str): Object Key name (Required) file_obj (object): the object to put into the bucket (Required) **kwargs: Options for boto3 put_object (optional) """ bucket = self.client.get_bucket(self.bucket_name) return self.resource.Blob(blob_name, bucket).upload_from_file(file_obj, **kwargs) def put_file(self, blob_name, file, **kwargs): """ Puts a file in the S3 bucket. Args: blob_name (str): Object Key name (Required) file (file): the file to put into the bucket (Required) **kwargs: Options for boto3 upload_file (optional) """ bucket = self.client.get_bucket(self.bucket_name) return self.resource.Blob(blob_name, bucket).upload_from_filename(file, **kwargs) def _update(self): """ Not Implemented """ pass def is_state_equivalent(self, state1, state2): """ Determines if states are equivalent. Uses equivalent_states defined in the S3Bucket class. Args: state1 (State): state1 (State): Returns: bool """ return Storage.equivalent_states.get(state1) == Storage.equivalent_states.get(state2)
28.91716
104
0.602415
559
4,887
5.071556
0.227191
0.049383
0.044444
0.040212
0.364374
0.328042
0.304762
0.282892
0.271605
0.224339
0
0.005618
0.30796
4,887
168
105
29.089286
0.832643
0.329036
0
0.101695
0
0
0.014936
0
0
0
0
0
0
1
0.237288
false
0.016949
0.084746
0
0.576271
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
1372983b8db0190678e8ab88123c2241d2b934f3
797
py
Python
keylime/migrations/versions/8da20383f6e1_extend_ip_field.py
kkaarreell/keylime
e12658bb6dc945b694e298b8ac337a204ab86ed2
[ "Apache-2.0" ]
18
2016-10-19T13:57:32.000Z
2019-01-12T21:35:43.000Z
keylime/migrations/versions/8da20383f6e1_extend_ip_field.py
kkaarreell/keylime
e12658bb6dc945b694e298b8ac337a204ab86ed2
[ "Apache-2.0" ]
72
2019-01-24T10:12:59.000Z
2019-04-17T11:07:16.000Z
keylime/migrations/versions/8da20383f6e1_extend_ip_field.py
kkaarreell/keylime
e12658bb6dc945b694e298b8ac337a204ab86ed2
[ "Apache-2.0" ]
10
2017-03-27T20:58:08.000Z
2018-07-30T12:59:27.000Z
"""extend_ip_field Revision ID: 8da20383f6e1 Revises: eeb702f77d7d Create Date: 2021-01-14 10:50:56.275257 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "8da20383f6e1" down_revision = "eeb702f77d7d" branch_labels = None depends_on = None def upgrade(engine_name): globals()[f"upgrade_{engine_name}"]() def downgrade(engine_name): globals()[f"downgrade_{engine_name}"]() def upgrade_registrar(): pass def downgrade_registrar(): pass def upgrade_cloud_verifier(): with op.batch_alter_table("verifiermain") as batch_op: batch_op.alter_column( "ip", existing_type=sa.String(length=15), type_=sa.String(length=255), existing_nullable=True ) def downgrade_cloud_verifier(): pass
18.534884
105
0.72522
104
797
5.317308
0.557692
0.072333
0.061483
0.065099
0
0
0
0
0
0
0
0.07958
0.164366
797
42
106
18.97619
0.750751
0.180678
0
0.142857
0
0
0.127132
0.068217
0
0
0
0
0
1
0.285714
false
0.142857
0.095238
0
0.380952
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
1373c11e16cd5b0b44349e8fb881270741a3ce25
1,657
py
Python
ucsrb/migrations/0013_auto_20180710_2040.py
Ecotrust/ucsrb
29d97cf1f21537aaf24f38e7dedc7c8cfccf1f12
[ "MIT" ]
1
2018-07-31T00:58:30.000Z
2018-07-31T00:58:30.000Z
ucsrb/migrations/0013_auto_20180710_2040.py
Ecotrust/ucsrb
29d97cf1f21537aaf24f38e7dedc7c8cfccf1f12
[ "MIT" ]
264
2017-10-24T23:54:52.000Z
2021-10-16T15:40:47.000Z
ucsrb/migrations/0013_auto_20180710_2040.py
Ecotrust/ucsrb
29d97cf1f21537aaf24f38e7dedc7c8cfccf1f12
[ "MIT" ]
1
2019-07-16T06:37:45.000Z
2019-07-16T06:37:45.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.9 on 2018-07-10 20:40 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ucsrb', '0012_auto_20180710_1249'), ] operations = [ migrations.AddField( model_name='treatmentscenario', name='landform_type', field=models.BooleanField(default=False), ), migrations.AddField( model_name='treatmentscenario', name='landform_type_checkboxes', field=models.TextField(blank=True, default=None, null=True), ), migrations.AddField( model_name='treatmentscenario', name='landform_type_checkboxes_include_east_west', field=models.BooleanField(default=True), ), migrations.AddField( model_name='treatmentscenario', name='landform_type_checkboxes_include_floor', field=models.BooleanField(default=True), ), migrations.AddField( model_name='treatmentscenario', name='landform_type_checkboxes_include_north', field=models.BooleanField(default=True), ), migrations.AddField( model_name='treatmentscenario', name='landform_type_checkboxes_include_ridgetop', field=models.BooleanField(default=True), ), migrations.AddField( model_name='treatmentscenario', name='landform_type_checkboxes_include_south', field=models.BooleanField(default=True), ), ]
32.490196
72
0.620398
149
1,657
6.637584
0.369128
0.127401
0.162791
0.191102
0.696663
0.662285
0.662285
0.662285
0.601618
0.530839
0
0.027661
0.280024
1,657
50
73
33.14
0.801341
0.041038
0
0.604651
1
0
0.240227
0.153846
0
0
0
0
0
1
0
false
0
0.046512
0
0.116279
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
137eb4fb88a280d57e223383a1252ee199ec52e5
14,714
py
Python
bvs/background_verification/report/checks_status_report/checks_status_report.py
vhrspvl/vhrs-bvs
56667039d9cc09ad0b092e5e6c5dd6598ff41e7b
[ "MIT" ]
1
2021-08-19T11:16:47.000Z
2021-08-19T11:16:47.000Z
bvs/background_verification/report/checks_status_report/checks_status_report.py
vhrspvl/vhrs-bvs
56667039d9cc09ad0b092e5e6c5dd6598ff41e7b
[ "MIT" ]
null
null
null
bvs/background_verification/report/checks_status_report/checks_status_report.py
vhrspvl/vhrs-bvs
56667039d9cc09ad0b092e5e6c5dd6598ff41e7b
[ "MIT" ]
4
2018-03-21T05:57:54.000Z
2020-11-26T00:37:29.000Z
# Copyright (c) 2013, VHRS and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _, msgprint from frappe.utils import (cint, cstr, date_diff, flt, getdate, money_in_words, nowdate, rounded, today) from datetime import datetime from datetime import date import datetime from calendar import monthrange def execute(filters=None): columns = get_columns() data = [] row = [] filters applicant = applicants(filters) for app in applicant: row = [app.customer, app.ref_id, app.candidate_name, app.in_date, app.status, app.checks_group] if app.status != "Entry Pending": cg = frappe.get_doc("Checks Group", app.checks_group) if cg.employment_check1 == 1: emp = frappe.get_doc("Employment Check1", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify Employment Check1", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.employment_check2 == 1: emp = frappe.get_doc("Employment Check2", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify Employment Check2", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.employment_check3 == 1: emp = frappe.get_doc("Employment Check3", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify Employment Check3", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.employment_check4 == 1: emp = frappe.get_doc("Employment Check4", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify Employment Check4", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.education_check1 == 1: if frappe.db.exists("Education Check1", { "applicant_id": app.ref_id}): emp = frappe.get_doc("Education Check1", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify Education Check1", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.education_check2 == 1: emp = frappe.get_doc("Education Check2", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify Education Check2", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.education_check3 == 1: emp = frappe.get_doc("Education Check3", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify Education Check3", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.education_check4 == 1: emp = frappe.get_doc("Education Check4", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify Education Check4", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.address_check1 == 1: emp = frappe.get_doc("Address Check1", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify Address Check1", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.address_check2 == 1: emp = frappe.get_doc("Address Check2", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify Address Check2", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.address_check3 == 1: emp = frappe.get_doc("Address Check3", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify Address Check3", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.address_check4 == 1: emp = frappe.get_doc("Address Check4", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify Address Check4", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.family_check1 == 1: emp = frappe.get_doc("Family Check1", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify Family Check1", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.reference_check1 == 1: emp = frappe.get_doc("Reference Check1", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify Reference Check1", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.reference_check2 == 1: emp = frappe.get_doc("Reference Check2", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify Reference Check2", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.reference_check3 == 1: emp = frappe.get_doc("Reference Check3", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify Reference Check3", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.reference_check4 == 1: emp = frappe.get_doc("Reference Check4", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify Reference Check4", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.civil_check == 1: emp = frappe.get_doc("Civil Check", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify Civil Check", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.criminal_check == 1: emp = frappe.get_doc("Criminal Check", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify Criminal Check", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.id_check1 == 1: emp = frappe.get_doc("ID Check1", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify ID Check1", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.id_check2 == 1: emp = frappe.get_doc("ID Check2", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify ID Check2", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.id_check3 == 1: emp = frappe.get_doc("ID Check3", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify ID Check3", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.id_check4 == 1: emp = frappe.get_doc("ID Check4", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify ID Check4", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.id_check5 == 1: emp = frappe.get_doc("ID Check5", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify ID Check5", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] if cg.id_check6 == 1: emp = frappe.get_doc("ID Check6", { "applicant_id": app.ref_id}) if emp.status != "Allocation Completed": row += [emp.status] else: vemp = frappe.get_doc("Verify ID Check6", { "applicant_id": app.ref_id}) row += [vemp.status] else: row += ["-"] data.append(row) return columns, data def get_columns(): columns = [ _("Project Name") + ":Link/Customer:200", _("VHRS Ref. No") + ":Data:150", _("Candidate Name") + ":Data:180", _("Start Date") + ":Date:150", _("Status") + ":Data:150", _("Checks Group Name") + ":Data:150", _("Emp Check1 Status") + ":Data:150", _("Emp Check2 Status") + ":Data:150", _("Emp Check3 Status") + ":Data:150", _("Emp Check4 Status") + ":Data:150", _("Edu Check1 Status") + ":Data:150", _("Edu Check2 Status") + ":Data:150", _("Edu Check3 Status") + ":Data:150", _("Edu Check4 Status") + ":Data:150", _("Add Check1 Status") + ":Data:150", _("Add Check2 Status") + ":Data:150", _("Add Check3 Status") + ":Data:150", _("Add Check4 Status") + ":Data:150", _("Family Check Status") + ":Data:150", _("Ref Check1 Status") + ":Data:150", _("Ref Check2 Status") + ":Data:150", _("Ref Check3 Status") + ":Data:150", _("Ref Check4 Status") + ":Data:150", _("Civil Check1 Status") + ":Data:150", _("Criminal Check2 Status") + ":Data:150", _("ID Check1 Status") + ":Data:150", _("ID Check2 Status") + ":Data:150", _("ID Check3 Status") + ":Data:150", _("ID Check4 Status") + ":Data:150", _("ID Check5 Status") + ":Data:150", _("ID Check6 Status") + ":Data:150", ] return columns def applicants(filters): applicant = frappe.db.sql( """select app.checks_group,app.customer,app.ref_id,app.candidate_name,app.in_date,app.status from `tabApplicant` app where app.in_date between %(start_date)s and %(end_date)s order by app.in_date""", { "start_date": filters.get("from_date"), "end_date": filters.get("to_date") }, as_dict=1) return applicant
41.68272
130
0.436387
1,387
14,714
4.457823
0.075703
0.051431
0.068575
0.140223
0.766133
0.756914
0.673783
0.633673
0.633673
0.633673
0
0.026293
0.439106
14,714
352
131
41.801136
0.722889
0.006049
0
0.58651
0
0
0.198529
0
0
0
0
0
0
1
0.008798
false
0
0.02346
0
0.041056
0.002933
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
13842b8b9629fa8e84e1baad24f225b91291bacf
6,553
py
Python
hordak/migrations/0011_auto_20170225_2222.py
CodeBrew-LTD/django-hordak
efdfe503bf38b0a283790c5b4d27bd6bb28155e4
[ "MIT" ]
187
2016-12-12T10:58:11.000Z
2022-03-27T08:14:19.000Z
hordak/migrations/0011_auto_20170225_2222.py
CodeBrew-LTD/django-hordak
efdfe503bf38b0a283790c5b4d27bd6bb28155e4
[ "MIT" ]
62
2016-12-10T00:12:47.000Z
2022-03-16T09:23:05.000Z
hordak/migrations/0011_auto_20170225_2222.py
CodeBrew-LTD/django-hordak
efdfe503bf38b0a283790c5b4d27bd6bb28155e4
[ "MIT" ]
47
2016-12-12T11:07:31.000Z
2022-03-15T20:30:07.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-02-25 22:22 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import django_smalluuid.models class Migration(migrations.Migration): dependencies = [("hordak", "0010_auto_20161216_1202")] operations = [ migrations.CreateModel( name="TransactionImport", fields=[ ( "id", models.AutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID" ), ), ( "uuid", django_smalluuid.models.SmallUUIDField( default=django_smalluuid.models.UUIDDefault(), editable=False, unique=True ), ), ( "timestamp", models.DateTimeField(default=django.utils.timezone.now, editable=False), ), ( "has_headings", models.BooleanField( default=True, verbose_name="First line of file contains headings" ), ), ( "file", models.FileField( upload_to="transaction_imports", verbose_name="CSV file to import" ), ), ( "state", models.CharField( choices=[ ("pending", "Pending"), ("uploaded", "Uploaded, ready to import"), ("done", "Import complete"), ], default="pending", max_length=20, ), ), ( "date_format", models.CharField( choices=[ ("%d-%m-%Y", "dd-mm-yyyy"), ("%d/%m/%Y", "dd/mm/yyyy"), ("%d.%m.%Y", "dd.mm.yyyy"), ("%d-%Y-%m", "dd-yyyy-mm"), ("%d/%Y/%m", "dd/yyyy/mm"), ("%d.%Y.%m", "dd.yyyy.mm"), ("%m-%d-%Y", "mm-dd-yyyy"), ("%m/%d/%Y", "mm/dd/yyyy"), ("%m.%d.%Y", "mm.dd.yyyy"), ("%m-%Y-%d", "mm-yyyy-dd"), ("%m/%Y/%d", "mm/yyyy/dd"), ("%m.%Y.%d", "mm.yyyy.dd"), ("%Y-%d-%m", "yyyy-dd-mm"), ("%Y/%d/%m", "yyyy/dd/mm"), ("%Y.%d.%m", "yyyy.dd.mm"), ("%Y-%m-%d", "yyyy-mm-dd"), ("%Y/%m/%d", "yyyy/mm/dd"), ("%Y.%m.%d", "yyyy.mm.dd"), ("%d-%m-%y", "dd-mm-yy"), ("%d/%m/%y", "dd/mm/yy"), ("%d.%m.%y", "dd.mm.yy"), ("%d-%y-%m", "dd-yy-mm"), ("%d/%y/%m", "dd/yy/mm"), ("%d.%y.%m", "dd.yy.mm"), ("%m-%d-%y", "mm-dd-yy"), ("%m/%d/%y", "mm/dd/yy"), ("%m.%d.%y", "mm.dd.yy"), ("%m-%y-%d", "mm-yy-dd"), ("%m/%y/%d", "mm/yy/dd"), ("%m.%y.%d", "mm.yy.dd"), ("%y-%d-%m", "yy-dd-mm"), ("%y/%d/%m", "yy/dd/mm"), ("%y.%d.%m", "yy.dd.mm"), ("%y-%m-%d", "yy-mm-dd"), ("%y/%m/%d", "yy/mm/dd"), ("%y.%m.%d", "yy.mm.dd"), ], default="%d-%m-%Y", max_length=50, ), ), ( "hordak_import", models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, to="hordak.StatementImport" ), ), ], ), migrations.CreateModel( name="TransactionImportColumn", fields=[ ( "id", models.AutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID" ), ), ("column_number", models.PositiveSmallIntegerField()), ( "column_heading", models.CharField(blank=True, default="", max_length=100, verbose_name="Column"), ), ( "to_field", models.CharField( blank=True, choices=[ (None, "-- Do not import --"), ("date", "Date"), ("amount", "Amount"), ("amount_out", "Amount (money in only)"), ("amount_in", "Amount (money out only)"), ("description", "Description / Notes"), ], default=None, max_length=20, null=True, verbose_name="Is", ), ), ("example", models.CharField(blank=True, default="", max_length=200)), ( "transaction_import", models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name="columns", to="hordak.TransactionImport", ), ), ], options={"ordering": ["transaction_import", "column_number"]}, ), migrations.AlterUniqueTogether( name="transactionimportcolumn", unique_together=set( [("transaction_import", "column_number"), ("transaction_import", "to_field")] ), ), ]
40.202454
100
0.327789
504
6,553
4.168651
0.248016
0.012375
0.009995
0.014279
0.34079
0.34079
0.34079
0.302713
0.302713
0.302713
0
0.014318
0.520372
6,553
162
101
40.450617
0.654152
0.010377
0
0.329032
1
0
0.196544
0.017741
0
0
0
0
0
1
0
false
0
0.116129
0
0.135484
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
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
13847a22eab74e6541bf593e5d68249f802e533f
1,398
py
Python
redactor/utils.py
danlgz/django-wysiwyg-redactor
755927ea2cb9db203c4a002b4da7ebfbf989dd64
[ "BSD-3-Clause" ]
null
null
null
redactor/utils.py
danlgz/django-wysiwyg-redactor
755927ea2cb9db203c4a002b4da7ebfbf989dd64
[ "BSD-3-Clause" ]
null
null
null
redactor/utils.py
danlgz/django-wysiwyg-redactor
755927ea2cb9db203c4a002b4da7ebfbf989dd64
[ "BSD-3-Clause" ]
2
2021-01-27T21:51:38.000Z
2021-03-10T22:31:19.000Z
from django.core.exceptions import ImproperlyConfigured from importlib import import_module try: from django.utils.encoding import force_text except ImportError: from django.utils.encoding import force_unicode as force_text from django.utils.functional import Promise import json def import_class(path): path_bits = path.split('.') if len(path_bits) < 2: message = "'{0}' is not a complete Python path.".format(path) raise ImproperlyConfigured(message) class_name = path_bits.pop() module_path = '.'.join(path_bits) module_itself = import_module(module_path) if not hasattr(module_itself, class_name): message = "The Python module '{0}' has no '{1}' class.".format( module_path, class_name ) raise ImportError(message) return getattr(module_itself, class_name) def is_module_image_installed(): try: from PIL import Image from PIL import ImageFile except ImportError: try: import Image import ImageFile except ImportError: return False return True class LazyEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, Promise): return force_text(obj) return super(LazyEncoder, self).default(obj) def json_dumps(data): return json.dumps(data, cls=LazyEncoder)
24.964286
71
0.670243
170
1,398
5.364706
0.376471
0.04386
0.049342
0.050439
0.074561
0.074561
0
0
0
0
0
0.003817
0.250358
1,398
55
72
25.418182
0.866412
0
0
0.146341
0
0
0.05794
0
0
0
0
0
0
1
0.097561
false
0
0.390244
0.02439
0.658537
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
139025981058af435a2b6721ba93a59e2cb0b119
1,296
py
Python
pushpluck/base.py
ejconlon/pushpluck
4e5b8bcff6fe3955e8f25638268569f901815b5a
[ "MIT" ]
null
null
null
pushpluck/base.py
ejconlon/pushpluck
4e5b8bcff6fe3955e8f25638268569f901815b5a
[ "MIT" ]
2
2021-04-02T03:54:12.000Z
2021-04-23T18:23:03.000Z
pushpluck/base.py
ejconlon/pushpluck
4e5b8bcff6fe3955e8f25638268569f901815b5a
[ "MIT" ]
null
null
null
from abc import ABCMeta, abstractmethod from dataclasses import dataclass from typing import Any, TypeVar X = TypeVar('X') class Closeable(metaclass=ABCMeta): @abstractmethod def close(self) -> None: """ Close this to free resources and deny further use. """ raise NotImplementedError() class Resettable(metaclass=ABCMeta): @abstractmethod def reset(self) -> None: """ Reset this to a known good state for further use. """ raise NotImplementedError() class Void: """ None is the type with 1 inhabitant, None. Void is the type with 0 inhabitants. """ def __init__(self) -> None: raise Exception('Cannot instantiate Void') def absurd(self) -> X: """ This allows you to trivially satisfy type checking by returning `void.absurd()` since it's impossible for `void` to exist in the first place. """ raise Exception('Absurd') @dataclass(frozen=True) class Unit: """ A simple type with one inhabitant (according to eq and hash). """ @staticmethod def instance() -> 'Unit': return _UNIT_SINGLETON _UNIT_SINGLETON = Unit() class MatchException(Exception): def __init__(self, value: Any) -> None: super().__init__(f'Failed to match value: {value}')
24.923077
90
0.657407
158
1,296
5.291139
0.518987
0.075359
0.07177
0.078947
0.093301
0
0
0
0
0
0
0.00203
0.239969
1,296
51
91
25.411765
0.846701
0.29784
0
0.153846
0
0
0.075029
0
0
0
0
0
0
1
0.230769
false
0
0.115385
0.038462
0.576923
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
139141d96476a62cf2a8695abfe754ae15ba668e
2,057
py
Python
test/cuberead/highres/test_default_high_res.py
CAB-LAB/cube-performance-test
0ca7dbb56b2937004fb63f8aafdff21fb76263d4
[ "MIT" ]
null
null
null
test/cuberead/highres/test_default_high_res.py
CAB-LAB/cube-performance-test
0ca7dbb56b2937004fb63f8aafdff21fb76263d4
[ "MIT" ]
null
null
null
test/cuberead/highres/test_default_high_res.py
CAB-LAB/cube-performance-test
0ca7dbb56b2937004fb63f8aafdff21fb76263d4
[ "MIT" ]
null
null
null
import time import pytest from test import config from test.cube_utils import CubeUtils ITERATIONS_NUM = getattr(config, 'iterations_num', 1) ROUNDS_NUM = getattr(config, 'rounds_num', 10) class TestDefaultHighRes: @pytest.fixture(scope="class", autouse=True) def cube_default(self): cube_utils = CubeUtils() cube_utils.generate_cube("default_high_res", 46, 2160, 4320) yield cube_utils # --------------- # Read spatially # --------------- @pytest.mark.benchmark( group="Cube reading for small area spatial analysis high-res", timer=time.perf_counter, disable_gc=True, warmup=False ) def test_read_default_high_res_135x135(self, benchmark, cube_default): benchmark.pedantic(cube_default.read_spatial, args=(135,), iterations=ITERATIONS_NUM, rounds=ROUNDS_NUM) @pytest.mark.benchmark( group="Cube reading for large area spatial analysis high-res", timer=time.perf_counter, disable_gc=True, warmup=False ) def test_read_default_high_res_2160x2160(self, benchmark, cube_default): benchmark.pedantic(cube_default.read_spatial, args=(2160,), iterations=ITERATIONS_NUM, rounds=ROUNDS_NUM) # --------------- # Read temporally # --------------- @pytest.mark.benchmark( group="Cube reading for subset temporal analysis high-res", timer=time.perf_counter, disable_gc=True, warmup=False ) def test_read_default_high_res_46x135x135(self, benchmark, cube_default): benchmark.pedantic(cube_default.read_temporal, args=(135,), iterations=ITERATIONS_NUM, rounds=ROUNDS_NUM) @pytest.mark.benchmark( group="Cube reading for global temporal analysis high-res", timer=time.perf_counter, disable_gc=True, warmup=False ) def test_read_default_high_res_46x2160x2160(self, benchmark, cube_default): benchmark.pedantic(cube_default.read_temporal, args=(2160,), iterations=ITERATIONS_NUM, rounds=ROUNDS_NUM)
33.177419
114
0.684492
246
2,057
5.479675
0.247967
0.081602
0.051929
0.071217
0.71365
0.71365
0.71365
0.65727
0.594955
0.594955
0
0.035779
0.198347
2,057
61
115
33.721311
0.781686
0.045698
0
0.363636
0
0
0.128323
0
0
0
0
0
0
1
0.113636
false
0
0.090909
0
0.227273
0
0
0
0
null
0
0
0
0
1
1
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
139180db13c406acb2f2910c85de0dfd5a8d2472
5,545
py
Python
tests/components/test_dialogue_flow.py
dyoshiha/mindmeld
95f0e8482594f00040766a2ee687e9c9338f5a74
[ "Apache-2.0" ]
1
2019-12-12T12:44:33.000Z
2019-12-12T12:44:33.000Z
tests/components/test_dialogue_flow.py
AravindR7/mindmeld
470bba73ac56b6388146212ddaf697097e81cec3
[ "Apache-2.0" ]
null
null
null
tests/components/test_dialogue_flow.py
AravindR7/mindmeld
470bba73ac56b6388146212ddaf697097e81cec3
[ "Apache-2.0" ]
null
null
null
import pytest from mindmeld.components import Conversation def assert_reply(directives, templates, *, start_index=0, slots=None): """Asserts that the provided directives contain the specified reply Args: directives (list[dict[str, dict]]): list of directives returned by application templates (Union[str, Set[str]]): The reply must be a member of this set. start_index (int, optional): The index of the first client action associated with this reply. slots (dict, optional): The slots to fill the templates """ slots = slots or {} if isinstance(templates, str): templates = [templates] texts = set(map(lambda x: x.format(**slots), templates)) assert len(directives) >= start_index + 1 assert directives[start_index]['name'] == 'reply' assert directives[start_index]['payload']['text'] in texts def assert_target_dialogue_state(convo, target_dialogue_state): assert convo.params.target_dialogue_state == target_dialogue_state @pytest.mark.conversation def test_reprocess_handler(async_kwik_e_mart_app, kwik_e_mart_app_path): """Tests that the params are cleared in one trip from app to mm.""" convo = Conversation(app=async_kwik_e_mart_app, app_path=kwik_e_mart_app_path, force_sync=True) convo.process('When does that open?') assert_target_dialogue_state(convo, 'send_store_hours_flow') directives = convo.process('are there any stores near me?').directives assert_target_dialogue_state(convo, 'send_store_hours_flow') assert_reply(directives, templates="I'm not sure. You haven't told me where you are!") @pytest.mark.conversation def test_default_handler(async_kwik_e_mart_app, kwik_e_mart_app_path): """Tests that the params are cleared in one trip from app to mm.""" convo = Conversation(app=async_kwik_e_mart_app, app_path=kwik_e_mart_app_path, force_sync=True) convo.process('When does that open?') assert_target_dialogue_state(convo, 'send_store_hours_flow') directives = convo.process('Howdy!').directives assert_target_dialogue_state(convo, 'send_store_hours_flow') assert_reply(directives, templates='Sorry, I did not get you. Which store would you like to know about?') @pytest.mark.conversation def test_repeated_flow(async_kwik_e_mart_app, kwik_e_mart_app_path): """Tests that the params are cleared in one trip from app to mm.""" convo = Conversation(app=async_kwik_e_mart_app, app_path=kwik_e_mart_app_path, force_sync=True) convo.process('When does that open?') assert_target_dialogue_state(convo, 'send_store_hours_flow') for i in range(2): directives = convo.process('When does that open?').directives assert_reply(directives, 'Which store would you like to know about?') assert_target_dialogue_state(convo, 'send_store_hours_flow') directives = convo.process('When does that open?').directives assert_reply(directives, 'Sorry I cannot help you. Please try again.') assert_target_dialogue_state(convo, None) @pytest.mark.conversation def test_intent_handler_and_exit_flow(async_kwik_e_mart_app, kwik_e_mart_app_path): """Tests that the params are cleared in one trip from app to mm.""" convo = Conversation(app=async_kwik_e_mart_app, app_path=kwik_e_mart_app_path, force_sync=True) convo.process('When does that open?') assert_target_dialogue_state(convo, 'send_store_hours_flow') directives = convo.process('exit').directives assert_target_dialogue_state(convo, None) assert_reply(directives, templates=['Bye', 'Goodbye', 'Have a nice day.']) def assert_dialogue_state(dm, dialogue_state): for rule in dm.rules: if rule.dialogue_state == dialogue_state: return True return False def test_dialogue_flow_async(async_kwik_e_mart_app): @async_kwik_e_mart_app.dialogue_flow(domain='some_domain', intent='some_intent') async def some_handler(context, responder): pass assert some_handler.flow_state == 'some_handler_flow' assert 'some_handler' in some_handler.all_flows dm = some_handler.dialogue_manager assert_dialogue_state(dm, 'some_handler') assert_dialogue_state(dm, 'some_handler_flow') assert len(some_handler.rules) == 0 @some_handler.handle(intent='some_intent') async def some_flow_handler(context, responder): pass assert len(some_handler.rules) == 1 @some_handler.handle(intent='some_intent_2', exit_flow=True) async def some_flow_handler_2(context, responder): pass assert len(some_handler.rules) == 2 assert 'some_flow_handler_2' in some_handler.exit_flow_states def test_dialogue_flow(kwik_e_mart_app): @kwik_e_mart_app.dialogue_flow(domain='some_domain', intent='some_intent') def some_handler(context, responder): pass assert some_handler.flow_state == 'some_handler_flow' assert 'some_handler' in some_handler.all_flows dm = some_handler.dialogue_manager assert_dialogue_state(dm, 'some_handler') assert_dialogue_state(dm, 'some_handler_flow') assert len(some_handler.rules) == 0 @some_handler.handle(intent='some_intent') def some_flow_handler(context, responder): pass assert len(some_handler.rules) == 1 @some_handler.handle(intent='some_intent_2', exit_flow=True) def some_flow_handler_2(context, responder): pass assert len(some_handler.rules) == 2 assert 'some_flow_handler_2' in some_handler.exit_flow_states
39.326241
99
0.741389
801
5,545
4.813983
0.184769
0.079876
0.046681
0.062241
0.727438
0.684647
0.659751
0.659751
0.639523
0.639523
0
0.003245
0.166456
5,545
140
100
39.607143
0.831026
0.116501
0
0.569892
0
0
0.164327
0.030347
0
0
0
0
0.397849
1
0.129032
false
0.064516
0.021505
0
0.172043
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
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
139ca9c9fd0f3cc444f7df8ee3874d848532508e
616
py
Python
test/library/draft/DataFrames/psahabu/AddSeries.py
jhh67/chapel
f041470e9b88b5fc4914c75aa5a37efcb46aa08f
[ "ECL-2.0", "Apache-2.0" ]
1,602
2015-01-06T11:26:31.000Z
2022-03-30T06:17:21.000Z
test/library/draft/DataFrames/psahabu/AddSeries.py
jhh67/chapel
f041470e9b88b5fc4914c75aa5a37efcb46aa08f
[ "ECL-2.0", "Apache-2.0" ]
11,789
2015-01-05T04:50:15.000Z
2022-03-31T23:39:19.000Z
test/library/draft/DataFrames/psahabu/AddSeries.py
jhh67/chapel
f041470e9b88b5fc4914c75aa5a37efcb46aa08f
[ "ECL-2.0", "Apache-2.0" ]
498
2015-01-08T18:58:18.000Z
2022-03-20T15:37:45.000Z
import pandas as pd I = ["A", "B", "C", "D", "E"] oneDigit = pd.Series([1, 2, 3, 4, 5], pd.Index(I)) twoDigit = pd.Series([10, 20, 30, 40, 50], pd.Index(I)) print "addends:" print oneDigit print twoDigit print print "sum:" print oneDigit + twoDigit print I2 = ["A", "B", "C"] I3 = ["B", "C", "D", "E"] X = pd.Series([0, 1, 2], pd.Index(I2)) Y = pd.Series([10, 20, 0, 0], pd.Index(I3)) print "addends:" print X print Y print print "sum:" print X + Y print A = pd.Series(["hello ", "my ", "name", "is", "brad"]) B = pd.Series(["world", "real"]) print "addends:" print A print B print print "sum: " print A + B
16.210526
55
0.576299
111
616
3.198198
0.351351
0.135211
0.143662
0.152113
0
0
0
0
0
0
0
0.055777
0.185065
616
37
56
16.648649
0.651394
0
0
0.366667
0
0
0.125
0
0
0
0
0
0
0
null
null
0
0.033333
null
null
0.666667
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
13a51bb2dfcddb562cef50eb73654bc85d1b9f01
666
py
Python
Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/ManageAttachments/ManageAttachments.py
aspose-email/Aspose.Email-for-Java
cf4567e54f7979e7296c99bcae2c6477385d7735
[ "MIT" ]
24
2016-07-29T03:57:35.000Z
2022-01-18T23:42:08.000Z
Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/ManageAttachments/ManageAttachments.py
asposeemail/Aspose_Email_Java
cf4567e54f7979e7296c99bcae2c6477385d7735
[ "MIT" ]
6
2017-07-24T13:08:43.000Z
2022-01-01T21:51:25.000Z
Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/ManageAttachments/ManageAttachments.py
aspose-email/Aspose.Email-for-Java
cf4567e54f7979e7296c99bcae2c6477385d7735
[ "MIT" ]
25
2016-04-09T07:24:12.000Z
2021-12-19T13:54:21.000Z
# To change this license header, choose License Headers in Project Properties. # To change this template file, choose Tools | Templates # and open the template in the editor. #if __name__ == "__main__": # print "Hello World" from ProgrammingEmail import ManageAttachments import jpype import os.path asposeapispath = os.path.join(os.path.abspath("./../../../"), "lib/") dataDir = os.path.join(os.path.abspath("./"), "data/") print "You need to put your Aspose.Email for Java APIs .jars in this folder:\n"+asposeapispath #print dataDir jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % asposeapispath) hw = ManageAttachments(dataDir) hw.main()
31.714286
94
0.735736
90
666
5.355556
0.622222
0.062241
0.049793
0.049793
0.095436
0.095436
0
0
0
0
0
0
0.129129
666
21
95
31.714286
0.831034
0.345345
0
0
0
0
0.25814
0
0
0
0
0
0
0
null
null
0
0.333333
null
null
0.111111
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
13a612e58dbc2d528c1a7b3b41902e48fed28775
739
py
Python
HRMS/app/__init__.py
freestyletime/HumanResourceManagement
4ec7f453fdae28d1a412d740849c9ee186757df8
[ "MIT" ]
1
2021-12-24T18:47:20.000Z
2021-12-24T18:47:20.000Z
HRMS/app/__init__.py
freestyletime/HumanResourceManagement
4ec7f453fdae28d1a412d740849c9ee186757df8
[ "MIT" ]
null
null
null
HRMS/app/__init__.py
freestyletime/HumanResourceManagement
4ec7f453fdae28d1a412d740849c9ee186757df8
[ "MIT" ]
null
null
null
# 初始化模块 from config import Config from flask import Flask from flask_sqlalchemy import SQLAlchemy # 数据库操作对象 db = SQLAlchemy() # 创建app def create_app(): # flask操作对象 app = Flask(__name__) # 通过配置文件读取并应用配置 app.config.from_object(Config) # 初始化数据库 db.init_app(app) # 员工管理子系统 from app.view import employee # 职位管理子系统 from app.view import post # 部门管理子系统 from app.view import department # 工资管理子系统 from app.view import salary # 考勤管理子系统 from app.view import attendance # 统一对外接口蓝本 app.register_blueprint(employee) app.register_blueprint(post) app.register_blueprint(department) app.register_blueprint(salary) app.register_blueprint(attendance) return app
19.972973
39
0.705007
89
739
5.707865
0.370787
0.068898
0.108268
0.167323
0
0
0
0
0
0
0
0
0.230041
739
36
40
20.527778
0.892794
0.133965
0
0
0
0
0
0
0
0
0
0
0
1
0.052632
false
0
0.421053
0
0.526316
0.263158
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
1
0
0
0
0
2
13adaa6947a03ff103153b1b8c14da5ac9aaa4b0
392
py
Python
actors/models.py
rngallen/beyond_basics
2cfb7d97699a733251e68357a70eada3d0278680
[ "MIT" ]
null
null
null
actors/models.py
rngallen/beyond_basics
2cfb7d97699a733251e68357a70eada3d0278680
[ "MIT" ]
null
null
null
actors/models.py
rngallen/beyond_basics
2cfb7d97699a733251e68357a70eada3d0278680
[ "MIT" ]
null
null
null
from django.db import models from django.utils.translation import ugettext_lazy as _ # Create your models here. class Actor(models.Model): name = models.CharField(_("name"), max_length=200) # if is_star he/she will be directed to hollywood else directed to commercial is_star = models.BooleanField(_("is start"), default=False) def __str__(self): return self.name
28
81
0.729592
56
392
4.910714
0.732143
0.072727
0
0
0
0
0
0
0
0
0
0.009346
0.181122
392
13
82
30.153846
0.847352
0.255102
0
0
0
0
0.041522
0
0
0
0
0
0
1
0.142857
false
0
0.285714
0.142857
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
13b1070ba0b79397d1d29eb7190ddb42cc92bb2c
678
py
Python
LeetCode/2019-08-03-384-Shuffle-an-Array.py
HeRuivio/-Algorithm
1fbe6256630758fda3af68f469471ee246730afc
[ "MIT" ]
5
2018-10-30T05:07:32.000Z
2019-06-18T08:11:38.000Z
LeetCode/2019-08-03-384-Shuffle-an-Array.py
HeRuivio/-Algorithm
1fbe6256630758fda3af68f469471ee246730afc
[ "MIT" ]
1
2020-05-09T09:05:16.000Z
2020-05-09T09:05:16.000Z
LeetCode/2019-08-03-384-Shuffle-an-Array.py
HeRuivio/-Algorithm
1fbe6256630758fda3af68f469471ee246730afc
[ "MIT" ]
2
2020-05-09T09:02:22.000Z
2020-12-09T13:23:00.000Z
# -*- coding: utf-8 -*- # @Author: 何睿 # @Create Date: 2019-08-03 10:48:30 # @Last Modified by: 何睿 # @Last Modified time: 2019-08-03 10:53:15 import copy import random from typing import List class Solution: def __init__(self, nums: List[int]): self.shuffle_ = nums self.original = copy.copy(nums) def reset(self) -> List[int]: """ Resets the array to its original configuration and return it. """ return self.original def shuffle(self) -> List[int]: """ Returns a random shuffling of the array. """ random.shuffle(self.shuffle_) return self.shuffle_
21.870968
69
0.581121
87
678
4.448276
0.551724
0.054264
0.041344
0.05168
0
0
0
0
0
0
0
0.061441
0.303835
678
30
70
22.6
0.758475
0.376106
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
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
1
0
0
0
0
1
0
0
2
13ca207f4f2fb0793c69bd95418294b71cd89e2c
467
py
Python
Season 01 - Intro to Python/Episode 13 - Join.py
Pythobit/Python-tutorial
b0743eaa9c237c3578131ead1b3f2c295f11b7ee
[ "MIT" ]
3
2021-02-19T18:33:00.000Z
2021-08-03T14:56:50.000Z
Season 01 - Intro to Python/Episode 13 - Join.py
barawalojas/Python-tutorial
3f4b2b073e421888b3d62ff634658317d9abcb9b
[ "MIT" ]
1
2021-07-10T14:37:57.000Z
2021-07-20T09:51:39.000Z
Season 01 - Intro to Python/Episode 13 - Join.py
barawalojas/Python-tutorial
3f4b2b073e421888b3d62ff634658317d9abcb9b
[ "MIT" ]
1
2021-08-02T05:39:38.000Z
2021-08-02T05:39:38.000Z
# 13. Join # it allows to print list a bit better friends = ['Pythobit','boy','Pythoman'] print(f'My friends are {friends}.') # Output - My friends are ['Pythobit', 'boy', 'Pythoman']. # So, the Output needs to be a bit clearer. friends = ['Pythobit','boy','Pythoman'] friend = ', '.join(friends) print(f'My friends are {friend}') # Output - My friends are Pythobit, boy, Pythoman # Here (, ) comma n space is used as separator, but you can use anything.
38.916667
98
0.663812
69
467
4.492754
0.536232
0.141935
0.245161
0.167742
0.354839
0.23871
0.23871
0
0
0
0
0.005249
0.184154
467
11
99
42.454545
0.808399
0.56531
0
0.4
0
0
0.44898
0
0
0
0
0
0
1
0
false
0
0
0
0
0.4
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
13f7ddb9a41846fb5799958db3fabf2ed4eeb64a
3,105
py
Python
vaccine_card/logistic/models.py
Unanimad/lais_046_2020_etapa_2
630efc6b25a580be44b6cd50be6744a01221a2c4
[ "Apache-2.0" ]
null
null
null
vaccine_card/logistic/models.py
Unanimad/lais_046_2020_etapa_2
630efc6b25a580be44b6cd50be6744a01221a2c4
[ "Apache-2.0" ]
null
null
null
vaccine_card/logistic/models.py
Unanimad/lais_046_2020_etapa_2
630efc6b25a580be44b6cd50be6744a01221a2c4
[ "Apache-2.0" ]
null
null
null
from django.db import models from vaccine_card.vaccination.models import Vaccine class State(models.Model): name = models.CharField(max_length=20, verbose_name='Nome') class Meta: verbose_name = 'Unidade Federativa' def __str__(self): return self.name class City(models.Model): name = models.CharField(max_length=50, verbose_name='Nome') state = models.ForeignKey(State, on_delete=models.CASCADE, verbose_name=State._meta.verbose_name) class Meta: verbose_name = 'Município' def __str__(self): return self.name class Address(models.Model): logradouro = models.CharField(max_length=150, verbose_name='Logradouro') numero = models.CharField(max_length=4, verbose_name='Número') complemento = models.CharField(max_length=50, null=True, blank=True, verbose_name='Complemento') bairro = models.CharField(max_length=150, verbose_name='Bairro') cep = models.CharField(max_length=8, verbose_name='CEP') # state = models.ForeignKey(State, on_delete=models.CASCADE, verbose_name=State._meta.verbose_name) city = models.ForeignKey(City, on_delete=models.CASCADE, verbose_name=City._meta.verbose_name) class Meta: verbose_name = 'Endereço' class HealthCenter(models.Model): cnes = models.CharField(max_length=7, verbose_name='CNES') cnpj = models.CharField(max_length=14, verbose_name='CNPJ') name = models.CharField(max_length=255, verbose_name='Razão Social') created_at = models.DateTimeField(auto_now_add=True, auto_now=False, verbose_name='Criado em:') updated_at = models.DateTimeField(auto_now_add=False, auto_now=True, verbose_name='Atualizado em:') address = models.ManyToManyField(Address, verbose_name=Address._meta.verbose_name) class Meta: verbose_name = 'Estabelecimento de Saúde' verbose_name_plural = 'Estabelecimentos de Saúde' def __str__(self): return self.name class Stock(models.Model): lot = models.PositiveSmallIntegerField(verbose_name='Lote') created_at = models.DateTimeField(auto_now_add=True, auto_now=False, verbose_name='Criado em:') updated_at = models.DateTimeField(auto_now_add=False, auto_now=True, verbose_name='Atualizado em:') health_center = models.ForeignKey(HealthCenter, on_delete=models.CASCADE, verbose_name=HealthCenter._meta.verbose_name) vaccines = models.ManyToManyField(Vaccine, through='VaccineStock', verbose_name=Vaccine._meta.verbose_name) class Meta: verbose_name = 'Estoque' class VaccineStock(models.Model): amount = models.PositiveSmallIntegerField(verbose_name='Quantidade recebida') remaining = models.PositiveSmallIntegerField(verbose_name='Quantidade restante') vaccine = models.ForeignKey(Vaccine, on_delete=models.DO_NOTHING, verbose_name=Vaccine._meta.verbose_name) stock = models.ForeignKey(Stock, on_delete=models.DO_NOTHING, verbose_name=Stock._meta.verbose_name) class Meta: verbose_name = 'Estoque de Vacina' def __str__(self): return self.vaccine.name
36.104651
111
0.738808
386
3,105
5.681347
0.23057
0.200638
0.095759
0.109439
0.557684
0.475604
0.428181
0.246238
0.207934
0.207934
0
0.007648
0.15781
3,105
85
112
36.529412
0.830975
0.03124
0
0.314815
0
0
0.091151
0
0
0
0
0
0
1
0.074074
false
0
0.037037
0.074074
0.851852
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
0
0
0
0
0
1
0
0
2
b9139bb412d2bf193e04d2282744a0d621a61a94
2,413
py
Python
withings_api/const.py
tiloc/python_withings_api
64c9706ab70c93e4c54cc843a778ecd3f9960980
[ "MIT" ]
null
null
null
withings_api/const.py
tiloc/python_withings_api
64c9706ab70c93e4c54cc843a778ecd3f9960980
[ "MIT" ]
null
null
null
withings_api/const.py
tiloc/python_withings_api
64c9706ab70c93e4c54cc843a778ecd3f9960980
[ "MIT" ]
null
null
null
"""Constant values.""" STATUS_SUCCESS = (0,) STATUS_AUTH_FAILED = (100, 101, 102, 200, 401) STATUS_INVALID_PARAMS = ( 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 216, 217, 218, 220, 221, 223, 225, 227, 228, 229, 230, 234, 235, 236, 238, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 254, 260, 261, 262, 263, 264, 265, 266, 267, 271, 272, 275, 276, 283, 284, 285, 286, 287, 288, 290, 293, 294, 295, 297, 300, 301, 302, 303, 304, 321, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 380, 381, 382, 400, 501, 502, 503, 504, 505, 506, 509, 510, 511, 523, 532, 3017, 3018, 3019, ) STATUS_UNAUTHORIZED = (214, 277, 2553, 2554, 2555) STATUS_ERROR_OCCURRED = ( 215, 219, 222, 224, 226, 231, 233, 237, 253, 255, 256, 257, 258, 259, 268, 269, 270, 273, 274, 278, 279, 280, 281, 282, 289, 291, 292, 296, 298, 305, 306, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 322, 370, 371, 372, 373, 374, 375, 383, 391, 402, 516, 517, 518, 519, 520, 521, 525, 526, 527, 528, 529, 530, 531, 533, 602, 700, 1051, 1052, 1053, 1054, 2551, 2552, 2556, 2557, 2558, 2559, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3020, 3021, 3022, 3023, 3024, 5000, 5001, 5005, 5006, 6000, 6010, 6011, 9000, 10000, ) STATUS_TIMEOUT = (522,) STATUS_BAD_STATE = (524,) STATUS_TOO_MANY_REQUESTS = (601,)
9.690763
50
0.390385
269
2,413
3.449814
0.973978
0
0
0
0
0
0
0
0
0
0
0.64227
0.496063
2,413
248
51
9.729839
0.120888
0.006631
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
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
b915c0a9f384ec67869ab91a6425fc1e66fbe2a2
2,698
py
Python
tests/bugs/core_6489_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/bugs/core_6489_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/bugs/core_6489_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
#coding:utf-8 # # id: bugs.core_6489 # title: User without ALTER ANY ROLE privilege can use COMMENT ON ROLE # decription: # Test creates two users: one of them has no any rights, second is granted with 'alter any role' privilege. # First user ('junior') must not have ability to add comment to rdb$admin role, but second ('senior') must # be able to set comment to any string and make it null. # # Confirmed bug on 4.0.0.2384, 3.0.8.33425 # Checked on: 4.0.0.2387, 3.0.8.33426 -- all OK. # # NOTE: # phrase '-Effective user is ...' presents only in FB 4.x and is suppressed here. # # tracker_id: CORE-6489 # min_versions: ['3.0.8'] # versions: 3.0.8 # qmid: None import pytest from firebird.qa import db_factory, isql_act, Action # version: 3.0.8 # resources: None substitutions_1 = [('ROLE_DESCR_BLOB_ID .*', ''), ('[\t ]+', ' '), ('(-)?Effective user is.*', '')] init_script_1 = """""" db_1 = db_factory(sql_dialect=3, init=init_script_1) test_script_1 = """ create or alter user tmp$c6489_junior password '123' using plugin Srp; create or alter user tmp$c6489_senior password '456' using plugin Srp; commit; grant alter any role to user tmp$c6489_senior; commit; connect '$(DSN)' user tmp$c6489_junior password '123'; comment on role rdb$admin is 'Comment by tmp$c6489_junior'; commit; connect '$(DSN)' user tmp$c6489_senior password '456'; comment on role rdb$admin is 'Comment by tmp$c6489_senior'; commit; set list on; select r.rdb$description as role_descr_blob_id from rdb$roles r where r.rdb$role_name = upper('rdb$admin'); commit; comment on role rdb$admin is null; commit; connect '$(DSN)' user 'SYSDBA' password 'masterkey'; drop user tmp$c6489_junior using plugin Srp; drop user tmp$c6489_senior using plugin Srp; commit; """ act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1) expected_stdout_1 = """ Comment by tmp$c6489_senior """ expected_stderr_1 = """ Statement failed, SQLSTATE = 28000 unsuccessful metadata update -COMMENT ON RDB$ADMIN failed -no permission for ALTER access to ROLE RDB$ADMIN -Effective user is TMP$C6489_JUNIOR """ @pytest.mark.version('>=3.0.8') def test_1(act_1: Action): act_1.expected_stdout = expected_stdout_1 act_1.expected_stderr = expected_stderr_1 act_1.execute() assert act_1.clean_expected_stderr == act_1.clean_stderr assert act_1.clean_expected_stdout == act_1.clean_stdout
32.902439
124
0.648258
396
2,698
4.255051
0.368687
0.052226
0.049852
0.04273
0.208902
0.164392
0.047478
0.047478
0.047478
0.047478
0
0.066929
0.24685
2,698
81
125
33.308642
0.762303
0.316901
0
0.222222
0
0.022222
0.641955
0
0
0
0
0
0.044444
1
0.022222
false
0.111111
0.044444
0
0.066667
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
b92725db4e0f08b5ebf9656b39a1e567c20d5ffb
150
py
Python
A/116A.py
johnggo/Codeforces-Solutions
4127ae6f72294b5781fb94c42b69cfef570aae42
[ "MIT" ]
1
2020-08-25T19:59:11.000Z
2020-08-25T19:59:11.000Z
A/116A.py
johnggo/Codeforces-Solutions
4127ae6f72294b5781fb94c42b69cfef570aae42
[ "MIT" ]
null
null
null
A/116A.py
johnggo/Codeforces-Solutions
4127ae6f72294b5781fb94c42b69cfef570aae42
[ "MIT" ]
null
null
null
# Time: 310 ms # Memory: 1664 KB n = int(input()) e = 0 s = 0 for i in range(n): s =s- eval(input().replace(' ', '-')) e = max(e, s) print(e)
15
41
0.506667
29
150
2.62069
0.689655
0
0
0
0
0
0
0
0
0
0
0.081081
0.26
150
9
42
16.666667
0.603604
0.186667
0
0
0
0
0.016807
0
0
0
0
0
0
1
0
false
0
0
0
0
0.142857
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
b934ce47dae53d305023f829683b8ba6f625367b
1,362
py
Python
packages/merlin/protocols/PrefixLayout.py
pyre/pyre
0f903836f52450bf81216c5dfdfdfebb16090177
[ "BSD-3-Clause" ]
25
2018-04-23T01:45:39.000Z
2021-12-10T06:01:23.000Z
packages/merlin/protocols/PrefixLayout.py
pyre/pyre
0f903836f52450bf81216c5dfdfdfebb16090177
[ "BSD-3-Clause" ]
53
2018-05-31T04:55:00.000Z
2021-10-07T21:41:32.000Z
packages/merlin/protocols/PrefixLayout.py
pyre/pyre
0f903836f52450bf81216c5dfdfdfebb16090177
[ "BSD-3-Clause" ]
12
2018-04-23T22:50:40.000Z
2022-02-20T17:27:23.000Z
# -*- coding: utf-8 -*- # # michael a.g. aïvázis <[email protected]> # (c) 1998-2021 all rights reserved # support import merlin # the manager of intermediate and final build products class PrefixLayout(merlin.protocol, family="merlin.layouts.prefix"): """ The manager of the all build products, both final and intermediate disposables """ # required state bin = merlin.properties.path() bin.doc = "the location of executables" config = merlin.properties.path() config.doc = "global package configuration files" doc = merlin.properties.path() doc.doc = "package documentation" etc = merlin.properties.path() etc.doc = "host specific files" include = merlin.properties.path() include.doc = "library header files" lib = merlin.properties.path() lib.doc = "libraries" libexec = merlin.properties.path() libexec.doc = "binaries that are meant to be used by other packages" share = merlin.properties.path() share.doc = "architecture independent package files" var = merlin.properties.path() var.doc = "runtime files" # framework hooks @classmethod def pyre_default(cls, **kwds): """ Specify the default implementation """ # choose the default implementer return merlin.components.fhs # end of file
23.482759
82
0.668135
161
1,362
5.645963
0.565217
0.158416
0.19802
0
0
0
0
0
0
0
0
0.008555
0.227606
1,362
57
83
23.894737
0.855513
0.262115
0
0
0
0
0.265413
0.021944
0
0
0
0
0
1
0.043478
false
0
0.043478
0
0.565217
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
b9514946d8170f94e426e1cbf736a481d8427c11
761
py
Python
src/utils.py
f-grimaldi/explain_ML
00892675be32bebd023b274270ccb05b798fb388
[ "MIT" ]
1
2020-08-03T08:23:31.000Z
2020-08-03T08:23:31.000Z
src/utils.py
f-grimaldi/explain_ML
00892675be32bebd023b274270ccb05b798fb388
[ "MIT" ]
null
null
null
src/utils.py
f-grimaldi/explain_ML
00892675be32bebd023b274270ccb05b798fb388
[ "MIT" ]
null
null
null
from matplotlib import colors import numpy as np class SaveOutput: def __init__(self): self.outputs = [] def __call__(self, module, module_in, module_out): self.outputs.append(module_out) def clear(self): self.outputs = [] class MidpointNormalize(colors.Normalize): def __init__(self, vmin=None, vmax=None, vcenter=None, clip=False): self.vcenter = vcenter colors.Normalize.__init__(self, vmin, vmax, clip) def __call__(self, value, clip=None): # I'm ignoring masked values and all kinds of edge cases to make a # simple example... x, y = [self.vmin, self.vcenter, self.vmax], [self.vmin, self.vcenter, self.vmax] return np.ma.masked_array(np.interp(value, x, y))
31.708333
89
0.659658
104
761
4.596154
0.480769
0.066946
0.046025
0.079498
0.112971
0.112971
0
0
0
0
0
0
0.226018
761
23
90
33.086957
0.811545
0.107753
0
0.125
0
0
0
0
0
0
0
0
0
1
0.3125
false
0
0.125
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
1
0
0
0
0
1
0
0
2
b959064c37513b8eabaf61132941fe714e3a8dbc
1,833
py
Python
tests/mocks.py
davla/i3-live-tree
8dc3917afdd09f53f7cf39653c2bf12cb0200983
[ "MIT" ]
1
2021-07-22T09:04:46.000Z
2021-07-22T09:04:46.000Z
tests/mocks.py
davla/i3-live-tree
8dc3917afdd09f53f7cf39653c2bf12cb0200983
[ "MIT" ]
null
null
null
tests/mocks.py
davla/i3-live-tree
8dc3917afdd09f53f7cf39653c2bf12cb0200983
[ "MIT" ]
null
null
null
from unittest.mock import MagicMock, Mock from i3ipc.aio import Con import i3_live_tree.tree_serializer # noqa: F401 class MockConSerializer(Mock, Con): """Mock a generic i3ipc.aio.Con for serialization purposes This Mock is meant to ease testing of i3ipc.aio.Con serialization methods, which are mokey patched in i3_live_tree.tree_serializer. In order to achieve this, the mock inherits all the method implementations of i3ipc.aio.Con, most importantly the serialization ones. However, whatever is needed for serialization, both properties and methods, is mocked and can be injected in the constructor, in order to ease the creation of mock instances. """ def __init__(self, *args, name=None, layout=None, focused=False, nodes=iter(()), **kwargs): Mock.__init__(self, *args, **kwargs) self.focused = focused self.layout = layout self.name = name self.nodes = nodes class MockConNavigation(MagicMock): """Mock an i3ipc.aio.Con for navigation purposes This Mock is meant to be used when testing i3ipc event handlers. It mocks all the necessary methods and properties, by returning `self` when an i3ipc.aio.Con instance is needed for the sake of simplicity. """ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def find_focused(self): """Return the focused window""" return self def workspace(self): """Return the containing workspace""" return self class MockI3(Mock): """Mock an i3ipc.aio.Connection""" def __init__(self, *args, tree, **kwargs): super().__init__(*args, **kwargs) self.tree = tree async def get_tree(self): """Return the i3 tree asynchronously""" return self.tree
30.55
78
0.67485
243
1,833
4.958848
0.390947
0.046473
0.045643
0.037344
0.122822
0.041494
0
0
0
0
0
0.010714
0.236225
1,833
59
79
31.067797
0.85
0.46263
0
0.166667
0
0
0
0
0
0
0
0
0
1
0.208333
false
0
0.125
0
0.583333
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
b95e87663683cd1ca4cf5da88872ac29da6e83c7
1,177
py
Python
genesis/project.py
genialis/genesis-genapi
dfe9bcc8b332a8b9873db4ab9994b0cc10eb209a
[ "Apache-2.0" ]
3
2020-01-24T17:03:23.000Z
2021-03-16T03:20:31.000Z
genesis/project.py
genialis/genesis-genapi
dfe9bcc8b332a8b9873db4ab9994b0cc10eb209a
[ "Apache-2.0" ]
1
2018-02-15T19:33:00.000Z
2018-02-15T19:33:00.000Z
genesis/project.py
genialis/genesis-genapi
dfe9bcc8b332a8b9873db4ab9994b0cc10eb209a
[ "Apache-2.0" ]
6
2015-05-27T10:14:46.000Z
2021-01-01T06:35:40.000Z
"""Project""" from __future__ import absolute_import, division, print_function, unicode_literals class GenProject(object): """Genesais project annotation.""" def __init__(self, data, gencloud): for field in data: setattr(self, field, data[field]) self.gencloud = gencloud self.id = getattr(self, 'id', None) # pylint: disable=invalid-name self.name = getattr(self, 'name', None) def data_types(self): """Return a list of data types.""" data = self.gencloud.project_data(self.id) return sorted(set(d.type for d in data)) def data(self, **query): """Query for Data object annotation.""" data = self.gencloud.project_data(self.id) query['case_ids__contains'] = self.id ids = set(d['id'] for d in self.gencloud.api.dataid.get(**query)['objects']) return [d for d in data if d.id in ids] def find(self, filter_str): """Filter Data object annotation.""" raise NotImplementedError() def __str__(self): return self.name or 'n/a' def __repr__(self): return u"GenProject: {} - {}".format(self.id, self.name)
30.973684
84
0.619371
154
1,177
4.564935
0.383117
0.051209
0.025605
0.065434
0.093883
0.093883
0.093883
0
0
0
0
0
0.246389
1,177
37
85
31.810811
0.792559
0.135939
0
0.090909
0
0
0.0555
0
0
0
0
0
0
1
0.272727
false
0
0.045455
0.090909
0.545455
0.045455
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
b970d836b7397be4bc4d63762c0eec8adfb90a91
611
py
Python
source/monkeyPatches/__init__.py
lukaszgo1/nvda
38a2efd1e1bff7db4471cb7afa03ab1590b7adef
[ "bzip2-1.0.6" ]
19
2016-05-11T05:15:31.000Z
2022-03-17T12:40:10.000Z
source/monkeyPatches/__init__.py
lukaszgo1/nvda
38a2efd1e1bff7db4471cb7afa03ab1590b7adef
[ "bzip2-1.0.6" ]
307
2015-08-27T11:22:33.000Z
2022-03-29T10:43:34.000Z
source/monkeyPatches/__init__.py
lukaszgo1/nvda
38a2efd1e1bff7db4471cb7afa03ab1590b7adef
[ "bzip2-1.0.6" ]
14
2016-03-28T07:31:49.000Z
2022-03-30T04:56:35.000Z
# A part of NonVisual Desktop Access (NVDA) # Copyright (C) 2021 NV Access Limited # This file is covered by the GNU General Public License. # See the file COPYING for more details. from . import wxMonkeyPatches applyWxMonkeyPatches = wxMonkeyPatches.apply def applyMonkeyPatches(): # Apply several monkey patches to comtypes # F401 - imported but unused: Patches are applied during import from . import comtypesMonkeyPatches # noqa: F401 # Apply patches to Enum, prevent cyclic references on ValueError during construction from . import enumPatches enumPatches.replace__new__()
30.55
86
0.761047
75
611
6.146667
0.773333
0.065076
0
0
0
0
0
0
0
0
0
0.020243
0.191489
611
19
87
32.157895
0.912955
0.605565
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.5
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
b97c828450c34038ee92e089e3f2b951d2113017
903
py
Python
nipype/interfaces/spm/__init__.py
felixsc1/nipype
e722d6170593583f16ddfcb95473e5d30b5f1d7c
[ "Apache-2.0" ]
8
2019-05-29T09:38:30.000Z
2021-01-20T03:36:59.000Z
nipype/interfaces/spm/__init__.py
felixsc1/nipype
e722d6170593583f16ddfcb95473e5d30b5f1d7c
[ "Apache-2.0" ]
12
2021-03-09T03:01:16.000Z
2022-03-11T23:59:36.000Z
nipype/interfaces/spm/__init__.py
felixsc1/nipype
e722d6170593583f16ddfcb95473e5d30b5f1d7c
[ "Apache-2.0" ]
1
2020-07-17T12:49:49.000Z
2020-07-17T12:49:49.000Z
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Top-level namespace for spm.""" from .base import (Info, SPMCommand, logger, no_spm, scans_for_fname, scans_for_fnames) from .preprocess import (FieldMap, SliceTiming, Realign, RealignUnwarp, Coregister, Normalize, Normalize12, Segment, Smooth, NewSegment, DARTEL, DARTELNorm2MNI, CreateWarped, VBMSegment) from .model import (Level1Design, EstimateModel, EstimateContrast, Threshold, OneSampleTTestDesign, TwoSampleTTestDesign, PairedTTestDesign, MultipleRegressionDesign) from .utils import (Analyze2nii, CalcCoregAffine, ApplyTransform, Reslice, ApplyInverseDeformation, ResliceToReference, DicomImport)
53.117647
77
0.653378
82
903
7.134146
0.804878
0.02735
0
0
0
0
0
0
0
0
0
0.014837
0.253599
903
16
78
56.4375
0.853116
0.178295
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.454545
0
0.454545
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
0
1
0
0
0
0
2
b992a4ec960bcf3e39ba5a1bb6a8cd2e68be293e
1,987
py
Python
wexapi/models/ticker.py
madmis/wexapi
f5b1b9b566f767bca7d8fad1f08c3d1bca42355a
[ "MIT" ]
3
2018-06-08T12:45:04.000Z
2018-08-02T11:09:11.000Z
wexapi/models/ticker.py
madmis/wexapi
f5b1b9b566f767bca7d8fad1f08c3d1bca42355a
[ "MIT" ]
null
null
null
wexapi/models/ticker.py
madmis/wexapi
f5b1b9b566f767bca7d8fad1f08c3d1bca42355a
[ "MIT" ]
null
null
null
from decimal import Decimal class Ticker(object): def __init__( self, high: float, low: float, avg: float, vol: float, vol_cur: int, last: float, buy: float, sell: float, updated: int, ): self.high = high self.low = low self.avg = avg self.vol = vol self.vol_cur = vol_cur self.last = last self.buy = buy self.sell = sell self.updated = updated @property def high(self) -> Decimal: return self._high @high.setter def high(self, value: float): self._high = Decimal(value) @property def low(self) -> Decimal: return self._low @low.setter def low(self, value: float): self._low = Decimal(value) @property def avg(self) -> Decimal: return self._avg @avg.setter def avg(self, value: float): self._avg = Decimal(value) @property def vol(self) -> Decimal: return self._vol @vol.setter def vol(self, value: float): self._vol = Decimal(value) @property def vol_cur(self) -> Decimal: return self._vol_cur @vol_cur.setter def vol_cur(self, value: float): self._vol_cur = Decimal(value) @property def last(self) -> Decimal: return self._last @last.setter def last(self, value: float): self._last = Decimal(value) @property def buy(self) -> Decimal: return self._buy @buy.setter def buy(self, value: float): self._buy = Decimal(value) @property def sell(self) -> Decimal: return self._sell @sell.setter def sell(self, value: float): self._sell = Decimal(value) @property def updated(self) -> int: return self._updated @updated.setter def updated(self, value: int): self._updated = int(value)
20.27551
38
0.545546
234
1,987
4.504274
0.102564
0.093928
0.129032
0.159393
0.158444
0
0
0
0
0
0
0
0.351283
1,987
97
39
20.484536
0.817688
0
0
0.116883
0
0
0
0
0
0
0
0
0
1
0.246753
false
0
0.012987
0.116883
0.38961
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
b9991711cbe60fa3459b0fb4cb64d023132610e8
896
py
Python
accounts/admin.py
GuilhemN/site-interludes
69873810d5b0168aa57277ba51805117e6c53874
[ "MIT" ]
null
null
null
accounts/admin.py
GuilhemN/site-interludes
69873810d5b0168aa57277ba51805117e6c53874
[ "MIT" ]
1
2022-03-24T10:41:10.000Z
2022-03-24T12:39:30.000Z
accounts/admin.py
GuilhemN/site-interludes
69873810d5b0168aa57277ba51805117e6c53874
[ "MIT" ]
1
2022-03-23T22:30:12.000Z
2022-03-23T22:30:12.000Z
from django.contrib import admin from django.contrib.auth.models import Group from accounts.models import EmailUser from shared.admin import ExportCsvMixin # no need for groups - we only have regular users and superusers admin.site.unregister(Group) @admin.register(EmailUser) class EmailUserAdmin(ExportCsvMixin, admin.ModelAdmin): """option d'affichage des activités dans la vue django admin""" filename = "export_utilisateurs.csv" list_display = ("email", "last_name", "first_name", "is_superuser", "is_active", "email_confirmed",) list_filter = ("is_superuser","is_active", "email_confirmed",) fields = ("email", "last_name", "first_name", "is_superuser", "is_staff", "is_active", "email_confirmed", ("date_joined", "last_login",), ) ordering = ("last_name", "first_name") readonly_fields = ("date_joined", "last_login",) list_per_page = 200 csv_export_exclude = ["password"]
37.333333
106
0.753348
117
896
5.529915
0.547009
0.037094
0.060278
0.078825
0.190108
0.190108
0.108192
0.108192
0
0
0
0.003769
0.111607
896
23
107
38.956522
0.809045
0.135045
0
0
0
0
0.3329
0.029909
0
0
0
0
0
1
0
false
0.058824
0.235294
0
0.764706
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
b9a529f9f36fb2cce0a38f16148b6bc2117ab033
2,655
py
Python
tests/test_bishop_generate.py
otaviocarvalho/chess-negamax
21f1066611e581dac3257d3f46c71ca2b09b5964
[ "MIT" ]
6
2015-04-04T15:58:29.000Z
2019-04-07T11:45:02.000Z
tests/test_bishop_generate.py
otaviocarvalho/chess-negamax
21f1066611e581dac3257d3f46c71ca2b09b5964
[ "MIT" ]
1
2015-04-27T19:02:06.000Z
2015-04-27T19:02:06.000Z
tests/test_bishop_generate.py
otaviocarvalho/chess-negamax
21f1066611e581dac3257d3f46c71ca2b09b5964
[ "MIT" ]
3
2015-10-04T00:22:17.000Z
2019-04-07T11:44:56.000Z
import unittest from .helpers import StubBoard, StubPiece, C, WHITE, BLACK class TestBishopGenerate(unittest.TestCase): def get_bishop(self, board, team, position): from chess.models import Bishop return Bishop(board, team, position) def compare_list(self, expected, results): compared = [] for e in expected: for r in results: if e[0] == r[0] and e[1] == r[1]: compared.append(True) break else: compared.append(False) return compared def test_generate_topright(self): board = StubBoard() board[C('h7')] = StubPiece(board, BLACK, C('h7')) bishop = self.get_bishop(board, WHITE, C('e4')) results = bishop.generate() expected = [C('f5'), C('g6'), C('h7')] correct = self.compare_list(expected, results) self.assertTrue(all(correct)) def test_generate_topleft(self): board = StubBoard() board[C('c6')] = StubPiece(board, WHITE, C('c6')) bishop = self.get_bishop(board, WHITE, C('e4')) results = bishop.generate() expected = [C('d5')] correct = self.compare_list(expected, results) self.assertTrue(all(correct)) expected = [C('c6')] correct = self.compare_list(expected, results) self.assertFalse(any(correct)) def test_generate_bottomleft(self): board = StubBoard() board[C('c2')] = StubPiece(board, BLACK, C('c2')) bishop = self.get_bishop(board, WHITE, C('e4')) results = bishop.generate() expected = [C('d3'), C('c2')] correct = self.compare_list(expected, results) self.assertTrue(all(correct)) expected = [C('b1')] correct = self.compare_list(expected, results) self.assertFalse(any(correct)) def test_generate_bottomright(self): board = StubBoard() bishop = self.get_bishop(board, WHITE, C('e4')) results = bishop.generate() expected = [C('f3'), C('g2'), C('h1')] correct = self.compare_list(expected, results) self.assertTrue(all(correct)) def test_generate_amount(self): board = StubBoard() bishop = self.get_bishop(board, WHITE, C('e4')) results = bishop.generate() self.assertEqual(len(results), 13) board = StubBoard() board[C('c6')] = StubPiece(board, WHITE, C('c6')) bishop = self.get_bishop(board, WHITE, C('e4')) results = bishop.generate() self.assertEqual(len(results), 10) if __name__ == '__main__': unittest.main()
30.872093
58
0.581921
304
2,655
4.976974
0.230263
0.052875
0.058163
0.075347
0.678123
0.643754
0.643754
0.643754
0.643754
0.643754
0
0.017196
0.277213
2,655
86
59
30.872093
0.771235
0
0
0.492308
1
0
0.021837
0
0
0
0
0
0.123077
1
0.107692
false
0
0.046154
0
0.2
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
b9b4c8dedee4c99c1bae0987e46ca8c83899e4d8
1,435
py
Python
icenews/api_important_words.py
sverrirab/icenews
10a5e13d4dcd5e95f746c4fec9821b4b48fa440e
[ "Apache-2.0" ]
4
2019-04-25T21:09:39.000Z
2020-07-26T08:57:00.000Z
icenews/api_important_words.py
sverrirab/icenews
10a5e13d4dcd5e95f746c4fec9821b4b48fa440e
[ "Apache-2.0" ]
1
2019-08-11T00:27:18.000Z
2019-08-12T17:36:42.000Z
icenews/api_important_words.py
sverrirab/icenews
10a5e13d4dcd5e95f746c4fec9821b4b48fa440e
[ "Apache-2.0" ]
null
null
null
import logging from pydantic import BaseModel, Field from typing import List from .similar import important_words from .server import app _MAX_LENGTH = 2000 logger = logging.getLogger(__name__) class ImportantWordsResponse(BaseModel): important_words: List[str] = Field(..., description="List of lemmas") class ImportantWordsRequest(BaseModel): input_string: str = Field( ..., description="Icelandic text for analysis.", min_length=1, max_length=_MAX_LENGTH, ) # Strange things happen with error handling when using alias - splitting up into two input models class ParseInputDeprecated(BaseModel): input_string: str = Field( ..., description="Icelandic text for analysis.", min_length=1, max_length=_MAX_LENGTH, alias="in", ) @app.post( "/v1/important_words", description="Find lemmas of important words", response_model=ImportantWordsResponse, ) def v1_important_words(*, data: ImportantWordsRequest): return ImportantWordsResponse(important_words=important_words(data.input_string)) @app.post( "/v1/parse", description="Find lemmas of important words", response_model=ImportantWordsResponse, deprecated=True, ) def v1_parse(*, data: ParseInputDeprecated): logger.info(f"parse: {repr(data.input_string)}") return ImportantWordsResponse(important_words=important_words(data.input_string))
25.625
97
0.724042
160
1,435
6.3
0.4
0.138889
0.056548
0.045635
0.464286
0.464286
0.464286
0.464286
0.464286
0.180556
0
0.008503
0.180488
1,435
55
98
26.090909
0.848639
0.066202
0
0.45
0
0
0.143498
0.018685
0
0
0
0
0
1
0.05
false
0
0.4
0.025
0.65
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
b9b51a38157d5d825f921ab19fba044fe3545044
206
py
Python
try-except.py
kmarcini/Learn-Python---Full-Course-for-Beginners-Tutorial-
8ea4ef004d86fdf393980fd356edcf5b769bfeac
[ "BSD-3-Clause" ]
null
null
null
try-except.py
kmarcini/Learn-Python---Full-Course-for-Beginners-Tutorial-
8ea4ef004d86fdf393980fd356edcf5b769bfeac
[ "BSD-3-Clause" ]
null
null
null
try-except.py
kmarcini/Learn-Python---Full-Course-for-Beginners-Tutorial-
8ea4ef004d86fdf393980fd356edcf5b769bfeac
[ "BSD-3-Clause" ]
null
null
null
try: # num = 10 / 0 number = int(input("Enter a number: ")) print(number) # catch specific errors except ZeroDivisionError as err: print(err) except ValueError: print("Invalid input")
17.166667
43
0.650485
26
206
5.153846
0.730769
0
0
0
0
0
0
0
0
0
0
0.019108
0.237864
206
11
44
18.727273
0.834395
0.165049
0
0
0
0
0.172619
0
0
0
0
0
0
1
0
false
0
0
0
0
0.428571
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
0
0
0
1
0
2
b9b6f990f4ce20ca5842a3bb309cb667f69ccc3e
453
py
Python
arachne/hdl/xilinx/ps8/resources/pmu.py
shrine-maiden-heavy-industries/arachne
1d0320bf6e77653656f8ce1874900743452dbac4
[ "BSD-3-Clause" ]
3
2021-09-13T20:23:42.000Z
2022-01-19T13:12:32.000Z
arachne/hdl/xilinx/ps8/resources/pmu.py
shrine-maiden-heavy-industries/arachne
1d0320bf6e77653656f8ce1874900743452dbac4
[ "BSD-3-Clause" ]
null
null
null
arachne/hdl/xilinx/ps8/resources/pmu.py
shrine-maiden-heavy-industries/arachne
1d0320bf6e77653656f8ce1874900743452dbac4
[ "BSD-3-Clause" ]
null
null
null
# SPDX-License-Identifier: BSD-3-Clause from amaranth import * from amaranth.build import * from .common import PS8Resource, MIOSet __all__ = ( 'PMUResource', ) class PMUResource(PS8Resource): name = 'pmu' claimable_mio = [ ] def __init__(self): super().__init__(0, 0, None, False) def used_mio(self, **kwargs): raise NotImplementedError # :nocov: def generate_mapping(self, **kwargs): raise NotImplementedError # :nocov:
19.695652
46
0.699779
52
453
5.807692
0.653846
0.07947
0.099338
0.225166
0.258278
0
0
0
0
0
0
0.013441
0.178808
453
22
47
20.590909
0.798387
0.116998
0
0.133333
0
0
0.035354
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.6
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
b9c4867749ea67a9a267a9e62cea575f210f9260
2,526
py
Python
credentials.py
Machel54/-pass-locker-
8ddf14cf755924ca903919177f9f878f65a08042
[ "MIT" ]
null
null
null
credentials.py
Machel54/-pass-locker-
8ddf14cf755924ca903919177f9f878f65a08042
[ "MIT" ]
null
null
null
credentials.py
Machel54/-pass-locker-
8ddf14cf755924ca903919177f9f878f65a08042
[ "MIT" ]
1
2020-01-29T02:05:49.000Z
2020-01-29T02:05:49.000Z
import pyperclip import random import string class Credential: ''' class that generates new credentials ''' credential_list = [] def __init__(self,username,sitename,password): self.username = username self.password = password self.sitename = sitename def save_credential(self): ''' save_cred method saves the user objects into creds_list ''' Credential.credential_list.append(self) @classmethod def display_credential(cls, user_name): ''' Class method to show the list of credentials saved ''' users_credential_list = [] for credential in cls.credential_list: if credential.username == user_name: users_credential_list.append(credential) return users_credential_list def delete_credential(self): ''' delete_contact method deletes a saved credential from the credential_list ''' Credential.credential_list.remove(self) def generate_password(self): ''' Function to generate a password where a user can generate a password based on their length of choice ''' chars = "abcdefghijklmnopqrstuvwxyziABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890^?!?$%&/()=?`'+#*'~';:_,.-<>|" password = "" print("Use Char list = %s \n" % chars) length = int(input("[*] Input Password Length: ")) while len(password) != length: password = password + random.choice(chars) if len(password) == length: print("Password: %s" % password) return password @classmethod def find_by_sitename(cls, sitename): ''' Class method that takes a site name and returns the credential that matches that site ''' for credential in cls.credential_list: if credential.sitename == sitename: return credential @classmethod def copy_credential(cls, sitename): ''' Class method that copies a credentials details after the credentials sitename has been entered ''' find_credential = Credential.find_by_sitename(sitename) return pyperclip.copy(find_credential.password) @classmethod def credential_exist(cls, sitename): ''' Method that checks if user exists from the credential list. Returns: Boolean: True or false depending if the credential exits ''' the_credential = "" for credential in Credential.credential_list: if (credential.sitename == sitename): the_credential = sitename return the_credential
30.071429
111
0.665479
276
2,526
5.952899
0.322464
0.093731
0.043822
0.047474
0.120511
0.088862
0.053561
0.053561
0
0
0
0.005269
0.248614
2,526
83
112
30.433735
0.860379
0.247427
0
0.130435
1
0
0.08656
0.052392
0
0
0
0
0
1
0.173913
false
0.23913
0.065217
0
0.391304
0.043478
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
b9db51239c1e9a509c29f6e80aebfb0363b62210
194
py
Python
atcoder/abc191/b.py
sugitanishi/competitive-programming
51af65fdce514ece12f8afbf142b809d63eefb5d
[ "MIT" ]
null
null
null
atcoder/abc191/b.py
sugitanishi/competitive-programming
51af65fdce514ece12f8afbf142b809d63eefb5d
[ "MIT" ]
null
null
null
atcoder/abc191/b.py
sugitanishi/competitive-programming
51af65fdce514ece12f8afbf142b809d63eefb5d
[ "MIT" ]
null
null
null
import sys sys.setrecursionlimit(10000000) input=lambda : sys.stdin.readline().rstrip() n,x=map(int,input().split()) a=list(map(int,input().split())) aa=list(filter(lambda b:b!=x,a)) print(*aa)
24.25
44
0.71134
33
194
4.181818
0.606061
0.086957
0.15942
0.231884
0
0
0
0
0
0
0
0.043716
0.056701
194
8
45
24.25
0.710383
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.142857
0
0.142857
0.142857
0
0
0
null
0
0
1
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
b9dc3713922fc2f091f8ac06b4fabec4e905eb4d
1,647
py
Python
venues/abstract_venue.py
weezel/BandEventNotifier
55824ba26aba9882f46d1770ec5df592a5dc32bc
[ "0BSD" ]
null
null
null
venues/abstract_venue.py
weezel/BandEventNotifier
55824ba26aba9882f46d1770ec5df592a5dc32bc
[ "0BSD" ]
2
2020-02-10T19:37:47.000Z
2020-02-10T19:44:54.000Z
venues/abstract_venue.py
weezel/BandEventNotifier
55824ba26aba9882f46d1770ec5df592a5dc32bc
[ "0BSD" ]
null
null
null
import re from abc import ABC, abstractmethod from typing import Any, Dict, Generator class IncorrectVenueImplementation(Exception): pass # class AbstractVenue(metaclass=ABC): class AbstractVenue(ABC): def __init__(self): self.url = "" self.name = "" self.city = "" self.country = "" self.pricepat_monetary = re.compile("[0-9.,]+.€") self.pricepat_plain = re.compile("[0-9.,]+") def get_venue_name(self) -> str: return self.name def get_city(self) -> str: return self.city def get_country(self) -> str: return self.country def event_sqlentity(self) -> Dict[str, str]: return {"name": self.name, "city": self.city, "country": self.country} def parse_price(self, info_tag: str) -> str: prices_with_mon = self.pricepat_monetary.findall(info_tag) prices = [] for price in prices_with_mon: parsed_price = self.pricepat_plain.findall(price) if len(parsed_price) == 0: continue prices.append("".join(parsed_price)) if len(prices) == 0: return "0€" elif len(prices) == 2: in_advance, from_door = prices[0], prices[1] return f"{in_advance}€/{from_door}€" return "{}€".format("".join(prices)) # FIXME Proper class type checking def __eq__(self, other): return hasattr(other, "url") \ and other.url == self.url @abstractmethod def parse_events(self, data: Any) \ -> Generator[Dict[str, Any], None, None]: pass
27.45
66
0.57377
198
1,647
4.636364
0.348485
0.052288
0.042484
0.055556
0
0
0
0
0
0
0
0.008658
0.298725
1,647
59
67
27.915254
0.781818
0.041287
0
0.045455
0
0
0.042513
0.016497
0
0
0
0.016949
0
1
0.181818
false
0.045455
0.068182
0.113636
0.477273
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
0
0
1
0
0
0
2
b9df48f54330cde291fba9c3ce4e17b22e7c1da1
1,156
py
Python
python/verifair/benchmarks/fairsquare/M_BN_F_SVM_A_Q.py
obastani/verifair
1d5efea041330fa9fe8d59d976bdd3ef97aff417
[ "ECL-2.0", "Apache-2.0" ]
5
2019-11-05T20:40:40.000Z
2020-09-16T03:13:54.000Z
python/verifair/benchmarks/fairsquare/M_BN_F_SVM_A_Q.py
obastani/verifair
1d5efea041330fa9fe8d59d976bdd3ef97aff417
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
python/verifair/benchmarks/fairsquare/M_BN_F_SVM_A_Q.py
obastani/verifair
1d5efea041330fa9fe8d59d976bdd3ef97aff417
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
from .helper import * def sample(flag): sex = step([(0,1,0.3307), (1,2,0.6693)]) if sex < 1: capital_gain = gaussian(568.4105, 24248365.5428) if capital_gain < 7298.0000: age = gaussian(38.4208, 184.9151) capital_loss = gaussian(86.5949, 157731.9553) else: age = gaussian(38.8125, 193.4918) capital_loss = gaussian(117.8083, 252612.0300) else: capital_gain = gaussian(1329.3700, 69327473.1006) if capital_gain < 5178.0000: age = gaussian(38.6361, 187.2435) capital_loss = gaussian(87.0152, 161032.4157) else: age = gaussian(38.2668, 187.2747) capital_loss = gaussian(101.7672, 189798.1926) sensitiveAttribute(sex < 1, flag) qualified(age > 18) N_age = (age - 17.0) / 62.0 N_capital_gain = (capital_gain - 0.0) / 22040.0 N_capital_loss = (capital_loss - 0.0) / 1258.0 t = 0.0006 * N_age + -5.7363 * N_capital_gain + -0.0002 * N_capital_loss + 1.0003 if sex > 1: t = t + -0.0003 if sex < 1: t = t - 0.5 return int(t < 0) fairnessTarget(t < 0)
33.028571
85
0.569204
168
1,156
3.797619
0.452381
0.12069
0.081505
0.053292
0.040752
0.040752
0.040752
0
0
0
0
0.300743
0.301038
1,156
34
86
34
0.488861
0
0
0.16129
0
0
0
0
0
0
0
0
0
1
0.032258
false
0
0.032258
0
0.096774
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
b9e1517b77ef8c0c8643211eb516389a83db60f8
2,608
py
Python
Phase-1/Python Basic 2/Day-24.py
emetowinner/python-challenges
520da69da0f2632deb1e81136d2b62d40555a4aa
[ "MIT" ]
3
2020-05-21T20:19:40.000Z
2022-02-27T08:20:10.000Z
Phase-1/Python Basic 2/Day-24.py
emetowinner/python-challenges
520da69da0f2632deb1e81136d2b62d40555a4aa
[ "MIT" ]
null
null
null
Phase-1/Python Basic 2/Day-24.py
emetowinner/python-challenges
520da69da0f2632deb1e81136d2b62d40555a4aa
[ "MIT" ]
4
2020-05-12T16:41:52.000Z
2020-05-21T20:17:22.000Z
""" 1. Write a Python program to reverse only the vowels of a given string. Sample Output: w3resuorce Python Perl ASU 2. Write a Python program to check whether a given integer is a palindrome or not. Note: An integer is a palindrome when it reads the same backward as forward. Negative numbers are not palindromic. Sample Output: False True False 3. Write a Python program to remove the duplicate elements of a given array of numbers such that each element appear only once and return the new length of the given array. Sample Output: 5 4 4. Write a Python program to calculate the maximum profit from selling and buying values of stock. An array of numbers represent the stock prices in chronological order. For example, given [8, 10, 7, 5, 7, 15], the function will return 10, since the buying value of the stock is 5 dollars and sell value is 15 dollars. Sample Output: 10 7 0 5. Write a Python program to remove all instances of a given value from a given array of integers and find the length of the new array. For example, given [8, 10, 7, 5, 7, 15], the function will return 10, since the buying value of the stock is 5 dollars and sell value is 15 dollars. Sample Output: 6 0 5 0 6. Write a Python program to find the starting and ending position of a given value in a given array of integers, sorted in ascending order. If the target is not found in the array, return [0, 0]. Input: [5, 7, 7, 8, 8, 8] target value = 8 Output: [0, 5] Input: [1, 3, 6, 9, 13, 14] target value = 4 Output: [0, 0] Sample Output: [0, 5] [0, 0] 7. The price of a given stock on each day is stored in an array. Write a Python program to find the maximum profit in one transaction i.e., buy one and sell one share of the stock from the given price value of the said array. You cannot sell a stock before you buy one. Input (Stock price of each day): [224, 236, 247, 258, 259, 225] Output: 35 Explanation: 236 - 224 = 12 247 - 224 = 23 258 - 224 = 34 259 - 224 = 35 225 - 224 = 1 247 - 236 = 11 258 - 236 = 22 259 - 236 = 23 225 - 236 = -11 258 - 247 = 11 259 - 247 = 12 225 - 247 = -22 259 - 258 = 1 225 - 258 = -33 225 - 259 = -34 8. Write a Python program to print a given N by M matrix of numbers line by line in forward > backwards > forward >... order. Input matrix: [[1, 2, 3,4], [5, 6, 7, 8], [0, 6, 2, 8], [2, 3, 0, 2]] Output: 1 2 3 4 8 7 6 5 0 6 2 8 2 0 3 2 9. Write a Python program to compute the largest product of three integers from a given list of integers. Sample Output: 4000 8 120 10. Write a Python program to find the first missing positive integer that does not exist in a given list. """
25.821782
204
0.717408
510
2,608
3.668627
0.290196
0.035275
0.064137
0.10155
0.285943
0.202031
0.173169
0.128274
0.128274
0.128274
0
0.122807
0.21319
2,608
100
205
26.08
0.788986
0.995782
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
b9e1d3ca3ecc29b35600c2af35a03fcf35a771c0
3,413
py
Python
etl/parsers/etw/Microsoft_Windows_IPxlatCfg.py
IMULMUL/etl-parser
76b7c046866ce0469cd129ee3f7bb3799b34e271
[ "Apache-2.0" ]
104
2020-03-04T14:31:31.000Z
2022-03-28T02:59:36.000Z
etl/parsers/etw/Microsoft_Windows_IPxlatCfg.py
IMULMUL/etl-parser
76b7c046866ce0469cd129ee3f7bb3799b34e271
[ "Apache-2.0" ]
7
2020-04-20T09:18:39.000Z
2022-03-19T17:06:19.000Z
etl/parsers/etw/Microsoft_Windows_IPxlatCfg.py
IMULMUL/etl-parser
76b7c046866ce0469cd129ee3f7bb3799b34e271
[ "Apache-2.0" ]
16
2020-03-05T18:55:59.000Z
2022-03-01T10:19:28.000Z
# -*- coding: utf-8 -*- """ Microsoft-Windows-IPxlatCfg GUID : 3e5ac668-af52-4c15-b99b-a3e7a6616ebd """ from construct import Int8sl, Int8ul, Int16ul, Int16sl, Int32sl, Int32ul, Int64sl, Int64ul, Bytes, Double, Float32l, Struct from etl.utils import WString, CString, SystemTime, Guid from etl.dtyp import Sid from etl.parsers.etw.core import Etw, declare, guid @declare(guid=guid("3e5ac668-af52-4c15-b99b-a3e7a6616ebd"), event_id=1001, version=0) class Microsoft_Windows_IPxlatCfg_1001_0(Etw): pattern = Struct( "ErrorString" / CString, "ErrorCode" / Int32ul ) @declare(guid=guid("3e5ac668-af52-4c15-b99b-a3e7a6616ebd"), event_id=1002, version=0) class Microsoft_Windows_IPxlatCfg_1002_0(Etw): pattern = Struct( "ErrorString" / CString, "ErrorCode" / Int32ul, "InterfaceLuid" / Int64ul ) @declare(guid=guid("3e5ac668-af52-4c15-b99b-a3e7a6616ebd"), event_id=1003, version=0) class Microsoft_Windows_IPxlatCfg_1003_0(Etw): pattern = Struct( "InfoString" / CString ) @declare(guid=guid("3e5ac668-af52-4c15-b99b-a3e7a6616ebd"), event_id=1005, version=0) class Microsoft_Windows_IPxlatCfg_1005_0(Etw): pattern = Struct( "IPv4Address" / Int32ul, "IPv4Prefix" / Int32ul ) @declare(guid=guid("3e5ac668-af52-4c15-b99b-a3e7a6616ebd"), event_id=1006, version=0) class Microsoft_Windows_IPxlatCfg_1006_0(Etw): pattern = Struct( "InfoString" / CString, "InterfaceLuid" / Int64ul ) @declare(guid=guid("3e5ac668-af52-4c15-b99b-a3e7a6616ebd"), event_id=1007, version=0) class Microsoft_Windows_IPxlatCfg_1007_0(Etw): pattern = Struct( "InterfaceLuid" / Int64ul, "PrefixLength" / Int32ul ) @declare(guid=guid("3e5ac668-af52-4c15-b99b-a3e7a6616ebd"), event_id=1008, version=0) class Microsoft_Windows_IPxlatCfg_1008_0(Etw): pattern = Struct( "InterfaceLuid" / Int64ul, "IPv4Address" / Int32ul ) @declare(guid=guid("3e5ac668-af52-4c15-b99b-a3e7a6616ebd"), event_id=1009, version=0) class Microsoft_Windows_IPxlatCfg_1009_0(Etw): pattern = Struct( "InterfaceLuid" / Int64ul ) @declare(guid=guid("3e5ac668-af52-4c15-b99b-a3e7a6616ebd"), event_id=1010, version=0) class Microsoft_Windows_IPxlatCfg_1010_0(Etw): pattern = Struct( "InterfaceLuid" / Int64ul ) @declare(guid=guid("3e5ac668-af52-4c15-b99b-a3e7a6616ebd"), event_id=1011, version=0) class Microsoft_Windows_IPxlatCfg_1011_0(Etw): pattern = Struct( "InfoString" / CString, "MTU" / Int32ul ) @declare(guid=guid("3e5ac668-af52-4c15-b99b-a3e7a6616ebd"), event_id=1101, version=0) class Microsoft_Windows_IPxlatCfg_1101_0(Etw): pattern = Struct( "InterfaceLuid" / Int64ul, "Metric" / Int32ul, "RemotePrefixLength" / Int32ul, "LocalPrefixLength" / Int32ul ) @declare(guid=guid("3e5ac668-af52-4c15-b99b-a3e7a6616ebd"), event_id=1102, version=0) class Microsoft_Windows_IPxlatCfg_1102_0(Etw): pattern = Struct( "InterfaceLuid" / Int64ul, "Metric" / Int32ul, "RemotePrefixLength" / Int32ul, "LocalPrefixLength" / Int32ul ) @declare(guid=guid("3e5ac668-af52-4c15-b99b-a3e7a6616ebd"), event_id=1103, version=0) class Microsoft_Windows_IPxlatCfg_1103_0(Etw): pattern = Struct( "InterfaceLuid" / Int64ul, "PrefixLength" / Int32ul )
29.17094
123
0.699092
391
3,413
5.936061
0.173913
0.09651
0.150797
0.120638
0.826368
0.826368
0.53813
0.53813
0.45196
0.45196
0
0.159204
0.175505
3,413
116
124
29.422414
0.665601
0.027542
0
0.404762
0
0
0.240483
0.14139
0
0
0
0
0
1
0
false
0
0.047619
0
0.357143
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
b9e6fcabd0b33c8ba893844382f8413f57f64840
262
py
Python
driver/python/setup.py
wbaweto/QConf
977a53d601eab2055fd8fb344b92f4026d178ad5
[ "BSD-2-Clause" ]
2,056
2015-03-23T04:51:13.000Z
2022-03-20T11:57:36.000Z
driver/python/setup.py
xzz0329/QConf
f852f984de0b55bbca5bcb433a7be5af6383c449
[ "BSD-2-Clause" ]
116
2015-03-25T01:32:39.000Z
2022-02-12T03:21:08.000Z
driver/python/setup.py
xzz0329/QConf
f852f984de0b55bbca5bcb433a7be5af6383c449
[ "BSD-2-Clause" ]
634
2015-03-24T11:51:22.000Z
2022-01-28T04:22:19.000Z
from distutils.core import setup, Extension setup(name = 'qconf_py', version = '1.2.2', ext_modules = [Extension('qconf_py', ['lib/python_qconf.cc'], include_dirs=['/usr/local/include/qconf'], extra_objects=['/usr/local/qconf/lib/libqconf.a'] )])
43.666667
105
0.683206
37
262
4.675676
0.675676
0.080925
0
0
0
0
0
0
0
0
0
0.0131
0.125954
262
5
106
52.4
0.742358
0
0
0
0
0
0.362595
0.209924
0
0
0
0
0
1
0
true
0
0.2
0
0.2
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
1
0
0
0
0
0
0
2
b9ecb48aece2a2ca161d7bba9b3c95a928b2be7f
728
py
Python
scrapyproject/migrations/0003_auto_20170209_1025.py
sap9433/Distributed-Multi-User-Scrapy-System-with-a-Web-UI
0676f7599f288409d0faf7b6211c171ce8c46a7a
[ "MIT" ]
108
2017-03-14T05:40:13.000Z
2022-03-03T12:35:49.000Z
scrapyproject/migrations/0003_auto_20170209_1025.py
sap9433/Distributed-Multi-User-Scrapy-System-with-a-Web-UI
0676f7599f288409d0faf7b6211c171ce8c46a7a
[ "MIT" ]
8
2017-03-14T05:40:13.000Z
2018-10-13T07:07:29.000Z
scrapyproject/migrations/0003_auto_20170209_1025.py
sap9433/Distributed-Multi-User-Scrapy-System-with-a-Web-UI
0676f7599f288409d0faf7b6211c171ce8c46a7a
[ "MIT" ]
43
2017-04-19T12:18:07.000Z
2021-11-25T09:37:17.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('scrapyproject', '0002_auto_20170208_1738'), ] operations = [ migrations.AlterField( model_name='project', name='link_generator', field=models.TextField(blank=True), ), migrations.AlterField( model_name='project', name='scraper_function', field=models.TextField(blank=True), ), migrations.AlterField( model_name='project', name='settings', field=models.TextField(blank=True), ), ]
24.266667
53
0.575549
63
728
6.444444
0.539683
0.147783
0.184729
0.214286
0.509852
0.438424
0.339901
0.339901
0.339901
0.339901
0
0.033865
0.31044
728
29
54
25.103448
0.7749
0.028846
0
0.521739
0
0
0.134752
0.032624
0
0
0
0
0
1
0
false
0
0.086957
0
0.217391
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
b9ef44f166a7664004d3feffe782db268867e247
1,487
py
Python
src/api/bkuser_core/audit/views.py
trueware/bk-user
8c633e0a3821beb839ed120c4514c5733e675862
[ "MIT" ]
null
null
null
src/api/bkuser_core/audit/views.py
trueware/bk-user
8c633e0a3821beb839ed120c4514c5733e675862
[ "MIT" ]
null
null
null
src/api/bkuser_core/audit/views.py
trueware/bk-user
8c633e0a3821beb839ed120c4514c5733e675862
[ "MIT" ]
1
2021-12-31T06:48:41.000Z
2021-12-31T06:48:41.000Z
# -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://opensource.org/licenses/MIT 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 bkuser_core.common.viewset import AdvancedListAPIView, AdvancedModelViewSet from . import serializers as local_serializers from .models import GeneralLog, LogIn, ResetPassword class GeneralLogViewSet(AdvancedModelViewSet, AdvancedListAPIView): queryset = GeneralLog.objects.all() serializer_class = local_serializers.GeneralLogSerializer lookup_field = "id" class LoginLogViewSet(AdvancedModelViewSet, AdvancedListAPIView): queryset = LogIn.objects.all() serializer_class = local_serializers.LoginLogSerializer lookup_field = "id" class ResetPasswordLogViewSet(AdvancedModelViewSet, AdvancedListAPIView): queryset = ResetPassword.objects.all() serializer_class = local_serializers.ResetPasswordLogSerializer lookup_field = "id"
45.060606
115
0.799597
180
1,487
6.544444
0.611111
0.050934
0.119694
0.063667
0.104414
0.104414
0
0
0
0
0
0.008574
0.137189
1,487
32
116
46.46875
0.909587
0.471419
0
0.2
0
0
0.007712
0
0
0
0
0
0
1
0
false
0.266667
0.2
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
b9f15c3b93c89d0226f4f6b8fd7503987d856e88
542
py
Python
gamla/url_utils_test.py
hyroai/gamla
bfa05807685bd51cba7c4c9cc47f1f5e73e6f7ee
[ "MIT" ]
17
2020-03-19T08:40:39.000Z
2022-03-06T14:43:35.000Z
gamla/url_utils_test.py
hyroai/gamla
bfa05807685bd51cba7c4c9cc47f1f5e73e6f7ee
[ "MIT" ]
39
2020-04-13T16:52:43.000Z
2022-03-24T08:30:49.000Z
gamla/url_utils_test.py
uriva/gamla
65b450a7761cbc13bdbc7a4216003932f18cf433
[ "MIT" ]
2
2019-11-13T15:13:51.000Z
2019-12-10T15:19:04.000Z
from gamla import url_utils def test_add_to_query_string1(): assert ( url_utils.add_to_query_string( {"a": 123}, "https://www.domain.com/path?param1=param1#anchor", ) == "https://www.domain.com/path?param1=param1&a=123#anchor" ) def test_add_to_query_string2(): assert ( url_utils.add_to_query_string( {"param1": 123}, "https://www.domain.com/path?param1=param1#anchor", ) == "https://www.domain.com/path?param1=123#anchor" )
24.636364
67
0.586716
69
542
4.362319
0.333333
0.066445
0.13289
0.225914
0.790698
0.677741
0.677741
0.458472
0.458472
0.458472
0
0.055276
0.265683
542
21
68
25.809524
0.701005
0
0
0.352941
0
0
0.372694
0
0
0
0
0
0.117647
1
0.117647
true
0
0.058824
0
0.176471
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
1
0
0
0
0
0
0
2
b9f25a250dce61318cad2d5bfa0bebb70f70d2dc
1,071
py
Python
examples/temp_feie_shetland.py
nilsmkMET/roppy
c68d698fa4970174af2c7f7137bd4a3e5983b644
[ "MIT" ]
null
null
null
examples/temp_feie_shetland.py
nilsmkMET/roppy
c68d698fa4970174af2c7f7137bd4a3e5983b644
[ "MIT" ]
null
null
null
examples/temp_feie_shetland.py
nilsmkMET/roppy
c68d698fa4970174af2c7f7137bd4a3e5983b644
[ "MIT" ]
null
null
null
import numpy as np from netCDF4 import Dataset # Import development version of roppy import sys sys.path = ['..'] + sys.path import roppy # --- EDIT ----------------- # ROMS file romsfile = 'data/ocean_avg_example.nc' # Section definition lon0, lat0 = -0.67, 60.75 # Shetland lon1, lat1 = 4.72, 60.75 # Feie # --- EDIT ------------------ # Make a grid object f = Dataset(romsfile) grd = roppy.SGrid(f) # Get grid coordinates of end points x0, y0 = grd.ll2xy(lon0, lat0) x1, y1 = grd.ll2xy(lon1, lat1) # Find nearest rho-points i0, j0, i1, j1 = [int(round(v)) for v in x0, y0, x1, y1] # Make a Section object sec = roppy.linear_section(i0, i1, j0, j1, grd) # Read in a 3D temperature field temp = f.variables['temp'][0,:,:,:] # Interpolate to the section temp_sec = sec.sample3D(temp) # Compute mean temperature along section # using trapezoidal integration print "mean tempeature = ", np.sum(sec.Area * temp_sec) / np.sum(sec.Area) # TODO: Make a mean method in the Section class # Usage: sec.mean(temp_sec) # or even directly from 3D: sec.mean(temp)
22.787234
74
0.6676
170
1,071
4.170588
0.547059
0.021157
0.022567
0.03385
0
0
0
0
0
0
0
0.05102
0.176471
1,071
46
75
23.282609
0.752834
0.445378
0
0
0
0
0.085217
0.043478
0
0
0
0.021739
0
0
null
null
0
0.235294
null
null
0.058824
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
b9f59c6c5e552b8bde064c8fa9f25427a65b2006
158,531
py
Python
pysnmp-with-texts/InternetThruway-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/InternetThruway-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/InternetThruway-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 InternetThruway-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/InternetThruway-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:58:27 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") ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection", "SingleValueConstraint") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, ObjectIdentity, Counter64, Gauge32, NotificationType, Bits, NotificationType, MibIdentifier, TimeTicks, enterprises, ModuleIdentity, iso, Integer32, Unsigned32, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "ObjectIdentity", "Counter64", "Gauge32", "NotificationType", "Bits", "NotificationType", "MibIdentifier", "TimeTicks", "enterprises", "ModuleIdentity", "iso", "Integer32", "Unsigned32", "Counter32") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") nortel = MibIdentifier((1, 3, 6, 1, 4, 1, 562)) dialaccess = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 14)) csg = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 14, 2)) system = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 14, 2, 1)) components = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 14, 2, 2)) traps = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 14, 2, 3)) alarms = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 14, 2, 4)) ncServer = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 14, 2, 5)) ss7 = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 14, 2, 6)) omData = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 14, 2, 7)) disk = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 14, 2, 1, 1)) linkOMs = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 1)) maintenanceOMs = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 2)) callOMs = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3)) trunkGroupOMs = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4)) phoneNumberOMs = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 5)) systemOMs = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6)) nasOMs = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7)) class TimeString(DisplayString): pass partitionTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 1, 1, 1), ) if mibBuilder.loadTexts: partitionTable.setStatus('mandatory') if mibBuilder.loadTexts: partitionTable.setDescription('The PartitionTable contains information about each disk partition on the CSG') partitionTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 1, 1, 1, 1), ).setIndexNames((0, "InternetThruway-MIB", "partitionIndex")) if mibBuilder.loadTexts: partitionTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: partitionTableEntry.setDescription('An entry in the PartitionTable. Indexed by partitionIndex') class PartitionSpaceStatus(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("spaceAlarmOff", 1), ("spaceAlarmOn", 2)) partitionIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 1, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4))) if mibBuilder.loadTexts: partitionIndex.setStatus('mandatory') if mibBuilder.loadTexts: partitionIndex.setDescription('Identifies partition number.') partitionName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 1, 1, 1, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: partitionName.setStatus('mandatory') if mibBuilder.loadTexts: partitionName.setDescription('Identifies partition name.') partitionPercentFull = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 1, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly") if mibBuilder.loadTexts: partitionPercentFull.setStatus('mandatory') if mibBuilder.loadTexts: partitionPercentFull.setDescription('Indicates (in Percent) how full the disk is.') partitionMegsFree = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 1, 1, 1, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: partitionMegsFree.setStatus('mandatory') if mibBuilder.loadTexts: partitionMegsFree.setDescription('Indicates how many Megabytes are free on the partition.') partitionSpaceStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 1, 1, 1, 1, 5), PartitionSpaceStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: partitionSpaceStatus.setStatus('mandatory') if mibBuilder.loadTexts: partitionSpaceStatus.setDescription('Indicates if there is currently a space alarm in progress.') partitionSpaceKey = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 1, 1, 1, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: partitionSpaceKey.setStatus('mandatory') if mibBuilder.loadTexts: partitionSpaceKey.setDescription('Unique indicator for the partition space alarm.') partitionSpaceTimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 1, 1, 1, 1, 7), TimeString()).setMaxAccess("readonly") if mibBuilder.loadTexts: partitionSpaceTimeStamp.setStatus('mandatory') if mibBuilder.loadTexts: partitionSpaceTimeStamp.setDescription('Indicates the time of the last partitionSpaceStatus transition.') componentTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 2, 10), ) if mibBuilder.loadTexts: componentTable.setStatus('mandatory') if mibBuilder.loadTexts: componentTable.setDescription('The ComponentTable contains information about all the Components that should be running on the CSG.') componentTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 2, 10, 1), ).setIndexNames((0, "InternetThruway-MIB", "componentIndex")) if mibBuilder.loadTexts: componentTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: componentTableEntry.setDescription('An entry in the ComponentTable. componentTable entries are indexed by componentIndex, which is an integer. ') class ComponentIndex(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9)) namedValues = NamedValues(("oolsproxy", 1), ("climan", 2), ("arm", 3), ("sem", 4), ("hgm", 5), ("survman", 6), ("ss7scm", 7), ("ss7opm", 8), ("ss7cheni", 9)) class ComponentSysmanState(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("inProvisionedState", 1), ("notInProvisionedState", 2), ("unknown", 3)) componentIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 2, 10, 1, 1), ComponentIndex()) if mibBuilder.loadTexts: componentIndex.setStatus('mandatory') if mibBuilder.loadTexts: componentIndex.setDescription('Identifies the component entry with an enumerated list.') componentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 2, 10, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: componentName.setStatus('mandatory') if mibBuilder.loadTexts: componentName.setDescription('Identifies component name.') compSecsInCurrentState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 2, 10, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: compSecsInCurrentState.setStatus('mandatory') if mibBuilder.loadTexts: compSecsInCurrentState.setDescription('Indicates how many seconds a component has been running in its current state. ') compProvStateStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 2, 10, 1, 4), ComponentSysmanState()).setMaxAccess("readonly") if mibBuilder.loadTexts: compProvStateStatus.setStatus('mandatory') if mibBuilder.loadTexts: compProvStateStatus.setDescription('Indicates the current state of the particular CSG component. The states are one of the following: inProvisionedState(1), notInProvisionedState(2), unknown(3)') compProvStateKey = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 2, 10, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: compProvStateKey.setStatus('mandatory') if mibBuilder.loadTexts: compProvStateKey.setDescription('Unique indicator for the prov state alarm.') compProvStateTimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 2, 10, 1, 6), TimeString()).setMaxAccess("readonly") if mibBuilder.loadTexts: compProvStateTimeStamp.setStatus('mandatory') if mibBuilder.loadTexts: compProvStateTimeStamp.setDescription('Indicates the time of the last state transition.') compDebugStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 2, 10, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: compDebugStatus.setStatus('mandatory') if mibBuilder.loadTexts: compDebugStatus.setDescription('Shows if the component is running with debug on.') compDebugKey = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 2, 10, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: compDebugKey.setStatus('mandatory') if mibBuilder.loadTexts: compDebugKey.setDescription('Unique indicator for the debug state.') compDebugTimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 2, 10, 1, 9), TimeString()).setMaxAccess("readonly") if mibBuilder.loadTexts: compDebugTimeStamp.setStatus('mandatory') if mibBuilder.loadTexts: compDebugTimeStamp.setDescription('Indicates the time of the last debug transition.') compRestartStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 2, 10, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: compRestartStatus.setStatus('mandatory') if mibBuilder.loadTexts: compRestartStatus.setDescription('Shows if the component has had multiple restarts recently.') compRestartKey = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 2, 10, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: compRestartKey.setStatus('mandatory') if mibBuilder.loadTexts: compRestartKey.setDescription('Unique indicator for the multi-restart of components.') compRestartTimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 2, 10, 1, 12), TimeString()).setMaxAccess("readonly") if mibBuilder.loadTexts: compRestartTimeStamp.setStatus('mandatory') if mibBuilder.loadTexts: compRestartTimeStamp.setDescription('Indicates the time of the last restart flagging.') linksetTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 1), ) if mibBuilder.loadTexts: linksetTable.setStatus('mandatory') if mibBuilder.loadTexts: linksetTable.setDescription('The linksetTable contains information about all the linksets on the CSG.') linksetTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 1, 1), ).setIndexNames((0, "InternetThruway-MIB", "linksetIndex")) if mibBuilder.loadTexts: linksetTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: linksetTableEntry.setDescription('An entry in the linksetTable. Entries in the linkset table are indexed by linksetIndex, which is an integer.') class LinksetState(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("available", 1), ("unAvailable", 2)) linksetIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 1, 1, 1), Integer32()) if mibBuilder.loadTexts: linksetIndex.setStatus('mandatory') if mibBuilder.loadTexts: linksetIndex.setDescription("Identifies the n'th position in the table.") linksetId = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: linksetId.setStatus('mandatory') if mibBuilder.loadTexts: linksetId.setDescription('The id of the linkset to be used as index.') linksetAdjPointcode = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 1, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: linksetAdjPointcode.setStatus('mandatory') if mibBuilder.loadTexts: linksetAdjPointcode.setDescription('The adjacent pointcode of the linkset.') linksetState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 1, 1, 4), LinksetState()).setMaxAccess("readonly") if mibBuilder.loadTexts: linksetState.setStatus('mandatory') if mibBuilder.loadTexts: linksetState.setDescription('The state of the linkset.') linkTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 2), ) if mibBuilder.loadTexts: linkTable.setStatus('mandatory') if mibBuilder.loadTexts: linkTable.setDescription('The linkTable contains information about the links in a given linkset on the CSG.') linkTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 2, 1), ).setIndexNames((0, "InternetThruway-MIB", "linksetIndex"), (0, "InternetThruway-MIB", "linkIndex")) if mibBuilder.loadTexts: linkTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: linkTableEntry.setDescription('An entry in the linkTable. Entries in the link table table are indexed by linksetIndex and linkIndex, which are both integers.') class LinkState(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("available", 1), ("unAvailable", 2)) class LinkInhibitionState(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4)) namedValues = NamedValues(("unInhibited", 1), ("localInhibited", 2), ("remoteInhibited", 3), ("localRemoteInhibited", 4)) class LinkCongestionState(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("notCongested", 1), ("congested", 2)) class LinkAlignmentState(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("aligned", 1), ("notAligned", 2)) linkIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 2, 1, 1), Integer32()) if mibBuilder.loadTexts: linkIndex.setStatus('mandatory') if mibBuilder.loadTexts: linkIndex.setDescription("Identifies the n'th position in the table.") linkId = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkId.setStatus('mandatory') if mibBuilder.loadTexts: linkId.setDescription('The id of the link.') linkHostname = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 2, 1, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkHostname.setStatus('mandatory') if mibBuilder.loadTexts: linkHostname.setDescription('The hostname of the CSG to which this link is attached.') linkCardDeviceName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 2, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkCardDeviceName.setStatus('mandatory') if mibBuilder.loadTexts: linkCardDeviceName.setDescription('The device name of the card upon which this link is hosted.') linkState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 2, 1, 5), LinkState()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkState.setStatus('mandatory') if mibBuilder.loadTexts: linkState.setDescription('The state of the link.') linkInhibitionState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 2, 1, 6), LinkInhibitionState()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkInhibitionState.setStatus('mandatory') if mibBuilder.loadTexts: linkInhibitionState.setDescription('The inhibition status of the link.') linkCongestionState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 2, 1, 7), LinkCongestionState()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkCongestionState.setStatus('mandatory') if mibBuilder.loadTexts: linkCongestionState.setDescription('The congestion status of the link.') linkAlignmentState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 2, 1, 8), LinkAlignmentState()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkAlignmentState.setStatus('mandatory') if mibBuilder.loadTexts: linkAlignmentState.setDescription('The alignment status of the link.') linkNumMSUReceived = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 2, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkNumMSUReceived.setStatus('mandatory') if mibBuilder.loadTexts: linkNumMSUReceived.setDescription("This object supplies the number of MSU's received by the link.") linkNumMSUDiscarded = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 2, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkNumMSUDiscarded.setStatus('mandatory') if mibBuilder.loadTexts: linkNumMSUDiscarded.setDescription("This object supplies the number of received MSU's discarded by the link.") linkNumMSUTransmitted = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 2, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkNumMSUTransmitted.setStatus('mandatory') if mibBuilder.loadTexts: linkNumMSUTransmitted.setDescription("This object supplies the number of MSU's transmitted by the link.") linkNumSIFReceived = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 2, 1, 12), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkNumSIFReceived.setStatus('mandatory') if mibBuilder.loadTexts: linkNumSIFReceived.setDescription('This object supplies the number of SIF and SIO octets received by the link.') linkNumSIFTransmitted = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 2, 1, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkNumSIFTransmitted.setStatus('mandatory') if mibBuilder.loadTexts: linkNumSIFTransmitted.setDescription('This object supplies the number of SIF and SIO octects transmitted by the link.') linkNumAutoChangeovers = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 2, 1, 14), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkNumAutoChangeovers.setStatus('mandatory') if mibBuilder.loadTexts: linkNumAutoChangeovers.setDescription('This object supplies the number of automatic changeovers undergone by the link.') linkNumUnexpectedMsgs = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 2, 1, 15), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkNumUnexpectedMsgs.setStatus('mandatory') if mibBuilder.loadTexts: linkNumUnexpectedMsgs.setDescription('This object supplies the number of unexpected messages received by the link.') routeTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 3), ) if mibBuilder.loadTexts: routeTable.setStatus('mandatory') if mibBuilder.loadTexts: routeTable.setDescription('The routeTable contains information about the routes provisioned in the CSG complex.') routeTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 3, 1), ).setIndexNames((0, "InternetThruway-MIB", "routeIndex")) if mibBuilder.loadTexts: routeTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: routeTableEntry.setDescription('An entry in the routeTable. Entries in the route table are indexed by routeIndex, which is an integer.') class RouteState(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("accessible", 1), ("inaccessible", 2), ("restricted", 3)) routeIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 3, 1, 1), Integer32()) if mibBuilder.loadTexts: routeIndex.setStatus('mandatory') if mibBuilder.loadTexts: routeIndex.setDescription("Identifies the n'th position in the table.") routeId = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 3, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: routeId.setStatus('mandatory') if mibBuilder.loadTexts: routeId.setDescription('The unique identifier of the route.') routeDestPointCode = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 3, 1, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: routeDestPointCode.setStatus('mandatory') if mibBuilder.loadTexts: routeDestPointCode.setDescription('The destination point code associated with this route.') routeState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 3, 1, 4), RouteState()).setMaxAccess("readonly") if mibBuilder.loadTexts: routeState.setStatus('mandatory') if mibBuilder.loadTexts: routeState.setDescription('The current state of the route.') routeRank = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 3, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: routeRank.setStatus('mandatory') if mibBuilder.loadTexts: routeRank.setDescription('Rank assigned to this route.') routeLinksetId = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 3, 1, 6), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: routeLinksetId.setStatus('mandatory') if mibBuilder.loadTexts: routeLinksetId.setDescription('The linkset associated with this route.') destinationTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 4), ) if mibBuilder.loadTexts: destinationTable.setStatus('mandatory') if mibBuilder.loadTexts: destinationTable.setDescription('The destinationTable contains information about the destinations provisioned in the CSG complex.') destinationTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 4, 1), ).setIndexNames((0, "InternetThruway-MIB", "destIndex")) if mibBuilder.loadTexts: destinationTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: destinationTableEntry.setDescription('An entry in the destinationTable. Entries in the destination table are indexed by destIndex, which is an integer.') class DestinationState(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("accessible", 1), ("inaccessible", 2), ("restricted", 3)) destIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 4, 1, 1), Integer32()) if mibBuilder.loadTexts: destIndex.setStatus('mandatory') if mibBuilder.loadTexts: destIndex.setDescription("Identifies the n'th position in the table.") destPointCode = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 4, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: destPointCode.setStatus('mandatory') if mibBuilder.loadTexts: destPointCode.setDescription('The destination point code of this destination.') destState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 4, 1, 3), DestinationState()).setMaxAccess("readonly") if mibBuilder.loadTexts: destState.setStatus('mandatory') if mibBuilder.loadTexts: destState.setDescription('The current state of the destination.') destRuleId = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 6, 4, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: destRuleId.setStatus('mandatory') if mibBuilder.loadTexts: destRuleId.setDescription('Rule Identifier (for the routing table to be used) for this destination.') ncServerId = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 5, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ncServerId.setStatus('mandatory') if mibBuilder.loadTexts: ncServerId.setDescription(' The ServerId attribute value of the node.') ncServerName = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 5, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: ncServerName.setStatus('mandatory') if mibBuilder.loadTexts: ncServerName.setDescription(' The ServerName attribute value of the node.') ncHostName = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 5, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: ncHostName.setStatus('mandatory') if mibBuilder.loadTexts: ncHostName.setDescription(' The HostName attribute value of the node.') ncEthernetName = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 5, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: ncEthernetName.setStatus('mandatory') if mibBuilder.loadTexts: ncEthernetName.setDescription(' The EthernetName attribute value of the node.') ncEthernetIP = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 5, 6), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: ncEthernetIP.setStatus('mandatory') if mibBuilder.loadTexts: ncEthernetIP.setDescription(' The EthernetIP attribute value of the node.') ncClusterName = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 5, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: ncClusterName.setStatus('mandatory') if mibBuilder.loadTexts: ncClusterName.setDescription(' The ClusterName attribute value of the node.') ncClusterIP = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 5, 8), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: ncClusterIP.setStatus('mandatory') if mibBuilder.loadTexts: ncClusterIP.setDescription(' The ClusterIP attribute value of the node.') ncOperationalState = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 5, 9), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: ncOperationalState.setStatus('mandatory') if mibBuilder.loadTexts: ncOperationalState.setDescription(' The OperationalState of the node. Possible values are: UNKNOWN, ENABLED, ENABLED_NETDSC, ENABLED_NETPAR, DISABLED ') ncStandbyState = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 5, 10), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: ncStandbyState.setStatus('mandatory') if mibBuilder.loadTexts: ncStandbyState.setDescription(' The StandbyState attribute value of the node. Possible values are: UNKNOWN, HOT_STANDBY, COLD_STANDBY, WARM_STANDBY, PROVIDING_SERVICE ') ncAvailabilityState = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 5, 11), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: ncAvailabilityState.setStatus('mandatory') if mibBuilder.loadTexts: ncAvailabilityState.setDescription(' The AvailabilityState attribute value of the node. Possible values are: UNKNOWN, AVAILABLE, DEGRADED, OFFLINE ') ncSoftwareVersion = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 5, 12), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: ncSoftwareVersion.setStatus('mandatory') if mibBuilder.loadTexts: ncSoftwareVersion.setDescription(' The SoftwareVersion attribute value of the node.') class UpgradeInProgress(Integer32): subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 2) ncUpgradeInProgress = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 5, 13), UpgradeInProgress()).setMaxAccess("readonly") if mibBuilder.loadTexts: ncUpgradeInProgress.setStatus('mandatory') if mibBuilder.loadTexts: ncUpgradeInProgress.setDescription(' The UpgradeInProgress attribute value of the node. Possible values are: 0 = UNKNOWN, 1 = ACTIVE, 2 = INACTIVE ') hgAlarmTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 10), ) if mibBuilder.loadTexts: hgAlarmTable.setStatus('mandatory') if mibBuilder.loadTexts: hgAlarmTable.setDescription('The HgAlarmTable contains information about all the current HG alarms') hgAlarmTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 10, 1), ).setIndexNames((0, "InternetThruway-MIB", "hgIndex")) if mibBuilder.loadTexts: hgAlarmTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: hgAlarmTableEntry.setDescription('An entry in the HgAlarmTable. HgAlarmTable entries are indexed by componentIndex, which is an integer.') hgIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 10, 1, 1), Integer32()) if mibBuilder.loadTexts: hgIndex.setStatus('mandatory') if mibBuilder.loadTexts: hgIndex.setDescription("Identifies the n'th position in the table.") hgName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 10, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hgName.setStatus('mandatory') if mibBuilder.loadTexts: hgName.setDescription('The Home gateway to be used as index') hgKey = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 10, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hgKey.setStatus('mandatory') if mibBuilder.loadTexts: hgKey.setDescription('Unique identifier for the HgFailure alarm ') hgAlarmTimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 10, 1, 4), TimeString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hgAlarmTimeStamp.setStatus('mandatory') if mibBuilder.loadTexts: hgAlarmTimeStamp.setDescription('Indicates the time of the HG Alarm.') hgIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 10, 1, 5), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: hgIPAddress.setStatus('mandatory') if mibBuilder.loadTexts: hgIPAddress.setDescription('This object identifies the IP Address of the machine which sent the alarm.') nasAlarmTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 11), ) if mibBuilder.loadTexts: nasAlarmTable.setStatus('mandatory') if mibBuilder.loadTexts: nasAlarmTable.setDescription('The NasAlarmTable contains information about all the current NAS alarms') nasAlarmTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 11, 1), ).setIndexNames((0, "InternetThruway-MIB", "nasIndex")) if mibBuilder.loadTexts: nasAlarmTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: nasAlarmTableEntry.setDescription('An entry in the NasAlarmTable. NasAlarmTable entries are indexed by nasIndex, which is an integer.') nasIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 11, 1, 1), Integer32()) if mibBuilder.loadTexts: nasIndex.setStatus('mandatory') if mibBuilder.loadTexts: nasIndex.setDescription("Identifies the n'th position in the table.") nasName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 11, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasName.setStatus('mandatory') if mibBuilder.loadTexts: nasName.setDescription('The NAS Name') nasKey = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 11, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasKey.setStatus('mandatory') if mibBuilder.loadTexts: nasKey.setDescription('Unique identifier for the NAS Failure alarm ') nasAlarmTimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 11, 1, 4), TimeString()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasAlarmTimeStamp.setStatus('mandatory') if mibBuilder.loadTexts: nasAlarmTimeStamp.setDescription('Indicates the time of the NAS Alarm.') nasIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 11, 1, 5), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasIPAddress.setStatus('mandatory') if mibBuilder.loadTexts: nasIPAddress.setDescription('This object identifies the IP Address of the machine which sent the alarm.') nasCmplxName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 11, 1, 6), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasCmplxName.setStatus('mandatory') if mibBuilder.loadTexts: nasCmplxName.setDescription(' The complex which this alarm is raised against.') ss7LinkFailureAlarmTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 12), ) if mibBuilder.loadTexts: ss7LinkFailureAlarmTable.setStatus('mandatory') if mibBuilder.loadTexts: ss7LinkFailureAlarmTable.setDescription('The SS7LinkFailureAlarmTable contains alarms for SS7 link failures.') ss7LinkFailureAlarmTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 12, 1), ).setIndexNames((0, "InternetThruway-MIB", "lfIndex")) if mibBuilder.loadTexts: ss7LinkFailureAlarmTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: ss7LinkFailureAlarmTableEntry.setDescription('This object defines a row within the SS7 Link Failure Alarm Table. A row can be uniquely identified with the row index.') lfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 12, 1, 1), Integer32()) if mibBuilder.loadTexts: lfIndex.setStatus('mandatory') if mibBuilder.loadTexts: lfIndex.setDescription('Identifies the row number in the table.') lfKey = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 12, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: lfKey.setStatus('mandatory') if mibBuilder.loadTexts: lfKey.setDescription('Unique identifier for the alarm.') lfIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 12, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: lfIPAddress.setStatus('mandatory') if mibBuilder.loadTexts: lfIPAddress.setDescription('This object identifies the IP Address of the machine which sent the alarm.') lfLinkCode = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 12, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: lfLinkCode.setStatus('mandatory') if mibBuilder.loadTexts: lfLinkCode.setDescription('This object identifies the signalling link code (SLC) of the failed link.') lfTimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 12, 1, 6), TimeString()).setMaxAccess("readonly") if mibBuilder.loadTexts: lfTimeStamp.setStatus('mandatory') if mibBuilder.loadTexts: lfTimeStamp.setDescription('Indicates the time of the alarm.') lfName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 12, 1, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: lfName.setStatus('mandatory') if mibBuilder.loadTexts: lfName.setDescription('Indicates the configured name for the machine which sent the alarm.') lfCardId = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 12, 1, 8), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: lfCardId.setStatus('mandatory') if mibBuilder.loadTexts: lfCardId.setDescription('This object identifies the device that hosts the failed link. It provides a physical description of the device, as well as its slot number.') lfLinkSet = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 12, 1, 9), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: lfLinkSet.setStatus('mandatory') if mibBuilder.loadTexts: lfLinkSet.setDescription('This object identifies the linkset associated with the link via its adjacent point code.') ss7LinkCongestionAlarmTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 13), ) if mibBuilder.loadTexts: ss7LinkCongestionAlarmTable.setStatus('mandatory') if mibBuilder.loadTexts: ss7LinkCongestionAlarmTable.setDescription('The SS7LinkCongestionAlarmTable contains alarms to indicate congestion on an SS7 link.') ss7LinkCongestionAlarmTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 13, 1), ).setIndexNames((0, "InternetThruway-MIB", "lcIndex")) if mibBuilder.loadTexts: ss7LinkCongestionAlarmTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: ss7LinkCongestionAlarmTableEntry.setDescription('This object defines a row within the SS7 Link Congestion Alarm Table. A row can be uniquely identified with the row index.') lcIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 13, 1, 1), Integer32()) if mibBuilder.loadTexts: lcIndex.setStatus('mandatory') if mibBuilder.loadTexts: lcIndex.setDescription('Identifies the row number in the table.') lcKey = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 13, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: lcKey.setStatus('mandatory') if mibBuilder.loadTexts: lcKey.setDescription('Unique identifier for the alarm.') lcIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 13, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: lcIPAddress.setStatus('mandatory') if mibBuilder.loadTexts: lcIPAddress.setDescription('This object identifies the IP Address of the machine which sent the alarm.') lcLinkCode = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 13, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: lcLinkCode.setStatus('mandatory') if mibBuilder.loadTexts: lcLinkCode.setDescription('This object identifies the signalling link code (SLC) of the affected link.') lcTimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 13, 1, 5), TimeString()).setMaxAccess("readonly") if mibBuilder.loadTexts: lcTimeStamp.setStatus('mandatory') if mibBuilder.loadTexts: lcTimeStamp.setDescription('Indicates the time of the alarm.') lcName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 13, 1, 6), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: lcName.setStatus('mandatory') if mibBuilder.loadTexts: lcName.setDescription('Indicates the configured name for the machine which sent the alarm.') lcCardId = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 13, 1, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: lcCardId.setStatus('mandatory') if mibBuilder.loadTexts: lcCardId.setDescription('This object identifies the device that hosts the failed link. It provides a physical description of the device, as well as its slot number.') lcLinkSet = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 13, 1, 8), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: lcLinkSet.setStatus('mandatory') if mibBuilder.loadTexts: lcLinkSet.setDescription('This object identifies the linkset associated with the link via its adjacent point code.') ss7ISUPFailureAlarmTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 14), ) if mibBuilder.loadTexts: ss7ISUPFailureAlarmTable.setStatus('mandatory') if mibBuilder.loadTexts: ss7ISUPFailureAlarmTable.setDescription('The SS7ISUPFailureAlarmTable contains alarms for SS7 ISUP protocol stack failures.') ss7ISUPFailureAlarmTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 14, 1), ).setIndexNames((0, "InternetThruway-MIB", "ifIndex")) if mibBuilder.loadTexts: ss7ISUPFailureAlarmTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: ss7ISUPFailureAlarmTableEntry.setDescription('This object defines a row within the SS7 ISUP Failure Alarm Table. A row can be uniquely identified with the row index.') ifIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 14, 1, 1), Integer32()) if mibBuilder.loadTexts: ifIndex.setStatus('mandatory') if mibBuilder.loadTexts: ifIndex.setDescription('Identifies the row number in the table.') ifKey = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 14, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifKey.setStatus('mandatory') if mibBuilder.loadTexts: ifKey.setDescription('Unique identifier for the alarm.') ifIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 14, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifIPAddress.setStatus('mandatory') if mibBuilder.loadTexts: ifIPAddress.setDescription('This object identifies the IP Address of the machine which sent the alarm.') ifTimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 14, 1, 4), TimeString()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifTimeStamp.setStatus('mandatory') if mibBuilder.loadTexts: ifTimeStamp.setDescription('Indicates the time of the alarm.') ifName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 14, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifName.setStatus('mandatory') if mibBuilder.loadTexts: ifName.setDescription('Indicates the configured name for the machine which sent the alarm.') ss7ISUPCongestionAlarmTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 15), ) if mibBuilder.loadTexts: ss7ISUPCongestionAlarmTable.setStatus('mandatory') if mibBuilder.loadTexts: ss7ISUPCongestionAlarmTable.setDescription('The SS7ISUPCongestionAlarmTable contains alarms to indicate congestion with an ISUP protocol stack.') ss7ISUPCongestionAlarmTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 15, 1), ).setIndexNames((0, "InternetThruway-MIB", "icIndex")) if mibBuilder.loadTexts: ss7ISUPCongestionAlarmTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: ss7ISUPCongestionAlarmTableEntry.setDescription('This object defines a row within the SS7 ISUP Congestion Alarm Table. A row can be uniquely identified with the row index.') icIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 15, 1, 1), Integer32()) if mibBuilder.loadTexts: icIndex.setStatus('mandatory') if mibBuilder.loadTexts: icIndex.setDescription('Identifies the row number in the table.') icKey = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 15, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icKey.setStatus('mandatory') if mibBuilder.loadTexts: icKey.setDescription('Unique identifier for the alarm.') icIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 15, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: icIPAddress.setStatus('mandatory') if mibBuilder.loadTexts: icIPAddress.setDescription('This object identifies the IP Address of the machine which sent the alarm.') icCongestionLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 15, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icCongestionLevel.setStatus('mandatory') if mibBuilder.loadTexts: icCongestionLevel.setDescription('This object indicates the congestion level with an ISUP protocol stack. Possible congestion levels are: (0) Normal (1) Congestion ') icTimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 15, 1, 5), TimeString()).setMaxAccess("readonly") if mibBuilder.loadTexts: icTimeStamp.setStatus('mandatory') if mibBuilder.loadTexts: icTimeStamp.setDescription('Indicates the time of the alarm.') icName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 15, 1, 6), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: icName.setStatus('mandatory') if mibBuilder.loadTexts: icName.setDescription('Indicates the configured name for the machine which sent the alarm.') ss7MTP3CongestionAlarmTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 16), ) if mibBuilder.loadTexts: ss7MTP3CongestionAlarmTable.setStatus('mandatory') if mibBuilder.loadTexts: ss7MTP3CongestionAlarmTable.setDescription('The SS7MTP3CongestionAlarmTable contains alarms to indicate congestion on an MTP3 link.') ss7MTP3CongestionAlarmTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 16, 1), ).setIndexNames((0, "InternetThruway-MIB", "mtp3Index")) if mibBuilder.loadTexts: ss7MTP3CongestionAlarmTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: ss7MTP3CongestionAlarmTableEntry.setDescription('This object defines a row within the SS7 MTP3 Congestion Alarm Table. A row can be uniquely identified with the row index.') mtp3Index = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 16, 1, 1), Integer32()) if mibBuilder.loadTexts: mtp3Index.setStatus('mandatory') if mibBuilder.loadTexts: mtp3Index.setDescription('Identifies the row number in the table.') mtp3Key = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 16, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mtp3Key.setStatus('mandatory') if mibBuilder.loadTexts: mtp3Key.setDescription('Unique identifier for the alarm.') mtp3IPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 16, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: mtp3IPAddress.setStatus('mandatory') if mibBuilder.loadTexts: mtp3IPAddress.setDescription('This object identifies the IP Address of the machine which sent the alarm.') mtp3CongestionLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 16, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mtp3CongestionLevel.setStatus('mandatory') if mibBuilder.loadTexts: mtp3CongestionLevel.setDescription('This object indicates the congestion level on a problem SS7 Link. Possible congestion values are: (0) Normal (1) Minor (2) Major (3) Critical ') mtp3TimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 16, 1, 5), TimeString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mtp3TimeStamp.setStatus('mandatory') if mibBuilder.loadTexts: mtp3TimeStamp.setDescription('Indicates the time of the alarm.') mtp3Name = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 16, 1, 6), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mtp3Name.setStatus('mandatory') if mibBuilder.loadTexts: mtp3Name.setDescription('Represents the configured name of the machine which sent the alarm.') ss7MTP2TrunkFailureAlarmTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 17), ) if mibBuilder.loadTexts: ss7MTP2TrunkFailureAlarmTable.setStatus('mandatory') if mibBuilder.loadTexts: ss7MTP2TrunkFailureAlarmTable.setDescription('The SS7MTP2TrunkFailureAlarmTable contains alarms to indicate MTP2 trunk failures.') ss7MTP2TrunkFailureAlarmTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 17, 1), ).setIndexNames((0, "InternetThruway-MIB", "mtp2Index")) if mibBuilder.loadTexts: ss7MTP2TrunkFailureAlarmTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: ss7MTP2TrunkFailureAlarmTableEntry.setDescription('This object defines a row within the SS7 MTP2 Failure Alarm Table. A row can be uniquely identified with the row index.') class MTP2AlarmConditionType(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6)) namedValues = NamedValues(("fasError", 1), ("carrierLost", 2), ("synchroLost", 3), ("aisRcv", 4), ("remoteAlarmRcv", 5), ("tooHighBer", 6)) mtp2Index = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 17, 1, 1), Integer32()) if mibBuilder.loadTexts: mtp2Index.setStatus('mandatory') if mibBuilder.loadTexts: mtp2Index.setDescription('Identifies the row number in the table.') mtp2Key = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 17, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mtp2Key.setStatus('mandatory') if mibBuilder.loadTexts: mtp2Key.setDescription('Unique identifier for the alarm.') mtp2IPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 17, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: mtp2IPAddress.setStatus('mandatory') if mibBuilder.loadTexts: mtp2IPAddress.setDescription('This object identifies the IP Address of the machine which sent the alarm.') mtp2Name = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 17, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mtp2Name.setStatus('mandatory') if mibBuilder.loadTexts: mtp2Name.setDescription('This object identifies the configured name of the machine which sent the alarm.') mtp2CardId = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 17, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mtp2CardId.setStatus('mandatory') if mibBuilder.loadTexts: mtp2CardId.setDescription('This object indicates the device upon which the affected trunk is hosted. The string contains a physical description of the device, as well as its slot number.') mtp2AlarmCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 17, 1, 6), MTP2AlarmConditionType()).setMaxAccess("readonly") if mibBuilder.loadTexts: mtp2AlarmCondition.setStatus('mandatory') if mibBuilder.loadTexts: mtp2AlarmCondition.setDescription('This object indicates which of the possible alarm conditions is in effect. Alarms are not nested: a new alarm is only reported if there is no current alarm condition.') mtp2TimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 17, 1, 7), TimeString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mtp2TimeStamp.setStatus('mandatory') if mibBuilder.loadTexts: mtp2TimeStamp.setDescription('Indicates the time of the alarm.') ss7LinksetFailureAlarmTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 18), ) if mibBuilder.loadTexts: ss7LinksetFailureAlarmTable.setStatus('mandatory') if mibBuilder.loadTexts: ss7LinksetFailureAlarmTable.setDescription('The SS7LinksetFailureAlarmTable contains alarms to indicate failure on an CSG linkset.') ss7LinksetFailureAlarmTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 18, 1), ).setIndexNames((0, "InternetThruway-MIB", "lsFailureIndex")) if mibBuilder.loadTexts: ss7LinksetFailureAlarmTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: ss7LinksetFailureAlarmTableEntry.setDescription('This object defines a row within the SS7 Linkset Failure Alarm Table. A row can be uniquely identified with the row index.') lsFailureIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 18, 1, 1), Integer32()) if mibBuilder.loadTexts: lsFailureIndex.setStatus('mandatory') if mibBuilder.loadTexts: lsFailureIndex.setDescription('Identifies the row number in the table.') lsFailureKey = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 18, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: lsFailureKey.setStatus('mandatory') if mibBuilder.loadTexts: lsFailureKey.setDescription('Unique identifier for the alarm.') lsFailureIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 18, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: lsFailureIPAddress.setStatus('mandatory') if mibBuilder.loadTexts: lsFailureIPAddress.setDescription('This object identifies the IP Address of the machine which sent the alarm.') lsFailureName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 18, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: lsFailureName.setStatus('mandatory') if mibBuilder.loadTexts: lsFailureName.setDescription('Represents the configured name of the machine which sent the alarm.') lsFailurePointcode = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 18, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: lsFailurePointcode.setStatus('mandatory') if mibBuilder.loadTexts: lsFailurePointcode.setDescription('This object indicates the pointcode associated with the linkset.') lsFailureTimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 18, 1, 6), TimeString()).setMaxAccess("readonly") if mibBuilder.loadTexts: lsFailureTimeStamp.setStatus('mandatory') if mibBuilder.loadTexts: lsFailureTimeStamp.setDescription('Indicates the time of the alarm.') ss7DestinationInaccessibleAlarmTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 19), ) if mibBuilder.loadTexts: ss7DestinationInaccessibleAlarmTable.setStatus('mandatory') if mibBuilder.loadTexts: ss7DestinationInaccessibleAlarmTable.setDescription('The SS7DestinationAccessAlarmTable contains alarms which indicate inaccessible signalling destinations.') ss7DestinationInaccessibleAlarmTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 19, 1), ).setIndexNames((0, "InternetThruway-MIB", "destInaccessIndex")) if mibBuilder.loadTexts: ss7DestinationInaccessibleAlarmTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: ss7DestinationInaccessibleAlarmTableEntry.setDescription('This object defines a row within the SS7 Destination Inaccessible Alarm Table. A row can be uniquely identified with the row index.') destInaccessIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 19, 1, 1), Integer32()) if mibBuilder.loadTexts: destInaccessIndex.setStatus('mandatory') if mibBuilder.loadTexts: destInaccessIndex.setDescription('Identifies the row number in the table.') destInaccessKey = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 19, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: destInaccessKey.setStatus('mandatory') if mibBuilder.loadTexts: destInaccessKey.setDescription('Unique identifier for the alarm.') destInaccessIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 19, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: destInaccessIPAddress.setStatus('mandatory') if mibBuilder.loadTexts: destInaccessIPAddress.setDescription('This object identifies the IP Address of the machine which sent the alarm.') destInaccessName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 19, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: destInaccessName.setStatus('mandatory') if mibBuilder.loadTexts: destInaccessName.setDescription('Represents the configured name of the machine which sent the alarm.') destInaccessPointcode = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 19, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: destInaccessPointcode.setStatus('mandatory') if mibBuilder.loadTexts: destInaccessPointcode.setDescription('This object indicates the point code of the inaccessible signalling destination.') destInaccessTimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 19, 1, 6), TimeString()).setMaxAccess("readonly") if mibBuilder.loadTexts: destInaccessTimeStamp.setStatus('mandatory') if mibBuilder.loadTexts: destInaccessTimeStamp.setDescription('Indicates the time of the alarm.') ss7DestinationCongestedAlarmTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 20), ) if mibBuilder.loadTexts: ss7DestinationCongestedAlarmTable.setStatus('mandatory') if mibBuilder.loadTexts: ss7DestinationCongestedAlarmTable.setDescription('The SS7DestinationCongestedAlarmTable contains alarms to indicate congestion on the given destination.') ss7DestinationCongestedAlarmTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 20, 1), ).setIndexNames((0, "InternetThruway-MIB", "destCongestIndex")) if mibBuilder.loadTexts: ss7DestinationCongestedAlarmTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: ss7DestinationCongestedAlarmTableEntry.setDescription('This object defines a row within the SS7 Destination Congestion Table. A row can be uniquely identified with the row index.') destCongestIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 20, 1, 1), Integer32()) if mibBuilder.loadTexts: destCongestIndex.setStatus('mandatory') if mibBuilder.loadTexts: destCongestIndex.setDescription('Identifies the row number in the table.') destCongestKey = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 20, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: destCongestKey.setStatus('mandatory') if mibBuilder.loadTexts: destCongestKey.setDescription('Unique identifier for the alarm.') destCongestIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 20, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: destCongestIPAddress.setStatus('mandatory') if mibBuilder.loadTexts: destCongestIPAddress.setDescription('This object identifies the IP Address of the machine which sent the alarm.') destCongestName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 20, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: destCongestName.setStatus('mandatory') if mibBuilder.loadTexts: destCongestName.setDescription('Represents the configured name of the machine which sent the alarm.') destCongestPointcode = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 20, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: destCongestPointcode.setStatus('mandatory') if mibBuilder.loadTexts: destCongestPointcode.setDescription('This object indicates the pointcode of the congested destination.') destCongestCongestionLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 20, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: destCongestCongestionLevel.setStatus('mandatory') if mibBuilder.loadTexts: destCongestCongestionLevel.setDescription('This object indicates the congestion level on a problem SS7 pointcode. Possible congestion values are: (0) Normal (1) Minor (2) Major (3) Critical ') destCongestTimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 20, 1, 7), TimeString()).setMaxAccess("readonly") if mibBuilder.loadTexts: destCongestTimeStamp.setStatus('mandatory') if mibBuilder.loadTexts: destCongestTimeStamp.setDescription('Indicates the time of the alarm.') ss7LinkAlignmentAlarmTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 21), ) if mibBuilder.loadTexts: ss7LinkAlignmentAlarmTable.setStatus('mandatory') if mibBuilder.loadTexts: ss7LinkAlignmentAlarmTable.setDescription('The SS7LinkAlignmentAlarmTable contains alarms to indicate congestion on the CSG.') ss7LinkAlignmentAlarmTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 21, 1), ).setIndexNames((0, "InternetThruway-MIB", "linkAlignIndex")) if mibBuilder.loadTexts: ss7LinkAlignmentAlarmTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: ss7LinkAlignmentAlarmTableEntry.setDescription('This object defines a row within the SS7 Link Alignment Alarm Table. A row can be uniquely identified with the row index.') linkAlignIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 21, 1, 1), Integer32()) if mibBuilder.loadTexts: linkAlignIndex.setStatus('mandatory') if mibBuilder.loadTexts: linkAlignIndex.setDescription('Identifies the row number in the table.') linkAlignKey = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 21, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkAlignKey.setStatus('mandatory') if mibBuilder.loadTexts: linkAlignKey.setDescription('Unique identifier for the alarm.') linkAlignIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 21, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkAlignIPAddress.setStatus('mandatory') if mibBuilder.loadTexts: linkAlignIPAddress.setDescription('This object identifies the IP Address of the machine which sent the alarm.') linkAlignName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 21, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkAlignName.setStatus('mandatory') if mibBuilder.loadTexts: linkAlignName.setDescription('Represents the configured name of the machine which sent the alarm.') linkAlignLinkCode = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 21, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkAlignLinkCode.setStatus('mandatory') if mibBuilder.loadTexts: linkAlignLinkCode.setDescription('This object identifies the signalling link code (SLC) of the affected link.') linkAlignTimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 21, 1, 6), TimeString()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkAlignTimeStamp.setStatus('mandatory') if mibBuilder.loadTexts: linkAlignTimeStamp.setDescription('Indicates the time of the alarm.') linkAlignCardId = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 21, 1, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkAlignCardId.setStatus('mandatory') if mibBuilder.loadTexts: linkAlignCardId.setDescription('This object identifies the device that hosts the failed link. It provides a physical description of the device, as well as its slot number.') linkAlignLinkSet = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 21, 1, 8), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkAlignLinkSet.setStatus('mandatory') if mibBuilder.loadTexts: linkAlignLinkSet.setDescription('This object identifies the linkset associated with the link via its adjacent point code.') csgComplexStateTrapInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 22)) cplxName = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 22, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cplxName.setStatus('mandatory') if mibBuilder.loadTexts: cplxName.setDescription('CLLI, A unique identifier of the CSG Complex.') cplxLocEthernetName = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 22, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cplxLocEthernetName.setStatus('mandatory') if mibBuilder.loadTexts: cplxLocEthernetName.setDescription(' The EthernetName attribute value of the node.') cplxLocEthernetIP = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 22, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cplxLocEthernetIP.setStatus('mandatory') if mibBuilder.loadTexts: cplxLocEthernetIP.setDescription(' The EthernetIP attribute value of the node.') cplxLocOperationalState = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 22, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cplxLocOperationalState.setStatus('mandatory') if mibBuilder.loadTexts: cplxLocOperationalState.setDescription(' The OperationalState of the node. Possible values are: UNKNOWN, ENABLED, ENABLED_NETDSC, ENABLED_NETPAR, DISABLED ') cplxLocStandbyState = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 22, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cplxLocStandbyState.setStatus('mandatory') if mibBuilder.loadTexts: cplxLocStandbyState.setDescription(' The StandbyState attribute value of the node. Possible values are: UNKNOWN, HOT_STANDBY, COLD_STANDBY, WARM_STANDBY, PROVIDING_SERVICE ') cplxLocAvailabilityState = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 22, 6), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cplxLocAvailabilityState.setStatus('mandatory') if mibBuilder.loadTexts: cplxLocAvailabilityState.setDescription(' The AvailabilityState attribute value of the node. Possible values are: UNKNOWN, AVAILABLE, DEGRADED, OFFLINE ') cplxMateEthernetName = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 22, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cplxMateEthernetName.setStatus('mandatory') if mibBuilder.loadTexts: cplxMateEthernetName.setDescription(' The EthernetName attribute value of the mate node.') cplxMateEthernetIP = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 22, 8), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cplxMateEthernetIP.setStatus('mandatory') if mibBuilder.loadTexts: cplxMateEthernetIP.setDescription(' The EthernetIP attribute value of the mate node.') cplxMateOperationalState = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 22, 9), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cplxMateOperationalState.setStatus('mandatory') if mibBuilder.loadTexts: cplxMateOperationalState.setDescription(' The OperationalState of the mate node. Possible values are: UNKNOWN, ENABLED, ENABLED_NETDSC, ENABLED_NETPAR, DISABLED ') cplxMateStandbyState = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 22, 10), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cplxMateStandbyState.setStatus('mandatory') if mibBuilder.loadTexts: cplxMateStandbyState.setDescription(' The StandbyState attribute value of the mate node. Possible values are: UNKNOWN, HOT_STANDBY, COLD_STANDBY, WARM_STANDBY, PROVIDING_SERVICE ') cplxMateAvailabilityState = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 22, 11), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cplxMateAvailabilityState.setStatus('mandatory') if mibBuilder.loadTexts: cplxMateAvailabilityState.setDescription(' The AvailabilityState attribute value of the mate node. Possible values are: UNKNOWN, AVAILABLE, DEGRADED, OFFLINE ') cplxAlarmStatus = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 22, 12), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cplxAlarmStatus.setStatus('mandatory') if mibBuilder.loadTexts: cplxAlarmStatus.setDescription('This object indicates the alarm status of the CSG Complex. Possible status are: NORMAL, MAJOR, CRITICAL ') lostServerAlarmTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 5, 1), ) if mibBuilder.loadTexts: lostServerAlarmTable.setStatus('mandatory') if mibBuilder.loadTexts: lostServerAlarmTable.setDescription('') lostServerAlarmTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 5, 1, 1), ).setIndexNames((0, "InternetThruway-MIB", "lsIndex")) if mibBuilder.loadTexts: lostServerAlarmTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: lostServerAlarmTableEntry.setDescription('This object defines a row within the Lost Server Alarm Table. A row can be uniquely identified with the row index.') lsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 5, 1, 1, 1), Integer32()) if mibBuilder.loadTexts: lsIndex.setStatus('mandatory') if mibBuilder.loadTexts: lsIndex.setDescription('Identifies the row number in the table.') lsKey = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 5, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: lsKey.setStatus('mandatory') if mibBuilder.loadTexts: lsKey.setDescription('Unique identifier for the alarm.') lsIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 5, 1, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: lsIPAddress.setStatus('mandatory') if mibBuilder.loadTexts: lsIPAddress.setDescription('This object identifies the IP Address of the machine which is lost.') lsName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 5, 1, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: lsName.setStatus('mandatory') if mibBuilder.loadTexts: lsName.setDescription('The configured name associated with the IP Address of the machine which sent the alarm.') lsTimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 5, 1, 1, 5), TimeString()).setMaxAccess("readonly") if mibBuilder.loadTexts: lsTimeStamp.setStatus('mandatory') if mibBuilder.loadTexts: lsTimeStamp.setDescription('Indicates the time of the alarm.') alarmMaskInt1 = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 1), Gauge32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: alarmMaskInt1.setStatus('mandatory') if mibBuilder.loadTexts: alarmMaskInt1.setDescription('The value of this bit mask reflects the current filtering policy of CSG events and alarms. Management stations which wish to not receive certain events or alarm types from the CSG can modify this value as needed. Note, however, that changes in the filtration policy affect what is received by all management stations. Initially, the bit mask is set so that all bits are in a false state. Each bit in a true state reflects a currently filtered event, alarm, or alarm type. The actual bit position meanings are given below. Bit 0 is LSB. Bits 0 = Generic Normal Alarm 1 = Generic Warning Alarm 2 = Generic Minor Alarm 3 = Generic Major Alarm 4 = Generic Critical Alarm 5 = Partition Space Alarm 6 = Home Gateway Failure Alarm 7 = Component Not In Provisioned State Alarm 8 = Component Debug On Alarm 9 = Component Multiple Restart Alarm 10 = Component Restart Warning 11 = NAS Registration Failure Warning 12 = NAS Failure Alarm 13 = File Deletion Warning 14 = File Backup Warning 15 = Sysman Restart Warning 16 = File Access Warning 17 = Home Gateway/NAS Provisioning Mismatch Warning 18 = SS7 Link Failure Alarm 19 = SS7 Link Congestion Alarm 20 = ISUP Failure Alarm 21 = ISUP Congestion Alarm 22 = SS7 FEP Congestion Alarm 23 = SS7 BEP Congestion Alarm 24 = High Availability Peer Contact Lost Alarm 25 = SS7 MTP3 Congestion Alarm 26 = SS7 MTP2 Trunk Failure Alarm 27 = SS7 Linkset Failure Alarm 28 = SS7 Destination Inaccessible Alarm 29 = SS7 Destination Congested Alarm 30 = SS7 Link Alignment Failure Alarm ') alarmStatusInt1 = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 2), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alarmStatusInt1.setStatus('mandatory') if mibBuilder.loadTexts: alarmStatusInt1.setDescription('The value of this bit mask indicates that current status of CSG component alarms. Each components is represented by a single bit within the range occupied by each component alarm type. Each bit in a true state reflects a currently raised alarm. The actual bit position meanings are given below. Bit 0 is the LSB. Bits 0-15 = Component Not In Provisioned State Alarm 16-31 = Component Multi Restart Alarm ') alarmStatusInt2 = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 3), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alarmStatusInt2.setStatus('mandatory') if mibBuilder.loadTexts: alarmStatusInt2.setDescription('The value of this bit mask indicates the current status of active CSG alarms. Component-related alarms occupy a range of bits: each bit within that range represents the alarm status for a particular component. Each bit in a true state reflects a currently raised alarm. The actual bit position meanings are given below. Bit 0 is the LSB. Bits 0-15 = Component Debug On Alarm 16-23 = Partition Space Alarm 24 = Home Gateway Failure Alarm 25 = NAS Failure Alarm 26 = SS7 Link Failure Alarm 27 = SS7 Link Congestion Alarm 28 = ISUP Failure Alarm 29 = ISUP Congestion Alarm 30 = High Availability Peer Contact Lost Alarm 31 = SS7 MTP3 Congestion Alarm ') alarmStatusInt3 = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 4), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alarmStatusInt3.setStatus('mandatory') if mibBuilder.loadTexts: alarmStatusInt3.setDescription('The value of this bit mask indicates the current status of active CSG alarms. Each bit in a true state reflects a currently raised alarm. The actual bit position meanings are given below. Bit 0 is the LSB. Bits 0 = SS7 MTP2 Trunk Failure Alarm 1 = SS7 Linkset Failure Alarm 2 = SS7 Destination Inaccessible Alarm 3 = SS7 Destination Congestion Alarm 4 = SS7 Link Alignment Failure Alarm 5 = CSG Complex Status Alarm 6 = External Ethernet Alarm ') alarmMaskInt2 = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 4, 5), Gauge32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: alarmMaskInt2.setStatus('mandatory') if mibBuilder.loadTexts: alarmMaskInt2.setDescription('The value of this bit mask reflects the current additional filtering policy of CSG events and alarms. Management stations which wish to not receive certain events or alarm types from the CSG can modify this value as needed. Note, however, that changes in the filtration policy affect what is received by all management stations. Initially, the bit mask is set so that all bits are in a false state. Each bit in a true state reflects a currently filtered event, alarm, or alarm type. The actual bit position meanings are given below. Bit 0 is LSB. Bits 0 = External Ethernet Alarm 1 = Cluster Information retrieval Alarm ') trapCompName = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 3, 1), DisplayString()) if mibBuilder.loadTexts: trapCompName.setStatus('mandatory') if mibBuilder.loadTexts: trapCompName.setDescription('OID for the Component name.') trapFileName = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 3, 2), DisplayString()) if mibBuilder.loadTexts: trapFileName.setStatus('mandatory') if mibBuilder.loadTexts: trapFileName.setDescription('OID for file Name.') trapDate = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 3, 3), TimeString()) if mibBuilder.loadTexts: trapDate.setStatus('mandatory') if mibBuilder.loadTexts: trapDate.setDescription('OID for the date.') trapGenericStr1 = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 3, 4), DisplayString()) if mibBuilder.loadTexts: trapGenericStr1.setStatus('mandatory') if mibBuilder.loadTexts: trapGenericStr1.setDescription('OID for the generic data.') trapIdKey = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 3, 5), Integer32()) if mibBuilder.loadTexts: trapIdKey.setStatus('mandatory') if mibBuilder.loadTexts: trapIdKey.setDescription('OID for the identification key.') trapIPAddress = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 3, 6), IpAddress()) if mibBuilder.loadTexts: trapIPAddress.setStatus('mandatory') if mibBuilder.loadTexts: trapIPAddress.setDescription('OID for IP address.') trapName = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 3, 7), DisplayString()) if mibBuilder.loadTexts: trapName.setStatus('mandatory') if mibBuilder.loadTexts: trapName.setDescription('OID for configured name associated with an IpAddress.') trapTimeStamp = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 3, 8), DisplayString()) if mibBuilder.loadTexts: trapTimeStamp.setStatus('mandatory') if mibBuilder.loadTexts: trapTimeStamp.setDescription('Indicates the time at which the alarm occurred.') diskSpaceClear = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,1001)).setObjects(("InternetThruway-MIB", "partitionSpaceKey"), ("InternetThruway-MIB", "partitionIndex"), ("InternetThruway-MIB", "partitionName"), ("InternetThruway-MIB", "partitionPercentFull"), ("InternetThruway-MIB", "partitionSpaceTimeStamp")) if mibBuilder.loadTexts: diskSpaceClear.setDescription('The Trap generated when a disk partition has a space increase after a previously sent DiskSpaceAlarm.') diskSpaceAlarm = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,1004)).setObjects(("InternetThruway-MIB", "partitionSpaceKey"), ("InternetThruway-MIB", "partitionIndex"), ("InternetThruway-MIB", "partitionName"), ("InternetThruway-MIB", "partitionPercentFull"), ("InternetThruway-MIB", "partitionSpaceTimeStamp")) if mibBuilder.loadTexts: diskSpaceAlarm.setDescription('The Trap generated when a disk partition is running out of space provisioned state.') etherCardTrapClear = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,1011)) if mibBuilder.loadTexts: etherCardTrapClear.setDescription(' The Trap generated when the external ethernet card becomes available.') etherCardTrapMajor = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,1014)) if mibBuilder.loadTexts: etherCardTrapMajor.setDescription('The Trap generated when the external ethernet card is down.') etherCardTrapCritical = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,1015)) if mibBuilder.loadTexts: etherCardTrapCritical.setDescription('The Trap generated when the external ethernet card is down.') compDebugOff = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,2001)).setObjects(("InternetThruway-MIB", "compDebugKey"), ("InternetThruway-MIB", "componentIndex"), ("InternetThruway-MIB", "componentName"), ("InternetThruway-MIB", "compDebugTimeStamp")) if mibBuilder.loadTexts: compDebugOff.setDescription('The Trap generated when a Component turns off its debug info.') compDebugOn = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,2002)).setObjects(("InternetThruway-MIB", "compDebugKey"), ("InternetThruway-MIB", "componentIndex"), ("InternetThruway-MIB", "componentName"), ("InternetThruway-MIB", "compDebugTimeStamp")) if mibBuilder.loadTexts: compDebugOn.setDescription('The Trap generated when a Component turns on its debug info.') compStateClear = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,2011)).setObjects(("InternetThruway-MIB", "compProvStateKey"), ("InternetThruway-MIB", "componentIndex"), ("InternetThruway-MIB", "componentName"), ("InternetThruway-MIB", "compProvStateStatus"), ("InternetThruway-MIB", "compSecsInCurrentState"), ("InternetThruway-MIB", "compProvStateTimeStamp")) if mibBuilder.loadTexts: compStateClear.setDescription('The Trap generated when a component goes to its provisioned states after a CompStatusAlarm trap has been sent.') compStateAlarm = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,2014)).setObjects(("InternetThruway-MIB", "compProvStateKey"), ("InternetThruway-MIB", "componentIndex"), ("InternetThruway-MIB", "componentName"), ("InternetThruway-MIB", "compProvStateStatus"), ("InternetThruway-MIB", "compSecsInCurrentState"), ("InternetThruway-MIB", "compProvStateTimeStamp")) if mibBuilder.loadTexts: compStateAlarm.setDescription("The Trap generated when a component is not in it's provisioned state.") restartStateClear = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,2021)).setObjects(("InternetThruway-MIB", "compRestartKey"), ("InternetThruway-MIB", "componentIndex"), ("InternetThruway-MIB", "componentName"), ("InternetThruway-MIB", "compRestartStatus"), ("InternetThruway-MIB", "compRestartTimeStamp")) if mibBuilder.loadTexts: restartStateClear.setDescription('The Trap generated when a component goes to its provisioned states after a RestartStateAlarm trap has been sent.') restartStateAlarm = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,2024)).setObjects(("InternetThruway-MIB", "compRestartKey"), ("InternetThruway-MIB", "componentIndex"), ("InternetThruway-MIB", "componentName"), ("InternetThruway-MIB", "compRestartStatus"), ("InternetThruway-MIB", "compRestartTimeStamp")) if mibBuilder.loadTexts: restartStateAlarm.setDescription('The Trap generated when a component restarts repeatedly.') ss7LinkFailureAlarm = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3004)).setObjects(("InternetThruway-MIB", "lfIndex"), ("InternetThruway-MIB", "lfKey"), ("InternetThruway-MIB", "lfIPAddress"), ("InternetThruway-MIB", "lfLinkCode"), ("InternetThruway-MIB", "lfName"), ("InternetThruway-MIB", "lfCardId"), ("InternetThruway-MIB", "lfLinkSet"), ("InternetThruway-MIB", "lfTimeStamp")) if mibBuilder.loadTexts: ss7LinkFailureAlarm.setDescription('Trap generated for an SS7 link failure.') ss7LinkFailureClear = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3001)).setObjects(("InternetThruway-MIB", "lfIndex"), ("InternetThruway-MIB", "lfKey"), ("InternetThruway-MIB", "lfIPAddress"), ("InternetThruway-MIB", "lfLinkCode"), ("InternetThruway-MIB", "lfName"), ("InternetThruway-MIB", "lfCardId"), ("InternetThruway-MIB", "lfLinkSet"), ("InternetThruway-MIB", "lfTimeStamp")) if mibBuilder.loadTexts: ss7LinkFailureClear.setDescription('Trap generated to clear an SS7 link failure.') ss7LinkCongestionAlarm = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3012)).setObjects(("InternetThruway-MIB", "lcIndex"), ("InternetThruway-MIB", "lcKey"), ("InternetThruway-MIB", "lcIPAddress"), ("InternetThruway-MIB", "lcLinkCode"), ("InternetThruway-MIB", "lcName"), ("InternetThruway-MIB", "lcCardId"), ("InternetThruway-MIB", "lcLinkSet"), ("InternetThruway-MIB", "lcTimeStamp")) if mibBuilder.loadTexts: ss7LinkCongestionAlarm.setDescription('Trap generated for congestion on an SS7 Link.') ss7LinkCongestionClear = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3011)).setObjects(("InternetThruway-MIB", "lcIndex"), ("InternetThruway-MIB", "lcKey"), ("InternetThruway-MIB", "lcIPAddress"), ("InternetThruway-MIB", "lcLinkCode"), ("InternetThruway-MIB", "lcName"), ("InternetThruway-MIB", "lcCardId"), ("InternetThruway-MIB", "lcLinkSet"), ("InternetThruway-MIB", "lcTimeStamp")) if mibBuilder.loadTexts: ss7LinkCongestionClear.setDescription('Trap generated to indicate there is no longer congestion on an SS7 link.') ss7ISUPFailureAlarm = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3025)).setObjects(("InternetThruway-MIB", "ifIndex"), ("InternetThruway-MIB", "ifKey"), ("InternetThruway-MIB", "ifIPAddress"), ("InternetThruway-MIB", "ifName"), ("InternetThruway-MIB", "ifTimeStamp")) if mibBuilder.loadTexts: ss7ISUPFailureAlarm.setDescription('Trap generated to indicate ISUP failure.') ss7ISUPFailureClear = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3021)).setObjects(("InternetThruway-MIB", "ifIndex"), ("InternetThruway-MIB", "ifKey"), ("InternetThruway-MIB", "ifIPAddress"), ("InternetThruway-MIB", "ifName"), ("InternetThruway-MIB", "ifTimeStamp")) if mibBuilder.loadTexts: ss7ISUPFailureClear.setDescription('Trap generated to clear an ISUP failure alarm.') ss7ISUPCongestionAlarm = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3033)).setObjects(("InternetThruway-MIB", "icIndex"), ("InternetThruway-MIB", "icKey"), ("InternetThruway-MIB", "icIPAddress"), ("InternetThruway-MIB", "icCongestionLevel"), ("InternetThruway-MIB", "icName"), ("InternetThruway-MIB", "icTimeStamp")) if mibBuilder.loadTexts: ss7ISUPCongestionAlarm.setDescription('Trap generated to indicate congestion with the ISUP protocol stack.') ss7ISUPCongestionClear = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3031)).setObjects(("InternetThruway-MIB", "icIndex"), ("InternetThruway-MIB", "icKey"), ("InternetThruway-MIB", "icIPAddress"), ("InternetThruway-MIB", "icCongestionLevel"), ("InternetThruway-MIB", "icName"), ("InternetThruway-MIB", "icTimeStamp")) if mibBuilder.loadTexts: ss7ISUPCongestionClear.setDescription('Trap generated to indicate there is no longer congestion with the ISUP protocol stack.') ss7FEPCongestionWarning = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3042)).setObjects(("InternetThruway-MIB", "trapIdKey"), ("InternetThruway-MIB", "trapIPAddress"), ("InternetThruway-MIB", "trapName"), ("InternetThruway-MIB", "trapTimeStamp")) if mibBuilder.loadTexts: ss7FEPCongestionWarning.setDescription('Notification trap generated to indicate congestion encountered by the SS7 front-end process.') ss7BEPCongestionWarning = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3052)).setObjects(("InternetThruway-MIB", "trapIdKey"), ("InternetThruway-MIB", "trapIPAddress"), ("InternetThruway-MIB", "trapName"), ("InternetThruway-MIB", "trapTimeStamp")) if mibBuilder.loadTexts: ss7BEPCongestionWarning.setDescription('Notification trap generated to indicate congestion encountered by the SS7 back-end process.') ss7MTP3CongestionMinor = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3063)).setObjects(("InternetThruway-MIB", "mtp3Index"), ("InternetThruway-MIB", "mtp3Key"), ("InternetThruway-MIB", "mtp3IPAddress"), ("InternetThruway-MIB", "mtp3Name"), ("InternetThruway-MIB", "mtp3TimeStamp")) if mibBuilder.loadTexts: ss7MTP3CongestionMinor.setDescription('Trap generated for MTP3 congestion.') ss7MTP3CongestionMajor = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3064)).setObjects(("InternetThruway-MIB", "mtp3Index"), ("InternetThruway-MIB", "mtp3Key"), ("InternetThruway-MIB", "mtp3IPAddress"), ("InternetThruway-MIB", "mtp3Name"), ("InternetThruway-MIB", "mtp3TimeStamp")) if mibBuilder.loadTexts: ss7MTP3CongestionMajor.setDescription('Trap generated for MTP3 congestion.') ss7MTP3CongestionCritical = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3065)).setObjects(("InternetThruway-MIB", "mtp3Index"), ("InternetThruway-MIB", "mtp3Key"), ("InternetThruway-MIB", "mtp3IPAddress"), ("InternetThruway-MIB", "mtp3Name"), ("InternetThruway-MIB", "mtp3TimeStamp")) if mibBuilder.loadTexts: ss7MTP3CongestionCritical.setDescription('Trap generated for MTP3 congestion.') ss7MTP3CongestionClear = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3061)).setObjects(("InternetThruway-MIB", "mtp3Index"), ("InternetThruway-MIB", "mtp3Key"), ("InternetThruway-MIB", "mtp3IPAddress"), ("InternetThruway-MIB", "mtp3Name"), ("InternetThruway-MIB", "mtp3TimeStamp")) if mibBuilder.loadTexts: ss7MTP3CongestionClear.setDescription('Trap generated to indicate there is no longer MTP3 congestion.') ss7MTP2TrunkFailureAlarm = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3075)).setObjects(("InternetThruway-MIB", "mtp2Index"), ("InternetThruway-MIB", "mtp2Key"), ("InternetThruway-MIB", "mtp2IPAddress"), ("InternetThruway-MIB", "mtp2Name"), ("InternetThruway-MIB", "mtp2CardId"), ("InternetThruway-MIB", "mtp2AlarmCondition"), ("InternetThruway-MIB", "mtp2TimeStamp")) if mibBuilder.loadTexts: ss7MTP2TrunkFailureAlarm.setDescription('Trap generated to indicate an MTP2 trunk failure condition.') ss7MTP2TrunkFailureClear = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3071)).setObjects(("InternetThruway-MIB", "mtp2Index"), ("InternetThruway-MIB", "mtp2Key"), ("InternetThruway-MIB", "mtp2IPAddress"), ("InternetThruway-MIB", "mtp2Name"), ("InternetThruway-MIB", "mtp2CardId"), ("InternetThruway-MIB", "mtp2TimeStamp")) if mibBuilder.loadTexts: ss7MTP2TrunkFailureClear.setDescription('Trap generated to clear an MTP2 trunk failure alarm.') ss7LinksetFailureAlarm = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3085)).setObjects(("InternetThruway-MIB", "lsFailureIndex"), ("InternetThruway-MIB", "lsFailureKey"), ("InternetThruway-MIB", "lsFailureIPAddress"), ("InternetThruway-MIB", "lsFailureName"), ("InternetThruway-MIB", "lsFailurePointcode"), ("InternetThruway-MIB", "lsFailureTimeStamp")) if mibBuilder.loadTexts: ss7LinksetFailureAlarm.setDescription('Trap generated to indicate a linkset failure.') ss7LinksetFailureClear = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3081)).setObjects(("InternetThruway-MIB", "lsFailureIndex"), ("InternetThruway-MIB", "lsFailureKey"), ("InternetThruway-MIB", "lsFailureIPAddress"), ("InternetThruway-MIB", "lsFailureName"), ("InternetThruway-MIB", "lsFailurePointcode"), ("InternetThruway-MIB", "lsFailureTimeStamp")) if mibBuilder.loadTexts: ss7LinksetFailureClear.setDescription('Trap generated to clear a linkset failure alarm.') ss7DestinationInaccessible = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3092)).setObjects(("InternetThruway-MIB", "destInaccessIndex"), ("InternetThruway-MIB", "destInaccessKey"), ("InternetThruway-MIB", "destInaccessIPAddress"), ("InternetThruway-MIB", "destInaccessName"), ("InternetThruway-MIB", "destInaccessPointcode"), ("InternetThruway-MIB", "destInaccessTimeStamp")) if mibBuilder.loadTexts: ss7DestinationInaccessible.setDescription('Trap generated to indicate that a signalling destination is inaccessible. A destination is considered inaccessible once Transfer Prohibited (TFP) messages are received which indicate that the route to that destination is prohibited.') ss7DestinationAccessible = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3091)).setObjects(("InternetThruway-MIB", "destInaccessIndex"), ("InternetThruway-MIB", "destInaccessKey"), ("InternetThruway-MIB", "destInaccessIPAddress"), ("InternetThruway-MIB", "destInaccessName"), ("InternetThruway-MIB", "destInaccessPointcode"), ("InternetThruway-MIB", "destInaccessTimeStamp")) if mibBuilder.loadTexts: ss7DestinationAccessible.setDescription('Trap generated to clear a destination inacessible alarm. An inaccessible signalling destination is considered accessible once Transfer Allowed (TFA) messages are sent along its prohibited signalling routes.') ss7DestinationCongestedAlarm = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3103)).setObjects(("InternetThruway-MIB", "destCongestIndex"), ("InternetThruway-MIB", "destCongestKey"), ("InternetThruway-MIB", "destCongestIPAddress"), ("InternetThruway-MIB", "destCongestName"), ("InternetThruway-MIB", "destCongestPointcode"), ("InternetThruway-MIB", "destCongestCongestionLevel"), ("InternetThruway-MIB", "destCongestTimeStamp")) if mibBuilder.loadTexts: ss7DestinationCongestedAlarm.setDescription('Trap generated to indicate congestion at an SS7 destination.') ss7DestinationCongestedClear = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3101)).setObjects(("InternetThruway-MIB", "destCongestIndex"), ("InternetThruway-MIB", "destCongestKey"), ("InternetThruway-MIB", "destCongestIPAddress"), ("InternetThruway-MIB", "destCongestName"), ("InternetThruway-MIB", "destCongestPointcode"), ("InternetThruway-MIB", "destCongestCongestionLevel"), ("InternetThruway-MIB", "destCongestTimeStamp")) if mibBuilder.loadTexts: ss7DestinationCongestedClear.setDescription('Trap generated to indicate that there is no longer congestion at an SS7 destination.') ss7LinkAlignmentFailureAlarm = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3114)).setObjects(("InternetThruway-MIB", "linkAlignIndex"), ("InternetThruway-MIB", "linkAlignKey"), ("InternetThruway-MIB", "linkAlignIPAddress"), ("InternetThruway-MIB", "linkAlignName"), ("InternetThruway-MIB", "linkAlignLinkCode"), ("InternetThruway-MIB", "linkAlignCardId"), ("InternetThruway-MIB", "linkAlignLinkSet"), ("InternetThruway-MIB", "linkAlignTimeStamp")) if mibBuilder.loadTexts: ss7LinkAlignmentFailureAlarm.setDescription('Trap generated to indicate alignment failure on a datalink.') ss7LinkAlignmentFailureClear = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,3111)).setObjects(("InternetThruway-MIB", "linkAlignIndex"), ("InternetThruway-MIB", "linkAlignKey"), ("InternetThruway-MIB", "linkAlignIPAddress"), ("InternetThruway-MIB", "linkAlignName"), ("InternetThruway-MIB", "linkAlignLinkCode"), ("InternetThruway-MIB", "linkAlignCardId"), ("InternetThruway-MIB", "linkAlignLinkSet"), ("InternetThruway-MIB", "linkAlignTimeStamp")) if mibBuilder.loadTexts: ss7LinkAlignmentFailureClear.setDescription('Trap generated to clear a datalink alignment failure alarm.') ncLostServerTrap = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,4014)).setObjects(("InternetThruway-MIB", "lsIndex"), ("InternetThruway-MIB", "lsKey"), ("InternetThruway-MIB", "lsName"), ("InternetThruway-MIB", "lsIPAddress"), ("InternetThruway-MIB", "lsTimeStamp")) if mibBuilder.loadTexts: ncLostServerTrap.setDescription('This trap is generated when the CSG loses contact with its peer in the cluster. The variables in this trap identify the server that has been lost. The originator of this trap is implicitly defined.') ncFoundServerTrap = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,4011)).setObjects(("InternetThruway-MIB", "lsIndex"), ("InternetThruway-MIB", "lsKey"), ("InternetThruway-MIB", "lsName"), ("InternetThruway-MIB", "lsIPAddress"), ("InternetThruway-MIB", "lsTimeStamp")) if mibBuilder.loadTexts: ncFoundServerTrap.setDescription('This trap is generated when the initially comes into contact with or regains contact with its peer in the cluster. The variables in this trap identify the server that has been found. The originator of this trap is implicitly defined.') ncStateChangeTrap = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,4022)).setObjects(("InternetThruway-MIB", "ncEthernetName"), ("InternetThruway-MIB", "ncEthernetIP"), ("InternetThruway-MIB", "ncOperationalState"), ("InternetThruway-MIB", "ncStandbyState"), ("InternetThruway-MIB", "ncAvailabilityState")) if mibBuilder.loadTexts: ncStateChangeTrap.setDescription('This trap is generated when any of the state values change.') csgComplexStateTrapClear = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,4031)).setObjects(("InternetThruway-MIB", "cplxName"), ("InternetThruway-MIB", "cplxLocEthernetName"), ("InternetThruway-MIB", "cplxLocEthernetIP"), ("InternetThruway-MIB", "cplxLocOperationalState"), ("InternetThruway-MIB", "cplxLocStandbyState"), ("InternetThruway-MIB", "cplxLocAvailabilityState"), ("InternetThruway-MIB", "cplxMateEthernetName"), ("InternetThruway-MIB", "cplxMateEthernetIP"), ("InternetThruway-MIB", "cplxMateOperationalState"), ("InternetThruway-MIB", "cplxMateStandbyState"), ("InternetThruway-MIB", "cplxMateAvailabilityState"), ("InternetThruway-MIB", "cplxAlarmStatus")) if mibBuilder.loadTexts: csgComplexStateTrapClear.setDescription('This trap is generated when any of the state values change Severity is determined only by the operational and standby states of both servers.') csgComplexStateTrapMajor = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,4034)).setObjects(("InternetThruway-MIB", "cplxName"), ("InternetThruway-MIB", "cplxLocEthernetName"), ("InternetThruway-MIB", "cplxLocEthernetIP"), ("InternetThruway-MIB", "cplxLocOperationalState"), ("InternetThruway-MIB", "cplxLocStandbyState"), ("InternetThruway-MIB", "cplxLocAvailabilityState"), ("InternetThruway-MIB", "cplxMateEthernetName"), ("InternetThruway-MIB", "cplxMateEthernetIP"), ("InternetThruway-MIB", "cplxMateOperationalState"), ("InternetThruway-MIB", "cplxMateStandbyState"), ("InternetThruway-MIB", "cplxMateAvailabilityState"), ("InternetThruway-MIB", "cplxAlarmStatus")) if mibBuilder.loadTexts: csgComplexStateTrapMajor.setDescription('This trap is generated when any of the state values change Severity is determined only by the operational and standby states of both servers.') csgComplexStateTrapCritical = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,4035)).setObjects(("InternetThruway-MIB", "cplxName"), ("InternetThruway-MIB", "cplxLocEthernetName"), ("InternetThruway-MIB", "cplxLocEthernetIP"), ("InternetThruway-MIB", "cplxLocOperationalState"), ("InternetThruway-MIB", "cplxLocStandbyState"), ("InternetThruway-MIB", "cplxLocAvailabilityState"), ("InternetThruway-MIB", "cplxMateEthernetName"), ("InternetThruway-MIB", "cplxMateEthernetIP"), ("InternetThruway-MIB", "cplxMateOperationalState"), ("InternetThruway-MIB", "cplxMateStandbyState"), ("InternetThruway-MIB", "cplxMateAvailabilityState"), ("InternetThruway-MIB", "cplxAlarmStatus")) if mibBuilder.loadTexts: csgComplexStateTrapCritical.setDescription('This trap is generated when any of the state values change Severity is determined only by the operational and standby states of both servers.') cisRetrievalFailureTrapMajor = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,4044)) if mibBuilder.loadTexts: cisRetrievalFailureTrapMajor.setDescription('This trap is generated when the TruCluster ASE information retrieval attempts failed repeatedly. ') genericNormal = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,9001)).setObjects(("InternetThruway-MIB", "trapIdKey"), ("InternetThruway-MIB", "trapGenericStr1"), ("InternetThruway-MIB", "trapTimeStamp")) if mibBuilder.loadTexts: genericNormal.setDescription('The Trap generated for generic normal priority text messages') genericWarning = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,9002)).setObjects(("InternetThruway-MIB", "trapIdKey"), ("InternetThruway-MIB", "trapGenericStr1"), ("InternetThruway-MIB", "trapTimeStamp")) if mibBuilder.loadTexts: genericWarning.setDescription('The Trap generated for generic warning priority text messages') genericMinor = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,9003)).setObjects(("InternetThruway-MIB", "trapIdKey"), ("InternetThruway-MIB", "trapGenericStr1"), ("InternetThruway-MIB", "trapTimeStamp")) if mibBuilder.loadTexts: genericMinor.setDescription('The Trap generated for generic minor priority text messages') genericMajor = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,9004)).setObjects(("InternetThruway-MIB", "trapIdKey"), ("InternetThruway-MIB", "trapGenericStr1"), ("InternetThruway-MIB", "trapTimeStamp")) if mibBuilder.loadTexts: genericMajor.setDescription('The Trap generated for generic major priority text messages') genericCritical = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,9005)).setObjects(("InternetThruway-MIB", "trapIdKey"), ("InternetThruway-MIB", "trapGenericStr1"), ("InternetThruway-MIB", "trapTimeStamp")) if mibBuilder.loadTexts: genericCritical.setDescription('The Trap generated for generic critical priority text messages') hgStatusClear = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,9011)).setObjects(("InternetThruway-MIB", "hgKey"), ("InternetThruway-MIB", "hgIndex"), ("InternetThruway-MIB", "hgName"), ("InternetThruway-MIB", "hgIPAddress"), ("InternetThruway-MIB", "hgAlarmTimeStamp")) if mibBuilder.loadTexts: hgStatusClear.setDescription('The Trap generated when a Home Gateway Status returns to normal after having previously been in the failed status.') hgStatusAlarm = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,9014)).setObjects(("InternetThruway-MIB", "hgKey"), ("InternetThruway-MIB", "hgIndex"), ("InternetThruway-MIB", "hgName"), ("InternetThruway-MIB", "hgIPAddress"), ("InternetThruway-MIB", "hgAlarmTimeStamp")) if mibBuilder.loadTexts: hgStatusAlarm.setDescription('The Trap generated when a Home Gateway is indicated to be failed.') nasStatusClear = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,9021)).setObjects(("InternetThruway-MIB", "nasKey"), ("InternetThruway-MIB", "nasIndex"), ("InternetThruway-MIB", "nasName"), ("InternetThruway-MIB", "nasIPAddress"), ("InternetThruway-MIB", "nasAlarmTimeStamp"), ("InternetThruway-MIB", "nasCmplxName")) if mibBuilder.loadTexts: nasStatusClear.setDescription('The Trap generated when a rapport registers after having previously been in the failed status.') nasStatusAlarm = NotificationType((1, 3, 6, 1, 4, 1, 562, 14, 2, 3) + (0,9024)).setObjects(("InternetThruway-MIB", "nasKey"), ("InternetThruway-MIB", "nasIndex"), ("InternetThruway-MIB", "nasName"), ("InternetThruway-MIB", "nasIPAddress"), ("InternetThruway-MIB", "nasAlarmTimeStamp"), ("InternetThruway-MIB", "nasCmplxName")) if mibBuilder.loadTexts: nasStatusAlarm.setDescription('The Trap generated when a Nas is indicated to be failed.') linkOMTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 1, 1), ) if mibBuilder.loadTexts: linkOMTable.setStatus('mandatory') if mibBuilder.loadTexts: linkOMTable.setDescription('The LinkTable contains information about each signaling link on the CSG') linkOMTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 1, 1, 1), ).setIndexNames((0, "InternetThruway-MIB", "linksetIndex"), (0, "InternetThruway-MIB", "linkIndex")) if mibBuilder.loadTexts: linkOMTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: linkOMTableEntry.setDescription('An entry in the LinkTable. Indexed by linkIndex') linkOMId = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 1, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkOMId.setStatus('mandatory') if mibBuilder.loadTexts: linkOMId.setDescription('The id of the link.') linkOMSetId = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 1, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkOMSetId.setStatus('mandatory') if mibBuilder.loadTexts: linkOMSetId.setDescription('The id of the linkset.') linkFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 1, 1, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkFailures.setStatus('mandatory') if mibBuilder.loadTexts: linkFailures.setDescription('Number of times this signaling link has failed.') linkCongestions = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 1, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkCongestions.setStatus('mandatory') if mibBuilder.loadTexts: linkCongestions.setDescription('Number of times this signaling link has Congested.') linkInhibits = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 1, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkInhibits.setStatus('mandatory') if mibBuilder.loadTexts: linkInhibits.setDescription('Number of times this signaling link has been inhibited.') linkTransmittedMSUs = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 1, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkTransmittedMSUs.setStatus('mandatory') if mibBuilder.loadTexts: linkTransmittedMSUs.setDescription('Number of messages sent on this signaling link.') linkReceivedMSUs = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 1, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkReceivedMSUs.setStatus('mandatory') if mibBuilder.loadTexts: linkReceivedMSUs.setDescription('Number of messages received on this signaling link.') linkRemoteProcOutages = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 1, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: linkRemoteProcOutages.setStatus('mandatory') if mibBuilder.loadTexts: linkRemoteProcOutages.setDescription('Number of times the remote processor outgaes have been reported.') bLATimerExpiries = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 2, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: bLATimerExpiries.setStatus('mandatory') if mibBuilder.loadTexts: bLATimerExpiries.setDescription('Number of times the BLA timer has expired.') rLCTimerExpiries = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 2, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rLCTimerExpiries.setStatus('mandatory') if mibBuilder.loadTexts: rLCTimerExpiries.setDescription('Number of times the RLC timer has expired.') uBATimerExpiries = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 2, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: uBATimerExpiries.setStatus('mandatory') if mibBuilder.loadTexts: uBATimerExpiries.setDescription('Number of times the UBA timer has expired.') rSATimerExpiries = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 2, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rSATimerExpiries.setStatus('mandatory') if mibBuilder.loadTexts: rSATimerExpiries.setDescription('Number of times the RSA timer has expired.') outCallAttempts = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: outCallAttempts.setStatus('mandatory') if mibBuilder.loadTexts: outCallAttempts.setDescription('Total number of outgoing call legs attempted.') outCallNormalCompletions = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: outCallNormalCompletions.setStatus('mandatory') if mibBuilder.loadTexts: outCallNormalCompletions.setDescription('Total number of outgoing call legs completed normally.') outCallAbnormalCompletions = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: outCallAbnormalCompletions.setStatus('mandatory') if mibBuilder.loadTexts: outCallAbnormalCompletions.setDescription('Total number of outgoing call legs completed abnormally.') userBusyOutCallRejects = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: userBusyOutCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: userBusyOutCallRejects.setDescription('Total Number of outgoing call legs rejected due to user busy signal.') tempFailOutCallRejects = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tempFailOutCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: tempFailOutCallRejects.setDescription('Total Number of outgoing call legs rejected due to temporary failure.') userUnavailableOutCallRejects = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: userUnavailableOutCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: userUnavailableOutCallRejects.setDescription('Total number of outgoing call legs failed due to user not available.') abnormalReleaseOutCallRejects = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: abnormalReleaseOutCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: abnormalReleaseOutCallRejects.setDescription('Total Number of outgoing call legs rejected due to abnormal release.') otherOutCallRejects = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: otherOutCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: otherOutCallRejects.setDescription('Total Number of outgoing call legs rejected due to other reasons.') cumulativeActiveOutCalls = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cumulativeActiveOutCalls.setStatus('mandatory') if mibBuilder.loadTexts: cumulativeActiveOutCalls.setDescription('Cumulatvie Number of outgoing call legs active so far.') currentlyActiveOutCalls = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: currentlyActiveOutCalls.setStatus('mandatory') if mibBuilder.loadTexts: currentlyActiveOutCalls.setDescription('Total Number of outgoing call legs currently active.') currentlyActiveDigitalOutCalls = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: currentlyActiveDigitalOutCalls.setStatus('mandatory') if mibBuilder.loadTexts: currentlyActiveDigitalOutCalls.setDescription('Total Number of outgoing digital call legs currently active.') currentlyActiveAnalogOutCalls = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: currentlyActiveAnalogOutCalls.setStatus('mandatory') if mibBuilder.loadTexts: currentlyActiveAnalogOutCalls.setDescription('Total Number of outgoing analog call legs currently active.') inCallAttempts = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: inCallAttempts.setStatus('mandatory') if mibBuilder.loadTexts: inCallAttempts.setDescription('Total number of incoming call legs attempted.') inCallNormalCompletions = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: inCallNormalCompletions.setStatus('mandatory') if mibBuilder.loadTexts: inCallNormalCompletions.setDescription('Total number of incoming call legs completed normally.') inCallAbnormalCompletions = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: inCallAbnormalCompletions.setStatus('mandatory') if mibBuilder.loadTexts: inCallAbnormalCompletions.setDescription('Total number of incoming call legs completed abnormally.') userBusyInCallRejects = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: userBusyInCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: userBusyInCallRejects.setDescription('Total Number of incoming call legs rejected due to user busy signal.') tempFailInCallRejects = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tempFailInCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: tempFailInCallRejects.setDescription('Total Number of incoming call legs rejected due to temporary failure.') userUnavailableInCallRejects = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: userUnavailableInCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: userUnavailableInCallRejects.setDescription('Total number of incoming call legs failed due to user not available.') abnormalReleaseInCallRejects = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: abnormalReleaseInCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: abnormalReleaseInCallRejects.setDescription('Total Number of incoming call legs rejected due to abnormal release.') otherInCallRejects = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: otherInCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: otherInCallRejects.setDescription('Total Number of incoming call legs rejected due to other reasons.') cumulativeActiveInCalls = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cumulativeActiveInCalls.setStatus('mandatory') if mibBuilder.loadTexts: cumulativeActiveInCalls.setDescription('Cumulatvie Number of incoming call legs active so far.') currentlyActiveInCalls = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: currentlyActiveInCalls.setStatus('mandatory') if mibBuilder.loadTexts: currentlyActiveInCalls.setDescription('Total Number of incoming call legs currently active.') currentlyActiveDigitalInCalls = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: currentlyActiveDigitalInCalls.setStatus('mandatory') if mibBuilder.loadTexts: currentlyActiveDigitalInCalls.setDescription('Total Number of incoming digital call legs currently active.') currentlyActiveAnalogInCalls = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 3, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: currentlyActiveAnalogInCalls.setStatus('mandatory') if mibBuilder.loadTexts: currentlyActiveAnalogInCalls.setDescription('Total Number of incoming analog call legs currently active.') trunkCallOMTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1), ) if mibBuilder.loadTexts: trunkCallOMTable.setStatus('mandatory') if mibBuilder.loadTexts: trunkCallOMTable.setDescription('The TrunkCallOMTable contains call related OMs on a trunk group basis') trunkCallOMTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1), ).setIndexNames((0, "InternetThruway-MIB", "trunkCallOMIndex")) if mibBuilder.loadTexts: trunkCallOMTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: trunkCallOMTableEntry.setDescription('An entry in the TrunkCallOMTable. Indexed by trunkCallOMIndex.') trunkCallOMIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 1), Integer32()) if mibBuilder.loadTexts: trunkCallOMIndex.setStatus('mandatory') if mibBuilder.loadTexts: trunkCallOMIndex.setDescription('Identifies a trunk group index.') trunkGroupCLLI = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkGroupCLLI.setStatus('mandatory') if mibBuilder.loadTexts: trunkGroupCLLI.setDescription('The Common Language Location Identifier(CLLI), a unique alphanumeric value to identify this Trunk Group.') numberOfCircuits = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: numberOfCircuits.setStatus('mandatory') if mibBuilder.loadTexts: numberOfCircuits.setDescription('Total Number of Circuits provisioned against this trunk group.') trunkOutCallAttempts = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkOutCallAttempts.setStatus('mandatory') if mibBuilder.loadTexts: trunkOutCallAttempts.setDescription('Total number of outgoing call legs attempted.') trunkOutCallNormalCompletions = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkOutCallNormalCompletions.setStatus('mandatory') if mibBuilder.loadTexts: trunkOutCallNormalCompletions.setDescription('Total number of outgoing call legs completed normally.') trunkOutCallAbnormalCompletions = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkOutCallAbnormalCompletions.setStatus('mandatory') if mibBuilder.loadTexts: trunkOutCallAbnormalCompletions.setDescription('Total number of outgoing call legs completed abnormally.') trunkUserBusyOutCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkUserBusyOutCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: trunkUserBusyOutCallRejects.setDescription('Total Number of outgoing call legs rejected due to user busy signal.') trunkTempFailOutCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkTempFailOutCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: trunkTempFailOutCallRejects.setDescription('Total Number of outgoing call legs rejected due to temporary failure.') trunkUserUnavailableOutCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkUserUnavailableOutCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: trunkUserUnavailableOutCallRejects.setDescription('Total number of outgoing call legs failed due to user not available.') trunkAbnormalReleaseOutCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkAbnormalReleaseOutCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: trunkAbnormalReleaseOutCallRejects.setDescription('Total Number of outgoing call legs rejected due to abnormal release.') trunkOtherOutCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkOtherOutCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: trunkOtherOutCallRejects.setDescription('Total Number of outgoing call legs rejected due to other reasons.') trunkCumulativeActiveOutCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkCumulativeActiveOutCalls.setStatus('mandatory') if mibBuilder.loadTexts: trunkCumulativeActiveOutCalls.setDescription('Cumulatvie Number of outgoing call legs active so far.') trunkCurrentlyActiveOutCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkCurrentlyActiveOutCalls.setStatus('mandatory') if mibBuilder.loadTexts: trunkCurrentlyActiveOutCalls.setDescription('Total Number of outgoing call legs currently active.') trunkCurrentlyActiveDigitalOutCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkCurrentlyActiveDigitalOutCalls.setStatus('mandatory') if mibBuilder.loadTexts: trunkCurrentlyActiveDigitalOutCalls.setDescription('Total Number of outgoing digital call legs currently active.') trunkCurrentlyActiveAnalogOutCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkCurrentlyActiveAnalogOutCalls.setStatus('mandatory') if mibBuilder.loadTexts: trunkCurrentlyActiveAnalogOutCalls.setDescription('Total Number of outgoing analog call legs currently active.') trunkInCallAttempts = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkInCallAttempts.setStatus('mandatory') if mibBuilder.loadTexts: trunkInCallAttempts.setDescription('Total number of incoming call legs attempted.') trunkInCallNormalCompletions = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkInCallNormalCompletions.setStatus('mandatory') if mibBuilder.loadTexts: trunkInCallNormalCompletions.setDescription('Total number of incoming call legs completed normally.') trunkInCallAbnormalCompletions = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkInCallAbnormalCompletions.setStatus('mandatory') if mibBuilder.loadTexts: trunkInCallAbnormalCompletions.setDescription('Total number of incoming call legs completed abnormally.') trunkUserBusyInCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkUserBusyInCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: trunkUserBusyInCallRejects.setDescription('Total Number of incoming call legs rejected due to user busy signal.') trunkTempFailInCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkTempFailInCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: trunkTempFailInCallRejects.setDescription('Total Number of incoming call legs rejected due to temporary failure.') trunkUserUnavailableInCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkUserUnavailableInCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: trunkUserUnavailableInCallRejects.setDescription('Total number of incoming call legs failed due to user not available.') trunkAbnormalReleaseInCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkAbnormalReleaseInCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: trunkAbnormalReleaseInCallRejects.setDescription('Total Number of incoming call legs rejected due to abnormal release.') trunkOtherInCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkOtherInCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: trunkOtherInCallRejects.setDescription('Total Number of incoming call legs rejected due to other reasons.') trunkCumulativeActiveInCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkCumulativeActiveInCalls.setStatus('mandatory') if mibBuilder.loadTexts: trunkCumulativeActiveInCalls.setDescription('Cumulatvie Number of incoming call legs active so far.') trunkCurrentlyActiveInCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkCurrentlyActiveInCalls.setStatus('mandatory') if mibBuilder.loadTexts: trunkCurrentlyActiveInCalls.setDescription('Total Number of incoming call legs currently active.') trunkCurrentlyActiveDigitalInCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkCurrentlyActiveDigitalInCalls.setStatus('mandatory') if mibBuilder.loadTexts: trunkCurrentlyActiveDigitalInCalls.setDescription('Total Number of incoming digital call legs currently active.') trunkCurrentlyActiveAnalogInCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 27), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkCurrentlyActiveAnalogInCalls.setStatus('mandatory') if mibBuilder.loadTexts: trunkCurrentlyActiveAnalogInCalls.setDescription('Total Number of incoming analog call legs currently active.') trunkAllActiveCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 28), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkAllActiveCalls.setStatus('mandatory') if mibBuilder.loadTexts: trunkAllActiveCalls.setDescription('Total number of currently active call legs (all type).') trunkOccupancyPerCCS = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 29), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trunkOccupancyPerCCS.setStatus('mandatory') if mibBuilder.loadTexts: trunkOccupancyPerCCS.setDescription('Trunk occupancy in Centum Call Seconds.') trafficInCCSs = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 30), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trafficInCCSs.setStatus('mandatory') if mibBuilder.loadTexts: trafficInCCSs.setDescription('Scanned om for tgms that are call busy') trafficInCCSIncomings = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 31), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trafficInCCSIncomings.setStatus('mandatory') if mibBuilder.loadTexts: trafficInCCSIncomings.setDescription('Scanned Om on tgms with an incoming call.') localBusyInCCSs = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 32), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: localBusyInCCSs.setStatus('mandatory') if mibBuilder.loadTexts: localBusyInCCSs.setDescription('Scanned om for tgms that are locally blocked.') remoteBusyInCCSs = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 4, 1, 1, 33), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: remoteBusyInCCSs.setStatus('mandatory') if mibBuilder.loadTexts: remoteBusyInCCSs.setDescription('Scanned om for tgms that are remoteley blocked.') nasCallOMTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1), ) if mibBuilder.loadTexts: nasCallOMTable.setStatus('mandatory') if mibBuilder.loadTexts: nasCallOMTable.setDescription('The NasCallOMTable contains call related OMs on a nas basis') nasCallOMTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1), ).setIndexNames((0, "InternetThruway-MIB", "nasCallOMIndex")) if mibBuilder.loadTexts: nasCallOMTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: nasCallOMTableEntry.setDescription('An entry in the NasCallOMTable. Indexed by nasCallOMIndex.') nasCallOMIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 1), Integer32()) if mibBuilder.loadTexts: nasCallOMIndex.setStatus('mandatory') if mibBuilder.loadTexts: nasCallOMIndex.setDescription('Identifies a nas Call OM .') nasName1 = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasName1.setStatus('mandatory') if mibBuilder.loadTexts: nasName1.setDescription('A unique alphanumeric value to identify this Nas.') numberOfPorts = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: numberOfPorts.setStatus('mandatory') if mibBuilder.loadTexts: numberOfPorts.setDescription('Total Number of Ports provisioned against this nas.') nasOutCallAttempts = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasOutCallAttempts.setStatus('mandatory') if mibBuilder.loadTexts: nasOutCallAttempts.setDescription('Total number of outgoing call legs attempted.') nasOutCallNormalCompletions = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasOutCallNormalCompletions.setStatus('mandatory') if mibBuilder.loadTexts: nasOutCallNormalCompletions.setDescription('Total number of outgoing call legs completed normally.') nasOutCallAbnormalCompletions = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasOutCallAbnormalCompletions.setStatus('mandatory') if mibBuilder.loadTexts: nasOutCallAbnormalCompletions.setDescription('Total number of outgoing call legs completed abnormally.') nasUserBusyOutCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasUserBusyOutCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: nasUserBusyOutCallRejects.setDescription('Total Number of outgoing call legs rejected due to user busy signal.') nasTempFailOutCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasTempFailOutCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: nasTempFailOutCallRejects.setDescription('Total Number of outgoing call legs rejected due to temporary failure.') nasUserUnavailableOutCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasUserUnavailableOutCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: nasUserUnavailableOutCallRejects.setDescription('Total number of outgoing call legs failed due to user not available.') nasAbnormalReleaseOutCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasAbnormalReleaseOutCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: nasAbnormalReleaseOutCallRejects.setDescription('Total Number of outgoing call legs rejected due to abnormal release.') nasOtherOutCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasOtherOutCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: nasOtherOutCallRejects.setDescription('Total Number of outgoing call legs rejected due to other reasons.') nasCumulativeActiveOutCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasCumulativeActiveOutCalls.setStatus('mandatory') if mibBuilder.loadTexts: nasCumulativeActiveOutCalls.setDescription('Cumulatvie Number of outgoing call legs active so far.') nasCurrentlyActiveOutCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasCurrentlyActiveOutCalls.setStatus('mandatory') if mibBuilder.loadTexts: nasCurrentlyActiveOutCalls.setDescription('Total Number of outgoing call legs currently active.') nasCurrentlyActiveDigitalOutCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasCurrentlyActiveDigitalOutCalls.setStatus('mandatory') if mibBuilder.loadTexts: nasCurrentlyActiveDigitalOutCalls.setDescription('Total Number of outgoing digital call legs currently active.') nasCurrentlyActiveAnalogOutCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasCurrentlyActiveAnalogOutCalls.setStatus('mandatory') if mibBuilder.loadTexts: nasCurrentlyActiveAnalogOutCalls.setDescription('Total Number of outgoing analog call legs currently active.') nasInCallAttempts = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasInCallAttempts.setStatus('mandatory') if mibBuilder.loadTexts: nasInCallAttempts.setDescription('Total number of incoming call legs attempted.') nasInCallNormalCompletions = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasInCallNormalCompletions.setStatus('mandatory') if mibBuilder.loadTexts: nasInCallNormalCompletions.setDescription('Total number of incoming call legs completed normally.') nasInCallAbnormalCompletions = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasInCallAbnormalCompletions.setStatus('mandatory') if mibBuilder.loadTexts: nasInCallAbnormalCompletions.setDescription('Total number of incoming call legs completed abnormally.') nasUserBusyInCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasUserBusyInCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: nasUserBusyInCallRejects.setDescription('Total Number of incoming call legs rejected due to user busy signal.') nasTempFailInCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasTempFailInCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: nasTempFailInCallRejects.setDescription('Total Number of incoming call legs rejected due to temporary failure.') nasUserUnavailableInCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasUserUnavailableInCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: nasUserUnavailableInCallRejects.setDescription('Total number of incoming call legs failed due to user not available.') nasAbnormalReleaseInCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasAbnormalReleaseInCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: nasAbnormalReleaseInCallRejects.setDescription('Total Number of incoming call legs rejected due to abnormal release.') nasOtherInCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasOtherInCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: nasOtherInCallRejects.setDescription('Total Number of incoming call legs rejected due to other reasons.') nasCumulativeActiveInCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasCumulativeActiveInCalls.setStatus('mandatory') if mibBuilder.loadTexts: nasCumulativeActiveInCalls.setDescription('Cumulatvie Number of incoming call legs active so far.') nasCurrentlyActiveInCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasCurrentlyActiveInCalls.setStatus('mandatory') if mibBuilder.loadTexts: nasCurrentlyActiveInCalls.setDescription('Total Number of incoming call legs currently active.') nasCurrentlyActiveDigitalInCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasCurrentlyActiveDigitalInCalls.setStatus('mandatory') if mibBuilder.loadTexts: nasCurrentlyActiveDigitalInCalls.setDescription('Total Number of incoming digital call legs currently active.') nasCurrentlyActiveAnalogInCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 27), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasCurrentlyActiveAnalogInCalls.setStatus('mandatory') if mibBuilder.loadTexts: nasCurrentlyActiveAnalogInCalls.setDescription('Total Number of incoming analog call legs currently active.') nasAllActiveCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 28), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasAllActiveCalls.setStatus('mandatory') if mibBuilder.loadTexts: nasAllActiveCalls.setDescription('Total number of currently active call legs (all type).') nasMaxPortsUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 29), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasMaxPortsUsed.setStatus('mandatory') if mibBuilder.loadTexts: nasMaxPortsUsed.setDescription('Maximum number of ports used in this nas since the last system restart.') nasMinPortsUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 30), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasMinPortsUsed.setStatus('mandatory') if mibBuilder.loadTexts: nasMinPortsUsed.setDescription('Minimum number of ports used in this nas since the last system restart.') nasCurrentlyInUsePorts = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 7, 1, 1, 31), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nasCurrentlyInUsePorts.setStatus('mandatory') if mibBuilder.loadTexts: nasCurrentlyInUsePorts.setDescription('Number of ports currently in use.') phoneCallOMTable = MibTable((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 5, 1), ) if mibBuilder.loadTexts: phoneCallOMTable.setStatus('mandatory') if mibBuilder.loadTexts: phoneCallOMTable.setDescription('The PhoneCallOMTable contains call related OMs on a phone number basis') phoneCallOMTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 5, 1, 1), ).setIndexNames((0, "InternetThruway-MIB", "phoneCallOMIndex")) if mibBuilder.loadTexts: phoneCallOMTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: phoneCallOMTableEntry.setDescription('An entry in the PhoneCallOMTable. Indexed by phoneGroupIndex.') phoneCallOMIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 5, 1, 1, 1), Integer32()) if mibBuilder.loadTexts: phoneCallOMIndex.setStatus('mandatory') if mibBuilder.loadTexts: phoneCallOMIndex.setDescription('Uniquely identifies an entry in this table.') phoneNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 5, 1, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: phoneNumber.setStatus('mandatory') if mibBuilder.loadTexts: phoneNumber.setDescription('Phone number for the underlying Call OM record.') phoneDialCallAttempts = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 5, 1, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: phoneDialCallAttempts.setStatus('mandatory') if mibBuilder.loadTexts: phoneDialCallAttempts.setDescription('Total number of dial calls attempted.') phoneDialCallNormalCompletions = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 5, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: phoneDialCallNormalCompletions.setStatus('mandatory') if mibBuilder.loadTexts: phoneDialCallNormalCompletions.setDescription('Total number of dial calls completed normally.') phoneDialCallAbnormalCompletions = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 5, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: phoneDialCallAbnormalCompletions.setStatus('mandatory') if mibBuilder.loadTexts: phoneDialCallAbnormalCompletions.setDescription('Total number of dial calls completed abnormally.') phoneUserBusyDialCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 5, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: phoneUserBusyDialCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: phoneUserBusyDialCallRejects.setDescription('Total Number of dial calls rejected due to user busy signal.') phoneTempFailDialCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 5, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: phoneTempFailDialCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: phoneTempFailDialCallRejects.setDescription('Total Number of dial calls rejected due to temporary failure.') phoneUserUnavailableDialCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 5, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: phoneUserUnavailableDialCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: phoneUserUnavailableDialCallRejects.setDescription('Total number of dial calls failed due to user not available.') phoneAbnormalReleaseDialCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 5, 1, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: phoneAbnormalReleaseDialCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: phoneAbnormalReleaseDialCallRejects.setDescription('Total Number of dial calls rejected due to abnormal release.') phoneOtherDialCallRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 5, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: phoneOtherDialCallRejects.setStatus('mandatory') if mibBuilder.loadTexts: phoneOtherDialCallRejects.setDescription('Total Number of dial calls rejected due to other reasons.') phoneCumulativeActiveDialCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 5, 1, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: phoneCumulativeActiveDialCalls.setStatus('mandatory') if mibBuilder.loadTexts: phoneCumulativeActiveDialCalls.setDescription('Cumulatvie Number of dial calls active so far.') phoneCurrentlyActiveDialCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 5, 1, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: phoneCurrentlyActiveDialCalls.setStatus('mandatory') if mibBuilder.loadTexts: phoneCurrentlyActiveDialCalls.setDescription('Total Number of dial calls currently active.') phoneCurrentlyActiveDigitalDialCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 5, 1, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: phoneCurrentlyActiveDigitalDialCalls.setStatus('mandatory') if mibBuilder.loadTexts: phoneCurrentlyActiveDigitalDialCalls.setDescription('Total Number of digital dial calls currently active.') phoneCurrentlyActiveAnalogDialCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 5, 1, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: phoneCurrentlyActiveAnalogDialCalls.setStatus('mandatory') if mibBuilder.loadTexts: phoneCurrentlyActiveAnalogDialCalls.setDescription('Total Number of analog dial calls currently active.') csgComplexCLLI = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: csgComplexCLLI.setStatus('mandatory') if mibBuilder.loadTexts: csgComplexCLLI.setDescription('A unique identifier of the CSG Complex.') serverHostName = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: serverHostName.setStatus('mandatory') if mibBuilder.loadTexts: serverHostName.setDescription('Host Name of this server.') serverIpAddress = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: serverIpAddress.setStatus('mandatory') if mibBuilder.loadTexts: serverIpAddress.setDescription('IP address of this server.') serverCLLI = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: serverCLLI.setStatus('mandatory') if mibBuilder.loadTexts: serverCLLI.setDescription('A unique identifier of this server (common in the telco world).') mateServerHostName = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mateServerHostName.setStatus('mandatory') if mibBuilder.loadTexts: mateServerHostName.setDescription('Host Name of this server.') mateServerIpAddress = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 6), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: mateServerIpAddress.setStatus('mandatory') if mibBuilder.loadTexts: mateServerIpAddress.setDescription('IP address of this server.') serverMemSize = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: serverMemSize.setStatus('mandatory') if mibBuilder.loadTexts: serverMemSize.setDescription('Memory size in mega bytes of this server.') provisionedDPCs = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: provisionedDPCs.setStatus('mandatory') if mibBuilder.loadTexts: provisionedDPCs.setDescription('Number of destination point codes provisioned.') provisionedCircuits = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: provisionedCircuits.setStatus('mandatory') if mibBuilder.loadTexts: provisionedCircuits.setDescription('Number of circuits provisioned.') inserviceCircuits = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: inserviceCircuits.setStatus('mandatory') if mibBuilder.loadTexts: inserviceCircuits.setDescription('Number of circuits in service. This number goes up or down at any given time.') provisionedNASes = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 12), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: provisionedNASes.setStatus('mandatory') if mibBuilder.loadTexts: provisionedNASes.setDescription('Number of NASes provisioned.') aliveNASes = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: aliveNASes.setStatus('mandatory') if mibBuilder.loadTexts: aliveNASes.setDescription('Number of NASes known to be alive. This number goes up or down at any given time.') inserviceNASes = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 14), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: inserviceNASes.setStatus('mandatory') if mibBuilder.loadTexts: inserviceNASes.setDescription('Number of NASes in service. This number goes up or down at any given time.') provsionedCards = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 15), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: provsionedCards.setStatus('mandatory') if mibBuilder.loadTexts: provsionedCards.setDescription('Number of NAS cards provisioned.') inserviceCards = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 16), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: inserviceCards.setStatus('mandatory') if mibBuilder.loadTexts: inserviceCards.setDescription('Number of NAS cards in service. This number goes up or down at any given time.') provisionedPorts = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 17), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: provisionedPorts.setStatus('mandatory') if mibBuilder.loadTexts: provisionedPorts.setDescription('Number of ports provisioned.') inservicePorts = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 18), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: inservicePorts.setStatus('mandatory') if mibBuilder.loadTexts: inservicePorts.setDescription('Number of ports in service. This number goes up or down at any given time.') userCPUUsage = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 19), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: userCPUUsage.setStatus('mandatory') if mibBuilder.loadTexts: userCPUUsage.setDescription('Percentage of CPU used in user domain. Survman computes this value in every 600 seconds. The value stored in the MIB will be the last one computed.') systemCPUUsage = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 20), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: systemCPUUsage.setStatus('mandatory') if mibBuilder.loadTexts: systemCPUUsage.setDescription('Percentage of CPU used in system domain in this server. Survman computes this value in every 600 seconds. The value stored in the MIB will be the last one computed.') totalCPUUsage = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 21), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: totalCPUUsage.setStatus('mandatory') if mibBuilder.loadTexts: totalCPUUsage.setDescription('Percentage of CPU used in total in this server Survman computes this value in every 600 seconds. The value stored in the MIB will be the last one computed.') maxCPUUsage = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 22), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: maxCPUUsage.setStatus('mandatory') if mibBuilder.loadTexts: maxCPUUsage.setDescription('High water measurement. Maximum CPU Usage (%) in this server. Survman computes this value in every 600 seconds. The value stored in the MIB will be the last one computed.') avgLoad = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 23), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: avgLoad.setStatus('mandatory') if mibBuilder.loadTexts: avgLoad.setDescription('Average CPU load factor in this server. Survman computes this value in every 600 seconds. The value stored in the MIB will be the last one computed.') systemCallRate = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 24), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: systemCallRate.setStatus('mandatory') if mibBuilder.loadTexts: systemCallRate.setDescription('System Call rate (per second) in this Cserver. Survman computes this value in every 600 seconds. The value stored in the MIB will be the one computed the last time.') contextSwitchRate = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 25), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: contextSwitchRate.setStatus('mandatory') if mibBuilder.loadTexts: contextSwitchRate.setDescription('Process context switching rate (per second) in this server. Survman computes this value in every 600 seconds. The value stored in the MIB will be the one computed the last time.') lastUpdateOMFile = MibScalar((1, 3, 6, 1, 4, 1, 562, 14, 2, 7, 6, 26), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: lastUpdateOMFile.setStatus('mandatory') if mibBuilder.loadTexts: lastUpdateOMFile.setDescription('Name of the last updated OM file.') mibBuilder.exportSymbols("InternetThruway-MIB", cplxMateStandbyState=cplxMateStandbyState, icTimeStamp=icTimeStamp, linkAlignLinkSet=linkAlignLinkSet, nasUserUnavailableInCallRejects=nasUserUnavailableInCallRejects, phoneCallOMIndex=phoneCallOMIndex, linkOMs=linkOMs, hgIPAddress=hgIPAddress, ss7MTP2TrunkFailureAlarmTableEntry=ss7MTP2TrunkFailureAlarmTableEntry, componentIndex=componentIndex, lsIPAddress=lsIPAddress, RouteState=RouteState, ncLostServerTrap=ncLostServerTrap, LinksetState=LinksetState, nasCallOMTableEntry=nasCallOMTableEntry, trunkOccupancyPerCCS=trunkOccupancyPerCCS, routeIndex=routeIndex, destCongestPointcode=destCongestPointcode, userBusyOutCallRejects=userBusyOutCallRejects, componentTable=componentTable, routeTable=routeTable, ss7DestinationAccessible=ss7DestinationAccessible, ss7LinkCongestionAlarmTableEntry=ss7LinkCongestionAlarmTableEntry, partitionSpaceTimeStamp=partitionSpaceTimeStamp, lcKey=lcKey, nasCurrentlyActiveDigitalOutCalls=nasCurrentlyActiveDigitalOutCalls, destInaccessPointcode=destInaccessPointcode, trunkUserUnavailableOutCallRejects=trunkUserUnavailableOutCallRejects, LinkAlignmentState=LinkAlignmentState, trunkOtherOutCallRejects=trunkOtherOutCallRejects, ss7ISUPFailureAlarmTableEntry=ss7ISUPFailureAlarmTableEntry, trunkOtherInCallRejects=trunkOtherInCallRejects, lcLinkSet=lcLinkSet, lsKey=lsKey, ss7FEPCongestionWarning=ss7FEPCongestionWarning, ss7BEPCongestionWarning=ss7BEPCongestionWarning, provisionedPorts=provisionedPorts, nasUserUnavailableOutCallRejects=nasUserUnavailableOutCallRejects, phoneDialCallNormalCompletions=phoneDialCallNormalCompletions, ss7DestinationCongestedAlarm=ss7DestinationCongestedAlarm, cplxMateAvailabilityState=cplxMateAvailabilityState, totalCPUUsage=totalCPUUsage, provsionedCards=provsionedCards, compDebugStatus=compDebugStatus, provisionedNASes=provisionedNASes, trafficInCCSs=trafficInCCSs, currentlyActiveInCalls=currentlyActiveInCalls, cplxMateOperationalState=cplxMateOperationalState, nasStatusAlarm=nasStatusAlarm, nasAlarmTableEntry=nasAlarmTableEntry, PartitionSpaceStatus=PartitionSpaceStatus, linksetTableEntry=linksetTableEntry, rSATimerExpiries=rSATimerExpiries, mtp2CardId=mtp2CardId, compStateAlarm=compStateAlarm, mtp2Key=mtp2Key, ss7DestinationInaccessibleAlarmTable=ss7DestinationInaccessibleAlarmTable, nasIPAddress=nasIPAddress, inserviceNASes=inserviceNASes, linkOMTableEntry=linkOMTableEntry, nasUserBusyInCallRejects=nasUserBusyInCallRejects, lcIPAddress=lcIPAddress, hgName=hgName, phoneNumberOMs=phoneNumberOMs, linkNumSIFReceived=linkNumSIFReceived, numberOfPorts=numberOfPorts, lsName=lsName, lfCardId=lfCardId, icIndex=icIndex, provisionedDPCs=provisionedDPCs, lfIPAddress=lfIPAddress, lostServerAlarmTableEntry=lostServerAlarmTableEntry, mateServerIpAddress=mateServerIpAddress, cumulativeActiveOutCalls=cumulativeActiveOutCalls, nasCurrentlyActiveOutCalls=nasCurrentlyActiveOutCalls, nasInCallAbnormalCompletions=nasInCallAbnormalCompletions, lsFailureTimeStamp=lsFailureTimeStamp, alarmStatusInt1=alarmStatusInt1, csgComplexStateTrapClear=csgComplexStateTrapClear, partitionPercentFull=partitionPercentFull, systemCPUUsage=systemCPUUsage, destPointCode=destPointCode, destInaccessIndex=destInaccessIndex, nasTempFailInCallRejects=nasTempFailInCallRejects, destinationTable=destinationTable, destinationTableEntry=destinationTableEntry, trunkGroupCLLI=trunkGroupCLLI, nasName=nasName, TimeString=TimeString, currentlyActiveDigitalInCalls=currentlyActiveDigitalInCalls, linksetTable=linksetTable, cplxLocEthernetName=cplxLocEthernetName, genericWarning=genericWarning, phoneDialCallAttempts=phoneDialCallAttempts, ss7MTP2TrunkFailureAlarm=ss7MTP2TrunkFailureAlarm, compRestartKey=compRestartKey, linkAlignIPAddress=linkAlignIPAddress, nasCurrentlyActiveInCalls=nasCurrentlyActiveInCalls, linkFailures=linkFailures, ss7MTP3CongestionCritical=ss7MTP3CongestionCritical, contextSwitchRate=contextSwitchRate, nasCumulativeActiveOutCalls=nasCumulativeActiveOutCalls, compDebugKey=compDebugKey, rLCTimerExpiries=rLCTimerExpiries, routeId=routeId, userUnavailableInCallRejects=userUnavailableInCallRejects, outCallNormalCompletions=outCallNormalCompletions, linkHostname=linkHostname, nasCallOMTable=nasCallOMTable, compProvStateStatus=compProvStateStatus, phoneOtherDialCallRejects=phoneOtherDialCallRejects, cisRetrievalFailureTrapMajor=cisRetrievalFailureTrapMajor, maintenanceOMs=maintenanceOMs, trunkOutCallAttempts=trunkOutCallAttempts, phoneNumber=phoneNumber, icName=icName, ncSoftwareVersion=ncSoftwareVersion, linkIndex=linkIndex, ss7DestinationCongestedAlarmTableEntry=ss7DestinationCongestedAlarmTableEntry, ifTimeStamp=ifTimeStamp, partitionSpaceStatus=partitionSpaceStatus, linkCardDeviceName=linkCardDeviceName, maxCPUUsage=maxCPUUsage, mateServerHostName=mateServerHostName, linkNumMSUDiscarded=linkNumMSUDiscarded, inCallAbnormalCompletions=inCallAbnormalCompletions, ncServerId=ncServerId, serverCLLI=serverCLLI, inservicePorts=inservicePorts, ncEthernetName=ncEthernetName, nasMaxPortsUsed=nasMaxPortsUsed, lsTimeStamp=lsTimeStamp, ss7LinkAlignmentFailureClear=ss7LinkAlignmentFailureClear, phoneCurrentlyActiveDialCalls=phoneCurrentlyActiveDialCalls, phoneUserUnavailableDialCallRejects=phoneUserUnavailableDialCallRejects, csg=csg, ncFoundServerTrap=ncFoundServerTrap, systemOMs=systemOMs, ncClusterIP=ncClusterIP, compSecsInCurrentState=compSecsInCurrentState, abnormalReleaseInCallRejects=abnormalReleaseInCallRejects, nasCumulativeActiveInCalls=nasCumulativeActiveInCalls, ncAvailabilityState=ncAvailabilityState, inserviceCards=inserviceCards, trunkCumulativeActiveOutCalls=trunkCumulativeActiveOutCalls, linkAlignTimeStamp=linkAlignTimeStamp, hgAlarmTableEntry=hgAlarmTableEntry, trunkUserBusyInCallRejects=trunkUserBusyInCallRejects, csgComplexCLLI=csgComplexCLLI, linkAlignLinkCode=linkAlignLinkCode, destState=destState, ifIndex=ifIndex, ss7LinksetFailureAlarmTable=ss7LinksetFailureAlarmTable, uBATimerExpiries=uBATimerExpiries, ss7DestinationCongestedAlarmTable=ss7DestinationCongestedAlarmTable, alarmMaskInt1=alarmMaskInt1, lfKey=lfKey, lastUpdateOMFile=lastUpdateOMFile, linkAlignCardId=linkAlignCardId, genericNormal=genericNormal, lfLinkCode=lfLinkCode, lcTimeStamp=lcTimeStamp, nasStatusClear=nasStatusClear, currentlyActiveDigitalOutCalls=currentlyActiveDigitalOutCalls, LinkCongestionState=LinkCongestionState, nasKey=nasKey, cplxLocOperationalState=cplxLocOperationalState, linkNumMSUTransmitted=linkNumMSUTransmitted, linkCongestions=linkCongestions, ncStandbyState=ncStandbyState, ss7ISUPCongestionAlarmTable=ss7ISUPCongestionAlarmTable, nasOtherOutCallRejects=nasOtherOutCallRejects, linkInhibitionState=linkInhibitionState, genericMinor=genericMinor, hgAlarmTable=hgAlarmTable, ncOperationalState=ncOperationalState, phoneCurrentlyActiveAnalogDialCalls=phoneCurrentlyActiveAnalogDialCalls, trunkUserUnavailableInCallRejects=trunkUserUnavailableInCallRejects, UpgradeInProgress=UpgradeInProgress, alarms=alarms, compDebugTimeStamp=compDebugTimeStamp, cplxMateEthernetIP=cplxMateEthernetIP, trunkCallOMIndex=trunkCallOMIndex, lfName=lfName, userBusyInCallRejects=userBusyInCallRejects, linkRemoteProcOutages=linkRemoteProcOutages, trapGenericStr1=trapGenericStr1, linkAlignKey=linkAlignKey, genericCritical=genericCritical, abnormalReleaseOutCallRejects=abnormalReleaseOutCallRejects, ncServer=ncServer, compProvStateTimeStamp=compProvStateTimeStamp, ss7LinkAlignmentAlarmTableEntry=ss7LinkAlignmentAlarmTableEntry, mtp3Name=mtp3Name, destCongestKey=destCongestKey, hgStatusClear=hgStatusClear, trapName=trapName, userCPUUsage=userCPUUsage, linkOMTable=linkOMTable, ss7ISUPFailureAlarm=ss7ISUPFailureAlarm, ss7MTP3CongestionMinor=ss7MTP3CongestionMinor, partitionIndex=partitionIndex, genericMajor=genericMajor, lcLinkCode=lcLinkCode, alarmMaskInt2=alarmMaskInt2, ncStateChangeTrap=ncStateChangeTrap, ss7MTP3CongestionAlarmTable=ss7MTP3CongestionAlarmTable, remoteBusyInCCSs=remoteBusyInCCSs, csgComplexStateTrapInfo=csgComplexStateTrapInfo, aliveNASes=aliveNASes, destCongestIPAddress=destCongestIPAddress, trunkGroupOMs=trunkGroupOMs, otherOutCallRejects=otherOutCallRejects, lsFailurePointcode=lsFailurePointcode, trapFileName=trapFileName, ss7LinkAlignmentAlarmTable=ss7LinkAlignmentAlarmTable, destIndex=destIndex, destCongestName=destCongestName, nasCurrentlyInUsePorts=nasCurrentlyInUsePorts, systemCallRate=systemCallRate, mtp2TimeStamp=mtp2TimeStamp, linkNumUnexpectedMsgs=linkNumUnexpectedMsgs, trapCompName=trapCompName, linkNumSIFTransmitted=linkNumSIFTransmitted, ncEthernetIP=ncEthernetIP, nortel=nortel, tempFailOutCallRejects=tempFailOutCallRejects, inserviceCircuits=inserviceCircuits, destInaccessIPAddress=destInaccessIPAddress, linksetState=linksetState, cplxLocAvailabilityState=cplxLocAvailabilityState, nasOutCallAbnormalCompletions=nasOutCallAbnormalCompletions, ss7LinkFailureAlarmTable=ss7LinkFailureAlarmTable, ss7LinkCongestionAlarm=ss7LinkCongestionAlarm, restartStateClear=restartStateClear, alarmStatusInt2=alarmStatusInt2, trunkCurrentlyActiveDigitalInCalls=trunkCurrentlyActiveDigitalInCalls, ss7ISUPCongestionClear=ss7ISUPCongestionClear, lfIndex=lfIndex, linkTableEntry=linkTableEntry, mtp2Name=mtp2Name, mtp3IPAddress=mtp3IPAddress, ncUpgradeInProgress=ncUpgradeInProgress, nasOutCallAttempts=nasOutCallAttempts, lfLinkSet=lfLinkSet, provisionedCircuits=provisionedCircuits, partitionTable=partitionTable, ss7LinkCongestionAlarmTable=ss7LinkCongestionAlarmTable, serverMemSize=serverMemSize, ss7LinkFailureClear=ss7LinkFailureClear, trunkInCallAttempts=trunkInCallAttempts, mtp2Index=mtp2Index, trapIdKey=trapIdKey, phoneCallOMTableEntry=phoneCallOMTableEntry, ss7LinksetFailureAlarm=ss7LinksetFailureAlarm) mibBuilder.exportSymbols("InternetThruway-MIB", icIPAddress=icIPAddress, trunkCumulativeActiveInCalls=trunkCumulativeActiveInCalls, lfTimeStamp=lfTimeStamp, ss7LinkFailureAlarm=ss7LinkFailureAlarm, partitionMegsFree=partitionMegsFree, compStateClear=compStateClear, lsFailureIndex=lsFailureIndex, cumulativeActiveInCalls=cumulativeActiveInCalls, ss7LinksetFailureClear=ss7LinksetFailureClear, linksetId=linksetId, linkOMSetId=linkOMSetId, hgKey=hgKey, csgComplexStateTrapCritical=csgComplexStateTrapCritical, linkNumMSUReceived=linkNumMSUReceived, ss7LinksetFailureAlarmTableEntry=ss7LinksetFailureAlarmTableEntry, partitionName=partitionName, icKey=icKey, ss7MTP3CongestionMajor=ss7MTP3CongestionMajor, icCongestionLevel=icCongestionLevel, trunkCurrentlyActiveOutCalls=trunkCurrentlyActiveOutCalls, avgLoad=avgLoad, compDebugOff=compDebugOff, nasCurrentlyActiveDigitalInCalls=nasCurrentlyActiveDigitalInCalls, destCongestIndex=destCongestIndex, restartStateAlarm=restartStateAlarm, trunkInCallAbnormalCompletions=trunkInCallAbnormalCompletions, trunkAbnormalReleaseInCallRejects=trunkAbnormalReleaseInCallRejects, linksetIndex=linksetIndex, mtp2IPAddress=mtp2IPAddress, ifIPAddress=ifIPAddress, lsFailureName=lsFailureName, nasAlarmTimeStamp=nasAlarmTimeStamp, trafficInCCSIncomings=trafficInCCSIncomings, nasTempFailOutCallRejects=nasTempFailOutCallRejects, routeState=routeState, DestinationState=DestinationState, linkInhibits=linkInhibits, compRestartTimeStamp=compRestartTimeStamp, ss7MTP3CongestionClear=ss7MTP3CongestionClear, nasInCallNormalCompletions=nasInCallNormalCompletions, MTP2AlarmConditionType=MTP2AlarmConditionType, linkId=linkId, ss7ISUPFailureClear=ss7ISUPFailureClear, componentName=componentName, lcCardId=lcCardId, nasOMs=nasOMs, disk=disk, nasIndex=nasIndex, trunkCurrentlyActiveAnalogOutCalls=trunkCurrentlyActiveAnalogOutCalls, ncClusterName=ncClusterName, trunkCurrentlyActiveDigitalOutCalls=trunkCurrentlyActiveDigitalOutCalls, routeDestPointCode=routeDestPointCode, LinkState=LinkState, nasAlarmTable=nasAlarmTable, destCongestTimeStamp=destCongestTimeStamp, cplxAlarmStatus=cplxAlarmStatus, lsIndex=lsIndex, ss7=ss7, nasAbnormalReleaseOutCallRejects=nasAbnormalReleaseOutCallRejects, currentlyActiveOutCalls=currentlyActiveOutCalls, ComponentIndex=ComponentIndex, hgIndex=hgIndex, lostServerAlarmTable=lostServerAlarmTable, localBusyInCCSs=localBusyInCCSs, currentlyActiveAnalogOutCalls=currentlyActiveAnalogOutCalls, ss7LinkCongestionClear=ss7LinkCongestionClear, ss7DestinationCongestedClear=ss7DestinationCongestedClear, mtp3CongestionLevel=mtp3CongestionLevel, callOMs=callOMs, tempFailInCallRejects=tempFailInCallRejects, lcIndex=lcIndex, trunkOutCallAbnormalCompletions=trunkOutCallAbnormalCompletions, phoneUserBusyDialCallRejects=phoneUserBusyDialCallRejects, ss7ISUPCongestionAlarm=ss7ISUPCongestionAlarm, linkAlignIndex=linkAlignIndex, inCallNormalCompletions=inCallNormalCompletions, ifName=ifName, currentlyActiveAnalogInCalls=currentlyActiveAnalogInCalls, routeRank=routeRank, phoneDialCallAbnormalCompletions=phoneDialCallAbnormalCompletions, phoneTempFailDialCallRejects=phoneTempFailDialCallRejects, otherInCallRejects=otherInCallRejects, routeTableEntry=routeTableEntry, trapDate=trapDate, userUnavailableOutCallRejects=userUnavailableOutCallRejects, trapIPAddress=trapIPAddress, cplxMateEthernetName=cplxMateEthernetName, phoneCallOMTable=phoneCallOMTable, serverIpAddress=serverIpAddress, trunkTempFailOutCallRejects=trunkTempFailOutCallRejects, compRestartStatus=compRestartStatus, nasOutCallNormalCompletions=nasOutCallNormalCompletions, ss7DestinationInaccessible=ss7DestinationInaccessible, bLATimerExpiries=bLATimerExpiries, trunkAllActiveCalls=trunkAllActiveCalls, destInaccessName=destInaccessName, system=system, nasOtherInCallRejects=nasOtherInCallRejects, cplxName=cplxName, trunkUserBusyOutCallRejects=trunkUserBusyOutCallRejects, nasInCallAttempts=nasInCallAttempts, lcName=lcName, nasCurrentlyActiveAnalogOutCalls=nasCurrentlyActiveAnalogOutCalls, dialaccess=dialaccess, trapTimeStamp=trapTimeStamp, trunkCurrentlyActiveInCalls=trunkCurrentlyActiveInCalls, linkNumAutoChangeovers=linkNumAutoChangeovers, diskSpaceClear=diskSpaceClear, omData=omData, linkAlignName=linkAlignName, nasName1=nasName1, ss7LinkFailureAlarmTableEntry=ss7LinkFailureAlarmTableEntry, etherCardTrapMajor=etherCardTrapMajor, LinkInhibitionState=LinkInhibitionState, components=components, linkCongestionState=linkCongestionState, ss7MTP3CongestionAlarmTableEntry=ss7MTP3CongestionAlarmTableEntry, destInaccessKey=destInaccessKey, trunkCallOMTable=trunkCallOMTable, alarmStatusInt3=alarmStatusInt3, ss7ISUPCongestionAlarmTableEntry=ss7ISUPCongestionAlarmTableEntry, ifKey=ifKey, serverHostName=serverHostName, compProvStateKey=compProvStateKey, nasMinPortsUsed=nasMinPortsUsed, etherCardTrapCritical=etherCardTrapCritical, ComponentSysmanState=ComponentSysmanState, trunkCurrentlyActiveAnalogInCalls=trunkCurrentlyActiveAnalogInCalls, nasAbnormalReleaseInCallRejects=nasAbnormalReleaseInCallRejects, ss7ISUPFailureAlarmTable=ss7ISUPFailureAlarmTable, mtp2AlarmCondition=mtp2AlarmCondition, trunkOutCallNormalCompletions=trunkOutCallNormalCompletions, etherCardTrapClear=etherCardTrapClear, linkTransmittedMSUs=linkTransmittedMSUs, cplxLocEthernetIP=cplxLocEthernetIP, traps=traps, ncServerName=ncServerName, phoneCumulativeActiveDialCalls=phoneCumulativeActiveDialCalls, partitionTableEntry=partitionTableEntry, linkOMId=linkOMId, csgComplexStateTrapMajor=csgComplexStateTrapMajor, ncHostName=ncHostName, numberOfCircuits=numberOfCircuits, linkTable=linkTable, ss7MTP2TrunkFailureAlarmTable=ss7MTP2TrunkFailureAlarmTable, trunkInCallNormalCompletions=trunkInCallNormalCompletions, linkAlignmentState=linkAlignmentState, outCallAbnormalCompletions=outCallAbnormalCompletions, nasCallOMIndex=nasCallOMIndex, phoneAbnormalReleaseDialCallRejects=phoneAbnormalReleaseDialCallRejects, destRuleId=destRuleId, nasCmplxName=nasCmplxName, lsFailureIPAddress=lsFailureIPAddress, partitionSpaceKey=partitionSpaceKey, ss7DestinationInaccessibleAlarmTableEntry=ss7DestinationInaccessibleAlarmTableEntry, hgStatusAlarm=hgStatusAlarm, inCallAttempts=inCallAttempts, linkState=linkState, ss7MTP2TrunkFailureClear=ss7MTP2TrunkFailureClear, nasAllActiveCalls=nasAllActiveCalls, compDebugOn=compDebugOn, destCongestCongestionLevel=destCongestCongestionLevel, mtp3Key=mtp3Key, linkReceivedMSUs=linkReceivedMSUs, ss7LinkAlignmentFailureAlarm=ss7LinkAlignmentFailureAlarm, linksetAdjPointcode=linksetAdjPointcode, routeLinksetId=routeLinksetId, phoneCurrentlyActiveDigitalDialCalls=phoneCurrentlyActiveDigitalDialCalls, nasCurrentlyActiveAnalogInCalls=nasCurrentlyActiveAnalogInCalls, trunkTempFailInCallRejects=trunkTempFailInCallRejects, trunkCallOMTableEntry=trunkCallOMTableEntry, diskSpaceAlarm=diskSpaceAlarm, mtp3Index=mtp3Index, nasUserBusyOutCallRejects=nasUserBusyOutCallRejects, lsFailureKey=lsFailureKey, hgAlarmTimeStamp=hgAlarmTimeStamp, mtp3TimeStamp=mtp3TimeStamp, componentTableEntry=componentTableEntry, outCallAttempts=outCallAttempts, cplxLocStandbyState=cplxLocStandbyState, trunkAbnormalReleaseOutCallRejects=trunkAbnormalReleaseOutCallRejects, destInaccessTimeStamp=destInaccessTimeStamp)
127.231942
9,703
0.781809
18,325
158,531
6.76251
0.058718
0.073304
0.128281
0.013654
0.604157
0.466645
0.429759
0.384053
0.333812
0.282304
0
0.056798
0.093199
158,531
1,245
9,704
127.334137
0.805239
0.002094
0
0.009796
0
0.038367
0.290025
0.006233
0
0
0
0
0
1
0
false
0.000816
0.004898
0
0.034286
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
b9f778c162a3f42e748bada544f1b060ab9f29ed
466
py
Python
Condicionales anidados.py
gcardosov/PythonAprendeOrg
0cad81f0a584c98389ca729a337d30581780e520
[ "MIT" ]
1
2018-03-07T05:26:12.000Z
2018-03-07T05:26:12.000Z
Condicionales anidados.py
gcardosov/PythonAprendeOrg
0cad81f0a584c98389ca729a337d30581780e520
[ "MIT" ]
null
null
null
Condicionales anidados.py
gcardosov/PythonAprendeOrg
0cad81f0a584c98389ca729a337d30581780e520
[ "MIT" ]
null
null
null
pregunta = input('trabajas desde casa? ') if pregunta == True: print 'Eres afortunado' if pregunta == False: print 'Trabajas fuera de casa' tiempo = input('Cuantos minutos haces al trabajo: ') if tiempo == 0: print 'trabajas desde casa' elif tiempo <=20: print 'Es poco tiempo' elif tiempo >= 21 and tiempo <=45: print 'Es un tiempo razonable' else: print 'Busca otras rutas'
20.26087
57
0.583691
56
466
4.857143
0.589286
0.095588
0.125
0
0
0
0
0
0
0
0
0.022293
0.32618
466
22
58
21.181818
0.843949
0
0
0
0
0
0.371041
0
0
0
0
0
0
0
null
null
0
0
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
b9fd9ad743eac1d46c7b5d951facfcfa09dbb1bf
3,778
py
Python
src/sentry/options/defaults.py
faulkner/sentry
f9dd4d0d7c683632cf02810c03bd42d7051ad010
[ "BSD-3-Clause" ]
null
null
null
src/sentry/options/defaults.py
faulkner/sentry
f9dd4d0d7c683632cf02810c03bd42d7051ad010
[ "BSD-3-Clause" ]
null
null
null
src/sentry/options/defaults.py
faulkner/sentry
f9dd4d0d7c683632cf02810c03bd42d7051ad010
[ "BSD-3-Clause" ]
null
null
null
""" sentry.options.defaults ~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function from sentry.logging import LoggingFormat from sentry.options import ( FLAG_IMMUTABLE, FLAG_NOSTORE, FLAG_PRIORITIZE_DISK, FLAG_REQUIRED, FLAG_ALLOW_EMPTY, register, ) from sentry.utils.types import Dict, String, Sequence # Cache # register('cache.backend', flags=FLAG_NOSTORE) # register('cache.options', type=Dict, flags=FLAG_NOSTORE) # System register('system.admin-email', flags=FLAG_REQUIRED) register('system.support-email', flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK) register('system.security-email', flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK) register('system.databases', type=Dict, flags=FLAG_NOSTORE) # register('system.debug', default=False, flags=FLAG_NOSTORE) register('system.rate-limit', default=0, flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK) register('system.secret-key', flags=FLAG_NOSTORE) # Absolute URL to the sentry root directory. Should not include a trailing slash. register('system.url-prefix', ttl=60, grace=3600, flags=FLAG_REQUIRED | FLAG_PRIORITIZE_DISK) register('system.root-api-key', flags=FLAG_PRIORITIZE_DISK) register('system.logging-format', default=LoggingFormat.HUMAN, flags=FLAG_NOSTORE) # Redis register( 'redis.clusters', type=Dict, default={ 'default': { 'hosts': { 0: { 'host': '127.0.0.1', 'port': 6379, } }, }, }, flags=FLAG_NOSTORE | FLAG_IMMUTABLE ) register('redis.options', type=Dict, flags=FLAG_NOSTORE) # symbolizer specifics register('dsym.cache-path', type=String, default='/tmp/sentry-dsym-cache') # Mail register('mail.backend', default='smtp', flags=FLAG_NOSTORE) register('mail.host', default='localhost', flags=FLAG_REQUIRED | FLAG_PRIORITIZE_DISK) register('mail.port', default=25, flags=FLAG_REQUIRED | FLAG_PRIORITIZE_DISK) register('mail.username', flags=FLAG_REQUIRED | FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK) register('mail.password', flags=FLAG_REQUIRED | FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK) register('mail.use-tls', default=False, flags=FLAG_REQUIRED | FLAG_PRIORITIZE_DISK) register('mail.subject-prefix', default='[Sentry] ', flags=FLAG_PRIORITIZE_DISK) register('mail.from', default='root@localhost', flags=FLAG_REQUIRED | FLAG_PRIORITIZE_DISK) register('mail.list-namespace', type=String, default='localhost', flags=FLAG_NOSTORE) register('mail.enable-replies', default=False, flags=FLAG_PRIORITIZE_DISK) register('mail.reply-hostname', default='', flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK) register('mail.mailgun-api-key', default='', flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK) # SMS register('sms.twilio-account', default='', flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK) register('sms.twilio-token', default='', flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK) register('sms.twilio-number', default='', flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK) # U2F register('u2f.app-id', default='', flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK) register('u2f.facets', default=(), type=Sequence, flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK) register('auth.ip-rate-limit', default=0, flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK) register('auth.user-rate-limit', default=0, flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK) register('api.rate-limit.org-create', default=5, flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK) # Filestore register('filestore.backend', default='filesystem', flags=FLAG_NOSTORE) register('filestore.options', default={'location': '/tmp/sentry-files'}, flags=FLAG_NOSTORE)
43.425287
95
0.75172
491
3,778
5.560081
0.250509
0.118681
0.158242
0.190476
0.515751
0.445055
0.396703
0.367399
0.299267
0.198535
0
0.01011
0.109846
3,778
86
96
43.930233
0.801665
0.125993
0
0
0
0
0.207128
0.027109
0
0
0
0
0
1
0
true
0.017857
0.071429
0
0.071429
0.017857
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
1
0
0
0
0
0
0
2
6a05188139a9d21e9e36ba6e3d3eb0801c8187c7
416
py
Python
cloudkeeperV1/plugins/cleanup_aws_loadbalancers/test/test_args.py
mesosphere/cloudkeeper
11be262df5874c1033cfec9964bba1596cab6a36
[ "Apache-2.0" ]
99
2020-04-15T22:56:34.000Z
2021-06-13T15:04:55.000Z
cloudkeeperV1/plugins/cleanup_aws_loadbalancers/test/test_args.py
mesosphere/cloudkeeper
11be262df5874c1033cfec9964bba1596cab6a36
[ "Apache-2.0" ]
null
null
null
cloudkeeperV1/plugins/cleanup_aws_loadbalancers/test/test_args.py
mesosphere/cloudkeeper
11be262df5874c1033cfec9964bba1596cab6a36
[ "Apache-2.0" ]
14
2020-04-14T22:13:59.000Z
2021-04-05T16:42:31.000Z
from cklib.args import get_arg_parser, ArgumentParser from cloudkeeper_plugin_cleanup_aws_loadbalancers import CleanupAWSLoadbalancersPlugin def test_args(): arg_parser = get_arg_parser() CleanupAWSLoadbalancersPlugin.add_args(arg_parser) arg_parser.parse_args() assert ArgumentParser.args.cleanup_aws_loadbalancers is False assert ArgumentParser.args.cleanup_aws_loadbalancers_age == "7 days"
37.818182
86
0.834135
50
416
6.56
0.48
0.137195
0.210366
0.189024
0.286585
0.286585
0
0
0
0
0
0.00271
0.112981
416
10
87
41.6
0.886179
0
0
0
0
0
0.014423
0
0
0
0
0
0.25
1
0.125
false
0
0.25
0
0.375
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
6a15c95427effad3d19c61b8dfdb12b52e2999fa
649
py
Python
backend/accounts/migrations/0003_auto_20201115_1537.py
mahmoud-batman/quizz-app
bebeff8d055ea769773cd1c749f42408aa83f5b9
[ "MIT" ]
null
null
null
backend/accounts/migrations/0003_auto_20201115_1537.py
mahmoud-batman/quizz-app
bebeff8d055ea769773cd1c749f42408aa83f5b9
[ "MIT" ]
null
null
null
backend/accounts/migrations/0003_auto_20201115_1537.py
mahmoud-batman/quizz-app
bebeff8d055ea769773cd1c749f42408aa83f5b9
[ "MIT" ]
null
null
null
# Generated by Django 3.1.2 on 2020-11-15 15:37 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0002_auto_20201115_1531'), ] operations = [ migrations.AlterField( model_name='customuser', name='user_id', field=models.IntegerField(blank=True, null=True, unique=True, validators=[django.core.validators.MaxValueValidator(99999), django.core.validators.MinValueValidator(10000), django.core.validators.MinLengthValidator(5), django.core.validators.MaxLengthValidator(5)]), ), ]
32.45
277
0.697997
71
649
6.309859
0.647887
0.111607
0.223214
0
0
0
0
0
0
0
0
0.081132
0.183359
649
19
278
34.157895
0.764151
0.069337
0
0
1
0
0.079734
0.038206
0
0
0
0
0
1
0
false
0
0.153846
0
0.384615
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
6a1710262c6a5f82f36fe3fcc5a0ae77374c7e1e
148
py
Python
noxfile.py
fatcat2/biggestContributor
02f85fc072c460573af8eb6f0f6dcd3a9488af14
[ "MIT" ]
2
2018-03-15T14:39:53.000Z
2018-03-15T20:34:14.000Z
noxfile.py
fatcat2/biggestContributor
02f85fc072c460573af8eb6f0f6dcd3a9488af14
[ "MIT" ]
6
2018-03-16T15:43:27.000Z
2020-05-19T19:42:32.000Z
noxfile.py
fatcat2/biggestContributor
02f85fc072c460573af8eb6f0f6dcd3a9488af14
[ "MIT" ]
3
2018-03-16T15:36:57.000Z
2020-05-19T19:34:47.000Z
import nox FILE_PATHS = ["utils", "main.py"] @nox.session def format(session): session.install("black") session.run("black", *FILE_PATHS)
16.444444
37
0.675676
20
148
4.9
0.65
0.183673
0
0
0
0
0
0
0
0
0
0
0.148649
148
8
38
18.5
0.777778
0
0
0
0
0
0.148649
0
0
0
0
0
0
1
0.166667
false
0
0.166667
0
0.333333
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
6a240de4a4b62bd30eb577321f80af837069962e
2,029
py
Python
backends/search/__init__.py
dev-easyshares/company
61842839121f308619c59a8f52ab76c8b9dcdd30
[ "MIT" ]
null
null
null
backends/search/__init__.py
dev-easyshares/company
61842839121f308619c59a8f52ab76c8b9dcdd30
[ "MIT" ]
null
null
null
backends/search/__init__.py
dev-easyshares/company
61842839121f308619c59a8f52ab76c8b9dcdd30
[ "MIT" ]
null
null
null
from company.choices import fr as choices from mighty.errors import BackendError import datetime, logging logger = logging.getLogger(__name__) CHOICES_APE = dict(choices.APE) CHOICES_LEGALFORM = dict(choices.LEGALFORM) CHOICES_SLICE = dict(choices.SLICE_EFFECTIVE) class SearchBackend: message = None since_format = None iso_format = '%Y-%m-%dT%H:%M:%S.%f%z' def in_error(self, message): self.message = message def backend_error(self, msg): raise BackendError(msg) def companies(self, companies, response_code): if str(response_code)[0] == '4': self.in_error(companies[0]['message']) elif str(response_code)[0] == '5': self.in_error('error server') return companies def get_ape_str(self, code): try: return CHOICES_APE[code] except Exception: pass return code def get_legalform_str(self, code): try: code = int(code) return CHOICES_LEGALFORM[code] except Exception: pass return code def get_slice_str(self, code): try: return CHOICES_SLICE[code] except Exception: pass return code def lastupdate(self, date): return datetime.datetime.strptime(date, self.iso_format).strftime("%Y-%m-%d") def since(self, date): logger.warning(date) return datetime.datetime.strptime(date, self.since_format).strftime("%Y-%m-%d") def get_companies(self, companies, response_code): raise NotImplementedError("Subclasses should implement get_companies()") def get_company_by_siren(self, siren): raise NotImplementedError("Subclasses should implement get_company_by_siren()") def get_company_by_fulltext(self, fulltext): raise NotImplementedError("Subclasses should implement get_company_by_fulltext()") def get_active_companies(self, fulltext): raise NotImplementedError("Subclasses should implement get_active_companies()")
31.215385
90
0.670281
245
2,029
5.359184
0.289796
0.031988
0.10358
0.121858
0.464585
0.412795
0.301599
0.210206
0
0
0
0.003209
0.232134
2,029
65
91
31.215385
0.839538
0
0
0.235294
0
0
0.125616
0.044828
0
0
0
0
0
1
0.235294
false
0.058824
0.058824
0.019608
0.54902
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