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
7c064547ee317bb0ee4b5cdf5223b837a5a7f321
56
py
Python
src/rstatmon/random_int.py
git-ogawa/raspi-statmon
619d7a8f697cad92437e2f558de2e0a626b5072f
[ "BSD-3-Clause" ]
null
null
null
src/rstatmon/random_int.py
git-ogawa/raspi-statmon
619d7a8f697cad92437e2f558de2e0a626b5072f
[ "BSD-3-Clause" ]
null
null
null
src/rstatmon/random_int.py
git-ogawa/raspi-statmon
619d7a8f697cad92437e2f558de2e0a626b5072f
[ "BSD-3-Clause" ]
null
null
null
import random i = random.random() print(i) #"print(50)
9.333333
19
0.678571
9
56
4.222222
0.555556
0
0
0
0
0
0
0
0
0
0
0.041667
0.142857
56
5
20
11.2
0.75
0.178571
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0.333333
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
1
0
0
0
0
3
9fd42b97c34b13a93659d6be724c9aa1ca2315f7
161
py
Python
piccolo/apps/asgi/piccolo_app.py
coder3112/piccolo
f5f72c6b24782f1b6e04c31549654cd27fd3a148
[ "MIT" ]
null
null
null
piccolo/apps/asgi/piccolo_app.py
coder3112/piccolo
f5f72c6b24782f1b6e04c31549654cd27fd3a148
[ "MIT" ]
null
null
null
piccolo/apps/asgi/piccolo_app.py
coder3112/piccolo
f5f72c6b24782f1b6e04c31549654cd27fd3a148
[ "MIT" ]
null
null
null
from piccolo.conf.apps import AppConfig from .commands.new import new APP_CONFIG = AppConfig( app_name="asgi", migrations_folder_path="", commands=[new] )
20.125
62
0.757764
22
161
5.363636
0.681818
0.186441
0
0
0
0
0
0
0
0
0
0
0.130435
161
7
63
23
0.842857
0
0
0
0
0
0.024845
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
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
1
0
0
0
0
3
9fe0c3e55237ae1a6b07343eeaec55d0c2e90bd3
789
py
Python
envs/d4rl/oracle/dummy_advice.py
AliengirlLiv/babyai
51421ee11538bf110c5b2d0c84a15f783d854e7d
[ "MIT" ]
2
2022-02-24T08:47:48.000Z
2022-03-23T09:44:22.000Z
envs/d4rl/oracle/dummy_advice.py
AliengirlLiv/babyai
51421ee11538bf110c5b2d0c84a15f783d854e7d
[ "MIT" ]
null
null
null
envs/d4rl/oracle/dummy_advice.py
AliengirlLiv/babyai
51421ee11538bf110c5b2d0c84a15f783d854e7d
[ "MIT" ]
1
2021-12-27T19:03:38.000Z
2021-12-27T19:03:38.000Z
import numpy as np from envs.d4rl.oracle.teacher import Teacher class DummyAdvice(Teacher): def __init__(self, *args, **kwargs): super(DummyAdvice, self).__init__(*args, **kwargs) # self.next_action = None def empty_feedback(self): """ Return a tensor corresponding to no feedback. """ return np.array([]) def random_feedback(self): """ Return a tensor corresponding to no feedback. """ return np.array([]) def compute_feedback(self, *args, **kwargs): """ Return the expert action from the previous timestep. """ return np.array([]) def success_check(self, *args, **kwargs): return False def feedback_condition(self): return False
24.65625
60
0.595691
88
789
5.181818
0.443182
0.087719
0.092105
0.105263
0.289474
0.289474
0.289474
0.289474
0.289474
0.289474
0
0.001792
0.292776
789
32
61
24.65625
0.815412
0.214195
0
0.333333
0
0
0
0
0
0
0
0
0
1
0.4
false
0
0.133333
0.133333
0.933333
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
1
0
0
3
9fed4bbc78710f68c6a6c129f348d88062a6fdd1
887
py
Python
core/preprocessing/base.py
mamalmaleki/machine-learning-a-z
22d812c72e3d1790e7b9d0979a5b07f249168a5f
[ "MIT" ]
null
null
null
core/preprocessing/base.py
mamalmaleki/machine-learning-a-z
22d812c72e3d1790e7b9d0979a5b07f249168a5f
[ "MIT" ]
null
null
null
core/preprocessing/base.py
mamalmaleki/machine-learning-a-z
22d812c72e3d1790e7b9d0979a5b07f249168a5f
[ "MIT" ]
null
null
null
import pandas as pd from sklearn.model_selection import train_test_split class BasePreprocessor(): def __init__(self, file_name): self._dataset = pd.read_csv(file_name) self._x = self._dataset.iloc[:, :-1].values self._y = self._dataset.iloc[:, -1].values def get_dataset(self): return self._dataset def get_x(self): return self._x def get_y(self): return self._y def train(self, test_size=0.2): self._x_train, self._x_test, self._y_train, self._y_test \ = train_test_split(self._x, self._y, test_size=test_size) def get_x_train(self): return self._x_train def get_x_test(self): return self._x_test def get_y_train(self): return self._y_train def get_y_test(self): return self._y_train class SimplePreprocessor(BasePreprocessor): pass
22.74359
69
0.655017
131
887
4.038168
0.251908
0.066163
0.185255
0.085066
0.15879
0
0
0
0
0
0
0.005988
0.2469
887
39
70
22.74359
0.785928
0
0
0.076923
0
0
0
0
0
0
0
0
0
1
0.346154
false
0.038462
0.076923
0.269231
0.769231
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
3
9feec2e06b180daf0b13736c95620fc13e2c8a50
194
py
Python
xue/classes/admin.py
team-xue/xue
e6bd9539803a2bf902f48b65a9df86356b5d46b2
[ "BSD-3-Clause" ]
1
2015-11-23T02:33:07.000Z
2015-11-23T02:33:07.000Z
xue/classes/admin.py
team-xue/xue
e6bd9539803a2bf902f48b65a9df86356b5d46b2
[ "BSD-3-Clause" ]
null
null
null
xue/classes/admin.py
team-xue/xue
e6bd9539803a2bf902f48b65a9df86356b5d46b2
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from xue.classes.models import * from django.contrib import admin admin.site.register(Major) admin.site.register(LogicalClass) # vim:ai:et:ts=4:sw=4:sts=4:fenc=utf-8
17.636364
38
0.721649
33
194
4.242424
0.69697
0.057143
0.242857
0
0
0
0
0
0
0
0
0.028902
0.108247
194
10
39
19.4
0.780347
0.298969
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
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
1
0
1
0
0
0
0
3
b02792b02c8236cc65aca48706d7909a87e126ee
1,170
py
Python
flit_core/flit_core/tests/test_versionno.py
ksunden/flit
5ed24842e614af813bd67ecf6ee918961fbf0ac2
[ "BSD-3-Clause" ]
1,642
2015-03-26T18:22:25.000Z
2021-12-01T00:10:52.000Z
flit_core/flit_core/tests/test_versionno.py
ksunden/flit
5ed24842e614af813bd67ecf6ee918961fbf0ac2
[ "BSD-3-Clause" ]
427
2015-03-16T20:22:17.000Z
2021-12-01T14:15:38.000Z
flit_core/flit_core/tests/test_versionno.py
ksunden/flit
5ed24842e614af813bd67ecf6ee918961fbf0ac2
[ "BSD-3-Clause" ]
110
2015-03-28T02:50:28.000Z
2021-11-27T09:36:37.000Z
import pytest from flit_core.common import InvalidVersion from flit_core.versionno import normalise_version def test_normalise_version(): nv = normalise_version assert nv('4.3.1') == '4.3.1' assert nv('1.0b2') == '1.0b2' assert nv('2!1.3') == '2!1.3' # Prereleases assert nv('1.0B2') == '1.0b2' assert nv('1.0.b2') == '1.0b2' assert nv('1.0beta2') == '1.0b2' assert nv('1.01beta002') == '1.1b2' assert nv('1.0-preview2') == '1.0rc2' assert nv('1.0_c') == '1.0rc0' # Post releases assert nv('1.0post-2') == '1.0.post2' assert nv('1.0post') == '1.0.post0' assert nv('1.0-rev3') == '1.0.post3' assert nv('1.0-2') == '1.0.post2' # Development versions assert nv('1.0dev-2') == '1.0.dev2' assert nv('1.0dev') == '1.0.dev0' assert nv('1.0-dev3') == '1.0.dev3' assert nv('1.0+ubuntu-01') == '1.0+ubuntu.1' assert nv('v1.3-pre2') == '1.3rc2' assert nv(' 1.2.5.6\t') == '1.2.5.6' assert nv('1.0-alpha3-post02+ubuntu_xenial_5') == '1.0a3.post2+ubuntu.xenial.5' with pytest.raises(InvalidVersion): nv('3!') with pytest.raises(InvalidVersion): nv('abc')
28.536585
83
0.573504
197
1,170
3.360406
0.28934
0.241692
0.231118
0.120846
0.20997
0.072508
0.072508
0.072508
0
0
0
0.138412
0.203419
1,170
40
84
29.25
0.571888
0.039316
0
0.068966
0
0
0.305357
0.053571
0
0
0
0
0.689655
1
0.034483
false
0
0.103448
0
0.137931
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
1
0
0
0
0
0
0
0
0
0
3
b0355df4d0557ea6b1c0005b55eca16851ac4de6
2,592
py
Python
app/upload_service.py
LowerSilesians/geo-geschenk
aee75d9a3d5fc6653a5c918530ab3ddfa0723926
[ "MIT" ]
1
2016-03-11T12:33:47.000Z
2016-03-11T12:33:47.000Z
app/upload_service.py
LowerSilesians/geo-geschenk
aee75d9a3d5fc6653a5c918530ab3ddfa0723926
[ "MIT" ]
null
null
null
app/upload_service.py
LowerSilesians/geo-geschenk
aee75d9a3d5fc6653a5c918530ab3ddfa0723926
[ "MIT" ]
null
null
null
from geosquizzy.squizzy import GeoSquizzy from pymongo import MongoClient import json from utils import get_data class UploadService: def __init__(self, request=None, session=None, url=None): self.data = self.__get__file(request=request, url=url) self.file_raw = self.__read__data__(data=self.data) self.file = self.__decode_file__(file=self.file_raw) self.mongo = MongoDBService(port=27017, url='localhost', db='test') self.mongo.save_doc(name=session, doc=self.file) self.geojson = GeoJSONService(geojson_doc_type="FeatureCollection", data=self.file) @staticmethod def __get__file(**kwargs): file = kwargs.get('request', None) if file is not None: return kwargs['request'].files['file'] else: return get_data(url=kwargs['url']) @staticmethod def __read__data__(data=None): return data.read() @staticmethod def __decode_file__(file=None): return file.decode('utf-8') def response(self): return self.geojson.get_data() class GeoJSONService: def __init__(self, geojson_doc_type=None, data=None): self.geo_squizzy = GeoSquizzy(geojson_doc_type=geojson_doc_type) self.geo_squizzy.geo_structure.start(geojson=data, is_doc=True) @staticmethod def __update_mongo__(key=None): key['keys'] = [x for x in key['keys'] if x != 'features'] return key def get_data(self): # we have to adjust keys to mongoDB features query return [self.__update_mongo__(key=x) for x in self.geo_squizzy.geo_structure.tree.get_all_leafs_paths()] class MongoDBService: def __init__(self, port=None, url=None, db=None, collection=None): self.client = MongoClient(url, port) self.db = self.client[db] if not (collection is None): self.collection = self.db[collection] def create_collection(self, name=None): return self.db[name] def convert_into_object(self, string=None): return json.loads(string) def make_search_query(self, query=None): query = {str.join('.', x['keys'][::-1]): x.get('search') for x in query if x.get('search', None) is not None} return self.__search__(query=query) def save_doc(self, name=None, doc=None): collection = self.create_collection(name=name) mongo_data = self.convert_into_object(string=doc) [collection.insert_one(x) for x in mongo_data['features']] def __search__(self, query=None): res = self.collection.find(query) return res
34.56
117
0.668981
351
2,592
4.666667
0.245014
0.029304
0.034188
0.012821
0.031746
0
0
0
0
0
0
0.003441
0.215278
2,592
75
118
34.56
0.801868
0.018519
0
0.070175
0
0
0.038144
0
0
0
0
0
0
1
0.245614
false
0
0.070175
0.105263
0.561404
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
1
0
0
3
b03aadfdbbb56089c9f71534a4007b8d00fee687
4,545
py
Python
test_discretization/test_svm.py
wsgan001/AnomalyDetection
397673dc6ce978361a3fc6f2fd34879f69bc962a
[ "MIT" ]
null
null
null
test_discretization/test_svm.py
wsgan001/AnomalyDetection
397673dc6ce978361a3fc6f2fd34879f69bc962a
[ "MIT" ]
null
null
null
test_discretization/test_svm.py
wsgan001/AnomalyDetection
397673dc6ce978361a3fc6f2fd34879f69bc962a
[ "MIT" ]
1
2020-03-16T21:50:52.000Z
2020-03-16T21:50:52.000Z
import pandas as pd import math import random from sklearn import svm headerfile = './nslkdd/data/kddcup.names' datfile = './nslkdd/data/KDDTrain+_20Percent.txt' headers=open(headerfile,'r').readlines()[1:] headers = [h.split(':')[0] for h in headers] headers.append('attack') headers.append('attack_idx') df = pd.read_csv(open(datfile), names=headers) df.iloc[0] # convert attack labels to integer index attacks=open(headerfile,'r').readline().replace('.\n','').split(',') for i in range(len(attacks)): df['attack'][df['attack']==attacks[i]]=i # convert protocol_type to integer index pt=list(set(df['protocol_type'])) for i in range(len(pt)): df['protocol_type'][df['protocol_type']==pt[i]]=i # convert service to integer index pt=list(set(df['service'])) for i in range(len(pt)): df['service'][df['service']==pt[i]]=i # convert flag to integer index pt=list(set(df['flag'])) for i in range(len(pt)): df['flag'][df['flag']==pt[i]]=i # scale big nums to log2 count scaled=['duration','src_bytes','dst_bytes','num_root','num_compromised','num_file_creations','count','srv_count','dst_host_count', 'dst_host_srv_count'] for i in range(len(scaled)): for j in range(df.shape[0]): df[scaled[i]].iloc[j]=int(math.log(1+df[scaled[i]].iloc[j],2)) df.iloc[0] # don't include last field, difficulty flag is meta data for i in range(len(headers)): print headers[i], max(df[headers[i]]) df.shape # 25192, 43 # idx = [i for i in range(df.shape[0])] import random random.shuffle(idx) ptr=20000 idxTrain=idx[0:ptr] idxTest=idx[ptr:len(idx)] xTrain = df.iloc[idxTrain,1:41] yTrain = df.iloc[idxTrain,41] xTest = df.iloc[idxTest,1:41] yTest = df.iloc[idxTest,41] clf = svm.SVC() clf.fit(xTrain, yTrain) preds = clf.predict(xTest) #divisor = sum(yTest==11) tp = 0 tn = 0 fp = 0 fn = 0 for i in range(len(preds)): if preds[i]==11 and yTest.iloc[i] == 11: tp = tp + 1 if preds[i]!=11 and yTest.iloc[i] != 11: tn = tn + 1 if preds[i]!=11 and yTest.iloc[i] == 11: fn = fn + 1 if preds[i]==11 and yTest.iloc[i] != 11: fp = fp + 1 print tp print tn print fp print fn #accuracy=clf.accuracy( ## 2804 11 in preds; 2794 11 in yTest ## TN .997 #1.0*sum([preds[i]==11 and yTest.iloc[i] == 11 for i in range(len(preds))]) / sum (yTest==11)*1.0 # ## TP .9929 #1.0*sum([preds[i]!=11 and yTest.iloc[i] != 11 for i in range(len(preds))]) / sum (yTest!=11)*1.0 # ## FN .003 #1.0*sum([preds[i]!=11 and yTest.iloc[i] == 11 for i in range(len(preds))]) / sum (yTest==11)*1.0 # ## FP .007 #1.0*sum([preds[i]==11 and yTest.iloc[i] != 11 for i in range(len(preds))]) / sum (yTest!=11)*1.0 for s in set(yTest): # TN .997 attacks[s], s, sum(yTest==s), 1.*sum([preds[i]==s and yTest.iloc[i] == s for i in range(len(preds))]) / sum (yTest==s)*1.0, 1.*sum([preds[i]!=s and yTest.iloc[i] != s for i in range(len(preds))]) / sum (yTest!=s)*1.0 from sklearn.metrics import confusion_matrix confusion_matrix(list(yTest), list(preds)) ''' array([[ 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 132, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 1731, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 29, 0, 0, 37, 1, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 3, 0, 2, 8, 2761, 0, 0, 0, 0, 0, 0, 0, 3], [ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0], [ 0, 0, 1, 0, 6, 0, 1, 0, 0, 111, 0, 1, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 3, 0, 1, 0, 0, 0, 0, 144, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0], [ 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 22]]) '''
34.172932
224
0.480088
774
4,545
2.79199
0.180879
0.15826
0.209625
0.246182
0.414623
0.368348
0.357242
0.291069
0.291069
0.275798
0
0.123324
0.327393
4,545
132
225
34.431818
0.583579
0.163256
0
0.106061
0
0
0.124177
0.027644
0
0
0
0
0
0
null
null
0
0.090909
null
null
0.075758
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
1
0
0
0
0
0
0
0
0
3
b051a718795026bc308f195e213eec77fd429171
184
py
Python
python_solutions/numpy/Inner and Outer.py
ersincebi/hackerrank
9475c8e88e9071544c10a939fe7307c8e62fe3a0
[ "MIT" ]
null
null
null
python_solutions/numpy/Inner and Outer.py
ersincebi/hackerrank
9475c8e88e9071544c10a939fe7307c8e62fe3a0
[ "MIT" ]
null
null
null
python_solutions/numpy/Inner and Outer.py
ersincebi/hackerrank
9475c8e88e9071544c10a939fe7307c8e62fe3a0
[ "MIT" ]
null
null
null
import numpy as np toInt = lambda x: list(map(int, x.strip().split())) A = np.array([toInt(input())]) B = np.array([toInt(input())]) print(np.inner(A, B)[0,0]) print(np.outer(A, B))
20.444444
51
0.619565
35
184
3.257143
0.571429
0.122807
0.210526
0.298246
0
0
0
0
0
0
0
0.012346
0.119565
184
9
52
20.444444
0.691358
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.166667
0
0.166667
0.333333
0
0
0
null
0
1
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
3
b05baf2e414031ea2f5c1a269a99b13d86ec524a
170
py
Python
prova02/questao01.py
RamonBomfim/lab-de-prog2
fdc054cf092cd1a06d34a2bdc0edcb5826f79775
[ "MIT" ]
null
null
null
prova02/questao01.py
RamonBomfim/lab-de-prog2
fdc054cf092cd1a06d34a2bdc0edcb5826f79775
[ "MIT" ]
null
null
null
prova02/questao01.py
RamonBomfim/lab-de-prog2
fdc054cf092cd1a06d34a2bdc0edcb5826f79775
[ "MIT" ]
null
null
null
def calcular(a, b): if (a > b): total = a * b elif (a == b): total = a * (b + 2) else: total = a print(total) calcular(10, 10)
13.076923
27
0.411765
25
170
2.8
0.44
0.142857
0.2
0.228571
0.257143
0
0
0
0
0
0
0.051546
0.429412
170
12
28
14.166667
0.670103
0
0
0
0
0
0
0
0
0
0
0
0
1
0.111111
false
0
0
0
0.111111
0.111111
1
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
3
c67aa9d2f3d66a14ff0ce79951866368734a7c25
276
py
Python
dynamic_image_networks/hmdb51/utilities/calculate_training_metrics.py
DoranLyong/dynamic-images-for-action-recognition
06a68c2337b45c44a8c7ec50e94585a9b9615ad0
[ "MIT" ]
22
2018-09-14T00:32:41.000Z
2020-10-23T11:19:12.000Z
dynamic_image_networks/hmdb51/utilities/calculate_training_metrics.py
DoranLyong/dynamic-images-for-action-recognition
06a68c2337b45c44a8c7ec50e94585a9b9615ad0
[ "MIT" ]
1
2020-07-08T03:10:54.000Z
2020-07-13T19:04:26.000Z
dynamic_image_networks/hmdb51/utilities/calculate_training_metrics.py
DoranLyong/dynamic-images-for-action-recognition
06a68c2337b45c44a8c7ec50e94585a9b9615ad0
[ "MIT" ]
7
2018-11-01T02:32:09.000Z
2020-10-03T12:19:02.000Z
import torch import numpy as np def calculate_accuracy(y_pred, y_true): # Inspired from https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html. _, predicted = torch.max(y_pred, 1) acc = (predicted == y_true).sum().item() / len(y_pred) return acc
27.6
87
0.710145
41
276
4.585366
0.731707
0.079787
0
0
0
0
0
0
0
0
0
0.012987
0.163043
276
9
88
30.666667
0.800866
0.293478
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
3
c69187268fb4755676c5f0a1322e1a24d93ec526
39
py
Python
setup/brython/__init__.py
ranjian0/brython
6dd5f2e3e89638d1607f118cf25f6b0375890381
[ "BSD-3-Clause" ]
null
null
null
setup/brython/__init__.py
ranjian0/brython
6dd5f2e3e89638d1607f118cf25f6b0375890381
[ "BSD-3-Clause" ]
null
null
null
setup/brython/__init__.py
ranjian0/brython
6dd5f2e3e89638d1607f118cf25f6b0375890381
[ "BSD-3-Clause" ]
null
null
null
__version__ = implementation = "3.10.1"
39
39
0.74359
5
39
5
1
0
0
0
0
0
0
0
0
0
0
0.114286
0.102564
39
1
39
39
0.6
0
0
0
0
0
0.15
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
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
3
c692d18861e644fb677d567ff36aadbc1246048e
424
py
Python
2020-05-17-python-pytest/examples/test_code.py
Cheukting/python02hero
da6f0f0c1455237b47923a9a1ac6f10562034f9f
[ "MIT" ]
12
2020-05-12T06:56:00.000Z
2021-07-06T11:43:46.000Z
2020-05-17-python-pytest/examples/test_code.py
Cheukting/python02hero
da6f0f0c1455237b47923a9a1ac6f10562034f9f
[ "MIT" ]
1
2021-01-30T16:48:42.000Z
2021-04-03T00:40:12.000Z
2020-05-17-python-pytest/examples/test_code.py
Cheukting/python02hero
da6f0f0c1455237b47923a9a1ac6f10562034f9f
[ "MIT" ]
3
2020-04-27T07:02:19.000Z
2021-07-06T11:43:48.000Z
import pytest from .code import * class TestPub: def test_serve_beer_legal(self): adult = 25 assert serve_beer(adult) == "Have beer" def test_serve_beer_illegal(self): child = 10 assert serve_beer(child) == "No beer" def test_serve_beer_no_age(self): with pytest.raises(ValueError, match="Tell me your age"): age = None serve_beer(age)
23.555556
65
0.610849
56
424
4.392857
0.517857
0.219512
0.146341
0.195122
0.162602
0
0
0
0
0
0
0.013514
0.301887
424
17
66
24.941176
0.817568
0
0
0
0
0
0.075472
0
0
0
0
0
0.153846
1
0.230769
false
0
0.153846
0
0.461538
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
3
c6a0da5cd31f2a9ab7aaac6a1be81d3fdb848af8
462
py
Python
fastapi-alembic-sqlmodel-async/app/api/api_v1/api.py
jonra1993/fastapi-alembic-sqlmodel-async
55c8a127bf17e6e5de95047a54a0ef913511f2d9
[ "MIT" ]
15
2022-03-07T05:57:01.000Z
2022-03-25T14:08:56.000Z
fastapi-alembic-sqlmodel-async/app/api/api_v1/api.py
jonra1993/fastapi-alembic-sqlmodel-async
55c8a127bf17e6e5de95047a54a0ef913511f2d9
[ "MIT" ]
null
null
null
fastapi-alembic-sqlmodel-async/app/api/api_v1/api.py
jonra1993/fastapi-alembic-sqlmodel-async
55c8a127bf17e6e5de95047a54a0ef913511f2d9
[ "MIT" ]
1
2022-03-08T04:54:14.000Z
2022-03-08T04:54:14.000Z
from fastapi import APIRouter from app.api.api_v1.endpoints import user, hero, team, login, role, group api_router = APIRouter() api_router.include_router(login.router, tags=['login_form']) api_router.include_router(role.router, tags=['role']) api_router.include_router(user.router, tags=['user']) api_router.include_router(group.router, tags=['group']) api_router.include_router(team.router, tags=['team']) api_router.include_router(hero.router, tags=['hero'])
46.2
73
0.785714
69
462
5.043478
0.26087
0.181034
0.275862
0.37931
0
0
0
0
0
0
0
0.002304
0.060606
462
9
74
51.333333
0.799539
0
0
0
0
0
0.0671
0
0
0
0
0
0
1
0
false
0
0.222222
0
0.222222
0
0
0
0
null
0
1
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
3
c6b1a8d5a063816aac0ae6a76851b33a16661b1a
461
py
Python
src/openprocurement/tender/location/tests/tender.py
BohdanBorkivskyi/openprocurement.api
9f4134a15243f8a82a28de72c5ffac6f16e7f06b
[ "Apache-2.0" ]
null
null
null
src/openprocurement/tender/location/tests/tender.py
BohdanBorkivskyi/openprocurement.api
9f4134a15243f8a82a28de72c5ffac6f16e7f06b
[ "Apache-2.0" ]
null
null
null
src/openprocurement/tender/location/tests/tender.py
BohdanBorkivskyi/openprocurement.api
9f4134a15243f8a82a28de72c5ffac6f16e7f06b
[ "Apache-2.0" ]
null
null
null
import unittest from copy import deepcopy from openprocurement.api.tests.base import snitch from openprocurement.tender.location.tests.base import test_tender_data, BaseApiWebTest from openprocurement.tender.location.tests.tender_blanks import create_tender tender_data = deepcopy(test_tender_data) class TenderTest(BaseApiWebTest): initial_data = tender_data initial_auth = ("Basic", ("broker", "")) test_create_tender = snitch(create_tender)
28.8125
87
0.81128
57
461
6.333333
0.403509
0.110803
0.083102
0.182825
0.210526
0
0
0
0
0
0
0
0.112798
461
15
88
30.733333
0.882641
0
0
0
0
0
0.023861
0
0
0
0
0
0
1
0
false
0
0.5
0
0.9
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
1
0
1
0
0
3
c6b25dc2f61f06fb3348a1ba99464e08a3d476a4
56
py
Python
cotidia/stripe/__init__.py
guillaumepiot/cotidia-stripe
f23329e8363c3d8577acf9633966d6af61c090eb
[ "BSD-3-Clause" ]
null
null
null
cotidia/stripe/__init__.py
guillaumepiot/cotidia-stripe
f23329e8363c3d8577acf9633966d6af61c090eb
[ "BSD-3-Clause" ]
null
null
null
cotidia/stripe/__init__.py
guillaumepiot/cotidia-stripe
f23329e8363c3d8577acf9633966d6af61c090eb
[ "BSD-3-Clause" ]
null
null
null
default_app_config = 'cotidia.stripe.apps.StripeConfig'
28
55
0.839286
7
56
6.428571
1
0
0
0
0
0
0
0
0
0
0
0
0.053571
56
1
56
56
0.849057
0
0
0
0
0
0.571429
0.571429
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
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
c6b714b1307ffae42b91d2acf7253e138b1d3278
16,500
py
Python
sppas/sppas/src/anndata/anndataexc.py
mirfan899/MTTS
3167b65f576abcc27a8767d24c274a04712bd948
[ "MIT" ]
null
null
null
sppas/sppas/src/anndata/anndataexc.py
mirfan899/MTTS
3167b65f576abcc27a8767d24c274a04712bd948
[ "MIT" ]
null
null
null
sppas/sppas/src/anndata/anndataexc.py
mirfan899/MTTS
3167b65f576abcc27a8767d24c274a04712bd948
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- """ .. --------------------------------------------------------------------- ___ __ __ __ ___ / | \ | \ | \ / the automatic \__ |__/ |__/ |___| \__ annotation and \ | | | | \ analysis ___/ | | | | ___/ of speech http://www.sppas.org/ Use of this software is governed by the GNU Public License, version 3. SPPAS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. SPPAS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with SPPAS. If not, see <http://www.gnu.org/licenses/>. This banner notice must not be removed. --------------------------------------------------------------------- src.anndata.anndataexc.py ~~~~~~~~~~~~~~~~~~~~~~~~~~ Exceptions for anndata package. :author: Brigitte Bigi :organization: Laboratoire Parole et Langage, Aix-en-Provence, France :contact: contact@sppas.org :license: GPL, v3 :copyright: Copyright (C) 2011-2018 Brigitte Bigi """ from sppas.src.config import sg from sppas.src.config import error # ----------------------------------------------------------------------- class AnnDataError(Exception): """:ERROR 1000:. No annotated data file is defined. """ def __init__(self): self.parameter = error(1000) + (error(1000, "anndata")) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class AnnDataEqError(Exception): """:ERROR 1010:. Values are expected to be equals but are {:s!s} and {:s!s}. """ def __init__(self, v1, v2): self.parameter = error(1010) + \ (error(1010, "anndata")).format(v1, v2) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class AnnDataTypeError(TypeError): """:ERROR 1100:. {!s:s} is not of the expected type '{:s}'. """ def __init__(self, rtype, expected): self.parameter = error(1100) + \ (error(1100, "anndata")).format(rtype, expected) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class AnnUnkTypeError(TypeError): """:ERROR 1050:. {!s:s} is not a valid type. """ def __init__(self, rtype): self.parameter = error(1050) + \ (error(1050, "anndata")).format(rtype) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class AnnDataIndexError(IndexError): """:ERROR 1200:. Invalid index value {:d}. """ def __init__(self, index): self.parameter = error(1200) + \ (error(1200, "anndata")).format(index) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class AnnDataEqTypeError(TypeError): """:ERROR 1105:. {!s:s} is not of the same type as {!s:s}. """ def __init__(self, obj, obj_ref): self.parameter = error(1105) + \ (error(1105, "anndata")).format(obj, obj_ref) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class AnnDataValueError(ValueError): """:ERROR 1300:. Invalid value '{!s:s}' for '{!s:s}'. """ def __init__(self, data_name, value): self.parameter = error(1300) + \ (error(1300, "anndata")).format(value, data_name) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class AnnDataNegValueError(ValueError): """:ERROR 1310:. Expected a positive value. Got '{:f}'. """ def __init__(self, value): self.parameter = error(1310) + \ (error(1310, "anndata")).format(value) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class AnnDataKeyError(KeyError): """:ERROR 1250:. Invalid key '{!s:s}' for data '{!s:s}'. """ def __init__(self, data_name, value): self.parameter = error(1250) + \ (error(1250, "anndata")).format(value, data_name) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class IntervalBoundsError(ValueError): """:ERROR 1120:. The begin must be strictly lesser than the end in an interval. Got: [{:s};{:s}]. """ def __init__(self, begin, end): self.parameter = error(1120) + \ (error(1120, "anndata")).format(begin, end) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class CtrlVocabContainsError(ValueError): """:ERROR 1130:. {:s} is not part of the controlled vocabulary. """ def __init__(self, tag): self.parameter = error(1130) + \ (error(1130, "anndata")).format(tag) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class CtrlVocabSetTierError(ValueError): """:ERROR 1132:. The controlled vocabulary {:s} can't be associated to the tier {:s}. """ def __init__(self, vocab_name, tier_name): self.parameter = error(1132) + \ (error(1132, "anndata")).format(vocab_name, tier_name) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class TierAppendError(ValueError): """:ERROR 1140:. Can't append annotation. Current end {!s:s} is highest than the given one {!s:s}. """ def __init__(self, cur_end, ann_end): self.parameter = error(1140) + \ (error(1140, "anndata")).format(cur_end, ann_end) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class TierAddError(ValueError): """:ERROR 1142:. Can't add annotation. An annotation with the same location is already in the tier at index {:d}. """ def __init__(self, index): self.parameter = error(1142) + \ (error(1142, "anndata")).format(index) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class TierHierarchyError(ValueError): """:ERROR 1144:. Attempt a modification in tier '{:s}' that invalidates its hierarchy. """ def __init__(self, name): self.parameter = error(1144) + \ (error(1144, "anndata")).format(name) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class TrsAddError(ValueError): """:ERROR 1150:. Can't add: '{:s}' is already in '{:s}'. """ def __init__(self, tier_name, transcription_name): self.parameter = error(1150) + \ (error(1150, "anndata")).format( tier_name, transcription_name) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class TrsRemoveError(ValueError): """:ERROR 1152:. Can't remove: '{:s}' is not in '{:s}'. """ def __init__(self, tier_name, transcription_name): self.parameter = error(1152) + \ (error(1152, "anndata")).format(tier_name, transcription_name) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class TrsInvalidTierError(ValueError): """:ERROR 1160:. {:s} is not a tier of {:s}. It can't be included in its hierarchy. """ def __init__(self, tier_name, transcription_name): self.parameter = error(1160) + \ (error(1160, "anndata")).format(tier_name, transcription_name) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class HierarchyAlignmentError(ValueError): """:ERROR 1170:. Can't create a time alignment between tiers: '{:s}' is not a superset of '{:s}'." """ def __init__(self, parent_tier_name, child_tier_name): self.parameter = error(1170) + \ (error(1170, "anndata")).format(parent_tier_name, child_tier_name) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class HierarchyAssociationError(ValueError): """:ERROR 1172:. Can't create a time association between tiers: '{:s}' and '{:s}' are not supersets of each other. """ def __init__(self, parent_tier_name, child_tier_name): self.parameter = error(1172) + \ (error(1172, "anndata")).format(parent_tier_name, child_tier_name) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class HierarchyParentTierError(ValueError): """:ERROR 1174:. The tier can't be added into the hierarchy: '{:s}' has already a link of type {:s} with its parent tier '{:s}'. """ def __init__(self, child_tier_name, parent_tier_name, link_type): self.parameter = error(1174) + \ (error(1174, "anndata")).format(child_tier_name, parent_tier_name, link_type) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class HierarchyChildTierError(ValueError): """:ERROR 1176:. The tier '{:s}' can't be added into the hierarchy: a tier can't be its own child. """ def __init__(self, tier_name): self.parameter = error(1176) + \ (error(1176, "anndata")).format(tier_name) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class HierarchyAncestorTierError(ValueError): """:ERROR 1178:. The tier can't be added into the hierarchy: '{:s}' is an ancestor of '{:s}'. """ def __init__(self, child_tier_name, parent_tier_name): self.parameter = error(1178) + \ (error(1178, "anndata")).format(child_tier_name, parent_tier_name) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- # AIO # ----------------------------------------------------------------------- class AioError(IOError): """:ERROR 1400:. No such file: '{!s:s}'. """ def __init__(self, filename): self.parameter = error(1400) + \ (error(1400, "anndata")).format(filename) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class AioEncodingError(UnicodeDecodeError): """:ERROR 1500:. The file {filename} contains non {encoding} characters: {error}. """ def __init__(self, filename, error_msg, encoding=sg.__encoding__): self.parameter = error(1500) + \ (error(1500, "anndata")).format(filename=filename, error=error_msg, encoding=encoding) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class AioFileExtensionError(IOError): """:ERROR 1505:. Fail formats: unrecognized extension for file {:s}. """ def __init__(self, filename): self.parameter = error(1505) + \ (error(1505, "anndata")).format(filename) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class AioMultiTiersError(IOError): """:ERROR 1510:. The file format {!s:s} does not support multi-tiers. """ def __init__(self, file_format): self.parameter = error(1510) + \ (error(1510, "anndata")).format(file_format) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class AioNoTiersError(IOError): """:ERROR 1515:. The file format {!s:s} does not support to save no tiers. """ def __init__(self, file_format): self.parameter = error(1515) + \ (error(1515, "anndata")).format(file_format) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class AioLineFormatError(IOError): """:ERROR 1520:. Unexpected format string at line {:d}: '{!s:s}'. """ def __init__(self, number, line): self.parameter = error(1520) + \ (error(1520, "anndata")).format(number, line) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class AioFormatError(IOError): """:ERROR 1521:. Unexpected format about '{!s:s}'. """ def __init__(self, line): self.parameter = error(1521) + \ (error(1521, "anndata")).format(line) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class AioEmptyTierError(IOError): """:ERROR 1525:. The file format {!s:s} does not support to save empty tiers: {:s}. """ def __init__(self, file_format, tier_name): self.parameter = error(1525) + \ (error(1525, "anndata")).format(file_format, tier_name) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class AioLocationTypeError(TypeError): """:ERROR 1530:. The file format {!s:s} does not support tiers with {:s}. """ def __init__(self, file_format, location_type): self.parameter = error(1530) + \ (error(1530, "anndata")).format(file_format, location_type) def __str__(self): return repr(self.parameter) # ----------------------------------------------------------------------- class TagValueError(ValueError): """:ERROR 1190:. {!s:s} is not a valid tag. """ def __init__(self, tag_str): self.parameter = error(1190) + \ (error(1190, "anndata")).format(tag_str) def __str__(self): return repr(self.parameter)
26.066351
79
0.464667
1,483
16,500
4.91706
0.196224
0.117663
0.049781
0.072408
0.435134
0.387137
0.366566
0.358338
0.277153
0.219419
0
0.034417
0.274485
16,500
632
80
26.107595
0.574722
0.383939
0
0.396226
0
0
0.024372
0
0
0
0
0
0
1
0.311321
false
0
0.009434
0.15566
0.632075
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
1
0
0
3
c6c7dc9e22c5f8eb529bee396bd15a31c96c6e6d
2,100
py
Python
abides-markets/abides_markets/generators.py
jpmorganchase/ABIDES-jpmc-gym
198736a1b1316190072356c980412569579f15a6
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2021-09-23T13:17:26.000Z
2021-09-23T13:17:26.000Z
abides-markets/abides_markets/generators.py
jpmorganchase/ABIDES-gym
198736a1b1316190072356c980412569579f15a6
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
abides-markets/abides_markets/generators.py
jpmorganchase/ABIDES-gym
198736a1b1316190072356c980412569579f15a6
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
from abc import abstractmethod, ABC import numpy as np from abides_core.generators import BaseGenerator ################## ORDER SIZE MODEL ############################### class OrderSizeGenerator(BaseGenerator[int], ABC): pass class ConstantOrderSizeGenerator(OrderSizeGenerator): def __init__(self, order_size: int) -> None: self.order_size: int = order_size def next(self) -> int: return self.order_size def mean(self) -> int: return self.order_size class UniformOrderSizeGenerator(OrderSizeGenerator): def __init__( self, order_size_min: int, order_size_max: int, random_generator: np.random.RandomState, ) -> None: self.order_size_min: int = order_size_min self.order_size_max: int = order_size_max + 1 self.random_generator: np.random.RandomState = random_generator def next(self) -> int: return self.random_generator.randint(self.order_size_min, self.order_size_max) def mean(self) -> float: return (self.order_size_max - self.order_size_min - 1) / 2 ################## ORDER DEPTH MODEL ############################### class OrderDepthGenerator(BaseGenerator[int], ABC): pass class ConstantDepthGenerator(OrderDepthGenerator): def __init__(self, order_depth: int) -> None: self.order_depth: int = order_depth def next(self) -> int: return self.order_depth def mean(self) -> int: return self.order_depth class UniformDepthGenerator(OrderDepthGenerator): def __init__( self, order_depth_min: int, order_depth_max: int, random_generator: np.random.RandomState, ) -> None: self.random_generator: np.random.RandomState = random_generator self.order_depth_min: int = order_depth_min self.order_depth_max: int = order_depth_max + 1 def next(self) -> int: return self.random_generator.randint(self.order_depth_min, self.order_depth_max) def mean(self) -> float: return (self.order_depth_max - self.order_depth_min - 1) / 2
28.767123
88
0.658095
251
2,100
5.207171
0.159363
0.151492
0.109411
0.078041
0.679419
0.636572
0.524101
0.287682
0.157613
0.084162
0
0.003636
0.214286
2,100
72
89
29.166667
0.788485
0.016667
0
0.489796
0
0
0
0
0
0
0
0
0
1
0.244898
false
0.040816
0.061224
0.163265
0.591837
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
1
0
0
3
05a30d0dbff653653fc618df07ed749747a331ce
1,610
py
Python
plugin/settings.py
andykingking/sublime-format
d1d9e2192729ffdecf9f09e54bdfc2c13890542f
[ "MIT" ]
null
null
null
plugin/settings.py
andykingking/sublime-format
d1d9e2192729ffdecf9f09e54bdfc2c13890542f
[ "MIT" ]
null
null
null
plugin/settings.py
andykingking/sublime-format
d1d9e2192729ffdecf9f09e54bdfc2c13890542f
[ "MIT" ]
null
null
null
import sublime PLUGIN_NAME = 'Format' PLUGIN_SETTINGS = '{}.sublime-settings'.format(PLUGIN_NAME) class Settings: @staticmethod def load(): return sublime.load_settings(PLUGIN_SETTINGS) @staticmethod def save(): sublime.save_settings(PLUGIN_SETTINGS) @staticmethod def on_change(callback): Settings.load().add_on_change(PLUGIN_NAME, callback) @staticmethod def stop_listening_for_changes(): Settings.load().clear_on_change(PLUGIN_NAME) @staticmethod def formatter(name): return Settings.load().get('{}_formatter'.format(name), default={}) @staticmethod def paths(): return Settings.load().get('paths', default=[]) @staticmethod def update_formatter(name, value): Settings.load().set('{}_formatter'.format(name), value) Settings.save() class FormatterSettings: def __init__(self, name): self.__name = name self.__settings = Settings.formatter(name) def get(self, value, default=None): return self.__settings.get(value, default) def set(self, key, value): self.__settings[key] = value Settings.update_formatter(self.__name, self.__settings) @property def format_on_save(self): return self.get('format_on_save', default=False) @format_on_save.setter def format_on_save(self, value): return self.set('format_on_save', value) @property def sources(self): return self.get('sources', default=[]) @property def options(self): return self.get('options', default=[])
24.769231
75
0.660248
184
1,610
5.521739
0.206522
0.103346
0.059055
0.050197
0.110236
0
0
0
0
0
0
0
0.218634
1,610
64
76
25.15625
0.807631
0
0
0.212766
0
0
0.059627
0
0
0
0
0
0
1
0.297872
false
0
0.021277
0.170213
0.531915
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
1
0
0
3
05ddd3c3d096c1965705a10e40ccb156bd30be61
321
py
Python
test/ex1/ex1/common/misc.py
nrgxtra/web_framework
dd84968a77b84a03d66c5db190b28bffc479f05e
[ "MIT" ]
null
null
null
test/ex1/ex1/common/misc.py
nrgxtra/web_framework
dd84968a77b84a03d66c5db190b28bffc479f05e
[ "MIT" ]
null
null
null
test/ex1/ex1/common/misc.py
nrgxtra/web_framework
dd84968a77b84a03d66c5db190b28bffc479f05e
[ "MIT" ]
null
null
null
from ex1.expense_app.models import Expense from ex1.profile_app.models import Profile def get_profile(): return Profile.objects.first() def get_budget_left(): user = Profile.objects.first() expenses = Expense.objects.all() result = user.budget - sum([ex.price for ex in expenses]) return result
20.0625
61
0.722741
45
321
5.044444
0.511111
0.061674
0.132159
0
0
0
0
0
0
0
0
0.007576
0.17757
321
15
62
21.4
0.852273
0
0
0
0
0
0
0
0
0
0
0
0
1
0.222222
false
0
0.222222
0.111111
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
1
0
0
0
1
1
0
0
3
05df34fc367e1ccca6387acc1b54ed269d52abe7
21
py
Python
openstack_dashboard/dashboards/admin/systemlogs/__init__.py
xuweiliang/Codelibrary
54e45b2daa205132c05b0ff5a2c3db7fca2853a7
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/dashboards/admin/systemlogs/__init__.py
xuweiliang/Codelibrary
54e45b2daa205132c05b0ff5a2c3db7fca2853a7
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/dashboards/admin/systemlogs/__init__.py
xuweiliang/Codelibrary
54e45b2daa205132c05b0ff5a2c3db7fca2853a7
[ "Apache-2.0" ]
null
null
null
__author__ = 'Zero'
10.5
20
0.666667
2
21
5
1
0
0
0
0
0
0
0
0
0
0
0
0.190476
21
1
21
21
0.588235
0
0
0
0
0
0.2
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
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
3
05f95e2af6de14575c5e2a61d09d1dce5b1a1e4d
162
py
Python
CSCI3104_Question1_O(n^2).py
shng5175/Random-Python-Stuff
6b6687da9195a36244f7b22de7ba2984ce78995d
[ "bzip2-1.0.6" ]
null
null
null
CSCI3104_Question1_O(n^2).py
shng5175/Random-Python-Stuff
6b6687da9195a36244f7b22de7ba2984ce78995d
[ "bzip2-1.0.6" ]
null
null
null
CSCI3104_Question1_O(n^2).py
shng5175/Random-Python-Stuff
6b6687da9195a36244f7b22de7ba2984ce78995d
[ "bzip2-1.0.6" ]
null
null
null
a = [8, 10, 2, 5, 20, 1] count = 0 for i in range(len(a)): for j in range(i + 1, len(a)): if (a[i] > a[j]): count += 1 print count
20.25
35
0.425926
32
162
2.15625
0.53125
0.202899
0
0
0
0
0
0
0
0
0
0.11
0.382716
162
7
36
23.142857
0.58
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0.142857
0
0
0
null
1
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
3
05fa64741db475afdb8a2a8628222bd718e7bd0f
185
py
Python
src/api/models/article/author.py
nhardy/py-js-web-scaffold
adf3e3ada0b21cdb9620676de795579107442dd7
[ "MIT" ]
null
null
null
src/api/models/article/author.py
nhardy/py-js-web-scaffold
adf3e3ada0b21cdb9620676de795579107442dd7
[ "MIT" ]
null
null
null
src/api/models/article/author.py
nhardy/py-js-web-scaffold
adf3e3ada0b21cdb9620676de795579107442dd7
[ "MIT" ]
null
null
null
from ..base import BaseModel from ..href import HrefModel class AuthorModel(BaseModel): def init(self): self.add_property('name') self.add_model_property('link', HrefModel)
20.555556
46
0.740541
24
185
5.583333
0.666667
0.104478
0
0
0
0
0
0
0
0
0
0
0.145946
185
8
47
23.125
0.848101
0
0
0
0
0
0.043243
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
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
1
0
0
0
0
3
af2617356da33a1a2a443e9d75c0c43c7803552e
682
py
Python
forms.py
benjithorpe/puny
4429bb6c4b99a3a5839054d863609e9f87e3a2d5
[ "MIT" ]
null
null
null
forms.py
benjithorpe/puny
4429bb6c4b99a3a5839054d863609e9f87e3a2d5
[ "MIT" ]
null
null
null
forms.py
benjithorpe/puny
4429bb6c4b99a3a5839054d863609e9f87e3a2d5
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import StringField, SubmitField, PasswordField from wtforms.validators import DataRequired class LoginForm(FlaskForm): username = StringField("Username", validators=[DataRequired()]) password = PasswordField("Password", validators=[DataRequired()]) login_btn = SubmitField("Log In") class SignupForm(FlaskForm): fullname = StringField("Full Name", validators=[DataRequired()]) username = StringField("Username", validators=[DataRequired()]) email = StringField("Email", validators=[DataRequired()]) password = PasswordField("Password", validators=[DataRequired()]) signup_btn = SubmitField("Sign Up")
37.888889
69
0.747801
63
682
8.047619
0.428571
0.260355
0.106509
0.145957
0.43787
0.287968
0.287968
0
0
0
0
0
0.127566
682
17
70
40.117647
0.852101
0
0
0.307692
0
0
0.08651
0
0
0
0
0
0
1
0
false
0.230769
0.230769
0
1
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
1
0
0
1
0
0
3
af2b28257b96746d4ba4c68f60dc180d302ba0cc
6,083
py
Python
Lib/site-packages/numarray/random_array/dtest.py
raychorn/svn_Python-2.5.1
425005b1b489ba44ec0bb989e077297e8953d9be
[ "PSF-2.0" ]
null
null
null
Lib/site-packages/numarray/random_array/dtest.py
raychorn/svn_Python-2.5.1
425005b1b489ba44ec0bb989e077297e8953d9be
[ "PSF-2.0" ]
null
null
null
Lib/site-packages/numarray/random_array/dtest.py
raychorn/svn_Python-2.5.1
425005b1b489ba44ec0bb989e077297e8953d9be
[ "PSF-2.0" ]
null
null
null
""" >>> eps = 1e-4 >>> seed(104162795, 1578461743) >>> int((random()-0.0780920758843) < eps) 1 Average of 10000 random numbers >>> int((num.sum(random(10000))/10000. - 0.49829185756540684) < eps) 1 >>> x = random([10,1000]) >>> x.shape (10, 1000) >>> x.shape = 10000 Average of 100 by 100 random numbers >>> int((num.sum(x)/10000. - 0.50674083693527938) < eps) 1 >>> y = uniform(0.5,0.6, (1000,10)) >>> y.shape (1000, 10) >>> y.shape = 10000 >>> num.minimum.reduce(y) <= 0.5 0 >>> num.maximum.reduce(y) >= 0.6 0 >>> showint(randint(1, 10, shape=[50])) array([4, 8, 5, 4, 9, 7, 2, 8, 6, 2, 5, 9, 1, 4, 6, 2, 2, 1, 4, 4, 9, 1, 5, 5, 8, 6, 9, 5, 5, 7, 5, 2, 6, 9, 1, 3, 2, 3, 5, 2, 8, 9, 8, 4, 3, 6, 6, 1, 4, 9], type=Int32) >>> showint(permutation(10)) array([3, 9, 7, 2, 1, 6, 5, 4, 8, 0], type=Int32) >>> showint(randint(3,9)) array(5, type=Int32) >>> showint(random_integers(10, shape=[20])) array([ 3, 6, 10, 5, 6, 2, 4, 1, 10, 7, 4, 10, 2, 7, 8, 7, 4, 6, 9, 9], type=Int32) >>> s = 3.0; x = normal(2.0, s, [10, 1000]) >>> x.shape (10, 1000) >>> x.shape = 10000 >>> mean_var_test(x, "normally distributed numbers with mean 2 and variance %f"%(s**2,), 2, s**2, 0, 1.98057479, 8.96347252, 0.01992834, eps=eps) OK OK OK >>> mean_var_test(exponential(3, 10000), "random numbers exponentially distributed with mean %f"%(s,), s, s**2, 2, 2.97389160, 8.93841228, 1.93402556, eps=eps) OK OK OK A multivariate normal >>> x = multivariate_normal(num.array([10,20]), num.array(([1,2],[2,4]))); x array([ 9.95170432, 19.90340867]) >>> x.shape (2,) A 4x3x2 array containing multivariate normals >>> case(multivariate_normal(num.array([10,20]), num.array([[1,2],[2,4]]), [4,3]), ... num.array([[[ 10.78558756, 21.57117509], ... [ 8.81081523, 17.62163042], ... [ 10.48636767, 20.97273535]], ... [[ 9.75619604, 19.51239207], ... [ 9.24218798, 18.48437595], ... [ 10.38599356, 20.77198715]], ... [[ 11.93676401, 23.873528 ], ... [ 8.26186252, 16.52372503], ... [ 11.73060812, 23.46121621]], ... [[ 8.94173038, 17.88346076], ... [ 10.95564306, 21.91128612], ... [ 8.53284202, 17.06568409]]]), ... eps) OK Average of 10000 multivariate normals with mean [-100,0,100] >>> x = multivariate_normal(num.array([-100,0,100]), ... num.array([[3,2,1],[2,2,1],[1,1,1]]), 10000) >>> x_mean = num.sum(x)/10000. >>> x_minus_mean = x - x_mean Estimated covariance of 10000 multivariate normals with covariance [[3,2,1],[2,2,1],[1,1,1]] >>> case(num.matrixmultiply(num.transpose(x_minus_mean),x_minus_mean)/9999., ... num.array([[ 2.97686405, 1.98555651, 1.00144592], ... [ 1.98555651, 1.98528312, 0.99716822], ... [ 1.00144592, 0.99716822, 0.99382558]]), ... eps) OK >>> x = beta(5.0, 10.0, 10000) >>> mean_var_test(x, "beta(5.,10.) random numbers", 0.333, 0.014, [], ... 0.33464588, 0.01402210, eps=eps) OK OK >>> x = gamma(.01, 2., 10000) >>> mean_var_test(x, "gamma(.01,2.) random numbers", 2*100, 2*100*100, [], ... 200.10160522, 19908.49448647, eps=eps) OK OK >>> x = chi_square(11., 10000) >>> mean_var_test(x, "chi squared random numbers with 11 degrees of freedom", ... 11, 22, 2*num.sqrt(2./11.), ... 10.97071185, 21.70231540, 0.81841066, eps=eps) OK OK OK >>> x = F(5., 10., 10000) >>> mean_var_test(x, "F random numbers with 5 and 10 degrees of freedom", ... 1.25, 1.35, [], ... 1.24867357, 1.27926212, eps=eps) OK OK >>> x = poisson(50., 10000) >>> mean_var_test(x, "poisson random numbers with mean 50", 50, 50, 0.14, ... 50.03410000, 49.84952214, 0.13964030, eps=eps) OK OK OK Each element is the result of 16 binomial trials with probability 0.5: >>> binomial(16, 0.5, 16) array([ 5, 8, 6, 5, 7, 5, 4, 10, 6, 9, 7, 8, 10, 8, 5, 9]) Each element is the result of 16 negative binomial trials with probability 0.5: >>> negative_binomial(16, 0.5, [16,]) array([10, 8, 14, 11, 30, 17, 19, 9, 10, 23, 22, 16, 9, 15, 20, 17]) Each row is the result of 16 multinomial trials with probabilities [0.1, 0.5, 0.1 0.3]: >>> x = multinomial(16, [0.1, 0.5, 0.1], 8); x array([[ 2, 6, 4, 4], [ 1, 6, 4, 5], [ 1, 11, 1, 3], [ 0, 9, 2, 5], [ 0, 9, 3, 4], [ 2, 8, 3, 3], [ 0, 7, 3, 6], [ 2, 8, 4, 2]]) >>> num.sum(x)/8. # Mean array([ 1., 8., 3., 4.]) Using array arguments: >>> y = beta([5.0, 50.], [10.0, 100.0]) >>> int(y.shape in [(1,), (2,)]) 1 >>> y = beta([5.0, 50.], 10.0) >>> int(y.shape in [(1,), (2,)]) 1 >>> y = beta(5.0, [10.0, 100.0]) >>> int(y.shape in [(1,), (2,)]) 1 >>> y = beta(5.0, [[10.0, 100.0, 50.0], [12.0, 200.0, 150.0]]) >>> int(y.shape == (2, 3)) 1 >>> y = beta(5.0, [10.0, 100.0], shape = (3, 2)) >>> int(y.shape == (3, 2)) 1 """ from RandomArray2 import * import numarray.numeric as num class SelftestFailure(Exception): pass def showint(x): return num.explicit_type(num.inputarray(x).astype('Int32')) def cndns(m): return num.maximum.reduce(num.inputarray(num.abs(m)).flat) def case(expr, ans, eps=1e-9): if abs(cndns(ans-expr)/cndns(ans)) < eps: print "OK" else: raise SelftestFailure def mean_var_test(x, type, mean, var, skew=[], mean_ans=None, var_ans=None, skew_ans=None, eps=1e-9): if mean_ans is None or var_ans is None: raise ValueError, "Invalid test parameters" n = len(x) * 1.0 x_mean = num.sum(x)/n x_minus_mean = x - x_mean x_var = num.sum(x_minus_mean*x_minus_mean)/(n-1.0) case(x_mean, mean_ans, eps) case(x_var, var_ans, eps) if skew != []: x_skew = (num.sum(x_minus_mean*x_minus_mean*x_minus_mean)/9998.)/x_var**(3./2.) case(x_skew, skew_ans, eps) from numarray.numtest import dtp def test(): import doctest, dtest return doctest.testmod(dtest)
28.032258
159
0.551701
1,020
6,083
3.232353
0.201961
0.006673
0.027298
0.025478
0.275705
0.167122
0.114346
0.094631
0.07886
0.051259
0
0.251768
0.23278
6,083
216
160
28.162037
0.454682
0
0
0
0
0
0.028195
0
0
0
0
0
0
0
null
null
0.033333
0.133333
null
null
0.033333
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
1
0
0
0
0
0
0
0
0
3
af3534a2a861870ac487e93e48edfb17b14c485c
508
py
Python
hashes.py
sorrge/goviaji
6a9c1da82c7db2ddfbed374b1950f048d9d72fa3
[ "Naumen", "Condor-1.1", "MS-PL" ]
4
2019-02-17T04:14:26.000Z
2020-11-29T07:23:56.000Z
hashes.py
sorrge/goviaji
6a9c1da82c7db2ddfbed374b1950f048d9d72fa3
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
hashes.py
sorrge/goviaji
6a9c1da82c7db2ddfbed374b1950f048d9d72fa3
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
import random hash_mask = 0xffffffffffffffff combinator_value = 0xa0cf5a622e18b479 def new_hash(): return random.getrandbits(64) def combine_hashes(h1, h2): return h1 ^ ((h2 + combinator_value + (h1 << 6) + (h1 >> 2)) & hash_mask) hashes_for_idx = [] def get_hash_for_idx(idx1, idx2): while idx1 >= len(hashes_for_idx): hashes_for_idx.append([]) while idx2 >= len(hashes_for_idx[idx1]): hashes_for_idx[idx1].append(new_hash()) return hashes_for_idx[idx1][idx2]
19.538462
77
0.685039
71
508
4.591549
0.380282
0.128834
0.220859
0.147239
0
0
0
0
0
0
0
0.072816
0.188976
508
25
78
20.32
0.718447
0
0
0
0
0
0
0
0
0
0.070866
0
0
1
0.214286
false
0
0.071429
0.142857
0.5
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
3
af657aad155897d3c17e06bce26c4cee7d31f327
46
py
Python
test.py
angel-2022cal/PyPoll_with_Python
d249376f787c131787210fde6e758b2591ea3555
[ "MIT" ]
null
null
null
test.py
angel-2022cal/PyPoll_with_Python
d249376f787c131787210fde6e758b2591ea3555
[ "MIT" ]
null
null
null
test.py
angel-2022cal/PyPoll_with_Python
d249376f787c131787210fde6e758b2591ea3555
[ "MIT" ]
null
null
null
print("test") type(3) ballots = 1,342 ballots
11.5
15
0.695652
8
46
4
0.875
0
0
0
0
0
0
0
0
0
0
0.125
0.130435
46
4
16
11.5
0.675
0
0
0
0
0
0.085106
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
1
1
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
3
af7b94dadd7b719b7325535294a305fa3575be89
314
py
Python
costflow/config.py
StdioA/costflow
31335c0452d2a8a8b32014ef09cab62c1a4c244f
[ "MIT" ]
null
null
null
costflow/config.py
StdioA/costflow
31335c0452d2a8a8b32014ef09cab62c1a4c244f
[ "MIT" ]
null
null
null
costflow/config.py
StdioA/costflow
31335c0452d2a8a8b32014ef09cab62c1a4c244f
[ "MIT" ]
null
null
null
from dataclasses import dataclass, field @dataclass class Config: default_currency: str = "CNY" formulas: dict = field(default_factory=dict) def get_formula(self, name): return self.formulas.get(name, "") # TODO: Beancount loader for default currency # Global store config = Config()
18.470588
49
0.700637
38
314
5.710526
0.684211
0.138249
0
0
0
0
0
0
0
0
0
0
0.207006
314
16
50
19.625
0.871486
0.178344
0
0
0
0
0.011765
0
0
0
0
0.0625
0
1
0.125
false
0
0.125
0.125
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
1
0
0
0
0
0
0
1
1
0
0
3
af7fd524b0e46b7ff4c1b2d866179e74bde84c16
853
py
Python
src/bdbd/src/bdbd/analysis/motion/scratch.py
rkent/BDBD
c5d391da84faf5607c443078781f8b4e1c017dd5
[ "MIT" ]
null
null
null
src/bdbd/src/bdbd/analysis/motion/scratch.py
rkent/BDBD
c5d391da84faf5607c443078781f8b4e1c017dd5
[ "MIT" ]
null
null
null
src/bdbd/src/bdbd/analysis/motion/scratch.py
rkent/BDBD
c5d391da84faf5607c443078781f8b4e1c017dd5
[ "MIT" ]
null
null
null
# just a scratchpad for test calculations from numpy.lib.financial import nper import numpy as np from numpy.random import default_rng import time from math import sin, cos from bdbd_common.utils import fstr, gstr tp = -0.00111230739817 tc = -0.00106991938304 tm = -0.0010275313679 print((-tp -tm +2*tc)/(1.e-3)**2) print('tp-tc', tp-tc, 'tc-tm', tc-tm) alpha = [0.0122518596654208, 0.0212410881855422, 0.0368257423466405, 0.0638449069809995, 0.110688118899098, 0.191900344832, 0.33269824, 0.5768, 1 ] bmotor = [0.00292872850023364, -0.00116699925899113, -0.000150659061121022, -0.000102798320922463, -0.000324244574766243, -0.000441262410214323, -0.000181578006905556, -0.00152929510021145, -5.82561059489067e-06 ] sum = 0.0 for i in range(len(alpha)): sum += alpha[i] * bmotor[i] print('omegan', sum)
38.772727
213
0.711606
118
853
5.127119
0.550847
0.029752
0
0
0
0
0
0
0
0
0
0.456825
0.158265
853
22
214
38.772727
0.385794
0.045721
0
0
0
0
0.01968
0
0
0
0
0
0
1
0
false
0
0.352941
0
0.352941
0.176471
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
1
0
0
0
0
3
afa8d7c1ea0a81dfddb7555cdcb8127a8ebef6a6
229
py
Python
src/notesdir/__init__.py
rjgibson/notesdir
7f3c907654a37384eb42a52da82d907354b92512
[ "MIT" ]
11
2020-07-24T20:41:13.000Z
2021-01-17T15:05:49.000Z
src/notesdir/__init__.py
dendronhq/notesdir
e7f264541927a26767058cff9dd53fad022e4af5
[ "MIT" ]
3
2020-07-25T08:44:21.000Z
2020-12-12T21:15:22.000Z
src/notesdir/__init__.py
dendronhq/notesdir
e7f264541927a26767058cff9dd53fad022e4af5
[ "MIT" ]
4
2020-07-28T20:37:40.000Z
2021-08-11T16:49:46.000Z
"""Helps manage notes stored as plain files in the filesystem. If you installed via ``pip``, run ``notesdir -h` to get help. Or, run ``python3 -m notesdir -h``. To use the Python API, look at :class:`notesdir.api.Notesdir` """
28.625
62
0.694323
38
229
4.184211
0.789474
0.113208
0.138365
0
0
0
0
0
0
0
0
0.005236
0.165939
229
7
63
32.714286
0.827225
0.965066
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
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
afb1cfb3366ea588583be545f0d338f3152ccd59
281
py
Python
video_streamer/comm.py
zhiyanliu/riverrun
c426139e0b4ea0b46d74c6152ede1d2cec8f836f
[ "MIT" ]
null
null
null
video_streamer/comm.py
zhiyanliu/riverrun
c426139e0b4ea0b46d74c6152ede1d2cec8f836f
[ "MIT" ]
null
null
null
video_streamer/comm.py
zhiyanliu/riverrun
c426139e0b4ea0b46d74c6152ede1d2cec8f836f
[ "MIT" ]
null
null
null
import constants import sync_pkt_receiver # Income def create_sync_pkt_receiver(stat_queue, sync_pkt_queue_size=20): port = constants.get_sync_pkt_server_port() receiver = sync_pkt_receiver.SyncPacketTCPReceiver(stat_queue, sync_pkt_queue_size, port) return receiver
28.1
93
0.825623
40
281
5.325
0.425
0.197183
0.211268
0.150235
0.234742
0.234742
0
0
0
0
0
0.008065
0.117438
281
9
94
31.222222
0.850806
0.021352
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
0
0
0
0
null
0
1
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
3
afb324a2e748ab5b49dcdbb2dda778536bc98729
14,300
py
Python
temp/input_systemwin.py
Pugavkomm/NS-analyst
698af0e94f57b431fd77c17c49d4a23f11d21d3f
[ "MIT" ]
null
null
null
temp/input_systemwin.py
Pugavkomm/NS-analyst
698af0e94f57b431fd77c17c49d4a23f11d21d3f
[ "MIT" ]
null
null
null
temp/input_systemwin.py
Pugavkomm/NS-analyst
698af0e94f57b431fd77c17c49d4a23f11d21d3f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'inpu_systemwin.ui' # # Created by: PyQt5 UI code generator 5.12 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_inpusystemWin(object): def setupUi(self, inpusystemWin): inpusystemWin.setObjectName("inpusystemWin") inpusystemWin.resize(340, 194) inpusystemWin.setMinimumSize(QtCore.QSize(0, 143)) inpusystemWin.setMaximumSize(QtCore.QSize(16777215, 201)) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255, 85)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(246, 246, 245)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(119, 119, 118)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(159, 159, 157)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Mid, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.BrightText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255, 85)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255, 85)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Shadow, brush) brush = QtGui.QBrush(QtGui.QColor(246, 246, 245)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.AlternateBase, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipBase, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255, 85)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(246, 246, 245)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(119, 119, 118)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(159, 159, 157)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Mid, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.BrightText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255, 85)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255, 85)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Shadow, brush) brush = QtGui.QBrush(QtGui.QColor(246, 246, 245)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.AlternateBase, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipBase, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255, 85)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(246, 246, 245)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(119, 119, 118)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(159, 159, 157)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.BrightText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255, 85)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255, 85)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Shadow, brush) brush = QtGui.QBrush(QtGui.QColor(238, 238, 236)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.AlternateBase, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipBase, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipText, brush) inpusystemWin.setPalette(palette) inpusystemWin.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu) inpusystemWin.setStyleSheet("color: black;\n" " font-family: ;\n" "font: 11pt \"Noto Serif CJK JP\";\n" "background-color: rgba(255, 255, 255, 85);") self.centralwidget = QtWidgets.QWidget(inpusystemWin) self.centralwidget.setObjectName("centralwidget") self.gridLayout = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout.setObjectName("gridLayout") self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.label = QtWidgets.QLabel(self.centralwidget) self.label.setObjectName("label") self.horizontalLayout.addWidget(self.label) self.xline = QtWidgets.QLineEdit(self.centralwidget) self.xline.setStyleSheet("float: flat;\n" "margin-rigth: 3%;\n" " margin-top: 5px;\n" " \n" " \n" " padding: 5px 9px;\n" " font-size: 1.2em;\n" " background-color: rgba(114, 147, 182, 1);\n" " text-shadow: #454545 0 0 2px;\n" " border-bottom: 4px solid rgba(114, 147, 182, 1);\n" " color: white;\n" " font-family: \'Roboto Slab\', serif;\n" "\n" "") self.xline.setText("") self.xline.setObjectName("xline") self.horizontalLayout.addWidget(self.xline) self.verticalLayout.addLayout(self.horizontalLayout) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.label_2 = QtWidgets.QLabel(self.centralwidget) self.label_2.setObjectName("label_2") self.horizontalLayout_2.addWidget(self.label_2) self.yline = QtWidgets.QLineEdit(self.centralwidget) self.yline.setStyleSheet("float: flat;\n" "margin-rigth: 3%;\n" " margin-top: 5px;\n" " \n" " \n" " padding: 5px 9px;\n" " font-size: 1.2em;\n" " background-color: rgba(114, 147, 182, 1);\n" " text-shadow: #454545 0 0 2px;\n" " border-bottom: 4px solid rgba(114, 147, 182, 1);\n" " color: white;\n" " font-family: \'Roboto Slab\', serif;\n" "\n" "") self.yline.setObjectName("yline") self.horizontalLayout_2.addWidget(self.yline) self.verticalLayout.addLayout(self.horizontalLayout_2) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.label_3 = QtWidgets.QLabel(self.centralwidget) self.label_3.setObjectName("label_3") self.horizontalLayout_3.addWidget(self.label_3) self.doubleSpinBox = QtWidgets.QDoubleSpinBox(self.centralwidget) self.doubleSpinBox.setStyleSheet("float: flat;\n" "margin-rigth: 3%;\n" " margin-top: 5px;\n" " \n" " border: 1px rgba(114, 147, 182, 1);\n" " padding: 5px 9px;\n" " font-size: 1.2em;\n" " background-color: rgba(114, 147, 182, 1);\n" " text-shadow: #454545 0 0 2px;\n" " border-bottom: 4px solid rgba(114, 147, 182, 1);\n" " color: white;\n" " font-family: ;\n" "font: 11pt \"Noto Serif CJK JP\";\n" "\n" "") self.doubleSpinBox.setLocale(QtCore.QLocale(QtCore.QLocale.C, QtCore.QLocale.AnyCountry)) self.doubleSpinBox.setWrapping(False) self.doubleSpinBox.setDecimals(10) self.doubleSpinBox.setMaximum(9999.99) self.doubleSpinBox.setSingleStep(0.1) self.doubleSpinBox.setObjectName("doubleSpinBox") self.horizontalLayout_3.addWidget(self.doubleSpinBox) self.verticalLayout.addLayout(self.horizontalLayout_3) self.oksystem = QtWidgets.QPushButton(self.centralwidget) self.oksystem.setStyleSheet("QPushButton {\n" "float: right;\n" "margin-rigth: 3%;\n" " margin-top: 5px;\n" " background-shadow: 1px;\n" " border: 1px rgba(114, 147, 182, 1);\n" " padding: 5px 9px;\n" " font-size: 1.2em;\n" " background-color: rgba(114, 147, 182, 1);\n" " text-shadow: #454545 0 0 3px;\n" " border-bottom: 4px solid rgba(114, 147, 182, 1);\n" " color: white;\n" " font-family: ;\n" "font: 11pt \"Noto Serif CJK JP\";\n" "\n" "\n" " border: 1px solid rgba(114, 147, 182, 1);\n" "\n" "\n" "}\n" "QPushButton:hover\n" "{\n" " background-color:rgb(163, 175, 188);\n" "}\n" "") self.oksystem.setObjectName("oksystem") self.verticalLayout.addWidget(self.oksystem) self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1) inpusystemWin.setCentralWidget(self.centralwidget) self.retranslateUi(inpusystemWin) QtCore.QMetaObject.connectSlotsByName(inpusystemWin) def retranslateUi(self, inpusystemWin): _translate = QtCore.QCoreApplication.translate inpusystemWin.setWindowTitle(_translate("inpusystemWin", "система")) inpusystemWin.setWhatsThis(_translate("inpusystemWin", "<html><head/><body><p>описание</p><p><br/></p></body></html>")) self.label.setText(_translate("inpusystemWin", "<html><head/><body><p>dx/dt = </p></body></html>")) self.label_2.setText(_translate("inpusystemWin", "dy/dt = ")) self.label_3.setText(_translate("inpusystemWin", "<html><head/><body><p>w<span style=\" vertical-align:sub;\">p</span> =</p></body></html>")) self.oksystem.setText(_translate("inpusystemWin", "применить"))
50
149
0.682797
1,708
14,300
5.698478
0.112998
0.121545
0.073975
0.097092
0.748587
0.708415
0.692181
0.681496
0.681496
0.674818
0
0.051073
0.178462
14,300
285
150
50.175439
0.777409
0.013007
0
0.546125
1
0.00369
0.139667
0.009926
0
0
0
0
0
1
0.00738
false
0
0.00369
0
0.01476
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
afb7242c5bcd0d0c08e88abd77479bef7a7a0310
169
py
Python
test.py
Thachj-Thw/module
a8b2dced1e821e40f4612851a3557830c503e2d4
[ "MIT" ]
null
null
null
test.py
Thachj-Thw/module
a8b2dced1e821e40f4612851a3557830c503e2d4
[ "MIT" ]
null
null
null
test.py
Thachj-Thw/module
a8b2dced1e821e40f4612851a3557830c503e2d4
[ "MIT" ]
null
null
null
import subprocess import module import time p = subprocess.Popen("C:\\WINDOWS\\system32\\notepad.exe") time.sleep(.1) note = module.Window.from_pid(p.pid) print(note)
16.9
58
0.751479
26
169
4.846154
0.692308
0
0
0
0
0
0
0
0
0
0
0.019608
0.094675
169
9
59
18.777778
0.803922
0
0
0
0
0
0.201183
0.201183
0
0
0
0
0
1
0
false
0
0.428571
0
0.428571
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
1
0
0
0
0
3
bb6414e2036e8e527cb19bda583ab9e4a5c4e34a
116
py
Python
reverseString.py
shubham2704/codes_instagram
c95aab74aabb4af9d4baa5c7b26698d8f77a95eb
[ "MIT" ]
1
2020-06-05T19:06:49.000Z
2020-06-05T19:06:49.000Z
reverseString.py
shubham2704/codes_instagram
c95aab74aabb4af9d4baa5c7b26698d8f77a95eb
[ "MIT" ]
null
null
null
reverseString.py
shubham2704/codes_instagram
c95aab74aabb4af9d4baa5c7b26698d8f77a95eb
[ "MIT" ]
null
null
null
s = 'nothyp_onan@' l = [1,2,3,4,5,6,7,8,9] print(s[::-1]) print(l[::-1]) print(reversed(l)) l1 = l.reverse print(l1)
16.571429
23
0.577586
27
116
2.444444
0.62963
0.060606
0
0
0
0
0
0
0
0
0
0.125
0.103448
116
7
24
16.571429
0.509615
0
0
0
0
0
0.102564
0
0
0
0
0
0
1
0
false
0
0
0
0
0.571429
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
1
0
3
bb7238a396f28205763ab25a37190dda49705fd7
1,961
py
Python
WELCOME_BACK.py
noor20-meet/meet2018y1mini-proj
088f385f972424a53e0c899a41a6fddce5fd342e
[ "MIT" ]
null
null
null
WELCOME_BACK.py
noor20-meet/meet2018y1mini-proj
088f385f972424a53e0c899a41a6fddce5fd342e
[ "MIT" ]
null
null
null
WELCOME_BACK.py
noor20-meet/meet2018y1mini-proj
088f385f972424a53e0c899a41a6fddce5fd342e
[ "MIT" ]
null
null
null
import turtle ''' turtle.pencolor("Red") turtle.pensize(10) turtle.penup() turtle.goto(-400,300) turtle.pendown() turtle.goto(-370,200) turtle.goto(-340,300) turtle.goto(-310,200) turtle.goto(-280,300) turtle.penup() turtle.pencolor("Pink") turtle.goto(-190,300) turtle.pendown() turtle.goto(-240,300) turtle.goto(-240,200) turtle.goto(-190,200) turtle.goto(-240,200) turtle.goto(-240,250) turtle.goto(-190,250) turtle.penup() turtle.pencolor("Yellow") turtle.goto(-150,300) turtle.pendown() turtle.goto(-150,200) turtle.goto(-100,200) turtle.penup() turtle.pencolor("orange") turtle.goto(-10,300) turtle.pendown() turtle.goto(-60,300) turtle.goto(-60,200) turtle.goto(-10,200) turtle.penup() turtle.pencolor("cyan") turtle.goto(90,300) turtle.pendown() turtle.goto(40,300) turtle.goto(40,200) turtle.goto(90,200) turtle.goto(90,300) turtle.penup() turtle.pencolor("purple") turtle.goto(120,200) turtle.pendown() turtle.goto(150,300) turtle.goto(180,250) turtle.goto(210,300) turtle.goto(240,200) turtle.penup() turtle.pencolor("green") turtle.goto(340,300) turtle.pendown() turtle.goto(290,300) turtle.goto(290,200) turtle.goto(340,200) turtle.goto(290,200) turtle.goto(290,250) turtle.goto(340,250) turtle.penup() ''' turtle.penup() turtle.pensize(10) turtle.pencolor("red") turtle.goto(-300,100) turtle.pendown() turtle.goto(-300,-100) turtle.goto(-300,100) turtle.goto(-210,100) turtle.goto(-200,90) turtle.goto(-200,10) turtle.goto(-210,0) turtle.goto(-300,0) turtle.goto(-210,0) turtle.goto(-200,-10) turtle.goto(-200,-90) turtle.goto(-210,-100) turtle.goto(-300,-100) turtle.penup() turtle.pencolor("orange") turtle.goto(-100,100) turtle.pendown() turtle.goto(-150,-100) turtle.goto(-100,100) turtle.goto(-50,-100) turtle.goto(-75,0) turtle.goto(-119,0) turtle.penup() turtle.pencolor("pink") turtle.goto(100,100) turtle.pendown() turtle.goto(20,100) turtle.goto(0,80) turtle.goto(0,-80) turtle.goto(20,-100) turtle.goto(100,-100) turtle.penup()
18.327103
25
0.73126
326
1,961
4.398773
0.122699
0.425384
0.108787
0.160391
0.69735
0.433054
0.152022
0.054393
0
0
0
0.181769
0.054564
1,961
106
26
18.5
0.591694
0
0
0.405405
0
0
0.017333
0
0
0
0
0
0
1
0
true
0
0.027027
0
0.027027
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
bb948c7bda543d997fe3f4ae4b24951905c81185
558
py
Python
DesignPatterns/03_decorator/1_no_decorator/1_class/cars/economy.py
eduardormonteiro/PythonPersonalLibrary
561733bb8305c4e25a08f99c28b60ec77251ad67
[ "MIT" ]
null
null
null
DesignPatterns/03_decorator/1_no_decorator/1_class/cars/economy.py
eduardormonteiro/PythonPersonalLibrary
561733bb8305c4e25a08f99c28b60ec77251ad67
[ "MIT" ]
null
null
null
DesignPatterns/03_decorator/1_no_decorator/1_class/cars/economy.py
eduardormonteiro/PythonPersonalLibrary
561733bb8305c4e25a08f99c28b60ec77251ad67
[ "MIT" ]
null
null
null
from .abstract_car import AbstractCar class Economy(AbstractCar): def __init__(self, engine, paint, upholstery): self._engine = engine self._paint = paint self._upholstery = upholstery @property def description(self): return 'Economy' @property def engine(self): return self._engine @property def paint(self): return self._paint @property def upholstery(self): return self._upholstery @property def cost(self): return 12000.00 + super().cost()
19.928571
50
0.625448
59
558
5.728814
0.338983
0.162722
0.12426
0
0
0
0
0
0
0
0
0.017632
0.28853
558
27
51
20.666667
0.833753
0
0
0.238095
0
0
0.012545
0
0
0
0
0
0
1
0.285714
false
0
0.047619
0.238095
0.619048
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
1
0
0
3
bb99bd11afa645dd54dbcde8ef11240ffe806a17
312
py
Python
infix_postfix_prefix.py
Chinmaykd21/python_practice
9bee0bbdcf5f8b2d2b4b9d6671e85ca1d0388d4f
[ "MIT" ]
null
null
null
infix_postfix_prefix.py
Chinmaykd21/python_practice
9bee0bbdcf5f8b2d2b4b9d6671e85ca1d0388d4f
[ "MIT" ]
null
null
null
infix_postfix_prefix.py
Chinmaykd21/python_practice
9bee0bbdcf5f8b2d2b4b9d6671e85ca1d0388d4f
[ "MIT" ]
null
null
null
# Infix example : 2 + 3 = 5, 5 * 8 + 6 = 46 --> In infix operator is written between operands # Prefix example: + 2 3, - p q, + a * b c --> In prefix operator is written before operands # Postfix example: 2 3 +, p q -, a b c * + --> In Postfix operator is written after operands # Tomorrow should be implemented
62.4
93
0.657051
52
312
3.942308
0.519231
0.117073
0.131707
0.097561
0.156098
0.156098
0.156098
0.156098
0.156098
0
0
0.050209
0.233974
312
4
94
78
0.807531
0.971154
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
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
bba5f596ae6e2d920caadd1aeccf42f862bbb6ac
958
py
Python
mibs/pycopia/mibs/SNMP_FRAMEWORK_MIB_OID.py
kdart/pycopia
1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d
[ "Apache-2.0" ]
89
2015-03-26T11:25:20.000Z
2022-01-12T06:25:14.000Z
mibs/pycopia/mibs/SNMP_FRAMEWORK_MIB_OID.py
kdart/pycopia
1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d
[ "Apache-2.0" ]
1
2015-07-05T03:27:43.000Z
2015-07-11T06:21:20.000Z
mibs/pycopia/mibs/SNMP_FRAMEWORK_MIB_OID.py
kdart/pycopia
1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d
[ "Apache-2.0" ]
30
2015-04-30T01:35:54.000Z
2022-01-12T06:19:49.000Z
# python # This file is generated by a program (mib2py). import SNMP_FRAMEWORK_MIB OIDMAP = { '1.3.6.1.6.3.10': SNMP_FRAMEWORK_MIB.snmpFrameworkMIB, '1.3.6.1.6.3.10.1': SNMP_FRAMEWORK_MIB.snmpFrameworkAdmin, '1.3.6.1.6.3.10.1.1': SNMP_FRAMEWORK_MIB.snmpAuthProtocols, '1.3.6.1.6.3.10.1.2': SNMP_FRAMEWORK_MIB.snmpPrivProtocols, '1.3.6.1.6.3.10.2': SNMP_FRAMEWORK_MIB.snmpFrameworkMIBObjects, '1.3.6.1.6.3.10.2.1': SNMP_FRAMEWORK_MIB.snmpEngine, '1.3.6.1.6.3.10.3': SNMP_FRAMEWORK_MIB.snmpFrameworkMIBConformance, '1.3.6.1.6.3.10.3.1': SNMP_FRAMEWORK_MIB.snmpFrameworkMIBCompliances, '1.3.6.1.6.3.10.3.2': SNMP_FRAMEWORK_MIB.snmpFrameworkMIBGroups, '1.3.6.1.6.3.10.2.1.1': SNMP_FRAMEWORK_MIB.snmpEngineID, '1.3.6.1.6.3.10.2.1.2': SNMP_FRAMEWORK_MIB.snmpEngineBoots, '1.3.6.1.6.3.10.2.1.3': SNMP_FRAMEWORK_MIB.snmpEngineTime, '1.3.6.1.6.3.10.2.1.4': SNMP_FRAMEWORK_MIB.snmpEngineMaxMessageSize, '1.3.6.1.6.3.10.3.2.1': SNMP_FRAMEWORK_MIB.snmpEngineGroup, }
43.545455
69
0.751566
196
958
3.520408
0.173469
0.282609
0.347826
0.081159
0.337681
0.191304
0.191304
0.17971
0.101449
0
0
0.154945
0.050104
958
21
70
45.619048
0.603297
0.05428
0
0
1
0
0.279379
0
0
0
0
0
0
1
0
false
0
0.058824
0
0.058824
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
bbbeb0d971dbfe8cd4f38d094bfbd3dbac0e70f2
738
py
Python
epitran/test/test_spanish.py
dwijap/epitran
dab70c269710e73c1c7bf69c2de5d69b57a1d237
[ "MIT" ]
422
2016-05-19T09:07:38.000Z
2022-03-31T15:06:36.000Z
epitran/test/test_spanish.py
dwijap/epitran
dab70c269710e73c1c7bf69c2de5d69b57a1d237
[ "MIT" ]
80
2017-05-22T14:58:19.000Z
2022-03-28T19:23:31.000Z
epitran/test/test_spanish.py
dwijap/epitran
dab70c269710e73c1c7bf69c2de5d69b57a1d237
[ "MIT" ]
95
2017-05-06T04:19:53.000Z
2022-03-21T10:41:42.000Z
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals import unittest import epitran def assemble_ipa(xs): return ''.join([x[3] for x in xs]) class TestSpanish(unittest.TestCase): def setUp(self): self.epi = epitran.Epitran(u'spa-Latn') def _derivation(self, orth, correct): attempt = assemble_ipa(self.epi.word_to_tuples(orth)) self.assertEqual(attempt, correct) def test_queso(self): self._derivation(u'queso', u'keso') def test_general(self): self._derivation(u'general', u'xeneɾal') def test_cuestion(self): self._derivation(u'cuestión', u'kwestjon') def test_sabado(self): self._derivation(u'sábado', u'sabado')
23.0625
61
0.666667
98
738
4.826531
0.5
0.084567
0.15222
0.160677
0
0
0
0
0
0
0
0.003396
0.201897
738
31
62
23.806452
0.79966
0.028455
0
0
0
0
0.082517
0
0
0
0
0
0.052632
1
0.368421
false
0
0.157895
0.052632
0.631579
0.052632
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
1
0
0
3
bbd82630bcb1d4cfeb74fb9b710a94708ad0b947
47
py
Python
pytype/__version__.py
domandinho/pytype
95ebca39d72567ef5e8a4be86f1787893a39184d
[ "Apache-2.0" ]
null
null
null
pytype/__version__.py
domandinho/pytype
95ebca39d72567ef5e8a4be86f1787893a39184d
[ "Apache-2.0" ]
null
null
null
pytype/__version__.py
domandinho/pytype
95ebca39d72567ef5e8a4be86f1787893a39184d
[ "Apache-2.0" ]
null
null
null
# pylint: skip-file __version__ = '2019.09.06'
15.666667
26
0.702128
7
47
4.142857
1
0
0
0
0
0
0
0
0
0
0
0.195122
0.12766
47
2
27
23.5
0.512195
0.361702
0
0
0
0
0.357143
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
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
3
bbf0074bba67ac1c109b101068ab7aa03a83f296
142
py
Python
bluejay/interface.py
FundingOptions/customer-events-python-client
4f5b5d1573990e62f2c1622cfaaf9baae6c078ec
[ "MIT" ]
null
null
null
bluejay/interface.py
FundingOptions/customer-events-python-client
4f5b5d1573990e62f2c1622cfaaf9baae6c078ec
[ "MIT" ]
1
2019-09-20T14:11:12.000Z
2019-09-20T14:11:12.000Z
bluejay/interface.py
FundingOptions/bluejay-client
4f5b5d1573990e62f2c1622cfaaf9baae6c078ec
[ "MIT" ]
null
null
null
from typing_extensions import Protocol class IEvent(Protocol): event_name = "" # type: str def as_dict(self) -> dict: ...
15.777778
38
0.626761
17
142
5.058824
0.882353
0
0
0
0
0
0
0
0
0
0
0
0.260563
142
8
39
17.75
0.819048
0.06338
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.8
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
1
0
0
3
bbf9ea81ce6794bf24e59c4193e8d5df5878b9ef
692
py
Python
webapps/pypi_org/views/package_views.py
pavanrao/python-projects
0e7be87fec827554a6375ab9b011f6a09e9a410e
[ "MIT" ]
null
null
null
webapps/pypi_org/views/package_views.py
pavanrao/python-projects
0e7be87fec827554a6375ab9b011f6a09e9a410e
[ "MIT" ]
null
null
null
webapps/pypi_org/views/package_views.py
pavanrao/python-projects
0e7be87fec827554a6375ab9b011f6a09e9a410e
[ "MIT" ]
null
null
null
import os import sys import flask folder = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) sys.path.insert(0, folder) from pypi_org.infrastructure.view_modifiers import response import pypi_org.services.package_service as package_service blueprint = flask.Blueprint('packages', __name__, template_folder='templates') @blueprint.route('/project/<package_name>') #@response(template_file='packages/details.html') def package_details(package_name: str): return f"Package details for {package_name}" @blueprint.route('/<int:rank>') #@response(template_file='packages/details.html') def popular(rank: int): return f"Package details for {rank}th most popular package"
28.833333
78
0.776012
95
692
5.442105
0.442105
0.034816
0.077369
0.108317
0.255319
0.162476
0.162476
0
0
0
0
0.00159
0.09104
692
23
79
30.086957
0.82035
0.138728
0
0
0
0
0.228956
0.038721
0
0
0
0
0
1
0.142857
false
0
0.357143
0.142857
0.642857
0.214286
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
1
1
0
0
3
a51db0694c45457f81cd72b60386ee1c0b97f19a
1,350
py
Python
test/test_sources_api.py
chargio/using-koku-api-test
2f41fd83ab730705352b116b7a6e05ae3d9a8ebd
[ "MIT" ]
1
2020-03-18T11:32:09.000Z
2020-03-18T11:32:09.000Z
test/test_sources_api.py
chargio/using-koku-api-test
2f41fd83ab730705352b116b7a6e05ae3d9a8ebd
[ "MIT" ]
null
null
null
test/test_sources_api.py
chargio/using-koku-api-test
2f41fd83ab730705352b116b7a6e05ae3d9a8ebd
[ "MIT" ]
null
null
null
# coding: utf-8 """ Cost Management The API for Project Koku and OpenShift cost management. You can find out more about Cost Management at [https://github.com/project-koku/](https://github.com/project-koku/). # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import openapi_client from openapi_client.api.sources_api import SourcesApi # noqa: E501 from openapi_client.rest import ApiException class TestSourcesApi(unittest.TestCase): """SourcesApi unit test stubs""" def setUp(self): self.api = openapi_client.api.sources_api.SourcesApi() # noqa: E501 def tearDown(self): pass def test_get_source(self): """Test case for get_source Get a source # noqa: E501 """ pass def test_get_source_stats(self): """Test case for get_source_stats Get a source statistics # noqa: E501 """ pass def test_list_sources(self): """Test case for list_sources List the sources # noqa: E501 """ pass def test_update_source(self): """Test case for update_source Update a source # noqa: E501 """ pass if __name__ == '__main__': unittest.main()
21.774194
190
0.645185
173
1,350
4.843931
0.381503
0.066826
0.052506
0.071599
0.337709
0.057279
0
0
0
0
0
0.025176
0.264444
1,350
61
191
22.131148
0.818731
0.442222
0
0.25
0
0
0.012618
0
0
0
0
0
0
1
0.3
false
0.25
0.25
0
0.6
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
1
0
0
3
a52e960de2c7d39d0c7939e08a7c4b48419ebce8
1,236
py
Python
leetcode/1295_find_numbers_with_even_number_of_digits.py
chaosWsF/Python-Practice
ff617675b6bcd125933024bb4c246b63a272314d
[ "BSD-2-Clause" ]
null
null
null
leetcode/1295_find_numbers_with_even_number_of_digits.py
chaosWsF/Python-Practice
ff617675b6bcd125933024bb4c246b63a272314d
[ "BSD-2-Clause" ]
null
null
null
leetcode/1295_find_numbers_with_even_number_of_digits.py
chaosWsF/Python-Practice
ff617675b6bcd125933024bb4c246b63a272314d
[ "BSD-2-Clause" ]
null
null
null
""" Given an array nums of integers, return how many of them contain an even number of digits. Example 1: Input: nums = [12,345,2,6,7896] Output: 2 Explanation: 12 contains 2 digits (even number of digits). 345 contains 3 digits (odd number of digits). 2 contains 1 digit (odd number of digits). 6 contains 1 digit (odd number of digits). 7896 contains 4 digits (even number of digits). Therefore only 12 and 7896 contain an even number of digits. Example 2: Input: nums = [555,901,482,1771] Output: 1 Explanation: Only 1771 contains an even number of digits. Constraints: 1. 1 <= nums.length <= 500 2. 1 <= nums[i] <= 10^5 """ from math import log10 class Solution: def findNumbers(self, nums) -> int: return sum([len(str(x)) % 2 == 0 for x in nums]) def findNumbers2(self, nums) -> int: return sum([(int(log10(x)) + 1) % 2 == 0 for x in nums]) def findNumbers3(self, nums) -> int: def helper(n): if (10 <= n < 100) or (1000 <= n < 10000) or n == 100000: return 1 else: return 0 return sum([helper(x) for x in nums])
25.75
90
0.573625
182
1,236
3.895604
0.384615
0.090268
0.157969
0.126939
0.377997
0.22567
0.22567
0
0
0
0
0.11589
0.322816
1,236
47
91
26.297872
0.731183
0.584142
0
0
0
0
0
0
0
0
0
0
0
1
0.307692
false
0
0.076923
0.153846
0.846154
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
1
0
0
3
a5487f624ee2b5cbdd8b1ff4998d5b1308c3f687
1,371
py
Python
cgi_etc_test.py
hsergi/Roman_Coronagraph_ETC
b2cfb42d1d74cdcc1a65efeb7a78c904f9cee235
[ "Apache-2.0" ]
1
2021-11-16T21:29:10.000Z
2021-11-16T21:29:10.000Z
cgi_etc_test.py
hsergi/Roman_Coronagraph_ETC
b2cfb42d1d74cdcc1a65efeb7a78c904f9cee235
[ "Apache-2.0" ]
null
null
null
cgi_etc_test.py
hsergi/Roman_Coronagraph_ETC
b2cfb42d1d74cdcc1a65efeb7a78c904f9cee235
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Global constant from config import INSTALLATION_PATH # Generic packages import numpy as np import hjson import json import os from pathlib import Path # For integration times import astropy.units as u # For keep outs and to convert decimal dates into readable dates import EXOSIMS, EXOSIMS.MissionSim from astropy.time import Time # IMD (https://plandb.sioslab.com/index.php) import pandas as pd # (Optional) Plotting the results of reflected light exoplanets import matplotlib.pyplot as plt # Individual methods for each CI target from scripts.cgi_etc_dust import cgi_etc_dust from scripts.cgi_etc_sl import cgi_etc_sl from scripts.cgi_etc_rv_shortest_integration_time import cgi_etc_rv_shortest_integration_time from scripts.cgi_etc_star_accessibility import cgi_etc_star_accessibility # Updated specs for EXOSIMS from scripts.cgi_etc_update_specs import cgi_etc_update_specs # CSV file from scripts.store_csv_file import store_csv_file_ed from scripts.store_csv_file import store_csv_file_rv from scripts.store_csv_file import store_csv_file_sl from scripts.store_csv_file import store_csv_file_acc # Use to label the temporary json file from datetime import datetime print('>> All modules related to Roman Coronagraph ETC succesfully loaded') print(f'>> The installation path in config.py is {INSTALLATION_PATH:s}')
36.078947
93
0.835157
222
1,371
4.923423
0.45045
0.054895
0.087832
0.077768
0.20677
0.20677
0.150046
0.150046
0.150046
0
0
0.001653
0.117433
1,371
37
94
37.054054
0.901653
0.274252
0
0
0
0
0.130214
0.021363
0
0
0
0
0
1
0
true
0
0.913043
0
0.913043
0.086957
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
1
0
0
3
a58341f8cd706eb200af365fd44d9183018efd5f
1,151
py
Python
qcloudsdkmonitor/ModifyAlarmRuleRequest.py
f3n9/qcloudcli
b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19
[ "Apache-2.0" ]
null
null
null
qcloudsdkmonitor/ModifyAlarmRuleRequest.py
f3n9/qcloudcli
b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19
[ "Apache-2.0" ]
null
null
null
qcloudsdkmonitor/ModifyAlarmRuleRequest.py
f3n9/qcloudcli
b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from qcloudsdkcore.request import Request class ModifyAlarmRuleRequest(Request): def __init__(self): super(ModifyAlarmRuleRequest, self).__init__( 'monitor', 'qcloudcliV1', 'ModifyAlarmRule', 'monitor.api.qcloud.com') def get_alarmRuleId(self): return self.get_params().get('alarmRuleId') def set_alarmRuleId(self, alarmRuleId): self.add_param('alarmRuleId', alarmRuleId) def get_constancy(self): return self.get_params().get('constancy') def set_constancy(self, constancy): self.add_param('constancy', constancy) def get_operatorType(self): return self.get_params().get('operatorType') def set_operatorType(self, operatorType): self.add_param('operatorType', operatorType) def get_receiversId(self): return self.get_params().get('receiversId') def set_receiversId(self, receiversId): self.add_param('receiversId', receiversId) def get_threshold(self): return self.get_params().get('threshold') def set_threshold(self, threshold): self.add_param('threshold', threshold)
28.775
82
0.685491
125
1,151
6.088
0.24
0.039422
0.091984
0.111695
0.170828
0.170828
0
0
0
0
0
0.002151
0.192007
1,151
39
83
29.512821
0.816129
0.018245
0
0
0
0
0.140957
0.019504
0
0
0
0
0
1
0.44
false
0
0.04
0.2
0.72
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
1
0
0
3
a5b500d073fbbbe9cd375cf4ded9dc7d31094519
59
py
Python
testing.py
EliasEriksson/CountryRoad
bfb0f5767e6c643591918f30090caf4dfe9ae860
[ "MIT" ]
null
null
null
testing.py
EliasEriksson/CountryRoad
bfb0f5767e6c643591918f30090caf4dfe9ae860
[ "MIT" ]
null
null
null
testing.py
EliasEriksson/CountryRoad
bfb0f5767e6c643591918f30090caf4dfe9ae860
[ "MIT" ]
null
null
null
kwargs = {"a": 1, "b": 2, "c": 3} print(kwargs.pop("d"))
11.8
33
0.457627
11
59
2.454545
0.909091
0
0
0
0
0
0
0
0
0
0
0.0625
0.186441
59
4
34
14.75
0.5
0
0
0
0
0
0.068966
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
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
1
0
3
3c0d33e14972e4353702fc89b41331682d2f5812
1,428
py
Python
spacepackets/util.py
robamu-org/py-spacepackets
522b021ba5690f97a4b74ae8b110762a32eb9b19
[ "Apache-2.0" ]
null
null
null
spacepackets/util.py
robamu-org/py-spacepackets
522b021ba5690f97a4b74ae8b110762a32eb9b19
[ "Apache-2.0" ]
3
2021-10-05T09:29:45.000Z
2022-02-12T15:46:43.000Z
spacepackets/util.py
robamu-org/py-spacepackets
522b021ba5690f97a4b74ae8b110762a32eb9b19
[ "Apache-2.0" ]
1
2022-03-04T17:25:29.000Z
2022-03-04T17:25:29.000Z
import enum class PrintFormats(enum.IntEnum): HEX = 0 DEC = 1 BIN = 2 def get_printable_data_string( print_format: PrintFormats, data: bytes, length: int = -1 ) -> str: """Returns the TM data in a clean printable hex string format :return: The string """ if length == -1: length = len(data) data_to_print = data[:length] if print_format == PrintFormats.HEX: return f'hex [{data_to_print.hex(sep=",", bytes_per_sep=1)}]' elif print_format == PrintFormats.DEC: if len(data_to_print) == 0: return "dec []" elif len(data_to_print) == 1: return f"dec [{data_to_print[0]}]" elif len(data_to_print) >= 2: string_to_print = "dec [" for idx in range(len(data_to_print) - 1): string_to_print += f"{data_to_print[idx]}," string_to_print += f"{data_to_print[length - 1]}]" return string_to_print elif print_format == PrintFormats.BIN: if len(data_to_print) == 0: return "bin []" elif len(data_to_print) == 1: return f"bin [0:{data_to_print[0]:08b}]" elif len(data_to_print) >= 2: string_to_print = "bin [\n" for idx in range(len(data_to_print)): string_to_print += f"{idx}:{data_to_print[idx]:08b}\n" string_to_print += f"]" return string_to_print
33.209302
70
0.573529
200
1,428
3.82
0.205
0.210733
0.215969
0.146597
0.349476
0.348168
0.348168
0.222513
0.08377
0
0
0.021063
0.301821
1,428
42
71
34
0.745236
0.054622
0
0.228571
0
0
0.158052
0.09588
0
0
0
0
0
1
0.028571
false
0
0.028571
0
0.371429
0.714286
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
1
0
3
3c0dea2c582bc2cd60514487b382dcee321bdf4d
843
py
Python
girder_rnascope/tilesource/pil.py
abcsFrederick/RNAScope
9cb049f9c64f52e49afddfb32a286c90223bad78
[ "Apache-2.0" ]
null
null
null
girder_rnascope/tilesource/pil.py
abcsFrederick/RNAScope
9cb049f9c64f52e49afddfb32a286c90223bad78
[ "Apache-2.0" ]
8
2019-09-25T14:07:14.000Z
2019-10-01T16:45:08.000Z
girder_rnascope/tilesource/pil.py
cj-abcs/RNAScope
9cb049f9c64f52e49afddfb32a286c90223bad78
[ "Apache-2.0" ]
null
null
null
import os.path import six from large_image.cache_util import LruCacheMetaclass import large_image_source_pil as pil from large_image_source_pil import girder_source from large_image.exceptions import TileSourceException @six.add_metaclass(LruCacheMetaclass) class PILFileTileSource(pil.PILFileTileSource): cacheName = 'tilesource' name = 'pilfile' def __init__(self, path, *args, **kwargs): super(PILFileTileSource, self).__init__(path, *args, **kwargs) # FIXME: filter criteria largeImagePath = self._getLargeImagePath() if os.path.splitext(largeImagePath)[1].lower() in ('.png', '.npy'): raise TileSourceException('File cannot be opened via PIL.') class PILGirderTileSource(PILFileTileSource, girder_source.PILGirderTileSource): cacheName = 'tilesource' name = 'pilfile'
32.423077
80
0.746145
92
843
6.608696
0.532609
0.065789
0.069079
0.0625
0
0
0
0
0
0
0
0.001414
0.161329
843
25
81
33.72
0.858557
0.026097
0
0.222222
0
0
0.087912
0
0
0
0
0.04
0
1
0.055556
false
0
0.333333
0
0.722222
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
1
0
0
3
3c2058e0f2adebbf1e156bad76ebca4dd6c47154
168
py
Python
gits-find.py
furas/python-git
9ce447b05a59c31459e0005526ffc21ba5fafaca
[ "MIT" ]
null
null
null
gits-find.py
furas/python-git
9ce447b05a59c31459e0005526ffc21ba5fafaca
[ "MIT" ]
null
null
null
gits-find.py
furas/python-git
9ce447b05a59c31459e0005526ffc21ba5fafaca
[ "MIT" ]
null
null
null
import os #path = os.path.expanduser('~') path = os.path.expandvars('$HOME') for root, folders, files in os.walk(path): if '.git' in folders: print(root)
18.666667
42
0.630952
25
168
4.24
0.6
0.169811
0.188679
0
0
0
0
0
0
0
0
0
0.196429
168
8
43
21
0.785185
0.178571
0
0
0
0
0.065693
0
0
0
0
0
0
1
0
false
0
0.2
0
0.2
0.2
1
0
0
null
0
1
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
3
3c57fedbf6b50d234e15b78713831e6d287ddfcd
179
py
Python
data/openpose.py
manu-18l/mueleak
78c7cc9cfc2e11e61c552e4f38a525eb56d2c59c
[ "zlib-acknowledgement", "CNRI-Python", "Xnet", "X11" ]
66
2021-06-22T14:23:25.000Z
2022-03-06T12:13:46.000Z
data/openpose.py
manu-18l/mueleak
78c7cc9cfc2e11e61c552e4f38a525eb56d2c59c
[ "zlib-acknowledgement", "CNRI-Python", "Xnet", "X11" ]
5
2021-07-01T14:52:47.000Z
2021-11-25T22:32:40.000Z
data/openpose.py
manu-18l/mueleak
78c7cc9cfc2e11e61c552e4f38a525eb56d2c59c
[ "zlib-acknowledgement", "CNRI-Python", "Xnet", "X11" ]
6
2021-06-24T04:02:41.000Z
2021-08-15T00:26:54.000Z
# output shape openpose keypoints for body, hands, and face body_keypoints_num = 25 left_hand_keyp_num = 21 right_hand_keyp_num = 21 face_keyp_num = 51 face_contour_keyp_num = 17
25.571429
59
0.815642
32
179
4.15625
0.59375
0.210526
0.165414
0.195489
0
0
0
0
0
0
0
0.064935
0.139665
179
6
60
29.833333
0.798701
0.318436
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
1
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
3
3c8804b88fcabce6d022239a9c8a7a89ba38d1b5
429
py
Python
app/__init__.py
B02902008/TaipeiWater
7364ce0bdfafddb7448cd8943c0c048f1a199dda
[ "MIT" ]
null
null
null
app/__init__.py
B02902008/TaipeiWater
7364ce0bdfafddb7448cd8943c0c048f1a199dda
[ "MIT" ]
null
null
null
app/__init__.py
B02902008/TaipeiWater
7364ce0bdfafddb7448cd8943c0c048f1a199dda
[ "MIT" ]
null
null
null
from flask import Flask from flask import render_template from app.module_load import blue_load from app.module_user import blue_user from app.module_util import blue_util app = Flask(__name__) app.register_blueprint(blue_load, url_prefix='/load') app.register_blueprint(blue_user, url_prefix='/user') app.register_blueprint(blue_util, url_prefix='/util') @app.route('/') def index(): return render_template('index.html')
26.8125
53
0.799534
66
429
4.878788
0.318182
0.065217
0.121118
0.223602
0
0
0
0
0
0
0
0
0.095571
429
15
54
28.6
0.829897
0
0
0
0
0
0.060606
0
0
0
0
0
0
1
0.083333
false
0
0.416667
0.083333
0.583333
0.25
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
1
0
0
3
3c8ebb53a31eb998baa0945fbce7c0feb50280a2
1,985
py
Python
app/models.py
marknesh/Blogging-website
e8baca97136dae0adc4c7bf895bf076152430bbc
[ "MIT" ]
null
null
null
app/models.py
marknesh/Blogging-website
e8baca97136dae0adc4c7bf895bf076152430bbc
[ "MIT" ]
7
2020-02-20T13:58:44.000Z
2021-02-08T20:40:59.000Z
app/models.py
marknesh/Blogging-website
e8baca97136dae0adc4c7bf895bf076152430bbc
[ "MIT" ]
null
null
null
from . import db from werkzeug.security import generate_password_hash,check_password_hash from flask_login import UserMixin from . import login_manager from datetime import datetime class User(UserMixin,db.Model): __tablename__ = 'person' id = db.Column(db.Integer,primary_key = True) email = db.Column(db.String(255), unique=True, index=True) username = db.Column(db.String(255)) secure_password=db.Column(db.String(255)) @property def password(self): raise AttributeError('you cannot this attribute password') @password.setter def password(self,password): self.secure_password=generate_password_hash(password) def verify_password(self,password): return check_password_hash(self.secure_password,password) class Blog(db.Model): __tablename__='blogs' id = db.Column(db.Integer, primary_key=True) title=db.Column(db.String(255)) content = db.Column(db.String(255)) posted=db.Column(db.DateTime,default=datetime.utcnow) comments=db.relationship('Comments',backref='blogr',lazy="dynamic") def save_blog(self): db.session.add(self) db.session.commit() @classmethod def get_blog(cls,id): eka=Blog.query.filter_by().all() return eka @login_manager.user_loader def load_user(user_id): return User.query.get(int(user_id)) class Comments(db.Model): __tablename__='comments' id =db.Column(db.Integer, primary_key=True) comment=db.Column(db.String(255)) blogr_id=db.Column(db.Integer,db.ForeignKey('blogs.id')) def save_comment(self): db.session.add(self) db.session.commit() class Subscriber(db.Model): __tablename__ = 'subscriber' id = db.Column(db.Integer,primary_key = True) email = db.Column(db.String(255), unique=True, index=True) class Qoutes: def __init__(self,id,author,quote): self.id = id self.author=author self.quote=quote
22.303371
72
0.689169
266
1,985
4.962406
0.296992
0.078788
0.098485
0.084848
0.304545
0.218182
0.218182
0.218182
0.115152
0.115152
0
0.013084
0.191436
1,985
88
73
22.556818
0.809346
0
0
0.188679
1
0
0.046146
0
0
0
0
0
0
1
0.150943
false
0.169811
0.09434
0.037736
0.735849
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
1
0
0
3
59384cff10fca9bffc86865641eeb507c473f32c
719
py
Python
tests/mocks.py
anthonycorletti/coinbasepro-scheduler
cc210bc165e3c1872facb84b43abcbe92be4149e
[ "MIT" ]
1
2022-01-04T07:43:05.000Z
2022-01-04T07:43:05.000Z
tests/mocks.py
anthonycorletti/coinbasepro-scheduler
cc210bc165e3c1872facb84b43abcbe92be4149e
[ "MIT" ]
null
null
null
tests/mocks.py
anthonycorletti/coinbasepro-scheduler
cc210bc165e3c1872facb84b43abcbe92be4149e
[ "MIT" ]
null
null
null
import uuid from typing import Dict, List class MockCoinbaseClient: def get_accounts(self) -> List[Dict]: return [{"balance": 100, "currency": "USD"}] def get_payment_methods(self) -> List[Dict]: return [ { "id": "900229be-9eb0-4e54-96b2-6a7ccf2a7c51", "primary_buy": True, "currency": "USD", } ] def deposit(self, amount: float, currency: str, payment_method_id: str) -> None: return None def place_market_order(self, product_id: str, side: str, funds: float) -> Dict: return {"id": str(uuid.uuid4())} def get_order(self, order_id: str) -> Dict: return {"filled_size": 2}
27.653846
84
0.568846
83
719
4.783133
0.53012
0.100756
0.060453
0.09068
0
0
0
0
0
0
0
0.049407
0.296245
719
25
85
28.76
0.735178
0
0
0
0
0
0.126565
0.05007
0
0
0
0
0
1
0.263158
false
0
0.105263
0.263158
0.684211
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
594d5e92e130d324d2c217307807fc1f91da9376
193
py
Python
Tools/python37/Lib/site-packages/keystone/systemz_const.py
xxroot/android_universal
af2d8627182f936383d792c1f775d87da50f2f6d
[ "MIT" ]
207
2018-10-01T08:53:01.000Z
2022-03-14T12:15:54.000Z
Tools/python37/Lib/site-packages/keystone/systemz_const.py
xxroot/android_universal
af2d8627182f936383d792c1f775d87da50f2f6d
[ "MIT" ]
8
2019-06-29T14:18:51.000Z
2022-02-19T07:30:27.000Z
Tools/python37/Lib/site-packages/keystone/systemz_const.py
xxroot/android_universal
af2d8627182f936383d792c1f775d87da50f2f6d
[ "MIT" ]
53
2019-03-12T16:50:21.000Z
2022-03-15T23:16:18.000Z
# For Keystone Engine. AUTO-GENERATED FILE, DO NOT EDIT [systemz_const.py] KS_ERR_ASM_SYSTEMZ_INVALIDOPERAND = 512 KS_ERR_ASM_SYSTEMZ_MISSINGFEATURE = 513 KS_ERR_ASM_SYSTEMZ_MNEMONICFAIL = 514
38.6
74
0.849741
30
193
5.033333
0.7
0.099338
0.15894
0.298013
0
0
0
0
0
0
0
0.051724
0.098446
193
4
75
48.25
0.816092
0.373057
0
0
1
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
3cd1a40d0f37ae8f33e4cb9226b65daca2544a42
97
py
Python
helper_functions.py
NickAlger/TensorTrainHigherDerivatives
48530d3442953f64eca192fb9187f6b293b0b188
[ "MIT" ]
1
2020-09-30T22:59:38.000Z
2020-09-30T22:59:38.000Z
helper_functions.py
NickAlger/TensorTrainHigherDerivatives
48530d3442953f64eca192fb9187f6b293b0b188
[ "MIT" ]
null
null
null
helper_functions.py
NickAlger/TensorTrainHigherDerivatives
48530d3442953f64eca192fb9187f6b293b0b188
[ "MIT" ]
null
null
null
import numpy as np def unit_vector(k, N): ek = np.zeros(N) ek[k] = 1.0 return ek
9.7
22
0.556701
19
97
2.789474
0.736842
0.113208
0
0
0
0
0
0
0
0
0
0.030303
0.319588
97
9
23
10.777778
0.772727
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.6
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
1
0
0
3
3cd1af276aafb82ab107346cef45a637f9d7b4fe
6,354
py
Python
unsorted/a2-debug/code-inject/a2-code-inject/src/main.py
turbobert/bits
8e8fe7227a1dcb0ebb71a96330641dc290343929
[ "MIT" ]
null
null
null
unsorted/a2-debug/code-inject/a2-code-inject/src/main.py
turbobert/bits
8e8fe7227a1dcb0ebb71a96330641dc290343929
[ "MIT" ]
null
null
null
unsorted/a2-debug/code-inject/a2-code-inject/src/main.py
turbobert/bits
8e8fe7227a1dcb0ebb71a96330641dc290343929
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import subprocess import sys import re # get lines from the definition file, strip empty line and comments filename = sys.argv[1] with open(filename, "r") as f: lines = [ re.sub(r' +', ' ', x.strip()).strip().split(" ") for x in f.read().split("\n") if len(x.strip()) > 0 and x.strip()[0] != '#' ] conf_repo = None conf_additive = None conf_worker = None conf_target = None conf_compression = None target_vm = "vgw" if len(sys.argv) >= 3: target_vm = sys.argv[2] # config pass for line in lines: if line[0] == "vgw": print("vgw") if line[0] == "worker": conf_worker = line[1] if line[0] == "compression": conf_compression = line[1] if line[0] == "repo": conf_repo = line[1] if line[0] == "additive": conf_additive = line[1] if line[0] == "target": conf_target = line[1] worker_tmpdir = subprocess.check_output("ssh %s mktemp -d -p /tmp additive-XXXXXXXXXXXX" % conf_worker, universal_newlines=True, shell=True).split("\n")[0].strip() subprocess.check_output("ssh %s mkdir -p %s/%s" % (conf_worker, worker_tmpdir, conf_additive), universal_newlines=True, shell=True).split("\n")[0].strip() print("Worker: %s" % worker_tmpdir) for line in lines: if line[0] == target_vm: localfile = line[1] remotefile = line[2] s_owner = line[3] s_permissions = line[4] cmd = "ssh %s mkdir -p %s/%s/%s" % (conf_worker, worker_tmpdir, conf_additive, "/".join(remotefile.split("/")[:-1])) print(cmd) subprocess.check_output(cmd, universal_newlines=True, shell=True) # copy localfile if localfile.find("::") == 0: # files outside the repo will have a "::" in the defenition cmd = "scp %s %s:%s/%s/%s" % (localfile.replace("::", ""), conf_worker, worker_tmpdir, conf_additive, remotefile) else: cmd = "scp %s/%s %s:%s/%s/%s" % (conf_repo, localfile, conf_worker, worker_tmpdir, conf_additive, remotefile) print(cmd) subprocess.check_output(cmd, universal_newlines=True, shell=True) cmd = "ssh %s chown %s %s/%s/%s" % (conf_worker, s_owner, worker_tmpdir, conf_additive, remotefile) print(cmd) subprocess.check_output(cmd, universal_newlines=True, shell=True) cmd = "ssh %s chmod %s %s/%s/%s" % (conf_worker, s_permissions, worker_tmpdir, conf_additive, remotefile) print(cmd) subprocess.check_output(cmd, universal_newlines=True, shell=True) cmd = "ssh %s 'cd %s/%s; tar cfJ ../%s.tar.xz *'" % (conf_worker, worker_tmpdir, conf_additive, conf_additive) subprocess.check_output(cmd, universal_newlines=True, shell=True) cmd = "scp %s:%s/%s.tar.xz /tmp" % (conf_worker, worker_tmpdir, conf_additive) subprocess.check_output(cmd, universal_newlines=True, shell=True) if target_vm == "vadm": print("vadm installation") cmd = "ssh %s ssh vadm 'mount /dev/sda1 /mnt'" % (conf_target) subprocess.check_output(cmd, universal_newlines=True, shell=True) cmd = "scp /tmp/%s.tar.xz %s:/tmp" % (conf_additive, conf_target) subprocess.check_output(cmd, universal_newlines=True, shell=True) cmd = "ssh %s scp /tmp/%s.tar.xz vadm:/mnt" % (conf_target, conf_additive) subprocess.check_output(cmd, universal_newlines=True, shell=True) cmd = "ssh %s scp vadm:/mnt/boot/grub/grub.cfg /tmp" % (conf_target) subprocess.check_output(cmd, universal_newlines=True, shell=True) cmd = "ssh %s cat /tmp/grub.cfg" % (conf_target) grub = subprocess.check_output(cmd, universal_newlines=True, shell=True) print("grub-1:%s" % grub) additive_option = "additive=%s.tar.xz" % conf_additive additive_filename = "%s.tar.xz" % conf_additive if grub.find(additive_filename) < 0: print("Grub is missing the additive... adding... %s" % additive_option) if grub.find("additive=") < 0: # easy, no other additives grub = grub.replace(" osarch=", " %s osarch=" % additive_option) else: # add the additive to the already existing additive option old_additive = grub[grub.find("additive="):].split(" ")[0].split("=")[1] grub = grub.replace("additive=%s"%old_additive, "additive=%s,%s"%(old_additive,additive_filename)) cmd = "ssh %s 'cat >/tmp/grub.cfg'" % (conf_target) p = subprocess.Popen(cmd, universal_newlines=True, shell=True, stdin=subprocess.PIPE) p.communicate(input=grub) cmd = "ssh %s scp /tmp/grub.cfg vadm:/mnt/boot/grub/grub.cfg" % (conf_target) subprocess.check_output(cmd, universal_newlines=True, shell=True) cmd = "ssh %s ssh vadm 'umount /mnt'" % (conf_target) subprocess.check_output(cmd, universal_newlines=True, shell=True) if target_vm == "vgw": cmd = "ssh %s 'mount /dev/sda1 /mnt'" % (conf_target) subprocess.check_output(cmd, universal_newlines=True, shell=True) cmd = "scp /tmp/%s.tar.xz %s:/mnt/" % (conf_additive, conf_target) subprocess.check_output(cmd, universal_newlines=True, shell=True) cmd = "ssh %s 'cat /mnt/boot/grub/grub.cfg'" % (conf_target) grub = subprocess.check_output(cmd, universal_newlines=True, shell=True) additive_option = "additive=%s.tar.xz" % conf_additive additive_filename = "%s.tar.xz" % conf_additive if grub.find(additive_filename) < 0: print("Grub is missing the additive... adding... %s" % additive_option) if grub.find("additive=") < 0: # easy, no other additives grub = grub.replace(" osarch=", " %s osarch=" % additive_option) else: # add the additive to the already existing additive option old_additive = grub[grub.find("additive="):].split(" ")[0].split("=")[1] grub = grub.replace("additive=%s"%old_additive, "additive=%s,%s"%(old_additive,additive_filename)) cmd = "ssh %s 'cat >/mnt/boot/grub/grub.cfg'" % (conf_target) p = subprocess.Popen(cmd, universal_newlines=True, shell=True, stdin=subprocess.PIPE) p.communicate(input=grub) cmd = "ssh %s 'umount /mnt'" % (conf_target) subprocess.check_output(cmd, universal_newlines=True, shell=True) cmd = "ssh %s 'reboot'" % (conf_target) subprocess.check_output(cmd, universal_newlines=True, shell=True)
39.465839
163
0.644476
879
6,354
4.511945
0.137656
0.011599
0.11649
0.144226
0.785174
0.750378
0.724407
0.682552
0.664397
0.641704
0
0.007301
0.202392
6,354
161
164
39.465839
0.775257
0.05288
0
0.439252
0
0.009346
0.17604
0.020965
0
0
0
0
0
1
0
false
0
0.028037
0
0.028037
0.093458
0
0
0
null
0
0
0
0
1
1
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
3
3cd7d73816f57e68979e71da9f663e1d4ccecb35
202
py
Python
main/model/stat.py
vanessa-bell/hd-kiosk-v2
6e691c564ea3189bd81c9886fc39e5c5cbc19f8e
[ "MIT" ]
null
null
null
main/model/stat.py
vanessa-bell/hd-kiosk-v2
6e691c564ea3189bd81c9886fc39e5c5cbc19f8e
[ "MIT" ]
1
2017-05-19T19:51:57.000Z
2017-05-19T21:01:11.000Z
main/model/stat.py
vanessa-bell/hd-kiosk-v2
6e691c564ea3189bd81c9886fc39e5c5cbc19f8e
[ "MIT" ]
1
2017-05-30T22:40:47.000Z
2017-05-30T22:40:47.000Z
from google.appengine.ext import ndb import model class Stat(model.Base): faq_key = ndb.KeyProperty(kind=model.Faq, required=True) timestamp = ndb.DateTimeProperty(required=True, auto_now_add=True)
33.666667
68
0.79703
30
202
5.266667
0.7
0.151899
0
0
0
0
0
0
0
0
0
0
0.09901
202
6
68
33.666667
0.868132
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.4
0
1
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
1
0
0
3
3ce40c981a899b20a681ec25e21ff943d14b0dff
143
py
Python
neuroptica/settings.py
bendavidsteel/neuroptica
542b6aef63ab05f369dac129d1d45578cd5a03b3
[ "MIT" ]
161
2019-03-14T17:51:05.000Z
2022-03-20T02:37:18.000Z
neuroptica/settings.py
Xoreus/neuroptica
2ab6771ea3cfe94a62701078a83712d2a33409e3
[ "MIT" ]
2
2020-02-25T23:10:12.000Z
2021-11-02T18:40:28.000Z
neuroptica/settings.py
Xoreus/neuroptica
2ab6771ea3cfe94a62701078a83712d2a33409e3
[ "MIT" ]
37
2019-03-15T02:12:06.000Z
2022-02-16T22:55:00.000Z
import numba import numpy as np NP_COMPLEX = np.complex128 NUMBA_COMPLEX = numba.complex128 NP_FLOAT = np.float64 NUMBA_FLOAT = numba.float64
17.875
32
0.811189
22
143
5.090909
0.409091
0
0
0
0
0
0
0
0
0
0
0.080645
0.132867
143
7
33
20.428571
0.822581
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
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
1
0
0
0
0
3
a724148cc94e3c1a566d0233ec54bebd06e3f950
883
py
Python
lifoid/data/backend.py
romaryd/lifoid
f0c96d2c58cc7980ef7a3747251928f6da9015f5
[ "Apache-2.0" ]
1
2018-06-27T07:04:24.000Z
2018-06-27T07:04:24.000Z
lifoid/data/backend.py
LifoidLabs/lifoid
f0c96d2c58cc7980ef7a3747251928f6da9015f5
[ "Apache-2.0" ]
5
2018-05-23T07:06:45.000Z
2018-10-09T20:08:29.000Z
lifoid/data/backend.py
LifoidLabs/lifoid
f0c96d2c58cc7980ef7a3747251928f6da9015f5
[ "Apache-2.0" ]
1
2019-03-25T17:34:28.000Z
2019-03-25T17:34:28.000Z
# -*- coding: utf8 -*- """ Storage backend definition Author: Romary Dupuis <romary@me.com> Copyright (C) 2017 Romary Dupuis """ class Backend(object): """ Basic backend class """ def __init__(self, prefix, secondary_indexes): self._prefix = prefix self._secondary_indexes = secondary_indexes def prefixed(self, key): """ build a prefixed key """ return '{}:{}'.format(self._prefix, key) def get(self, key, sort_key): raise NotImplementedError def set(self, key, sort_key, value): raise NotImplementedError def delete(self, key, sort_key): raise NotImplementedError def history(self, key, _from='-', _to='+', _desc=True): raise NotImplementedError def find(self, index, value): raise NotImplementedError def latest(self, key): raise NotImplementedError
25.228571
59
0.639864
97
883
5.659794
0.443299
0.076503
0.245902
0.076503
0.149362
0.149362
0.149362
0
0
0
0
0.007496
0.244621
883
35
60
25.228571
0.815592
0.18573
0
0.333333
0
0
0.01
0
0
0
0
0
0
1
0.444444
false
0
0
0
0.555556
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
3
a735c077af38dac05bf11a9e0c1878bd6a44f896
493
py
Python
configs/self6dpp/ssYCBV/ss_mlBCE_MaskFull_PredDouble_PBR05_woCenter_edgeLower_refinePM10/ss_mlBCE_MaskFull_PredDouble_PBR05_woCenter_edgeLower_refinePM10_13_24Bowl.py
THU-DA-6D-Pose-Group/self6dpp
c267cfa55e440e212136a5e9940598720fa21d16
[ "Apache-2.0" ]
33
2021-12-15T07:11:47.000Z
2022-03-29T08:58:32.000Z
configs/self6dpp/ssYCBV/ss_mlBCE_MaskFull_PredDouble_PBR05_woCenter_edgeLower_refinePM10/ss_mlBCE_MaskFull_PredDouble_PBR05_woCenter_edgeLower_refinePM10_13_24Bowl.py
THU-DA-6D-Pose-Group/self6dpp
c267cfa55e440e212136a5e9940598720fa21d16
[ "Apache-2.0" ]
3
2021-12-15T11:39:54.000Z
2022-03-29T07:24:23.000Z
configs/self6dpp/ssYCBV/ss_mlBCE_MaskFull_PredDouble_PBR05_woCenter_edgeLower_refinePM10/ss_mlBCE_MaskFull_PredDouble_PBR05_woCenter_edgeLower_refinePM10_13_24Bowl.py
THU-DA-6D-Pose-Group/self6dpp
c267cfa55e440e212136a5e9940598720fa21d16
[ "Apache-2.0" ]
null
null
null
_base_ = "./ss_mlBCE_MaskFull_PredDouble_PBR05_woCenter_edgeLower_refinePM10_01_02MasterChefCan.py" OUTPUT_DIR = "output/self6dpp/ssYCBV/ss_mlBCE_MaskFull_PredDouble_PBR05_woCenter_edgeLower_refinePM10/13_24Bowl" DATASETS = dict( TRAIN=("ycbv_024_bowl_train_real_aligned_Kuw",), TRAIN2=("ycbv_024_bowl_train_pbr",), ) MODEL = dict( WEIGHTS="output/gdrn/ycbvPbrSO/resnest50d_AugCosyAAEGray_BG05_visib10_mlBCE_DoubleMask_ycbvPbr100e_SO/13_24Bowl/model_final_wo_optim-55b952fc.pth" )
49.3
150
0.853955
65
493
5.846154
0.692308
0.036842
0.078947
0.131579
0.3
0.3
0.3
0.3
0
0
0
0.090517
0.058824
493
9
151
54.777778
0.728448
0
0
0
0
0
0.770791
0.770791
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
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
595484f7d5212e376beb76a0eef438849a9c2ee8
186
py
Python
houmer_in_property/config.py
felipesanma/houmer-markers
5f2e98e7254fb0dc9f436b681e6d45973c9fac66
[ "MIT" ]
null
null
null
houmer_in_property/config.py
felipesanma/houmer-markers
5f2e98e7254fb0dc9f436b681e6d45973c9fac66
[ "MIT" ]
null
null
null
houmer_in_property/config.py
felipesanma/houmer-markers
5f2e98e7254fb0dc9f436b681e6d45973c9fac66
[ "MIT" ]
null
null
null
import logging from dotenv import dotenv_values def get_env(): return dotenv_values(".env") logging.basicConfig(level=logging.INFO) log = logging.getLogger(__name__)
15.5
40
0.725806
23
186
5.565217
0.652174
0.1875
0
0
0
0
0
0
0
0
0
0
0.182796
186
11
41
16.909091
0.842105
0
0
0
0
0
0.022857
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0.166667
0.666667
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
1
0
0
0
3
595c120fe000f1c488d2017726f7ac3e120562e7
547
py
Python
versions_scraper/sources/__init__.py
minedoscrazy/versions-getter
d65c2e992419057109358b995d083e5bac0adf19
[ "MIT" ]
4
2021-07-04T20:15:05.000Z
2021-07-11T00:16:46.000Z
versions_scraper/sources/__init__.py
minedoscrazy/versions-scraper
d65c2e992419057109358b995d083e5bac0adf19
[ "MIT" ]
1
2021-07-04T23:11:29.000Z
2021-07-05T19:12:11.000Z
versions_scraper/sources/__init__.py
minedoscrazy/versions-scraper
d65c2e992419057109358b995d083e5bac0adf19
[ "MIT" ]
null
null
null
from abc import ABC from abc import abstractmethod from abc import abstractproperty from bs4 import BeautifulSoup class Source(ABC): @abstractproperty def URL(self) -> str: ''' URL de onde os dados serão extraídos. ''' ... @abstractproperty def DATA(self) -> dict: ''' Dados extraídos da página. ''' ... @abstractmethod def parse_data(self, soup: BeautifulSoup) -> dict: ''' Método que extrai os dados da página. ''' ...
18.233333
54
0.559415
55
547
5.545455
0.509091
0.068852
0.127869
0
0
0
0
0
0
0
0
0.002786
0.343693
547
29
55
18.862069
0.846797
0.186472
0
0.357143
0
0
0
0
0
0
0
0.034483
0
1
0.214286
false
0
0.285714
0
0.571429
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
0
1
0
0
3
597666c912cf15c877def29c166d551a022ff43a
250
py
Python
Scripts/003_hackerrank/Python/p076.py
OrangePeelFX/Python-Tutorial
0d47f194553666304765f5bbc928374b7aec8a48
[ "MIT" ]
null
null
null
Scripts/003_hackerrank/Python/p076.py
OrangePeelFX/Python-Tutorial
0d47f194553666304765f5bbc928374b7aec8a48
[ "MIT" ]
1
2021-06-02T00:28:17.000Z
2021-06-02T00:28:17.000Z
Scripts/003_hackerrank/Python/p076.py
florianwns/python-scripts
0d47f194553666304765f5bbc928374b7aec8a48
[ "MIT" ]
1
2020-01-13T11:08:18.000Z
2020-01-13T11:08:18.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Problem 076 Integers Come In All Sizes Source : https://www.hackerrank.com/challenges/python-integers-come-in-all-sizes/problem """ a, b, c, d = (int(input()) for _ in range(4)) print(a**b + c**d)
20.833333
88
0.652
42
250
3.857143
0.738095
0.148148
0.17284
0.209877
0.271605
0
0
0
0
0
0
0.027778
0.136
250
11
89
22.727273
0.722222
0.692
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
0.5
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
1
0
3
5985c6d2ecec046c07523c3ed3f3fea497fb7b0c
1,455
py
Python
backend/contrib/newsletter_subscribe/views/newsletter_subscribe_resource.py
szkkteam/agrosys
a390332202f7200632d2ff3816e1b0f3cc76f586
[ "MIT" ]
null
null
null
backend/contrib/newsletter_subscribe/views/newsletter_subscribe_resource.py
szkkteam/agrosys
a390332202f7200632d2ff3816e1b0f3cc76f586
[ "MIT" ]
2
2021-03-31T19:36:44.000Z
2021-12-13T20:30:11.000Z
backend/contrib/newsletter_subscribe/views/newsletter_subscribe_resource.py
szkkteam/flask-starter
7019036e7ee017ca5df9059d0b4a0d29005beab5
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Common Python library imports # Pip package imports from flask import after_this_request, current_app # Internal package imports from backend.api import ModelResource, CREATE, PATCH from backend.extensions.api import api from backend.utils.mail import send_mail from .blueprint import newsletter_subscribe from ..models import NewsletterSubscribe from ..utils import generate_unsubscribe_link @api.model_resource(newsletter_subscribe, NewsletterSubscribe, '/subscribe', '/subscribe/<int:id>') class NewsletterSubscribeResource(ModelResource): include_methods = [CREATE, PATCH] # TODO: Create patch and get methods, where check for logged in users. # or don't let the user to be able to post the isActive parameter, and dont let users to use patch for changing it. Only through the subsribe and unsubsrcibe views. # TODO: Send a confirmation email with "You are successfully subscribed to our newsletter" def create(self, newsletter_subscribe, errors): print("Create called") if errors: return self.errors(errors) send_mail(subject='Successfully subscribed', recipients=list(newsletter_subscribe.email), template='newsletter_subscribe/email/welcome_subscribed.html', unsubscribe_link=generate_unsubscribe_link(newsletter_subscribe.email)) return self.created(newsletter_subscribe)
39.324324
168
0.747079
178
1,455
5.994382
0.55618
0.124649
0.067479
0
0
0
0
0
0
0
0
0.000839
0.180756
1,455
36
169
40.416667
0.894295
0.301031
0
0
0
0
0.113974
0.049554
0
0
0
0.027778
0
1
0.052632
false
0
0.368421
0
0.631579
0.105263
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
1
0
0
3
598f98cab89693af3ea70152d8189a5861bc66b3
486
py
Python
adv_patch_bench/dataloaders/image_only_dataset.py
chawins/adv-patch-bench
224c4a39f9322cd27312deffbf5e8c882bce3dd2
[ "MIT" ]
1
2021-09-05T05:23:29.000Z
2021-09-05T05:23:29.000Z
adv_patch_bench/dataloaders/image_only_dataset.py
chawins/adv-patch-bench
224c4a39f9322cd27312deffbf5e8c882bce3dd2
[ "MIT" ]
null
null
null
adv_patch_bench/dataloaders/image_only_dataset.py
chawins/adv-patch-bench
224c4a39f9322cd27312deffbf5e8c882bce3dd2
[ "MIT" ]
null
null
null
from PIL import Image from torch.utils.data import Dataset class ImageOnlyFolder(Dataset): def __init__(self, image_paths, transform=None): self.image_paths = image_paths self.transform = transform def __getitem__(self, index): image_path = self.image_paths[index] x = Image.open(image_path) if self.transform is not None: x = self.transform(x) return x def __len__(self): return len(self.image_paths)
25.578947
52
0.658436
63
486
4.777778
0.412698
0.166113
0.186047
0
0
0
0
0
0
0
0
0
0.261317
486
18
53
27
0.83844
0
0
0
0
0
0
0
0
0
0
0
0
1
0.214286
false
0
0.142857
0.071429
0.571429
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
3
59cd2b289475bf79ab775c2fe48b78990f02ff5e
507
py
Python
api/comment/serializers.py
Pavel-qy/lx_classroom
dfa26c76bd934734cb3c0dc43a1fd42d56be4ad5
[ "MIT" ]
null
null
null
api/comment/serializers.py
Pavel-qy/lx_classroom
dfa26c76bd934734cb3c0dc43a1fd42d56be4ad5
[ "MIT" ]
null
null
null
api/comment/serializers.py
Pavel-qy/lx_classroom
dfa26c76bd934734cb3c0dc43a1fd42d56be4ad5
[ "MIT" ]
null
null
null
from rest_framework import serializers from .models import Comment class CommentSerializer(serializers.ModelSerializer): owner = serializers.ReadOnlyField(source='owner.username') course = serializers.ReadOnlyField(source='course.id') lecture = serializers.ReadOnlyField(source='lecture.id') hometask = serializers.ReadOnlyField(source='hometask.id') class Meta: model = Comment fields = ['id', 'created', 'owner', 'course', 'lecture', 'hometask', 'homework', 'body']
36.214286
96
0.721893
50
507
7.3
0.48
0.263014
0.328767
0
0
0
0
0
0
0
0
0
0.149901
507
13
97
39
0.846868
0
0
0
0
0
0.179487
0
0
0
0
0
0
1
0
false
0
0.2
0
0.8
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
1
0
0
3
59d24bfdd35faf151eafc385a13580b3e65e2f67
3,053
py
Python
devices/migrations/0014_auto_20140930_1330.py
lindseypack/NIM
944de5b3f276242cd1b8d421b2f1d2fe3e86f1f6
[ "MIT" ]
null
null
null
devices/migrations/0014_auto_20140930_1330.py
lindseypack/NIM
944de5b3f276242cd1b8d421b2f1d2fe3e86f1f6
[ "MIT" ]
null
null
null
devices/migrations/0014_auto_20140930_1330.py
lindseypack/NIM
944de5b3f276242cd1b8d421b2f1d2fe3e86f1f6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('devices', '0013_auto_20140925_1616'), ] operations = [ migrations.AlterField( model_name='switch', name='mac', field=models.CharField(default=b'', max_length=12, verbose_name=b'MAC', blank=True), ), migrations.AlterField( model_name='switch', name='model', field=models.CharField(default=b'', max_length=50, verbose_name=b'Model', blank=True), ), migrations.AlterField( model_name='switch', name='name', field=models.CharField(default=b'', max_length=50, verbose_name=b'Name', blank=True), ), migrations.AlterField( model_name='switch', name='purchaseorder', field=models.CharField(default=b'', max_length=50, verbose_name=b'Purchase Order', blank=True), ), migrations.AlterField( model_name='switch', name='purchaseyr', field=models.CharField(default=b'', max_length=4, verbose_name=b'Purchase Year', blank=True), ), migrations.AlterField( model_name='switch', name='serialno', field=models.CharField(default=b'', max_length=50, verbose_name=b'Serial No', blank=True), ), migrations.AlterField( model_name='switch', name='softwarever', field=models.CharField(default=b'', max_length=20, verbose_name=b'Software Version', blank=True), ), migrations.AlterField( model_name='switch', name='stack', field=models.IntegerField(default=0, verbose_name=b'Stack', blank=True), ), migrations.AlterField( model_name='switch', name='status', field=models.CharField(default=b'active', max_length=128, verbose_name=b'Status', blank=True), ), migrations.AlterField( model_name='switch', name='uplink1', field=models.TextField(default=b'', verbose_name=b'Uplink 1', blank=True), ), migrations.AlterField( model_name='switch', name='uplink2', field=models.TextField(default=b'', verbose_name=b'Uplink 2', blank=True), ), migrations.AlterField( model_name='switch', name='uplink3', field=models.TextField(default=b'', verbose_name=b'Uplink 3', blank=True), ), migrations.AlterField( model_name='switch', name='uplink4', field=models.TextField(default=b'', verbose_name=b'Uplink 4', blank=True), ), migrations.AlterField( model_name='switch', name='uptime', field=models.CharField(default=b'', max_length=50, verbose_name=b'Uptime', blank=True), ), ]
35.917647
109
0.571896
313
3,053
5.434505
0.210863
0.164609
0.205761
0.238683
0.729571
0.71311
0.690182
0.624927
0.258083
0.149912
0
0.020418
0.294137
3,053
84
110
36.345238
0.76891
0.006878
0
0.538462
0
0
0.109571
0.007591
0
0
0
0
0
1
0
false
0
0.025641
0
0.064103
0
0
0
0
null
0
1
1
0
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
3
aba28e1fccd3d745ebc34e7474f1fa655128d471
2,397
py
Python
pyExpenses/RecManip.py
JasonLai256/pyExpenses
a2fefa3b98f5978851f9c3868f62c57460b4309e
[ "BSD-3-Clause" ]
1
2015-01-29T23:41:09.000Z
2015-01-29T23:41:09.000Z
pyExpenses/RecManip.py
JasonLai256/pyExpenses
a2fefa3b98f5978851f9c3868f62c57460b4309e
[ "BSD-3-Clause" ]
null
null
null
pyExpenses/RecManip.py
JasonLai256/pyExpenses
a2fefa3b98f5978851f9c3868f62c57460b4309e
[ "BSD-3-Clause" ]
null
null
null
#! /usr/bin/env python # -*- coding:utf-8 -*- """ pyExpenses.RecManip ~~~~~~~~~~~~~~~~~~~ Implements the interface's object that manipulator of records for pyExpenses. :copyright: (c) 2012 by Jason Lai. :license: BSD, see LICENSE for more details. """ from datetime import date, timedelta from ConfigManip import Config import RecManipImpl STORAGE_BACKEND = RecManipImpl.__dict__[Config.getInfo('StorageBackend')] class RecManip(object): def setUp(self, *args, **kwargs): """It's the method really initialize the instance. This should be called after create a instance, the passing arguments can control defferent options. """ self.impl = STORAGE_BACKEND(*args, **kwargs) def updatePassword(self, oldpwd, newpwd): self.impl.updatePassword(oldpwd, newpwd) def cancelPassword(self, oldpwd): from RecManipImpl import DEFAULT_PASSWORD self.impl.updatePassword(oldpwd, DEFAULT_PASSWORD) def addItem(self, rdate, base_rec): """add a basic record to storage.""" self.impl.addItem(rdate, base_rec) def delItem(self, rdate, base_rec): """delete a specified record. @NOTE: if date not exist,raise a exception. """ self.impl.delItem(rdate, base_rec) def updateItem(self, rdate, base_rec, new_rec): self.impl.updateItem(rdate, base_rec, new_rec) def getAll(self): return self.impl.getAll() def getInfo(self): return self.impl.getInfo() def date_range(self, begin, end): """Return a range of records in specified period. @NOTE: """ return self.impl.date_range(begin, end) def findDate(self, fdate): """find and return the matching record. @NOTE: if date not exist,raise a exception. """ return self.impl.date_range(fdate, fdate + timedelta(1)) def findDates(self, fdate, nth=0): return self.impl.date_range(fdate, fdate + timedelta(nth)) def clear(self): """clear all the data in data manipulator.""" self.impl.clear() def save(self): """save all the data in data manipulator to permanent storage.""" self.impl.save() def importRecord(self, filename): self.impl.importRecord(filename) def exportRecord(self, filename): self.impl.exportRecord(filename)
28.879518
81
0.644556
294
2,397
5.187075
0.397959
0.078689
0.047213
0.031475
0.180328
0.141639
0.10623
0.10623
0.051148
0
0
0.00385
0.241552
2,397
82
82
29.231707
0.834984
0.303713
0
0
0
0
0.009156
0
0
0
0
0
0
1
0.416667
false
0.138889
0.166667
0.083333
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
1
0
0
1
0
0
3
abbfaee77fde1088ea7ca417cddf8082602a3111
390
py
Python
src/c/ast.py
mihaimaruseac/ixcode
b4fdca68b1c4a5fff2ff7c26a6ee562df6ba5c28
[ "MIT" ]
null
null
null
src/c/ast.py
mihaimaruseac/ixcode
b4fdca68b1c4a5fff2ff7c26a6ee562df6ba5c28
[ "MIT" ]
5
2015-09-09T22:18:47.000Z
2015-09-09T22:19:35.000Z
src/c/ast.py
mihaimaruseac/ixcode
b4fdca68b1c4a5fff2ff7c26a6ee562df6ba5c28
[ "MIT" ]
null
null
null
# IxCode - app for code spelunking :: block diagram # AST from C code. # Do this unsafe import to inject this code from src.ast import * class Include(Node): """ An include declaration, holds the included filename (assumed to be correct). """ def __init__(self, fname): self._fname = fname def __str__(self): return '#include <%s>' % self._fname
21.666667
70
0.64359
52
390
4.634615
0.692308
0.112033
0
0
0
0
0
0
0
0
0
0
0.25641
390
17
71
22.941176
0.831034
0.476923
0
0
0
0
0.071823
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0.166667
0.833333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
abcb2e63359535602c1b4d8aab9498e4dd0e3a3a
721
py
Python
AC-OhmsLaw/polar.py
epccs/AC_Circuit_Analysis
da68a69ea7ca8bf841067e88ede66e4c5aadd0b2
[ "MIT" ]
null
null
null
AC-OhmsLaw/polar.py
epccs/AC_Circuit_Analysis
da68a69ea7ca8bf841067e88ede66e4c5aadd0b2
[ "MIT" ]
null
null
null
AC-OhmsLaw/polar.py
epccs/AC_Circuit_Analysis
da68a69ea7ca8bf841067e88ede66e4c5aadd0b2
[ "MIT" ]
null
null
null
# This is a partial program to run interactively from the command line, e.g. # linux: python3 -i polar.py # win: python -i polar.py import numpy # Euler's Formula for Polar (magnitude, degrees) to Rectangular (x, yj) on complex plane. def Pd2R(A, deg): return A*( numpy.cos(numpy.deg2rad(deg)) + 1.0j*numpy.sin(numpy.deg2rad(deg)) ) # Display Polar format def R2Pd(x): string2return = ('{:0.3g}'.format(numpy.abs(x)) + "<" + '{:0.3g}'.format(numpy.rad2deg(numpy.angle(x))) + "deg") return string2return # Display Polar format with unit def R2PdU(x, unit): string2return = ('{:0.3g}'.format(numpy.abs(x)) + unit + "<" + '{:0.3g}'.format(numpy.rad2deg(numpy.angle(x))) + "deg") return string2return
37.947368
123
0.665742
110
721
4.363636
0.509091
0.025
0.075
0.116667
0.354167
0.354167
0.354167
0.225
0.225
0.225
0
0.036125
0.15534
721
19
124
37.947368
0.752053
0.368932
0
0.222222
0
0
0.080178
0
0
0
0
0
0
1
0.333333
false
0
0.111111
0.111111
0.777778
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
1
0
0
3
abd3cdbc03aad6d375755406461e6334fbbe7d8d
979
py
Python
fboss/system_tests/testutils/ip_conversion.py
fakeNetflix/facebook-repo-fboss
b4b64540c779022bcbeff72376549d0addf3f7e7
[ "BSD-3-Clause" ]
7
2016-09-22T22:53:09.000Z
2016-10-05T13:19:16.000Z
fboss/system_tests/testutils/ip_conversion.py
fakeNetflix/facebook-repo-fboss
b4b64540c779022bcbeff72376549d0addf3f7e7
[ "BSD-3-Clause" ]
2
2018-10-06T18:29:44.000Z
2018-10-07T16:46:04.000Z
fboss/system_tests/testutils/ip_conversion.py
fakeNetflix/facebook-repo-fboss
b4b64540c779022bcbeff72376549d0addf3f7e7
[ "BSD-3-Clause" ]
1
2018-02-28T06:57:20.000Z
2018-02-28T06:57:20.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import socket from facebook.network.Address.ttypes import BinaryAddress def ip_addr_to_str(addr): ''' :param addr: ip_types.BinaryAddress representing an ip address :returns: string representation of ip address :rtype: str or unicode ''' family = socket.AF_INET if len(addr.addr) == 4 else socket.AF_INET6 return socket.inet_ntop(family, addr.addr) def ip_str_to_addr(addr_str): ''' :param addr_str: ip address in string representation :returns: thrift struct BinaryAddress :rtype: ip_types.BinaryAddress ''' # Try v4 try: addr = socket.inet_pton(socket.AF_INET, addr_str) return BinaryAddress(addr=addr) except socket.error: pass # Try v6 addr = socket.inet_pton(socket.AF_INET6, addr_str) return BinaryAddress(addr=addr)
23.878049
71
0.722165
131
979
5.10687
0.381679
0.059791
0.095665
0.053812
0.179372
0.179372
0
0
0
0
0
0.006427
0.205312
979
40
72
24.475
0.85347
0.275792
0
0.117647
0
0
0
0
0
0
0
0
0
1
0.117647
false
0.058824
0.352941
0
0.647059
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
0
0
0
0
0
1
1
0
1
0
0
3
abe5c0007aaec761aa4c061c6ddb989f441b0403
316
py
Python
res/PyTorchExamples/examples/le/__init__.py
juitem/ONE
8c6a4b7738074573b6ac5c82dcf1f6697520d1ed
[ "Apache-2.0" ]
255
2020-05-22T07:45:29.000Z
2022-03-29T23:58:22.000Z
res/PyTorchExamples/examples/le/__init__.py
juitem/ONE
8c6a4b7738074573b6ac5c82dcf1f6697520d1ed
[ "Apache-2.0" ]
5,102
2020-05-22T07:48:33.000Z
2022-03-31T23:43:39.000Z
res/PyTorchExamples/examples/le/__init__.py
juitem/ONE
8c6a4b7738074573b6ac5c82dcf1f6697520d1ed
[ "Apache-2.0" ]
120
2020-05-22T07:51:08.000Z
2022-02-16T19:08:05.000Z
import torch import torch.nn as nn # model class net_le(nn.Module): def __init__(self): super().__init__() def forward(self, inputs): return torch.le(inputs[0], inputs[1]) _model_ = net_le() # dummy input for onnx generation _dummy_ = [torch.randn(1, 2, 3, 3), torch.randn(1, 2, 3, 3)]
17.555556
60
0.639241
50
316
3.76
0.52
0.117021
0.117021
0.12766
0.148936
0.148936
0
0
0
0
0
0.040323
0.21519
316
17
61
18.588235
0.717742
0.117089
0
0
0
0
0
0
0
0
0
0
0
1
0.222222
false
0
0.222222
0.111111
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
1
0
0
0
1
1
0
0
3
f9f2a98c8de0fbc2e9e602d677931d3eabd8a3d7
3,085
py
Python
test/test_encoder.py
alexanderwhatley/pepnet
82a3087262917d4780ed8facbd49b766f2ff9200
[ "Apache-2.0" ]
17
2018-02-02T16:24:23.000Z
2021-08-08T08:04:03.000Z
test/test_encoder.py
alexanderwhatley/pepnet
82a3087262917d4780ed8facbd49b766f2ff9200
[ "Apache-2.0" ]
1
2018-05-03T09:46:19.000Z
2018-05-03T09:46:19.000Z
test/test_encoder.py
alexanderwhatley/pepnet
82a3087262917d4780ed8facbd49b766f2ff9200
[ "Apache-2.0" ]
4
2018-04-22T14:47:47.000Z
2021-01-07T08:41:15.000Z
from pepnet.encoder import Encoder from nose.tools import eq_ import numpy as np def test_encoder_index_lists(): encoder = Encoder() S_idx = encoder.index_dict["S"] A_idx = encoder.index_dict["A"] index_lists = encoder.encode_index_lists(["SSS", "AAA", "SAS"]) eq_(index_lists, [ [S_idx, S_idx, S_idx], [A_idx, A_idx, A_idx], [S_idx, A_idx, S_idx] ]) def test_encoder_prepare_sequences_padding(): encoder = Encoder() eq_(encoder.prepare_sequences(["SISI"], 5), ["SISI-"]) def test_encoder_prepare_sequences_start_token(): encoder = Encoder(add_start_tokens=True) eq_(encoder.prepare_sequences(["SISI"], 5), ["^SISI-"]) def test_encoder_prepare_sequences_stop_token(): encoder = Encoder(add_stop_tokens=True) eq_(encoder.prepare_sequences(["SISI"], 5), ["SISI$-"]) def test_encoder_index_array(): encoder = Encoder() S_idx = encoder.index_dict["S"] A_idx = encoder.index_dict["A"] assert S_idx > 0 assert A_idx > 0 X = encoder.encode_index_array(["SSS", "AAA", "SASA"], max_peptide_length=4) expected = np.array([ [S_idx, S_idx, S_idx, 0], [A_idx, A_idx, A_idx, 0], [S_idx, A_idx, S_idx, A_idx] ]) assert (X == expected).all() def test_encoder_FOFE(): # turn off the gap character '-' used for ends of shorter sequences encoder = Encoder(variable_length_sequences=False) x = encoder.encode_FOFE(["AAA", "SSS", "SASA"]) eq_(x.shape, (3, 20)) def test_encoder_FOFE_bidirectional(): # turn off the gap character '-' used for ends of shorter sequences encoder = Encoder(variable_length_sequences=False) x = encoder.encode_FOFE(["AAA", "SSS", "SASA"], bidirectional=True) eq_(x.shape, (3, 40)) def test_encoder_blosum(): encoder = Encoder(variable_length_sequences=False) x = encoder.encode_blosum(["AAA", "SSS", "EEE"]) eq_(x.shape, (3, 3, 20)) def test_encoder_pmbec(): encoder = Encoder(variable_length_sequences=False) x = encoder.encode_pmbec(["AAA", "SSS", "EEE"]) eq_(x.shape, (3, 3, 20)) def test_encoder_onehot(): encoder = Encoder(variable_length_sequences=False) x = encoder.encode_onehot(["AAA", "SSS", "EEE"]) eq_(x.shape, (3, 3, 20)) def test_encoder_blosum_with_positional_features(): encoder = Encoder( variable_length_sequences=False, add_normalized_position=True, add_normalized_centrality=True) x = encoder.encode_blosum(["AAA", "SSS", "EEE"]) eq_(x.shape, (3, 3, 22)) def test_encoder_pmbec_with_positional_features(): encoder = Encoder( variable_length_sequences=False, add_normalized_position=True, add_normalized_centrality=True) x = encoder.encode_pmbec(["AAA", "SSS", "EEE"]) eq_(x.shape, (3, 3, 22)) def test_encoder_onehot_with_positional_features(): encoder = Encoder( variable_length_sequences=False, add_normalized_position=True, add_normalized_centrality=True) x = encoder.encode_onehot(["AAA", "SSS", "EEE"]) eq_(x.shape, (3, 3, 22))
32.135417
80
0.669044
426
3,085
4.518779
0.171362
0.047273
0.094545
0.116364
0.758961
0.734545
0.710649
0.695065
0.695065
0.628571
0
0.01517
0.188006
3,085
95
81
32.473684
0.753293
0.042464
0
0.5
0
0
0.042712
0
0
0
0
0
0.039474
1
0.171053
false
0
0.039474
0
0.210526
0
0
0
0
null
0
0
0
0
1
1
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
3
e6009e40ccedd7bf4540a03da55cefe34e59a556
240
py
Python
HospitalManagement/Landing/views.py
yonathanF/Hospital_Management
b41d0a7ede7c0ebeaeff532f3134609ed730eecb
[ "MIT" ]
null
null
null
HospitalManagement/Landing/views.py
yonathanF/Hospital_Management
b41d0a7ede7c0ebeaeff532f3134609ed730eecb
[ "MIT" ]
null
null
null
HospitalManagement/Landing/views.py
yonathanF/Hospital_Management
b41d0a7ede7c0ebeaeff532f3134609ed730eecb
[ "MIT" ]
2
2019-05-12T03:31:30.000Z
2020-11-02T07:55:14.000Z
from django.http import HttpResponse from django.shortcuts import render def index(request): ''' renders the landing html page ... everything is in the html for this ''' return HttpResponse(render(request, 'Landing/index.html'))
26.666667
80
0.741667
32
240
5.5625
0.65625
0.11236
0
0
0
0
0
0
0
0
0
0
0.1625
240
8
81
30
0.885572
0.283333
0
0
0
0
0.109756
0
0
0
0
0
0
1
0.25
false
0
0.5
0
1
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
1
0
0
1
0
0
0
0
3
e6035244181c7fefef082800bc2c9bb93a5c8ca9
12,594
py
Python
make_dinos.py
stegosaurus12/NFT-Rexx
aba444cc03a7b7063eb82575ec7ca531aa964fdf
[ "BSD-3-Clause" ]
null
null
null
make_dinos.py
stegosaurus12/NFT-Rexx
aba444cc03a7b7063eb82575ec7ca531aa964fdf
[ "BSD-3-Clause" ]
null
null
null
make_dinos.py
stegosaurus12/NFT-Rexx
aba444cc03a7b7063eb82575ec7ca531aa964fdf
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python3 from PIL import Image import numpy as np import os import random # get path dirname = os.path.dirname(os.path.abspath(__file__)) # set final dimensions dimensions = 480, 480 # preset background color options backgrounds = [(128, 197, 204), (242, 212, 73), (161, 182, 248), (134, 226, 241), (247, 177, 22), (104, 205, 58), (240, 232, 205), (253, 202, 162), (252, 169, 133), (255, 237, 81), (191, 228, 118), (133, 202, 93), (181, 225, 172), (140, 210, 144), (134, 207, 190), (72, 181, 163), (143, 206, 223), (111, 183, 214), (148, 168, 208), (117, 137, 191), (193, 179, 215), (165, 137, 193), (251, 182, 209), (249, 140, 182) ] # keep track of which images have red eyes, poop, fart, santa hats, leprechaun hats, traffic cone, fire, mask tracker = {} tracker['redeye'], tracker['poop'], tracker['fart'], tracker['santa'], tracker['leprechaun'], tracker['cone'], tracker['fire'], tracker['mask'], tracker['candycane'], tracker['rotate'] = ({} for _ in range(10)) tracker['redeye']['list'], tracker['poop']['list'], tracker['fart']['list'], tracker['santa']['list'], tracker['leprechaun']['list'], tracker['cone']['list'], tracker['fire']['list'], tracker['mask']['list'], tracker['candycane']['list'], tracker['rotate']['list'] = ([] for _ in range(10)) # keep track of percentages for each item tracked (note this is not set here, but further down in the code) tracker['redeye']['percent'] = 0.5 tracker['fart']['percent'] = 2.5 tracker['poop']['percent'] = 2.5 tracker['santa']['percent'] = 2.9 tracker['leprechaun']['percent'] = 2.9 tracker['cone']['percent'] = 2.9 tracker['fire']['percent'] = 2.5 tracker['mask']['percent'] = 2.5 tracker['candycane']['percent'] = 2.5 tracker['rotate']['percent'] = 0.25 # read in hat choices hatchoices = ['santahat', 'bluehair', 'brownhair', 'greenhair', 'littlebrownhair', 'littlegrayhair', 'redhair', 'redponytail', 'elvishair', 'cowboyhat', 'leprechaunhat', 'redcap', 'backwardsredcap', 'bluecap', 'trafficcone', 'horns1', 'horns2'] hats = {} for hat in hatchoices: hatpath = dirname + "/parts/head/" + str(hat) + ".png" hats[hat] = Image.open(hatpath) # read in butt choices buttchoices = ['fart', 'poop'] butts = {} for butt in buttchoices: buttpath = dirname + "/parts/butt/" + str(butt) + ".png" butts[butt] = Image.open(buttpath) # read in mouth choices mouthchoices = ['pipe', 'tongue', 'fire', 'mask', 'buckteeth'] mouths = {} for mouth in mouthchoices: mouthpath = dirname + "/parts/mouth/" + str(mouth) + ".png" mouths[mouth] = Image.open(mouthpath) # read in hand choices handchoices = ['candycane', 'cane', 'teacup', 'beer'] hands = {} for hand in handchoices: handpath = dirname + "/parts/hand/" + str(hand) + ".png" hands[hand] = Image.open(handpath) # open file to write rare characteristics in ascending order filename2 = dirname + '/all_feature_list_numerical_order.txt' f2 = open(filename2, 'w') f2.write("Filename\tName\tEye\tHead\tButt\tMouth\tHand\tFlip\tUpsideDown\n") # set name name = 'NFT-Rexx' # set number of iterations (i.e. number of dinos) num_iters = 2500 for x in range (0, num_iters): # set seed epoch = 286 # current cardano epoch when feature added random.seed(x + epoch) # print name to file f2.write("trex" + str(x) + ".png\t" + name + str(x) + "\t") # select preset background color at random (equal weight) ### bg_int = random.randrange(1, len(backgrounds) + 1, 1) - 1 ### b = backgrounds[bg_int] # or select randomly generated background color at random b = (random.randint(100, 255), random.randint(100, 255), random.randint(100, 255)) # select eye color (0.5% are red, 99.5% white) eye_int = random.randint(0, 1000) if eye_int <= 5: e = (255, 0, 0) # red f2.write("red\t") else: e = (255, 255, 255) # white f2.write("white\t") # set dino color to black d = (0, 0, 0) # dino # set basic trex image (b = background, d = dino) trex = [ [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, d, d, d, d, d, d, d, d, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, d, d, d, d, d, d, d, d, d, d, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, d, d, e, d, d, d, d, d, d, d, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, d, d, d, d, d, d, d, d, d, d, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, d, d, d, d, d, d, d, d, d, d, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, d, d, d, d, d, d, d, d, d, d, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, d, d, d, d, d, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, d, d, d, d, d, d, d, d, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, d, b, b, b, b, b, b, b, b, d, d, d, d, d, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, d, b, b, b, b, b, b, b, d, d, d, d, d, d, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, d, d, b, b, b, b, d, d, d, d, d, d, d, d, d, d, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, d, d, d, b, b, d, d, d, d, d, d, d, d, d, b, d, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, d, d, d, d, d, d, d, d, d, d, d, d, d, d, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, d, d, d, d, d, d, d, d, d, d, d, d, d, d, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, d, d, d, d, d, d, d, d, d, d, d, d, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, d, d, d, d, d, d, d, d, d, d, d, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, d, d, d, d, d, d, d, d, d, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, d, d, d, d, d, d, d, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, d, d, d, b, d, d, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, d, d, b, b, b, d, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, d, b, b, b, b, d, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, d, d, b, b, b, d, d, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b], [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b] ] # make head choice hatchoices.append("none") hd = random.choices(hatchoices, weights = [5,10,10,10,10,10,10,10,10,7.5,5,10,10,10,5,7.5,7.5,25], k = 1)[0] hatchoices.pop() f2.write(hd + "\t") # make butt choice buttchoices.append("none") bt = random.choices(buttchoices, weights = [2.5,2.5,95], k = 1)[0] buttchoices.pop() f2.write(bt + "\t") # make mouth choice mouthchoices.append("none") mt = random.choices(mouthchoices, weights = [10,30,2.5,2.5,5,50], k = 1)[0] mouthchoices.pop() f2.write(mt + "\t") # make hand choice handchoices.append("none") ha = random.choices(handchoices, weights = [2.5, 7.5, 10, 10, 70], k = 1)[0] handchoices.pop() f2.write(ha + "\t") # convert pixels into array using numpy array = np.array(trex, dtype = np.uint8) # use PIL to create image from array of pixels new_image = Image.fromarray(array).convert('RGBA') # add in butt choice if bt == "none": pass else: new_image = Image.alpha_composite(new_image, butts[bt]) # add in mouth choice if mt == "none": pass else: new_image = Image.alpha_composite(new_image, mouths[mt]) # add in head choice if hd == "none": pass else: new_image = Image.alpha_composite(new_image, hats[hd]) # add in hand choice if ha == "none": pass else: new_image = Image.alpha_composite(new_image, hands[ha]) # choose whether to flip from right to left flip = random.choices([True, False], weights = [15, 85], k = 1)[0] new_image = new_image.transpose(method=Image.FLIP_LEFT_RIGHT) if flip == True else new_image f2.write(str(flip) + "\t") # choose whether to rotate 180 degrees rotate = random.choices([True, False], weights = [2.5, 997.5], k = 1)[0] new_image = new_image.transpose(method=Image.ROTATE_180) if rotate == True else new_image f2.write(str(rotate) + "\n") # update trackers as needed tracker['redeye']['list'].append(x) if e == (255, 0, 0) else None tracker['fart']['list'].append(x) if bt == 'fart' else None tracker['poop']['list'].append(x) if bt == 'poop' else None tracker['santa']['list'].append(x) if hd == 'santahat' else None tracker['leprechaun']['list'].append(x) if hd == 'leprechaunhat' else None tracker['cone']['list'].append(x) if hd == 'trafficcone' else None tracker['fire']['list'].append(x) if mt == 'fire' else None tracker['mask']['list'].append(x) if mt == 'mask' else None tracker['candycane']['list'].append(x) if ha == 'candycane' else None tracker['rotate']['list'].append(x) if rotate == True else None # resize image to specified dimensions new_image = new_image.resize(dimensions) # specify output path and file name imgname = dirname + '/image_output/' + 'trex' + str(x) + '.png' # print output new_image.save(imgname) # close f2 file f2.close() # print out which images have which tracker features as well as save to file filename = dirname + '/rare_feature_stats.txt' with open(filename, 'w') as f: for key in tracker: percent = round(len(tracker[key]['list'])/num_iters*100, 3) outline = str(key) + ' (' + str(tracker[key]['percent']) + '%) => ' + str(tracker[key]['list']) + ' ' + str(percent) + '%' print(outline) f.write(outline + "\n")
50.782258
290
0.495712
2,660
12,594
2.330075
0.118797
0.44466
0.652469
0.851242
0.34737
0.321071
0.321071
0.3101
0.300904
0.300904
0
0.044899
0.266079
12,594
247
291
50.987854
0.625663
0.111323
0
0.189349
0
0
0.087222
0.011127
0
0
0
0
0
1
0
false
0.023669
0.023669
0
0.023669
0.005917
0
0
0
null
1
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
3
e6072801caacc27f1d3a4c89056b9fae553b97ae
88
py
Python
backend/livetracking/datasource/constants.py
wisnuprama/shipment-live-tracking
1fabb374becea3489c28890e7b538b15f1229713
[ "MIT" ]
null
null
null
backend/livetracking/datasource/constants.py
wisnuprama/shipment-live-tracking
1fabb374becea3489c28890e7b538b15f1229713
[ "MIT" ]
8
2019-12-09T13:34:39.000Z
2022-02-26T20:36:45.000Z
backend/livetracking/datasource/constants.py
wisnuprama/shipment-live-tracking
1fabb374becea3489c28890e7b538b15f1229713
[ "MIT" ]
1
2019-11-30T07:51:22.000Z
2019-11-30T07:51:22.000Z
K_STATUS_CREATED = 'Created' K_STATUS_OTW = 'On The Way' K_STATUS_FINISHED = 'Finished'
22
30
0.772727
14
88
4.428571
0.571429
0.33871
0
0
0
0
0
0
0
0
0
0
0.125
88
3
31
29.333333
0.805195
0
0
0
0
0
0.284091
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
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
3
e60e95eda33677c0fd927f2403e9257861c1e9e5
503
py
Python
server/pitches/migrations/0012_auto_20171216_2219.py
bholtbholt/unconf
beb33f93bad7f98d6bca1b0e3c70f0f93cdbc7e5
[ "MIT" ]
10
2018-04-21T20:09:00.000Z
2021-08-05T20:03:52.000Z
server/pitches/migrations/0012_auto_20171216_2219.py
bholtbholt/unconf
beb33f93bad7f98d6bca1b0e3c70f0f93cdbc7e5
[ "MIT" ]
16
2018-04-24T00:41:12.000Z
2020-06-05T17:30:10.000Z
server/pitches/migrations/0012_auto_20171216_2219.py
bholtbholt/unconf
beb33f93bad7f98d6bca1b0e3c70f0f93cdbc7e5
[ "MIT" ]
3
2018-06-13T20:38:51.000Z
2019-08-17T22:56:54.000Z
# Generated by Django 2.0 on 2017-12-17 06:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pitches', '0011_schedule'), ] operations = [ migrations.AlterField( model_name='slot', name='end_time', field=models.TimeField(), ), migrations.AlterField( model_name='slot', name='start_time', field=models.TimeField(), ), ]
20.958333
45
0.548708
48
503
5.645833
0.666667
0.147601
0.184502
0.214022
0.273063
0.273063
0
0
0
0
0
0.053731
0.333996
503
23
46
21.869565
0.755224
0.085487
0
0.470588
1
0
0.100437
0
0
0
0
0
0
1
0
false
0
0.058824
0
0.235294
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
e63de178a889a96744233d4e6af9be43d31c5d79
3,587
py
Python
temboo/core/Library/Kiva/Teams/GetTeamByShortname.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
7
2016-03-07T02:07:21.000Z
2022-01-21T02:22:41.000Z
temboo/core/Library/Kiva/Teams/GetTeamByShortname.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
null
null
null
temboo/core/Library/Kiva/Teams/GetTeamByShortname.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
8
2016-06-14T06:01:11.000Z
2020-04-22T09:21:44.000Z
# -*- coding: utf-8 -*- ############################################################################### # # GetTeamByShortname # Returns detailed information about one or more teams, using team shortnames. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, # either express or implied. See the License for the specific # language governing permissions and limitations under the License. # # ############################################################################### from temboo.core.choreography import Choreography from temboo.core.choreography import InputSet from temboo.core.choreography import ResultSet from temboo.core.choreography import ChoreographyExecution import json class GetTeamByShortname(Choreography): def __init__(self, temboo_session): """ Create a new instance of the GetTeamByShortname Choreo. A TembooSession object, containing a valid set of Temboo credentials, must be supplied. """ super(GetTeamByShortname, self).__init__(temboo_session, '/Library/Kiva/Teams/GetTeamByShortname') def new_input_set(self): return GetTeamByShortnameInputSet() def _make_result_set(self, result, path): return GetTeamByShortnameResultSet(result, path) def _make_execution(self, session, exec_id, path): return GetTeamByShortnameChoreographyExecution(session, exec_id, path) class GetTeamByShortnameInputSet(InputSet): """ An InputSet with methods appropriate for specifying the inputs to the GetTeamByShortname Choreo. The InputSet object is used to specify input parameters when executing this Choreo. """ def set_AppID(self, value): """ Set the value of the AppID input for this Choreo. ((optional, string) Your unique application ID, usually in reverse DNS notation.) """ super(GetTeamByShortnameInputSet, self)._set_input('AppID', value) def set_ResponseType(self, value): """ Set the value of the ResponseType input for this Choreo. ((optional, string) Output returned can be XML or JSON. Defaults to JSON.) """ super(GetTeamByShortnameInputSet, self)._set_input('ResponseType', value) def set_TeamShortname(self, value): """ Set the value of the TeamShortname input for this Choreo. ((required, string) The Team shortname for which to return details.) """ super(GetTeamByShortnameInputSet, self)._set_input('TeamShortname', value) class GetTeamByShortnameResultSet(ResultSet): """ A ResultSet with methods tailored to the values returned by the GetTeamByShortname Choreo. The ResultSet object is used to retrieve the results of a Choreo execution. """ def getJSONFromString(self, str): return json.loads(str) def get_Response(self): """ Retrieve the value for the "Response" output from this Choreo execution. (The response from Kiva.) """ return self._output.get('Response', None) class GetTeamByShortnameChoreographyExecution(ChoreographyExecution): def _make_result_set(self, response, path): return GetTeamByShortnameResultSet(response, path)
38.569892
139
0.693895
414
3,587
5.932367
0.39372
0.02443
0.022801
0.042345
0.177524
0.056596
0.030537
0
0
0
0
0.004806
0.187901
3,587
92
140
38.98913
0.838311
0.467243
0
0
0
0
0.048408
0.024204
0
0
0
0
0
1
0.344828
false
0
0.172414
0.172414
0.862069
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
1
0
0
3
e646a2e7e06bd6412557f932ab9eaccbfe4cb323
331
py
Python
src/repositories/plot_data_repository.py
yasuaki-344/streamlit-docker
5fc8ed174c69da86812b75517c75e94e4fcab9e3
[ "MIT" ]
null
null
null
src/repositories/plot_data_repository.py
yasuaki-344/streamlit-docker
5fc8ed174c69da86812b75517c75e94e4fcab9e3
[ "MIT" ]
null
null
null
src/repositories/plot_data_repository.py
yasuaki-344/streamlit-docker
5fc8ed174c69da86812b75517c75e94e4fcab9e3
[ "MIT" ]
null
null
null
"""プロットデータアクセスオブジェクトのサンプル.""" import numpy as np class PlotDataRepository: """データアクセスオブジェクトの一例.""" def __init__(self): """Initialize a new instance of ExampleRepository.""" pass def generate_data(self) -> np.array: """データ取得の一例.""" x_data = np.random.random(20) return x_data
20.6875
61
0.619335
34
331
5.823529
0.764706
0.050505
0
0
0
0
0
0
0
0
0
0.008065
0.250755
331
15
62
22.066667
0.790323
0.299094
0
0
0
0
0
0
0
0
0
0
0
1
0.285714
false
0.142857
0.142857
0
0.714286
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
1
0
0
3
e661ca840f1a069a68b7b45e04490e2388643c8c
525
py
Python
rsgeo-py/rsgeo/pandas_extension.py
YuRiTan/geofunc
1757f13ec3777cb63a6de151f2aa216b88ad12ee
[ "MIT" ]
3
2020-12-15T15:17:31.000Z
2021-03-24T14:00:12.000Z
rsgeo-py/rsgeo/pandas_extension.py
YuRiTan/rsgeo
1757f13ec3777cb63a6de151f2aa216b88ad12ee
[ "MIT" ]
null
null
null
rsgeo-py/rsgeo/pandas_extension.py
YuRiTan/rsgeo
1757f13ec3777cb63a6de151f2aa216b88ad12ee
[ "MIT" ]
null
null
null
import pandas as pd from rsgeo.geometry import Polygon @pd.api.extensions.register_dataframe_accessor("rsgeo") class GeoAccessor: def __init__(self, pandas_obj): self._obj = pandas_obj self._x = "x_pos" self._y = "y_pos" def _get_xy(self): return self._obj[self._x].values, self._obj[self._y].values def within(self, polygon: Polygon): return polygon.contains(*self._get_xy()) def distance(self, polygon: Polygon): return polygon.distance(*self._get_xy())
26.25
67
0.674286
72
525
4.597222
0.402778
0.084592
0.07855
0.145015
0.187311
0
0
0
0
0
0
0
0.207619
525
19
68
27.631579
0.795673
0
0
0
0
0
0.028571
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0.214286
0.714286
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
1
0
0
3
0515c3ed8038b98a12e73119b04357d41f7f6d65
419
py
Python
largest_prime_factor.py
sookoor/PythonInterviewPrep
f9862511560894dba39cd06bb82996d1c9d695c6
[ "MIT" ]
null
null
null
largest_prime_factor.py
sookoor/PythonInterviewPrep
f9862511560894dba39cd06bb82996d1c9d695c6
[ "MIT" ]
null
null
null
largest_prime_factor.py
sookoor/PythonInterviewPrep
f9862511560894dba39cd06bb82996d1c9d695c6
[ "MIT" ]
null
null
null
def get_largest_prime_factor(n): d = 2 factors = [] while n > 1: while n % d == 0: factors.append(d) n /= d; d += 1 if d * d > n: if n > 1: factors.append(n) break return max(factors) if __name__ == "__main__": assert get_largest_prime_factor(13195) == 29 print get_largest_prime_factor(600851475143)
22.052632
48
0.501193
53
419
3.641509
0.45283
0.15544
0.233161
0.326425
0
0
0
0
0
0
0
0.095238
0.398568
419
18
49
23.277778
0.670635
0
0
0
0
0
0.019093
0
0
0
0
0
0.0625
0
null
null
0
0
null
null
0.0625
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
1
0
0
0
0
0
0
0
0
3
0517e46a19b5fd7f15289e6c2b40732c161bdaa3
1,019
py
Python
tests/providers/test_namesilo.py
chibiegg/lexicon
6230ea1e567a730243dc77c08ff6c4c16f136157
[ "MIT" ]
null
null
null
tests/providers/test_namesilo.py
chibiegg/lexicon
6230ea1e567a730243dc77c08ff6c4c16f136157
[ "MIT" ]
null
null
null
tests/providers/test_namesilo.py
chibiegg/lexicon
6230ea1e567a730243dc77c08ff6c4c16f136157
[ "MIT" ]
null
null
null
# Test for one implementation of the interface from lexicon.providers.namesilo import Provider from integration_tests import IntegrationTests from unittest import TestCase import pytest # Hook into testing framework by inheriting unittest.TestCase and reuse # the tests which *each and every* implementation of the interface must # pass, by inheritance from define_tests.TheTests class NameSiloProviderTests(TestCase, IntegrationTests): Provider = Provider provider_name = 'namesilo' domain = 'capsulecdfake.com' def _test_engine_overrides(self): overrides = super(NameSiloProviderTests, self)._test_engine_overrides() overrides.update({'api_endpoint': 'http://sandbox.namesilo.com/api'}) return overrides def _filter_query_parameters(self): return ['key'] # TODO: this should be enabled @pytest.mark.skip(reason="regenerating auth keys required") def test_Provider_when_calling_update_record_should_modify_record_name_specified(self): return
37.740741
91
0.770363
121
1,019
6.297521
0.603306
0.041995
0.049869
0.073491
0
0
0
0
0
0
0
0
0.161923
1,019
27
92
37.740741
0.892272
0.256133
0
0
0
0
0.135458
0
0
0
0
0.037037
0
1
0.176471
false
0
0.235294
0.117647
0.823529
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
1
0
0
3
051b01ac7002e1a5db3dfc27fe2ee48e7aca7376
276
py
Python
calc-app/mixins/json_mixin.py
t4d-classes/python_10042021
e2c28448ad66784c429655ab766f902b76d6ac79
[ "MIT" ]
null
null
null
calc-app/mixins/json_mixin.py
t4d-classes/python_10042021
e2c28448ad66784c429655ab766f902b76d6ac79
[ "MIT" ]
null
null
null
calc-app/mixins/json_mixin.py
t4d-classes/python_10042021
e2c28448ad66784c429655ab766f902b76d6ac79
[ "MIT" ]
null
null
null
import json class JsonMixin: def to_json(self): # [ HistoryEntry(), HistoryEntry(), HistoryEntry() ] return json.dumps(self._data_, indent=2, default=lambda o: o.__dict__) def from_json(self, json_data): self._data_ = json.loads(json_data)
23
78
0.65942
35
276
4.857143
0.542857
0.094118
0
0
0
0
0
0
0
0
0
0.00463
0.217391
276
11
79
25.090909
0.782407
0.181159
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0.166667
0.833333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
05474d7c7f75ef7b43eeee797c67bb6b538c612d
949
py
Python
CODE/DA_tagging/test_supervise_icsi.py
pegahani/REUS
3de7505fcf971333e294c490371d7b429d8fc9d0
[ "MIT" ]
null
null
null
CODE/DA_tagging/test_supervise_icsi.py
pegahani/REUS
3de7505fcf971333e294c490371d7b429d8fc9d0
[ "MIT" ]
null
null
null
CODE/DA_tagging/test_supervise_icsi.py
pegahani/REUS
3de7505fcf971333e294c490371d7b429d8fc9d0
[ "MIT" ]
null
null
null
import os from supervised_learning import supervised if __name__ == '__main__': path = os.getcwd() generate_file = open(path + '/icsi/svm.txt', 'w') generate_file.write("******5 labels*****POS*** not blind sampling ***" + '\n') model = supervised(corpus = 'icsi', text_to_vector_type = 'POS', n_taxonomy = 5, which_percentage = 0.5) generate_file.write(str(model.DA_SVM(sampling_times=5, blind_sampling= False, max_iter = 2000)) + '\n') generate_file.write('***********************************' + '\n') generate_file.flush() generate_file.write("******3 labels*****POS**blind sampling****" + '\n') model = supervised(corpus = 'icsi', text_to_vector_type = 'POS', n_taxonomy = 3, which_percentage = 0.50) generate_file.write(str(model.DA_SVM(sampling_times=5, blind_sampling= True, max_iter = 2000)) + '\n') generate_file.write('***********************************'+ '\n') generate_file.flush()
43.136364
109
0.61117
120
949
4.533333
0.383333
0.198529
0.1875
0.069853
0.628676
0.628676
0.628676
0.628676
0.628676
0.628676
0
0.023428
0.145416
949
21
110
45.190476
0.647349
0
0
0.266667
1
0
0.219178
0.09589
0
0
0
0
0
1
0
false
0
0.133333
0
0.133333
0
0
0
0
null
0
1
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
3
054ade3006adfc31841d138a092ca012c6569ae5
768
py
Python
grid/parsed_game.py
bschmeck/gnarl
0e8501cbab0537987cf645b19311fe3a51608ce5
[ "MIT" ]
null
null
null
grid/parsed_game.py
bschmeck/gnarl
0e8501cbab0537987cf645b19311fe3a51608ce5
[ "MIT" ]
null
null
null
grid/parsed_game.py
bschmeck/gnarl
0e8501cbab0537987cf645b19311fe3a51608ce5
[ "MIT" ]
null
null
null
class ParsedGame: def __init__(self, parsed_data): if len(parsed_data) == 5: self.time_left = parsed_data[0] self.away_team = parsed_data[1] self.away_score = parsed_data[2] self.home_team = parsed_data[3] self.home_score = parsed_data[4] else: self.time_left = parsed_data[0] self.away_team = parsed_data[1] self.away_score = 0 self.home_team = parsed_data[2] self.home_score = 0 if self.time_left == "FINAL OT": self.time_left = "Final" elif self.time_left == "FINAL": self.time_left = "Final" elif self.time_left == "HALFTIME": self.time_left = "Halftime"
34.909091
44
0.546875
97
768
4.020619
0.268041
0.25641
0.246154
0.174359
0.635897
0.471795
0.471795
0.471795
0.302564
0.302564
0
0.022133
0.352865
768
21
45
36.571429
0.762575
0
0
0.3
0
0
0.050781
0
0
0
0
0
0
1
0.05
false
0
0
0
0.1
0
0
0
0
null
1
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
3
055ba05742623dec15abf1e0f617403e177331b5
1,474
py
Python
qatrack/api/units/serializers.py
randlet/qatrackplus-ci
ba11d39a07382b11394aaffd0df692b4ddc6239b
[ "MIT" ]
4
2016-08-29T15:31:01.000Z
2021-05-08T23:16:37.000Z
qatrack/api/units/serializers.py
randlet/qatrackplus-ci
ba11d39a07382b11394aaffd0df692b4ddc6239b
[ "MIT" ]
5
2020-02-12T01:21:59.000Z
2021-06-10T21:18:24.000Z
qatrack/api/units/serializers.py
randlet/qatrackplus-ci
ba11d39a07382b11394aaffd0df692b4ddc6239b
[ "MIT" ]
null
null
null
from rest_framework import serializers from qatrack.units import models class UnitListSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = models.Unit fields = ( 'url', 'name', 'number', 'site', ) class UnitSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = models.Unit fields = "__all__" class VendorSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = models.Vendor fields = "__all__" class UnitClassSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = models.UnitClass fields = "__all__" class UnitTypeSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = models.UnitType fields = "__all__" class ModalitySerializer(serializers.HyperlinkedModelSerializer): class Meta: model = models.Modality fields = "__all__" class SiteSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = models.Site fields = "__all__" class UnitAvailableTimeSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = models.UnitAvailableTime fields = "__all__" class UnitAvailableTimeEditSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = models.UnitAvailableTimeEdit fields = "__all__"
20.472222
78
0.68114
112
1,474
8.669643
0.303571
0.342945
0.389289
0.426365
0.548919
0.548919
0.138002
0.138002
0
0
0
0
0.248982
1,474
71
79
20.760563
0.877145
0
0
0.44186
0
0
0.049525
0
0
0
0
0
0
1
0
false
0
0.046512
0
0.465116
0
0
0
0
null
1
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
3
056ba6b7bd34052e03731fc14f12b9aea3f2e971
255
py
Python
config.py
AnshuKumar1467/parental_controls_ott
2ff54ca6bd7a0aa71a7e96b255814ca9fc383487
[ "Apache-2.0" ]
null
null
null
config.py
AnshuKumar1467/parental_controls_ott
2ff54ca6bd7a0aa71a7e96b255814ca9fc383487
[ "Apache-2.0" ]
null
null
null
config.py
AnshuKumar1467/parental_controls_ott
2ff54ca6bd7a0aa71a7e96b255814ca9fc383487
[ "Apache-2.0" ]
null
null
null
unsafe = ['EXPOSED_ANUS','EXPOSED_ARMPITS','COVERED_BELLY','EXPOSED_BELLY','COVERED_BUTTOCKS','EXPOSED_GENITALIA_M', 'EXPOSED_BUTTOCKS','EXPOSED_FEET','COVERED_BREAST_F','EXPOSED_BREAST_F','COVERED_GENITALIA_F','EXPOSED_GENITALIA_F','EXPOSED_BREAST_M']
85
137
0.815686
33
255
5.727273
0.363636
0.126984
0.148148
0
0
0
0
0
0
0
0
0
0.023529
255
2
138
127.5
0.759036
0
0
0
0
0
0.792157
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
1
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
0571cf2a353cabf28d0d672629489d8f84973f53
183
py
Python
todoism/apis/v1/__init__.py
zhaofangfang1991/airsupport-
b2599091dae6105ad7a01444acb9ab53d273675e
[ "MIT" ]
null
null
null
todoism/apis/v1/__init__.py
zhaofangfang1991/airsupport-
b2599091dae6105ad7a01444acb9ab53d273675e
[ "MIT" ]
null
null
null
todoism/apis/v1/__init__.py
zhaofangfang1991/airsupport-
b2599091dae6105ad7a01444acb9ab53d273675e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from flask import Blueprint from flask_cors import CORS api_v1 = Blueprint('api_v1', __name__) CORS(api_v1) # 资源跨域保护 from todoism.apis.v1 import resources
16.636364
38
0.737705
28
183
4.535714
0.535714
0.11811
0.141732
0
0
0
0
0
0
0
0
0.032258
0.153005
183
10
39
18.3
0.787097
0.153005
0
0
0
0
0.039474
0
0
0
0
0
0
1
0
false
0
0.6
0
0.6
0.4
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
1
0
0
3
0576f11db84ce75fe2a4bcf4c995d0545b69a0df
1,712
py
Python
8 - Classes/ex11.py
oDallas/PythomBR
7d3b3bcefe05ce483f6aa664bbc4962a1e0fd285
[ "MIT" ]
1
2019-06-02T18:59:18.000Z
2019-06-02T18:59:18.000Z
8 - Classes/ex11.py
oDallas/PythonBR
7d3b3bcefe05ce483f6aa664bbc4962a1e0fd285
[ "MIT" ]
null
null
null
8 - Classes/ex11.py
oDallas/PythonBR
7d3b3bcefe05ce483f6aa664bbc4962a1e0fd285
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Classe carro: Implemente uma classe chamada Carro com as seguintes propriedades: # a. Um veículo tem um certo consumo de combustível (medidos em km/litro) e # uma certa quantidade de combustível no tanque. # b. O consumo é especificado no construtor e o nível de combustível inicial é 0. # c. Forneça um método andar() que simule o ato de dirigir o veículo por uma certa distância, # reduzindo o nível de combustível no tanque de gasolina. # d. Forneça um método obterGasolina(), que retorna o nível atual de combustível. # e. Forneça um método adicionarGasolina(), para abastecer o tanque. class Carro(object): def __init__(self, combustivel, consumo): self.combustivel = combustivel self.consumo = consumo def andar(self, km): quantidade = km * self.consumo if self.combustivel >= quantidade: self.combustivel -= quantidade else: print('Combustível insuficiente') def obter_gasolina(self): return self.combustivel def abastecer(self, litros): self.combustivel += litros def restante(self): return round(self.combustivel / self.consumo, 2) def __str__(self): return """ ╔═══════════╤═══════════════╤══════════════╗ ║ Tanque(L) │ Consumo(Km/l) │ Restante(Km) ║ ╟───────────┼───────────────┼──────────────╢ ║ {:<9.2f} │ {:<13.2f} │ {:<12.2f} ║ ╚═══════════╧═══════════════╧══════════════╝ """.format(self.combustivel, self.consumo, self.restante()) if __name__ == '__main__': combustivel = float(input('Combustível inicial: ')) consumo = float(input('Consumo: ')) carro = Carro(combustivel, consumo) print(carro)
34.24
96
0.609229
207
1,712
5.63285
0.425121
0.102916
0.038593
0.036021
0
0
0
0
0
0
0
0.008191
0.215537
1,712
49
97
34.938776
0.755771
0.36507
0
0
0
0
0.259981
0.122563
0
0
0
0.020408
0
1
0.206897
false
0
0
0.103448
0.344828
0.068966
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
1
0
0
0
1
0
0
0
3
058953938808e4f3cabd8654c1603468682218c0
295
py
Python
puro/errors.py
jvtm/puro
653bf4ab8c8f65e8ef2050753d45d9b40af5d498
[ "Apache-2.0" ]
2
2018-03-01T00:31:34.000Z
2018-03-01T08:04:42.000Z
puro/errors.py
jvtm/puro
653bf4ab8c8f65e8ef2050753d45d9b40af5d498
[ "Apache-2.0" ]
1
2018-05-17T06:13:43.000Z
2018-05-17T06:13:43.000Z
puro/errors.py
jvtm/puro
653bf4ab8c8f65e8ef2050753d45d9b40af5d498
[ "Apache-2.0" ]
null
null
null
class FlowException(Exception): """Internal exceptions for flow control etc. Validation, config errors and such should use standard Python exception types""" pass class StopProcessing(FlowException): """Stop processing of single item without too much error logging""" pass
29.5
84
0.745763
35
295
6.285714
0.885714
0
0
0
0
0
0
0
0
0
0
0
0.186441
295
9
85
32.777778
0.916667
0.613559
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
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
1
0
0
0
0
0
3
0593cd8305e8b3370c184e52270048775907be03
3,849
py
Python
sims-g2/recover-dg/g8/plot-recon-p1.py
ammarhakim/ammar-simjournal
85b64ddc9556f01a4fab37977864a7d878eac637
[ "MIT", "Unlicense" ]
1
2019-12-19T16:21:13.000Z
2019-12-19T16:21:13.000Z
sims-g2/recover-dg/g8/plot-recon-p1.py
ammarhakim/ammar-simjournal
85b64ddc9556f01a4fab37977864a7d878eac637
[ "MIT", "Unlicense" ]
null
null
null
sims-g2/recover-dg/g8/plot-recon-p1.py
ammarhakim/ammar-simjournal
85b64ddc9556f01a4fab37977864a7d878eac637
[ "MIT", "Unlicense" ]
2
2020-01-08T06:23:33.000Z
2020-01-08T07:06:50.000Z
from pylab import * import postgkyl as pg style.use('../code/postgkyl.mplstyle') def calcSubCellFit_p1(fL, fI, fR): x = linspace(-1, 1, 20) dx = 2.0 return (23.57633877428808*fR[1]*x**5)/dx**5+(23.57633877428808*fL[1]*x**5)/dx**5+(81.44553394754065*fI[1]*x**5)/dx**5-(18.56155300614687*fR[0]*x**5)/dx**5+(18.56155300614687*fL[0]*x**5)/dx**5+(2.296396633859228*fR[1]*x**4)/dx**4-(2.296396633859228*fL[1]*x**4)/dx**4-(1.325825214724776*fR[0]*x**4)/dx**4-(1.325825214724776*fL[0]*x**4)/dx**4+(2.651650429449552*fI[0]*x**4)/dx**4-(12.5026038954558*fR[1]*x**3)/dx**3-(12.5026038954558*fL[1]*x**3)/dx**3-(45.41762231410475*fI[1]*x**3)/dx**3+(10.16465997955662*fR[0]*x**3)/dx**3-(10.16465997955662*fL[0]*x**3)/dx**3-(1.913663861549357*fR[1]*x**2)/dx**2+(1.913663861549357*fL[1]*x**2)/dx**2+(1.458407736197253*fR[0]*x**2)/dx**2+(1.458407736197253*fL[0]*x**2)/dx**2-(2.916815472394507*fI[0]*x**2)/dx**2+(1.243881510007081*fR[1]*x)/dx+(1.243881510007081*fL[1]*x)/dx+(7.08055628773262*fI[1]*x)/dx-(1.027514541411701*fR[0]*x)/dx+(1.027514541411701*fL[0]*x)/dx+0.130767030539206*fR[1]-0.130767030539206*fL[1]-0.104961162832378*fR[0]-0.104961162832378*fL[0]+0.917029106851303*fI[0] def calcSubCellFit_p2(fL, fI, fR): x = linspace(-1, 1, 20) dx = 2.0 return (-(105.4224314958633*fR[2]*x**6)/dx**6)-(105.4224314958633*fL[2]*x**6)/dx**6+(559.4859750252903*fI[2]*x**6)/dx**6+(138.2430773583255*fR[1]*x**6)/dx**6-(138.2430773583255*fL[1]*x**6)/dx**6-(92.80776503073433*fR[0]*x**6)/dx**6-(92.80776503073433*fL[0]*x**6)/dx**6+(185.6155300614687*fI[0]*x**6)/dx**6-(15.77185983008978*fR[2]*x**5)/dx**5+(15.77185983008978*fL[2]*x**5)/dx**5+(18.21807996194988*fR[1]*x**5)/dx**5+(18.21807996194988*fL[1]*x**5)/dx**5+(40.72276697377032*fI[1]*x**5)/dx**5-(11.13693180368812*fR[0]*x**5)/dx**5+(11.13693180368812*fL[0]*x**5)/dx**5+(56.03160729110844*fR[2]*x**4)/dx**4+(56.03160729110844*fL[2]*x**4)/dx**4-(319.5876860307667*fI[2]*x**4)/dx**4-(75.0156233727348*fR[1]*x**4)/dx**4+(75.0156233727348*fL[1]*x**4)/dx**4+(51.04427076690387*fR[0]*x**4)/dx**4+(51.04427076690387*fL[0]*x**4)/dx**4-(102.0885415338078*fI[0]*x**4)/dx**4+(9.091548272984086*fR[2]*x**3)/dx**3-(9.091548272984086*fL[2]*x**3)/dx**3-(11.48198316929614*fR[1]*x**3)/dx**3-(11.48198316929614*fL[1]*x**3)/dx**3-(29.08769069555023*fI[1]*x**3)/dx**3+(7.513009550107064*fR[0]*x**3)/dx**3-(7.513009550107064*fL[0]*x**3)/dx**3-(7.300414442029338*fR[2]*x**2)/dx**2-(7.300414442029338*fL[2]*x**2)/dx**2+(52.99285610204038*fI[2]*x**2)/dx**2+(9.903210483517913*fR[1]*x**2)/dx**2-(9.903210483517913*fL[1]*x**2)/dx**2-(6.794854225464475*fR[0]*x**2)/dx**2-(6.794854225464475*fL[0]*x**2)/dx**2+(13.58970845092895*fI[0]*x**2)/dx**2-(0.9412717097844931*fR[2]*x)/dx+(0.9412717097844931*fL[2]*x)/dx+(1.234313190699334*fR[1]*x)/dx+(1.234313190699334*fL[1]*x)/dx+(5.721854946032574*fI[1]*x)/dx-(0.8286407592029846*fR[0]*x)/dx+(0.8286407592029846*fL[0]*x)/dx+0.1432907064763796*fR[2]+0.1432907064763796*fL[2]-1.670077889276424*fI[2]-0.1961505458088089*fR[1]+0.1961505458088089*fL[1]+0.1353446573364875*fR[0]+0.1353446573364875*fL[0]+0.4364174665135718*fI[0] def plotSubCell(XX, q, cs): for i in range(1,q0.shape[0]-1): X = linspace(XX[i],XX[i+1],20) fi = calcSubCellFit_p1(q[i-1,:], q[i,:], q[i+1,:]) plot(X, fi, cs) # plot first/last cells X = linspace(XX[0],XX[1],20) fi = calcSubCellFit_p1(q[-1,:], q[0,:], q[1,:]) plot(X, fi, cs) X = linspace(XX[-2],XX[-1],20) fi = calcSubCellFit_p1(q[-2,:], q[-1,:], q[0,:]) plot(X, fi, cs) d0 = pg.GData("g8-advection-recover-dg_f_0.bp") q0 = d0.getValues() XX = d0.getGrid() Xdo = linspace(XX[0][0], XX[0][-1], 32) Xhr = linspace(XX[0][0], XX[0][-1], 100) d1 = pg.GData("g8-advection-recover-dg_f_1.bp") q1 = d1.getValues() figure(1) plotSubCell(XX[0], q0, 'g-') plotSubCell(XX[0], q1, 'k-') grid() show()
85.533333
1,837
0.644583
772
3,849
3.202073
0.178756
0.023463
0.021036
0.026295
0.462379
0.414644
0.078479
0.023463
0.023463
0.023463
0
0.439747
0.05352
3,849
44
1,838
87.477273
0.238814
0.005456
0
0.205882
0
0
0.023262
0.022216
0
0
0
0
0
1
0.088235
false
0
0.058824
0
0.205882
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
553e70d85701239d2cedc97a0f8a2e53bffe2061
53
py
Python
test/login.py
qinganggang/testqgg
a62c9d13c710d4ae4a4431c105dc92b9d69f4d06
[ "MIT" ]
null
null
null
test/login.py
qinganggang/testqgg
a62c9d13c710d4ae4a4431c105dc92b9d69f4d06
[ "MIT" ]
null
null
null
test/login.py
qinganggang/testqgg
a62c9d13c710d4ae4a4431c105dc92b9d69f4d06
[ "MIT" ]
null
null
null
asd num=212 asddedqdd asdwqq num=212w12 qdq sadw
4.416667
10
0.754717
9
53
4.444444
0.888889
0
0
0
0
0
0
0
0
0
0
0.190476
0.207547
53
11
11
4.818182
0.761905
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
3
5550f848f5aafc99c57cef688d64005de22b077c
65
py
Python
pydocteur/__init__.py
awecx/PyDocTeur
47188f7263661a40775e3b45cf611d88d7c9297b
[ "MIT" ]
4
2020-11-30T10:14:32.000Z
2021-02-18T00:44:30.000Z
pydocteur/__init__.py
awecx/PyDocTeur
47188f7263661a40775e3b45cf611d88d7c9297b
[ "MIT" ]
46
2020-11-27T09:21:02.000Z
2021-06-08T07:43:33.000Z
pydocteur/__init__.py
awecx/PyDocTeur
47188f7263661a40775e3b45cf611d88d7c9297b
[ "MIT" ]
4
2020-11-27T06:52:11.000Z
2022-02-22T20:06:35.000Z
from pydocteur.app import application __all__ = ["application"]
16.25
37
0.784615
7
65
6.714286
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.123077
65
3
38
21.666667
0.824561
0
0
0
0
0
0.169231
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
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
3
556b8586ede3746e15d4fba0953942b610f9d978
847
py
Python
lidi/signup/management/commands/populate_proglang.py
campovski/lidi
9699e62e70e679970816e29ca7618c9ed0146c7e
[ "Apache-2.0" ]
null
null
null
lidi/signup/management/commands/populate_proglang.py
campovski/lidi
9699e62e70e679970816e29ca7618c9ed0146c7e
[ "Apache-2.0" ]
21
2017-06-03T14:16:14.000Z
2018-05-29T07:28:27.000Z
lidi/signup/management/commands/populate_proglang.py
campovski/lidi
9699e62e70e679970816e29ca7618c9ed0146c7e
[ "Apache-2.0" ]
null
null
null
from django.core.management.base import BaseCommand from signup.models import ProgrammingLanguage class Command(BaseCommand): def _create_tags(self): language = ProgrammingLanguage(name="C") language.save() language = ProgrammingLanguage(name="C++") language.save() language = ProgrammingLanguage(name="Pascal") language.save() language = ProgrammingLanguage(name="Python 2") language.save() language = ProgrammingLanguage(name="Python 3") language.save() language = ProgrammingLanguage(name="Java") language.save() language = ProgrammingLanguage(name="C#") language.save() language = ProgrammingLanguage(name="Fortran") language.save() def handle(self, *args, **options): self._create_tags()
25.666667
55
0.644628
77
847
7.038961
0.376623
0.398524
0.457565
0.50369
0.640221
0.560886
0.380074
0.380074
0.380074
0.321033
0
0.003115
0.242031
847
32
56
26.46875
0.841122
0
0
0.363636
0
0
0.046045
0
0
0
0
0
0
1
0.090909
false
0
0.090909
0
0.227273
0
0
0
0
null
1
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
3
55789589182e15ced2c3c5b6db8912b0a401aa9b
154,456
py
Python
pysnmp-with-texts/ENTERASYS-POLICY-PROFILE-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/ENTERASYS-POLICY-PROFILE-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/ENTERASYS-POLICY-PROFILE-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 ENTERASYS-POLICY-PROFILE-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ENTERASYS-POLICY-PROFILE-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:04:18 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ConstraintsUnion, ValueSizeConstraint, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "ValueSizeConstraint", "ConstraintsIntersection", "SingleValueConstraint") dot1dBasePort, = mibBuilder.importSymbols("BRIDGE-MIB", "dot1dBasePort") etsysModules, = mibBuilder.importSymbols("ENTERASYS-MIB-NAMES", "etsysModules") StationAddressType, StationAddress = mibBuilder.importSymbols("ENTERASYS-UPN-TC-MIB", "StationAddressType", "StationAddress") ifAlias, ifName = mibBuilder.importSymbols("IF-MIB", "ifAlias", "ifName") EnabledStatus, = mibBuilder.importSymbols("P-BRIDGE-MIB", "EnabledStatus") PortList, VlanIndex = mibBuilder.importSymbols("Q-BRIDGE-MIB", "PortList", "VlanIndex") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup") MibIdentifier, IpAddress, ObjectIdentity, Gauge32, Unsigned32, TimeTicks, ModuleIdentity, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, Bits, Counter64, Integer32, iso = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "IpAddress", "ObjectIdentity", "Gauge32", "Unsigned32", "TimeTicks", "ModuleIdentity", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "Bits", "Counter64", "Integer32", "iso") DisplayString, RowStatus, TruthValue, StorageType, RowPointer, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "RowStatus", "TruthValue", "StorageType", "RowPointer", "TextualConvention") etsysPolicyProfileMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6)) etsysPolicyProfileMIB.setRevisions(('2010-08-09 15:11', '2009-04-10 12:00', '2009-04-01 13:36', '2008-02-19 14:29', '2007-03-21 21:02', '2006-06-15 20:40', '2005-05-18 20:08', '2005-03-28 15:35', '2005-03-14 21:34', '2004-08-11 15:17', '2004-05-18 17:02', '2004-04-02 20:35', '2004-03-25 18:03', '2004-02-03 22:00', '2004-02-03 15:33', '2004-01-19 21:43', '2003-11-04 17:16', '2003-02-06 22:59', '2002-09-17 14:53', '2002-07-19 13:37', '2001-06-11 20:00', '2001-01-09 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: etsysPolicyProfileMIB.setRevisionsDescriptions(('Add controls for syslogEveryTime, profile visibility of syslog/trap statistics, egress-policy controls. ICMPv6 and ACL rule types added, tcp/udp rule types augmented to support IPv6 addresses.', 'Added tri-state textual convention and modified the etsysPolicyRules group to use this convention for actions which previously used EnabledStatus. Added syslog, trap, and disable-port actions to the etsysPolicyProfileTable.', 'Modified the capabilities group to support both OverwriteTci and Mirroring. A few other small corrections.', 'Capability has been added to define a packet mirroring index for frames matching a policy profile or policy rule. Further clarification is included in DESCRIPTION field of the etsysPolicyProfileMirrorIndex and etsysPolicyRuleMirrorIndex objects.', 'An additional scalar etsysPolicyRuleSylogExtendedFormat is added to configure enabling/disabling the addition of extended data to the rule-hit syslog messages. Further clarifications are included in DESCRIPTION field of the etsysPolicyRuleSylogExtendedFormat object.', 'Grammar and typographical corrections.', 'TEXTUAL-CONVENTION PolicyRFC3580MapRadiusResponseTC includes an additional option vlanTunnelAttributeWithPolicyProfile. An additional scalar etsysPolicyRFC3580MapInvalidMapping is added to detect EtsysPolicyRFC3580MapEntry discrepancies. Further clarifications are included in DESCRIPTION fields of the etsysPolicyRFC3580Map objects.', 'Additional branch etsysPolicyNotifications properly contains trap information.', 'etsysPolicyRuleStatsDroppedNotifications and etsysPolicyRuleSylogMachineReadableFormat now allow the managing entity to track missed syslog messages and to format the messages in hexadecimal. Additional capability table to detail policy rule type lengths in bits and bytes and the maximum number of rules of each rule type the agent supports. See the description of the PolicyClassificationRuleType textual convention for additional details relating to how rule-type-lengths are to be specified.', 'Updated the range for etsysPolicyProfilePriority to (0..4095). Added objects and groups related to mapping RFC3580 vlan-tunnel-attributes to PolicyProfiles. Added the etsysPolicyRuleAutoClearOnProfile, etsysPolicyRuleStatsAutoClearInterval, and etsysPolicyRuleStatsAutoClearPorts, objects. Added etsysPolicyEnabledTable to the capabilities section, in addition to reporting capabilities, it allows one to disable policy on a given port.', 'Added the etsysPolicyRuleStatsAutoClearOnLink leaf.', 'Added the etsysPolicyRuleOperPid leaf to etsysPolicyRuleTable.', 'Added capabilities objects, status for profile assignment override, dynamic profile summary list, and notification configuration for dynamic rules.', 'Replaced StationIdentifierType with StationAddressType and StationIdentifier with StationAddress to match new revision of ENTERASYS-UPN-TC-MIB.', 'Replaced StationIdentifierTypeTC with StationIdentifierType and moved it to the ENTERASYS-UPN-TC-MIB, and replaced InetAddress with StationIdentifier from the same MIB module.', 'Added PolicyClassificationRuleType TEXTUAL-CONVENTION. Added the etsysPolicyProfileOverwriteTCI and etsysPolicyProfileRulePrecedence leaves to the EtsysPolicyProfileEntry. Added the etsysPolicyRules group for accounting of policy usage. Additionally, the range syntax of several objects has been clarified. The etsysPolicyClassificationGroup and the etsysPortPolicyProfileTable have been deprecated, as they have been replaced by the etsysPolicyRulesGroup.', 'Added etsysPolicyMap object group in support of RFC 3580 and Enterasys Technical Standard TS-07.', 'Added etsysDevicePolicyProfileDefault to provide managed entities, that cannot support complete policies on a per port basis, a global policy to augment what policies they can provide on a per port basis. Added etsysPolicyCapabilities to provide management agents a straight forward method to ascertain the capabilities of the managed entity.', 'Added Port ID information in the Station table, for ease of cross reference.', 'This version incorporates enhancements to support Station based policy provisioning, as well as other UPN related enhancements.', 'This version modified the MODULE-IDENTITY statement to resolve an issue importing this MIB into some older MIB Tools. In the SEQUENCE for the etsysPortPolicyProfileTable the first object was incorrectly defined as etsysPortPolicyProfileIndex, this was corrected to read etsysPortPolicyProfileIndexType. Several misspelled words were corrected. Finally, the INDEX for the etsysPortPolicyProfileSummaryTable was corrected to index the table by policy index as well as the type of port for each entry in the table.', 'The initial version of this MIB module.',)) if mibBuilder.loadTexts: etsysPolicyProfileMIB.setLastUpdated('201008091511Z') if mibBuilder.loadTexts: etsysPolicyProfileMIB.setOrganization('Enterasys Networks, Inc') if mibBuilder.loadTexts: etsysPolicyProfileMIB.setContactInfo('Postal: Enterasys Networks 50 Minuteman Rd. Andover, MA 01810-1008 USA Phone: +1 978 684 1000 E-mail: support@enterasys.com WWW: http://www.enterasys.com') if mibBuilder.loadTexts: etsysPolicyProfileMIB.setDescription('This MIB module defines a portion of the SNMP enterprise MIBs under the Enterasys enterprise OID pertaining to the mapping of per user policy profiles for Enterasys network edge devices or access products.') class PolicyProfileIDTC(TextualConvention, Integer32): description = 'This textual convention maps out to the possible policyProfileIndex values. It also allows for a value of zero. A value of zero (0) indicates that the given port should not follow any policy profile.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 65535), ) class PortPolicyProfileIndexTypeTC(TextualConvention, Integer32): description = 'This textual convention maps out to the possible port types which can be used to populate the etsysPortPolicyProfileTable, and of port IDs used in the etsysStationPolicyProfileTable.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("ifIndex", 1), ("dot1dBasePort", 2)) class PolicyRFC3580MapRadiusResponseTC(TextualConvention, Integer32): description = 'This textual convention maps out to the possible, pertinent, successful, responses which may be received from the RADIUS server after a dynamic authentication attempt. PolicyProfile(1) is returned as a proprietary filter-id and has historically been used to assign a policy profile to the authenticated entity. VlanTunnelAttribute(2) is the response defined in RFC3580 and upon which further controls are applied by the etsysPolicyRFC3580Map group. A value of - vlanTunnelAttributeWithPolicyProfile(3) is an indication that both attributes are to be used.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("policyProfile", 1), ("vlanTunnelAttribute", 2), ("vlanTunnelAttributeWithPolicyProfile", 3)) class VlanList(TextualConvention, OctetString): description = "Each octet within this value specifies a set of eight VIDs, with the first octet specifying VID 1 through 8, the second octet specifying VID 9 through 16, etc. Within each octet, the most significant bit represents the lowest numbered VID, and the least significant bit represents the highest numbered VID. Thus, each VID is represented by a single bit within the value of this object. If that bit has a value of '1' then that VID is included in the set of VIDs; the VID is not included if its bit has a value of '0'. This OCTET STRING will always be 512 Octets in length to accommodate all possible VIDs between (1..4094). The default value of this object is a string of all zeros." status = 'current' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(512, 512) fixedLength = 512 class PolicyClassificationRuleType(TextualConvention, Integer32): description = 'Enumerates the possible types of classification rules which may be referenced in the etsysPolicyRuleTable. Each type has an implied length (in bytes) associated with it. Octet-strings defined as representing one of these types will be represented in Network-Byte-Order (Big Endian) if the native representation is other than octets. The managed entity MUST support sets in which the specified rule length is less than that specified by the value the entity reports in etsysPolicyRuleAttributeByteLength, so long as the associated etsysPolicyRulePrefixBits does not imply the existence of more etsysPolicyRuleData than is present (i.e. the specified length MUST be >= ((etsysPolicyRulePrefixBits+7)/8).) Additionally, the managed entity MUST return a PolicyClassificationRuleType which carries the number of octets specified by the associated etsysPolicyRuleAttributeByteLength, regardless of the number etsysPolicyRulePrefixBits. This yields a behavior in which, on some devices, a ip4Source rule may be supported with only 4 bytes of rule data (excluding the TCP/UDP source port information), while other devices may support the full syntax using all 6 bytes. macSource(1) The source MAC address in an Ethernet frame. Length is 6 bytes. macDestination(2) The destination MAC address in an Ethernet frame. Length is 6 bytes. ipxSource(3) The source address in an IPX header. Length is 4 bytes (Network prefix). ipxDestination(4) The destination address in an IPX header. Length is 4 bytes (Network prefix). ipxSourcePort(5) The source IPX port(socket) in an IPX header. Length is 2 bytes. ipxDestinationPort(6) The destination IPX port(socket) in an IPX header. Length is 2 bytes. ipxCos(7) The CoS(HopCount) field in an IPX header. Length is 1 byte. ipxType(8) The protocol type in an IPX header. Length is 1 byte. ip6Source(9) The source address in an IPv6 header, postfixed with the source port (for TCP/UDP frames). Length is 18 bytes for IPv6+TCP/UDP, or 16 bytes for IPv6. ip6Destination(10) The destination address in an IPv6 header, postfixed with the destination port (for TCP/UDP frames). Length is 18 bytes for IPv6+TCP/UDP, or 16 bytes for IPv6. ip6FlowLabel(11) The flow label field (traffic class and flow identifier) in an IPv6 header. Length is 3 bytes, as only the first 20 bits are valid and mask-able, only the data in the first 20 bits (the first five nibbles) is considered. ip4Source(12) The source address in an IPv4 header, postfixed with the source port (for TCP/UDP frames). Length is 6 bytes for IPv4+TCP/UDP, or 4 bytes for IPv4. ip4Destination(13) The destination address in an IPv4 header, postfixed with the destination port (for TCP/UDP frames). Length is 6 bytes for IPv4+TCP/UDP, or 4 bytes for IPv4. ipFragment(14) Truth value derived from the FLAGS and FRAGMENTATION_OFFSET fields of an IP header. If the MORE bit of the flags field is set, or the FRAGMENTATION_OFFSET is non-zero, the frame is fragmented. Length is 0 bytes (there is no data, only presence). udpSourcePort(15) The source UDP port(socket) in a UDP header, optionally postfixed with a source IP address. Length is 2 bytes for UDP, 6 bytes for UDP+IPv4, or 18 bytes for UDP+IPv6. udpDestinationPort(16) The destination UDP port(socket) in a UDP header, optionally postfixed with a destination IP address. Length is 2 bytes for UDP, 6 bytes for UDP+IPv4, or 18 bytes for UDP+IPv6. tcpSourcePort(17) The source TCP port(socket) in an TCP header, optionally postfixed with a source IPv4 address. Length is 2 bytes for TCP, 6 bytes for TCP+IPv4, or 18 bytes for TCP+IPv6. tcpDestinationPort(18) The destination TCP port(socket) in an TCP header, optionally postfixed with a destination IPv4 address. Length is 2 bytes for TCP, 6 bytes for TCP+IPv4, or 18 bytes for TCP+IPv6. icmpTypeCode(19) The Type and Code fields from an ICMP frame. These are encoded in 2 bytes, network-byte-order, Type in the first (left-most) byte, Code in the second byte. ipTtl(20) The TTL(HopCount) field in an IP header. Length is 1 byte. ipTos(21) The ToS(DSCP) field in an IP header. Length is 1 byte. ipType(22) The protocol type in an IP header. Length is 1 byte. icmpTypeCodeV6(23) The Type and Code fields from an ICMP frame. These are encoded in 2 bytes, network-byte-order, Type in the first (left-most) byte, Code in the second byte. For ICMPv6, which redefines the types and codes. etherType(25) The type field in an Ethernet II frame. Length is 2 bytes. llcDsapSsap(26) The DSAP/SSAP/CTRL field in an LLC encapsulated frame, includes SNAP encapsulated frames and the associated Ethernet II type field. Length is 5 bytes. vlanId(27) The 12 bit Virtual LAN ID field present in an 802.1D Tagged frame. Length is 2 bytes, the field is represented in the FIRST (left-most, big-endian) 12 bits of the 16 bit field. A vlanId of 1 would be encoded as 00-10, a vlanId of 4094 would be encoded as FF-E0, and a vlanId of 100 would be encoded as 06-40. ieee8021dTci(28) The entire 16 bit TCI field present in an 802.1D Tagged frame (include both VLAN ID and Priority bits. Length is 2 bytes. acl(30) A numbered ACL, represented by a 4 byte integer value. This is not maskable. bridgePort(31) The dot1dBasePort on which the frame was received. Length is 2 bytes.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 30, 31)) namedValues = NamedValues(("macSource", 1), ("macDestination", 2), ("ipxSource", 3), ("ipxDestination", 4), ("ipxSourcePort", 5), ("ipxDestinationPort", 6), ("ipxCos", 7), ("ipxType", 8), ("ip6Source", 9), ("ip6Destination", 10), ("ip6FlowLabel", 11), ("ip4Source", 12), ("ip4Destination", 13), ("ipFragment", 14), ("udpSourcePort", 15), ("udpDestinationPort", 16), ("tcpSourcePort", 17), ("tcpDestinationPort", 18), ("icmpTypeCode", 19), ("ipTtl", 20), ("ipTos", 21), ("ipType", 22), ("icmpTypeCodeV6", 23), ("etherType", 25), ("llcDsapSsap", 26), ("vlanId", 27), ("ieee8021dTci", 28), ("acl", 30), ("bridgePort", 31)) class PolicyRulesSupported(TextualConvention, Bits): description = 'Enumerates the possible types of classification rules which may be supported. macSource(1) The source MAC address in an Ethernet frame. macDestination(2) The destination MAC address in an Ethernet frame. ipxSource(3) The source address in an IPX header. ipxDestination(4) The destination address in an IPX header. ipxSourcePort(5) The source IPX port(socket) in an IPX header. ipxDestinationPort(6) The destination IPX port(socket) in an IPX header. ipxCos(7) The CoS(HopCount) field in an IPX header. ipxType(8) The protocol type in an IPX header. ip6Source(9) The source address in an IPv6 header, postfixed with the source port (for TCP/UDP frames). ip6Destination(10) The destination address in an IPv6 header, postfixed with the destination port (for TCP/UDP frames). ip6FlowLabel(11) The flow label field (traffic class and flow identifier) in an IPv6 header. ip4Source(12) The source address in an IPv4 header, postfixed with the source port (for TCP/UDP frames). ip4Destination(13) The destination address in an IPv4 header, postfixed with the destination port (for TCP/UDP frames). ipFragment(14) Truth value derived from the FLAGS and FRAGMENTATION_OFFSET fields of an IP header. If the MORE bit of the flags field is set, or the FRAGMENTATION_OFFSET is non-zero, the frame is fragmented. udpSourcePort(15) The source UDP port(socket) in a UDP header. udpDestinationPort(16) The destination UDP port(socket) in a UDP header. tcpSourcePort(17) The source TCP port(socket) in an TCP header. tcpDestinationPort(18) The destination TCP port(socket) in an TCP header. icmpTypeCode(19) The Type and Code fields from an ICMP frame. ipTtl(20) The TTL(HopCount) field in an IP header. ipTos(21) The ToS(DSCP) field in an IP header. ipType(22) The protocol type in an IP header. icmpTypeCodeV6(23) The Type and Code fields from an ICMPv6 frame. etherType(25) The type field in an Ethernet II frame. llcDsapSsap(26) The DSAP/SSAP/CTRL field in an LLC encapsulated frame, includes SNAP encapsulated frames and the associated Ethernet II type field. vlanId(27) The 12 bit Virtual LAN ID field present in an 802.1D Tagged frame. ieee8021dTci(28) The entire 16 bit TCI field present in an 802.1D Tagged frame (include both VLAN ID and Priority bits. acl(30) A number ACL list to which the frame is applied. bridgePort(31) The dot1dBasePort on which the frame was received.' status = 'current' namedValues = NamedValues(("macSource", 1), ("macDestination", 2), ("ipxSource", 3), ("ipxDestination", 4), ("ipxSourcePort", 5), ("ipxDestinationPort", 6), ("ipxCos", 7), ("ipxType", 8), ("ip6Source", 9), ("ip6Destination", 10), ("ip6FlowLabel", 11), ("ip4Source", 12), ("ip4Destination", 13), ("ipFragment", 14), ("udpSourcePort", 15), ("udpDestinationPort", 16), ("tcpSourcePort", 17), ("tcpDestinationPort", 18), ("icmpTypeCode", 19), ("ipTtl", 20), ("ipTos", 21), ("ipType", 22), ("icmpTypeCodeV6", 23), ("etherType", 25), ("llcDsapSsap", 26), ("vlanId", 27), ("ieee8021dTci", 28), ("acl", 30), ("bridgePort", 31)) class TriStateStatus(TextualConvention, Integer32): description = 'A simple status value for the object. enabled(1) indicates the action will occur disabled(2) indicates no action will be asserted prohibited(3) indicates the action will be prevented from occurring This is useful (over and above the standard EnabledStatus TC) in the context of hierachical decision trees, whereby a decision to prevent an action may revoke another, lower precedent decision to take the action.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("enabled", 1), ("disabled", 2), ("prohibited", 3)) etsysPolicyNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 0)) etsysPolicyProfile = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1)) etsysPolicyClassification = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 2)) etsysPortPolicyProfile = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 3)) etsysPolicyVlanEgress = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 4)) etsysStationPolicyProfile = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 5)) etsysInvalidPolicyPolicy = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 6)) etsysDevicePolicyProfile = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 8)) etsysPolicyCapability = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9)) etsysPolicyMap = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 10)) etsysPolicyRules = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11)) etsysPolicyRFC3580Map = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 12)) etsysPolicyRulePortHitNotification = NotificationType((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 0, 1)).setObjects(("IF-MIB", "ifName"), ("IF-MIB", "ifAlias"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulePortHit"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileName")) if mibBuilder.loadTexts: etsysPolicyRulePortHitNotification.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRulePortHitNotification.setDescription('This notification indicates that a policy rule has matched network traffic on a particular port.') etsysPolicyProfileMaxEntries = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyProfileMaxEntries.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileMaxEntries.setDescription('The maximum number of entries allowed in the etsysPolicyProfileTable.') etsysPolicyProfileNumEntries = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 2), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyProfileNumEntries.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileNumEntries.setDescription('The current number of entries in the etsysPolicyProfileTable.') etsysPolicyProfileLastChange = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 3), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyProfileLastChange.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileLastChange.setDescription('The sysUpTime at which the etsysPolicyProfileTable was last modified.') etsysPolicyProfileTableNextAvailableIndex = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyProfileTableNextAvailableIndex.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileTableNextAvailableIndex.setDescription('This object indicates the numerically lowest available index within this entity, which may be used for the value of etsysPolicyProfileIndex in the creation of a new entry in the etsysPolicyProfileTable. An index is considered available if the index value falls within the range of 1 to 65535 and is not being used to index an existing entry in the etsysPolicyProfileTable contained within this entity. This value should only be considered a guideline for management creation of etsysPolicyProfileEntries, there is no requirement on management to create entries based upon this index value.') etsysPolicyProfileTable = MibTable((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 5), ) if mibBuilder.loadTexts: etsysPolicyProfileTable.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileTable.setDescription('A table containing policy profiles. A policy is a group of classification rules which may be applied on a per user basis, to ports or to stations.') etsysPolicyProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 5, 1), ).setIndexNames((0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileIndex")) if mibBuilder.loadTexts: etsysPolicyProfileEntry.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileEntry.setDescription('Conceptually defines a particular entry within the etsysPolicyProfileTable. Entries within this table MUST be considered non-volatile and MUST be maintained across entity resets.') etsysPolicyProfileIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))) if mibBuilder.loadTexts: etsysPolicyProfileIndex.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileIndex.setDescription('A unique arbitrary identifier for this Policy. Since a policy will be applied to a user regardless of his or her location in the network fabric policy names SHOULD be unique within the entire network fabric. Policy IDs and policy names MUST be unique within the scope of a single managed entity.') etsysPolicyProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 5, 1, 2), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(1, 64))).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyProfileName.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileName.setDescription("Administratively assigned textual description of this Policy. This object MUST NOT be modifiable while this entry's RowStatus is active(1).") etsysPolicyProfileRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 5, 1, 3), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyProfileRowStatus.setReference('RFC2579 (Textual Conventions for SMIv2)') if mibBuilder.loadTexts: etsysPolicyProfileRowStatus.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileRowStatus.setDescription("This object allows for the dynamic creation and deletion of entries within the etsysPolicyProfileTable as well as the activation and deactivation of these entries. When this object's value is active(1) the corresponding row's etsysPolicyProfilePortVid, etsysPolicyProfilePriority, and all entries within the etsysPolicyClassificationTable indexed by this row's etsysPolicyProfileIndex are available to be applied to network access ports or stations on the managed entity. All ports corresponding to rows within the etsysPortPolicyProfileTable whose etsysPortPolicyProfileOperID is equal to the etsysPolicyProfileIndex, shall have the corresponding policy applied. Likewise, all stations corresponding to rows within the etsysStationPolicyProfileTable whose etsysStationPolicyProfileOperID is equal to the etsysPolicyProfileIndex, shall have the corresponding policy applied. The value of etsysPortPolicyProfileOperID for each such row in the etsysPortPolicyProfileTable will be equal to the etsysPortPolicyProfileAdminID, unless the authorization information from a source such as a RADIUS server indicates to the contrary. Refer to the specific objects within this MIB as well as well as RFC2674, the CTRON-PRIORITY-CLASSIFY-MIB, the CTRON-VLAN-CLASSIFY-MIB, and the CTRON-RATE-POLICING-MIB for a complete explanation of the application and behavior of these objects. When this object's value is set to notInService(2) this policy will not be applied to any rows within the etsysPortPolicyProfileTable. To allow policy profiles to be applied for security implementations, setting this object's value from active(1) to notInService(2) or destroy(6) SHALL fail if one or more instances of etsysPortPolicyProfileOperID or etsysStationPolicyProfileOperID currently reference this entry's associated policy due to a set by an underlying security protocol such as RADIUS. For network functionality and clarity, setting this object to destroy(6) SHALL fail if one or more instances of etsysPortPolicyProfileOperID or etsysStationPolicyProfileOperID currently references this entry's etsysPolicyProfileIndex. Refer to the RowStatus convention for further details on the behavior of this object.") etsysPolicyProfilePortVidStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 5, 1, 4), EnabledStatus().clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyProfilePortVidStatus.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfilePortVidStatus.setDescription("This object defines whether a PVID override should be applied to ports which have this profile active. enabled(1) means that any port with this policy active will have this row's etsysPolicyProfilePortVid applied to untagged frames or priority-tagged frames received on this port. disabled(2) means that etsysPolicyProfilePortVid will not be applied. When this object is set to disabled(2) the value of etsysPolicyProfilePortVid has no meaning.") etsysPolicyProfilePortVid = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 5, 1, 5), Unsigned32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 4094), ValueRangeConstraint(4095, 4095), )).clone(1)).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyProfilePortVid.setReference('RFC2674 (Q-BRIDGE-MIB) - dot1qPortVlanTable') if mibBuilder.loadTexts: etsysPolicyProfilePortVid.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfilePortVid.setDescription("This object defines the PVID of this profile. If a port has an active policy and the policy's etsysPolicyProfilePortVidStatus is set to enabled(1), the etsysPolicyProfilePortVid will be applied to all untagged frames arriving on the port that do not match any of the policy classification rules. Note that the 802.1Q PVID will still exist from a management view but will NEVER be applied to traffic arriving on a port that has an active policy and enabled etsysPolicyProfilePortVid defined, since policy is applied to traffic arriving on the port prior to the assignment of a VLAN using the 802.1Q PVID. The behavior of an enabled etsysPolicyProfilePortVid on any associated port SHALL be identical to the behavior of the dot1qPvid upon that port. Note that two special, otherwise illegal, values of the etsysPolicyProfilePortVid are used in defining the default forwarding actions, to be used in conjunction with policy classification rules, and do not result in packet tagging: 0 Indicates that the default forwarding action is to drop all packets that do not match an explicit rule. 4095 Indicates that the default forwarding action is to forward any packets not matching any explicit rules.") etsysPolicyProfilePriorityStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 5, 1, 6), EnabledStatus().clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyProfilePriorityStatus.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfilePriorityStatus.setDescription('This object defines whether a Class of Service should be applied to ports which have this profile active. enabled(1) means that any port with this policy active will have etsysPolicyProfilePriority applied to this port. disabled(2) means that etsysPolicyProfilePriority will not be applied. When this object is set to disabled(2) the value of etsysPolicyProfilePriority has no meaning.') etsysPolicyProfilePriority = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 5, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyProfilePriority.setReference('RFC2674 (P-BRIDGE-MIB) - dot1dPortPriorityTable') if mibBuilder.loadTexts: etsysPolicyProfilePriority.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfilePriority.setDescription("This object defines the default ingress Class of Service of this profile. If a port has an active policy and the policy's etsysPolicyProfilePriorityStatus is set to enabled(1), the etsysPolicyProfilePriority will be applied to all packets arriving on the port that do not match any of the policy classification rules. Note that dot1dPortDefaultUserPriority will still exist from a management view but will NEVER be applied to traffic arriving on a port that has an active policy and enabled etsysPolicyProfilePriority defined, since policy is applied to traffic arriving on the port prior to the assignment of a priority using dot1dPortDefaultUserPriority. The behavior of an enabled etsysPolicyProfilePriority on any associated port SHALL be identical to the behavior of the dot1dPortDefaultUserPriority upon that port.") etsysPolicyProfileEgressVlans = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 5, 1, 8), VlanList()).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyProfileEgressVlans.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileEgressVlans.setDescription("The set of VLANs which are assigned by this policy to egress on ports for which this policy is active. Changes to a bit in this object affect the per-port per-VLAN Registrar control for Registration Fixed for the relevant GVRP state machine on each port for which this policy is active. A VLAN may not be added in this set if it is already a member of the set of VLANs in etsysPolicyProfileForbiddenVlans. This object is superseded on a per-port per-VLAN basis by any 'set' bits in dot1qVlanStaticEgressPorts and dot1qVlanForbiddenEgressPorts. The default value of this object is a string of zeros.") etsysPolicyProfileForbiddenVlans = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 5, 1, 9), VlanList()).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyProfileForbiddenVlans.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileForbiddenVlans.setDescription("The set of VLANs which are prohibited by this policy to egress on ports for which this policy is active. Changes to this object that cause a port to be included or excluded affect the per-port per-VLAN Registrar control for Registration Forbidden for the relevant GVRP state machine on each port for which this policy is active. A VLAN may not be added in this set if it is already a member of the set of VLANs in etsysPolicyProfileEgressVlans. This object is superseded on a per-port per-VLAN basis by any 'set' bits in the dot1qVlanStaticEgressPorts and dot1qVlanForbiddenEgressPorts. The default value of this object is a string of zeros.") etsysPolicyProfileUntaggedVlans = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 5, 1, 10), VlanList()).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyProfileUntaggedVlans.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileUntaggedVlans.setDescription("The set of VLANs which should transmit egress packets as untagged on ports for which this policy is active. This object is superseded on a per-port per-VLAN basis by any 'set' bits in dot1qVlanStaticUntaggedPorts.") etsysPolicyProfileOverwriteTCI = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 5, 1, 11), EnabledStatus().clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyProfileOverwriteTCI.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileOverwriteTCI.setDescription('If set, the information contained within the TCI field of inbound, tagged packets will not be used by the device after the ingress classification stage of packet relay. The net effect will be that the TCI information may be used to classify the packet, but will be overwritten (and ignored) by subsequent stages of packet relay.') etsysPolicyProfileRulePrecedence = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 5, 1, 12), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyProfileRulePrecedence.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileRulePrecedence.setDescription('Each octet will contain a single value representing the rule type to be matched against, defined by the PolicyClassificationRuleType textual convention. When read, will return the currently operating rule matching precedence, ordered from first consulted (in the first octet) to last consulted (in the last octet). A set of a single octet of 0x00 will result in a reversion to the default precedence ordering. A set of any other values will result in the specified rule types being matched in the order specified, followed by the remaining rules, in default precedence order.') etsysPolicyProfileVlanRFC3580Mappings = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 5, 1, 13), VlanList()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyProfileVlanRFC3580Mappings.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileVlanRFC3580Mappings.setDescription('The set of VLANs which are currently being mapped onto this policy profile by the etsysPolicyRFC3580MapTable. This only refers to the mapping of vlan-tunnel-attributes returned from RADIUS in an RFC3580 context.') etsysPolicyProfileMirrorIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 5, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 255), )).clone(-1)).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyProfileMirrorIndex.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileMirrorIndex.setDescription('A reference to a packet mirror destination (defined elsewhere). A value of (-1) indicates no mirror is specified, but a mirror is not explicitly prohibitted. A value of (0) indicates that mirroring is explicitly prohibitted, unless a high precedent source (a rule) has specified a mirror.') etsysPolicyProfileAuditSyslogEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 5, 1, 15), EnabledStatus().clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyProfileAuditSyslogEnable.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileAuditSyslogEnable.setDescription('Enables the sending of a syslog message if no rule bound to this profile has prohibited it.') etsysPolicyProfileAuditTrapEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 5, 1, 16), EnabledStatus().clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyProfileAuditTrapEnable.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileAuditTrapEnable.setDescription('Enables the sending of a SNMP NOTIFICATION if no rule bound to this profile has prohibited it.') etsysPolicyProfileDisablePort = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 5, 1, 17), EnabledStatus().clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyProfileDisablePort.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileDisablePort.setDescription('Will set the ifOperStatus of the port, on which the frame which used this profile was received, to disable, if if no rule bound to this profile has prohibited it.') etsysPolicyProfileUsageList = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 1, 5, 1, 18), PortList()).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPolicyProfileUsageList.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileUsageList.setDescription("When read, a set bit indicates that this profile was used to send a syslog or trap message for corresponding port. When set, the native PortList will be bit-wise AND'ed with the set PortList, allowing the agent to clear the usage indication.") etsysPolicyClassificationMaxEntries = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 2, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyClassificationMaxEntries.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyClassificationMaxEntries.setDescription('The maximum number of entries allowed in the etsysPolicyClassificationTable.') etsysPolicyClassificationNumEntries = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 2, 2), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyClassificationNumEntries.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyClassificationNumEntries.setDescription('The current number of entries in the etsysPolicyClassificationTable.') etsysPolicyClassificationLastChange = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 2, 3), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyClassificationLastChange.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyClassificationLastChange.setDescription('The sysUpTime at which the etsysPolicyClassificationTable was last modified.') etsysPolicyClassificationTable = MibTable((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 2, 4), ) if mibBuilder.loadTexts: etsysPolicyClassificationTable.setReference('CTRON-PRIORITY-CLASSIFY-MIB, CTRON-VLAN-CLASSIFY-MIB, CTRON-RATE-POLICING-MIB') if mibBuilder.loadTexts: etsysPolicyClassificationTable.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyClassificationTable.setDescription('A table containing reference OIDs to entries within the classification tables. These classification tables include but may not be limited to: ctPriClassifyTable ctVlanClassifyTable ctRatePolicyingConfigTable This table is used to map a list of classification rules to an instance of the etsysPolicyProfileTable.') etsysPolicyClassificationEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 2, 4, 1), ).setIndexNames((0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileIndex"), (0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyClassificationIndex")) if mibBuilder.loadTexts: etsysPolicyClassificationEntry.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyClassificationEntry.setDescription('Describes a particular entry within the etsysPolicyClassificationTable. Entries within this table MUST be considered non-volatile and MUST be maintained across entity resets.') etsysPolicyClassificationIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 2, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))) if mibBuilder.loadTexts: etsysPolicyClassificationIndex.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyClassificationIndex.setDescription('Administratively assigned unique value, greater than zero. Each etsysPolicyClassificationIndex instance MUST be unique within the scope of its associated etsysPolicyProfileIndex.') etsysPolicyClassificationOID = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 2, 4, 1, 2), RowPointer()).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyClassificationOID.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyClassificationOID.setDescription("This object follows the RowPointer textual convention and is an OID reference to a classification rule. This object MUST NOT be modifiable while this entry's etsysPolicyClassificationStatus object has a value of active(1).") etsysPolicyClassificationRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 2, 4, 1, 3), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyClassificationRowStatus.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyClassificationRowStatus.setDescription("The status of this row. When set to active(1) this entry's classification rule, as referenced by etsysPolicyClassificationOID, becomes one of its associated policy's set of rules. When this entry's associated policy, as defined by etsysPolicyProfileIndex, is active and assigned to a port through the etsysPortPolicyProfileTable or to a station through the etsysStationPolicyProfileTabbe, this classification rule will be applied to the port or station. The exact behavior of this application depends upon the classification rule. When this object is set to notInService(2) or notReady(3) this entry is not considered one of its associated policy's set of rules and this classification rule will not be applied. An entry MAY NOT be set to active(1) unless this row's etsysPolicyClassificationOID is set to a valid classification rule.") etsysPolicyClassificationIngressList = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 2, 4, 1, 4), PortList()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyClassificationIngressList.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyClassificationIngressList.setDescription('The ports on which an active policy profile has defined this classification rule applies.') etsysPortPolicyProfileLastChange = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 3, 1), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPortPolicyProfileLastChange.setStatus('deprecated') if mibBuilder.loadTexts: etsysPortPolicyProfileLastChange.setDescription('sysUpTime at which the etsysPortPolicyProfileTable was last modified.') etsysPortPolicyProfileTable = MibTable((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 3, 2), ) if mibBuilder.loadTexts: etsysPortPolicyProfileTable.setStatus('deprecated') if mibBuilder.loadTexts: etsysPortPolicyProfileTable.setDescription('This table allows for a one to one mapping between a dot1dBasePort or an ifIndex and a Policy Profile.') etsysPortPolicyProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 3, 2, 1), ).setIndexNames((0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysPortPolicyProfileIndexType"), (0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysPortPolicyProfileIndex")) if mibBuilder.loadTexts: etsysPortPolicyProfileEntry.setStatus('deprecated') if mibBuilder.loadTexts: etsysPortPolicyProfileEntry.setDescription('Describes a particular entry within the etsysPortPolicyProfileTable. Entries within this table MUST be considered non-volatile and MUST be maintained across entity resets.') etsysPortPolicyProfileIndexType = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 3, 2, 1, 1), PortPolicyProfileIndexTypeTC()) if mibBuilder.loadTexts: etsysPortPolicyProfileIndexType.setStatus('deprecated') if mibBuilder.loadTexts: etsysPortPolicyProfileIndexType.setDescription('This object defines the specific type of port this entry represents.') etsysPortPolicyProfileIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 3, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))) if mibBuilder.loadTexts: etsysPortPolicyProfileIndex.setStatus('deprecated') if mibBuilder.loadTexts: etsysPortPolicyProfileIndex.setDescription("An index value which represents a unique port of the type defined by this entry's etsysPortPolicyProfileIndexType.") etsysPortPolicyProfileAdminID = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 3, 2, 1, 3), PolicyProfileIDTC()).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPortPolicyProfileAdminID.setStatus('deprecated') if mibBuilder.loadTexts: etsysPortPolicyProfileAdminID.setDescription("This object represents the desired Policy Profile for this dot1dBasePort or this ifIndex. Setting this object to any value besides zero (0) should, if possible, immediately place this entry's dot1dBasePort or ifIndex into the given Policy Profile. This object and etsysPortPolicyProfileOperID may not be the same if this object is set to a Policy (i.e. an instance of the etsysPolicyProfileTable) which is not in an active state or if the etsysPortPolicyProfileOperID has been set by an underlying security protocol such as RADIUS.") etsysPortPolicyProfileOperID = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 3, 2, 1, 4), PolicyProfileIDTC()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPortPolicyProfileOperID.setStatus('deprecated') if mibBuilder.loadTexts: etsysPortPolicyProfileOperID.setDescription("This object is the current policy which is being applied to this entry's dot1dBasePort. A value of zero(0) indicates there is no policy being applied to this dot1dBasePort or this ifIndex. If the value of this object has been set by an underlying security protocol such as RADIUS, sets to this entry's etsysPortPolicyProfileAdminID MUST NOT change the value of this object until such time as the security protocol releases this object by setting it to a value of zero (0).") etsysPortPolicyProfileSummaryTable = MibTable((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 3, 3), ) if mibBuilder.loadTexts: etsysPortPolicyProfileSummaryTable.setStatus('current') if mibBuilder.loadTexts: etsysPortPolicyProfileSummaryTable.setDescription('This table provides aggregate port information on a per policy, per port type basis.') etsysPortPolicyProfileSummaryEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 3, 3, 1), ).setIndexNames((0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileIndex"), (0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysPortPolicyProfileSummaryIndexType")) if mibBuilder.loadTexts: etsysPortPolicyProfileSummaryEntry.setStatus('current') if mibBuilder.loadTexts: etsysPortPolicyProfileSummaryEntry.setDescription('Conceptually defines a particular entry within the etsysPortPolicyProfileSummaryTable.') etsysPortPolicyProfileSummaryIndexType = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 3, 3, 1, 1), PortPolicyProfileIndexTypeTC()) if mibBuilder.loadTexts: etsysPortPolicyProfileSummaryIndexType.setStatus('current') if mibBuilder.loadTexts: etsysPortPolicyProfileSummaryIndexType.setDescription('This object defines the specific type of port this entry represents.') etsysPortPolicyProfileSummaryAdminID = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 3, 3, 1, 2), PortList()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPortPolicyProfileSummaryAdminID.setStatus('current') if mibBuilder.loadTexts: etsysPortPolicyProfileSummaryAdminID.setDescription('An aggregate list of all Ports currently supporting rules which assign this profileIndex through administrative means. Rules of this type have a valid etsysPolicyRuleResult2 action and a profileIndex of 0.') etsysPortPolicyProfileSummaryOperID = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 3, 3, 1, 3), PortList()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPortPolicyProfileSummaryOperID.setStatus('current') if mibBuilder.loadTexts: etsysPortPolicyProfileSummaryOperID.setDescription('An aggregate list of all Ports currently supporting rules which assign this profileIndex through either an administrative or dynamic means. The profileId which will be assigned operationally, as frames are handled are too be reported here.') etsysPortPolicyProfileSummaryDynamicID = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 3, 3, 1, 4), PortList()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPortPolicyProfileSummaryDynamicID.setStatus('current') if mibBuilder.loadTexts: etsysPortPolicyProfileSummaryDynamicID.setDescription('An aggregate list of all Ports currently supporting rules which assign this profileIndex through a dynamic means. For example the profileIndex returned via a successful 802.1X supplicant authentication.') etsysStationPolicyProfileMaxEntries = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 5, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysStationPolicyProfileMaxEntries.setStatus('current') if mibBuilder.loadTexts: etsysStationPolicyProfileMaxEntries.setDescription('The maximum number of entries allowed in the etsysStationPolicyProfileTable. If this number is exceeded, based on stations connecting to the edge device, the oldest entries will be deleted.') etsysStationPolicyProfileNumEntries = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 5, 2), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysStationPolicyProfileNumEntries.setStatus('current') if mibBuilder.loadTexts: etsysStationPolicyProfileNumEntries.setDescription('The current number of entries in the etsysStationPolicyProfileTable.') etsysStationPolicyProfileLastChange = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 5, 3), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysStationPolicyProfileLastChange.setStatus('current') if mibBuilder.loadTexts: etsysStationPolicyProfileLastChange.setDescription('sysUpTime at which the etsysStationPolicyProfileTable was last modified.') etsysStationPolicyProfileTable = MibTable((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 5, 4), ) if mibBuilder.loadTexts: etsysStationPolicyProfileTable.setStatus('current') if mibBuilder.loadTexts: etsysStationPolicyProfileTable.setDescription("This table allows for a one to one mapping between a station's identifying address and a Policy Profile.") etsysStationPolicyProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 5, 4, 1), ).setIndexNames((0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysStationPolicyProfileIndex")) if mibBuilder.loadTexts: etsysStationPolicyProfileEntry.setStatus('current') if mibBuilder.loadTexts: etsysStationPolicyProfileEntry.setDescription('Describes a particular entry within the etsysStationPolicyProfileTable. Entries within this table MUST be considered non-volatile and MUST be maintained across entity resets.') etsysStationPolicyProfileIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 5, 4, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))) if mibBuilder.loadTexts: etsysStationPolicyProfileIndex.setStatus('current') if mibBuilder.loadTexts: etsysStationPolicyProfileIndex.setDescription('An index value which represents a unique station entry.') etsysStationIdentifierType = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 5, 4, 1, 3), StationAddressType()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysStationIdentifierType.setStatus('current') if mibBuilder.loadTexts: etsysStationIdentifierType.setDescription('Indicates the type of station identifying address contained in etsysStationIdentifier.') etsysStationIdentifier = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 5, 4, 1, 4), StationAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysStationIdentifier.setStatus('current') if mibBuilder.loadTexts: etsysStationIdentifier.setDescription('A value which represents a unique MAC Address, IP Address, or other identifying address for a station, or other logical and authenticatable sub-entity within a station, connected to a port.') etsysStationPolicyProfileOperID = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 5, 4, 1, 5), PolicyProfileIDTC()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysStationPolicyProfileOperID.setStatus('current') if mibBuilder.loadTexts: etsysStationPolicyProfileOperID.setDescription("This object is the current policy which is being applied to this entry's MAC Address. A value of zero(0) indicates there is no policy being applied to this MAC Address. The value of this object reflects either the setting from an underlying AAA service such as RADIUS, or the default setting based on the etsysPortPolicyProfileAdminID for the port on which the station is connected. This object and the corresponding etsysPortPolicyProfileAdminID will not be the same if this object has been set by an underlying security protocol such as RADIUS.") etsysStationPolicyProfilePortType = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 5, 4, 1, 6), PortPolicyProfileIndexTypeTC()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysStationPolicyProfilePortType.setStatus('current') if mibBuilder.loadTexts: etsysStationPolicyProfilePortType.setDescription('A textual convention that defines the specific type of port designator the corresponding entry represents.') etsysStationPolicyProfilePortID = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 5, 4, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysStationPolicyProfilePortID.setStatus('current') if mibBuilder.loadTexts: etsysStationPolicyProfilePortID.setDescription("A value which represents the physical port, of the type defined by this entry's etsysStationPolicyProfilePortType, on which the associated station entity is connected. This object is for convenience in cross referencing stations to ports.") etsysInvalidPolicyAction = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 6, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("applyDefaultPolicy", 1), ("dropPackets", 2), ("forwardPackets", 3))).clone('applyDefaultPolicy')).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysInvalidPolicyAction.setStatus('current') if mibBuilder.loadTexts: etsysInvalidPolicyAction.setDescription('Specifies the action that the edge device should take if asked to apply an invalid or unknown policy. applyDefaultPolicy(1) - Ignore the result and search for the next policy assignment rule. dropPackets(2) - Block traffic. forwardPackets(3) - Forward traffic, as if no policy had been assigned (via 802.1D/Q rules). Although dropPackets(2) is the most secure option, it may not always be desirable.') etsysInvalidPolicyCount = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 6, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysInvalidPolicyCount.setStatus('current') if mibBuilder.loadTexts: etsysInvalidPolicyCount.setDescription('Increments to indicate the number of times the device has detected an invalid/unknown policy.') etsysDevicePolicyProfileDefault = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 8, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 65535), ))).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysDevicePolicyProfileDefault.setStatus('current') if mibBuilder.loadTexts: etsysDevicePolicyProfileDefault.setDescription('If this value is non-zero, the value indicates the etsysPolicyProfileEntry (and its associated etsysPolicyClassificationTable entries) which should be used by the device if the device is incapable of using the profile (or specific parts of the profile) explicitly applied to an inbound frame. A value of zero indicates that no default profile is currently active.') etsysPolicyCapabilities = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 1), Bits().clone(namedValues=NamedValues(("supportsVLANForwarding", 0), ("supportsPriority", 1), ("supportsPermit", 2), ("supportsDeny", 3), ("supportsDeviceLevelPolicy", 4), ("supportsPrecedenceReordering", 5), ("supportsTciOverwrite", 6), ("supportsRulesTable", 7), ("supportsRuleUseAccounting", 8), ("supportsRuleUseNotification", 9), ("supportsCoSTable", 10), ("supportsLongestPrefixRules", 11), ("supportsPortDisableAction", 12), ("supportsRuleUseAutoClearOnLink", 13), ("supportsRuleUseAutoClearOnInterval", 14), ("supportsRuleUseAutoClearOnProfile", 15), ("supportsPolicyRFC3580MapTable", 16), ("supportsPolicyEnabledTable", 17), ("supportsMirror", 18), ("supportsEgressPolicy", 19)))).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyCapabilities.setStatus('current') if mibBuilder.loadTexts: etsysPolicyCapabilities.setDescription('A list of capabilities related to policies. A set bit, with the value 1, indicates support for the described functionality. A clear bit, with the value 0, indicates the described functionality is not supported.') etsysPolicyDynaPIDRuleCapabilities = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 2), PolicyRulesSupported()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyDynaPIDRuleCapabilities.setStatus('current') if mibBuilder.loadTexts: etsysPolicyDynaPIDRuleCapabilities.setDescription('A list of rule types which are supported by this device for the purpose of dynamically assigning a profile to the network traffic described by the bit. A set bit, with the value 1, indicates support for the described functionality. A clear bit, with the value 0, indicates the described functionality is not supported.') etsysPolicyAdminPIDRuleCapabilities = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 3), PolicyRulesSupported()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyAdminPIDRuleCapabilities.setStatus('current') if mibBuilder.loadTexts: etsysPolicyAdminPIDRuleCapabilities.setDescription('A list of rule types which are supported by this device for the purpose of administratively assigning a profile to the network traffic described by the bit. A set bit, with the value 1, indicates support for the described functionality. A clear bit, with the value 0, indicates the described functionality is not supported.') etsysPolicyVlanRuleCapabilities = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 4), PolicyRulesSupported()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyVlanRuleCapabilities.setStatus('current') if mibBuilder.loadTexts: etsysPolicyVlanRuleCapabilities.setDescription('A list of rule types which are supported by this device for the purpose of assigning a VlanId to the network traffic described by the bit. A set bit, with the value 1, indicates support for the described functionality. A clear bit, with the value 0, indicates the described functionality is not supported.') etsysPolicyCosRuleCapabilities = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 5), PolicyRulesSupported()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyCosRuleCapabilities.setStatus('current') if mibBuilder.loadTexts: etsysPolicyCosRuleCapabilities.setDescription('A list of rule types which are supported by this device for the purpose of assigning a CoS to the network traffic described by the bit. A set bit, with the value 1, indicates support for the described functionality. A clear bit, with the value 0, indicates the described functionality is not supported.') etsysPolicyDropRuleCapabilities = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 6), PolicyRulesSupported()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyDropRuleCapabilities.setStatus('current') if mibBuilder.loadTexts: etsysPolicyDropRuleCapabilities.setDescription('A list of rule types which are supported by this device for the purpose of discarding the network traffic described by the bit. A set bit, with the value 1, indicates support for the described functionality. A clear bit, with the value 0, indicates the described functionality is not supported.') etsysPolicyForwardRuleCapabilities = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 7), PolicyRulesSupported()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyForwardRuleCapabilities.setStatus('current') if mibBuilder.loadTexts: etsysPolicyForwardRuleCapabilities.setDescription('A list of rule types which are supported by this device for the purpose of forwarding the network traffic described by the bit. A set bit, with the value 1, indicates support for the described functionality. A clear bit, with the value 0, indicates the described functionality is not supported.') etsysPolicySyslogRuleCapabilities = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 8), PolicyRulesSupported()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicySyslogRuleCapabilities.setStatus('current') if mibBuilder.loadTexts: etsysPolicySyslogRuleCapabilities.setDescription('A list of rule types which are supported by this device for the purpose of issuing syslog messages when the rule is used to identify the network traffic described by the bit. A set bit, with the value 1, indicates support for the described functionality. A clear bit, with the value 0, indicates the described functionality is not supported.') etsysPolicyTrapRuleCapabilities = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 9), PolicyRulesSupported()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyTrapRuleCapabilities.setStatus('current') if mibBuilder.loadTexts: etsysPolicyTrapRuleCapabilities.setDescription('A list of rule types which are supported by this device for the purpose of issuing an SNMP notify (trap) messages when the rule is used to identify the network traffic described by the bit. A set bit, with the value 1, indicates support for the described functionality. A clear bit, with the value 0, indicates the described functionality is not supported.') etsysPolicyDisablePortRuleCapabilities = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 10), PolicyRulesSupported()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyDisablePortRuleCapabilities.setStatus('current') if mibBuilder.loadTexts: etsysPolicyDisablePortRuleCapabilities.setDescription('A list of rule types which are supported by this device for the purpose of disabling the ingress port identified when the rule matches the network traffic described by the bit. A set bit, with the value 1, indicates support for the described functionality. A clear bit, with the value 0, indicates the described functionality is not supported.') etsysPolicySupportedPortList = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 11), PortList()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicySupportedPortList.setStatus('current') if mibBuilder.loadTexts: etsysPolicySupportedPortList.setDescription('The list ports which support policy profile assignment (i.e. the ports which _do_ policy). This object may be useful to management entities which desire to scope action to only those ports which support policy. A port which appears in this list, must support, at minimum, the assignment of a policy profile to all traffic ingressing the port.') etsysPolicyEnabledTable = MibTable((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 12), ) if mibBuilder.loadTexts: etsysPolicyEnabledTable.setStatus('current') if mibBuilder.loadTexts: etsysPolicyEnabledTable.setDescription('This table allows for the configuration of policy profile assignment methods, per port, including the ability to disable policy profile assignment, per port. In addition, a ports capabilities, with respect to policy profile assignment are reported.') etsysPolicyEnabledTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 12, 1), ).setIndexNames((0, "BRIDGE-MIB", "dot1dBasePort")) if mibBuilder.loadTexts: etsysPolicyEnabledTableEntry.setStatus('current') if mibBuilder.loadTexts: etsysPolicyEnabledTableEntry.setDescription('Describes a particular entry within the etsysPolicyEnabledTable.') etsysPolicyEnabledSupportedRuleTypes = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 12, 1, 1), PolicyRulesSupported()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyEnabledSupportedRuleTypes.setStatus('current') if mibBuilder.loadTexts: etsysPolicyEnabledSupportedRuleTypes.setDescription('The list of rule types which the devices supports for the purpose of assigning policy profiles to network traffic ingressing this dot1dBasePort.') etsysPolicyEnabledEnabledRuleTypes = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 12, 1, 2), PolicyRulesSupported()).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPolicyEnabledEnabledRuleTypes.setStatus('current') if mibBuilder.loadTexts: etsysPolicyEnabledEnabledRuleTypes.setDescription('The list of rule types from which the device will assign policy profiles to network traffic ingressing this dot1dBasePort. Rules which have a type not enumerated here must not be used to assign policy profiles, but must still be used to interrogate the rule-set bound to the determined policy profile. A set of all cleared bits will effectively disable policy in the port.') etsysPolicyEnabledEgressEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 12, 1, 3), EnabledStatus().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPolicyEnabledEgressEnabled.setStatus('current') if mibBuilder.loadTexts: etsysPolicyEnabledEgressEnabled.setDescription('Controls the enabling and disabling the application of policy as packets egress the switching process on the dot1dBasePort specified in the indexing.') etsysPolicyRuleAttributeTable = MibTable((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 13), ) if mibBuilder.loadTexts: etsysPolicyRuleAttributeTable.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleAttributeTable.setDescription('This table details each supported rule type attribute for rule data length in bytes, rule data length in bits, and the maximum number of rules that may use that type.') etsysPolicyRuleAttributeTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 13, 1), ).setIndexNames((0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleType")) if mibBuilder.loadTexts: etsysPolicyRuleAttributeTableEntry.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleAttributeTableEntry.setDescription('Describes a particular entry within the etsysPolicyRuleAttributeTable.') etsysPolicyRuleAttributeByteLength = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 13, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyRuleAttributeByteLength.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleAttributeByteLength.setDescription("This rule type's maximum length, in bytes of the etsysPolicyRuleData. Devices supporting this object MUST allow sets for this rule data of any valid length up to and including the length value represented by this object. Management entities must also expect to read back the maximum data length for each type regardless of the length the data was set with.") etsysPolicyRuleAttributeBitLength = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 13, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyRuleAttributeBitLength.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleAttributeBitLength.setDescription("This rule type's maximum bit length for traffic data. This value also represents the maximum mask that may be used for rule data. The mask MUST NOT exceed the rule data size. Masks that exceed the data size shall be considered invalid and result in an SNMP set failure.") etsysPolicyRuleAttributeMaxCreatable = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 13, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyRuleAttributeMaxCreatable.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleAttributeMaxCreatable.setDescription('If this value is non-zero, the value indicates the maximum number of rules of this type the agent can support.') etsysPolicyRuleTciOverwriteCapabilities = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 14), PolicyRulesSupported()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyRuleTciOverwriteCapabilities.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleTciOverwriteCapabilities.setDescription('A list of rule types which are supported by this device for the purpose of overwriting the TCI in received packets described by the bit. A set bit, with the value 1, indicates support for the described functionality. A clear bit, with the value 0, indicates the described functionality is not supported.') etsysPolicyRuleMirrorCapabilities = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 9, 15), PolicyRulesSupported()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyRuleMirrorCapabilities.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleMirrorCapabilities.setDescription('A list of rule types which are supported by this device for the purpose of mirroring the network traffic described by the bit. A set bit, with the value 1, indicates support for the described functionality. A clear bit, with the value 0, indicates the described functionality is not supported.') etsysPolicyMapMaxEntries = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 10, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyMapMaxEntries.setStatus('obsolete') if mibBuilder.loadTexts: etsysPolicyMapMaxEntries.setDescription('This has been obsoleted.') etsysPolicyMapNumEntries = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 10, 2), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyMapNumEntries.setStatus('obsolete') if mibBuilder.loadTexts: etsysPolicyMapNumEntries.setDescription('This has been obsoleted.') etsysPolicyMapLastChange = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 10, 3), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyMapLastChange.setStatus('obsolete') if mibBuilder.loadTexts: etsysPolicyMapLastChange.setDescription('This has been obsoleted.') etsysPolicyMapPvidOverRide = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 10, 4), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPolicyMapPvidOverRide.setStatus('obsolete') if mibBuilder.loadTexts: etsysPolicyMapPvidOverRide.setDescription('This has been obsoleted.') etsysPolicyMapUnknownPvidPolicy = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 10, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("denyAccess", 1), ("applyDefaultPolicy", 2), ("applyPvid", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPolicyMapUnknownPvidPolicy.setStatus('obsolete') if mibBuilder.loadTexts: etsysPolicyMapUnknownPvidPolicy.setDescription('This has been obsoleted.') etsysPolicyMapTable = MibTable((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 10, 6), ) if mibBuilder.loadTexts: etsysPolicyMapTable.setStatus('obsolete') if mibBuilder.loadTexts: etsysPolicyMapTable.setDescription('This has been obsoleted.') etsysPolicyMapEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 10, 6, 1), ).setIndexNames((0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyMapIndex")) if mibBuilder.loadTexts: etsysPolicyMapEntry.setStatus('obsolete') if mibBuilder.loadTexts: etsysPolicyMapEntry.setDescription('This has been obsoleted.') etsysPolicyMapIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 10, 6, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))) if mibBuilder.loadTexts: etsysPolicyMapIndex.setStatus('obsolete') if mibBuilder.loadTexts: etsysPolicyMapIndex.setDescription('This has been obsoleted.') etsysPolicyMapRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 10, 6, 1, 2), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyMapRowStatus.setStatus('obsolete') if mibBuilder.loadTexts: etsysPolicyMapRowStatus.setDescription('This has been obsoleted.') etsysPolicyMapStartVid = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 10, 6, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyMapStartVid.setStatus('obsolete') if mibBuilder.loadTexts: etsysPolicyMapStartVid.setDescription('This has been obsoleted.') etsysPolicyMapEndVid = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 10, 6, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyMapEndVid.setStatus('obsolete') if mibBuilder.loadTexts: etsysPolicyMapEndVid.setDescription('This has been obsoleted.') etsysPolicyMapPolicyIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 10, 6, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyMapPolicyIndex.setStatus('obsolete') if mibBuilder.loadTexts: etsysPolicyMapPolicyIndex.setDescription('This has been obsoleted.') etsysPolicyRulesMaxEntries = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyRulesMaxEntries.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRulesMaxEntries.setDescription('The maximum number of entries allowed in the etsysPolicyRulesTable.') etsysPolicyRulesNumEntries = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 2), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyRulesNumEntries.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRulesNumEntries.setDescription('The current number of entries in the etsysPolicyRulesTable.') etsysPolicyRulesLastChange = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 3), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyRulesLastChange.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRulesLastChange.setDescription('The sysUpTime at which the etsysPolicyRulesTable was last modified.') etsysPolicyRulesAccountingEnable = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 4), EnabledStatus().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPolicyRulesAccountingEnable.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRulesAccountingEnable.setDescription('Controls the collection of rule usage statistics. If disabled, no usage statistics are gathered and no auditing messages will be sent. When enabled, rule will gather usage statistics, and auditing messages will be sent, if enabled for a given rule.') etsysPolicyRulesPortDisabledList = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 5), PortList()).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPolicyRulesPortDisabledList.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRulesPortDisabledList.setDescription('A portlist containing bits representing the dot1dBridgePorts which have been disabled via the mechanism described in the etsysPolicyRuleDisablePort leaf. A set bit indicates a disabled port. Ports may be enabled by performing a set with the corresponding bit cleared. Bits which are set will be ignored during the set operation.') etsysPolicyRuleTable = MibTable((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 6), ) if mibBuilder.loadTexts: etsysPolicyRuleTable.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleTable.setDescription('A table containing rules bound to individual policies. A Rule is comprised of three components, a unique description of the network traffic, an associated list of actions, and an associated list of accounting and auditing controls and information. The unique description of the network traffic, defined by a PolicyClassificationRuleType together with a length, matching data and a relevant bits field, port type, and port number (port number zero is reserved to mean any port), and scoped by a etsysPolicyProfileIndex, is used as the table index.') etsysPolicyRuleEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 6, 1), ).setIndexNames((0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleProfileIndex"), (0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleType"), (0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleData"), (0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulePrefixBits"), (0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulePortType"), (0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulePort")) if mibBuilder.loadTexts: etsysPolicyRuleEntry.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleEntry.setDescription('Describes a particular entry within the etsysPolicyRuleTable. Entries within this table MUST be considered non-volatile and MUST be maintained across entity resets.') etsysPolicyRuleProfileIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 6, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 65535), ))) if mibBuilder.loadTexts: etsysPolicyRuleProfileIndex.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleProfileIndex.setDescription('The etsysPolicyProfileIndex for which the rule is defined. A value of zero(0) has special meaning in that it scopes rules which are used to determine the Policy Profile to which the frame belongs. See the etsysPolicyRuleResult1 and etsysPolicyRuleResult2 descriptions for specifics of how the results of a rule hit differ when the etsysPolicyRuleProfileIndex is zero.') etsysPolicyRuleType = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 6, 1, 2), PolicyClassificationRuleType()) if mibBuilder.loadTexts: etsysPolicyRuleType.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleType.setDescription('The type of network traffic reference by the etsysPolicyRuleData.') etsysPolicyRuleData = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 6, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))) if mibBuilder.loadTexts: etsysPolicyRuleData.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleData.setDescription('The data pattern to match against, as defined by the etsysPolicyRuleType, encoded in network-byte order.') etsysPolicyRulePrefixBits = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 6, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 2048), ))) if mibBuilder.loadTexts: etsysPolicyRulePrefixBits.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRulePrefixBits.setDescription('The relevant number of bits defined by the etsysPolicyRuleData, to be used when matching against a frame, relevant bits are specified in longest-prefix-first style (left to right). A value of zero carries the special meaning of all bits are relevant.') etsysPolicyRulePortType = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 6, 1, 5), PortPolicyProfileIndexTypeTC()) if mibBuilder.loadTexts: etsysPolicyRulePortType.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRulePortType.setDescription('The port number on which the rule will be applied. Zero(0) is a special case, indicating that the rule should be applied to all ports.') etsysPolicyRulePort = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 6, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 2147483647), ))) if mibBuilder.loadTexts: etsysPolicyRulePort.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRulePort.setDescription('The port number on which the rule will be applied. Zero(0) is a special case, indicating that the rule should be applied to all ports.') etsysPolicyRuleRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 6, 1, 7), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyRuleRowStatus.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleRowStatus.setDescription("The status of this row. When set to active(1) this entry's classification rule, as referenced by etsysPolicyRulesOID, becomes one of its associated policy's set of rules. When this entry's associated policy, as defined by etsysPolicyRuleProfileIndex, is active and assigned to a port through the etsysPortPolicyProfileTable or to a station through the etsysStationPolicyProfileTabbe, this classification rule will be applied to the port or station. The exact behavior of this application depends upon the classification rule. When this object is set to notInService(2) or notReady(3) this entry is not considered one of its associated policy's set of rules and this classification rule will not be applied.") etsysPolicyRuleStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 6, 1, 8), StorageType().clone('nonVolatile')).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyRuleStorageType.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleStorageType.setDescription("The storage type of this row. When set to volatile(1) this entry's classification rule, as referenced by etsysPolicyRulesOID, will be removed (if present) from non-volatile storage. Rows created dynamically by the device will typically report this as their default storage type. When set to nonVolatile(1) this entry's classification rule, as referenced by etsysPolicyRulesOID, will be added to non- volatile storage. This is the default value for rows created as the result of external management. Values of other(0), permanent(4), and readOnly(5) may not be set, although they may be returned for rows created by the device.") etsysPolicyRuleUsageList = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 6, 1, 9), PortList()).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPolicyRuleUsageList.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleUsageList.setDescription("When read, a set bit indicates that this rule was used to classify traffic on the corresponding port. When set, the native PortList will be bit-wise AND'ed with the set PortList, allowing the agent to clear the usage indication.") etsysPolicyRuleResult1 = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 6, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 4094), ValueRangeConstraint(4095, 4095), )).clone(-1)).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyRuleResult1.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleResult1.setDescription('If the etsysPolicyRuleProfileIndex is 0 then this field is read-only and defines the profile ID which will assigned to frames matching this rule. This is the dynamically assigned value and may differ from the administratively configured value. If the etsysPolicyRuleProfileIndex is not 0 then this field is read-create and defines the VLAN ID with which to mark a frame matching this PolicyRule. Note that three special, otherwise illegal, values of the etsysPolicyRuleVlan are used in defining the forwarding action. -1 Indicates that no VLAN or forwarding behavior modification is desired. A rule will not be matched against for the purpose of determining a marking VID if this value is set. 0 Indicates that the default forwarding action is to drop the packets matching this rule. 4095 Indicates that the default forwarding action is to forward any packets matching this rule.') etsysPolicyRuleResult2 = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 6, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 4095), )).clone(-1)).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyRuleResult2.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleResult2.setDescription('If the etsysPolicyRuleProfileIndex is 0 then this field is read-create and defines the profile ID which the managing entity desires assigned to frames matching this rule. This is the administrative value and may differ from the dynamically assigned active value. If the etsysPolicyRuleProfileIndex is not 0 then this field is The CoS with which to mark a frame matching this PolicyRule. Note that one special, otherwise illegal, values of the etsysPolicyRuleCoS are used in defining the forwarding action. -1 Indicates that no CoS or forwarding behavior modification is desired. A rule will not be matched against for the purpose of determining a CoS if this value is set.') etsysPolicyRuleAuditSyslogEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 6, 1, 12), TriStateStatus().clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyRuleAuditSyslogEnable.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleAuditSyslogEnable.setDescription('Controls the sending of a syslog message when a bit in the etsysPolicyRuleUsageList transitions from 0 to 1.') etsysPolicyRuleAuditTrapEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 6, 1, 13), TriStateStatus().clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyRuleAuditTrapEnable.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleAuditTrapEnable.setDescription('Controls the sending of an SNMP NOTIFICATION when a bit in the etsysPolicyRuleUsageList transitions from 0 to 1.') etsysPolicyRuleDisablePort = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 6, 1, 14), TriStateStatus().clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyRuleDisablePort.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleDisablePort.setDescription('Controls the disabling of a port (ifOperStatus of the corresponding ifIndex will be down) when a bit in the etsysPolicyRuleUsageList transitions from 0 to 1. When set to enabled, the corresponding ifIndex will be disabled upon the transition.') etsysPolicyRuleOperPid = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 6, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 4095), )).clone(-1)).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyRuleOperPid.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleOperPid.setDescription('If the etsysPolicyRuleProfileIndex is 0 then this field contains the currently applied profile ID for frames matching this rule. This may be either the administratively applied value or the dynamically applied value. If the etsysPolicyRuleProfileIndex is not 0, then this object does not exist and will not be returned. Note that one special, otherwise illegal, values of the etsysPolicyRuleCoS are used in defining the forwarding action. -1 Indicates that no profile ID is being applied by this rule.') etsysPolicyRuleOverwriteTCI = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 6, 1, 16), TriStateStatus().clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyRuleOverwriteTCI.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleOverwriteTCI.setDescription('If set, the information contained within the TCI field of inbound, tagged packets will not be used by the device after the ingress classification stage of packet relay. The net effect will be that the TCI information may be used to classify the packet, but will be overwritten (and ignored) by subsequent stages of packet relay.') etsysPolicyRuleMirrorIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 6, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 255), )).clone(-1)).setMaxAccess("readcreate") if mibBuilder.loadTexts: etsysPolicyRuleMirrorIndex.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleMirrorIndex.setDescription('A reference to a packet mirror destination (defined elsewhere). A value of (-1) indicates no mirror is specified, but a mirror is not explicitly prohibitted. A value of (0) indicates that mirroring is explicitly prohibitted, unless a high precedent rule has specified a mirror.') etsysPolicyRulePortTable = MibTable((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 7), ) if mibBuilder.loadTexts: etsysPolicyRulePortTable.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRulePortTable.setDescription('The purpose of this table is to provide an agent the ability to easily determine which rules have been used on a given bridge port. A row will only be present when the rule which the instancing describes has been used. The agent may remove a row (and clear the used status) by setting the etsysPolicyRulePortHit leaf to False. PolicyClassificationRuleType together with a length, matching data and a relevant bits field, port type, and port number (port number zero is reserved to mean any port), scoped by a etsysPolicyRuleProfileIndex, and preceded by a dot1dBasePort is used as the table index.') etsysPolicyRulePortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 7, 1), ).setIndexNames((0, "BRIDGE-MIB", "dot1dBasePort"), (0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleProfileIndex"), (0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleType"), (0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleData"), (0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulePrefixBits"), (0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulePortType"), (0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulePort")) if mibBuilder.loadTexts: etsysPolicyRulePortEntry.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRulePortEntry.setDescription('.') etsysPolicyRulePortHit = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 7, 1, 1), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPolicyRulePortHit.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRulePortHit.setDescription('Every row will report a value of True, indicating that the Rule described by the instancing was used on the given port. An agent may be set this leaf to False to clear remove the row and clear the Rule Use bit for the specified Rule, on the given bridgePort.') etsysPolicyRuleDynamicProfileAssignmentOverride = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 8), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPolicyRuleDynamicProfileAssignmentOverride.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleDynamicProfileAssignmentOverride.setDescription('If true, administratively assigned profile assignment rules override dynamically assigned profiles assignments for a given rule. If false, the dynamically assigned value (typically created by a successful authentication attempt) overrides the administratively configured value. The agent may optionally implement this leaf as read-only.') etsysPolicyRuleDefaultDynamicSyslogStatus = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 9), TriStateStatus().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPolicyRuleDefaultDynamicSyslogStatus.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleDefaultDynamicSyslogStatus.setDescription('If enabled(1), rules dynamically created will set etsysPolicyRuleAuditSyslogEnable to enabled. If disabled(2) a dynamically created rule will have etsysPolicyRuleAuditSyslogEnable set to disabled. The agent may optionally implement this leaf as read-only.') etsysPolicyRuleDefaultDynamicTrapStatus = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 10), TriStateStatus().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPolicyRuleDefaultDynamicTrapStatus.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleDefaultDynamicTrapStatus.setDescription('If enabled(1), rules dynamically created will set etsysPolicyRuleAuditTrapEnable to enabled. If disabled(2) a dynamically created rule will have etsysPolicyRuleAuditTrapEnable set to disabled. The agent may optionally implement this leaf as read-only.') etsysPolicyRuleStatsAutoClearOnLink = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 11), EnabledStatus().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPolicyRuleStatsAutoClearOnLink.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleStatsAutoClearOnLink.setDescription('If set to enabled(1), when operstatus up is detected on any port the agent will clear the rule usage information associated with that port. This ability is further scoped to the list of ports defined by etsysPolicyRuleStatsAutoClearPorts. This leaf is optional and will have no effect on an agent which has rule use accounting disabled or does not support rule use accounting. By default, the rule use accounting information will not be modified by operstatus transitions.') etsysPolicyRuleStatsAutoClearInterval = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 65535), ))).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPolicyRuleStatsAutoClearInterval.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleStatsAutoClearInterval.setDescription('The interval at which the device will automatically clear rule usage statistics, in minutes. This ability is disabled (usage statistics will not be automatically cleared) if set to zero(0). This ability is further scoped to the list of ports defined by etsysPolicyRuleStatsAutoClearPorts. This leaf is optional and will have no effect on an agent which has rule use accounting disabled or does not support rule use accounting.') etsysPolicyRuleStatsAutoClearPorts = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 13), PortList()).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPolicyRuleStatsAutoClearPorts.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleStatsAutoClearPorts.setDescription("The list ports on which rule usage statistics will be cleared by one of the AutoClear actions (etsysPolicyRuleStatsAutoClearInterval, etsysPolicyRuleStatsAutoClearOnProfile, or etsysPolicyRuleStatsAutoClearOnLink). By default, no ports will be set in this list. This leaf is optional, unless the agent claims support for one of the other 'autoclear' objects, and will have no effect on an agent which has rule use accounting disabled or does not support rule use accounting.") etsysPolicyRuleStatsAutoClearOnProfile = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 14), EnabledStatus().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPolicyRuleStatsAutoClearOnProfile.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleStatsAutoClearOnProfile.setDescription('If set to enabled(1), when a rule assigning a PolicyProfile (whose etsysPolicyRuleProfileIndex is zero(0)) is activated, all the rule usage bits associated with the rules bound to the PolicyProfile specified by the etsysPolicyRuleOperPid and the port specified by the etsysPolicyRulePort are cleared (if there is no port specified or no valid etsysPolicyRuleProfileIndex specified, then no action follows). This ability is further scoped to the list of ports defined by etsysPolicyRuleStatsAutoClearPorts. This leaf is optional and will have no effect on an agent which has rule use accounting disabled or does not support rule use accounting. By default, the rule use accounting information will not be modified by the creation or activation of PolicyProfile assignment rules.') etsysPolicyRuleStatsDroppedNotifications = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 15), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyRuleStatsDroppedNotifications.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleStatsDroppedNotifications.setDescription("A count of the number of times the agent has dropped notification (syslog or trap) of a etsysPolicyRuleUsageList bit transition. A management entity might use this leaf as an indication to read the etsysPolicyRuleUsageList objects for important rules. This count should be kept to the best of the device's ability, and explicitly does not cover notifications discarded by the network.") etsysPolicyRuleSylogMachineReadableFormat = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 16), EnabledStatus().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPolicyRuleSylogMachineReadableFormat.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleSylogMachineReadableFormat.setDescription('If enabled, the device should format rule usage messages so that they might be processed by a machine (scripting backend, etc). If disabled, the messages should be formatted for human consumption.') etsysPolicyRuleSylogExtendedFormat = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 17), EnabledStatus().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPolicyRuleSylogExtendedFormat.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleSylogExtendedFormat.setDescription('If enabled, the device should provide additional information in rule-hit syslog messages. This information MAY include what actions may have been initiated by the rule (if any) or data mined from the packet which matched the rule.') etsysPolicyRuleSylogEveryTime = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 11, 18), EnabledStatus().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPolicyRuleSylogEveryTime.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRuleSylogEveryTime.setDescription('If enabled, the device will syslog on every rule hit (or profile hit) which specifies SYSLOG as the action, instead of only when the associated bit in the etsysPolicyProfileUsageList or the etsysPolicyRuleUsageList is clear. It should be noted that this may cause MANY messages to be generated.') etsysPolicyRFC3580MapResolveReponseConflict = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 12, 1), PolicyRFC3580MapRadiusResponseTC().clone('policyProfile')).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPolicyRFC3580MapResolveReponseConflict.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRFC3580MapResolveReponseConflict.setDescription('Indicates which field to use in the application of the RADIUS response in the event that both the proprietary filter-id indicating a policy profile and the standard (RFC3580) vlan- tunnel-attribute are present. If policyProfile(1) is selected, then the filter-id will be used, if vlanTunnelAttribute(2) is selected, then the vlan-tunnel-attribute will be used (and the policy-map will be applied, if present). A value of vlanTunnelAttributeWithPolicyProfile(3) indicates that both attributes should be applied, in the following manner: the policyProfile should be enforced, with the exception of the etsysPolicyProfilePortVid (if present), the returned vlan-tunnel-attribute will be used in its place. In this case, the policy-map will be ignored (as the policyProfile was explicitly assigned). VLAN classification rules will still be applied, as defined by the assigned policyProfile. Modifications of this value will not effect the current status of any users currently authenticated. The new state will be applied to new, successful authentications. The current status of current authentication may be modified through the individual agents or through the ENTERASYS-MULTI-AUTH-MIB, if supported.') etsysPolicyRFC3580MapLastChange = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 12, 2), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyRFC3580MapLastChange.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRFC3580MapLastChange.setDescription('The value of sysUpTime when the etsysPolicyRFC3580MapTable was last modified.') etsysPolicyRFC3580MapTableDefault = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 12, 3), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPolicyRFC3580MapTableDefault.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRFC3580MapTableDefault.setDescription('If read as True, then the etsysPolicyRFC3580MapTable is in the default state (no mappings have been created), if False, then non-default mappings exist. If set to True, then the etsysPolicyRFC3580MapTable will be put into the default state (no mappings will exist). A set to False is not valid and MUST fail.') etsysPolicyRFC3580MapTable = MibTable((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 12, 4), ) if mibBuilder.loadTexts: etsysPolicyRFC3580MapTable.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRFC3580MapTable.setDescription('A table containing VLAN ID to policy mappings. A policy is a group of classification rules which may be applied on a per user basis, to ports or to stations.') etsysPolicyRFC3580MapEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 12, 4, 1), ).setIndexNames((0, "ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRFC3580MapVlanId")) if mibBuilder.loadTexts: etsysPolicyRFC3580MapEntry.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRFC3580MapEntry.setDescription('Conceptually defines a particular entry within the etsysPolicyRFC3580MapTable. Entries within this table MUST be considered non-volatile and MUST be maintained across entity resets.') etsysPolicyRFC3580MapVlanId = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 12, 4, 1, 1), VlanIndex()) if mibBuilder.loadTexts: etsysPolicyRFC3580MapVlanId.setReference('IEEE 802.1X RADIUS Usage Guidelines (RFC 3580)') if mibBuilder.loadTexts: etsysPolicyRFC3580MapVlanId.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRFC3580MapVlanId.setDescription('The VlanIndex which will map to the policy profile specified by the etsysPolicyRFC3580MapPolicyIndex of this row. This will be used to map the VLAN returned by value from the Tunnel- Private-Group-ID RADIUS attribute.') etsysPolicyRFC3580MapPolicyIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 12, 4, 1, 2), PolicyProfileIDTC().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 65535), ))).setMaxAccess("readwrite") if mibBuilder.loadTexts: etsysPolicyRFC3580MapPolicyIndex.setReference('IEEE 802.1X RADIUS Usage Guidelines (RFC 3580)') if mibBuilder.loadTexts: etsysPolicyRFC3580MapPolicyIndex.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRFC3580MapPolicyIndex.setDescription('The index of a Policy Profle as defined in the etsysPolicyProfileTable. A value of 0 indicates that the row is functionally non- operational (no mapping exists). Devices which support the ENTERASYS-VLAN-AUTHORIZATION-MIB, and for which the value of etsysVlanAuthorizationEnable is Enabled and the value of etsysVlanAuthorizationStatus is Enabled on the port referenced by the authorization request, should then use the VlanIndex provisioned (e.g. from the Tunnel-Private-Group-ID RADIUS attribute) as defined by RFC3580, otherwise, the device should treat the result as if no matching Policy Profile had been found (e.g. as a simple success). In the case where a Policy Profile is already being applied to the referenced station, but no mapping exists, the device MUST treat the Tunnel-Private-Group-ID as an override to the etsysPolicyProfilePortVid defined by that profile (any matched classification rules which explicit provision a VLAN MUST still override both the etsysPolicyProfilePortVid and the Tunnel-Private-Group-ID.) A non-zero value of this object indicates that the VlanIndex provisioned (e.g. from the Tunnel-Private-Group-ID RADIUS attribute) should be mapped to a Policy Profile as defined in the etsysPolicyProfileTable, and that policy applied as if the Policy name had been provisioned instead (e.g, in the Filter-ID RADIUS attribute). If the mapping references a non-existent row of the etsysPolicyProfileTable, or the referenced row has a etsysPolicyProfileRowStatus value other than Active, the device MUST behave as if the mapping did not exist (apply the vlan-tunnel-attribute). The etsysPolicyRFC3580MapInvalidMapping MUST then be incremented.') etsysPolicyRFC3580MapInvalidMapping = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 12, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: etsysPolicyRFC3580MapInvalidMapping.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRFC3580MapInvalidMapping.setDescription('Increments to indicate the number of times the device has detected an invalid/unknown EtsysPolicyRFC3580MapEntry (i.e. one that references an in-active or non-existent etsysPolicyProfile).') etsysPolicyProfileConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7)) etsysPolicyProfileGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 1)) etsysPolicyProfileCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 2)) etsysPolicyProfileGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 1, 1)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileMaxEntries"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileNumEntries"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileLastChange"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileTableNextAvailableIndex"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileName"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileRowStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfilePortVidStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfilePortVid"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfilePriorityStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfilePriority"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileEgressVlans"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileForbiddenVlans"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileUntaggedVlans"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileOverwriteTCI"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileRulePrecedence"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileVlanRFC3580Mappings")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyProfileGroup = etsysPolicyProfileGroup.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyProfileGroup.setDescription('A collection of objects providing Policy Profile Creation.') etsysPolicyClassificationGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 1, 2)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyClassificationMaxEntries"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyClassificationNumEntries"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyClassificationLastChange"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyClassificationOID"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyClassificationRowStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyClassificationIngressList")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyClassificationGroup = etsysPolicyClassificationGroup.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyClassificationGroup.setDescription('A collection of objects providing a mapping between a set of Classification Rules and a Policy Profile.') etsysPortPolicyProfileGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 1, 3)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPortPolicyProfileLastChange"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPortPolicyProfileAdminID"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPortPolicyProfileOperID"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPortPolicyProfileSummaryAdminID"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPortPolicyProfileSummaryOperID")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPortPolicyProfileGroup = etsysPortPolicyProfileGroup.setStatus('deprecated') if mibBuilder.loadTexts: etsysPortPolicyProfileGroup.setDescription('A collection of objects providing a mapping from a specific port to a Policy Profile instance. Only the read-only portions of this group are now current. They are listed under etsysPortPolicyProfileGroup2.') etsysStationPolicyProfileGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 1, 5)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysStationPolicyProfileMaxEntries"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysStationPolicyProfileNumEntries"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysStationPolicyProfileLastChange"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysStationIdentifierType"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysStationIdentifier"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysStationPolicyProfileOperID"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysStationPolicyProfilePortType"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysStationPolicyProfilePortID")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysStationPolicyProfileGroup = etsysStationPolicyProfileGroup.setStatus('current') if mibBuilder.loadTexts: etsysStationPolicyProfileGroup.setDescription('A collection of objects providing a mapping from a specific station to a Policy Profile instance.') etsysInvalidPolicyPolicyGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 1, 6)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysInvalidPolicyAction"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysInvalidPolicyCount")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysInvalidPolicyPolicyGroup = etsysInvalidPolicyPolicyGroup.setStatus('current') if mibBuilder.loadTexts: etsysInvalidPolicyPolicyGroup.setDescription('A collection of objects that help to define a mapping from logical authorization services outcomes to access control and policy actions.') etsysDevicePolicyProfileGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 1, 7)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysDevicePolicyProfileDefault")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysDevicePolicyProfileGroup = etsysDevicePolicyProfileGroup.setStatus('current') if mibBuilder.loadTexts: etsysDevicePolicyProfileGroup.setDescription('An object that provides a device level supplemental policy for entities that are not able to apply portions of the profile definition uniquely on individual ports.') etsysPolicyCapabilitiesGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 1, 8)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyVlanRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyCosRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyDropRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyForwardRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyDynaPIDRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyAdminPIDRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicySyslogRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyTrapRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyDisablePortRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicySupportedPortList"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyEnabledSupportedRuleTypes"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyEnabledEnabledRuleTypes")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyCapabilitiesGroup = etsysPolicyCapabilitiesGroup.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyCapabilitiesGroup.setDescription('An object that indicates the capabilities of the managed entity with respect to Policy Profiles.') etsysPolicyMapGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 1, 9)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyMapMaxEntries"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyMapNumEntries"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyMapLastChange"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyMapPvidOverRide"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyMapUnknownPvidPolicy"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyMapRowStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyMapStartVid"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyMapEndVid"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyMapPolicyIndex")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyMapGroup = etsysPolicyMapGroup.setStatus('obsolete') if mibBuilder.loadTexts: etsysPolicyMapGroup.setDescription('This object group has been obsoleted.') etsysPolicyRulesGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 1, 10)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesMaxEntries"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesNumEntries"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesLastChange"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesAccountingEnable"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesPortDisabledList"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleRowStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStorageType"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleUsageList"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleResult1"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleResult2"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleAuditSyslogEnable"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleAuditTrapEnable"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleDisablePort"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleOperPid"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulePortHit"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleDynamicProfileAssignmentOverride"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleDefaultDynamicSyslogStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleDefaultDynamicTrapStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsAutoClearOnLink"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsAutoClearInterval"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsAutoClearPorts"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsAutoClearOnProfile")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyRulesGroup = etsysPolicyRulesGroup.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyRulesGroup.setDescription('An object that indicates the capabilities of the managed entity with respect to Policy Profiles.') etsysPortPolicyProfileGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 1, 11)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPortPolicyProfileSummaryAdminID"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPortPolicyProfileSummaryOperID"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPortPolicyProfileSummaryDynamicID")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPortPolicyProfileGroup2 = etsysPortPolicyProfileGroup2.setStatus('current') if mibBuilder.loadTexts: etsysPortPolicyProfileGroup2.setDescription('A collection of objects providing a mapping from a specific port to a Policy Profile instance.') etsysPolicyRFC3580MapGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 1, 12)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRFC3580MapResolveReponseConflict"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRFC3580MapLastChange"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRFC3580MapTableDefault"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRFC3580MapPolicyIndex"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRFC3580MapInvalidMapping")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyRFC3580MapGroup = etsysPolicyRFC3580MapGroup.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRFC3580MapGroup.setDescription('An object group that provides support for mapping between RFC 3580 style VLAN-policy and Enterasys UPN-policy based on named roles.') etsysPolicyCapabilitiesGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 1, 13)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyVlanRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyCosRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyDropRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyForwardRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyDynaPIDRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyAdminPIDRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicySyslogRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyTrapRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyDisablePortRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicySupportedPortList"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyEnabledSupportedRuleTypes"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyEnabledEnabledRuleTypes"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleAttributeByteLength"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleAttributeBitLength"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleAttributeMaxCreatable")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyCapabilitiesGroup2 = etsysPolicyCapabilitiesGroup2.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyCapabilitiesGroup2.setDescription('An object that indicates the capabilities of the managed entity with respect to Policy Profiles and defines the characteristics of policy rule data by rule type.') etsysPolicyRulesGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 1, 14)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesMaxEntries"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesNumEntries"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesLastChange"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesAccountingEnable"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesPortDisabledList"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleRowStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStorageType"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleUsageList"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleResult1"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleResult2"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleAuditSyslogEnable"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleAuditTrapEnable"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleDisablePort"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleOperPid"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulePortHit"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleDynamicProfileAssignmentOverride"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleDefaultDynamicSyslogStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleDefaultDynamicTrapStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsAutoClearOnLink"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsAutoClearInterval"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsAutoClearPorts"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsAutoClearOnProfile"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsDroppedNotifications"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleSylogMachineReadableFormat")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyRulesGroup2 = etsysPolicyRulesGroup2.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyRulesGroup2.setDescription('********* THIS GROUP IS DEPRECATED ********** An object that indicates the capabilities of the managed entity with respect to Policy Profiles.') etsysPolicyRulePortHitNotificationGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 1, 15)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulePortHitNotification")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyRulePortHitNotificationGroup = etsysPolicyRulePortHitNotificationGroup.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRulePortHitNotificationGroup.setDescription('An object group that provides support for traps sent from the etsysPolicyRulePortHit event.') etsysPolicyRulesGroup3 = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 1, 16)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesMaxEntries"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesNumEntries"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesLastChange"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesAccountingEnable"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesPortDisabledList"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleRowStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStorageType"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleUsageList"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleResult1"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleResult2"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleAuditSyslogEnable"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleAuditTrapEnable"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleDisablePort"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleOperPid"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulePortHit"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleDynamicProfileAssignmentOverride"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleDefaultDynamicSyslogStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleDefaultDynamicTrapStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsAutoClearOnLink"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsAutoClearInterval"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsAutoClearPorts"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsAutoClearOnProfile"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsDroppedNotifications"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleSylogMachineReadableFormat"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleSylogExtendedFormat")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyRulesGroup3 = etsysPolicyRulesGroup3.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyRulesGroup3.setDescription('An object that indicates the capabilities of the managed entity with respect to Policy Profiles.') etsysPolicyRulesGroup4 = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 1, 17)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesMaxEntries"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesNumEntries"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesLastChange"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesAccountingEnable"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesPortDisabledList"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleRowStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStorageType"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleUsageList"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleResult1"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleResult2"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleAuditSyslogEnable"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleAuditTrapEnable"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleDisablePort"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleOperPid"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulePortHit"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleDynamicProfileAssignmentOverride"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleDefaultDynamicSyslogStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleDefaultDynamicTrapStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsAutoClearOnLink"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsAutoClearInterval"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsAutoClearPorts"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsAutoClearOnProfile"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsDroppedNotifications"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleSylogMachineReadableFormat"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleSylogExtendedFormat"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleOverwriteTCI"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleMirrorIndex")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyRulesGroup4 = etsysPolicyRulesGroup4.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRulesGroup4.setDescription('An object that indicates the capabilities of the managed entity with respect to Policy Profiles.') etsysPolicyCapabilitiesGroup3 = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 1, 18)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyVlanRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyCosRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyDropRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyForwardRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyDynaPIDRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyAdminPIDRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicySyslogRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyTrapRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyDisablePortRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicySupportedPortList"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyEnabledSupportedRuleTypes"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyEnabledEnabledRuleTypes"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleAttributeByteLength"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleAttributeBitLength"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleAttributeMaxCreatable"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleTciOverwriteCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleMirrorCapabilities")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyCapabilitiesGroup3 = etsysPolicyCapabilitiesGroup3.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyCapabilitiesGroup3.setDescription('An object that indicates the capabilities of the managed entity with respect to Policy Profiles and defines the characteristics of policy rule data by rule type.') etsysPolicyProfileGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 1, 19)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileMaxEntries"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileNumEntries"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileLastChange"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileTableNextAvailableIndex"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileName"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileRowStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfilePortVidStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfilePortVid"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfilePriorityStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfilePriority"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileEgressVlans"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileForbiddenVlans"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileUntaggedVlans"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileOverwriteTCI"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileRulePrecedence"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileVlanRFC3580Mappings"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileMirrorIndex"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileAuditSyslogEnable"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileAuditTrapEnable"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileDisablePort")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyProfileGroup2 = etsysPolicyProfileGroup2.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyProfileGroup2.setDescription('A collection of objects providing Policy Profile Creation.') etsysPolicyRulesGroup5 = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 1, 20)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesMaxEntries"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesNumEntries"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesLastChange"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesAccountingEnable"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesPortDisabledList"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleRowStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStorageType"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleUsageList"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleResult1"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleResult2"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleAuditSyslogEnable"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleAuditTrapEnable"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleDisablePort"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleOperPid"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulePortHit"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleDynamicProfileAssignmentOverride"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleDefaultDynamicSyslogStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleDefaultDynamicTrapStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsAutoClearOnLink"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsAutoClearInterval"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsAutoClearPorts"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsAutoClearOnProfile"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleStatsDroppedNotifications"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleSylogMachineReadableFormat"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleSylogExtendedFormat"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleSylogEveryTime"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleOverwriteTCI"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleMirrorIndex")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyRulesGroup5 = etsysPolicyRulesGroup5.setStatus('current') if mibBuilder.loadTexts: etsysPolicyRulesGroup5.setDescription('An object that indicates the capabilities of the managed entity with respect to Policy Profiles.') etsysPolicyCapabilitiesGroup4 = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 1, 21)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyVlanRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyCosRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyDropRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyForwardRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyDynaPIDRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyAdminPIDRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicySyslogRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyTrapRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyDisablePortRuleCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicySupportedPortList"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyEnabledSupportedRuleTypes"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyEnabledEnabledRuleTypes"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyEnabledEgressEnabled"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleAttributeByteLength"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleAttributeBitLength"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleAttributeMaxCreatable"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleTciOverwriteCapabilities"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRuleMirrorCapabilities")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyCapabilitiesGroup4 = etsysPolicyCapabilitiesGroup4.setStatus('current') if mibBuilder.loadTexts: etsysPolicyCapabilitiesGroup4.setDescription('An object that indicates the capabilities of the managed entity with respect to Policy Profiles and defines the characteristics of policy rule data by rule type.') etsysPolicyProfileGroup3 = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 1, 22)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileMaxEntries"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileNumEntries"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileLastChange"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileTableNextAvailableIndex"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileName"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileRowStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfilePortVidStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfilePortVid"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfilePriorityStatus"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfilePriority"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileEgressVlans"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileForbiddenVlans"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileUntaggedVlans"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileOverwriteTCI"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileRulePrecedence"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileVlanRFC3580Mappings"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileMirrorIndex"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileAuditSyslogEnable"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileAuditTrapEnable"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileDisablePort"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileUsageList")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyProfileGroup3 = etsysPolicyProfileGroup3.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileGroup3.setDescription('A collection of objects providing Policy Profile Creation.') etsysPolicyProfileCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 2, 1)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPortPolicyProfileGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyClassificationGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysStationPolicyProfileGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysInvalidPolicyPolicyGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyProfileCompliance = etsysPolicyProfileCompliance.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyProfileCompliance.setDescription('The compliance statement for devices that support Policy Profiles. This compliance statement was deprecated to add mandatory support for the etsysPolicyCapabilitiesGroup and conditionally mandatory support for the etsysDevicePolicyProfileGroup.') etsysPolicyProfileCompliance2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 2, 2)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPortPolicyProfileGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyCapabilitiesGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyClassificationGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysStationPolicyProfileGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysInvalidPolicyPolicyGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysDevicePolicyProfileGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRFC3580MapGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyProfileCompliance2 = etsysPolicyProfileCompliance2.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyProfileCompliance2.setDescription('The compliance statement for devices that support Policy Profiles. This compliance state was deprecated to remove the conditional support of the etsysPolicyClassificationGroup, and add support for the etsysPolicyRFC3580MapGroup and the etsysPolicyRulesGroup.') etsysPolicyProfileCompliance3 = ModuleCompliance((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 2, 3)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPortPolicyProfileGroup2"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyCapabilitiesGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysStationPolicyProfileGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysInvalidPolicyPolicyGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysDevicePolicyProfileGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRFC3580MapGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyProfileCompliance3 = etsysPolicyProfileCompliance3.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyProfileCompliance3.setDescription('The compliance statement for devices that support Policy Profiles.') etsysPolicyProfileCompliance4 = ModuleCompliance((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 2, 4)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPortPolicyProfileGroup2"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyCapabilitiesGroup2"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysStationPolicyProfileGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysInvalidPolicyPolicyGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysDevicePolicyProfileGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRFC3580MapGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesGroup2"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulePortHitNotificationGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyProfileCompliance4 = etsysPolicyProfileCompliance4.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyProfileCompliance4.setDescription('The compliance statement for devices that support Policy Profiles.') etsysPolicyProfileCompliance5 = ModuleCompliance((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 2, 5)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPortPolicyProfileGroup2"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyCapabilitiesGroup2"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysStationPolicyProfileGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysInvalidPolicyPolicyGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysDevicePolicyProfileGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRFC3580MapGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesGroup3"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulePortHitNotificationGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyProfileCompliance5 = etsysPolicyProfileCompliance5.setStatus('deprecated') if mibBuilder.loadTexts: etsysPolicyProfileCompliance5.setDescription('The compliance statement for devices that support Policy Profiles.') etsysPolicyProfileCompliance6 = ModuleCompliance((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 2, 6)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPortPolicyProfileGroup2"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyCapabilitiesGroup3"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysStationPolicyProfileGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysInvalidPolicyPolicyGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysDevicePolicyProfileGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRFC3580MapGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesGroup4"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulePortHitNotificationGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyProfileCompliance6 = etsysPolicyProfileCompliance6.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileCompliance6.setDescription('The compliance statement for devices that support Policy Profiles.') etsysPolicyProfileCompliance7 = ModuleCompliance((1, 3, 6, 1, 4, 1, 5624, 1, 2, 6, 7, 2, 7)).setObjects(("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyProfileGroup3"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPortPolicyProfileGroup2"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyCapabilitiesGroup4"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysStationPolicyProfileGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysInvalidPolicyPolicyGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysDevicePolicyProfileGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRFC3580MapGroup"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulesGroup5"), ("ENTERASYS-POLICY-PROFILE-MIB", "etsysPolicyRulePortHitNotificationGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): etsysPolicyProfileCompliance7 = etsysPolicyProfileCompliance7.setStatus('current') if mibBuilder.loadTexts: etsysPolicyProfileCompliance7.setDescription('The compliance statement for devices that support Policy Profiles.') mibBuilder.exportSymbols("ENTERASYS-POLICY-PROFILE-MIB", etsysPolicyProfileAuditTrapEnable=etsysPolicyProfileAuditTrapEnable, etsysPolicyRuleResult2=etsysPolicyRuleResult2, etsysPortPolicyProfileGroup2=etsysPortPolicyProfileGroup2, etsysPolicyRuleStatsAutoClearInterval=etsysPolicyRuleStatsAutoClearInterval, etsysPolicyRulesGroup5=etsysPolicyRulesGroup5, etsysPolicyProfileDisablePort=etsysPolicyProfileDisablePort, etsysPortPolicyProfileGroup=etsysPortPolicyProfileGroup, etsysStationIdentifier=etsysStationIdentifier, etsysPolicyDisablePortRuleCapabilities=etsysPolicyDisablePortRuleCapabilities, etsysPolicyDropRuleCapabilities=etsysPolicyDropRuleCapabilities, etsysPolicyRFC3580MapTableDefault=etsysPolicyRFC3580MapTableDefault, etsysPolicyMapNumEntries=etsysPolicyMapNumEntries, etsysPolicyProfileNumEntries=etsysPolicyProfileNumEntries, etsysPolicyRulesPortDisabledList=etsysPolicyRulesPortDisabledList, etsysPolicyRulePortHitNotificationGroup=etsysPolicyRulePortHitNotificationGroup, etsysPolicyRuleRowStatus=etsysPolicyRuleRowStatus, etsysPortPolicyProfileEntry=etsysPortPolicyProfileEntry, PYSNMP_MODULE_ID=etsysPolicyProfileMIB, etsysPolicyClassificationIngressList=etsysPolicyClassificationIngressList, etsysPolicyRuleEntry=etsysPolicyRuleEntry, etsysPolicyMapUnknownPvidPolicy=etsysPolicyMapUnknownPvidPolicy, etsysPolicyRFC3580MapResolveReponseConflict=etsysPolicyRFC3580MapResolveReponseConflict, etsysPolicyTrapRuleCapabilities=etsysPolicyTrapRuleCapabilities, etsysPolicyRulesGroup=etsysPolicyRulesGroup, etsysPolicyProfileUntaggedVlans=etsysPolicyProfileUntaggedVlans, etsysPolicyCapabilitiesGroup=etsysPolicyCapabilitiesGroup, etsysPolicyProfileUsageList=etsysPolicyProfileUsageList, etsysPortPolicyProfileSummaryIndexType=etsysPortPolicyProfileSummaryIndexType, etsysPolicyProfileForbiddenVlans=etsysPolicyProfileForbiddenVlans, etsysPolicyEnabledTableEntry=etsysPolicyEnabledTableEntry, etsysPolicyRFC3580MapGroup=etsysPolicyRFC3580MapGroup, etsysPolicyProfileConformance=etsysPolicyProfileConformance, etsysStationPolicyProfile=etsysStationPolicyProfile, etsysPolicyRuleStatsAutoClearPorts=etsysPolicyRuleStatsAutoClearPorts, etsysPolicyRuleAttributeMaxCreatable=etsysPolicyRuleAttributeMaxCreatable, etsysPolicyRuleResult1=etsysPolicyRuleResult1, etsysPolicyRuleAttributeTable=etsysPolicyRuleAttributeTable, etsysPolicyMapPvidOverRide=etsysPolicyMapPvidOverRide, etsysPolicyProfileVlanRFC3580Mappings=etsysPolicyProfileVlanRFC3580Mappings, etsysPolicyRuleDefaultDynamicSyslogStatus=etsysPolicyRuleDefaultDynamicSyslogStatus, etsysPolicyProfileName=etsysPolicyProfileName, PolicyRFC3580MapRadiusResponseTC=PolicyRFC3580MapRadiusResponseTC, etsysPolicyEnabledSupportedRuleTypes=etsysPolicyEnabledSupportedRuleTypes, etsysPolicyRuleOperPid=etsysPolicyRuleOperPid, etsysPolicyRuleStatsDroppedNotifications=etsysPolicyRuleStatsDroppedNotifications, etsysPolicyMapStartVid=etsysPolicyMapStartVid, etsysPolicyClassification=etsysPolicyClassification, etsysPolicyProfileLastChange=etsysPolicyProfileLastChange, etsysPolicyCapability=etsysPolicyCapability, etsysDevicePolicyProfileGroup=etsysDevicePolicyProfileGroup, etsysPolicyProfileMaxEntries=etsysPolicyProfileMaxEntries, etsysPolicyRulePortHitNotification=etsysPolicyRulePortHitNotification, etsysPolicyProfileGroup2=etsysPolicyProfileGroup2, etsysPolicySyslogRuleCapabilities=etsysPolicySyslogRuleCapabilities, etsysPolicyRuleStatsAutoClearOnLink=etsysPolicyRuleStatsAutoClearOnLink, etsysPolicyRuleMirrorIndex=etsysPolicyRuleMirrorIndex, etsysPolicyRuleMirrorCapabilities=etsysPolicyRuleMirrorCapabilities, etsysPolicyRuleDynamicProfileAssignmentOverride=etsysPolicyRuleDynamicProfileAssignmentOverride, etsysStationPolicyProfilePortID=etsysStationPolicyProfilePortID, etsysStationPolicyProfileGroup=etsysStationPolicyProfileGroup, etsysPolicySupportedPortList=etsysPolicySupportedPortList, etsysPolicyRuleAuditSyslogEnable=etsysPolicyRuleAuditSyslogEnable, etsysPolicyProfileCompliances=etsysPolicyProfileCompliances, etsysPortPolicyProfileSummaryTable=etsysPortPolicyProfileSummaryTable, etsysPolicyMapRowStatus=etsysPolicyMapRowStatus, etsysPolicyProfileGroups=etsysPolicyProfileGroups, etsysPolicyClassificationMaxEntries=etsysPolicyClassificationMaxEntries, etsysPolicyRulesNumEntries=etsysPolicyRulesNumEntries, etsysPolicyRules=etsysPolicyRules, etsysPolicyCapabilitiesGroup3=etsysPolicyCapabilitiesGroup3, etsysPolicyVlanEgress=etsysPolicyVlanEgress, etsysPolicyProfileGroup3=etsysPolicyProfileGroup3, etsysPolicyProfileCompliance2=etsysPolicyProfileCompliance2, etsysPolicyVlanRuleCapabilities=etsysPolicyVlanRuleCapabilities, etsysPolicyRuleSylogExtendedFormat=etsysPolicyRuleSylogExtendedFormat, PolicyRulesSupported=PolicyRulesSupported, etsysPolicyRuleAttributeByteLength=etsysPolicyRuleAttributeByteLength, etsysPolicyProfileGroup=etsysPolicyProfileGroup, etsysPolicyProfileCompliance3=etsysPolicyProfileCompliance3, etsysPolicyRuleStorageType=etsysPolicyRuleStorageType, etsysPolicyRFC3580MapLastChange=etsysPolicyRFC3580MapLastChange, etsysPolicyProfileMirrorIndex=etsysPolicyProfileMirrorIndex, etsysPolicyRulePortHit=etsysPolicyRulePortHit, etsysPolicyNotifications=etsysPolicyNotifications, etsysPolicyRFC3580MapTable=etsysPolicyRFC3580MapTable, etsysPolicyRuleDefaultDynamicTrapStatus=etsysPolicyRuleDefaultDynamicTrapStatus, etsysPolicyProfileEgressVlans=etsysPolicyProfileEgressVlans, etsysPolicyProfilePortVid=etsysPolicyProfilePortVid, etsysPolicyRFC3580MapEntry=etsysPolicyRFC3580MapEntry, etsysPolicyProfileOverwriteTCI=etsysPolicyProfileOverwriteTCI, etsysPolicyProfileEntry=etsysPolicyProfileEntry, etsysPortPolicyProfileSummaryAdminID=etsysPortPolicyProfileSummaryAdminID, etsysPolicyMap=etsysPolicyMap, etsysPolicyProfile=etsysPolicyProfile, PolicyClassificationRuleType=PolicyClassificationRuleType, etsysPolicyRuleAttributeTableEntry=etsysPolicyRuleAttributeTableEntry, etsysPolicyRuleTciOverwriteCapabilities=etsysPolicyRuleTciOverwriteCapabilities, etsysPolicyEnabledTable=etsysPolicyEnabledTable, etsysPolicyRuleTable=etsysPolicyRuleTable, etsysPortPolicyProfile=etsysPortPolicyProfile, etsysPolicyProfileTableNextAvailableIndex=etsysPolicyProfileTableNextAvailableIndex, etsysPolicyClassificationOID=etsysPolicyClassificationOID, etsysPolicyProfileRulePrecedence=etsysPolicyProfileRulePrecedence, etsysPolicyRulePrefixBits=etsysPolicyRulePrefixBits, etsysDevicePolicyProfileDefault=etsysDevicePolicyProfileDefault, etsysPolicyMapMaxEntries=etsysPolicyMapMaxEntries, etsysInvalidPolicyAction=etsysInvalidPolicyAction, etsysPolicyClassificationLastChange=etsysPolicyClassificationLastChange, etsysPolicyMapIndex=etsysPolicyMapIndex, etsysPolicyClassificationGroup=etsysPolicyClassificationGroup, etsysInvalidPolicyCount=etsysInvalidPolicyCount, etsysPolicyRulePortType=etsysPolicyRulePortType, etsysPolicyMapGroup=etsysPolicyMapGroup, etsysPortPolicyProfileLastChange=etsysPortPolicyProfileLastChange, etsysPolicyRulesGroup2=etsysPolicyRulesGroup2, etsysPolicyEnabledEgressEnabled=etsysPolicyEnabledEgressEnabled, etsysPolicyRulePort=etsysPolicyRulePort, PortPolicyProfileIndexTypeTC=PortPolicyProfileIndexTypeTC, etsysPolicyRuleType=etsysPolicyRuleType, etsysPolicyRulesGroup4=etsysPolicyRulesGroup4, etsysPolicyCapabilitiesGroup4=etsysPolicyCapabilitiesGroup4, etsysPolicyProfileCompliance5=etsysPolicyProfileCompliance5, etsysPolicyRFC3580MapVlanId=etsysPolicyRFC3580MapVlanId, etsysStationPolicyProfilePortType=etsysStationPolicyProfilePortType, etsysPolicyRulesGroup3=etsysPolicyRulesGroup3, etsysPolicyRuleSylogEveryTime=etsysPolicyRuleSylogEveryTime, etsysPolicyClassificationRowStatus=etsysPolicyClassificationRowStatus, etsysPortPolicyProfileSummaryOperID=etsysPortPolicyProfileSummaryOperID, etsysPolicyProfilePriorityStatus=etsysPolicyProfilePriorityStatus, etsysPolicyProfileMIB=etsysPolicyProfileMIB, etsysPolicyRFC3580MapInvalidMapping=etsysPolicyRFC3580MapInvalidMapping, etsysPolicyRFC3580Map=etsysPolicyRFC3580Map, etsysPolicyRuleOverwriteTCI=etsysPolicyRuleOverwriteTCI, etsysPolicyClassificationIndex=etsysPolicyClassificationIndex, etsysPolicyCapabilitiesGroup2=etsysPolicyCapabilitiesGroup2, etsysPolicyProfileCompliance7=etsysPolicyProfileCompliance7, etsysStationPolicyProfileEntry=etsysStationPolicyProfileEntry, etsysPolicyRuleProfileIndex=etsysPolicyRuleProfileIndex, etsysPortPolicyProfileAdminID=etsysPortPolicyProfileAdminID, etsysStationPolicyProfileIndex=etsysStationPolicyProfileIndex, etsysPolicyRulePortTable=etsysPolicyRulePortTable, etsysPolicyForwardRuleCapabilities=etsysPolicyForwardRuleCapabilities, etsysPolicyProfileIndex=etsysPolicyProfileIndex, etsysPolicyRuleDisablePort=etsysPolicyRuleDisablePort, etsysPolicyRuleAuditTrapEnable=etsysPolicyRuleAuditTrapEnable, etsysStationPolicyProfileNumEntries=etsysStationPolicyProfileNumEntries, etsysPolicyMapEndVid=etsysPolicyMapEndVid, etsysPolicyClassificationTable=etsysPolicyClassificationTable, etsysStationPolicyProfileLastChange=etsysStationPolicyProfileLastChange, etsysPolicyClassificationNumEntries=etsysPolicyClassificationNumEntries, etsysPolicyProfileCompliance4=etsysPolicyProfileCompliance4, etsysPolicyProfilePriority=etsysPolicyProfilePriority, etsysStationIdentifierType=etsysStationIdentifierType, etsysPolicyMapLastChange=etsysPolicyMapLastChange, etsysPolicyMapTable=etsysPolicyMapTable, etsysPolicyProfileCompliance6=etsysPolicyProfileCompliance6, etsysStationPolicyProfileTable=etsysStationPolicyProfileTable, etsysPolicyRulePortEntry=etsysPolicyRulePortEntry, etsysPolicyMapPolicyIndex=etsysPolicyMapPolicyIndex, etsysPolicyRuleSylogMachineReadableFormat=etsysPolicyRuleSylogMachineReadableFormat, etsysInvalidPolicyPolicyGroup=etsysInvalidPolicyPolicyGroup, etsysPolicyProfileAuditSyslogEnable=etsysPolicyProfileAuditSyslogEnable, etsysPolicyProfileCompliance=etsysPolicyProfileCompliance, etsysPolicyRuleData=etsysPolicyRuleData, TriStateStatus=TriStateStatus, etsysPolicyProfileTable=etsysPolicyProfileTable, etsysPolicyRuleUsageList=etsysPolicyRuleUsageList, etsysPolicyRuleAttributeBitLength=etsysPolicyRuleAttributeBitLength, etsysPolicyMapEntry=etsysPolicyMapEntry, etsysPolicyProfileRowStatus=etsysPolicyProfileRowStatus, etsysDevicePolicyProfile=etsysDevicePolicyProfile, etsysStationPolicyProfileMaxEntries=etsysStationPolicyProfileMaxEntries, etsysPolicyRulesAccountingEnable=etsysPolicyRulesAccountingEnable, etsysInvalidPolicyPolicy=etsysInvalidPolicyPolicy, etsysPolicyClassificationEntry=etsysPolicyClassificationEntry, PolicyProfileIDTC=PolicyProfileIDTC, etsysPolicyRulesLastChange=etsysPolicyRulesLastChange, etsysPolicyCapabilities=etsysPolicyCapabilities, etsysPortPolicyProfileTable=etsysPortPolicyProfileTable, etsysPortPolicyProfileSummaryEntry=etsysPortPolicyProfileSummaryEntry, etsysPolicyRulesMaxEntries=etsysPolicyRulesMaxEntries, etsysPolicyRuleStatsAutoClearOnProfile=etsysPolicyRuleStatsAutoClearOnProfile, etsysPortPolicyProfileOperID=etsysPortPolicyProfileOperID, etsysPolicyProfilePortVidStatus=etsysPolicyProfilePortVidStatus, etsysPortPolicyProfileIndex=etsysPortPolicyProfileIndex, etsysPortPolicyProfileIndexType=etsysPortPolicyProfileIndexType, etsysPolicyEnabledEnabledRuleTypes=etsysPolicyEnabledEnabledRuleTypes, VlanList=VlanList, etsysPortPolicyProfileSummaryDynamicID=etsysPortPolicyProfileSummaryDynamicID, etsysStationPolicyProfileOperID=etsysStationPolicyProfileOperID, etsysPolicyAdminPIDRuleCapabilities=etsysPolicyAdminPIDRuleCapabilities, etsysPolicyRFC3580MapPolicyIndex=etsysPolicyRFC3580MapPolicyIndex, etsysPolicyDynaPIDRuleCapabilities=etsysPolicyDynaPIDRuleCapabilities, etsysPolicyCosRuleCapabilities=etsysPolicyCosRuleCapabilities)
242.855346
11,607
0.809629
17,597
154,456
7.105984
0.074558
0.041793
0.065801
0.074774
0.529782
0.452809
0.419916
0.410871
0.389527
0.375748
0
0.037197
0.094215
154,456
635
11,608
243.237795
0.856587
0.002266
0
0.065147
0
0.210098
0.547973
0.183235
0
0
0.000026
0
0.001629
1
0
false
0
0.02443
0
0.078176
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
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
5582eaaf4b219e54f08863b41c38682cd3225524
99
py
Python
aoj/ITP1/ITP1_3_B/solve.py
tobyapi/online-judge-solutions
4088adb97ea592e8e6582ae7d2ecde2f85e2ed9c
[ "MIT" ]
null
null
null
aoj/ITP1/ITP1_3_B/solve.py
tobyapi/online-judge-solutions
4088adb97ea592e8e6582ae7d2ecde2f85e2ed9c
[ "MIT" ]
null
null
null
aoj/ITP1/ITP1_3_B/solve.py
tobyapi/online-judge-solutions
4088adb97ea592e8e6582ae7d2ecde2f85e2ed9c
[ "MIT" ]
null
null
null
i=0 while 1: a = int(input()) if a == 0 : break i+=1 print "Case %d: %d" % (i, a)
14.142857
33
0.414141
19
99
2.157895
0.631579
0
0
0
0
0
0
0
0
0
0
0.064516
0.373737
99
6
34
16.5
0.596774
0
0
0
0
0
0.111111
0
0
0
0
0
0
0
null
null
0
0
null
null
0.166667
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
3
5591010aecec83ad72afd02059cdcfd2b3211333
1,953
py
Python
sirbot/slack/store/store.py
Ovvovy/sirbot-slack
2d27e49cfbc2cb12e87ef3814823d2ad68d0a788
[ "MIT" ]
7
2017-05-06T11:37:25.000Z
2018-11-22T09:46:32.000Z
sirbot/slack/store/store.py
Ovvovy/sirbot-slack
2d27e49cfbc2cb12e87ef3814823d2ad68d0a788
[ "MIT" ]
19
2017-05-07T16:25:02.000Z
2017-09-22T08:02:59.000Z
sirbot/slack/store/store.py
Ovvovy/sirbot-slack
2d27e49cfbc2cb12e87ef3814823d2ad68d0a788
[ "MIT" ]
3
2017-05-06T11:37:28.000Z
2017-07-07T09:32:54.000Z
import logging logger = logging.getLogger(__name__) class SlackStore: def __init__(self, client, refresh=3600): self._client = client self._refresh = refresh async def all(self): pass async def get(self, id_, update=False): pass async def _add(self, item): pass async def _delete(self, id_): pass class SlackItem: def __init__(self, id_, raw=None, last_update=None): if not raw: raw = dict() self.id = id_ self._raw = raw self._last_update = last_update @property def name(self): return self._raw.get('name') @name.setter def name(self, _): raise NotImplementedError @property def send_id(self): return self.id @send_id.setter def send_id(self, _): raise NotImplementedError @property def raw(self): return self._raw @raw.setter def raw(self, _): raise NotImplementedError @property def last_update(self): return self._last_update @last_update.setter def last_update(self, _): raise NotImplementedError class SlackChannelItem(SlackItem): def __init__(self, id_, raw=None, last_update=None): super().__init__(id_, raw, last_update) @property def members(self): return self._raw.get('members') @members.setter def members(self, _): raise NotImplementedError @property def topic(self): return self._raw.get('topic') @topic.setter def topic(self, _): raise NotImplementedError @property def purpose(self): return self._raw.get('purpose') @purpose.setter def purpose(self, _): raise NotImplementedError @property def archived(self): return self._raw.get('is_archived', False) @archived.setter def archived(self, _): raise NotImplementedError
18.6
56
0.612391
221
1,953
5.140271
0.19457
0.079225
0.098592
0.089789
0.411972
0.075704
0.075704
0.075704
0.075704
0.075704
0
0.002901
0.293907
1,953
104
57
18.778846
0.820885
0
0
0.305556
0
0
0.017409
0
0
0
0
0
0
1
0.263889
false
0.055556
0.013889
0.111111
0.430556
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
1
0
0
0
3
55bbf817176aec2ca9e5776d0e2b35bfa63da276
20,799
py
Python
py_proto/modules/prediction/proto/feature_pb2.py
yujianyi/fusion_localization
c0057e29cbf690d6260f021080fd951c1a6b6baa
[ "Apache-2.0" ]
2
2019-03-04T02:11:04.000Z
2019-04-18T11:19:45.000Z
py_proto/modules/prediction/proto/feature_pb2.py
yujianyi/fusion_localization
c0057e29cbf690d6260f021080fd951c1a6b6baa
[ "Apache-2.0" ]
1
2019-03-15T08:37:53.000Z
2019-03-15T08:37:53.000Z
py_proto/modules/prediction/proto/feature_pb2.py
yujianyi/fusion_localization
c0057e29cbf690d6260f021080fd951c1a6b6baa
[ "Apache-2.0" ]
1
2019-03-04T02:11:09.000Z
2019-03-04T02:11:09.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: modules/prediction/proto/feature.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() from modules.prediction.proto import lane_graph_pb2 as modules_dot_prediction_dot_proto_dot_lane__graph__pb2 from modules.common.proto import geometry_pb2 as modules_dot_common_dot_proto_dot_geometry__pb2 from modules.perception.proto import perception_obstacle_pb2 as modules_dot_perception_dot_proto_dot_perception__obstacle__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='modules/prediction/proto/feature.proto', package='apollo.prediction', syntax='proto2', serialized_pb=_b('\n&modules/prediction/proto/feature.proto\x12\x11\x61pollo.prediction\x1a)modules/prediction/proto/lane_graph.proto\x1a#modules/common/proto/geometry.proto\x1a\x32modules/perception/proto/perception_obstacle.proto\"\x8a\x02\n\x04Lane\x12<\n\x14\x63urrent_lane_feature\x18\x01 \x03(\x0b\x32\x1e.apollo.prediction.LaneFeature\x12\x34\n\x0clane_feature\x18\x02 \x01(\x0b\x32\x1e.apollo.prediction.LaneFeature\x12;\n\x13nearby_lane_feature\x18\x03 \x03(\x0b\x32\x1e.apollo.prediction.LaneFeature\x12\x30\n\nlane_graph\x18\x04 \x01(\x0b\x32\x1c.apollo.prediction.LaneGraph\x12\x1f\n\x17label_update_time_delta\x18\x1a \x01(\x01\"\xbf\x01\n\x0bLaneFeature\x12\x0f\n\x07lane_id\x18\x01 \x01(\t\x12\x16\n\x0elane_turn_type\x18\x02 \x01(\r\x12\x0e\n\x06lane_s\x18\x03 \x01(\x01\x12\x0e\n\x06lane_l\x18\x04 \x01(\x01\x12\x12\n\nangle_diff\x18\x05 \x01(\x01\x12\x1d\n\x15\x64ist_to_left_boundary\x18\x06 \x01(\x01\x12\x1e\n\x16\x64ist_to_right_boundary\x18\x07 \x01(\x01\x12\x14\n\x0clane_heading\x18\x08 \x01(\x01\"\xa8\x05\n\x07\x46\x65\x61ture\x12\n\n\x02id\x18\x01 \x01(\x05\x12(\n\x08position\x18\x02 \x01(\x0b\x32\x16.apollo.common.Point3D\x12(\n\x08velocity\x18\x03 \x01(\x0b\x32\x16.apollo.common.Point3D\x12,\n\x0c\x61\x63\x63\x65leration\x18\x04 \x01(\x0b\x32\x16.apollo.common.Point3D\x12\x18\n\x10velocity_heading\x18\x05 \x01(\x01\x12\r\n\x05speed\x18\x06 \x01(\x01\x12\x0b\n\x03\x61\x63\x63\x18\x07 \x01(\x01\x12\r\n\x05theta\x18\x08 \x01(\x01\x12\x0e\n\x06length\x18\t \x01(\x01\x12\r\n\x05width\x18\n \x01(\x01\x12\x0e\n\x06height\x18\x0b \x01(\x01\x12\x15\n\rtracking_time\x18\x0c \x01(\x01\x12\x11\n\ttimestamp\x18\r \x01(\x01\x12%\n\x04lane\x18\x0e \x01(\x0b\x32\x17.apollo.prediction.Lane\x12*\n\nt_position\x18\x10 \x01(\x0b\x32\x16.apollo.common.Point3D\x12.\n\nt_velocity\x18\x11 \x01(\x0b\x32\x16.apollo.common.Point3DB\x02\x18\x01\x12\x1e\n\x12t_velocity_heading\x18\x12 \x01(\x01\x42\x02\x18\x01\x12\x13\n\x07t_speed\x18\x13 \x01(\x01\x42\x02\x18\x01\x12\x32\n\x0et_acceleration\x18\x14 \x01(\x0b\x32\x16.apollo.common.Point3DB\x02\x18\x01\x12\x11\n\x05t_acc\x18\x15 \x01(\x01\x42\x02\x18\x01\x12\x17\n\x08is_still\x18\x16 \x01(\x08:\x05\x66\x61lse\x12\x38\n\x04type\x18\x17 \x01(\x0e\x32*.apollo.perception.PerceptionObstacle.Type\x12\x1f\n\x17label_update_time_delta\x18\x18 \x01(\x01') , dependencies=[modules_dot_prediction_dot_proto_dot_lane__graph__pb2.DESCRIPTOR,modules_dot_common_dot_proto_dot_geometry__pb2.DESCRIPTOR,modules_dot_perception_dot_proto_dot_perception__obstacle__pb2.DESCRIPTOR,]) _LANE = _descriptor.Descriptor( name='Lane', full_name='apollo.prediction.Lane', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='current_lane_feature', full_name='apollo.prediction.Lane.current_lane_feature', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='lane_feature', full_name='apollo.prediction.Lane.lane_feature', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='nearby_lane_feature', full_name='apollo.prediction.Lane.nearby_lane_feature', index=2, number=3, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='lane_graph', full_name='apollo.prediction.Lane.lane_graph', index=3, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='label_update_time_delta', full_name='apollo.prediction.Lane.label_update_time_delta', index=4, number=26, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=194, serialized_end=460, ) _LANEFEATURE = _descriptor.Descriptor( name='LaneFeature', full_name='apollo.prediction.LaneFeature', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='lane_id', full_name='apollo.prediction.LaneFeature.lane_id', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='lane_turn_type', full_name='apollo.prediction.LaneFeature.lane_turn_type', index=1, number=2, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='lane_s', full_name='apollo.prediction.LaneFeature.lane_s', index=2, number=3, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='lane_l', full_name='apollo.prediction.LaneFeature.lane_l', index=3, number=4, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='angle_diff', full_name='apollo.prediction.LaneFeature.angle_diff', index=4, number=5, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='dist_to_left_boundary', full_name='apollo.prediction.LaneFeature.dist_to_left_boundary', index=5, number=6, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='dist_to_right_boundary', full_name='apollo.prediction.LaneFeature.dist_to_right_boundary', index=6, number=7, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='lane_heading', full_name='apollo.prediction.LaneFeature.lane_heading', index=7, number=8, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=463, serialized_end=654, ) _FEATURE = _descriptor.Descriptor( name='Feature', full_name='apollo.prediction.Feature', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='id', full_name='apollo.prediction.Feature.id', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='position', full_name='apollo.prediction.Feature.position', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='velocity', full_name='apollo.prediction.Feature.velocity', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='acceleration', full_name='apollo.prediction.Feature.acceleration', index=3, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='velocity_heading', full_name='apollo.prediction.Feature.velocity_heading', index=4, number=5, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='speed', full_name='apollo.prediction.Feature.speed', index=5, number=6, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='acc', full_name='apollo.prediction.Feature.acc', index=6, number=7, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='theta', full_name='apollo.prediction.Feature.theta', index=7, number=8, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='length', full_name='apollo.prediction.Feature.length', index=8, number=9, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='width', full_name='apollo.prediction.Feature.width', index=9, number=10, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='height', full_name='apollo.prediction.Feature.height', index=10, number=11, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='tracking_time', full_name='apollo.prediction.Feature.tracking_time', index=11, number=12, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='timestamp', full_name='apollo.prediction.Feature.timestamp', index=12, number=13, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='lane', full_name='apollo.prediction.Feature.lane', index=13, number=14, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='t_position', full_name='apollo.prediction.Feature.t_position', index=14, number=16, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='t_velocity', full_name='apollo.prediction.Feature.t_velocity', index=15, number=17, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))), _descriptor.FieldDescriptor( name='t_velocity_heading', full_name='apollo.prediction.Feature.t_velocity_heading', index=16, number=18, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))), _descriptor.FieldDescriptor( name='t_speed', full_name='apollo.prediction.Feature.t_speed', index=17, number=19, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))), _descriptor.FieldDescriptor( name='t_acceleration', full_name='apollo.prediction.Feature.t_acceleration', index=18, number=20, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))), _descriptor.FieldDescriptor( name='t_acc', full_name='apollo.prediction.Feature.t_acc', index=19, number=21, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))), _descriptor.FieldDescriptor( name='is_still', full_name='apollo.prediction.Feature.is_still', index=20, number=22, type=8, cpp_type=7, label=1, has_default_value=True, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='type', full_name='apollo.prediction.Feature.type', index=21, number=23, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='label_update_time_delta', full_name='apollo.prediction.Feature.label_update_time_delta', index=22, number=24, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=657, serialized_end=1337, ) _LANE.fields_by_name['current_lane_feature'].message_type = _LANEFEATURE _LANE.fields_by_name['lane_feature'].message_type = _LANEFEATURE _LANE.fields_by_name['nearby_lane_feature'].message_type = _LANEFEATURE _LANE.fields_by_name['lane_graph'].message_type = modules_dot_prediction_dot_proto_dot_lane__graph__pb2._LANEGRAPH _FEATURE.fields_by_name['position'].message_type = modules_dot_common_dot_proto_dot_geometry__pb2._POINT3D _FEATURE.fields_by_name['velocity'].message_type = modules_dot_common_dot_proto_dot_geometry__pb2._POINT3D _FEATURE.fields_by_name['acceleration'].message_type = modules_dot_common_dot_proto_dot_geometry__pb2._POINT3D _FEATURE.fields_by_name['lane'].message_type = _LANE _FEATURE.fields_by_name['t_position'].message_type = modules_dot_common_dot_proto_dot_geometry__pb2._POINT3D _FEATURE.fields_by_name['t_velocity'].message_type = modules_dot_common_dot_proto_dot_geometry__pb2._POINT3D _FEATURE.fields_by_name['t_acceleration'].message_type = modules_dot_common_dot_proto_dot_geometry__pb2._POINT3D _FEATURE.fields_by_name['type'].enum_type = modules_dot_perception_dot_proto_dot_perception__obstacle__pb2._PERCEPTIONOBSTACLE_TYPE DESCRIPTOR.message_types_by_name['Lane'] = _LANE DESCRIPTOR.message_types_by_name['LaneFeature'] = _LANEFEATURE DESCRIPTOR.message_types_by_name['Feature'] = _FEATURE _sym_db.RegisterFileDescriptor(DESCRIPTOR) Lane = _reflection.GeneratedProtocolMessageType('Lane', (_message.Message,), dict( DESCRIPTOR = _LANE, __module__ = 'modules.prediction.proto.feature_pb2' # @@protoc_insertion_point(class_scope:apollo.prediction.Lane) )) _sym_db.RegisterMessage(Lane) LaneFeature = _reflection.GeneratedProtocolMessageType('LaneFeature', (_message.Message,), dict( DESCRIPTOR = _LANEFEATURE, __module__ = 'modules.prediction.proto.feature_pb2' # @@protoc_insertion_point(class_scope:apollo.prediction.LaneFeature) )) _sym_db.RegisterMessage(LaneFeature) Feature = _reflection.GeneratedProtocolMessageType('Feature', (_message.Message,), dict( DESCRIPTOR = _FEATURE, __module__ = 'modules.prediction.proto.feature_pb2' # @@protoc_insertion_point(class_scope:apollo.prediction.Feature) )) _sym_db.RegisterMessage(Feature) _FEATURE.fields_by_name['t_velocity'].has_options = True _FEATURE.fields_by_name['t_velocity']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) _FEATURE.fields_by_name['t_velocity_heading'].has_options = True _FEATURE.fields_by_name['t_velocity_heading']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) _FEATURE.fields_by_name['t_speed'].has_options = True _FEATURE.fields_by_name['t_speed']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) _FEATURE.fields_by_name['t_acceleration'].has_options = True _FEATURE.fields_by_name['t_acceleration']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) _FEATURE.fields_by_name['t_acc'].has_options = True _FEATURE.fields_by_name['t_acc']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) # @@protoc_insertion_point(module_scope)
51.355556
2,323
0.752777
2,896
20,799
5.095994
0.083909
0.060171
0.036997
0.063423
0.794213
0.725844
0.674617
0.649546
0.615802
0.583548
0
0.051687
0.120967
20,799
404
2,324
51.482673
0.755511
0.017741
0
0.649867
1
0.002653
0.229116
0.191117
0
0
0
0
0
1
0
false
0
0.023873
0
0.023873
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
e94f35d7fd1af3482c1b3a85068699d7bf27d20b
159
py
Python
doctests.py
inegm/hbforty
18293cc5c834e9a46dde21a1fd938114f8b9a423
[ "MIT" ]
null
null
null
doctests.py
inegm/hbforty
18293cc5c834e9a46dde21a1fd938114f8b9a423
[ "MIT" ]
null
null
null
doctests.py
inegm/hbforty
18293cc5c834e9a46dde21a1fd938114f8b9a423
[ "MIT" ]
null
null
null
if __name__ == "__main__": import doctest import hbforty doctest.testmod( hbforty, optionflags=doctest.NORMALIZE_WHITESPACE )
17.666667
48
0.647799
14
159
6.714286
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.283019
159
8
49
19.875
0.824561
0
0
0
0
0
0.050314
0
0
0
0
0
0
1
0
true
0
0.285714
0
0.285714
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
1
0
0
0
0
0
0
3