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
f53f7ca7e55025431c0eddd3b58db5224cb4211d
177
py
Python
src/params/NeuronTypes.py
thatmariia/grid-ping
3c32e48226adddcffba605573daa80cca02b5a57
[ "BSD-4-Clause" ]
null
null
null
src/params/NeuronTypes.py
thatmariia/grid-ping
3c32e48226adddcffba605573daa80cca02b5a57
[ "BSD-4-Clause" ]
null
null
null
src/params/NeuronTypes.py
thatmariia/grid-ping
3c32e48226adddcffba605573daa80cca02b5a57
[ "BSD-4-Clause" ]
null
null
null
from enum import Enum class NeuronTypes(Enum): """ Enum class containing neuron types: excitatory and inhibitory. """ EX = "excitatory" IN = "inhibitory"
16.090909
66
0.649718
19
177
6.052632
0.684211
0.156522
0
0
0
0
0
0
0
0
0
0
0.254237
177
10
67
17.7
0.871212
0.350282
0
0
0
0
0.20202
0
0
0
0
0
0
1
0
false
0
0.25
0
1
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
0
0
1
0
0
2
f54a3cae489a26d054375f7cc639c9b189e844de
10,980
py
Python
tests/test_dsl.py
os-climate/declarative-trino-access-control
8a810fccaca0e089cd17d4a1c888da7bcb36063e
[ "Apache-2.0" ]
null
null
null
tests/test_dsl.py
os-climate/declarative-trino-access-control
8a810fccaca0e089cd17d4a1c888da7bcb36063e
[ "Apache-2.0" ]
4
2022-01-15T14:37:21.000Z
2022-03-26T12:42:24.000Z
tests/test_dsl.py
os-climate/osc-trino-acl-dsl
8a810fccaca0e089cd17d4a1c888da7bcb36063e
[ "Apache-2.0" ]
null
null
null
import re import textwrap import yaml from osc_trino_acl_dsl.dsl2rules import dsl_to_rules class Table(object): def __init__(self, catalog: str, schema: str, table: str): self.catalog: str = str(catalog) self.schema: str = str(schema) self.table: str = str(table) class User(object): def __init__(self, user: str, group): self.user = str(user) if type(group) == set: self.groups = set([str(e) for e in list(group)]) elif type(group) == list: self.groups = set([str(e) for e in group]) else: self.groups = set([str(group)]) def rule_matches(rule: dict, table: Table, user: User) -> bool: """emulates trino rule matching semantics""" if ("catalog" in rule) and (not re.fullmatch(rule["catalog"], table.catalog)): return False if ("schema" in rule) and (not re.fullmatch(rule["schema"], table.schema)): return False if ("table" in rule) and (not re.fullmatch(rule["table"], table.table)): return False if ("user" in rule) and (not re.fullmatch(rule["user"], user.user)): return False if "group" in rule: x = [e for e in list(user.groups) if re.fullmatch(rule["group"], e)] if len(x) == 0: return False return True def first_matching_rule(user: User, table: Table, rules: list) -> dict: for rule in rules: if rule_matches(rule, table, user): return rule return None def rule_permissions(user: User, table: Table, rules: dict) -> tuple: assert type(rules) == dict assert "catalogs" in rules assert "schemas" in rules assert "tables" in rules crule = first_matching_rule(user, table, rules["catalogs"]) assert type(crule) == dict assert "allow" in crule allow = crule["allow"] srule = first_matching_rule(user, table, rules["schemas"]) assert type(srule) == dict assert "owner" in srule owner = srule["owner"] trule = first_matching_rule(user, table, rules["tables"]) assert type(trule) == dict assert "privileges" in trule privs = trule["privileges"] return (allow, owner, privs) _admin = ["SELECT", "INSERT", "DELETE", "OWNERSHIP"] _public = ["SELECT"] def test_dsl_minimal(): # a minimal schema: declares one admin group, defaults public, and no other rules dsl = yaml.load( textwrap.dedent( """ admin: - group: admins public: true catalogs: [] schemas: [] tables: [] """ ), yaml.SafeLoader, ) rules = dsl_to_rules(dsl, validate=True) # test permissions of the admin group perms = rule_permissions(User("x", "admins"), Table("x", "x", "x"), rules) assert perms == ("all", True, _admin) # test permissions of generic user perms = rule_permissions(User("x", []), Table("x", "x", "x"), rules) assert perms == ("read-only", False, _public) def test_dsl_catalog(): dsl = yaml.load( textwrap.dedent( """ admin: - group: admins public: true catalogs: - catalog: dev public: false schemas: [] tables: [] """ ), yaml.SafeLoader, ) rules = dsl_to_rules(dsl, validate=True) # test permissions of the admin group perms = rule_permissions(User("x", "admins"), Table("x", "x", "x"), rules) assert perms == ("all", True, _admin) # test permissions of generic user and non-dev catalog (global default) perms = rule_permissions(User("x", []), Table("x", "x", "x"), rules) assert perms == ("read-only", False, _public) perms = rule_permissions(User("x", []), Table("dev", "x", "x"), rules) assert perms == ("read-only", False, []) def test_dsl_schema(): dsl = yaml.load( textwrap.dedent( """ admin: - group: admins public: true catalogs: - catalog: dev public: false schemas: - catalog: dev schema: proj1 admin: - group: devs - user: usery public: true tables: [] """ ), yaml.SafeLoader, ) rules = dsl_to_rules(dsl, validate=True) # test permissions of the admin group perms = rule_permissions(User("x", "admins"), Table("x", "x", "x"), rules) assert perms == ("all", True, _admin) # test permissions of generic user and non-dev catalog (global default) perms = rule_permissions(User("x", []), Table("x", "x", "x"), rules) assert perms == ("read-only", False, _public) # test permissions of the dev group on the dev catalog perms = rule_permissions(User("x", "devs"), Table("dev", "x", "x"), rules) assert perms == ("all", False, []) # devs have admin in proj1 schema for all tables perms = rule_permissions(User("x", "devs"), Table("dev", "proj1", "x"), rules) assert perms == ("all", True, _admin) perms = rule_permissions(User("usery", []), Table("dev", "proj1", "x"), rules) assert perms == ("all", True, _admin) # dev-catalog default is non-public (no privs) perms = rule_permissions(User("x", "nondev"), Table("dev", "x", "x"), rules) assert perms == ("read-only", False, []) # inside dev.proj1 schema tables default to public perms = rule_permissions(User("x", []), Table("dev", "proj1", "x"), rules) assert perms == ("read-only", False, _public) def test_dsl_table(): dsl = yaml.load( textwrap.dedent( """ admin: - group: admins public: true catalogs: - catalog: dev public: false schemas: - catalog: dev schema: proj1 admin: - group: devs - user: usery public: true tables: - catalog: dev schema: proj1 table: priv1 admin: - user: userz public: false """ ), yaml.SafeLoader, ) rules = dsl_to_rules(dsl, validate=True) # test permissions of the admin group perms = rule_permissions(User("x", "admins"), Table("x", "x", "x"), rules) assert perms == ("all", True, _admin) # global default should be readable perms = rule_permissions(User("x", []), Table("x", "x", "x"), rules) assert perms == ("read-only", False, _public) # dev catalog default should be non-public perms = rule_permissions(User("x", []), Table("dev", "x", "x"), rules) assert perms == ("read-only", False, []) # dev.proj1 schema default should be readable perms = rule_permissions(User("x", []), Table("dev", "proj1", "x"), rules) assert perms == ("read-only", False, _public) # dev.proj1.priv1 should default to non-public perms = rule_permissions(User("x", []), Table("dev", "proj1", "priv1"), rules) assert perms == ("read-only", False, []) # "usery" and "devs" group have schema admin: perms = rule_permissions(User("x", "devs"), Table("dev", "proj1", "x"), rules) assert perms == ("all", True, _admin) perms = rule_permissions(User("usery", []), Table("dev", "proj1", "x"), rules) assert perms == ("all", True, _admin) # userz added as table admin for priv1 perms = rule_permissions(User("userz", []), Table("dev", "proj1", "priv1"), rules) assert perms == ("all", False, _admin) # but userz is not admin for any other table in proj1 perms = rule_permissions(User("userz", []), Table("dev", "proj1", "x"), rules) assert perms == ("all", False, _public) def test_dsl_table_acl(): dsl = yaml.load( textwrap.dedent( """ admin: - group: admins public: true catalogs: - catalog: dev public: false schemas: - catalog: dev schema: proj1 admin: - group: devs - user: usery public: true tables: - catalog: dev schema: proj1 table: priv1 public: filter: - "population < 1000" hide: - column3 acl: - id: - user: usera - user: userb filter: - "country = 'london'" - "year < 2061" hide: - column1 - column2 """ ), yaml.SafeLoader, ) rules = dsl_to_rules(dsl, validate=True) # test permissions of the admin group perms = rule_permissions(User("x", "admins"), Table("x", "x", "x"), rules) assert perms == ("all", True, _admin) # global default should be readable perms = rule_permissions(User("x", []), Table("x", "x", "x"), rules) assert perms == ("read-only", False, _public) # dev catalog default should be non-public perms = rule_permissions(User("x", []), Table("dev", "x", "x"), rules) assert perms == ("read-only", False, []) # dev.proj1 schema default should be readable perms = rule_permissions(User("x", []), Table("dev", "proj1", "x"), rules) assert perms == ("read-only", False, _public) # "usery" and "devs" group have schema admin: perms = rule_permissions(User("x", "devs"), Table("dev", "proj1", "x"), rules) assert perms == ("all", True, _admin) perms = rule_permissions(User("usery", []), Table("dev", "proj1", "x"), rules) assert perms == ("all", True, _admin) for u in ["usera", "userb"]: perms = rule_permissions(User(u, []), Table("dev", "proj1", "priv1"), rules) assert perms == ("read-only", False, _public) r = first_matching_rule(User(u, []), Table("dev", "proj1", "priv1"), rules["tables"]) assert "filter" in r assert r["filter"] == "(country = 'london') and (year < 2061)" assert "columns" in r assert r["columns"] == [{"name": "column1", "allow": False}, {"name": "column2", "allow": False}] # dev.proj1.priv1 should default to public # but with additional row and column acl settings perms = rule_permissions(User("x", []), Table("dev", "proj1", "priv1"), rules) assert perms == ("read-only", False, _public) r = first_matching_rule(User("x", []), Table("dev", "proj1", "priv1"), rules["tables"]) assert "filter" in r assert r["filter"] == "(country = 'london') and (population < 1000) and (year < 2061)" assert "columns" in r assert r["columns"] == [ {"name": "column1", "allow": False}, {"name": "column2", "allow": False}, {"name": "column3", "allow": False}, ]
32.485207
105
0.543443
1,264
10,980
4.639241
0.106013
0.058151
0.097203
0.11869
0.718281
0.702251
0.670703
0.644441
0.612551
0.609482
0
0.009028
0.303916
10,980
337
106
32.581602
0.75821
0.110656
0
0.509091
0
0
0.121451
0
0
0
0
0
0.284848
1
0.060606
false
0
0.024242
0
0.151515
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
f55da49181d53035411252526f6236de7beb9882
2,222
py
Python
codes3d/build_gene_index.py
Genome3d/codes3d-v1
fe4897cb07bd8b2c10cfc29defe8570d447b69e0
[ "MIT" ]
null
null
null
codes3d/build_gene_index.py
Genome3d/codes3d-v1
fe4897cb07bd8b2c10cfc29defe8570d447b69e0
[ "MIT" ]
4
2018-10-25T02:09:37.000Z
2019-06-27T20:50:27.000Z
codes3d/build_gene_index.py
Genome3d/codes3d-v1
fe4897cb07bd8b2c10cfc29defe8570d447b69e0
[ "MIT" ]
null
null
null
#!/usr/bin/python import argparse,codes3d,configparser, os if __name__ == "__main__": parser = argparse.ArgumentParser(description="Create a BED file detailing the locations of genes in the genome, and a database containing additional gene information. Note: If a file in .gtf format is supplied, no other arguments are required.") parser.add_argument("-i","--gene_files",required=True,nargs='+',help="The gene file/s to be indexed; either in tabular format, or, by default, the .gtf file format, as supplied by the GTEx project.") parser.add_argument("-g","--symbol_col",type=int,help="The index of the column containing the gene symbol (non-zero based; default: ).") parser.add_argument("-c","--chr_col",type=int,help="The index of the column containing the chromosome name (non-zero based; default: ).") parser.add_argument("-s","--start_col",type=int,help="The index of the column containing the gene start site (non-zero based; default: ).") parser.add_argument("-e","--end_col",type=int,help="The index of the column containing the gene end site (non-zero based; default: ).") parser.add_argument("-p","--p_threshold_col",type=int,help="The index of the column containing the GTEx p-threshold for this gene (optional; non-zero based; default: ).") parser.add_argument("-H","--no_header",action="store_true",help="Use this option if the table has no header.") parser.add_argument("-b","--output_bed_fp",help="The path to which to output the resultant BED file of gene locations (default: the input file name with the extension \".bed\").") parser.add_argument("-o","--output_db",help="The path to which to output the resultant gene index database (default: the input file name with the extension \".db\").") parser.add_argument("-C","--config_file",default=os.path.join(os.path.dirname(__file__),"../docs/codes3d.conf"),help="The configuration file specifying the location of the CoDeS3D library (default: docs/codes3d.conf).") args = parser.parse_args() config = configparser.ConfigParser() config.read(args.config_file) codes3d.build_gene_index(args.gene_files,args.output_bed_fp,args.output_db,config,args.symbol_col,args.chr_col,args.start_col,args.end_col,args.p_threshold_col,args.no_header)
96.608696
246
0.756976
354
2,222
4.610169
0.322034
0.055147
0.104167
0.042892
0.357843
0.357843
0.357843
0.291667
0.194853
0.148284
0
0.002506
0.10216
2,222
22
247
101
0.815539
0.007201
0
0
0
0.294118
0.595918
0
0
0
0
0
0
1
0
false
0
0.058824
0
0.058824
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
f56b8e9802094da8814e591262fd9b96c9698428
736
py
Python
data/train/python/f56b8e9802094da8814e591262fd9b96c9698428manage.py
harshp8l/deep-learning-lang-detection
2a54293181c1c2b1a2b840ddee4d4d80177efb33
[ "MIT" ]
84
2017-10-25T15:49:21.000Z
2021-11-28T21:25:54.000Z
data/train/python/f56b8e9802094da8814e591262fd9b96c9698428manage.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
5
2018-03-29T11:50:46.000Z
2021-04-26T13:33:18.000Z
data/train/python/f56b8e9802094da8814e591262fd9b96c9698428manage.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
24
2017-11-22T08:31:00.000Z
2022-03-27T01:22:31.000Z
#!/usr/bin/env python3 #-*- codin:utf-8 -*- ''' 用django + celery + redis演示异步队列任务。 不过文章写的太简略了,文章没啥意思,水平到了可以直接看代码。 python manage.py migrate -- looks at the INSTALLED_APPS setting and creates any necessary database tables according to the database settings in your mysite/settings.py file and the database migrations shipped with the app python manage.py runserver -- 启动 python manage.py startapp app_name -- 创建 python manage.py makemigrations app_name -- 预览 python manage.py sqlmigrate app_name 0001 -- 真干 ''' import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "picha.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
33.454545
221
0.777174
105
736
5.257143
0.638095
0.108696
0.126812
0.07971
0
0
0
0
0
0
0
0.009449
0.137228
736
21
222
35.047619
0.859843
0.67663
0
0
0
0
0.19214
0.09607
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
2
f5735cd931c6cb22e8fa362f8340421fcf372c3d
1,340
py
Python
backend/app/settings/globals.py
alldevic/base-fastapi-postgresql
7e3a2916910155cd83b10cd7fec42eba7b1d3a95
[ "MIT" ]
3
2021-06-17T00:06:15.000Z
2022-01-26T03:53:51.000Z
backend/app/settings/globals.py
alldevic/base-fastapi-postgresql
7e3a2916910155cd83b10cd7fec42eba7b1d3a95
[ "MIT" ]
null
null
null
backend/app/settings/globals.py
alldevic/base-fastapi-postgresql
7e3a2916910155cd83b10cd7fec42eba7b1d3a95
[ "MIT" ]
null
null
null
from pathlib import Path from typing import Optional from starlette.config import Config from starlette.datastructures import CommaSeparatedStrings from ..models.pydantic.database import DatabaseURL p: Path = Path(__file__).parents[2] / ".env" config: Config = Config(p if p.exists() else None) DATABASE: str = config("POSTGRES_DB", cast=str) DB_USER: Optional[str] = config("POSTGRES_USER", cast=str, default=None) DB_PASSWORD: Optional[str] = config( "POSTGRES_PASSWORD", cast=str, default=None ) DB_HOST: str = config("DB_HOST", cast=str, default="postgres_db") DB_PORT: int = config("DB_PORT", cast=int, default=5432) DATABASE_CONFIG: DatabaseURL = DatabaseURL( drivername="asyncpg", username=DB_USER, password=DB_PASSWORD, host=DB_HOST, port=DB_PORT, database=DATABASE, ) ALEMBIC_CONFIG: DatabaseURL = DatabaseURL( drivername="postgresql+psycopg2", username=DB_USER, password=DB_PASSWORD, host=DB_HOST, port=DB_PORT, database=DATABASE, ) REDIS_IP: str = config("REDIS_IP", cast=str, default="redis") REDIS_PORT: int = config("REDIS_PORT", cast=int, default=6379) REDIS_PASSWORD: str = config("REDIS_PASSWORD", cast=str, default=None) ARQ_BACKGROUND_FUNCTIONS: Optional[CommaSeparatedStrings] = config( "ARQ_BACKGROUND_FUNCTIONS", cast=CommaSeparatedStrings, default=None )
31.162791
72
0.750746
174
1,340
5.586207
0.264368
0.055556
0.072016
0.055556
0.216049
0.139918
0.139918
0.139918
0.139918
0.139918
0
0.008584
0.130597
1,340
42
73
31.904762
0.825751
0
0
0.277778
0
0
0.117164
0.01791
0
0
0
0
0
1
0
true
0.138889
0.138889
0
0.138889
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
2
f57687a33470d7205bc87af05ce7973af384b2a0
235
py
Python
1103.py
gabzin/uri
177bdf3f87bacfd924bd031a973b8db877379fe5
[ "MIT" ]
3
2021-09-21T18:50:20.000Z
2021-12-14T13:07:31.000Z
1103.py
gabzin/uri
177bdf3f87bacfd924bd031a973b8db877379fe5
[ "MIT" ]
null
null
null
1103.py
gabzin/uri
177bdf3f87bacfd924bd031a973b8db877379fe5
[ "MIT" ]
null
null
null
while True: h1,m1,h2,m2=map(int,input().split()) i=f=0 if m1+m2+h1+h2==0:break if h1==0:i=(24*60)+m1 else:i=(h1*60)+m1 if h2==0:f=(24*60)+m2 else:f=(h2*60)+m2 print(f-i) if f>i else print((24*60)-(i-f))
23.5
47
0.52766
56
235
2.214286
0.339286
0.096774
0
0
0
0
0
0
0
0
0
0.193548
0.208511
235
9
48
26.111111
0.473118
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.111111
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
f585cb72a0db164994f5a14aac9910a31f98b2a9
1,096
py
Python
unit1/data-types.py
mmunozz/merit-notes
66c04939eb2aa9f63efe4ef947c291aafbc1ce0a
[ "MIT" ]
null
null
null
unit1/data-types.py
mmunozz/merit-notes
66c04939eb2aa9f63efe4ef947c291aafbc1ce0a
[ "MIT" ]
null
null
null
unit1/data-types.py
mmunozz/merit-notes
66c04939eb2aa9f63efe4ef947c291aafbc1ce0a
[ "MIT" ]
null
null
null
""" Project: Data Types Notes Author: Mr. Buckley Last update: 8/25/2018 Description: Goes over comments, int, float, str, and type casting """ # *** COMMENTS *** # This is a comment (with a "#") # Comments are only for the user's eyes, the program doesn't read them. # Describe what sections of code do with a comment. """ This is a multiline comment """ # *** DATA TYPE: INTEGER *** # TODO: An integer number (no decimal) integer = 5 print (integer) print (type(integer)) # *** DATA TYPE: FLOAT *** # TODO: A decimal number decimal = 4.85 print (decimal) print (type(decimal)) # *** DATA TYPE: STRING *** # TODO: A string of characters enclosed in quotes word = "these are my words" print (word) print (type(word)) # *** TYPE CASTING *** # This converts one type to another # TODO: Cast float to int decimal = 55.55 dec_to_int = int(decimal) print(dec_to_int) # TODO: Cast int to string number = "8" print (int(number)+2) # TODO: Cast number string to int print ("give me add I'll add 1 to it") number = float (input()) print (number + 1) # TODO: Input demo (str to float)
20.296296
71
0.671533
173
1,096
4.231214
0.473988
0.027322
0.019126
0
0
0
0
0
0
0
0
0.021566
0.196168
1,096
53
72
20.679245
0.809308
0.609489
0
0
0
0
0.127371
0
0
0
0
0.018868
0
1
0
false
0
0
0
0
0.588235
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
1
0
2
f58e292660fbb4b40d7f4326ad34ea03b891aa42
324
py
Python
app/app/schemas/token.py
Tall-Programacion-FIME/backend
95b6934fd57086ffc2be3d9135732df3d240f694
[ "Apache-2.0" ]
null
null
null
app/app/schemas/token.py
Tall-Programacion-FIME/backend
95b6934fd57086ffc2be3d9135732df3d240f694
[ "Apache-2.0" ]
13
2021-03-04T22:59:54.000Z
2021-05-16T23:24:22.000Z
app/app/schemas/token.py
Tall-Programacion-FIME/backend
95b6934fd57086ffc2be3d9135732df3d240f694
[ "Apache-2.0" ]
1
2021-04-20T14:51:43.000Z
2021-04-20T14:51:43.000Z
import datetime from typing import Optional from pydantic import BaseModel class TokenBase(BaseModel): access_token: str class Token(TokenBase): refresh_token: str class TokenData(BaseModel): username: Optional[str] = None class VerificationToken(BaseModel): user_id: int exp: datetime.datetime
14.727273
35
0.753086
38
324
6.342105
0.552632
0.06639
0.107884
0
0
0
0
0
0
0
0
0
0.182099
324
21
36
15.428571
0.909434
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.25
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
1
0
0
2
f5915199b7c0be4872a450c1503f4eb928f9e20f
637
py
Python
dependencyinjection/internal/callsite_resolvers.py
Cologler/dependencyinjection-python
dc05c61571f10652d82929ebec4b255f109b840b
[ "MIT" ]
null
null
null
dependencyinjection/internal/callsite_resolvers.py
Cologler/dependencyinjection-python
dc05c61571f10652d82929ebec4b255f109b840b
[ "MIT" ]
null
null
null
dependencyinjection/internal/callsite_resolvers.py
Cologler/dependencyinjection-python
dc05c61571f10652d82929ebec4b255f109b840b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (c) 2017~2999 - cologler <[email protected]> # ---------- # # ---------- from .common import LifeTime, IServiceProvider, ICallSiteResolver from .descriptors import CallableDescriptor class CallSiteResolver(ICallSiteResolver): def __init__(self, service_provider: IServiceProvider): self._service_provider = service_provider def resolve(self, service_type: type, depend_chain): descriptor = CallableDescriptor.try_create(service_type, service_type, LifeTime.transient) if descriptor: return self._service_provider.get_callsite(descriptor, depend_chain)
33.526316
98
0.726845
64
637
6.96875
0.59375
0.098655
0.127803
0
0
0
0
0
0
0
0
0.016729
0.155416
637
18
99
35.388889
0.812268
0.153846
0
0
0
0
0
0
0
0
0
0
0
1
0.222222
false
0
0.222222
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
f5aa1cc085abe91e5e9d7da0530662e853080933
738
py
Python
lesson13n2/states/out.py
muzudho/py-state-machine-practice
e31c066f4cf142b6b6c5ff273b56a0f89428c59e
[ "MIT" ]
null
null
null
lesson13n2/states/out.py
muzudho/py-state-machine-practice
e31c066f4cf142b6b6c5ff273b56a0f89428c59e
[ "MIT" ]
null
null
null
lesson13n2/states/out.py
muzudho/py-state-machine-practice
e31c066f4cf142b6b6c5ff273b56a0f89428c59e
[ "MIT" ]
null
null
null
from lesson12_projects.house3.data.const import E_TURNED_KNOB, MSG_TURN_KNOB, E_FAILED class OutState: def update(self, req): self.on_entry(req) # 入力 msg = self.on_trigger(req) # 外に居ます。 'Turn knob' とメッセージを送ってくるのが正解です if msg == MSG_TURN_KNOB: self.on_turned_knob(req) return E_TURNED_KNOB else: self.on_failed(req) return E_FAILED def on_entry(self, req): req.c_sock.send( """You can see the house. You can see the close knob.""".encode() ) def on_trigger(self, req): return req.pull_trigger() def on_turned_knob(self, req): pass def on_failed(self, req): pass
21.085714
86
0.585366
100
738
4.09
0.4
0.085575
0.05379
0.05868
0
0
0
0
0
0
0
0.006024
0.325203
738
34
87
21.705882
0.815261
0.054201
0
0.095238
0
0
0
0
0
0
0
0
0
1
0.238095
false
0.095238
0.047619
0.047619
0.47619
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
2
1910e99d0b7143a24de2db38d697e59e51df210d
2,234
py
Python
lib/piservices/remote/integration.py
creative-workflow/pi-setup
d6d28cb8d34ef71b1e8ac95dd94099bfad08837a
[ "MIT" ]
1
2020-04-25T00:55:45.000Z
2020-04-25T00:55:45.000Z
lib/piservices/remote/integration.py
creative-workflow/pi-setup
d6d28cb8d34ef71b1e8ac95dd94099bfad08837a
[ "MIT" ]
4
2015-05-28T23:20:13.000Z
2015-05-28T23:24:01.000Z
lib/piservices/remote/integration.py
creative-workflow/pi-setup
d6d28cb8d34ef71b1e8ac95dd94099bfad08837a
[ "MIT" ]
null
null
null
from config import * from template import * from dictasobject import DictAsObject class RemoteFileHelper: def __init__(self, service): self.service = service self.config = DictAsObject({ 'ini' : self.config_ini, 'parser' : self.config_parser, 'shellvars' : self.config_shellvars, 'whitespace' : self.config_whitespace }) def build_local_lpath(self, path): if not path: return path if path and path.startswith('/'): return path if os.path.isfile(self.service.local_path+'/'+path): return self.service.local_path+'/'+path return path def abstract(self, remote_file=None): return AbstractRemoteLoader(self.service, self.build_remote_path(remote_file)) def template(self, local_path, remote_path=None, *args, **kwargs): return RemoteConfigFileWithTemplate(self.service, self.build_local_lpath(local_path), remote_path, *args, **kwargs) def partial(self, local_path, remote_path=None, *args, **kwargs): return RemoteConfigFileWithPartial( self.service, self.build_local_lpath(local_path), remote_path, *args, **kwargs) def config_ini(self, remote_file = None, *args, **kwargs): if remote_file: remote_file = self.service.normalize_path(remote_file) return RemoteConfigIniLoader(self.service, remote_file, *args, **kwargs) def config_parser(self, remote_file = None, *args, **kwargs): if remote_file: remote_file = self.service.normalize_path(remote_file) return RemoteConfigParser(self.service, remote_file, *args, **kwargs) def config_shellvars(self, remote_file = None, *args, **kwargs): if remote_file: remote_file = self.service.normalize_path(remote_file) return RemoteShellVarsLoader(self.service, remote_file, *args, **kwargs) def config_whitespace(self, remote_file = None, *args, **kwargs): if remote_file: remote_file = self.service.normalize_path(remote_file) return RemoteWhitespaceConfigLoader(self.service, remote_file, *args, **kwargs)
39.192982
83
0.656222
249
2,234
5.662651
0.164659
0.156028
0.059574
0.06383
0.553901
0.553901
0.489362
0.489362
0.404255
0.343262
0
0
0.243062
2,234
56
84
39.892857
0.833826
0
0
0.204545
0
0
0.013876
0
0
0
0
0
0
1
0.204545
false
0
0.068182
0.068182
0.545455
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
1916221a240fca8e366955bf9b55225db064e9c4
169
py
Python
Desafio25.py
sergioboff/Desafios-Curso-em-Video
f876396635b12c00bdd9523758364bbebfd70ae0
[ "MIT" ]
null
null
null
Desafio25.py
sergioboff/Desafios-Curso-em-Video
f876396635b12c00bdd9523758364bbebfd70ae0
[ "MIT" ]
null
null
null
Desafio25.py
sergioboff/Desafios-Curso-em-Video
f876396635b12c00bdd9523758364bbebfd70ae0
[ "MIT" ]
null
null
null
nome = str(input('Digite seu nome completo: ')).strip() if 'silva' in nome.lower(): print('Sim, seu nome tem Silva.') else: print('Não , seu nome não tem Silva')
33.8
55
0.64497
27
169
4.037037
0.592593
0.192661
0
0
0
0
0
0
0
0
0
0
0.183432
169
5
56
33.8
0.789855
0
0
0
0
0
0.488235
0
0
0
0
0
0
1
0
false
0
0
0
0
0.4
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
1918ab57423bec266c18fa1bdfea020adfc67165
628
py
Python
front_end/create_data_natalia_icassp.py
adiyoss/DeepVOT
6bbda01fc5a4f93c92fccba2b9dacee511533244
[ "MIT" ]
6
2016-10-16T14:23:44.000Z
2021-05-06T12:00:08.000Z
front_end/create_data_natalia_icassp.py
adiyoss/DeepVOT
6bbda01fc5a4f93c92fccba2b9dacee511533244
[ "MIT" ]
3
2019-10-17T19:21:45.000Z
2020-08-06T10:29:27.000Z
front_end/create_data_natalia_icassp.py
adiyoss/DeepVOT
6bbda01fc5a4f93c92fccba2b9dacee511533244
[ "MIT" ]
8
2016-07-02T04:38:07.000Z
2021-08-31T08:25:19.000Z
# import argparse # # # def main(audio_path, textgrid_path, output_path): # data = list() # for # print(1) # # if __name__ == "__main__": # # -------------MENU-------------- # # # command line arguments # parser = argparse.ArgumentParser() # parser.add_argument("audio_path", help="The path to the audio directory") # parser.add_argument("labels_path", help="The path to the relevant textgrids") # parser.add_argument("output_path", help="The path to output directory") # args = parser.parse_args() # # # main function # main(args.audio_path, args.textgrid_path, args.output_path)
33.052632
83
0.638535
76
628
5
0.434211
0.071053
0.134211
0.118421
0.15
0.105263
0
0
0
0
0
0.001969
0.191083
628
19
84
33.052632
0.746063
0.933121
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
2
192b17d903cd1b6ec6531cfdd00faa10c1ae8213
873
py
Python
tools/leetcode.093.Restore IP Addresses/leetcode.093.Restore IP Addresses.submission2.py
tedye/leetcode
975d7e3b8cb9b6be9e80e07febf4bcf6414acd46
[ "MIT" ]
4
2015-10-10T00:30:55.000Z
2020-07-27T19:45:54.000Z
tools/leetcode.093.Restore IP Addresses/leetcode.093.Restore IP Addresses.submission2.py
tedye/leetcode
975d7e3b8cb9b6be9e80e07febf4bcf6414acd46
[ "MIT" ]
null
null
null
tools/leetcode.093.Restore IP Addresses/leetcode.093.Restore IP Addresses.submission2.py
tedye/leetcode
975d7e3b8cb9b6be9e80e07febf4bcf6414acd46
[ "MIT" ]
null
null
null
class Solution: # @param {string} s # @return {string[]} def restoreIpAddresses(self, s): if not s or len(s) < 4: return [] res = [] cur = [] self.helper(s, res, cur, 0) return res def helper(self, s, res, cur, level): if level == 4: if not s: res.append('.'.join(cur)) return if len(s) == 0: return if len(s) >= 1: cur.append(s[0]) self.helper(s[1:],res,cur,level+1) cur.pop(-1) if len(s) >= 2 and 10 <= int(s[:2]): cur.append(s[:2]) self.helper(s[2:],res,cur,level+1) cur.pop(-1) if len(s) >= 3 and 100 <= int(s[:3]) < 256: cur.append(s[:3]) self.helper(s[3:],res,cur,level+1) cur.pop(-1)
873
873
0.412371
120
873
3
0.25
0.1
0.122222
0.1
0.191667
0.191667
0.191667
0.138889
0.138889
0.138889
0
0.057199
0.419244
873
1
873
873
0.65286
0.041237
0
0.192308
0
0
0.001198
0
0
0
0
0
0
1
0.076923
false
0
0
0
0.230769
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
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
19308256c02abbb6b9f77d5d12549a9bf4a3e01e
1,382
py
Python
src/runner/exporter.py
leechunghwan/YCSB-runner
f33d0fed30b41797864d95b7dbc8a6c2430f0bd8
[ "Apache-2.0" ]
null
null
null
src/runner/exporter.py
leechunghwan/YCSB-runner
f33d0fed30b41797864d95b7dbc8a6c2430f0bd8
[ "Apache-2.0" ]
null
null
null
src/runner/exporter.py
leechunghwan/YCSB-runner
f33d0fed30b41797864d95b7dbc8a6c2430f0bd8
[ "Apache-2.0" ]
null
null
null
class Exporter: # Extensions for output files FILE_EXT = ".txt" PLOTS_FILE_EXT = ".pdf" """Exporter: Exports statistical data captured from YCSB output to a file.""" def __init__(self, stats_set): """__init__ :param stats_set: StatisticsSet object containing data to be exported """ self.stats_set = stats_set def export(self, filename, key, *fields): """export Exports the given fields to the given CSV file. :param filename: Filename and path for the export output :param key: Key to use as index column :param *fields: Fields to be exported """ raise NotImplementedError def export_averages(self, filename, key, *fields): """export_averages Exports the averages of the given fields, grouped by the given key, to the given CSV file. :param filename: Filename and path for export output :param key: Key to group by :param *fields: Fields to average """ raise NotImplementedError def export_averages_plot(self, filename, key, *fields): """export_plot Automatically generates and saves a plot of the given fields :param filename: Filename and path for the plot output :param *fields: Fields to be plotted """ raise NotImplementedError
32.139535
81
0.636035
170
1,382
5.052941
0.329412
0.055879
0.052387
0.073341
0.451688
0.213038
0.154831
0.111758
0.111758
0.111758
0
0
0.295948
1,382
42
82
32.904762
0.882837
0.498553
0
0.272727
0
0
0.017582
0
0
0
0
0
0
1
0.363636
false
0
0
0
0.636364
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
1930fdebe216693651fdbce0248a0cc3fa01cfe6
4,387
py
Python
src/sima/riflex/crsaxialfrictionmodel.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/riflex/crsaxialfrictionmodel.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/riflex/crsaxialfrictionmodel.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
# This an autogenerated file # # Generated with CRSAxialFrictionModel from typing import Dict,Sequence,List from dmt.entity import Entity from dmt.blueprint import Blueprint from .blueprints.crsaxialfrictionmodel import CRSAxialFrictionModelBlueprint from typing import Dict from sima.sima.moao import MOAO from sima.sima.scriptablevalue import ScriptableValue class CRSAxialFrictionModel(MOAO): """ Keyword arguments ----------------- name : str (default "") description : str (default "") _id : str (default "") scriptableValues : List[ScriptableValue] staticFriction : float Static friction force corresponding to elongation(default 0.0) staticElongation : float Relative elongation(default 0.0) dynamicFriction : float Dynamic friction force corresponding to elongation(default 0.0) dynamicElongation : float Relative elongation(default 0.0) axialFriction : bool Local axial friction model(default False) """ def __init__(self , name="", description="", _id="", staticFriction=0.0, staticElongation=0.0, dynamicFriction=0.0, dynamicElongation=0.0, axialFriction=False, **kwargs): super().__init__(**kwargs) self.name = name self.description = description self._id = _id self.scriptableValues = list() self.staticFriction = staticFriction self.staticElongation = staticElongation self.dynamicFriction = dynamicFriction self.dynamicElongation = dynamicElongation self.axialFriction = axialFriction for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @property def blueprint(self) -> Blueprint: """Return blueprint that this entity represents""" return CRSAxialFrictionModelBlueprint() @property def name(self) -> str: """""" return self.__name @name.setter def name(self, value: str): """Set name""" self.__name = str(value) @property def description(self) -> str: """""" return self.__description @description.setter def description(self, value: str): """Set description""" self.__description = str(value) @property def _id(self) -> str: """""" return self.___id @_id.setter def _id(self, value: str): """Set _id""" self.___id = str(value) @property def scriptableValues(self) -> List[ScriptableValue]: """""" return self.__scriptableValues @scriptableValues.setter def scriptableValues(self, value: List[ScriptableValue]): """Set scriptableValues""" if not isinstance(value, Sequence): raise Exception("Expected sequense, but was " , type(value)) self.__scriptableValues = value @property def staticFriction(self) -> float: """Static friction force corresponding to elongation""" return self.__staticFriction @staticFriction.setter def staticFriction(self, value: float): """Set staticFriction""" self.__staticFriction = float(value) @property def staticElongation(self) -> float: """Relative elongation""" return self.__staticElongation @staticElongation.setter def staticElongation(self, value: float): """Set staticElongation""" self.__staticElongation = float(value) @property def dynamicFriction(self) -> float: """Dynamic friction force corresponding to elongation""" return self.__dynamicFriction @dynamicFriction.setter def dynamicFriction(self, value: float): """Set dynamicFriction""" self.__dynamicFriction = float(value) @property def dynamicElongation(self) -> float: """Relative elongation""" return self.__dynamicElongation @dynamicElongation.setter def dynamicElongation(self, value: float): """Set dynamicElongation""" self.__dynamicElongation = float(value) @property def axialFriction(self) -> bool: """Local axial friction model""" return self.__axialFriction @axialFriction.setter def axialFriction(self, value: bool): """Set axialFriction""" self.__axialFriction = bool(value)
29.641892
174
0.647367
407
4,387
6.845209
0.189189
0.039483
0.051687
0.040201
0.153625
0.134243
0.084709
0.03374
0
0
0
0.004869
0.250969
4,387
147
175
29.843537
0.84297
0.223615
0
0.123457
1
0
0.008393
0
0
0
0
0
0
1
0.246914
false
0
0.08642
0
0.469136
0.049383
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
1
0
0
0
0
0
0
0
2
19310709fccc926261a99f530ec7e2d84e44988f
3,142
py
Python
Drop7/test/Disk_Test.py
SanderP99/Drop7
b11c2590d3cc1e311fb34a4635a1f6c075d9cb59
[ "MIT" ]
null
null
null
Drop7/test/Disk_Test.py
SanderP99/Drop7
b11c2590d3cc1e311fb34a4635a1f6c075d9cb59
[ "MIT" ]
null
null
null
Drop7/test/Disk_Test.py
SanderP99/Drop7
b11c2590d3cc1e311fb34a4635a1f6c075d9cb59
[ "MIT" ]
null
null
null
# import Drop7.Board as Board import Drop7.Disk as Disk def test_Is_Proper_Disk__Legal_Case(score, max_score): """Function is_proper_disk: given disk is proper disk.""" max_score.value += 1 try: assert Disk.is_proper_disk(4, Disk.init_disk(Disk.VISIBLE, 4)) assert Disk.is_proper_disk(4, Disk.init_disk(Disk.CRACKED, 1)) score.value += 1 except: pass def test_Is_Proper_Disk__Illegal_State(score, max_score): """Function is_proper_disk: illegal state.""" max_score.value += 1 try: assert not Disk.is_proper_disk(4, Disk.init_disk(("ABC",), 4)) score.value += 1 except: pass def test_Is_Proper_Disk__Illegal_Value(score, max_score): """Function is_proper_disk: illegal value.""" max_score.value += 1 try: assert not Disk.is_proper_disk(4, Disk.init_disk(Disk.VISIBLE, 5)) score.value += 1 except: pass def test_Init_Disk__Single_Case(score,max_score): """Function init_disk: single case.""" max_score.value += 1 try: disk = Disk.init_disk(Disk.VISIBLE,4) assert Disk.get_state(disk) == Disk.VISIBLE assert Disk.get_value(disk) == 4 score.value += 1 except: pass def test_Get_Random_Disk__Single_Case(score,max_score): """Function get_random_disk: single case.""" max_score.value += 1 try: for i in range(1,1000): disk = Disk.get_random_disk(7,{Disk.VISIBLE,Disk.WRAPPED}) assert Disk.get_state(disk) in {Disk.VISIBLE,Disk.WRAPPED} assert 1 <= Disk.get_value(disk) <= 7 score.value += 1 except: pass def test_Set_State(score, max_score): """Function set_state: single case.""" max_score.value += 1 try: disk = Disk.init_disk(Disk.CRACKED,5) Disk.set_state(disk, Disk.VISIBLE) assert Disk.get_state(disk) == Disk.VISIBLE score.value += 1 except: pass def test_Set_Value(score, max_score): """Function set_value: single case.""" max_score.value += 1 try: disk = Disk.init_disk(Disk.CRACKED,5) Disk.set_value(disk, 8) assert Disk.get_value(disk) == 8 score.value += 1 except: pass def test_Get_Disk_Copy(score, max_score): """Function get_disk_copy: single case.""" max_score.value += 3 try: disk = Disk.init_disk(Disk.CRACKED,5) copy = Disk.get_disk_copy(disk) assert Disk.get_state(copy) == Disk.get_state(disk) assert Disk.get_value(copy) == Disk.get_value(disk) # Checking that a new disk has been returned. Disk.set_value(disk,Disk.get_value(disk)+100) assert Disk.get_value(copy) == Disk.get_value(disk)-100 score.value += 3 except: pass disk_test_functions = \ { test_Is_Proper_Disk__Legal_Case, test_Is_Proper_Disk__Illegal_State, test_Is_Proper_Disk__Illegal_Value, test_Init_Disk__Single_Case, test_Get_Random_Disk__Single_Case, test_Set_State, test_Set_Value, test_Get_Disk_Copy }
26.854701
74
0.638765
449
3,142
4.160356
0.11804
0.068522
0.089936
0.089936
0.807816
0.655246
0.566381
0.448608
0.292827
0.252141
0
0.020051
0.253978
3,142
116
75
27.086207
0.776877
0.120624
0
0.518072
0
0
0.001103
0
0
0
0
0
0.156627
1
0.096386
false
0.096386
0.012048
0
0.108434
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
19455519ed74bb43e4ac991488c150b0c157ddd6
5,247
py
Python
sportradar/NFL.py
scrambldchannel/SportradarAPIs
e42e128313647d51784b6f1f3aa201b07fca0a08
[ "MIT" ]
33
2018-07-05T17:07:06.000Z
2022-02-05T16:32:19.000Z
sportradar/NFL.py
scrambldchannel/SportradarAPIs
e42e128313647d51784b6f1f3aa201b07fca0a08
[ "MIT" ]
6
2018-11-16T15:53:33.000Z
2021-06-26T23:04:33.000Z
sportradar/NFL.py
scrambldchannel/SportradarAPIs
e42e128313647d51784b6f1f3aa201b07fca0a08
[ "MIT" ]
17
2018-08-08T08:10:49.000Z
2021-10-06T00:25:21.000Z
# Sportradar APIs # Copyright 2018 John W. Miller # See LICENSE for details. from sportradar.api import API class NFL(API): def __init__(self, api_key, format_='json', access_level='ot', version=2, timeout=5, sleep_time=1.5): super().__init__(api_key, format_, timeout, sleep_time) self.access_level = access_level self.version = version self.prefix = 'nfl-{level}{version}/'.format(level=self.access_level, version=self.version) def get_daily_change_log(self, year, month, day): """Obtain changes made to previously closed events, team rosters, or player profiles for a given day. """ path = "league/{year:4d}/{month:02d}/{day:02d}/changes".format( year=year, month=month, day=day) return self._make_request(self.prefix + path) def get_game_boxscore(self, game_id): """Obtain the scoring information for each team, including drive and play information for all scoring events. """ path = "games/{game_id}/boxscore".format(game_id=game_id) return self._make_request(self.prefix + path) def get_game_roster(self, game_id): """Obtain the roster information for each teams, as well as player profile da ta. """ path = "games/{game_id}/roster".format(game_id=game_id) return self._make_request(self.prefix + path) def get_game_statistics(self, game_id): """Obtain team and player level game statistics for each team.""" path = "games/{game_id}/statistics".format(game_id=game_id) return self._make_request(self.prefix + path) def get_league_hierarchy(self): """Obtain the complete league hierarchy.""" path = "league/hierarchy".format() return self._make_request(self.prefix + path) def get_play_by_play(self, game_id): """Obtain complete play-by-play narrative.""" path = "games/{game_id}/pbp".format(game_id=game_id) return self._make_request(self.prefix + path) def get_player_participation(self, game_id): """Obtain player participation for a given game.""" path = "plays/{game_id}/participation".format(game_id=game_id) return self._make_request(self.prefix + path) def get_player_profile(self, player_id): """Obtain complete player biographical information.""" path = "players/{player_id}/profile".format(player_id=player_id) return self._make_request(self.prefix + path) def get_schedule(self, year, nfl_season): """Obtain complete schedule information.""" path = "games/{year:4d}/{nfl_season}/schedule".format( year=year, nfl_season=nfl_season) return self._make_request(self.prefix + path) def get_seasonal_statistics(self, year, nfl_season, team_id): """Obtain complete team and player seasonal statistics.""" path = "seasontd/{year:4d}/{nfl_season}/teams/{team_id}/statistics".format( year=year, nfl_season=nfl_season, team_id=team_id) return self._make_request(self.prefix + path) def get_standings(self, year): """Obtain standings information for each team.""" path = "seasontd/{year:4d}/standings".format(year=year) return self._make_request(self.prefix + path) def get_team_profile(self, team_id): """Obtain franchise team information.""" path = "teams/{team_id}/profile".format(team_id=team_id) return self._make_request(self.prefix + path) def get_team_roster(self, team_id): """Obtain the complete roster of players for a given team""" path = "teams/{team_id}/full_roster".format(team_id=team_id) return self._make_request(self.prefix + path) def get_weekly_schedule(self, year, nfl_season, nfl_season_week): """Obtain schedules for the NFL for a given week. Pre-Season (PRE) valid weeks 1-4, Regular Season (REG) weeks 1-17, Post-Season (PST) weeks 1-4. """ path = "games/{year:4d}/{nfl_season}/{nfl_season_week}/schedule".format( year=year, nfl_season=nfl_season, nfl_season_week=nfl_season_week) return self._make_request(self.prefix + path) def get_weekly_injuries(self, year, nfl_season, nfl_season_week): """Obtain injuries for the NFL for a given week. Pre-Season (PRE) valid weeks 1-4, Regular Season (REG) weeks 1-17, Post-Season (PST) weeks 1-4. """ path = "seasontd/{year:4d}/{nfl_season}/{nfl_season_week}/injuries".format( year=year, nfl_season=nfl_season, nfl_season_week=nfl_season_week) return self._make_request(self.prefix + path) def get_weekly_depth_charts(self, year, nfl_season, nfl_season_week): """Obtain depth charts for the NFL for a given week. Pre-Season (PRE) valid weeks 1-4, Regular Season (REG) weeks 1-17, Post-Season (PST) weeks 1-4. """ path = "seasontd/{year:4d}/{nfl_season}/{nfl_season_week}/depth_charts".format( year=year, nfl_season=nfl_season, nfl_season_week=nfl_season_week) return self._make_request(self.prefix + path)
45.232759
90
0.658853
714
5,247
4.610644
0.161064
0.087485
0.068044
0.102066
0.519745
0.498177
0.481166
0.46294
0.415553
0.390644
0
0.00984
0.225272
5,247
115
91
45.626087
0.8
0.237278
0
0.301587
0
0
0.154008
0.143196
0
0
0
0
0
1
0.269841
false
0
0.015873
0
0.555556
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
194c8b5cc1cd58612c803208f1241b2813f11d98
9,523
py
Python
pysnmp/CISCO-IETF-PW-FR-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/CISCO-IETF-PW-FR-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/CISCO-IETF-PW-FR-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module CISCO-IETF-PW-FR-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-IETF-PW-FR-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:43:46 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion") DlciNumber, = mibBuilder.importSymbols("CISCO-FRAME-RELAY-MIB", "DlciNumber") CpwVcIndexType, = mibBuilder.importSymbols("CISCO-IETF-PW-TC-MIB", "CpwVcIndexType") ciscoExperiment, = mibBuilder.importSymbols("CISCO-SMI", "ciscoExperiment") InterfaceIndexOrZero, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndexOrZero") NotificationGroup, ModuleCompliance, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance", "ObjectGroup") MibIdentifier, Counter32, ObjectIdentity, Integer32, TimeTicks, IpAddress, NotificationType, ModuleIdentity, Counter64, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, Gauge32, Unsigned32, iso = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "Counter32", "ObjectIdentity", "Integer32", "TimeTicks", "IpAddress", "NotificationType", "ModuleIdentity", "Counter64", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "Gauge32", "Unsigned32", "iso") RowStatus, TextualConvention, StorageType, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "TextualConvention", "StorageType", "DisplayString") cpwVcFrMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 10, 112)) cpwVcFrMIB.setRevisions(('2003-12-16 00:00',)) if mibBuilder.loadTexts: cpwVcFrMIB.setLastUpdated('200312160000Z') if mibBuilder.loadTexts: cpwVcFrMIB.setOrganization('Cisco Systems, Inc.') cpwVcFrNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 112, 0)) cpwVcFrObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 112, 1)) cpwVcFrConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 112, 2)) cpwVcFrTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 112, 1, 1), ) if mibBuilder.loadTexts: cpwVcFrTable.setStatus('current') cpwVcFrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 112, 1, 1, 1), ).setIndexNames((0, "CISCO-IETF-PW-FR-MIB", "cpwVcFrPwVcIndex")) if mibBuilder.loadTexts: cpwVcFrEntry.setStatus('current') cpwVcFrPwVcIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 112, 1, 1, 1, 1), CpwVcIndexType()) if mibBuilder.loadTexts: cpwVcFrPwVcIndex.setStatus('current') cpwVcFrIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 112, 1, 1, 1, 2), InterfaceIndexOrZero()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcFrIfIndex.setStatus('current') cpwVcFrDlci = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 112, 1, 1, 1, 3), DlciNumber()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcFrDlci.setStatus('current') cpwVcFrAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 112, 1, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("up", 1), ("down", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcFrAdminStatus.setStatus('current') cpwVcFrOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 112, 1, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("active", 1), ("inactive", 2), ("unknown", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcFrOperStatus.setStatus('current') cpwVcFrPw2FrOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 112, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("active", 1), ("inactive", 2), ("unknown", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcFrPw2FrOperStatus.setStatus('current') cpwVcFrRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 112, 1, 1, 1, 7), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcFrRowStatus.setStatus('current') cpwVcFrStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 112, 1, 1, 1, 8), StorageType()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcFrStorageType.setStatus('current') cpwVcFrPMTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 112, 1, 2), ) if mibBuilder.loadTexts: cpwVcFrPMTable.setStatus('current') cpwVcFrPMEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 112, 1, 2, 1), ).setIndexNames((0, "CISCO-IETF-PW-FR-MIB", "cpwVcFrPMPwVcIndex")) if mibBuilder.loadTexts: cpwVcFrPMEntry.setStatus('current') cpwVcFrPMPwVcIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 112, 1, 2, 1, 1), CpwVcIndexType()) if mibBuilder.loadTexts: cpwVcFrPMPwVcIndex.setStatus('current') cpwVcFrPMIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 112, 1, 2, 1, 2), InterfaceIndexOrZero()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcFrPMIfIndex.setStatus('current') cpwVcFrPMAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 112, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("up", 1), ("down", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcFrPMAdminStatus.setStatus('current') cpwVcFrPMOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 112, 1, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("active", 1), ("inactive", 2), ("unknown", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcFrPMOperStatus.setStatus('current') cpwVcFrPMPw2FrOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 112, 1, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("active", 1), ("inactive", 2), ("unknown", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcFrPMPw2FrOperStatus.setStatus('current') cpwVcFrPMRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 112, 1, 2, 1, 6), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcFrPMRowStatus.setStatus('current') cpwVcFrPMStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 112, 1, 2, 1, 7), StorageType()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcFrPMStorageType.setStatus('current') cpwVcFrCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 112, 2, 1)) cpwVcFrGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 112, 2, 2)) cpwVcFrFullCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 10, 112, 2, 1, 1)).setObjects(("CISCO-IETF-PW-FR-MIB", "cpwVcFrGroup"), ("CISCO-IETF-PW-FR-MIB", "cpwVcFrPMGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cpwVcFrFullCompliance = cpwVcFrFullCompliance.setStatus('current') cpwVcFrReadOnlyCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 10, 112, 2, 1, 2)).setObjects(("CISCO-IETF-PW-FR-MIB", "cpwVcFrGroup"), ("CISCO-IETF-PW-FR-MIB", "cpwVcFrPMGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cpwVcFrReadOnlyCompliance = cpwVcFrReadOnlyCompliance.setStatus('current') cpwVcFrGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 112, 2, 2, 1)).setObjects(("CISCO-IETF-PW-FR-MIB", "cpwVcFrIfIndex"), ("CISCO-IETF-PW-FR-MIB", "cpwVcFrDlci"), ("CISCO-IETF-PW-FR-MIB", "cpwVcFrAdminStatus"), ("CISCO-IETF-PW-FR-MIB", "cpwVcFrOperStatus"), ("CISCO-IETF-PW-FR-MIB", "cpwVcFrPw2FrOperStatus"), ("CISCO-IETF-PW-FR-MIB", "cpwVcFrRowStatus"), ("CISCO-IETF-PW-FR-MIB", "cpwVcFrStorageType")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cpwVcFrGroup = cpwVcFrGroup.setStatus('current') cpwVcFrPMGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 112, 2, 2, 2)).setObjects(("CISCO-IETF-PW-FR-MIB", "cpwVcFrPMIfIndex"), ("CISCO-IETF-PW-FR-MIB", "cpwVcFrPMAdminStatus"), ("CISCO-IETF-PW-FR-MIB", "cpwVcFrPMOperStatus"), ("CISCO-IETF-PW-FR-MIB", "cpwVcFrPMPw2FrOperStatus"), ("CISCO-IETF-PW-FR-MIB", "cpwVcFrPMRowStatus"), ("CISCO-IETF-PW-FR-MIB", "cpwVcFrPMStorageType")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cpwVcFrPMGroup = cpwVcFrPMGroup.setStatus('current') mibBuilder.exportSymbols("CISCO-IETF-PW-FR-MIB", cpwVcFrPMStorageType=cpwVcFrPMStorageType, cpwVcFrPMPwVcIndex=cpwVcFrPMPwVcIndex, cpwVcFrGroups=cpwVcFrGroups, cpwVcFrConformance=cpwVcFrConformance, cpwVcFrOperStatus=cpwVcFrOperStatus, cpwVcFrPMAdminStatus=cpwVcFrPMAdminStatus, cpwVcFrIfIndex=cpwVcFrIfIndex, cpwVcFrTable=cpwVcFrTable, cpwVcFrAdminStatus=cpwVcFrAdminStatus, cpwVcFrPMEntry=cpwVcFrPMEntry, cpwVcFrPMRowStatus=cpwVcFrPMRowStatus, cpwVcFrPwVcIndex=cpwVcFrPwVcIndex, cpwVcFrPMPw2FrOperStatus=cpwVcFrPMPw2FrOperStatus, cpwVcFrRowStatus=cpwVcFrRowStatus, cpwVcFrEntry=cpwVcFrEntry, cpwVcFrMIB=cpwVcFrMIB, cpwVcFrObjects=cpwVcFrObjects, cpwVcFrGroup=cpwVcFrGroup, cpwVcFrFullCompliance=cpwVcFrFullCompliance, cpwVcFrCompliances=cpwVcFrCompliances, cpwVcFrReadOnlyCompliance=cpwVcFrReadOnlyCompliance, cpwVcFrPw2FrOperStatus=cpwVcFrPw2FrOperStatus, cpwVcFrPMTable=cpwVcFrPMTable, cpwVcFrPMOperStatus=cpwVcFrPMOperStatus, cpwVcFrDlci=cpwVcFrDlci, cpwVcFrPMGroup=cpwVcFrPMGroup, cpwVcFrNotifications=cpwVcFrNotifications, PYSNMP_MODULE_ID=cpwVcFrMIB, cpwVcFrStorageType=cpwVcFrStorageType, cpwVcFrPMIfIndex=cpwVcFrPMIfIndex)
119.0375
1,132
0.748609
1,108
9,523
6.43231
0.148014
0.008699
0.012207
0.016276
0.469342
0.408587
0.358636
0.350779
0.3244
0.322436
0
0.069954
0.084322
9,523
79
1,133
120.544304
0.747362
0.035073
0
0.057143
0
0
0.191721
0.012092
0
0
0
0
0
1
0
false
0
0.142857
0
0.142857
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
1953dea348e57ea12a9ad8bb64e5c7842c0eba20
37,416
py
Python
pysnmp-with-texts/CIRCUIT-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/CIRCUIT-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/CIRCUIT-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 CIRCUIT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CIRCUIT-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:49:40 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ValueRangeConstraint, ValueSizeConstraint, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsIntersection", "SingleValueConstraint") circuit, coriolisMibs = mibBuilder.importSymbols("CORIOLIS-MIB", "circuit", "coriolisMibs") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, IpAddress, Integer32, iso, Gauge32, Counter64, MibIdentifier, NotificationType, TimeTicks, Unsigned32, Counter32, Bits, NotificationType, ModuleIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "IpAddress", "Integer32", "iso", "Gauge32", "Counter64", "MibIdentifier", "NotificationType", "TimeTicks", "Unsigned32", "Counter32", "Bits", "NotificationType", "ModuleIdentity") DisplayString, TruthValue, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TruthValue", "TextualConvention") circuitMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 5812, 6, 1)) if mibBuilder.loadTexts: circuitMIB.setLastUpdated('0010300000Z') if mibBuilder.loadTexts: circuitMIB.setOrganization('Coriolis Networks') if mibBuilder.loadTexts: circuitMIB.setContactInfo(' Srivathsan Srinivasagopalan Postal: 330 Codman Hill Road, Boxboro MA, 01719. Tel: +1 978 264 1904 Fax: +1 978 264 1929 E-mail: [email protected]') if mibBuilder.loadTexts: circuitMIB.setDescription(' The MIB module for transport channels ') circuitLoadBalanceInterval = MibScalar((1, 3, 6, 1, 4, 1, 5812, 6, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitLoadBalanceInterval.setStatus('current') if mibBuilder.loadTexts: circuitLoadBalanceInterval.setDescription('The default load balancing schedule is to examine 1 circuit every 3 minutes at the GNE. Regardless of whether the circuit is moved to a better ring path or not, the next circuit is not examined until another 3 minutes (default) had expired. The duration of the load balance timer will be configurable from a range of 0 to 65535 seconds. Using a value of 0 will turn off load balancing.') circuitLoadBalanceNumPerInterval = MibScalar((1, 3, 6, 1, 4, 1, 5812, 6, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10))).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitLoadBalanceNumPerInterval.setStatus('current') if mibBuilder.loadTexts: circuitLoadBalanceNumPerInterval.setDescription('Indicates the number of circuits being loadbalanced in a fixed interval. The maximum value is 10 circuits per second.') circuitOldIpAddrToSwap = MibScalar((1, 3, 6, 1, 4, 1, 5812, 6, 4), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitOldIpAddrToSwap.setStatus('current') if mibBuilder.loadTexts: circuitOldIpAddrToSwap.setDescription('When a chassis running several circuits has to be moved to a new location with a new different IpAddress, then all the associated circuits has to be properly modified with the new IpAddress. This object will specify the old-IpAddress. This process is almost transparent to the user, but, he will notice traffic loss due to the circuits being brought down and up.') circuitNewIpAddrToSwap = MibScalar((1, 3, 6, 1, 4, 1, 5812, 6, 5), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitNewIpAddrToSwap.setStatus('current') if mibBuilder.loadTexts: circuitNewIpAddrToSwap.setDescription('When a chassis running several circuits has to be moved to a new location with a new different IpAddress, then all the associated circuits has to be properly modified with the new IpAddress. This object will specify the old-IpAddress. This process is almost transparent to the user, but, he will notice traffic loss due to the circuits being brought down and up.') circuitEventInterval = MibScalar((1, 3, 6, 1, 4, 1, 5812, 6, 6), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitEventInterval.setStatus('current') if mibBuilder.loadTexts: circuitEventInterval.setDescription('For any circuit related events, events are generated at a specific time interval. circuitEventInterval specifies that. The default value is 1 second.') circuitEventNumPerInterval = MibScalar((1, 3, 6, 1, 4, 1, 5812, 6, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 10))).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitEventNumPerInterval.setStatus('current') if mibBuilder.loadTexts: circuitEventNumPerInterval.setDescription('This object specifies the number of events generated per interval. The default is 10 per second.') circuitTable = MibTable((1, 3, 6, 1, 4, 1, 5812, 6, 8), ) if mibBuilder.loadTexts: circuitTable.setStatus('current') if mibBuilder.loadTexts: circuitTable.setDescription('A table containing information about the transport channels in the system') circuitEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1), ).setIndexNames((0, "CIRCUIT-MIB", "circuitSrcIpAddr"), (0, "CIRCUIT-MIB", "circuitSrcInterfaceNum"), (0, "CIRCUIT-MIB", "circuitSrcConnectionID")) if mibBuilder.loadTexts: circuitEntry.setStatus('current') if mibBuilder.loadTexts: circuitEntry.setDescription('Entry in the table for a single transport channel') circuitSrcIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 1), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitSrcIpAddr.setStatus('current') if mibBuilder.loadTexts: circuitSrcIpAddr.setDescription('IP address of the source circuit endpoint.') circuitSrcInterfaceNum = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 2), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitSrcInterfaceNum.setStatus('current') if mibBuilder.loadTexts: circuitSrcInterfaceNum.setDescription('The interface number of the source circuit endpoint.') circuitSrcConnectionID = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 3), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitSrcConnectionID.setStatus('current') if mibBuilder.loadTexts: circuitSrcConnectionID.setDescription('Connection Identifier of the source circuit endpoint. Based on the protocol type, further information may be required to completely specify a circuit on a channel. For example, Ethernet VLAN requires a VLAN Id, Frame Relay requires a DLCI and ATM requires VPI and VCI. For ATM, this field is encoded as 12 bits of VPI and 16 bits of VCI.') circuitSrcDescString = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 4), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitSrcDescString.setStatus('current') if mibBuilder.loadTexts: circuitSrcDescString.setDescription('Textual description of the source side of the circuit endpoint.') circuitDestIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 5), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitDestIpAddr.setStatus('current') if mibBuilder.loadTexts: circuitDestIpAddr.setDescription('IP address of the destination circuit endpoint.') circuitDestInterfaceNum = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 6), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitDestInterfaceNum.setStatus('current') if mibBuilder.loadTexts: circuitDestInterfaceNum.setDescription('The interface number of the destination circuit endpoint.') circuitDestConnectionID = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 7), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitDestConnectionID.setStatus('current') if mibBuilder.loadTexts: circuitDestConnectionID.setDescription('Connection Identifier of the destination circuit endpoint. Based on the protocol type, further information may be required to completely specify a circuit on a channel. For example, Ethernet VLAN requires a VLAN Id, Frame Relay requires a DLCI and ATM requires VPI and VCI. For ATM, this field is encoded as 12 bits of VPI and 16 bits of VCI.') circuitDestDescString = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 8), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitDestDescString.setStatus('current') if mibBuilder.loadTexts: circuitDestDescString.setDescription('Textual description of the destination side of the circuit endpoint.') circuitName = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 9), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitName.setStatus('current') if mibBuilder.loadTexts: circuitName.setDescription('CircuitName is a unique name given to a circuit.') circuitID = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 10), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitID.setStatus('current') if mibBuilder.loadTexts: circuitID.setDescription('CircuitID is a unique ID given to a circuit. It is equal to the TC-ID in the PM.') circuitRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("active", 1), ("notInService", 2), ("notReady", 3), ("createAndGo", 4), ("createAndWait", 5), ("destroy", 6)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitRowStatus.setStatus('current') if mibBuilder.loadTexts: circuitRowStatus.setDescription('Indicates if a row has been created or deleted. See SNMPv2-TC for complete description.') circuitReasonText = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 12), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitReasonText.setStatus('current') if mibBuilder.loadTexts: circuitReasonText.setDescription('Provides the reason for the error indicated.') circuitFailLocIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 13), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitFailLocIpAddr.setStatus('current') if mibBuilder.loadTexts: circuitFailLocIpAddr.setDescription('IP address of location where circuit failure code is encountered.') circuitFailLocSlot1 = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 26))).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitFailLocSlot1.setStatus('current') if mibBuilder.loadTexts: circuitFailLocSlot1.setDescription('Slot number where circuit failure code is encountered.') circuitFailLocPort1 = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitFailLocPort1.setStatus('current') if mibBuilder.loadTexts: circuitFailLocPort1.setDescription('Port number where circuit failure code is encountered.') circuitFailLocInterfaceNum1 = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 16), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitFailLocInterfaceNum1.setStatus('current') if mibBuilder.loadTexts: circuitFailLocInterfaceNum1.setDescription('Interface number where circuit failure code is encountered.') circuitFailLocConnectionID1 = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 17), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitFailLocConnectionID1.setStatus('current') if mibBuilder.loadTexts: circuitFailLocConnectionID1.setDescription('Connection Identifier of the failed circuit endpoint.') circuitFailLocSlot2 = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 26))).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitFailLocSlot2.setStatus('current') if mibBuilder.loadTexts: circuitFailLocSlot2.setDescription('Slot number where circuit failure code is encountered.') circuitFailLocPort2 = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitFailLocPort2.setStatus('current') if mibBuilder.loadTexts: circuitFailLocPort2.setDescription('Port number where circuit failure code is encountered.') circuitFailLocInterfaceNum2 = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 20), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitFailLocInterfaceNum2.setStatus('current') if mibBuilder.loadTexts: circuitFailLocInterfaceNum2.setDescription('Interface number where circuit failure code is encountered.') circuitFailLocConnectionID2 = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 21), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitFailLocConnectionID2.setStatus('current') if mibBuilder.loadTexts: circuitFailLocConnectionID2.setDescription('Connection Identifier of the failed circuit endpoint.') circuitEndPoint1Protocol = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("ethernet", 1), ("frameRelay", 2), ("atm", 3), ("vt", 4), ("axData", 5), ("axTdm", 6), ("isl", 7)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitEndPoint1Protocol.setStatus('current') if mibBuilder.loadTexts: circuitEndPoint1Protocol.setDescription('Protocol determines the connectionID.') circuitFwdTDType = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 23), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("ethernet", 1), ("frameRelay", 2), ("tdm", 3), ("atm-cbr", 4), ("atm-vbr-rt", 5), ("atm-vbr-nrt", 6), ("atm-vbr-ubr", 7)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitFwdTDType.setStatus('current') if mibBuilder.loadTexts: circuitFwdTDType.setDescription("Specifies the traffic descriptor type associated with the forward traffic descriptor parameters. The forward direction is 'into the network' from the circuit endpoint. TDType is independent of the end-point protocol.") circuitFwdTDParam1 = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 24), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitFwdTDParam1.setStatus('current') if mibBuilder.loadTexts: circuitFwdTDParam1.setDescription('Parameter 1 of the forward traffic descriptor of type circuitFwdTdType. For type Ethernet, this value corresponds to CIR. For type Frame Relay, this value corresponds to CIR. For type ATM-CBR, this value corresponds to PCR(0+1).') circuitFwdTDParam2 = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 25), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitFwdTDParam2.setStatus('current') if mibBuilder.loadTexts: circuitFwdTDParam2.setDescription('Parameter 2 of the forward traffic descriptor of type circuitFwdTdType. For type Ethernet, this value corresponds to Bc. For type Frame Relay, this value corresponds to Bc.') circuitFwdTDParam3 = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 26), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitFwdTDParam3.setStatus('current') if mibBuilder.loadTexts: circuitFwdTDParam3.setDescription('Parameter 3 of the forward traffic descriptor of type circuitFwdTdType. For type Ethernet, this value corresponds to Be. For type Frame Relay, this value corresponds to Be.') circuitFwdTDParam4 = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 27), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitFwdTDParam4.setStatus('current') if mibBuilder.loadTexts: circuitFwdTDParam4.setDescription('Parameter 4 of the forward traffic descriptor of type circuitFwdTdType.') circuitEndPoint2Protocol = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 28), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("ethernet", 1), ("frameRelay", 2), ("atm", 3), ("vt", 4), ("axData", 5), ("axTdm", 6), ("isl", 7)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitEndPoint2Protocol.setStatus('current') if mibBuilder.loadTexts: circuitEndPoint2Protocol.setDescription('Protocol determines the connectionID.') circuitBwdTDType = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 29), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("ethernet", 1), ("frameRelay", 2), ("tdm", 3), ("atm-cbr", 4), ("atm-vbr-rt", 5), ("atm-vbr-nrt", 6), ("atm-vbr-ubr", 7)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitBwdTDType.setStatus('current') if mibBuilder.loadTexts: circuitBwdTDType.setDescription("Specifies the traffic descriptor type associated with the backward traffic descriptor parameters. The backward direction is 'out of the network' from the circuit endpoint. TDType is independent to of the end-point protocol.") circuitBwdTDParam1 = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 30), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitBwdTDParam1.setStatus('current') if mibBuilder.loadTexts: circuitBwdTDParam1.setDescription('Parameter 1 of the backward traffic descriptor of type circuitBwdTdType. For type Ethernet, this value corresponds to CIR. For type Frame Relay, this value corresponds to CIR. For type ATM-CBR, this value corresponds to PCR(0+1).') circuitBwdTDParam2 = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 31), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitBwdTDParam2.setStatus('current') if mibBuilder.loadTexts: circuitBwdTDParam2.setDescription('Parameter 2 of the backward traffic descriptor of type circuitBwdTdType. For type Ethernet, this value corresponds to Bc. For type Frame Relay, this value corresponds to Bc.') circuitBwdTDParam3 = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 32), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitBwdTDParam3.setStatus('current') if mibBuilder.loadTexts: circuitBwdTDParam3.setDescription('Parameter 3 of the backward traffic descriptor of type circuitBwdTdType. For type Ethernet, this value corresponds to Be. For type Frame Relay, this value corresponds to Be.') circuitBwdTDParam4 = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 33), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitBwdTDParam4.setStatus('current') if mibBuilder.loadTexts: circuitBwdTDParam4.setDescription('Parameter 4 of the backward traffic descriptor of type circuitBwdTdType.') circuitClassOfService = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 34), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitClassOfService.setStatus('current') if mibBuilder.loadTexts: circuitClassOfService.setDescription('Specifies the class of service for Data or non-TDM circuits. This value is in the range of 0-7 where 1 has the highest priority and 7 has the lowest.') circuitAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 35), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2), ("enabledButNotUsed", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitAdminState.setStatus('current') if mibBuilder.loadTexts: circuitAdminState.setDescription("Administrative state of the circuit. Circuits in the disabled state do not consume network resources such as bandwidth. The network continuously attempts to establish circuits until successful while in the enabled state. The 'enabledButNotUsed' state tells that the transport segment is established and network resources are assigned to it, but, traffic is not allowed to pass though it.") circuitOperState = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 36), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("test", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitOperState.setStatus('current') if mibBuilder.loadTexts: circuitOperState.setDescription('Aperational state of the circuit. Circuits in the disabled state do not consume network resources such as bandwidth. The network continuously attempts to establish circuits until successful while in the enabled state.') circuitTimeSinceStatusChange = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 37), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitTimeSinceStatusChange.setStatus('current') if mibBuilder.loadTexts: circuitTimeSinceStatusChange.setDescription('Gives the time (in seconds) since the most recent status change.') circuitSetupPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 38), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitSetupPriority.setStatus('current') if mibBuilder.loadTexts: circuitSetupPriority.setDescription('If there are insufficient network resources for establishing all transport channels, this field specifies the priority of the transport channel.') circuitHoldPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 39), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitHoldPriority.setStatus('current') if mibBuilder.loadTexts: circuitHoldPriority.setDescription('If a number of transport channels of a low Setup Priority need to be cleared in order to release resources allowing for a higher priority (Setup) transport channel to be established, this field specifies the Hold priority where low Hold priority transport channels are cleared before higher Hold priority transport channels.') circuitIsRedundancyReqd = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 40), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitIsRedundancyReqd.setStatus('current') if mibBuilder.loadTexts: circuitIsRedundancyReqd.setDescription("Specifies if the circuit is to be established over rings that are logically configured as 'protected'. A protected ring could physically be in a fault state where one fiber has failed. A circuit that requires redundancy will be established over rings logically configured as 'protected' even though the current physical state of a protected ring may be in a fault state.") circuitPreferredEP1OptSlot = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 41), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 26))).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitPreferredEP1OptSlot.setStatus('current') if mibBuilder.loadTexts: circuitPreferredEP1OptSlot.setDescription('If the circuit spans one or two rings, this is the slot number of the first preferred ring. Preferred rings allow a manual overide of the routed circuit path.') circuitPreferredEP1OptPort = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 42), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitPreferredEP1OptPort.setStatus('current') if mibBuilder.loadTexts: circuitPreferredEP1OptPort.setDescription('If the circuit spans one or two rings, this is the port number of the first preferred ring.') circuitPreferredEP1OptVport = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 43), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitPreferredEP1OptVport.setStatus('current') if mibBuilder.loadTexts: circuitPreferredEP1OptVport.setDescription('If the circuit spans one or two rings, this is the lambda number of the first preferred ring.') circuitPreferredEP2OptSlot = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 44), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 26))).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitPreferredEP2OptSlot.setStatus('current') if mibBuilder.loadTexts: circuitPreferredEP2OptSlot.setDescription('If the circuit spans two rings, this is the slot number of the second preferred ring. Preferred rings allow a manual overide of the routed circuit path.') circuitPreferredEP2OptPort = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 45), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitPreferredEP2OptPort.setStatus('current') if mibBuilder.loadTexts: circuitPreferredEP2OptPort.setDescription('If the circuit spans two rings, this is the port number of the second preferred ring.') circuitPreferredEP2OptVport = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 46), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitPreferredEP2OptVport.setStatus('current') if mibBuilder.loadTexts: circuitPreferredEP2OptVport.setDescription('If the circuit spans two rings, this is the lambda number of the second preferred ring.') circuitUseAlternateRing = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 47), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("yes", 1), ("no", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: circuitUseAlternateRing.setStatus('current') if mibBuilder.loadTexts: circuitUseAlternateRing.setDescription('Allows operator to specify whether an alternate ring can be used if the preferred ring(s) fail. This requires the ability to load-balance back onto the preferred ring once it becomes available. The format for this field is Boolean.') circuitInFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 48), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitInFrames.setStatus('current') if mibBuilder.loadTexts: circuitInFrames.setDescription('Number of frames received at the ingress point and passed on to the circuit.') circuitInDEFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 49), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitInDEFrames.setStatus('current') if mibBuilder.loadTexts: circuitInDEFrames.setDescription('Number of frames received at the ingress point and passed on to the circuit.') circuitInOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 50), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitInOctets.setStatus('current') if mibBuilder.loadTexts: circuitInOctets.setDescription('Number of octets received at the ingress point and passed on to the circuit.') circuitInDEOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 51), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitInDEOctets.setStatus('current') if mibBuilder.loadTexts: circuitInDEOctets.setDescription('Number of octets received at the ingress point and passed on to the circuit.') circuitInCLP0Cells = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 52), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitInCLP0Cells.setStatus('current') if mibBuilder.loadTexts: circuitInCLP0Cells.setDescription('Number of cells received at the ingress point and passed on to the circuit.') circuitInCLP1Cells = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 53), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitInCLP1Cells.setStatus('current') if mibBuilder.loadTexts: circuitInCLP1Cells.setDescription('Number of cells received at the ingress point and passed on to the circuit.') circuitInFramesDiscard = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 54), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitInFramesDiscard.setStatus('current') if mibBuilder.loadTexts: circuitInFramesDiscard.setDescription('Number of frames received at the ingress point but are discarded due to the non-conformance of the contract, i.e., it exceeds the traffic contract (BE).') circuitInDEFramesDiscard = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 55), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitInDEFramesDiscard.setStatus('current') if mibBuilder.loadTexts: circuitInDEFramesDiscard.setDescription('Number of frames received at the ingress point but are discarded due to the non-conformance of the contract, i.e., it exceeds the traffic contract (BE).') circuitInOctetsDiscard = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 56), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitInOctetsDiscard.setStatus('current') if mibBuilder.loadTexts: circuitInOctetsDiscard.setDescription('Number of octets received at the ingress point but are discarded due to the non-conformance of the contract, i.e., it exceeds the traffic contract (BE).') circuitInDEOctetsDiscard = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 57), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitInDEOctetsDiscard.setStatus('current') if mibBuilder.loadTexts: circuitInDEOctetsDiscard.setDescription('Number of octets received at the ingress point but are discarded due to the non-conformance of the contract, i.e., it exceeds the traffic contract (BE).') circuitInCLP0CellsDiscard = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 58), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitInCLP0CellsDiscard.setStatus('current') if mibBuilder.loadTexts: circuitInCLP0CellsDiscard.setDescription('Number of octets received at the ingress point but are discarded due to the non-conformance of the contract, i.e., it exceeds the traffic contract (BE).') circuitInCLP1CellsDiscard = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 59), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitInCLP1CellsDiscard.setStatus('current') if mibBuilder.loadTexts: circuitInCLP1CellsDiscard.setDescription('Number of octets received at the ingress point but are discarded due to the non-conformance of the contract, i.e., it exceeds the traffic contract (BE).') circuitInFramesTagged = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 60), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitInFramesTagged.setStatus('current') if mibBuilder.loadTexts: circuitInFramesTagged.setDescription('Number of tagged frames received. A tagged frame represents non-conforming frames to the contract (when CIR < frame contract < BE). In these frames, the DE (Discard Enable) is set. ') circuitInOctetsTagged = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 61), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitInOctetsTagged.setStatus('current') if mibBuilder.loadTexts: circuitInOctetsTagged.setDescription('Number of tagged octets received. A tagged octet represents non-conforming octet to the contract (when CIR < octet contract < BE).In these octets, the DE (Discard Enable) is set.') circuitInCLP0CellsTagged = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 62), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitInCLP0CellsTagged.setStatus('current') if mibBuilder.loadTexts: circuitInCLP0CellsTagged.setDescription('Number of tagged octets received. A tagged octet represents non-conforming octet to the contract (when CIR < octet contract < BE).In these octets, the DE (Discard Enable) is set.') circuitOutFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 63), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitOutFrames.setStatus('current') if mibBuilder.loadTexts: circuitOutFrames.setDescription('Number of frames sent out through the circuit.') circuitOutDEFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 64), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitOutDEFrames.setStatus('current') if mibBuilder.loadTexts: circuitOutDEFrames.setDescription('Number of frames sent out through the circuit.') circuitOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 65), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitOutOctets.setStatus('current') if mibBuilder.loadTexts: circuitOutOctets.setDescription('Number of octets sent out through the circuit.') circuitOutDEOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 66), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitOutDEOctets.setStatus('current') if mibBuilder.loadTexts: circuitOutDEOctets.setDescription('Number of octets sent out through the circuit.') circuitOutCLP0Cells = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 67), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitOutCLP0Cells.setStatus('current') if mibBuilder.loadTexts: circuitOutCLP0Cells.setDescription('Number of cells sent out through the circuit.') circuitOutCLP1Cells = MibTableColumn((1, 3, 6, 1, 4, 1, 5812, 6, 8, 1, 68), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: circuitOutCLP1Cells.setStatus('current') if mibBuilder.loadTexts: circuitOutCLP1Cells.setDescription('Number of cells sent out through the circuit.') circuitInactive = NotificationType((1, 3, 6, 1, 4, 1, 5812) + (0,24)).setObjects(("CIRCUIT-MIB", "circuitReasonText")) if mibBuilder.loadTexts: circuitInactive.setDescription('Indicates that the circuit became inactive and specifies the reason for it becoming inactive') circuitActive = NotificationType((1, 3, 6, 1, 4, 1, 5812) + (0,25)).setObjects(("CIRCUIT-MIB", "circuitReasonText")) if mibBuilder.loadTexts: circuitActive.setDescription('Indicates that the circuit became active') circuitLoadBalancing = NotificationType((1, 3, 6, 1, 4, 1, 5812) + (0,26)).setObjects(("CIRCUIT-MIB", "circuitReasonText")) if mibBuilder.loadTexts: circuitLoadBalancing.setDescription('Indicates that the circuit underwent load balancing') mibBuilder.exportSymbols("CIRCUIT-MIB", circuitEndPoint2Protocol=circuitEndPoint2Protocol, circuitInDEOctets=circuitInDEOctets, circuitID=circuitID, circuitInOctetsDiscard=circuitInOctetsDiscard, circuitInCLP1CellsDiscard=circuitInCLP1CellsDiscard, circuitInFrames=circuitInFrames, circuitFwdTDParam4=circuitFwdTDParam4, circuitPreferredEP1OptVport=circuitPreferredEP1OptVport, circuitInCLP1Cells=circuitInCLP1Cells, circuitMIB=circuitMIB, circuitInDEFrames=circuitInDEFrames, circuitBwdTDParam1=circuitBwdTDParam1, circuitInCLP0CellsTagged=circuitInCLP0CellsTagged, circuitEventNumPerInterval=circuitEventNumPerInterval, circuitSrcIpAddr=circuitSrcIpAddr, circuitFailLocPort2=circuitFailLocPort2, circuitFwdTDType=circuitFwdTDType, circuitDestInterfaceNum=circuitDestInterfaceNum, circuitSrcConnectionID=circuitSrcConnectionID, circuitRowStatus=circuitRowStatus, circuitFailLocInterfaceNum2=circuitFailLocInterfaceNum2, circuitInFramesTagged=circuitInFramesTagged, circuitInCLP0CellsDiscard=circuitInCLP0CellsDiscard, circuitOutOctets=circuitOutOctets, circuitFwdTDParam1=circuitFwdTDParam1, circuitOutDEOctets=circuitOutDEOctets, circuitFailLocSlot1=circuitFailLocSlot1, circuitFwdTDParam3=circuitFwdTDParam3, circuitPreferredEP2OptSlot=circuitPreferredEP2OptSlot, circuitInDEFramesDiscard=circuitInDEFramesDiscard, circuitBwdTDParam2=circuitBwdTDParam2, circuitBwdTDParam3=circuitBwdTDParam3, circuitDestDescString=circuitDestDescString, circuitLoadBalanceInterval=circuitLoadBalanceInterval, circuitFailLocPort1=circuitFailLocPort1, circuitSetupPriority=circuitSetupPriority, circuitActive=circuitActive, circuitIsRedundancyReqd=circuitIsRedundancyReqd, circuitInFramesDiscard=circuitInFramesDiscard, circuitAdminState=circuitAdminState, circuitPreferredEP1OptSlot=circuitPreferredEP1OptSlot, circuitSrcInterfaceNum=circuitSrcInterfaceNum, circuitBwdTDParam4=circuitBwdTDParam4, circuitBwdTDType=circuitBwdTDType, circuitFailLocConnectionID2=circuitFailLocConnectionID2, circuitPreferredEP1OptPort=circuitPreferredEP1OptPort, circuitName=circuitName, circuitOperState=circuitOperState, circuitClassOfService=circuitClassOfService, circuitInDEOctetsDiscard=circuitInDEOctetsDiscard, circuitFailLocIpAddr=circuitFailLocIpAddr, circuitInCLP0Cells=circuitInCLP0Cells, circuitOutDEFrames=circuitOutDEFrames, circuitOldIpAddrToSwap=circuitOldIpAddrToSwap, circuitFwdTDParam2=circuitFwdTDParam2, circuitDestConnectionID=circuitDestConnectionID, circuitLoadBalancing=circuitLoadBalancing, circuitDestIpAddr=circuitDestIpAddr, circuitInOctetsTagged=circuitInOctetsTagged, circuitUseAlternateRing=circuitUseAlternateRing, circuitHoldPriority=circuitHoldPriority, PYSNMP_MODULE_ID=circuitMIB, circuitInactive=circuitInactive, circuitFailLocInterfaceNum1=circuitFailLocInterfaceNum1, circuitReasonText=circuitReasonText, circuitEndPoint1Protocol=circuitEndPoint1Protocol, circuitNewIpAddrToSwap=circuitNewIpAddrToSwap, circuitFailLocConnectionID1=circuitFailLocConnectionID1, circuitOutFrames=circuitOutFrames, circuitPreferredEP2OptVport=circuitPreferredEP2OptVport, circuitLoadBalanceNumPerInterval=circuitLoadBalanceNumPerInterval, circuitTimeSinceStatusChange=circuitTimeSinceStatusChange, circuitOutCLP0Cells=circuitOutCLP0Cells, circuitTable=circuitTable, circuitPreferredEP2OptPort=circuitPreferredEP2OptPort, circuitFailLocSlot2=circuitFailLocSlot2, circuitSrcDescString=circuitSrcDescString, circuitEntry=circuitEntry, circuitOutCLP1Cells=circuitOutCLP1Cells, circuitEventInterval=circuitEventInterval, circuitInOctets=circuitInOctets)
146.729412
3,536
0.795836
4,434
37,416
6.715156
0.128778
0.064081
0.112141
0.010747
0.581763
0.435365
0.342233
0.32712
0.319261
0.278388
0
0.050678
0.09397
37,416
254
3,537
147.307087
0.82764
0.008446
0
0
0
0.1417
0.33531
0.002373
0
0
0
0
0
1
0
false
0.02834
0.02834
0
0.02834
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
1977d36fe2b99e051c145c78f7a06b38fad7e1e1
394
py
Python
admin_log_entries/settings.py
ataylor32/django-adminlogentries
6aa99b0444b3747369404bcaee4b50183f8194e0
[ "MIT" ]
5
2017-12-05T13:44:48.000Z
2021-07-29T14:04:57.000Z
admin_log_entries/settings.py
ataylor32/django-adminlogentries
6aa99b0444b3747369404bcaee4b50183f8194e0
[ "MIT" ]
null
null
null
admin_log_entries/settings.py
ataylor32/django-adminlogentries
6aa99b0444b3747369404bcaee4b50183f8194e0
[ "MIT" ]
null
null
null
from django.conf import settings default_settings = { 'has_module_permission_false': False, } ADMIN_LOG_ENTRIES_SETTINGS = {} def compute_settings(): for name, value in default_settings.items(): ADMIN_LOG_ENTRIES_SETTINGS[name] = value if hasattr(settings, 'ADMIN_LOG_ENTRIES'): ADMIN_LOG_ENTRIES_SETTINGS.update(settings.ADMIN_LOG_ENTRIES) compute_settings()
21.888889
69
0.756345
49
394
5.673469
0.469388
0.143885
0.269784
0.248201
0
0
0
0
0
0
0
0
0.15736
394
17
70
23.176471
0.837349
0
0
0
0
0
0.111675
0.068528
0
0
0
0
0
1
0.090909
false
0
0.090909
0
0.181818
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
199b9fe3c8a3ba98e7b1141db31d1f32f85abbd2
545
py
Python
manage.py
kojwangbora/elly-blog
95946ece071784fa5c15c21618011cbb97ebfc46
[ "MIT" ]
null
null
null
manage.py
kojwangbora/elly-blog
95946ece071784fa5c15c21618011cbb97ebfc46
[ "MIT" ]
null
null
null
manage.py
kojwangbora/elly-blog
95946ece071784fa5c15c21618011cbb97ebfc46
[ "MIT" ]
null
null
null
from app import create_app, db from flask_migrate import Migrate from app.models import User, Posts from flask_script import Manager,Server app = create_app() # manager = Manager(app) # manager.add_command('server', Server) # #Creating migration instance # migrate = Migrate(app, db) # manager.add_command('db',MigrateCommand) # # @manager.shell # @manager.shell_context_processor # def make_shell_context(): # return dict(db = db, User =User, Posts=Posts) # if __name__ == '__main__': # # manager.debug = True # app.run()
23.695652
51
0.717431
72
545
5.180556
0.444444
0.037534
0.091153
0
0
0
0
0
0
0
0
0
0.163303
545
23
52
23.695652
0.817982
0.638532
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.8
0
0.8
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
5fe6da3d5fdab2a2eb9fd6fc794811538cea5b7c
639
py
Python
lib/clock.py
greymistcube/racing_game_ai
7e5e6ec781eb3c98729d370cbcc0ab6ed053962f
[ "MIT" ]
null
null
null
lib/clock.py
greymistcube/racing_game_ai
7e5e6ec781eb3c98729d370cbcc0ab6ed053962f
[ "MIT" ]
null
null
null
lib/clock.py
greymistcube/racing_game_ai
7e5e6ec781eb3c98729d370cbcc0ab6ed053962f
[ "MIT" ]
null
null
null
import pygame import lib.common as common # initializing module pygame.init() class Clock: __instance = None # implementing this class as singleton def __new__(cls, *args, **kwargs): if cls.__instance is None: cls.__instance = super().__new__(cls) return cls.__instance else: raise Exception("only single instance is allowed") def __init__(self): self.clock = pygame.time.Clock() return def tick(self): self.clock.tick(common.settings.tickrate) return def get_FPS(self): return 1000 // max(1, self.clock.get_time())
22.034483
62
0.621283
77
639
4.87013
0.519481
0.088
0.069333
0
0
0
0
0
0
0
0
0.010917
0.283255
639
28
63
22.821429
0.80786
0.087637
0
0.105263
0
0
0.053448
0
0
0
0
0
0
1
0.210526
false
0
0.105263
0.052632
0.631579
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
5fe6e8bc747c5f980ad7fbb164a7c5c2ef4b9edf
231
py
Python
setup.py
powerd4/SNA_project
458dae1df4d198f6ce82062cd2e59f8408cbb3cf
[ "FTL" ]
null
null
null
setup.py
powerd4/SNA_project
458dae1df4d198f6ce82062cd2e59f8408cbb3cf
[ "FTL" ]
null
null
null
setup.py
powerd4/SNA_project
458dae1df4d198f6ce82062cd2e59f8408cbb3cf
[ "FTL" ]
null
null
null
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Social Network Analysis module group project 2020', author='Dean Power', license='', )
21
68
0.679654
28
231
5.535714
0.821429
0.154839
0
0
0
0
0
0
0
0
0
0.037634
0.194805
231
10
69
23.1
0.795699
0
0
0
0
0
0.290043
0
0
0
0
0
0
1
0
true
0
0.111111
0
0.111111
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
2
27004bc90d0396548daec8e9a418a7f70ae5efe9
4,597
py
Python
database_sanitizer/session.py
sharescape/python-database-sanitizer
560bf402e3896285980abb21a74d5be8d2da1698
[ "MIT" ]
37
2018-05-07T13:07:25.000Z
2022-02-07T18:58:10.000Z
database_sanitizer/session.py
sharescape/python-database-sanitizer
560bf402e3896285980abb21a74d5be8d2da1698
[ "MIT" ]
31
2018-04-27T13:16:28.000Z
2021-12-10T10:08:00.000Z
database_sanitizer/session.py
sharescape/python-database-sanitizer
560bf402e3896285980abb21a74d5be8d2da1698
[ "MIT" ]
15
2018-05-04T12:28:12.000Z
2022-02-17T09:27:58.000Z
""" API to sanitation session. Sanitation session allows having a state within a single sanitation process. One important thing stored to the session is a secret key which is generated to a new random value for each sanitation session, but it stays constant during the whole sanitation process. Its value is never revealed, so that it is possible to generate such one way hashes with it, that should not be redoable afterwards. I.e. during the sanitation session it's possible to do ``hash(C) -> H`` for any clear text C, but it is not possible to check if H is the hashed value of C after the sanitation session has ended. """ import hashlib import hmac import random import sys import threading from six import int2byte if sys.version_info >= (3, 6): from typing import Callable, Optional, Sequence # noqa SECRET_KEY_BITS = 128 _thread_local_storage = threading.local() def hash_text_to_int(value, bit_length=32): # type: (str, int) -> int """ Hash a text value to an integer. Generates an integer number based on the hash derived with `hash_text` from the given text value. :param bit_length: Number of bits to use from the hash value. :return: Integer value within ``0 <= result < 2**bit_length`` """ hash_value = hash_text(value) return int(hash_value[0:(bit_length // 4)], 16) def hash_text_to_ints(value, bit_lengths=(16, 16, 16, 16)): # type: (str, Sequence[int]) -> Sequence[int] """ Hash a text value to a sequence of integers. Generates a sequence of integer values with given bit-lengths similarly to `hash_text_to_int`, but allowing generating many separate numbers with a single call. :param bit_lengths: Tuple of bit lengths for the resulting integers. Defines also the length of the result tuple. :return: Tuple of ``n`` integers ``(R_1, ... R_n)`` with the requested bit-lengths ``(L_1, ..., L_n)`` and values ranging within ``0 <= R_i < 2**L_i`` for each ``i``. """ hash_value = hash_text(value) hex_lengths = [x // 4 for x in bit_lengths] hex_ranges = ( (sum(hex_lengths[0:i]), sum(hex_lengths[0:(i + 1)])) for i in range(len(hex_lengths))) return tuple(int(hash_value[a:b], 16) for (a, b) in hex_ranges) def hash_text(value, hasher=hashlib.sha256, encoding='utf-8'): # type: (str, Callable, str) -> str """ Generate a hash for a text value. The hash will be generated by encoding the text to bytes with given encoding and then generating a hash with HMAC using the session secret as the key and the given hash function. :param value: Text value to hash :param hasher: Hash function to use, SHA256 by default :param encoding: Encoding to use, UTF-8 by default :return: Hexadecimal presentation of the hash as a string """ return hash_bytes(value.encode(encoding), hasher) def hash_bytes(value, hasher=hashlib.sha256): # type: (bytes, Callable) -> str """ Generate a hash for a bytes value. The hash will be generated by generating a hash with HMAC using the session secret as the key and the given hash function. :param value: Bytes value to hash :param hasher: Hash function to use. :return: Hexadecimal presentation of the hash as a string """ return hmac.new(get_secret(), value, hasher).hexdigest() def get_secret(): # type: () -> bytes """ Get session specific secret key. :return: Session key as bytes """ if not getattr(_thread_local_storage, 'secret_key', None): _initialize_session() return _thread_local_storage.secret_key # type: ignore def reset(secret_key=None): # type: (Optional[bytes]) -> None """ Reset the session. By default, this resets the value of the secret to None so that, if there was an earlier sanitation process ran on the same thread, then a next call that needs the secret key of the session will generate a new value for it. This may also be used to set a predefined value for the secret key. :param secret_key: Value to set as the new session secret key or None if a new one should be generated as soon as one is needed. """ _thread_local_storage.secret_key = secret_key def _initialize_session(): # type: () -> None """ Generate a new session key and store it to thread local storage. """ sys_random = random.SystemRandom() _thread_local_storage.secret_key = b''.join( int2byte(sys_random.randint(0, 255)) for _ in range(SECRET_KEY_BITS // 8))
31.272109
72
0.688057
714
4,597
4.326331
0.260504
0.04079
0.034963
0.031078
0.217546
0.158627
0.133377
0.1146
0.1146
0.089349
0
0.013795
0.227322
4,597
146
73
31.486301
0.855856
0.62519
0
0.057143
1
0
0.01026
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.542857
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
0
0
0
1
0
0
2
2707004f28feaa5db63a1087307863b0d70fe4ec
100
py
Python
Algorithms/Bit Manipulation/Given a list of numbers where every numbers occurs twice except one number.py
cnm06/Competitive-Programming
94242ae458570d503b8218f37624b88cc5020d23
[ "MIT" ]
994
2017-02-28T06:13:47.000Z
2022-03-31T10:49:00.000Z
Algorithms/Bit Manipulation/Given a list of numbers where every numbers occurs twice except one number.py
Quadrified/Competitive-Programming
bccb69952cc5260fb3647b3301ddac1023dacac8
[ "MIT" ]
16
2018-01-01T02:59:55.000Z
2021-11-22T12:49:16.000Z
Algorithms/Bit Manipulation/Given a list of numbers where every numbers occurs twice except one number.py
Quadrified/Competitive-Programming
bccb69952cc5260fb3647b3301ddac1023dacac8
[ "MIT" ]
325
2017-06-15T03:32:43.000Z
2022-03-28T22:43:42.000Z
def answer(numbers): ans = numbers[0] for i in numbers[1:]: ans ^= i return ans
16.666667
25
0.54
15
100
3.6
0.666667
0
0
0
0
0
0
0
0
0
0
0.030303
0.34
100
5
26
20
0.787879
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0
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
0
0
0
0
0
2
270af1960a206b26f220b68d5328bdfbbbe68aa2
1,983
py
Python
src/pySanbot/test/test_util/test_boyer_moore_search.py
BHFaction/Tribot
38d8caaa73775654125db3091b8de2aadb3dba99
[ "MIT" ]
3
2017-04-04T04:03:28.000Z
2021-05-29T08:08:48.000Z
src/pySanbot/test/test_util/test_boyer_moore_search.py
BHFaction/Tribot
38d8caaa73775654125db3091b8de2aadb3dba99
[ "MIT" ]
null
null
null
src/pySanbot/test/test_util/test_boyer_moore_search.py
BHFaction/Tribot
38d8caaa73775654125db3091b8de2aadb3dba99
[ "MIT" ]
2
2018-02-28T14:16:11.000Z
2019-05-07T18:02:16.000Z
from unittest import TestCase from util.boyer_moore_search import z_array from util.boyer_moore_search import boyer_moore, BoyerMoore __author__ = 'Yifei' class TestBoyerMooreSearch(TestCase): def test_z_array(self): # Test Case 0 s = 'aabcaabxaaaz' n = len(s) z = z_array(s) self.assertListEqual([n, 1, 0, 0, 3, 1, 0, 0, 2, 2, 1, 0], z, "Test Case 1: " + s) s = 'aaaaaa' n = len(s) z = z_array(s) self.assertListEqual([n, 5, 4, 3, 2, 1], z, "Test Case 2: " + s) s = 'aabaacd' n = len(s) z = z_array(s) self.assertListEqual([n, 1, 0, 2, 1, 0, 0], z, "Test Case 3: " + s) s = 'abababab' n = len(s) z = z_array(s) self.assertListEqual([n, 0, 6, 0, 4, 0, 2, 0], z, "Test Case 4: " + s) def test_boyer_moore(self): t = [1, 2, 3, 1, 2, 3, 1, 2, 3] p = [1] p_bm = BoyerMoore(p) occurrences = boyer_moore(p, p_bm, t) self.assertListEqual([0, 3, 6], occurrences, "Test Case 1: " + str(p) + " in " + str(t)) t = [1, 2, 3, 1, 2, 3, 1, 2, 3] p = [1, 2] p_bm = BoyerMoore(p) occurrences = boyer_moore(p, p_bm, t) self.assertListEqual([0, 3, 6], occurrences, "Test Case 2: " + str(p) + " in " + str(t)) t = [1, 2, 3, 1, 2, 3, 1, 2, 3] p = [1, 2, 3] p_bm = BoyerMoore(p) occurrences = boyer_moore(p, p_bm, t) self.assertListEqual([0, 3, 6], occurrences, "Test Case 3: " + str(p) + " in " + str(t)) t = [1, 2, 3, 4, 5] p = [6, 6, 6] p_bm = BoyerMoore(p) occurrences = boyer_moore(p, p_bm, t) self.assertListEqual([], occurrences, "test case 4: " + str(p) + " in " + str(t)) t = [1, 2, 3, 4, 5] p = [6] p_bm = BoyerMoore(p) occurrences = boyer_moore(p, p_bm, t) self.assertListEqual([], occurrences, "test case 5: " + str(p) + " in " + str(t))
32.508197
96
0.498739
312
1,983
3.064103
0.128205
0.027197
0.037657
0.025105
0.732218
0.721757
0.658996
0.658996
0.658996
0.658996
0
0.071861
0.333333
1,983
60
97
33.05
0.651286
0.005547
0
0.479167
0
0
0.088832
0
0
0
0
0
0.1875
1
0.041667
false
0
0.0625
0
0.125
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
2712d71cebd1c1c0c5ebe71fa2604a188a12e044
331
py
Python
core/migrations/0003_remove_resetpassword_expires_at.py
GolamMullick/HR_PROJECT
fc4c76cfc835ad014a62a3da9d32b8fc8d474397
[ "MIT" ]
null
null
null
core/migrations/0003_remove_resetpassword_expires_at.py
GolamMullick/HR_PROJECT
fc4c76cfc835ad014a62a3da9d32b8fc8d474397
[ "MIT" ]
3
2020-02-12T02:52:01.000Z
2021-06-10T22:18:25.000Z
core/migrations/0003_remove_resetpassword_expires_at.py
GolamMullick/HR_PROJECT
fc4c76cfc835ad014a62a3da9d32b8fc8d474397
[ "MIT" ]
null
null
null
# Generated by Django 2.1.4 on 2019-11-18 11:00 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', '0002_resetpassword'), ] operations = [ migrations.RemoveField( model_name='resetpassword', name='expires_at', ), ]
18.388889
47
0.595166
34
331
5.705882
0.794118
0
0
0
0
0
0
0
0
0
0
0.081197
0.293051
331
17
48
19.470588
0.747863
0.135952
0
0
1
0
0.158451
0
0
0
0
0
0
1
0
false
0.181818
0.090909
0
0.363636
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
2721ab7a1f61ce9281bd09517b3b6a6328c17752
708
py
Python
geotrek/outdoor/admin.py
numahell/Geotrek-admin
e279875b0b06ef60928c049d51533f76716c902a
[ "BSD-2-Clause" ]
1
2019-12-11T11:04:05.000Z
2019-12-11T11:04:05.000Z
geotrek/outdoor/admin.py
numahell/Geotrek-admin
e279875b0b06ef60928c049d51533f76716c902a
[ "BSD-2-Clause" ]
null
null
null
geotrek/outdoor/admin.py
numahell/Geotrek-admin
e279875b0b06ef60928c049d51533f76716c902a
[ "BSD-2-Clause" ]
null
null
null
from django.conf import settings from django.contrib import admin from geotrek.common.admin import MergeActionMixin from geotrek.outdoor.models import Practice, SiteType if 'modeltranslation' in settings.INSTALLED_APPS: from modeltranslation.admin import TranslationAdmin else: TranslationAdmin = admin.ModelAdmin @admin.register(Practice) class PracticeAdmin(MergeActionMixin, TranslationAdmin): list_display = ('name', ) search_fields = ('name', ) merge_field = 'name' @admin.register(SiteType) class SiteTypeAdmin(MergeActionMixin, TranslationAdmin): list_display = ('name', 'practice') list_filter = ('practice', ) search_fields = ('name', ) merge_field = 'name'
28.32
56
0.75565
74
708
7.121622
0.459459
0.037951
0.136622
0.163188
0.29222
0.113852
0
0
0
0
0
0
0.146893
708
24
57
29.5
0.872517
0
0
0.210526
0
0
0.079096
0
0
0
0
0
0
1
0
false
0
0.263158
0
0.736842
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
27315e1db1e7700a9d36cef574e1deed8416f995
1,385
py
Python
uselessAI.py
Arihant25/beginner-python-projects
43c6489b6973522246073f2187a682487f1684c1
[ "Unlicense" ]
1
2020-06-11T06:10:08.000Z
2020-06-11T06:10:08.000Z
uselessAI.py
Arihant25/beginner-python-projects
43c6489b6973522246073f2187a682487f1684c1
[ "Unlicense" ]
1
2021-07-16T03:50:09.000Z
2021-07-16T04:00:35.000Z
uselessAI.py
Arihant25/beginner-python-projects
43c6489b6973522246073f2187a682487f1684c1
[ "Unlicense" ]
1
2021-07-16T03:28:39.000Z
2021-07-16T03:28:39.000Z
def greet(bot_name, birth_year): print('Hello! My name is ' + bot_name + '.') print('I was created in ' + birth_year + '.') def remind_name(): print('Please, remind me your name.') name = input() print('What a great name you have, ' + name + '!') def guess_age(): print('Let me guess your age.') print('Enter remainders of dividing your age by 3, 5 and 7.') rem3 = int(input()) rem5 = int(input()) rem7 = int(input()) age = (rem3 * 70 + rem5 * 21 + rem7 * 15) % 105 print("Your age is " + str(age) + "; that's a good time to start programming!") def count(): print('Now I will prove to you that I can count to any number you want.') num = int(input()) curr = 0 while curr <= num: print(curr, '!') curr = curr + 1 def test(): print("Let's test your programming knowledge.") # write your code here print("What's your feedback on me? (Enter the option number") print("1. You're great!") print("2. You're awesome!") print("3. You're the best!") print("4. Will you be my friend?") ans = int(input()) if ans == 4: print("Of course I will!") else: print("I knew it!") print('Completed, have a nice day!') def end(): print('Congratulations, have a nice day!') greet('UselessAI', '2020') remind_name() guess_age() count() test() end()
23.083333
83
0.581949
209
1,385
3.818182
0.449761
0.050125
0.022556
0.030075
0
0
0
0
0
0
0
0.028376
0.262094
1,385
59
84
23.474576
0.752446
0.01444
0
0
0
0
0.40719
0
0
0
0
0.016949
0
1
0.139535
false
0
0
0
0.139535
0.44186
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
1
0
2
273de3624cb2656a5b09bd44464400c778b4cc44
213
py
Python
setup.py
ravi-bade/hive-ML
bd724580bf09d992a838da57f9fd5142bab4e1e5
[ "MIT" ]
null
null
null
setup.py
ravi-bade/hive-ML
bd724580bf09d992a838da57f9fd5142bab4e1e5
[ "MIT" ]
null
null
null
setup.py
ravi-bade/hive-ML
bd724580bf09d992a838da57f9fd5142bab4e1e5
[ "MIT" ]
null
null
null
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Hive-ml project of OneApp', author='Ravikant Bade', license='MIT', )
19.363636
44
0.661972
27
213
5.148148
0.814815
0.172662
0
0
0
0
0
0
0
0
0
0.017544
0.197183
213
10
45
21.3
0.795322
0
0
0
0
0
0.230047
0
0
0
0
0
0
1
0
true
0
0.111111
0
0.111111
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
2
2740e363aa1f94977ef475388c48f61555bf5a1a
754
py
Python
hard-gists/5017218/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
21
2019-07-08T08:26:45.000Z
2022-01-24T23:53:25.000Z
hard-gists/5017218/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
5
2019-06-15T14:47:47.000Z
2022-02-26T05:02:56.000Z
hard-gists/5017218/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
17
2019-05-16T03:50:34.000Z
2021-01-14T14:35:12.000Z
#!/usr/bin/env python from Crypto.Cipher import AES from Crypto.Util.strxor import strxor from binascii import hexlify K = '0123456789abcdef' cipher = AES.new(K, AES.MODE_ECB) # Original Message M1 = K M2 = K Cm0 = cipher.encrypt('\0' * AES.block_size) Cm1 = cipher.encrypt(strxor(Cm0,M1)) Tm = Cm2 = cipher.encrypt(strxor(Cm1,M2)) N1 = 'iheiowehfiowehfw' # Inject second message after the first message Cx0 = cipher.encrypt('\0' * AES.block_size) Cx1 = cipher.encrypt(strxor(Cx0,M1)) Cx2 = cipher.encrypt(strxor(Cx1,N1)) # X needs to *encrypt* to the same value as Cm1 X = strxor(cipher.decrypt(Cx1),Cx2) Cx3 = cipher.encrypt(strxor(Cx2,X)) Tx = Cx4 = cipher.encrypt(strxor(Cx3,M2)) print "Tm = '%s'" % hexlify(Tm) print "Tx = '%s'" % hexlify(Tx)
25.133333
47
0.709549
121
754
4.396694
0.429752
0.195489
0.214286
0.06391
0.097744
0.097744
0
0
0
0
0
0.057011
0.139257
754
29
48
26
0.762712
0.171088
0
0
0
0
0.086957
0
0
0
0
0
0
0
null
null
0
0.157895
null
null
0.105263
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
1
0
0
0
0
0
0
0
0
2
275f0b6cee294c3156bfba77754c517b6dc76211
162
py
Python
dgbpy/__init__.py
maxprop/dgbpy
05d0900b0fb2cb612b298c8c78f0f84640a38c4e
[ "Apache-2.0" ]
7
2021-11-18T18:03:46.000Z
2022-02-09T06:55:50.000Z
dgbpy/__init__.py
maxprop/dgbpy
05d0900b0fb2cb612b298c8c78f0f84640a38c4e
[ "Apache-2.0" ]
null
null
null
dgbpy/__init__.py
maxprop/dgbpy
05d0900b0fb2cb612b298c8c78f0f84640a38c4e
[ "Apache-2.0" ]
1
2022-03-18T06:55:55.000Z
2022-03-18T06:55:55.000Z
# # (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt # AUTHOR : Bert # DATE : August 2018 # # Module init # __version__ = '1.0.0'
16.2
75
0.635802
23
162
4.26087
0.869565
0
0
0
0
0
0
0
0
0
0
0.053846
0.197531
162
9
76
18
0.7
0.765432
0
0
0
0
0.166667
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
277c94d5ec87dc5540702d806c2c486ab6812053
769
py
Python
server/app/budget/migrations/0004_auto_20210521_1347.py
catvitalio/personal-budget
b4470115ebbfd185a8a781a2024787cbfe822639
[ "MIT" ]
null
null
null
server/app/budget/migrations/0004_auto_20210521_1347.py
catvitalio/personal-budget
b4470115ebbfd185a8a781a2024787cbfe822639
[ "MIT" ]
null
null
null
server/app/budget/migrations/0004_auto_20210521_1347.py
catvitalio/personal-budget
b4470115ebbfd185a8a781a2024787cbfe822639
[ "MIT" ]
null
null
null
# Generated by Django 3.1.2 on 2021-05-21 06:47 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('budget', '0003_auto_20210521_1252'), ] operations = [ migrations.AlterField( model_name='expense', name='tags', field=models.ManyToManyField(blank=True, to='budget.ExpenseTag'), ), migrations.AlterField( model_name='income', name='tags', field=models.ManyToManyField(blank=True, to='budget.IncomeTag'), ), migrations.AlterField( model_name='transfer', name='tags', field=models.ManyToManyField(blank=True, to='budget.TransferTag'), ), ]
26.517241
78
0.579974
74
769
5.945946
0.554054
0.136364
0.170455
0.197727
0.347727
0.347727
0.347727
0.347727
0.347727
0
0
0.057301
0.296489
769
28
79
27.464286
0.756007
0.058518
0
0.409091
1
0
0.15651
0.031856
0
0
0
0
0
1
0
false
0
0.045455
0
0.181818
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
27d3c4c2fd777115e15bd0efa78ebba378f85ab4
5,629
py
Python
quilt/avahiservice.py
rossdylan/quilt
463e3cfe419410b41ee6945ab96d51692d46b036
[ "MIT" ]
2
2015-07-23T03:49:42.000Z
2015-11-05T18:49:53.000Z
quilt/avahiservice.py
rossdylan/quilt
463e3cfe419410b41ee6945ab96d51692d46b036
[ "MIT" ]
null
null
null
quilt/avahiservice.py
rossdylan/quilt
463e3cfe419410b41ee6945ab96d51692d46b036
[ "MIT" ]
null
null
null
""" Avahi Network Service Scripting """ import Queue import threading import avahi, dbus, gobject from dbus import DBusException from dbus.mainloop.glib import DBusGMainLoop __all__ = ["QuiltAvahiServer", "QuiltAvahiClient"] TYPE = '_quilt._tcp' class QuiltAvahiNode(object): """ Quilt Avahi Connection Node, represents a found connection, and its connection details. """ def __init__(self, domain="local", hostname="none", address="", port=""): """ Construct Connection Node """ self.domain = domain self.hostname = hostname self.address = address self.port = port def __str__(self): """ String representation. """ return "Quilt Avahi Connection Node:\n -domain: %s\n -hostname: %s\n -address: %s\n -port: %s\n"\ % (self.domain, self.hostname, self.address, self.port) from threading import Thread class QuiltAvahiClient(Thread): """ Qulit's Avahi Service Discovery Object """ def __init__(self): """ Construct Search Client """ threading.Thread.__init__(self) self.Nodes = Queue.Queue() self.loop = DBusGMainLoop() self.bus = dbus.SystemBus(mainloop = self.loop) self.server = dbus.Interface(self.bus.get_object(avahi.DBUS_NAME, '/'), 'org.freedesktop.Avahi.Server') self.sbrowser = dbus.Interface(self.bus.get_object(avahi.DBUS_NAME, self.server.ServiceBrowserNew(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, TYPE, 'local', dbus.UInt32(0))), avahi.DBUS_INTERFACE_SERVICE_BROWSER) def resolve(self, *args): """ :param args: Arguments of the resolved service :type args: Array of mixed string and integer arguments. """ # Handle Connection Pattern Here, for now just print that we found # the service #TODO node = QuiltAvahiNode(args[4], args[5].split('.')[0], args[7], args[8]) print node self.Nodes.put(node) def error(self, *args): """ :param args: Arguments of the error in the resolved service :type args: Mixed strings and integers """ print "Error: %s" % args[0] def search_handler(self, interface, protocol, name, stype, domain, flags): """ Handles the finding of a service on the local network. :param interface: Interface Name :type interface: String :param protocol: Protocol Type :type protocol: String :param name: Name of service :type name: String :param stype: Service Type :type stype: String :param domain: Domain of service :type domain: String :param flags: Flags of the Service :type flags: int """ print "Service Found %s type %s domain %s" % (name, stype, domain) # We can determine if the service is local, avoiding uncessary connections if flags & avahi.LOOKUP_RESULT_LOCAL: # TODO: Handle local service here pass self.server.ResolveService(interface, protocol, name, stype, domain, avahi.PROTO_UNSPEC, dbus.UInt32(0), reply_handler=self.resolve, error_handler=self.error) def run(self): """ Searches the local network for broadcasting avahi services, handles found services in the resolved method """ self.sbrowser.connect_to_signal("ItemNew", self.search_handler) gobject.MainLoop().run() class QuiltAvahiServer(object): """ Quilt's Avahi Server Object NOTE: Ports 9375-9379 should be our target ports """ def __init__(self, name="Quilt", port=9375, stype="_quilt._tcp", domain="", host="", text=""): """ Construct the avahi service :type name: string :param name: name of service :type port: int :param port: port to be run on. :type stype: str :param stype: service type :type domain: str :param domain: service domain :type host: str :param host: service host :type text: -- :param text: -- """ self.name = name self.stype = stype self.domain = domain self.host = host self.port = port self.text = text def publish(self): """ Make the service discoverable on the network """ bus = dbus.SystemBus() server = dbus.Interface( bus.get_object( avahi.DBUS_NAME, avahi.DBUS_PATH_SERVER), avahi.DBUS_INTERFACE_SERVER) interface = dbus.Interface( bus.get_object(avahi.DBUS_NAME, server.EntryGroupNew()), avahi.DBUS_INTERFACE_ENTRY_GROUP) interface.AddService( avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, dbus.UInt32(0), self.name, self.stype, self.domain, self.host, dbus.UInt16(self.port), self.text) interface.Commit() self.group = interface def unpublish(self): """ Remove the service """ self.group.Reset()
35.626582
105
0.551252
589
5,629
5.168081
0.256367
0.02661
0.015769
0.022339
0.187254
0.125493
0.093955
0.052562
0.027595
0
0
0.00798
0.354415
5,629
157
106
35.853503
0.829664
0.033221
0
0.050633
0
0.012658
0.069585
0.008118
0
0
0
0.012739
0
0
null
null
0.012658
0.075949
null
null
0.037975
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
1
0
0
0
0
0
0
0
0
2
27d5f9dbcf40cc145235b4fffe9387c62c414d60
6,161
py
Python
tests/pte-onPrem-test-package/scripts/create_SCFile.py
gbl1124/hfrd
327d7c1e18704d2e31a2649b40ae1d90353ebe24
[ "Apache-2.0" ]
5
2019-08-02T20:53:57.000Z
2021-06-25T05:16:46.000Z
tests/pte-onPrem-test-package/scripts/create_SCFile.py
anandbanik/hfrd
7bc1f13bfc9c7d902aec0363d27b089ef68c7eec
[ "Apache-2.0" ]
null
null
null
tests/pte-onPrem-test-package/scripts/create_SCFile.py
anandbanik/hfrd
7bc1f13bfc9c7d902aec0363d27b089ef68c7eec
[ "Apache-2.0" ]
14
2019-07-01T01:40:50.000Z
2020-03-24T06:14:32.000Z
import json import os import argparse HOME = os.environ['HOME']+'/results/' parser = argparse.ArgumentParser(description="Python script generates the SCFiles using MSPIDs") parser.add_argument("-m", "--mspids", nargs="+", required=True, help="1 or more MSPIDs") parser.add_argument("-n", "--networkId", metavar='', required=True, help="Network ID") args = parser.parse_args() class SCFileCreator: def __init__(self): self.MSPIDs = args.mspids self.peerInfo = {} self.SCFileObject = {} self.networkID = args.networkId self.writeToOutput(self.networkID) # Get information for each peerOrgs def getPeerInfo(self): # This function gets the peer information for all the peers and returns data in a dictionary format for mspid in self.MSPIDs: # read in connection profiles for each org with open(os.path.join(HOME, "creds/ConnectionProfile_{}.json".format(mspid)), "r") as f: orgCP = json.load(f) # read in admin cert for each org with open(os.path.join(HOME, "creds/{}admin/msp/signcerts/cert.pem".format(mspid)), "r") as f: orgCT = "".join(f.readlines()) # read in priv key for each org with open(os.path.join(HOME, "creds/{}admin/msp/keystore/priv.pem".format(mspid)), "r") as f: orgPK = "".join(f.readlines()) temp = {} temp["orgCP"] = orgCP temp["orgCT"] = orgCT temp["orgPK"] = orgPK self.peerInfo[mspid] = dict(temp) return self.peerInfo def generateSCFile(self): # This function builds the SCFile self.getPeerInfo() # Calling the gatherPeerOrg function self.SCFileObject["test-network"] = {} print(self.MSPIDs) # Added GOPATH as per Tanya"s request self.SCFileObject["test-network"]["gopath"] = "GOPATH" for mspid in self.MSPIDs: # Need to make copy of all inner dict to a new address location without sharing the same reference as the first one self.SCFileObject["test-network"]["orderer"] = {} self.SCFileObject["test-network"][mspid] = {} self.SCFileObject["test-network"][mspid]["ca"] = {} self.SCFileObject["test-network"][mspid]["name"] = mspid self.SCFileObject["test-network"][mspid]["mspid"] = mspid self.SCFileObject["test-network"][mspid]["username"] = "admin" self.SCFileObject["test-network"][mspid]["privateKeyPEM"] = "" self.SCFileObject["test-network"][mspid]["signedCertPEM"] = "" self.SCFileObject["test-network"][mspid]["adminPath"] = "" # Storing certificate and private key self.SCFileObject["test-network"][mspid]["admin_cert"] = self.peerInfo[mspid]["orgCT"] self.SCFileObject["test-network"][mspid]["priv"] = self.peerInfo[mspid]["orgPK"] # getting all fabric_ca in peer org fabricCaPeerList = [fabric_ca for fabric_ca in self.peerInfo[mspid]["orgCP"]["certificateAuthorities"].keys()] # storing the first fabric_ca since the data is the same for each peer org self.SCFileObject["test-network"][mspid]["ca"]["name"] = fabricCaPeerList[0] self.SCFileObject["test-network"][mspid]["ca"]["url"] = \ self.peerInfo[mspid]["orgCP"]["certificateAuthorities"][fabricCaPeerList[0]]["url"] self.SCFileObject["test-network"][mspid]["secret"] = \ self.peerInfo[mspid]["orgCP"]["certificateAuthorities"][fabricCaPeerList[0]]["registrar"][0]["enrollSecret"] # getting the right peer orgs for peer in self.peerInfo[mspid]["orgCP"]["organizations"][mspid]["peers"]: # building peer dict self.SCFileObject["test-network"][mspid][peer] = {} self.SCFileObject["test-network"][mspid][peer]["server-hostname"] = None self.SCFileObject["test-network"][mspid][peer]["tls_cacerts"] = "" self.SCFileObject["test-network"][mspid][peer]["requests"] = \ self.peerInfo[mspid]["orgCP"]["peers"][peer]["url"] self.SCFileObject["test-network"][mspid][peer]["events"] = self.peerInfo[mspid]["orgCP"]["peers"][peer][ "eventUrl"] # getting data for each orderer for fabricOrderer in self.peerInfo[mspid]["orgCP"]["orderers"]: self.SCFileObject["test-network"]["tls_cert"] = \ self.peerInfo[mspid]["orgCP"]["orderers"][fabricOrderer]["tlsCACerts"]["pem"] # building orderer dict self.SCFileObject["test-network"]["orderer"][fabricOrderer] = {} self.SCFileObject["test-network"]["orderer"][fabricOrderer]["name"] = "OrdererOrg" self.SCFileObject["test-network"]["orderer"][fabricOrderer]["mspid"] = "OrdererOrg" self.SCFileObject["test-network"]["orderer"][fabricOrderer]["mspPath"] = "" self.SCFileObject["test-network"]["orderer"][fabricOrderer]["adminPath"] = "" self.SCFileObject["test-network"]["orderer"][fabricOrderer]["comName"] = "" self.SCFileObject["test-network"]["orderer"][fabricOrderer]["server-hostname"] = None self.SCFileObject["test-network"]["orderer"][fabricOrderer]["tls_cacerts"] = "" self.SCFileObject["test-network"]["orderer"][fabricOrderer]["url"] = \ self.peerInfo[mspid]["orgCP"]["orderers"][fabricOrderer]["url"] # setting the ordererID for each mspid self.SCFileObject["test-network"][mspid]["ordererID"] = fabricOrderer return self.SCFileObject def writeToOutput(self, outputFile): # this function writes to config-net-${networkID}.json file with open(os.path.join(HOME, "SCFiles/config-net-{}.json".format(outputFile)), "w") as f: json.dump(self.generateSCFile(), f, indent=4, sort_keys=True) if __name__ == "__main__": scFileCreator = SCFileCreator()
50.917355
127
0.603636
649
6,161
5.691834
0.266564
0.147266
0.173254
0.233893
0.491067
0.376286
0.122631
0.03438
0.03438
0.03438
0
0.001284
0.241357
6,161
121
128
50.917355
0.789046
0.127901
0
0.024691
1
0
0.221102
0.036228
0
0
0
0
0
1
0.049383
false
0
0.037037
0
0.123457
0.012346
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
27d7ec475999a81872908a78c697615fa5aa0984
4,258
py
Python
netflow/mkipfixtypes/ipfixtypes.py
kohler/click-packages
cec70da7cf460548ef08f1ddad6924db29d5c0c5
[ "MIT" ]
13
2015-02-26T23:12:09.000Z
2021-04-18T04:37:12.000Z
netflow/mkipfixtypes/ipfixtypes.py
kohoumas/click-packages
6bb5c4ba286e5dbc74efd1708921d530425691f6
[ "MIT" ]
null
null
null
netflow/mkipfixtypes/ipfixtypes.py
kohoumas/click-packages
6bb5c4ba286e5dbc74efd1708921d530425691f6
[ "MIT" ]
7
2015-08-25T09:29:41.000Z
2021-04-18T04:37:13.000Z
#!/usr/bin/python # # Generates ipfixtypes.hh from IPFIX spec and schema # # Copyright (c) 2006 Mazu Networks, Inc. # # $Id: ipfixtypes.py,v 1.1 2006/05/12 16:43:44 eddietwo Exp $ # import xml.dom.minidom import sys import time class IPFIXField: """ Represents a <field> element in the IPFIX specification. Access attributes with getattr(), e.g., field.name or getattr(field, 'name') field.dataType or getattr(field, 'dataType') """ def __init__(self, node): self.node = node def __getattr__(self, name): return self.node.getAttribute(name) class IPFIXSpecification: """ Represents all <field> elements in the IPFIX specification. """ def __init__(self, file = None): dom = xml.dom.minidom.parse(file) self.fields = [] for fieldDefinitions in dom.getElementsByTagName('fieldDefinitions'): self.fields += [IPFIXField(field) for field in fieldDefinitions.getElementsByTagName('field')] self.types = [] for simpleType in dom.getElementsByTagName('simpleType'): if simpleType.getAttribute('name') == "dataType": for enumeration in simpleType.getElementsByTagName('enumeration'): self.types.append(enumeration.getAttribute('value')) def fieldDefinitions(self): """ Returns all fields declared in the <fieldDefinitions> section of the specification. """ return self.fields def dataTypes(self): """ Returns all dataTypes declared in the <schema> section of the specification. """ return self.types def main(): if len(sys.argv) < 2: print "Usage: %s [OPTION]... [FILE]..." % sys.argv[0] sys.exit(0) dataTypes = {} fieldTypes = {} for file in sys.argv[1:]: spec = IPFIXSpecification(file) for field in spec.fieldDefinitions(): if dataTypes.has_key(field.dataType): dataTypes[field.dataType].append(field.name) else: dataTypes[field.dataType] = [field.name] fieldTypes[int(field.fieldId)] = field.name for dataType in spec.dataTypes(): if not dataTypes.has_key(dataType): dataTypes[dataType] = [] # IPFIX_unsigned8, data_types = ["IPFIX_%s" % dataType for dataType in dataTypes] data_types = ",\n ".join(data_types) # IPFIX_octetDeltaCount = 1, field_types = fieldTypes.items() field_types.sort() field_types = ["IPFIX_%s = %d" % (name, fieldId) for fieldId, name in field_types] field_types = ",\n ".join(field_types) # case IPFIX_octetDeltaCount: # case IPFIX_packetDeltaCount: # ... # return IPFIX_unsigned64; ipfix_datatypes = [] for dataType, names in dataTypes.iteritems(): if names: ipfix_datatypes += ["case IPFIX_%s:" % name for name in names] ipfix_datatypes.append(" return IPFIX_%s;" % dataType) ipfix_datatypes = "\n ".join(ipfix_datatypes) # case IPFIX_octetDeltaCount: return "octetDeltaCount"; ipfix_names = ["case IPFIX_%s: return \"%s\";" % \ (name, name) for name in fieldTypes.values()] ipfix_names = "\n ".join(ipfix_names) # else if (strcmp(name, "octetDeltaCount") == 0) { return IPFIX_octetDeltaCount; } ipfix_types = ["else if (strcmp(name, \"%s\") == 0) { return IPFIX_%s; }" % \ (name, name) for name in fieldTypes.values()] ipfix_types = "\n ".join(ipfix_types) date = time.asctime() print """ // DO NOT EDIT. Generated at %(date)s. #ifndef IPFIXTYPES_HH #define IPFIXTYPES_HH CLICK_DECLS enum IPFIX_dataType { IPFIX_unknown = 0, %(data_types)s }; enum IPFIX_fieldType { %(field_types)s }; static inline IPFIX_dataType ipfix_datatype(uint16_t type) { switch (type) { %(ipfix_datatypes)s } return IPFIX_unknown; } static inline const char * ipfix_name(uint16_t type) { switch (type) { %(ipfix_names)s } return "unknown"; } static inline uint16_t ipfix_type(const char *name) { if (0) { } %(ipfix_types)s else { return 0; } } CLICK_ENDDECLS #endif """.strip() % locals() if __name__ == '__main__': main()
26.447205
106
0.625881
491
4,258
5.274949
0.276986
0.027027
0.011583
0.015058
0.07722
0.07722
0.030116
0.030116
0.030116
0
0
0.01223
0.251057
4,258
160
107
26.6125
0.799937
0.101691
0
0.0625
1
0
0.253027
0.006961
0
0
0
0
0
0
null
null
0
0.03125
null
null
0.020833
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
2
27d8e4bb5627f304929e5b7f3fa1b41d586d410e
694
py
Python
core_lib/web_helpers/constants_media_type.py
shubham-surya/core-lib
543db80706746a937e5ed16bd50f2de8d58b32e4
[ "MIT" ]
null
null
null
core_lib/web_helpers/constants_media_type.py
shubham-surya/core-lib
543db80706746a937e5ed16bd50f2de8d58b32e4
[ "MIT" ]
9
2021-03-11T02:29:17.000Z
2022-03-22T19:01:18.000Z
core_lib/web_helpers/constants_media_type.py
shubham-surya/core-lib
543db80706746a937e5ed16bd50f2de8d58b32e4
[ "MIT" ]
2
2022-01-27T11:19:00.000Z
2022-02-11T11:33:09.000Z
import enum class MediaType(enum.Enum): MEDIA_TYPE_WILDCARD = "*" WILDCARD = "*/*" APPLICATION_XML = "application/xml" APPLICATION_ATOM_XML = "application/atom+xml" APPLICATION_XHTML_XML = "application/xhtml+xml" APPLICATION_SVG_XML = "application/svg+xml" APPLICATION_JSON = "application/json" APPLICATION_FORM_URLENCODED = "application/x-www-form-urlencoded" MULTIPART_FORM_DATA = "multipart/form-data" APPLICATION_OCTET_STREAM = "application/octet-stream" TEXT_PLAIN = "text/plain" TEXT_XML = "text/xml" TEXT_HTML = "text/html" SERVER_SENT_EVENTS = "text/event-stream" APPLICATION_JSON_PATCH_JSON = "application/json-patch+json"
34.7
69
0.729107
82
694
5.878049
0.353659
0.232365
0.103734
0.087137
0.253112
0
0
0
0
0
0
0
0.159942
694
19
70
36.526316
0.826758
0
0
0
0
0
0.348703
0.151297
0
0
0
0
0
1
0
false
0
0.058824
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
0
0
0
1
0
0
2
27f6676280bfbc46f5ea3961bee24ccfef845e05
10,137
py
Python
metadata_service/api/dashboard.py
iiAnderson/metaflow-service
b42391e5ee2187a93259b944c515522d76b1314e
[ "Apache-2.0" ]
null
null
null
metadata_service/api/dashboard.py
iiAnderson/metaflow-service
b42391e5ee2187a93259b944c515522d76b1314e
[ "Apache-2.0" ]
null
null
null
metadata_service/api/dashboard.py
iiAnderson/metaflow-service
b42391e5ee2187a93259b944c515522d76b1314e
[ "Apache-2.0" ]
null
null
null
import asyncio import json from datetime import datetime, timedelta from aiohttp import web from .utils import read_body, get_week_times, get_formatted_time from ..data.models import RunRow from ..data.postgres_async_db import AsyncPostgresDB import logging class DashboardAPI(object): _run_table = None lock = asyncio.Lock() def __init__(self, app, cors): cors.add(app.router.add_route("GET", "/dashboard/flows", self.get_flows)) cors.add(app.router.add_route("GET", "/dashboard/flows/{flow_id}/count", self.count_runs)) cors.add(app.router.add_route("GET", "/dashboard/flows/{flow_id}/recent", self.get_recent_run)) cors.add(app.router.add_route("GET", "/dashboard/flows/{flow_id}/last", self.get_last_n_runs)) cors.add(app.router.add_route("GET", "/dashboard/flows/{flow_id}/{timestamp}", self.get_runs_since)) self._run_async_table = AsyncPostgresDB.get_instance().run_table_postgres self._flow_async_table = AsyncPostgresDB.get_instance().flow_table_postgres self._rich_run_async_table = AsyncPostgresDB.get_instance().rich_run_table_postgres async def get_flows(self, request): """ --- description: Get run by run number tags: - Run parameters: - name: "flow_id" in: "path" description: "flow_id" required: true type: "string" - name: "run_number" in: "path" description: "run_number" required: true type: "integer" produces: - text/plain responses: "200": description: successful operation. Return specified run "404": description: specified run not found "405": description: invalid HTTP Method """ flow_response = await self._flow_async_table.get_all_flows() data = [] for flow in flow_response.body: flow_id = flow['flow_id'] run_response = await self._run_async_table.get_all_runs(flow_id) last_run = run_response.body[-1] rich_run_response = await self._rich_run_async_table.get_rich_run(flow_id, last_run['run_number']) rich_last_run = rich_run_response.body data.append({ "success": rich_last_run['success'], "finished": rich_last_run['finished'], "finished_at": rich_last_run['finished_at'], "created_at": last_run['ts_epoch'], "run_id": last_run['run_number'], "flow": flow_id, "user": last_run['user_name'] }) return web.Response( status=rich_run_response.response_code, body=json.dumps(data) ) async def count_runs(self, request): """ --- description: Get all runs tags: - Run parameters: - name: "flow_id" in: "path" description: "flow_id" required: true type: "string" produces: - text/plain responses: "200": description: Returned all runs of specified flow "405": description: invalid HTTP Method """ flow_name = request.match_info.get("flow_id") if flow_name == "all": flow_response = await self._flow_async_table.get_all_flows() flows = [x['flow_id'] for x in flow_response.body] else: flows = [flow_name] counts = get_week_times() time_bound = (datetime.now() - timedelta(days=7)).timestamp() for flow_id in flows: run_response = await self._rich_run_async_table.get_rich_run_since(flow_id, time_bound) for run in run_response.body: logging.error(run) datetime_created = datetime.fromtimestamp(run['ts_epoch']/1000) counts[get_formatted_time(datetime_created)] = counts[get_formatted_time(datetime_created)] + 1 return_data =[] for key, value in counts.items(): return_data.append({"time": key, "count": value}) return web.Response(status=run_response.response_code, body=json.dumps(return_data)) async def get_runs_since(self, request): """ --- description: Get all runs tags: - Run parameters: - name: "flow_id" in: "path" description: "flow_id" required: true type: "string" produces: - text/plain responses: "200": description: Returned all runs of specified flow "405": description: invalid HTTP Method """ timestamp = request.match_info.get("timestamp") flow_name = request.match_info.get("flow_id") if flow_name == "all": flow_response = await self._flow_async_table.get_all_flows() flows = [x['flow_id'] for x in flow_response.body] else: flows = [flow_name] data = [] for flow_id in flows: run_response = await self._rich_run_async_table.get_rich_run_since(flow_id, timestamp) rich_runs = run_response.body for rich_run_data in rich_runs: logging.error(flow_id + " " + str(rich_run_data['run_number'])) run_response = await self._run_async_table.get_run(flow_id, rich_run_data['run_number']) run_data = run_response.body data.append({ "success": rich_run_data['success'], "finished": rich_run_data['finished'], "finished_at": rich_run_data['finished_at'], "created_at": run_data['ts_epoch'], "run_id": run_data['run_number'], "flow": flow_id, "user": run_data['user_name'] }) return web.Response(status=run_response.response_code, body=json.dumps(data)) async def get_run_data(self, request): """ --- description: Get all runs tags: - Run parameters: - name: "flow_id" in: "path" description: "flow_id" required: true type: "string" produces: - text/plain responses: "200": description: Returned all runs of specified flow "405": description: invalid HTTP Method """ flow_id = request.match_info.get("flow_id") run_number = request.match_info.get("run_number") run_response = await self._rich_run_async_table.get_rich_run(flow_id, run_number) rich_run_data = run_response.body run_response = await self._run_async_table.get_run(flow_id, run_number) run_data = run_response.body data = { "success": rich_run_data['success'], "finished": rich_run_data['finished'], "finished_at": rich_run_data['finished_at'], "created_at": run_data['ts_epoch'], "run_id": run_data['run_number'], "flow": flow_id, "user": run_data['user_name'] } return web.Response(status=run_response.response_code, body=json.dumps(data)) async def get_recent_run(self, request): """ --- description: Get all runs tags: - Run parameters: - name: "flow_id" in: "path" description: "flow_id" required: true type: "string" produces: - text/plain responses: "200": description: Returned all runs of specified flow "405": description: invalid HTTP Method """ flow_id = request.match_info.get("flow_id") run_response = await self._run_async_table.get_all_runs(flow_id) run_data = run_response.body recent_run = run_data[-1] run_response = await self._rich_run_async_table.get_rich_run(flow_id, recent_run['run_number']) rich_run_data = run_response.body data = { "success": rich_run_data['success'], "finished": rich_run_data['finished'], "finished_at": rich_run_data['finished_at'], "created_at": recent_run['ts_epoch'], "run_id": recent_run['run_number'], "flow": flow_id, "user": recent_run['user_name'] } return web.Response(status=run_response.response_code, body=json.dumps(data)) async def get_last_n_runs(self, request): """ --- description: Get all runs tags: - Run parameters: - name: "flow_id" in: "path" description: "flow_id" required: true type: "string" produces: - text/plain responses: "200": description: Returned all runs of specified flow "405": description: invalid HTTP Method """ flow_id = request.match_info.get("flow_id") run_response = await self._run_async_table.get_all_runs(flow_id) run_data = run_response.body n_recent_runs = run_data[-5:] data = [] for recent_run in n_recent_runs: run_response = await self._rich_run_async_table.get_rich_run(flow_id, recent_run['run_number']) rich_run_data = run_response.body data.append({ "success": rich_run_data['success'], "finished": rich_run_data['finished'], "finished_at": rich_run_data['finished_at'], "created_at": recent_run['ts_epoch'], "run_id": recent_run['run_number'], "flow": flow_id, "user": recent_run['user_name'] }) return web.Response(status=run_response.response_code, body=json.dumps(data))
32.805825
111
0.56792
1,158
10,137
4.647668
0.1019
0.052397
0.036789
0.040877
0.762913
0.746377
0.69751
0.679673
0.669825
0.662207
0
0.007047
0.328105
10,137
308
112
32.912338
0.783145
0
0
0.532374
0
0
0.114868
0.018567
0
0
0
0
0
1
0.007194
false
0
0.057554
0
0.129496
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
7e037b73adcc0dc266a78c21e1147b45fea5e505
671
py
Python
create_ITIs.py
daanvanes/mloc_exp
bf6fb94b933f1cb78c60c38f80f03c78e9da3686
[ "MIT" ]
1
2019-03-20T15:12:07.000Z
2019-03-20T15:12:07.000Z
create_ITIs.py
daanvanes/mloc_exp
bf6fb94b933f1cb78c60c38f80f03c78e9da3686
[ "MIT" ]
null
null
null
create_ITIs.py
daanvanes/mloc_exp
bf6fb94b933f1cb78c60c38f80f03c78e9da3686
[ "MIT" ]
null
null
null
from __future__ import division from constants import * import numpy as np import os precueITIs = np.random.exponential(standard_parameters['mean_iti_precue'], standard_parameters['n_targets']) + standard_parameters['min_iti_precue'] np.save('ITIs/precueITIs.npy',precueITIs) postcueITIs = np.random.exponential(standard_parameters['mean_iti_postcue'], standard_parameters['n_targets']) + standard_parameters['min_iti_postcue'] np.save('ITIs/postcueITIs.npy',postcueITIs) spITIs = np.round(np.random.exponential(standard_parameters['mean_iti_sp'], standard_parameters['n_targets']) + standard_parameters['min_iti_sp']).astype('int32') np.save('ITIs/spITIs.npy',spITIs)
51.615385
162
0.81073
89
671
5.797753
0.337079
0.313953
0.110465
0.156977
0.546512
0.546512
0.546512
0.290698
0
0
0
0.003155
0.055142
671
13
163
51.615385
0.810726
0
0
0
0
0
0.248512
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
2
fd6ba7ba1979062899ef77a2f2ebee1332127153
374
py
Python
makenew_python_app/server/boot.py
makenew/python-app
5f3c6669efe6e80d356d39afb712d72bf0e69916
[ "MIT" ]
2
2021-01-10T05:54:37.000Z
2021-01-12T01:24:38.000Z
makenew_python_app/server/boot.py
makenew/python-app
5f3c6669efe6e80d356d39afb712d72bf0e69916
[ "MIT" ]
null
null
null
makenew_python_app/server/boot.py
makenew/python-app
5f3c6669efe6e80d356d39afb712d72bf0e69916
[ "MIT" ]
null
null
null
from os import environ, path from .server import Server from .config import configure def boot(create_dependencies): config_path = environ.get("PYAPP_CONFIG_PATH") or path.realpath( path.join(path.dirname(__file__), "..", "..", "config") ) server = Server(create_dependencies, config_path) server.update_config_factory(configure) server.run()
26.714286
68
0.716578
46
374
5.565217
0.478261
0.117188
0.1875
0.21875
0
0
0
0
0
0
0
0
0.165775
374
13
69
28.769231
0.820513
0
0
0
0
0
0.072193
0
0
0
0
0
0
1
0.1
false
0
0.3
0
0.4
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
fd71c4f7dcacba2ce5484fe215f8d27faba98441
6,603
py
Python
src/morphforgecontrib/simulation/channels/hh_style/neuron/mm_neuron_alphabetabeta.py
mikehulluk/morphforge
2a95096f144ed4ea487decb735ce66706357d3c7
[ "BSD-2-Clause" ]
1
2021-01-21T11:31:59.000Z
2021-01-21T11:31:59.000Z
src/morphforgecontrib/simulation/channels/hh_style/neuron/mm_neuron_alphabetabeta.py
mikehulluk/morphforge
2a95096f144ed4ea487decb735ce66706357d3c7
[ "BSD-2-Clause" ]
null
null
null
src/morphforgecontrib/simulation/channels/hh_style/neuron/mm_neuron_alphabetabeta.py
mikehulluk/morphforge
2a95096f144ed4ea487decb735ce66706357d3c7
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Copyright (c) 2012 Michael Hull. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # - Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # - Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ---------------------------------------------------------------------- from ..core import StdChlAlphaBetaBeta from morphforge.units import qty from morphforge import units from hocmodbuilders.mmwriter_alphabetabeta import NEURONChlWriterAlphaBetaBeta from morphforge.simulation.neuron.hocmodbuilders import HocModUtils from morphforge.simulation.neuron import NEURONChl_Base from morphforge.constants.standardtags import StandardTags from morphforge.simulation.neuron.core.neuronsimulationenvironment import NEURONEnvironment from morphforge.simulation.neuron.objects.neuronrecordable import NEURONRecordableOnLocation class NEURONChl_AlphaBetaBeta_Record(NEURONRecordableOnLocation): def __init__(self, alphabeta_beta_chl, modvar, **kwargs): super(NEURONChl_AlphaBetaBeta_Record, self).__init__(**kwargs) self.alphabeta_beta_chl = alphabeta_beta_chl self.modvar = modvar def build_mod(self, modfile_set): pass def build_hoc(self, hocfile_obj): HocModUtils.create_record_from_modfile( hocfile_obj, vecname='RecVec%s' % self.name, cell_location=self.cell_location, modvariable=self.modvar, mod_neuronsuffix=self.alphabeta_beta_chl.get_neuron_suffix(), recordobj=self, ) def get_description(self): return '%s %s %s' % (self.modvar, self.alphabeta_beta_chl.name, self.cell_location.get_location_description_str()) class NEURONChl_AlphaBetaBeta_CurrentDensityRecord(NEURONChl_AlphaBetaBeta_Record): def __init__(self, **kwargs): super(NEURONChl_AlphaBetaBeta_CurrentDensityRecord, self).__init__(modvar='i', **kwargs) def get_unit(self): return units.parse_unit_str('mA/cm2') def get_std_tags(self): return [StandardTags.CurrentDensity] class NEURONChl_AlphaBetaBeta_ConductanceDensityRecord(NEURONChl_AlphaBetaBeta_Record): def __init__(self, **kwargs): super(NEURONChl_AlphaBetaBeta_ConductanceDensityRecord, self).__init__(modvar='g', **kwargs) def get_unit(self): return qty('S/cm2') def get_std_tags(self): return [StandardTags.ConductanceDensity] class NEURONChl_AlphaBetaBeta_StateVariableRecord(NEURONChl_AlphaBetaBeta_Record): def __init__(self, state, **kwargs): super(NEURONChl_AlphaBetaBeta_StateVariableRecord, self).__init__(modvar=state, **kwargs) def get_unit(self): return qty('') def get_std_tags(self): return [StandardTags.StateVariable] class NEURONChl_AlphaBetaBeta_StateVariableTauRecord(NEURONChl_AlphaBetaBeta_Record): def __init__(self, state, **kwargs): super(NEURONChl_AlphaBetaBeta_StateVariableTauRecord, self).__init__(modvar=state + 'tau', **kwargs) def get_unit(self): return qty('ms') def get_std_tags(self): return [StandardTags.StateTimeConstant] class NEURONChl_AlphaBetaBeta_StateVariableInfRecord(NEURONChl_AlphaBetaBeta_Record): def __init__(self, state, **kwargs): super(NEURONChl_AlphaBetaBeta_StateVariableInfRecord, self).__init__(modvar=state + 'inf', **kwargs) def get_unit(self): return qty('') def get_std_tags(self): return [StandardTags.StateSteadyState] class NEURONChl_AlphaBetaBeta(StdChlAlphaBetaBeta, NEURONChl_Base): class Recordables(object): CurrentDensity = StandardTags.CurrentDensity def __init__(self, **kwargs): super( NEURONChl_AlphaBetaBeta, self).__init__(**kwargs) def build_hoc_section(self, cell, section, hocfile_obj, mta): return NEURONChlWriterAlphaBetaBeta.build_hoc_section(cell=cell, section=section, hocfile_obj=hocfile_obj, mta=mta) def create_modfile(self, modfile_set): NEURONChlWriterAlphaBetaBeta.build_mod(alphabeta_beta_chl=self, modfile_set=modfile_set) def get_recordable(self, what, name, cell_location, **kwargs): recorders = { StdChlAlphaBetaBeta.Recordables.CurrentDensity: NEURONChl_AlphaBetaBeta_CurrentDensityRecord, } return recorders[what](alphabeta_beta_chl=self, cell_location= cell_location, name=name, **kwargs ) def get_mod_file_changeables(self): # If this fails, then the attirbute probably needs to be added to the list below: change_attrs = set([ 'conductance', 'beta2threshold', 'ion', 'eqn', 'conductance', 'statevars', 'reversalpotential', ]) assert set(self.__dict__) == set(['mm_neuronNumber','_name','_simulation', 'cachedNeuronSuffix']) | change_attrs attrs = [ 'ion', 'eqn', 'conductance', 'statevars', 'reversalpotential', 'beta2threshold', ] return dict([(a, getattr(self, a)) for a in attrs]) # Register the channel NEURONEnvironment.channels.register_plugin( StdChlAlphaBetaBeta, NEURONChl_AlphaBetaBeta)
33.015
123
0.69741
696
6,603
6.363506
0.324713
0.104312
0.042673
0.052156
0.228494
0.198239
0.192368
0.161436
0.144276
0.144276
0
0.00171
0.202787
6,603
199
124
33.180905
0.839666
0.239285
0
0.298077
0
0
0.042268
0
0
0
0
0
0.009615
1
0.230769
false
0.009615
0.086538
0.115385
0.528846
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
2
fd8b4419a03211dab8726d274c1ded97471a7d78
1,150
py
Python
cloudshell/huawei/wdm/cli/huawei_cli_handler.py
QualiSystems/cloudshell-huawei-wdm
be359a6bc81fd1644e3cb2a619b7c296a17a2e68
[ "Apache-2.0" ]
null
null
null
cloudshell/huawei/wdm/cli/huawei_cli_handler.py
QualiSystems/cloudshell-huawei-wdm
be359a6bc81fd1644e3cb2a619b7c296a17a2e68
[ "Apache-2.0" ]
1
2021-04-11T18:57:18.000Z
2021-04-11T18:57:18.000Z
cloudshell/huawei/wdm/cli/huawei_cli_handler.py
QualiSystems/cloudshell-huawei-wdm
be359a6bc81fd1644e3cb2a619b7c296a17a2e68
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- from cloudshell.cli.service.cli_service_impl import CliServiceImpl from cloudshell.huawei.cli.huawei_cli_handler import HuaweiCli, HuaweiCliHandler from cloudshell.huawei.wdm.cli.huawei_command_modes import ( WDMConfigCommandMode, WDMEnableCommandMode, ) class HuaweiWDMCli(HuaweiCli): def get_cli_handler(self, resource_config, logger): return HuaweiWDMCliHandler(self.cli, resource_config, logger) class HuaweiWDMCliHandler(HuaweiCliHandler): @property def default_mode(self): return self.modes[WDMEnableCommandMode] @property def enable_mode(self): return self.modes[WDMEnableCommandMode] @property def config_mode(self): return self.modes[WDMConfigCommandMode] def _on_session_start(self, session, logger): """Send default commands to configure/clear session outputs.""" cli_service = CliServiceImpl( session=session, requested_command_mode=self.enable_mode, logger=logger ) cli_service.send_command( "screen-length 0 temporary", WDMEnableCommandMode.PROMPT )
30.263158
83
0.727826
122
1,150
6.680328
0.418033
0.04908
0.051534
0.066258
0.160736
0.132515
0.132515
0.132515
0
0
0
0.002144
0.188696
1,150
37
84
31.081081
0.871383
0.083478
0
0.192308
0
0
0.023878
0
0
0
0
0
0
1
0.192308
false
0
0.115385
0.153846
0.538462
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
2
fd8b6f3ec4c3956c2a4af1d583d22afb4c1f7e8e
1,510
py
Python
pretalx_orcid/migrations/0001_initial.py
pretalx/pretalx-orcid
a10adf5bf5579bd7818db7697d49176114c9714e
[ "Apache-2.0" ]
1
2020-02-07T12:32:15.000Z
2020-02-07T12:32:15.000Z
pretalx_orcid/migrations/0001_initial.py
pretalx/pretalx-orcid
a10adf5bf5579bd7818db7697d49176114c9714e
[ "Apache-2.0" ]
4
2019-11-26T04:02:02.000Z
2022-03-06T02:06:54.000Z
pretalx_orcid/migrations/0001_initial.py
pretalx/pretalx-orcid
a10adf5bf5579bd7818db7697d49176114c9714e
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.2.7 on 2019-11-20 14:10 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name="OrcidProfile", fields=[ ( "id", models.AutoField( auto_created=True, primary_key=True, serialize=False ), ), ("orcid", models.CharField(blank=True, max_length=40, null=True)), ( "access_token", models.CharField(blank=True, max_length=40, null=True), ), ( "refresh_token", models.CharField(blank=True, max_length=40, null=True), ), ("scope", models.CharField(blank=True, max_length=40, null=True)), ("expires_in", models.CharField(blank=True, max_length=20, null=True)), ( "user", models.OneToOneField( on_delete=django.db.models.deletion.CASCADE, related_name="orcid_profile", to=settings.AUTH_USER_MODEL, ), ), ], ), ]
31.458333
87
0.47947
131
1,510
5.389313
0.465649
0.106232
0.141643
0.169972
0.304533
0.304533
0.25779
0.25779
0.25779
0.135977
0
0.028604
0.421192
1,510
47
88
32.12766
0.779176
0.029801
0
0.225
1
0
0.051948
0
0
0
0
0
0
1
0
false
0
0.075
0
0.175
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
fd8eaa1dd13d7842905f05439abe0c727ac76666
2,918
py
Python
30-Days-of-Python-master/practice_day_9/alpha_day_9/akash_prank.py
vimm0/python_exercise
7773d95b4c25b82a9d014f7a814ac83df9ebac17
[ "MIT" ]
null
null
null
30-Days-of-Python-master/practice_day_9/alpha_day_9/akash_prank.py
vimm0/python_exercise
7773d95b4c25b82a9d014f7a814ac83df9ebac17
[ "MIT" ]
null
null
null
30-Days-of-Python-master/practice_day_9/alpha_day_9/akash_prank.py
vimm0/python_exercise
7773d95b4c25b82a9d014f7a814ac83df9ebac17
[ "MIT" ]
1
2018-01-04T16:27:31.000Z
2018-01-04T16:27:31.000Z
class Akash(): msg=""" Seems like you are in trouble now. I can feel that...hahaaa Your name:Akash Address:Nepalgunj """ another=""" I am not really good friend of yours becauase i am going transfer some viruses from the internet.\n I Know everythings about you??:P.....Press Enter extract virus """ last_message = """ # ## ### #### ##### ####### ####### ######## ######## ######### ########## ############ ############## ################ ################ # ############## ### Installing viruses.... ############## #### GoodByee...!! ############## ##### Computer will turn off in one minute ############## ####### ############## ########### ############### ############# ################ ############## ################# # ################ ################## ## # ################# #################### ### ## ################# ################ ######## ################# ################ ####### ################### ####################### ##################### ##################### ################### ############################################ ########################################### ########################################## ######################################## ######################################## ###################################### ###################################### ########################## ##### ### ################### ## ## ############### # ## ########## ## ### ### Ghost Computer ## Arch Linux # sudo:vimm0 """ def question_answer(self): var2=[] var1 = input("Hello, dear what is your name?: ") print("Ohh!! {var1} is nice name to have. ".format(var1=var1)) var2 = input( "Do you want to install virus?") print(self.msg) print(self.another) print(self.last_message) if __name__=="__main__": obj=Akash() obj.question_answer()
35.156627
119
0.186429
118
2,918
4.508475
0.694915
0.050752
0
0
0
0
0
0
0
0
0
0.004403
0.455106
2,918
82
120
35.585366
0.330189
0
0
0.338235
0
0
0.885881
0.128855
0
0
0
0
0
1
0.014706
false
0
0
0
0.073529
0.058824
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
fd969867a45418ad24a3e7bb303872fc31aae097
541
py
Python
scripts/set_left_arm2static_pose.py
birlrobotics/birl_kitting_experiment
75cf42b6fd187b12e99b0e916c73058f429a556c
[ "BSD-3-Clause" ]
2
2019-06-03T03:33:50.000Z
2019-12-30T05:43:34.000Z
scripts/set_left_arm2static_pose.py
birlrobotics/birl_kitting_experiment
75cf42b6fd187b12e99b0e916c73058f429a556c
[ "BSD-3-Clause" ]
null
null
null
scripts/set_left_arm2static_pose.py
birlrobotics/birl_kitting_experiment
75cf42b6fd187b12e99b0e916c73058f429a556c
[ "BSD-3-Clause" ]
1
2019-12-30T05:43:35.000Z
2019-12-30T05:43:35.000Z
#!/usr/bin/env python import baxter_interface import rospy if __name__ == '__main__': rospy.init_node("set_left_arm_py") names = ['left_e0', 'left_e1', 'left_s0', 'left_s1', 'left_w0', 'left_w1', 'left_w2'] joints = [-0.8022719520640714, 1.7184419776286348, 0.21399031991001521, 0.324436936637765, 2.5862916083748075, -0.5825292041994858, -0.3566505331833587] combined = zip(names, joints) command = dict(combined) left = baxter_interface.Limb('left') left.move_to_joint_positions(command) print "Done"
28.473684
156
0.713494
69
541
5.246377
0.681159
0.082873
0
0
0
0
0
0
0
0
0
0.273319
0.147874
541
18
157
30.055556
0.511931
0.036969
0
0
0
0
0.155039
0
0
0
0
0
0
0
null
null
0
0.181818
null
null
0.090909
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
2
fd9edbd2527ab031760844081c4c8a7d476ee612
2,344
py
Python
src/tcp/registration/pygame_labeler.py
Iszhanghailun/Traffic_Camera_Pipeline
4dbd0e993087d46066a780f5345c125f47b28881
[ "MIT" ]
5
2019-04-04T17:30:41.000Z
2021-12-06T15:27:43.000Z
src/tcp/registration/pygame_labeler.py
Iszhanghailun/Traffic_Camera_Pipeline
4dbd0e993087d46066a780f5345c125f47b28881
[ "MIT" ]
2
2018-02-07T06:22:08.000Z
2020-04-20T06:54:52.000Z
src/tcp/registration/pygame_labeler.py
Iszhanghailun/Traffic_Camera_Pipeline
4dbd0e993087d46066a780f5345c125f47b28881
[ "MIT" ]
7
2018-02-06T23:23:29.000Z
2020-09-20T14:48:22.000Z
import sys, os import gym import gym_urbandriving as uds import cProfile import time import numpy as np import pickle import skimage.transform import cv2 import IPython import pygame from random import shuffle from gym_urbandriving.agents import KeyboardAgent, AccelAgent, NullAgent, TrafficLightAgent#, RRTAgent from gym_urbandriving.assets import Car, TrafficLight import colorlover as cl class PygameLabeler(): def __init__(self,config): self.config = config def initalize_simulator(self): ''' Initializes the simulator ''' self.vis = uds.PyGameVisualizer((800, 800)) # Create a simple-intersection state, with no agents self.init_state = uds.state.SimpleIntersectionState(ncars=0, nped=0, traffic_lights=True) # Create the world environment initialized to the starting state # Specify the max time the environment will run to 500 # Randomize the environment when env._reset() is called # Specify what types of agents will control cars and traffic lights # Use ray for multiagent parallelism self.env = uds.UrbanDrivingEnv(init_state=self.init_state, visualizer=self.vis, max_time=500, randomize=False, agent_mappings={Car:NullAgent, TrafficLight:TrafficLightAgent}, use_ray=False ) self.env._reset(new_state=self.init_state) def sim_labeler(self): ''' Visualize the sperated trajecotries in the simulator and can also visualize the matching images Parameter ------------ trajectories: list of Trajectory A list of Trajectory Class plot_traffic_images: bool True if the images from the traffic cam should be shown alongside the simulator ''' self.initalize_simulator() while True: values = pygame.mouse.get_pressed() self.env._render(traffic_trajectories = self.config.registration_points) if values[0]: pose = pygame.mouse.get_pos() return np.array([pose[0],pose[1]])/0.8
26.942529
103
0.610922
256
2,344
5.484375
0.496094
0.025641
0.027778
0.025641
0
0
0
0
0
0
0
0.012674
0.326792
2,344
86
104
27.255814
0.87706
0.276024
0
0
0
0
0
0
0
0
0
0
0
1
0.078947
false
0
0.394737
0
0.526316
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
fda4de20d32afa6769144964f3e6cd00599e20ed
7,400
py
Python
data.py
MicBrain/Laziness-Finder
42f0a8c21ca80f81c540914b7fbe7d0491b5452b
[ "MIT" ]
3
2015-01-06T19:58:47.000Z
2015-06-08T19:47:11.000Z
data.py
MicBrain/Laziness-Finder
42f0a8c21ca80f81c540914b7fbe7d0491b5452b
[ "MIT" ]
null
null
null
data.py
MicBrain/Laziness-Finder
42f0a8c21ca80f81c540914b7fbe7d0491b5452b
[ "MIT" ]
null
null
null
import csv # Finding States' Laziness Rankings: # dataDict = {} with open('data.csv', 'rU') as csvfile: dataReader = csv.reader(csvfile, delimiter=',') for row in dataReader: state = row[0] row.pop(0) dataDict[state] = row projectedmeans = [] with open('rafadata.csv', 'rb') as csvfile: dataReader = csv.reader(csvfile, delimiter=',') for row in dataReader: projectedmeans.append(row[0]) gdps = [] with open('gdp data.csv', 'rb') as csvfile: dataReader = csv.reader(csvfile, delimiter=',') for row in dataReader: for letter in row[1]: if letter == ',': row[1].remove(letter) gdps.append((row[0], float(row[1]))) gdps.sort(key=lambda x: x[0]) obesitylevels = [] with open('Obesity data.csv', 'rb') as csvfile: dataReader = csv.reader(csvfile, delimiter=',') for row in dataReader: for letter in row[1]: if letter == ',': row[1].remove(letter) obesitylevels.append((row[0], float(row[1]))) educationlevels = [] with open('education data.csv', 'rb') as csvfile: dataReader = csv.reader(csvfile, delimiter=',') for row in dataReader: for letter in row[1]: if letter == ',': row[1].remove(letter) educationlevels.append((row[0], float(row[1]))) educationlevels.sort(key=lambda x: x[0]) projectedmeans = map(float, projectedmeans) meanlist = [] for i in dataDict: i = [i] meanlist.append(i) index = 0 while index < 50: meanlist[index].append(projectedmeans[index]) index +=1 # Add relevant information # meanlist.sort(key=lambda x: x[0]) index = 0 while index<50: meanlist[index].append(gdps[index][1]) meanlist[index].append(obesitylevels[index][1]) meanlist[index].append(educationlevels[index][1]) index +=1 meanlist.sort(key=lambda x: x[1], reverse= True) # Adding rank to each state# index = 0 rank = 10 n = 0 go = True while go: for i in range(0,5): meanlist[index].insert(0, rank) index +=1 rank -=1 if rank ==0: go = False #Finding your laziness ranking: # answers = [] import os os.system('clear') print("Laziness Ranker Version 1.0") print print("Question 1") print print("Which of the following activities is your favorite?") print print("A. Going rock climbing.") print("B. Gardening") print("C. Hanging out with friends") print("D. Playing GTA V") print answer = raw_input("Please enter the letter of your answer here: ").lower() answers.append(answer) os.system('clear') print print("Question 2") print print("If you saw a baby drowning in a pool, what would you do FIRST?") print print("A. Jump in immediately to save it.") print("B. Make sure no one else is already diving in before saving it.") print("C. Call 911") print("D. Slowly put down your sweaty cheesburger and wipe the ketchup from your fingers before applying sun lotion to make sure you don't get burnt whilst saving the poor kid") print answer = raw_input("Please enter the letter of your answer here: ").lower() answers.append(answer) os.system('clear') print print("Question 3") print print("What is the reminder of 47/2?") print print("A. 1") print("B. 47") print("C. Can I phone a friend?") print("D. I'm skipping this question.") print answer = raw_input("Please enter the letter of your answer here: ").lower() answers.append(answer) os.system('clear') print print("Question 4") print print("What's your favorite movie?") print print("A. Donnie Darko") print("B. Inception") print("C. The Avengers") print("D. Anything with Adam Sandler.") print answer = raw_input("Please enter the letter of your answer here: ").lower() answers.append(answer) os.system('clear') print print("Question 5") print print("Approximately how much of your leisure time is spent doing physical activity?") print print("A. 80%") print("B. 50%") print("C. 30%") print("D. 10%") print answer = raw_input("Please enter the letter of your answer here: ").lower() answers.append(answer) os.system('clear') print print("Question 6") print print("What would you do if someone ran by and snatched your purse/wallet?") print print("A. Trip the basterd.") print("B. Run after the stealer.") print("C. Call 911") print("D. 'Eh. Wasn't that great of a wallet anyway.'") print answer = raw_input("Please enter the letter of your answer here: ").lower() answers.append(answer) os.system('clear') print print("Question 7") print print("What is your favorite nightly activity?") print print("A. Krav Maga.") print("B. Taking the dog for a walk") print("C. Watching TV") print("D. Watching cat videos on Youtube") print answer = raw_input("Please enter the letter of your answer here: ").lower() answers.append(answer) os.system('clear') print print("Question 8") print print("Which item is closest to you at your desk in your room?") print print("A. Treadmill") print("B. Stress ball") print("C. Potato chips") print("D. Everything is way too far away for my arm to reach.") print answer = raw_input("Please enter the letter of your answer here: ").lower() answers.append(answer) os.system('clear') print print("Question 9") print print("What's your favorite animal?") print print("A. Freakin' Tigers") print("B. Hawks") print("C. Turtles") print("D. Sloths") print answer = raw_input("Please enter the letter of your answer here: ").lower() answers.append(answer) os.system('clear') print print("Question 10") print print("Why are we here?") print print("A. To understand our world, and help each other out at the same time") print("B. To eat and mate.") print("C. It's way too early in the morning for this type of question.") print("D. It's way too late in the evening for this type of question.") print answer = raw_input("Please enter the letter of your answer here: ").lower() answers.append(answer) def score(inputlist): total = 0 for i in inputlist: if i=='a': total += 4 elif i =='b': total += 3 elif i =='c': total += 2 elif i =='d': total += 1 return total def rank(score): if score<=13: return 10 elif score>13 and score<=16: return 9 elif score>16 and score<=19: return 8 elif score>19 and score<=22: return 7 elif score>22 and score<=25: return 6 elif score>25 and score<=28: return 5 elif score>28 and score<=31: return 4 elif score>31 and score<=34: return 3 elif score>34 and score<=37: return 2 elif score>37: return 1 rank = rank(score(answers)) # Matching you with a group of states # def correctstate(somelist): if somelist[0]==rank: return True else: return False yourstates1 = filter(correctstate, meanlist) yourstates = [] index = 0 while index<len(yourstates1): yourstates.append(yourstates1[index]) index +=1 def returnstates(listvalues, index): print print listvalues[index][1] print print("GDP per Capita: $" + str(listvalues[index][3])) print("Obesity percentage: " + str(listvalues[index][4]) + "%") print("Education ranking (out of 100): " + str(listvalues[index][5])) os.system('clear') print("Based on your level of physical activity, we suggest you move to one of these states:") print returnstates(yourstates, 0) returnstates(yourstates, 1) returnstates(yourstates, 2) returnstates(yourstates, 3) returnstates(yourstates, 4)
24.749164
177
0.672973
1,121
7,400
4.433541
0.252453
0.064386
0.028773
0.039839
0.395372
0.385312
0.339235
0.325553
0.310664
0.310664
0
0.023873
0.190541
7,400
299
178
24.749164
0.805843
0.020811
0
0.403846
0
0.003846
0.329233
0
0
0
0
0
0
0
null
null
0
0.007692
null
null
0.419231
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
2
fdab78fe2c0240156557e76473319683d8e4d96e
291
py
Python
hippynn/interfaces/__init__.py
tautomer/hippynn
df4504a5ea4680cfc61f490984dcddeac7ed99ee
[ "BSD-3-Clause" ]
21
2021-11-17T00:56:35.000Z
2022-03-22T05:57:11.000Z
hippynn/interfaces/__init__.py
tautomer/hippynn
df4504a5ea4680cfc61f490984dcddeac7ed99ee
[ "BSD-3-Clause" ]
4
2021-12-17T16:16:53.000Z
2022-03-16T23:50:38.000Z
hippynn/interfaces/__init__.py
tautomer/hippynn
df4504a5ea4680cfc61f490984dcddeac7ed99ee
[ "BSD-3-Clause" ]
6
2021-11-30T21:09:31.000Z
2022-03-18T07:07:32.000Z
""" ``hippynn`` currently has interfaces to the following other codes: 1. ``ase`` for atomic simulation 2. ``pyseqm`` for combined ML-seqm models 3. ``schnetpack`` for usage of schnet models in ``hippynn``. This subpackage is not available by default; you must import it explicitly. """
24.25
75
0.721649
42
291
5
0.904762
0
0
0
0
0
0
0
0
0
0
0.012295
0.161512
291
11
76
26.454545
0.848361
0.962199
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
2
fdad5082e78e4cecb0dc06f0019827b83dac2415
4,699
py
Python
ntee/utils/model_reader.py
AdityaAS/PyTorch_NTEE
a1dc5cc6cd22fc9de3f054fa35f50b975bae75ce
[ "MIT" ]
1
2019-01-15T11:21:08.000Z
2019-01-15T11:21:08.000Z
ntee/utils/model_reader.py
AdityaAS/PyTorch_NTEE
a1dc5cc6cd22fc9de3f054fa35f50b975bae75ce
[ "MIT" ]
null
null
null
ntee/utils/model_reader.py
AdityaAS/PyTorch_NTEE
a1dc5cc6cd22fc9de3f054fa35f50b975bae75ce
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import joblib import torch import numpy as np from ntee.utils.my_tokenizer import RegexpTokenizer from ntee.utils.vocab_joint import JointVocab from ntee.utils.vocab import Vocab class ModelReader(object): def __init__(self, model_file): model = joblib.load(model_file, mmap_mode='r') self._word_embedding = model['word_embedding'] self._entity_embedding = model['entity_embedding'] self._W = model.get('W') self._b = model.get('b') self._vocab = model.get('vocab') self._tokenizer = RegexpTokenizer() @property def vocab(self): return self._vocab @property def word_embedding(self): return self._word_embedding @property def entity_embedding(self): return self._entity_embedding @property def W(self): return self._W @property def b(self): return self._b def get_word_vector(self, word, default=None): index = self._vocab.get_word_index(word) if index: return self.word_embedding[index] else: return default def get_entity_vector(self, title, default=None): index = self._vocab.get_entity_index(title) if index: return self.entity_embedding[index] else: return default def get_text_vector(self, text): vectors = [self.get_word_vector(t.text.lower()) for t in self._tokenizer.tokenize(text)] vectors = [v for v in vectors if v is not None] if not vectors: return None ret = np.mean(vectors, axis=0) ret = np.dot(ret, self._W) ret += self._b ret /= np.linalg.norm(ret, 2) return ret class PyTorchModelReader(object): def __init__(self, model_file, vocab_file, modelname, cpuflag=False): model = torch.load(model_file) if cpuflag: #CPU Tensors self._word_embedding = model['word_embedding.weight'].cpu() self._entity_embedding = model['entity_embedding.weight'].cpu() if modelname.lower() == 'ntee': self._vocab = Vocab.load(vocab_file) else: self._relation_embedding = model['relation_embedding.weight'].cpu() self._vocab = JointVocab.load(vocab_file) self._W = model.get('W').cpu() self._b = model.get('b').cpu() else: #GPU Tensors self._word_embedding = model['word_embedding.weight'] self._entity_embedding = model['entity_embedding.weight'] if modelname.lower() == 'ntee': self._vocab = Vocab.load(vocab_file) else: self._relation_embedding = model['relation_embedding.weight'] self._vocab = JointVocab.load(vocab_file) self._W = model.get('W') self._b = model.get('b') self._tokenizer = RegexpTokenizer() @property def vocab(self): return self._vocab @property def word_embedding(self): return self._word_embedding @property def entity_embedding(self): return self._entity_embedding @property def relation_embedding(self): return self._relation_embedding @property def W(self): return self._W @property def b(self): return self._b def get_word_vector(self, word, default=None): index = self._vocab.get_word_index(word) if index: return self.word_embedding[index] else: return default def get_entity_vector(self, title, default=None): index = self._vocab.get_entity_index(title) if index: return self.entity_embedding[index] else: return default def get_text_vector(self, text): vectors = [self.get_word_vector(t.text.lower()) for t in self._tokenizer.tokenize(text)] vectors = [v for v in vectors if v is not None] # vectors_numpy = [v.cpu().numpy() for v in vectors if v is not None] # ret_numpy = np.mean(vectors_numpy, axis=0) # ret_numpy = np.dot(ret_numpy, self._W.cpu().numpy()) # ret_numpy += self._b.cpu().numpy() # ret_numpy /= np.linalg.norm(ret_numpy, 2) # return ret_numpy if not vectors: return None ret = torch.zeros(vectors[0].shape) for v in vectors: ret += v ret = ret / len(vectors) ret = torch.matmul(ret, self._W) ret += self._b ret /= torch.norm(ret, 2) return ret
27.970238
83
0.589062
571
4,699
4.625219
0.1331
0.056797
0.058311
0.043544
0.759182
0.741007
0.674366
0.625899
0.589549
0.580083
0
0.002158
0.30964
4,699
167
84
28.137725
0.811961
0.064056
0
0.710744
0
0
0.042844
0.031449
0
0
0
0
0
1
0.157025
false
0
0.049587
0.090909
0.413223
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
fdc29b2d1755fa39792e6b6765f17fb3cfeeb9de
1,166
py
Python
commlib/utils.py
robotics-4-all/commlib-py
9d56e0a2e13410feac0e10d9866a1c4a60ade2c7
[ "MIT" ]
1
2021-06-09T09:32:53.000Z
2021-06-09T09:32:53.000Z
commlib/utils.py
robotics-4-all/commlib-py
9d56e0a2e13410feac0e10d9866a1c4a60ade2c7
[ "MIT" ]
7
2022-03-10T23:57:25.000Z
2022-03-13T19:12:54.000Z
commlib/utils.py
robotics-4-all/commlib-py
9d56e0a2e13410feac0e10d9866a1c4a60ade2c7
[ "MIT" ]
1
2021-06-07T16:25:05.000Z
2021-06-07T16:25:05.000Z
import re import uuid import time from typing import (Any, Callable, Dict, List, Optional, Tuple, Type, TypeVar, Union, Text) def camelcase_to_snakecase(_str: str) -> str: """camelcase_to_snakecase. Transform a camelcase string to snakecase Args: _str (str): String to apply transformation. Returns: str: Transformed string """ s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', _str) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower() def gen_timestamp() -> int: """gen_timestamp. Generate a timestamp. Args: Returns: int: Timestamp in integer representation. User `str()` to transform to string. """ return int(1.0 * (time.time() + 0.5) * 1000) def gen_random_id() -> str: """gen_random_id. Generates a random unique id, using the uuid library. Args: Returns: str: String representation of the random unique id """ return str(uuid.uuid4()).replace('-', '') class Rate: def __init__(self, hz: int): self._hz = hz self._tsleep = 1.0 / hz def sleep(self): time.sleep(self._tsleep)
21.2
69
0.588336
155
1,166
4.283871
0.432258
0.049699
0.060241
0.012048
0.01506
0
0
0
0
0
0
0.022353
0.271012
1,166
54
70
21.592593
0.758824
0.381647
0
0
0
0
0.069401
0
0
0
0
0
0
1
0.277778
false
0
0.222222
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
0
0
0
1
0
0
0
0
1
0
0
2
fdc9a425f145a01bd193481bd02f81259f33f97c
21,351
py
Python
pysnmp/DHCP-Server-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/DHCP-Server-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/DHCP-Server-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 DHCP-Server-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DHCP-SERVER-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 18:31:49 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "SingleValueConstraint", "ValueRangeConstraint") dlink_common_mgmt, = mibBuilder.importSymbols("DLINK-ID-REC-MIB", "dlink-common-mgmt") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") Gauge32, ModuleIdentity, Counter32, Counter64, ObjectIdentity, MibIdentifier, IpAddress, NotificationType, Unsigned32, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, Integer32, iso, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "ModuleIdentity", "Counter32", "Counter64", "ObjectIdentity", "MibIdentifier", "IpAddress", "NotificationType", "Unsigned32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "Integer32", "iso", "TimeTicks") TextualConvention, RowStatus, MacAddress, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "RowStatus", "MacAddress", "DisplayString") swDHCPServerMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 171, 12, 38)) if mibBuilder.loadTexts: swDHCPServerMIB.setLastUpdated('200706080000Z') if mibBuilder.loadTexts: swDHCPServerMIB.setOrganization('D-Link Crop.') swDHCPServerCtrl = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 12, 38, 1)) swDHCPServerInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 12, 38, 2)) swDHCPServerMgmt = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 12, 38, 3)) swDHCPServerPoolMgmt = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2)) swDHCPServerBindingMgmt = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 4)) swDHCPServerState = MibScalar((1, 3, 6, 1, 4, 1, 171, 12, 38, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swDHCPServerState.setStatus('current') swDHCPServerPingPktNumber = MibScalar((1, 3, 6, 1, 4, 1, 171, 12, 38, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 10))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swDHCPServerPingPktNumber.setStatus('current') swDHCPServerPingTimeOut = MibScalar((1, 3, 6, 1, 4, 1, 171, 12, 38, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(10, 2000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swDHCPServerPingTimeOut.setStatus('current') swDHCPServerExcludedAddressTable = MibTable((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 1), ) if mibBuilder.loadTexts: swDHCPServerExcludedAddressTable.setStatus('current') swDHCPServerExcludedAddressEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 1, 1), ).setIndexNames((0, "DHCP-Server-MIB", "swDHCPServerExcludedAddressBegin"), (0, "DHCP-Server-MIB", "swDHCPServerExcludedAddressEnd")) if mibBuilder.loadTexts: swDHCPServerExcludedAddressEntry.setStatus('current') swDHCPServerExcludedAddressBegin = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 1, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: swDHCPServerExcludedAddressBegin.setStatus('current') swDHCPServerExcludedAddressEnd = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 1, 1, 2), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: swDHCPServerExcludedAddressEnd.setStatus('current') swDHCPServerExcludedAddressStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 1, 1, 3), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: swDHCPServerExcludedAddressStatus.setStatus('current') swDHCPServerPoolTable = MibTable((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 1), ) if mibBuilder.loadTexts: swDHCPServerPoolTable.setStatus('current') swDHCPServerPoolEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 1, 1), ).setIndexNames((0, "DHCP-Server-MIB", "swDHCPServerPoolName")) if mibBuilder.loadTexts: swDHCPServerPoolEntry.setStatus('current') swDHCPServerPoolName = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 1, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 12))).setMaxAccess("readonly") if mibBuilder.loadTexts: swDHCPServerPoolName.setStatus('current') swDHCPServerPoolNetworkAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 1, 1, 2), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: swDHCPServerPoolNetworkAddress.setStatus('current') swDHCPServerPoolNetworkAddressMask = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 1, 1, 3), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: swDHCPServerPoolNetworkAddressMask.setStatus('current') swDHCPServerPoolDomainName = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 1, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swDHCPServerPoolDomainName.setStatus('current') swDHCPServerPoolNetBIOSNodeType = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("broadcast", 1), ("peer-to-peer", 2), ("mixed", 3), ("hybid", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swDHCPServerPoolNetBIOSNodeType.setStatus('current') swDHCPServerPoolLeaseState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("predefined", 1), ("infinite", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swDHCPServerPoolLeaseState.setStatus('current') swDHCPServerPoolLeaseDay = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 365))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swDHCPServerPoolLeaseDay.setStatus('current') swDHCPServerPoolLeaseHour = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 23))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swDHCPServerPoolLeaseHour.setStatus('current') swDHCPServerPoolLeaseMinute = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 1, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 59))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swDHCPServerPoolLeaseMinute.setStatus('current') swDHCPServerPoolBootFile = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 1, 1, 10), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swDHCPServerPoolBootFile.setStatus('current') swDHCPServerPoolNextServer = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 1, 1, 11), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: swDHCPServerPoolNextServer.setStatus('current') swDHCPServerPoolStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 1, 1, 12), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: swDHCPServerPoolStatus.setStatus('current') swDHCPServerDNSServerAddressTable = MibTable((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 2), ) if mibBuilder.loadTexts: swDHCPServerDNSServerAddressTable.setStatus('current') swDHCPServerDNSServerAddressEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 2, 1), ).setIndexNames((0, "DHCP-Server-MIB", "swDHCPServerDNSServerPoolName"), (0, "DHCP-Server-MIB", "swDHCPServerDNSServerAddressIndex")) if mibBuilder.loadTexts: swDHCPServerDNSServerAddressEntry.setStatus('current') swDHCPServerDNSServerPoolName = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 12))).setMaxAccess("readonly") if mibBuilder.loadTexts: swDHCPServerDNSServerPoolName.setStatus('current') swDHCPServerDNSServerAddressIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: swDHCPServerDNSServerAddressIndex.setStatus('current') swDHCPServerDNSServerAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 2, 1, 3), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: swDHCPServerDNSServerAddress.setStatus('current') swDHCPServerDNSServerAddressStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 2, 1, 4), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: swDHCPServerDNSServerAddressStatus.setStatus('current') swDHCPServerNetBIOSNameServerTable = MibTable((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 3), ) if mibBuilder.loadTexts: swDHCPServerNetBIOSNameServerTable.setStatus('current') swDHCPServerNetBIOSNameServerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 3, 1), ).setIndexNames((0, "DHCP-Server-MIB", "swDHCPServerNetBIOSNameServerPoolName"), (0, "DHCP-Server-MIB", "swDHCPServerNetBIOSNameServerIndex")) if mibBuilder.loadTexts: swDHCPServerNetBIOSNameServerEntry.setStatus('current') swDHCPServerNetBIOSNameServerPoolName = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 3, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 12))).setMaxAccess("readonly") if mibBuilder.loadTexts: swDHCPServerNetBIOSNameServerPoolName.setStatus('current') swDHCPServerNetBIOSNameServerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 3, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: swDHCPServerNetBIOSNameServerIndex.setStatus('current') swDHCPServerNetBIOSNameServer = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 3, 1, 3), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: swDHCPServerNetBIOSNameServer.setStatus('current') swDHCPServerNetBIOSNameServerStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 3, 1, 4), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: swDHCPServerNetBIOSNameServerStatus.setStatus('current') swDHCPServerDefaultRouterTable = MibTable((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 4), ) if mibBuilder.loadTexts: swDHCPServerDefaultRouterTable.setStatus('current') swDHCPServerDefaultRouterEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 4, 1), ).setIndexNames((0, "DHCP-Server-MIB", "swDHCPServerDefaultRouterPoolName"), (0, "DHCP-Server-MIB", "swDHCPServerDefaultRouterIndex")) if mibBuilder.loadTexts: swDHCPServerDefaultRouterEntry.setStatus('current') swDHCPServerDefaultRouterPoolName = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 4, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 12))).setMaxAccess("readonly") if mibBuilder.loadTexts: swDHCPServerDefaultRouterPoolName.setStatus('current') swDHCPServerDefaultRouterIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 4, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: swDHCPServerDefaultRouterIndex.setStatus('current') swDHCPServerDefaultRouter = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 4, 1, 3), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: swDHCPServerDefaultRouter.setStatus('current') swDHCPServerDefaultRouterStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 2, 4, 1, 4), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: swDHCPServerDefaultRouterStatus.setStatus('current') swDHCPServerManualBindingTable = MibTable((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 3), ) if mibBuilder.loadTexts: swDHCPServerManualBindingTable.setStatus('current') swDHCPServerManualBindingEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 3, 1), ).setIndexNames((0, "DHCP-Server-MIB", "swDHCPServerManualBindingPoolName"), (0, "DHCP-Server-MIB", "swDHCPServerManualBindingIpAddress")) if mibBuilder.loadTexts: swDHCPServerManualBindingEntry.setStatus('current') swDHCPServerManualBindingPoolName = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 3, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 12))).setMaxAccess("readonly") if mibBuilder.loadTexts: swDHCPServerManualBindingPoolName.setStatus('current') swDHCPServerManualBindingIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 3, 1, 2), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: swDHCPServerManualBindingIpAddress.setStatus('current') swDHCPServerManualBindingHardwareAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 3, 1, 3), MacAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: swDHCPServerManualBindingHardwareAddress.setStatus('current') swDHCPServerManualBindingType = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 3, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("ethernet", 1), ("ieee802", 2), ("both", 3)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: swDHCPServerManualBindingType.setStatus('current') swDHCPServerManualBindingStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 3, 1, 5), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: swDHCPServerManualBindingStatus.setStatus('current') swDHCPServerBindingTable = MibTable((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 4), ) if mibBuilder.loadTexts: swDHCPServerBindingTable.setStatus('current') swDHCPServerBindingEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 4, 1), ).setIndexNames((0, "DHCP-Server-MIB", "swDHCPServerBindingPoolName"), (0, "DHCP-Server-MIB", "swDHCPServerBindingIpAddress")) if mibBuilder.loadTexts: swDHCPServerBindingEntry.setStatus('current') swDHCPServerBindingPoolName = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 4, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 12))).setMaxAccess("readonly") if mibBuilder.loadTexts: swDHCPServerBindingPoolName.setStatus('current') swDHCPServerBindingIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 4, 1, 2), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: swDHCPServerBindingIpAddress.setStatus('current') swDHCPServerBindingHardwareAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 4, 1, 3), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: swDHCPServerBindingHardwareAddress.setStatus('current') swDHCPServerBindingType = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 4, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("ethernet", 1), ("iee802", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: swDHCPServerBindingType.setStatus('current') swDHCPServerBindingStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 4, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("manual", 1), ("automatic", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: swDHCPServerBindingStatus.setStatus('current') swDHCPServerBindingLifeTime = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 4, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: swDHCPServerBindingLifeTime.setStatus('current') swDHCPServerBindingClearState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 4, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("none", 1), ("start", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swDHCPServerBindingClearState.setStatus('current') swDHCPServerConflictIPTable = MibTable((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 5), ) if mibBuilder.loadTexts: swDHCPServerConflictIPTable.setStatus('current') swDHCPServerConflictIPEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 5, 1), ).setIndexNames((0, "DHCP-Server-MIB", "swDHCPServerConflictIPIPAddress")) if mibBuilder.loadTexts: swDHCPServerConflictIPEntry.setStatus('current') swDHCPServerConflictIPIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 5, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: swDHCPServerConflictIPIPAddress.setStatus('current') swDHCPServerConflictIPDetectionMethod = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 5, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("ping", 1), ("gratuitous-arp", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: swDHCPServerConflictIPDetectionMethod.setStatus('current') swDHCPServerConflictIPDetectionTime = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 5, 1, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: swDHCPServerConflictIPDetectionTime.setStatus('current') swDHCPServerConflictIPClearState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 38, 3, 5, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("none", 1), ("start", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swDHCPServerConflictIPClearState.setStatus('current') mibBuilder.exportSymbols("DHCP-Server-MIB", swDHCPServerPoolName=swDHCPServerPoolName, swDHCPServerExcludedAddressEntry=swDHCPServerExcludedAddressEntry, swDHCPServerExcludedAddressEnd=swDHCPServerExcludedAddressEnd, swDHCPServerBindingMgmt=swDHCPServerBindingMgmt, swDHCPServerNetBIOSNameServerIndex=swDHCPServerNetBIOSNameServerIndex, swDHCPServerPoolTable=swDHCPServerPoolTable, swDHCPServerDefaultRouterStatus=swDHCPServerDefaultRouterStatus, swDHCPServerPoolNetBIOSNodeType=swDHCPServerPoolNetBIOSNodeType, swDHCPServerPoolLeaseState=swDHCPServerPoolLeaseState, swDHCPServerDefaultRouterTable=swDHCPServerDefaultRouterTable, swDHCPServerManualBindingTable=swDHCPServerManualBindingTable, swDHCPServerBindingLifeTime=swDHCPServerBindingLifeTime, swDHCPServerManualBindingType=swDHCPServerManualBindingType, swDHCPServerDNSServerAddress=swDHCPServerDNSServerAddress, swDHCPServerDefaultRouterIndex=swDHCPServerDefaultRouterIndex, swDHCPServerConflictIPTable=swDHCPServerConflictIPTable, swDHCPServerBindingPoolName=swDHCPServerBindingPoolName, swDHCPServerPingTimeOut=swDHCPServerPingTimeOut, swDHCPServerExcludedAddressBegin=swDHCPServerExcludedAddressBegin, swDHCPServerPoolMgmt=swDHCPServerPoolMgmt, swDHCPServerNetBIOSNameServerTable=swDHCPServerNetBIOSNameServerTable, swDHCPServerConflictIPDetectionMethod=swDHCPServerConflictIPDetectionMethod, swDHCPServerNetBIOSNameServerEntry=swDHCPServerNetBIOSNameServerEntry, swDHCPServerExcludedAddressTable=swDHCPServerExcludedAddressTable, swDHCPServerPoolNetworkAddressMask=swDHCPServerPoolNetworkAddressMask, swDHCPServerDNSServerAddressTable=swDHCPServerDNSServerAddressTable, swDHCPServerExcludedAddressStatus=swDHCPServerExcludedAddressStatus, swDHCPServerPingPktNumber=swDHCPServerPingPktNumber, swDHCPServerMgmt=swDHCPServerMgmt, swDHCPServerNetBIOSNameServerPoolName=swDHCPServerNetBIOSNameServerPoolName, swDHCPServerDefaultRouterEntry=swDHCPServerDefaultRouterEntry, swDHCPServerBindingEntry=swDHCPServerBindingEntry, swDHCPServerManualBindingPoolName=swDHCPServerManualBindingPoolName, swDHCPServerDefaultRouter=swDHCPServerDefaultRouter, swDHCPServerManualBindingHardwareAddress=swDHCPServerManualBindingHardwareAddress, swDHCPServerPoolLeaseMinute=swDHCPServerPoolLeaseMinute, swDHCPServerBindingType=swDHCPServerBindingType, swDHCPServerBindingClearState=swDHCPServerBindingClearState, swDHCPServerDNSServerPoolName=swDHCPServerDNSServerPoolName, swDHCPServerManualBindingIpAddress=swDHCPServerManualBindingIpAddress, swDHCPServerBindingHardwareAddress=swDHCPServerBindingHardwareAddress, swDHCPServerConflictIPEntry=swDHCPServerConflictIPEntry, swDHCPServerInfo=swDHCPServerInfo, swDHCPServerState=swDHCPServerState, PYSNMP_MODULE_ID=swDHCPServerMIB, swDHCPServerCtrl=swDHCPServerCtrl, swDHCPServerPoolLeaseHour=swDHCPServerPoolLeaseHour, swDHCPServerDNSServerAddressEntry=swDHCPServerDNSServerAddressEntry, swDHCPServerNetBIOSNameServer=swDHCPServerNetBIOSNameServer, swDHCPServerBindingIpAddress=swDHCPServerBindingIpAddress, swDHCPServerBindingStatus=swDHCPServerBindingStatus, swDHCPServerPoolBootFile=swDHCPServerPoolBootFile, swDHCPServerPoolStatus=swDHCPServerPoolStatus, swDHCPServerPoolDomainName=swDHCPServerPoolDomainName, swDHCPServerManualBindingEntry=swDHCPServerManualBindingEntry, swDHCPServerConflictIPClearState=swDHCPServerConflictIPClearState, swDHCPServerBindingTable=swDHCPServerBindingTable, swDHCPServerManualBindingStatus=swDHCPServerManualBindingStatus, swDHCPServerMIB=swDHCPServerMIB, swDHCPServerPoolNextServer=swDHCPServerPoolNextServer, swDHCPServerConflictIPIPAddress=swDHCPServerConflictIPIPAddress, swDHCPServerNetBIOSNameServerStatus=swDHCPServerNetBIOSNameServerStatus, swDHCPServerDNSServerAddressStatus=swDHCPServerDNSServerAddressStatus, swDHCPServerDefaultRouterPoolName=swDHCPServerDefaultRouterPoolName, swDHCPServerPoolEntry=swDHCPServerPoolEntry, swDHCPServerPoolNetworkAddress=swDHCPServerPoolNetworkAddress, swDHCPServerPoolLeaseDay=swDHCPServerPoolLeaseDay, swDHCPServerConflictIPDetectionTime=swDHCPServerConflictIPDetectionTime, swDHCPServerDNSServerAddressIndex=swDHCPServerDNSServerAddressIndex)
144.263514
4,113
0.793405
2,110
21,351
8.02654
0.101422
0.009565
0.012045
0.01606
0.372166
0.321386
0.287494
0.277929
0.23205
0.223311
0
0.068972
0.072409
21,351
147
4,114
145.244898
0.786165
0.015175
0
0
0
0
0.102626
0.021648
0
0
0
0
0
1
0
false
0
0.05
0
0.05
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
fddd3e193fe076cab7c0cf9457a9b99d97220113
248
py
Python
example/main_01.py
janothan/Evaluation-Framework
e53847bc352f657953933e1d7c97b68ac890c852
[ "Apache-2.0" ]
5
2020-02-12T13:11:14.000Z
2021-01-28T12:45:22.000Z
example/main_01.py
charyeezy/Evaluation-Framework
ddfd4ea654a3d7d2abd58f062ec98a8a736f8f51
[ "Apache-2.0" ]
9
2019-07-29T17:45:30.000Z
2022-03-17T12:24:47.000Z
example/main_01.py
charyeezy/Evaluation-Framework
ddfd4ea654a3d7d2abd58f062ec98a8a736f8f51
[ "Apache-2.0" ]
7
2020-02-12T13:22:49.000Z
2021-11-29T01:08:50.000Z
from evaluation_framework.manager import FrameworkManager if __name__ == "__main__": evaluation_manager = FrameworkManager() evaluation_manager.evaluate( "objectFrequencyS.h5", vector_file_format="hdf5", debugging_mode=False )
31
78
0.766129
24
248
7.333333
0.791667
0.193182
0
0
0
0
0
0
0
0
0
0.009479
0.149194
248
7
79
35.428571
0.824645
0
0
0
0
0
0.125
0
0
0
0
0
0
1
0
false
0
0.166667
0
0.166667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
fde8def0c521fe98b37b37c32684b2ac7afe4bd0
142
py
Python
music/class_/audioa/_mode/major.py
jedhsu/music
dea68c4a82296cd4910e786f533b2cbf861377c3
[ "MIT" ]
null
null
null
music/class_/audioa/_mode/major.py
jedhsu/music
dea68c4a82296cd4910e786f533b2cbf861377c3
[ "MIT" ]
null
null
null
music/class_/audioa/_mode/major.py
jedhsu/music
dea68c4a82296cd4910e786f533b2cbf861377c3
[ "MIT" ]
null
null
null
""" *Major Key* """ from abc import ABCMeta from ._key import ModedKey class MajorKey( ModedKey, ): __metaclass__ = ABCMeta
8.875
27
0.640845
15
142
5.733333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.260563
142
15
28
9.466667
0.819048
0.077465
0
0
0
0
0
0
0
0
0
0
0
1
0
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
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
2
fdf91475384cb8118e074e63142b83edc4f4d2bd
1,735
py
Python
Data Science With Python/07-cleaning-data-in-python/4-cleaning-data-for-analysis/10-testing-your-data-with-asserts.py
aimanahmedmoin1997/DataCamp
c6a6c4d59b83f14854bd76ed5c0c7f2dddd6de1d
[ "MIT" ]
5
2021-02-03T14:36:58.000Z
2022-01-01T10:29:26.000Z
Data Science With Python/07-cleaning-data-in-python/4-cleaning-data-for-analysis/10-testing-your-data-with-asserts.py
aimanahmedmoin1997/DataCamp
c6a6c4d59b83f14854bd76ed5c0c7f2dddd6de1d
[ "MIT" ]
null
null
null
Data Science With Python/07-cleaning-data-in-python/4-cleaning-data-for-analysis/10-testing-your-data-with-asserts.py
aimanahmedmoin1997/DataCamp
c6a6c4d59b83f14854bd76ed5c0c7f2dddd6de1d
[ "MIT" ]
7
2018-11-06T17:43:31.000Z
2020-11-07T21:08:16.000Z
''' Testing your data with asserts Here, you'll practice writing assert statements using the Ebola dataset from previous chapters to programmatically check for missing values and to confirm that all values are positive. The dataset has been pre-loaded into a DataFrame called ebola. In the video, you saw Dan use the .all() method together with the .notnull() DataFrame method to check for missing values in a column. The .all() method returns True if all values are True. When used on a DataFrame, it returns a Series of Booleans - one for each column in the DataFrame. So if you are using it on a DataFrame, like in this exercise, you need to chain another .all() method so that you return only one True or False value. When using these within an assert statement, nothing will be returned if the assert statement is true: This is how you can confirm that the data you are checking are valid. Note: You can use pd.notnull(df) as an alternative to df.notnull(). INSTRUCTIONS 100XP INSTRUCTIONS 100XP -Write an assert statement to confirm that there are no missing values in ebola. -Use the pd.notnull() function on ebola (or the .notnull() method of ebola) and chain two .all() methods (that is, .all().all()). The first .all() method will return a True or False for each column, while the second .all() method will return a single True or False. -Write an assert statement to confirm that all values in ebola are greater than or equal to 0. -Chain two all() methods to the Boolean condition (ebola >= 0). ''' import pandas as pd ebola = pd.read_csv('../_datasets/ebola.csv') # Assert that there are no missing values assert ebola.notnull().all().all() # Assert that all values are >= 0 assert (ebola >= 0).all().all()
61.964286
611
0.756196
297
1,735
4.410774
0.380471
0.034351
0.029771
0.032061
0.145802
0.091603
0.053435
0
0
0
0
0.006988
0.175216
1,735
27
612
64.259259
0.908456
0.914697
0
0
0
0
0.158273
0.158273
0
0
0
0
0.5
1
0
false
0
0.25
0
0.25
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
2
fdfb52a6d5dc1287a0b5c4d900e03718e519b19a
6,084
py
Python
aiospotipy/me.py
sizumita/aiospotipy
3c542ca90559abde2e35268b4eedfdbbef1dab34
[ "MIT" ]
3
2019-03-09T14:53:46.000Z
2020-06-03T12:50:33.000Z
aiospotipy/me.py
sizumita/aiospotipy
3c542ca90559abde2e35268b4eedfdbbef1dab34
[ "MIT" ]
null
null
null
aiospotipy/me.py
sizumita/aiospotipy
3c542ca90559abde2e35268b4eedfdbbef1dab34
[ "MIT" ]
1
2019-03-09T08:26:46.000Z
2019-03-09T08:26:46.000Z
from ._http import (HTTPClient, get_id, Route, GET, PUT, DELETE, ) import asyncio class Me: def __init__(self, _http: HTTPClient): self.http = _http self.request = _http.request self.timeout = _http.timeout self.loop = _http.loop async def user(self): """|coro| Get detailed profile information about the current user. An alias for the 'current_user' method. """ r = Route(GET, '/me/') return await asyncio.wait_for(self.request(r), self.timeout, loop=self.loop) async def playlists(self, limit=50, offset=0): """|coro| Get current user playlists without required getting his profile Parameters: - limit - the number of items to return - offset - the index of the first item to return """ r = Route(GET, "/me/playlists", limit=limit, offset=offset) return await asyncio.wait_for(self.request(r), self.timeout, loop=self.loop) async def albums(self, limit=20, offset=0): """|coro| Gets a list of the albums saved in the current authorized user's "Your Music" library Parameters: - limit - the number of albums to returnx - offset - the index of the first album to return """ r = Route(GET, '/me/albums', limit=limit, offset=offset) return await asyncio.wait_for(self.request(r), self.timeout, loop=self.loop) async def tracks(self, limit=20, offset=0): """|coro| Gets a list of the tracks saved in the current authorized user's "Your Music" library Parameters: - limit - the number of tracks to return - offset - the index of the first track to return """ r = Route(GET, '/me/tracks', limit=limit, offset=offset) return await asyncio.wait_for(self.request(r), self.timeout, loop=self.loop) async def followed_artists(self, limit=20, after=None): """|coro| Gets a list of the artists followed by the current authorized user Parameters: - limit - the number of tracks to return - after - ghe last artist ID retrieved from the previous request """ r = Route(GET, '/me/following', type='artist', limit=limit, after=after) return await asyncio.wait_for(self.request(r), self.timeout, loop=self.loop) async def delete_tracks(self, tracks=None): """|coro| Remove one or more tracks from the current user's "Your Music" library. Parameters: - tracks - a list of track URIs, URLs or IDs """ track_list = [] if tracks: track_list = [get_id('track', t) for t in tracks] r = Route(DELETE, '/me/tracks/?ids=' + ','.join(track_list)) return await asyncio.wait_for(self.request(r), self.timeout, loop=self.loop) async def contains_tracks(self, tracks=None): """|coro| Check if one or more tracks is already saved in the current Spotify user’s “Your Music” library. Parameters: - tracks - a list of track URIs, URLs or IDs """ track_list = [] if tracks is not None: track_list = [get_id('track', t) for t in tracks] r = Route(GET, '/me/tracks/contains?ids=' + ','.join(track_list)) return await asyncio.wait_for(self.request(r), self.timeout, loop=self.loop) async def add_tracks(self, tracks=None): """|coro| Add one or more tracks to the current user's "Your Music" library. Parameters: - tracks - a list of track URIs, URLs or IDs """ track_list = [] if tracks is not None: track_list = [get_id('track', t) for t in tracks] r = Route(PUT, '/me/tracks/?ids=' + ','.join(track_list)) return await asyncio.wait_for(self.request(r), self.timeout, loop=self.loop) async def top_artists(self, limit=20, offset=0, time_range='medium_term'): """|coro| Get the current user's top artists Parameters: - limit - the number of entities to return - offset - the index of the first entity to return - time_range - Over what time frame are the affinities computed Valid-values: short_term, medium_term, long_term """ r = Route(GET, '/me/top/artists', time_range=time_range, limit=limit, offset=offset) return await asyncio.wait_for(self.request(r), self.timeout, loop=self.loop) async def my_top_tracks(self, limit=20, offset=0, time_range='medium_term'): """|coro| Get the current user's top tracks Parameters: - limit - the number of entities to return - offset - the index of the first entity to return - time_range - Over what time frame are the affinities computed Valid-values: short_term, medium_term, long_term """ r = Route(GET, '/me/top/tracks', time_range=time_range, limit=limit, offset=offset) return await asyncio.wait_for(self.request(r), self.timeout, loop=self.loop) async def add_albums(self, albums=None): """|coro| Add one or more albums to the current user's "Your Music" library. Parameters: - albums - a list of album URIs, URLs or IDs """ if albums is None: albums = [] alist = [get_id('album', a) for a in albums] r = Route(PUT, '/me/albums?ids=' + ','.join(alist)) return await asyncio.wait_for(self.request(r), self.timeout, loop=self.loop)
34.568182
84
0.561473
766
6,084
4.381201
0.151436
0.039333
0.039333
0.07211
0.734803
0.70292
0.657926
0.657926
0.625149
0.61174
0
0.00423
0.339415
6,084
176
85
34.568182
0.830804
0
0
0.452055
0
0
0.058029
0.006895
0
0
0
0
0
1
0.013699
false
0
0.027397
0
0.205479
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
8bf35fc329c7f95687b72ea8d092fd4c3193b925
407
py
Python
Chapter01/datastructures_06.py
vabyte/Modern-Python-Standard-Library-Cookbook
4f53e3ab7b61aca1cca9343e7421e170280cd5b5
[ "MIT" ]
84
2018-08-09T09:30:03.000Z
2022-01-04T23:20:38.000Z
Chapter01/datastructures_06.py
jiro74/Modern-Python-Standard-Library-Cookbook
4f53e3ab7b61aca1cca9343e7421e170280cd5b5
[ "MIT" ]
1
2019-11-04T18:57:40.000Z
2020-09-07T08:52:25.000Z
Chapter01/datastructures_06.py
jiro74/Modern-Python-Standard-Library-Cookbook
4f53e3ab7b61aca1cca9343e7421e170280cd5b5
[ "MIT" ]
33
2018-09-26T11:05:55.000Z
2022-03-15T10:31:10.000Z
import time import heapq class PriorityQueue(object): def __init__(self): self._q = [] def add(self, value, priority=0): heapq.heappush(self._q, (priority, time.time(), value)) def pop(self): return heapq.heappop(self._q)[-1] def f1(): print('hello') def f2(): print('world') pq = PriorityQueue() pq.add(f2, priority=1) pq.add(f1, priority=0) pq.pop()() pq.pop()()
17.695652
63
0.619165
59
407
4.152542
0.423729
0.061224
0
0
0
0
0
0
0
0
0
0.024465
0.19656
407
22
64
18.5
0.724771
0
0
0.125
0
0
0.02457
0
0
0
0
0
0
1
0.3125
false
0
0.125
0.0625
0.5625
0.125
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
8bf8770f23fe5d9c46d48d1b60253229783948a7
1,491
py
Python
labdevices/_mock/ando.py
jkrauth/labdevices
4b00579117216b6431079d79c1c978b73a6c0b96
[ "MIT" ]
null
null
null
labdevices/_mock/ando.py
jkrauth/labdevices
4b00579117216b6431079d79c1c978b73a6c0b96
[ "MIT" ]
null
null
null
labdevices/_mock/ando.py
jkrauth/labdevices
4b00579117216b6431079d79c1c978b73a6c0b96
[ "MIT" ]
1
2021-04-28T15:17:31.000Z
2021-04-28T15:17:31.000Z
""" Provides a mock for the plx_gpib_ethernet package used in the Ando devices. """ from unittest.mock import Mock # The commands that are used in the methods of the # ANDO devices and typical responses. QUERY_COMMANDS = { # Spectrum Analyzer commands "*IDN?": "ANDO dummy\r\n", "SWEEP?": "0\r\n", "SMPL?": " 501\r\n", "ANA?": " 490.808, 94.958, 19\r\n", "CTRWL?": "1050.00\r\n", "SPAN?": "1300.0\r\n", "CWPLS?": "1\r\n", "PLMOD?": " 38\r\n", } class PLXDummy(Mock): """ Mock class for the plx_gpib_ethernet package when using the ANDO devices as dummy. """ @staticmethod def query(command: str): """ Containes all the query commands used in the ANDO Spectrometer and returns a valid string. """ if command in QUERY_COMMANDS: return QUERY_COMMANDS[command] if "LDATA" in command: return ' 20,-210.00,-210.00,-210.00,-210.00,-75.28,-210.00,-210.00,-210.00,'\ '-210.00,-210.00,-210.00,-210.00,-210.00,-210.00,-210.00, -78.57, -70.96,'\ ' -75.37,-210.00,-210.00\r\n' if "WDATA" in command: return ' 20, 400.000, 401.300, 402.600, 403.900, 405.200, 406.500, 407.800,'\ ' 409.100, 410.400, 411.700, 413.000, 414.300, 415.600, 416.900, 418.200,'\ ' 419.500, 420.800, 422.100, 423.400, 424.700\r\n' return Mock()
33.886364
91
0.541247
223
1,491
3.587444
0.479821
0.1
0.13
0.1625
0.1575
0.1575
0.0875
0.0875
0.0625
0.0625
0
0.23814
0.293092
1,491
43
92
34.674419
0.520873
0.24279
0
0
0
0.2
0.46305
0.138447
0
0
0
0
0
1
0.04
false
0
0.04
0
0.28
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
e30514bdd0f30538d4ed999ec163ad0e47c028b6
186
py
Python
CA3/news_test.py
aadyajha12/Covid19-SmartAlarm
911fe819cff6ef792f14b7dd48cbbb2c73f2405d
[ "MIT" ]
1
2021-03-11T11:57:19.000Z
2021-03-11T11:57:19.000Z
CA3/news_test.py
aadyajha12/Covid19-SmartAlarm
911fe819cff6ef792f14b7dd48cbbb2c73f2405d
[ "MIT" ]
null
null
null
CA3/news_test.py
aadyajha12/Covid19-SmartAlarm
911fe819cff6ef792f14b7dd48cbbb2c73f2405d
[ "MIT" ]
null
null
null
import json from newsapi import covid_news def news_test_one(): news_json = json.load(open('gb-news.json')) news:str = covid_news(news_json) assert news[0]['title'] != None
26.571429
47
0.698925
30
186
4.133333
0.566667
0.193548
0
0
0
0
0
0
0
0
0
0.006452
0.166667
186
7
48
26.571429
0.793548
0
0
0
0
0
0.090909
0
0
0
0
0
0.166667
1
0.166667
false
0
0.333333
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
0
0
1
0
0
0
0
2
e30656fdcf081203a75edc6af8dad04320307e06
390
py
Python
2015/02/fc_2015_02_10.py
mfwarren/FreeCoding
58ac87f35ad2004a3514782556762ee0ed72c39a
[ "MIT" ]
null
null
null
2015/02/fc_2015_02_10.py
mfwarren/FreeCoding
58ac87f35ad2004a3514782556762ee0ed72c39a
[ "MIT" ]
1
2015-04-27T01:43:45.000Z
2015-04-27T01:43:45.000Z
2015/02/fc_2015_02_10.py
mfwarren/FreeCoding
58ac87f35ad2004a3514782556762ee0ed72c39a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # imports go here import atexit # # Free Coding session for 2015-02-10 # Written by Matt Warren # def clean_up(): print("CLEANING UP") @atexit.register def done(): print("DONE") if __name__ == '__main__': atexit.register(clean_up) try: import time while True: time.sleep(1) except KeyboardInterrupt: pass
14.444444
36
0.623077
50
390
4.66
0.78
0.060086
0
0
0
0
0
0
0
0
0
0.035088
0.269231
390
26
37
15
0.782456
0.24359
0
0
0
0
0.079585
0
0
0
0
0
0
1
0.142857
true
0.071429
0.142857
0
0.285714
0.142857
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
2
e308f94d9774663e111da5671ce07f0ce2dd542e
20,297
py
Python
tutorials/create_sakila/migrations/0001_initial.py
MeGustas-5427/SQL_Tutorials
627372c2d5d8656d72645830c9a1fae1df278fc7
[ "Apache-2.0" ]
13
2020-11-05T04:22:51.000Z
2022-02-27T08:44:50.000Z
tutorials/create_sakila/migrations/0001_initial.py
MeGustas-5427/SQL_Tutorials
627372c2d5d8656d72645830c9a1fae1df278fc7
[ "Apache-2.0" ]
null
null
null
tutorials/create_sakila/migrations/0001_initial.py
MeGustas-5427/SQL_Tutorials
627372c2d5d8656d72645830c9a1fae1df278fc7
[ "Apache-2.0" ]
2
2020-11-10T10:01:20.000Z
2021-04-07T02:33:29.000Z
# Generated by Django 3.1.5 on 2021-01-11 08:07 from django.db import migrations, models import django.db.models.deletion import django_mysql.models import utils.models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Actor', fields=[ ('actor_id', models.SmallAutoField(primary_key=True, serialize=False)), ('first_name', models.CharField(max_length=45)), ('last_name', models.CharField(max_length=45)), ('last_update', models.DateTimeField(auto_now=True)), ], options={ 'verbose_name': '演员表', 'verbose_name_plural': '演员表', 'db_table': 'actor', }, bases=(models.Model, utils.models.ModelSerializationMixin), ), migrations.CreateModel( name='Address', fields=[ ('address_id', models.SmallAutoField(primary_key=True, serialize=False)), ('address', models.CharField(max_length=50)), ('address2', models.CharField(default=None, max_length=50, null=True)), ('district', models.CharField(max_length=20)), ('postal_code', models.CharField(max_length=10)), ('phone', models.CharField(max_length=20)), ('last_update', models.DateTimeField(auto_now=True)), ], options={ 'verbose_name': '地址表', 'verbose_name_plural': '地址表', 'db_table': 'address', }, bases=(models.Model, utils.models.ModelSerializationMixin), ), migrations.CreateModel( name='Category', fields=[ ('category_id', models.SmallAutoField(primary_key=True, serialize=False)), ('name', models.CharField(max_length=25)), ('last_update', models.DateTimeField(auto_now=True)), ], options={ 'verbose_name': '栏目', 'verbose_name_plural': '栏目', 'db_table': 'category', }, bases=(models.Model, utils.models.ModelSerializationMixin), ), migrations.CreateModel( name='Country', fields=[ ('country_id', models.SmallAutoField(primary_key=True, serialize=False)), ('country', models.CharField(max_length=50)), ('last_update', models.DateTimeField(auto_now=True)), ], options={ 'verbose_name': '国家表', 'verbose_name_plural': '国家表', 'db_table': 'country', }, bases=(models.Model, utils.models.ModelSerializationMixin), ), migrations.CreateModel( name='Customer', fields=[ ('customer_id', models.SmallAutoField(primary_key=True, serialize=False)), ('first_name', models.CharField(max_length=45)), ('last_name', models.CharField(max_length=45)), ('email', models.CharField(default=None, max_length=50, null=True)), ('active', models.BooleanField(default=True)), ('create_date', models.DateTimeField(verbose_name='创建时间')), ('last_update', models.DateTimeField(auto_now=True)), ('address', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='create_sakila.address', verbose_name='客户住址')), ], options={ 'verbose_name': '客户表', 'verbose_name_plural': '客户表', 'db_table': 'customer', }, bases=(models.Model, utils.models.ModelSerializationMixin), ), migrations.CreateModel( name='Film', fields=[ ('film_id', models.SmallAutoField(primary_key=True, serialize=False)), ('title', models.CharField(max_length=128)), ('description', models.TextField(default=None, null=True)), ('release_year', models.PositiveSmallIntegerField(choices=[(1901, 1901), (1902, 1902), (1903, 1903), (1904, 1904), (1905, 1905), (1906, 1906), (1907, 1907), (1908, 1908), (1909, 1909), (1910, 1910), (1911, 1911), (1912, 1912), (1913, 1913), (1914, 1914), (1915, 1915), (1916, 1916), (1917, 1917), (1918, 1918), (1919, 1919), (1920, 1920), (1921, 1921), (1922, 1922), (1923, 1923), (1924, 1924), (1925, 1925), (1926, 1926), (1927, 1927), (1928, 1928), (1929, 1929), (1930, 1930), (1931, 1931), (1932, 1932), (1933, 1933), (1934, 1934), (1935, 1935), (1936, 1936), (1937, 1937), (1938, 1938), (1939, 1939), (1940, 1940), (1941, 1941), (1942, 1942), (1943, 1943), (1944, 1944), (1945, 1945), (1946, 1946), (1947, 1947), (1948, 1948), (1949, 1949), (1950, 1950), (1951, 1951), (1952, 1952), (1953, 1953), (1954, 1954), (1955, 1955), (1956, 1956), (1957, 1957), (1958, 1958), (1959, 1959), (1960, 1960), (1961, 1961), (1962, 1962), (1963, 1963), (1964, 1964), (1965, 1965), (1966, 1966), (1967, 1967), (1968, 1968), (1969, 1969), (1970, 1970), (1971, 1971), (1972, 1972), (1973, 1973), (1974, 1974), (1975, 1975), (1976, 1976), (1977, 1977), (1978, 1978), (1979, 1979), (1980, 1980), (1981, 1981), (1982, 1982), (1983, 1983), (1984, 1984), (1985, 1985), (1986, 1986), (1987, 1987), (1988, 1988), (1989, 1989), (1990, 1990), (1991, 1991), (1992, 1992), (1993, 1993), (1994, 1994), (1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020), (2021, 2021), (2022, 2022), (2023, 2023), (2024, 2024), (2025, 2025), (2026, 2026), (2027, 2027), (2028, 2028), (2029, 2029), (2030, 2030), (2031, 2031), (2032, 2032), (2033, 2033), (2034, 2034), (2035, 2035), (2036, 2036), (2037, 2037), (2038, 2038), (2039, 2039), (2040, 2040), (2041, 2041), (2042, 2042), (2043, 2043), (2044, 2044), (2045, 2045), (2046, 2046), (2047, 2047), (2048, 2048), (2049, 2049), (2050, 2050), (2051, 2051), (2052, 2052), (2053, 2053), (2054, 2054), (2055, 2055), (2056, 2056), (2057, 2057), (2058, 2058), (2059, 2059), (2060, 2060), (2061, 2061), (2062, 2062), (2063, 2063), (2064, 2064), (2065, 2065), (2066, 2066), (2067, 2067), (2068, 2068), (2069, 2069), (2070, 2070), (2071, 2071), (2072, 2072), (2073, 2073), (2074, 2074), (2075, 2075), (2076, 2076), (2077, 2077), (2078, 2078), (2079, 2079), (2080, 2080), (2081, 2081), (2082, 2082), (2083, 2083), (2084, 2084), (2085, 2085), (2086, 2086), (2087, 2087), (2088, 2088), (2089, 2089), (2090, 2090), (2091, 2091), (2092, 2092), (2093, 2093), (2094, 2094), (2095, 2095), (2096, 2096), (2097, 2097), (2098, 2098), (2099, 2099), (2100, 2100), (2101, 2101), (2102, 2102), (2103, 2103), (2104, 2104), (2105, 2105), (2106, 2106), (2107, 2107), (2108, 2108), (2109, 2109), (2110, 2110), (2111, 2111), (2112, 2112), (2113, 2113), (2114, 2114), (2115, 2115), (2116, 2116), (2117, 2117), (2118, 2118), (2119, 2119), (2120, 2120), (2121, 2121), (2122, 2122), (2123, 2123), (2124, 2124), (2125, 2125), (2126, 2126), (2127, 2127), (2128, 2128), (2129, 2129), (2130, 2130), (2131, 2131), (2132, 2132), (2133, 2133), (2134, 2134), (2135, 2135), (2136, 2136), (2137, 2137), (2138, 2138), (2139, 2139), (2140, 2140), (2141, 2141), (2142, 2142), (2143, 2143), (2144, 2144), (2145, 2145), (2146, 2146), (2147, 2147), (2148, 2148), (2149, 2149), (2150, 2150), (2151, 2151), (2152, 2152), (2153, 2153), (2154, 2154), (2155, 2155)], default=None, null=True)), ('rental_duration', models.PositiveSmallIntegerField(default=3)), ('rental_rate', models.DecimalField(decimal_places=2, default='4.99', max_digits=4)), ('length', models.PositiveSmallIntegerField(default=None, null=True)), ('replacement_cost', models.DecimalField(decimal_places=2, default='19.99', max_digits=5)), ('rating', models.CharField(choices=[('G', 'G'), ('R', 'R'), ('PG', 'PG'), ('PG-13', 'PG_13'), ('NC-17', 'NC_17')], default='G', max_length=5)), ('special_features', django_mysql.models.SetCharField(models.CharField(max_length=20), choices=[('Trailers', 'Trailers'), ('Commentaries', 'Commentaries'), ('Deleted Scenes', 'Deleted_Scenes'), ('Behind the Scenes', 'Behind_the_Scenes')], default=None, max_length=83, null=True, size=4, verbose_name='特殊功能')), ('last_update', models.DateTimeField(auto_now=True)), ], options={ 'verbose_name': '电影表', 'verbose_name_plural': '电影表', 'db_table': 'film', }, bases=(models.Model, utils.models.ModelSerializationMixin), ), migrations.CreateModel( name='FilmText', fields=[ ('film_id', models.SmallAutoField(primary_key=True, serialize=False)), ('title', models.CharField(max_length=255)), ('description', models.TextField()), ('last_update', models.DateTimeField(auto_now=True)), ], options={ 'verbose_name': '电影详情表', 'verbose_name_plural': '电影详情表', 'db_table': 'film_text', }, bases=(models.Model, utils.models.ModelSerializationMixin), ), migrations.CreateModel( name='Inventory', fields=[ ('inventory_id', models.AutoField(primary_key=True, serialize=False)), ('last_update', models.DateTimeField(auto_now=True)), ('film', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='create_sakila.film')), ], options={ 'verbose_name': '库存表', 'verbose_name_plural': '库存表', 'db_table': 'inventory', }, bases=(models.Model, utils.models.ModelSerializationMixin), ), migrations.CreateModel( name='Language', fields=[ ('language_id', models.SmallAutoField(primary_key=True, serialize=False)), ('name', models.CharField(max_length=20)), ('last_update', models.DateTimeField(auto_now=True)), ], options={ 'verbose_name': '语言种类', 'verbose_name_plural': '语言种类', 'db_table': 'language', }, bases=(models.Model, utils.models.ModelSerializationMixin), ), migrations.CreateModel( name='Staff', fields=[ ('staff_id', models.SmallAutoField(primary_key=True, serialize=False)), ('first_name', models.CharField(max_length=45)), ('last_name', models.CharField(max_length=45)), ('email', models.CharField(default=None, max_length=50, null=True)), ('username', models.CharField(max_length=16)), ('password', models.CharField(default=None, max_length=40, null=True)), ('picture', models.BinaryField(default=None, null=True, verbose_name='图片文件')), ('active', models.BooleanField(default=True)), ('last_update', models.DateTimeField(auto_now=True)), ('address', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='create_sakila.address')), ], options={ 'verbose_name': '员工表', 'verbose_name_plural': '员工表', 'db_table': 'staff', }, bases=(models.Model, utils.models.ModelSerializationMixin), ), migrations.CreateModel( name='Store', fields=[ ('store_id', models.SmallAutoField(primary_key=True, serialize=False)), ('city', models.CharField(max_length=50)), ('last_update', models.DateTimeField(auto_now=True)), ('address', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='create_sakila.address')), ('manager_staff', models.OneToOneField(on_delete=django.db.models.deletion.RESTRICT, related_name='manager', to='create_sakila.staff', verbose_name='店长')), ], options={ 'verbose_name': '电影店表', 'verbose_name_plural': '电影店表', 'db_table': 'store', }, bases=(models.Model, utils.models.ModelSerializationMixin), ), migrations.AddField( model_name='staff', name='store', field=models.ForeignKey(db_constraint=False, on_delete=django.db.models.deletion.RESTRICT, to='create_sakila.store'), ), migrations.CreateModel( name='Rental', fields=[ ('rental_id', models.SmallAutoField(primary_key=True, serialize=False)), ('rental_date', models.DateTimeField(verbose_name='出租时间')), ('return_date', models.DateTimeField(default=None, null=True, verbose_name='返还时间')), ('last_update', models.DateTimeField(auto_now=True)), ('customer', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='create_sakila.customer', verbose_name='客户')), ('inventory', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='create_sakila.inventory', verbose_name='库存')), ('staff', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='create_sakila.staff', verbose_name='员工')), ], options={ 'verbose_name': '出租表', 'verbose_name_plural': '出租表', 'db_table': 'rental', }, bases=(models.Model, utils.models.ModelSerializationMixin), ), migrations.CreateModel( name='Payment', fields=[ ('payment_id', models.SmallAutoField(primary_key=True, serialize=False)), ('amount', models.DecimalField(decimal_places=2, max_digits=5)), ('payment_date', models.DateTimeField(verbose_name='支付时间')), ('last_update', models.DateTimeField(auto_now=True)), ('customer', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='create_sakila.customer', verbose_name='客户')), ('rental', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.RESTRICT, to='create_sakila.rental', verbose_name='出租')), ('staff', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='create_sakila.staff', verbose_name='员工')), ], options={ 'verbose_name': '付款表', 'verbose_name_plural': '付款表', 'db_table': 'payment', }, bases=(models.Model, utils.models.ModelSerializationMixin), ), migrations.AddField( model_name='inventory', name='store', field=models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='create_sakila.store'), ), migrations.CreateModel( name='FilmCategory', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('last_update', models.DateTimeField(auto_now=True)), ('category', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='create_sakila.category', verbose_name='栏目')), ('film', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='create_sakila.film', verbose_name='电影')), ], options={ 'verbose_name': '电影栏目', 'verbose_name_plural': '电影栏目', 'db_table': 'film_category', }, bases=(models.Model, utils.models.ModelSerializationMixin), ), migrations.CreateModel( name='FilmActor', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('last_update', models.DateTimeField(auto_now=True)), ('actor', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='create_sakila.actor', verbose_name='演员')), ('film', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='create_sakila.film', verbose_name='电影')), ], options={ 'verbose_name': '电影演员表', 'verbose_name_plural': '电影演员表', 'db_table': 'film_actor', }, bases=(models.Model, utils.models.ModelSerializationMixin), ), migrations.AddField( model_name='film', name='actors', field=models.ManyToManyField(through='create_sakila.FilmActor', to='create_sakila.Actor', verbose_name='电影演员'), ), migrations.AddField( model_name='film', name='language', field=models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='create_sakila.language'), ), migrations.AddField( model_name='film', name='original_language', field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.RESTRICT, related_name='original_film', to='create_sakila.language'), ), migrations.AddField( model_name='customer', name='store', field=models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='create_sakila.store', verbose_name='电影店'), ), migrations.CreateModel( name='City', fields=[ ('city_id', models.SmallAutoField(primary_key=True, serialize=False)), ('city', models.CharField(max_length=50)), ('last_update', models.DateTimeField(auto_now=True)), ('country', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='create_sakila.country')), ], options={ 'verbose_name': '城市表', 'verbose_name_plural': '城市表', 'db_table': 'city', }, bases=(models.Model, utils.models.ModelSerializationMixin), ), migrations.AddField( model_name='category', name='films', field=models.ManyToManyField(through='create_sakila.FilmCategory', to='create_sakila.Film', verbose_name='电影栏目'), ), migrations.AddField( model_name='address', name='city', field=models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='create_sakila.city'), ), migrations.AddIndex( model_name='actor', index=models.Index(fields=['last_name'], name='idx_actor_last_name'), ), migrations.AddConstraint( model_name='rental', constraint=models.UniqueConstraint(fields=('rental_date', 'inventory', 'customer'), name='film_rental'), ), migrations.AddIndex( model_name='inventory', index=models.Index(fields=['store', 'film'], name='idx_store_id_film_id'), ), migrations.AddConstraint( model_name='filmcategory', constraint=models.UniqueConstraint(fields=('category', 'film'), name='idx_category_film'), ), migrations.AddConstraint( model_name='filmactor', constraint=models.UniqueConstraint(fields=('actor', 'film'), name='idx_actor_film'), ), migrations.AddIndex( model_name='film', index=models.Index(fields=['title'], name='idx_title'), ), migrations.AddIndex( model_name='customer', index=models.Index(fields=['last_name'], name='idx_last_name'), ), ]
58.157593
3,672
0.564862
2,062
20,297
5.417071
0.214355
0.054163
0.030081
0.0453
0.554342
0.523903
0.486392
0.482811
0.449866
0.373321
0
0.143357
0.267971
20,297
348
3,673
58.324713
0.608426
0.002217
0
0.519062
1
0
0.138173
0.013136
0
0
0
0
0
1
0
false
0.002933
0.01173
0
0.02346
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
e31548410089b175367898405bf5be3d08d7b387
418
py
Python
electionleaflets/apps/content/models.py
electionleaflets/electionleaflets
4110e96a3035c32d0b6ff3c9f832c5e003728170
[ "MIT" ]
null
null
null
electionleaflets/apps/content/models.py
electionleaflets/electionleaflets
4110e96a3035c32d0b6ff3c9f832c5e003728170
[ "MIT" ]
23
2015-02-19T14:02:23.000Z
2015-04-30T11:14:01.000Z
electionleaflets/apps/content/models.py
electionleaflets/electionleaflets
4110e96a3035c32d0b6ff3c9f832c5e003728170
[ "MIT" ]
2
2015-02-02T19:39:54.000Z
2017-02-08T09:19:53.000Z
from django.db import models class ContentBlock(models.Model): """ A simple block of HTML content that can be used by various sections of the site based on the provided name, which acts as a key. """ name = models.CharField(max_length=64) content = models.TextField(blank=True) def __unicode__(self): return self.name class Meta: db_table = u'contentblock'
24.588235
79
0.662679
58
418
4.672414
0.775862
0
0
0
0
0
0
0
0
0
0
0.006494
0.263158
418
16
80
26.125
0.873377
0.308612
0
0
0
0
0.04461
0
0
0
0
0
0
1
0.125
false
0
0.125
0.125
0.875
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
2
e316c0dee9255d1c94a21d0fb077092ad8593724
162
py
Python
Python/1017.py
lucasferreiraa/uri-judge-respostas
f5fc659d53c6b512a3624764041675e62d3fa053
[ "MIT" ]
null
null
null
Python/1017.py
lucasferreiraa/uri-judge-respostas
f5fc659d53c6b512a3624764041675e62d3fa053
[ "MIT" ]
null
null
null
Python/1017.py
lucasferreiraa/uri-judge-respostas
f5fc659d53c6b512a3624764041675e62d3fa053
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # URI Judge - Problema 1017 tempo = int(input()) velocidade = int(input()) litros = (velocidade / 12.0) * tempo print("%.3f" % litros)
16.2
36
0.604938
21
162
4.666667
0.761905
0.163265
0
0
0
0
0
0
0
0
0
0.068182
0.185185
162
9
37
18
0.674242
0.290123
0
0
0
0
0.035714
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
e3274579faa2032556dd5e38f0e928addfcdc145
1,093
py
Python
orders/migrations/0001_initial.py
MahmudulHassan5809/Ecommerce-WebSite-With-Django2
a9c76e6e925e236ba064be194a03d9d6635edac2
[ "MIT" ]
1
2021-09-24T04:32:35.000Z
2021-09-24T04:32:35.000Z
orders/migrations/0001_initial.py
MahmudulHassan5809/Ecommerce-WebSite-With-Django2
a9c76e6e925e236ba064be194a03d9d6635edac2
[ "MIT" ]
null
null
null
orders/migrations/0001_initial.py
MahmudulHassan5809/Ecommerce-WebSite-With-Django2
a9c76e6e925e236ba064be194a03d9d6635edac2
[ "MIT" ]
null
null
null
# Generated by Django 2.1.5 on 2019-01-26 19:42 import datetime from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Order', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('item', models.CharField(max_length=200)), ('quantity', models.IntegerField()), ('price', models.CharField(max_length=100)), ('total', models.CharField(max_length=100)), ('name', models.CharField(max_length=200)), ('phone', models.CharField(max_length=200)), ('email', models.CharField(max_length=200)), ('address', models.TextField()), ('order_date', models.DateTimeField(blank=True, default=datetime.datetime(2019, 1, 27, 1, 42, 37, 95617))), ('user_id', models.IntegerField(blank=True)), ], ), ]
34.15625
123
0.563586
111
1,093
5.45045
0.531532
0.14876
0.178512
0.238017
0.267769
0
0
0
0
0
0
0.064599
0.291857
1,093
31
124
35.258065
0.717054
0.041171
0
0
1
0
0.065966
0
0
0
0
0
0
1
0
false
0
0.083333
0
0.25
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
e33d45a696398845a0fe18a3dbb14693d8655739
1,926
py
Python
src/jk_mediawiki/impl/WikiCronProcessFilter.py
jkpubsrc/python-module-jk-mediawiki
5d76a060f0ed46c072d44e8084f6fa40d16e6069
[ "Apache-1.1" ]
null
null
null
src/jk_mediawiki/impl/WikiCronProcessFilter.py
jkpubsrc/python-module-jk-mediawiki
5d76a060f0ed46c072d44e8084f6fa40d16e6069
[ "Apache-1.1" ]
null
null
null
src/jk_mediawiki/impl/WikiCronProcessFilter.py
jkpubsrc/python-module-jk-mediawiki
5d76a060f0ed46c072d44e8084f6fa40d16e6069
[ "Apache-1.1" ]
null
null
null
import os import typing import jk_typing from .ProcessFilter import ProcessFilter class WikiCronProcessFilter(ProcessFilter): ################################################################################################################################ ## Constructor ################################################################################################################################ # # Constructor method. # @jk_typing.checkFunctionSignature() def __init__(self, userName:str, wikiInstDirPath:typing.Union[str,None], source:typing.Callable): # { # 'ppid': 21827, # 'pid': 21841, # 'tty': 'pts/7', # 'stat': 'S', # 'uid': 1000, # 'gid': 1000, # 'cmd': 'php', # 'args': '/srv/wikis/srv/wikis/infowiki/infowiki/maintenance/runJobs.php --wait', # 'user': 'woodoo', # 'group': 'woodoo' # } super().__init__( source = source, userName = userName, cmdExact="php", #argEndsWith="runJobs.php", argExact=os.path.join(wikiInstDirPath, "maintenance", "runJobs.php") if wikiInstDirPath else None ) # ################################################################################################################################ ## Public Properties ################################################################################################################################ ################################################################################################################################ ## Helper Methods ################################################################################################################################ ################################################################################################################################ ## Public Methods ################################################################################################################################ #
27.514286
129
0.297508
92
1,926
6.119565
0.619565
0.053286
0.0746
0
0
0
0
0
0
0
0
0.010913
0.096054
1,926
69
130
27.913043
0.312464
0.169263
0
0
0
0
0.046555
0
0
0
0
0
0
1
0.076923
false
0
0.307692
0
0.461538
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
2
e3496bdad8c230d6caf15ce743cc65f029480031
5,287
py
Python
RecoEgamma/Configuration/python/RecoEgamma_cff.py
sebwieland/cmssw
431e2fdfedec052e73c16e9f06de98ade41ebc56
[ "Apache-2.0" ]
null
null
null
RecoEgamma/Configuration/python/RecoEgamma_cff.py
sebwieland/cmssw
431e2fdfedec052e73c16e9f06de98ade41ebc56
[ "Apache-2.0" ]
null
null
null
RecoEgamma/Configuration/python/RecoEgamma_cff.py
sebwieland/cmssw
431e2fdfedec052e73c16e9f06de98ade41ebc56
[ "Apache-2.0" ]
null
null
null
import FWCore.ParameterSet.Config as cms from RecoEgamma.EgammaElectronProducers.gsfElectronSequence_cff import * from RecoEgamma.EgammaElectronProducers.uncleanedOnlyElectronSequence_cff import * from RecoEgamma.EgammaPhotonProducers.photonSequence_cff import * from RecoEgamma.EgammaPhotonProducers.conversionSequence_cff import * from RecoEgamma.EgammaPhotonProducers.conversionTrackSequence_cff import * from RecoEgamma.EgammaPhotonProducers.allConversionSequence_cff import * from RecoEgamma.EgammaPhotonProducers.gedPhotonSequence_cff import * from RecoEgamma.EgammaIsolationAlgos.egammaIsolationSequence_cff import * from RecoEgamma.EgammaIsolationAlgos.interestingEgammaIsoDetIdsSequence_cff import * from RecoEgamma.PhotonIdentification.photonId_cff import * from RecoEgamma.ElectronIdentification.electronIdSequence_cff import * from RecoEgamma.EgammaHFProducers.hfEMClusteringSequence_cff import * from TrackingTools.Configuration.TrackingTools_cff import * from RecoEgamma.EgammaIsolationAlgos.egmIsolationDefinitions_cff import * #importing new gedGsfElectronSequence : #from RecoEgamma.EgammaElectronProducers.gedGsfElectronSequence_cff import * from RecoEgamma.EgammaElectronProducers.pfBasedElectronIso_cff import * egammaGlobalRecoTask = cms.Task(electronGsfTrackingTask,conversionTrackTask,allConversionTask) egammaGlobalReco = cms.Sequence(egammaGlobalRecoTask) # this might be historical: not sure why we do this from Configuration.Eras.Modifier_fastSim_cff import fastSim _fastSim_egammaGlobalRecoTask = egammaGlobalRecoTask.copy() _fastSim_egammaGlobalRecoTask.replace(conversionTrackTask,conversionTrackTaskNoEcalSeeded) fastSim.toReplaceWith(egammaGlobalRecoTask, _fastSim_egammaGlobalRecoTask) egammarecoTask = cms.Task(gsfElectronTask,conversionTask,photonTask) egammareco = cms.Sequence(egammarecoTask) egammaHighLevelRecoPrePFTask = cms.Task(gsfEcalDrivenElectronTask,uncleanedOnlyElectronTask,conversionTask,photonTask) egammaHighLevelRecoPrePF = cms.Sequence(egammaHighLevelRecoPrePFTask) # not commisoned and not relevant in FastSim (?): fastSim.toReplaceWith(egammarecoTask, egammarecoTask.copyAndExclude([conversionTask])) fastSim.toReplaceWith(egammaHighLevelRecoPrePFTask,egammaHighLevelRecoPrePFTask.copyAndExclude([uncleanedOnlyElectronTask,conversionTask])) #egammaHighLevelRecoPostPFTask = cms.Task(gsfElectronMergingTask,interestingEgammaIsoDetIdsTask,photonIDTask,eIdTask,hfEMClusteringTask) #adding new gedGsfElectronTask and gedPhotonTask : #egammaHighLevelRecoPostPFTask = cms.Task(gsfElectronMergingTask,gedGsfElectronTask,interestingEgammaIsoDetIdsTask,gedPhotonTask,photonIDTask,eIdTask,hfEMClusteringTask) egammaHighLevelRecoPostPFTask = cms.Task(interestingEgammaIsoDetIdsTask,egmIsolationTask,photonIDTask,photonIDTaskGED,eIdTask,hfEMClusteringTask) egammaHighLevelRecoPostPF = cms.Sequence(egammaHighLevelRecoPostPFTask) egammarecoFullTask = cms.Task(egammarecoTask,interestingEgammaIsoDetIdsTask,egmIsolationTask,photonIDTask,eIdTask,hfEMClusteringTask) egammarecoFull = cms.Sequence(egammarecoFullTask) egammarecoWithIDTask = cms.Task(egammarecoTask,photonIDTask,eIdTask) egammarecoWithID = cms.Sequence(egammarecoWithIDTask) egammareco_woConvPhotonsTask = cms.Task(gsfElectronTask,photonTask) egammareco_woConvPhotons = cms.Sequence(egammareco_woConvPhotonsTask) egammareco_withIsolationTask = cms.Task(egammarecoTask,egammaIsolationTask) egammareco_withIsolation = cms.Sequence(egammareco_withIsolationTask) egammareco_withIsolation_woConvPhotonsTask = cms.Task(egammareco_woConvPhotonsTask,egammaIsolationTask) egammareco_withIsolation_woConvPhotons = cms.Sequence(egammareco_withIsolation_woConvPhotonsTask) egammareco_withPhotonIDTask = cms.Task(egammarecoTask,photonIDTask) egammareco_withPhotonID = cms.Sequence(egammareco_withPhotonIDTask) egammareco_withElectronIDTask = cms.Task(egammarecoTask,eIdTask) egammareco_withElectronID = cms.Sequence(egammareco_withElectronIDTask) egammarecoFull_woHFElectronsTask = cms.Task(egammarecoTask,interestingEgammaIsoDetIdsTask,photonIDTask,eIdTask) egammarecoFull_woHFElectrons = cms.Sequence(egammarecoFull_woHFElectronsTask) from Configuration.Eras.Modifier_pA_2016_cff import pA_2016 from Configuration.Eras.Modifier_peripheralPbPb_cff import peripheralPbPb from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017 from Configuration.Eras.Modifier_ppRef_2017_cff import ppRef_2017 #HI-specific algorithms needed in pp scenario special configurations from RecoHI.HiEgammaAlgos.photonIsolationHIProducer_cfi import photonIsolationHIProducerpp from RecoHI.HiEgammaAlgos.photonIsolationHIProducer_cfi import photonIsolationHIProducerppGED from RecoHI.HiEgammaAlgos.photonIsolationHIProducer_cfi import photonIsolationHIProducerppIsland _egammaHighLevelRecoPostPF_HITask = egammaHighLevelRecoPostPFTask.copy() _egammaHighLevelRecoPostPF_HITask.add(photonIsolationHIProducerpp) _egammaHighLevelRecoPostPF_HITask.add(photonIsolationHIProducerppGED) _egammaHighLevelRecoPostPF_HITask.add(photonIsolationHIProducerppIsland) for e in [pA_2016, peripheralPbPb, pp_on_AA_2018, pp_on_XeXe_2017, ppRef_2017]: e.toReplaceWith(egammaHighLevelRecoPostPFTask, _egammaHighLevelRecoPostPF_HITask)
66.924051
169
0.897863
448
5,287
10.388393
0.28125
0.042544
0.039106
0.064246
0.145681
0.050924
0
0
0
0
0
0.009548
0.049177
5,287
78
170
67.782051
0.916252
0.11916
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.416667
0
0.416667
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
2
e34fb05ebe987705aa9522c54e606db43ebf8086
9,288
py
Python
cvr/core/task.py
john-james-ai/cvr
37e12dff4d46acac64b09ad8ddb8d238d43a5513
[ "BSD-3-Clause" ]
null
null
null
cvr/core/task.py
john-james-ai/cvr
37e12dff4d46acac64b09ad8ddb8d238d43a5513
[ "BSD-3-Clause" ]
null
null
null
cvr/core/task.py
john-james-ai/cvr
37e12dff4d46acac64b09ad8ddb8d238d43a5513
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # ================================================================================================ # # Project : Deep Learning for Conversion Rate Prediction (CVR) # # Version : 0.1.0 # # File : \task.py # # Language : Python 3.7.12 # # ------------------------------------------------------------------------------------------------ # # Author : John James # # Email : [email protected] # # URL : https://github.com/john-james-ai/cvr # # ------------------------------------------------------------------------------------------------ # # Created : Wednesday, January 19th 2022, 5:34:06 pm # # Modified : Thursday, February 10th 2022, 9:28:37 pm # # Modifier : John James ([email protected]) # # ------------------------------------------------------------------------------------------------ # # License : BSD 3-clause "New" or "Revised" License # # Copyright: (c) 2022 Bryant St. Labs # # ================================================================================================ # from abc import ABC, abstractmethod import pandas as pd import inspect from dataclasses import dataclass, field from datetime import datetime, timedelta from cvr.utils.printing import Printer from cvr.core.asset import AssetPassport from cvr.core.dataset import Dataset # ---------------------------------------------------------------------------- # # TASK RESULT # # ---------------------------------------------------------------------------- # @dataclass class TaskResult(ABC): """Standardized result object for all tasks""" executed: bool = field(default=False) passed: bool = field(default=False) complete: str = field(default=False) completed: datetime = field(init=False) comment: str = field(default="") def __post_init__(self) -> None: self._printer = Printer() def todict(self) -> dict: d = { "Executed": self.executed, "Passed": self.passed, "Complete": self.complete, "Completed": self.completed, "Comment": self.comment, } return d def print(self) -> None: d = self.todict() self._printer.print_title("Task Result") self._printer.print_dictionary(d) # ---------------------------------------------------------------------------- # # TASK RESPONSE # # ---------------------------------------------------------------------------- # @dataclass class TaskResponse(ABC): """Task specific metrics to be overridden by subclasses.""" start: datetime = field(init=False) end: datetime = field(init=False) duration: timedelta = field(init=False) def __post_init__(self) -> None: pass def begin(self) -> None: self.start = datetime.now() def stop(self) -> None: self.end = datetime.now() self.duration = self.end - self.start def __post_init__(self) -> None: self._printer = Printer() def todict(self) -> dict: d = {"Start": self.start, "End": self.end, "Duration": self.duration} return d def print(self) -> None: title = "Task Response" self._printer.print_title(title) d = self.todict() self._printer.print_dictionary(d) # ---------------------------------------------------------------------------- # # TASK SUMMARY # # ---------------------------------------------------------------------------- # @dataclass class TaskSummary(ABC): """Summarizes a Task. Args: passport (AssetPassport): Identity object start (datetime): start time for event end (datetime): end time for event duration (timedelta): the duration of the event in minutes passed (bool): True if the event passed executed (bool): True if the event was executed. An event may be skipped if its endpoint already exists response (dict): Event specific response result (str): result of the event """ passport: AssetPassport response: TaskResponse result: TaskResult def __post_init__(self) -> None: self._printer = Printer() def print(self) -> None: self.passport.print() self.response.print() self.result.print() # ---------------------------------------------------------------------------- # # TASK # # ---------------------------------------------------------------------------- # class Task(ABC): """Defines interface for task classes.""" def __init__(self, passport: AssetPassport, **kwargs) -> None: self._passport = passport self._config = None @property def config(self): return self._config @property @abstractmethod def passport(self): pass @property @abstractmethod def response(self) -> TaskResponse: pass @property @abstractmethod def result(self) -> TaskResult: pass @config.setter def config(self, config) -> None: self._config = config def setup(self, **kwargs) -> None: # Logging facility self._logger = self._config.logger # Subclass specific setup self._setup() def _setup(self) -> None: pass def teardown(self, **kwargs) -> None: # Subclass specific teardown. self._teardown() # Base class gets last word self._result.executed = "No" if self._result.executed is False else "Yes" self._result.passed = "No" if self._result.passed is False else "Yes" self._result.complete = "No" if self._result.complete is False else "Yes" self._summary = TaskSummary( passport=self.passport, response=self.response, result=self.result, ) def _teardown(self, **kwargs) -> None: pass @abstractmethod def run(self, data: pd.DataFrame = None) -> pd.DataFrame: """Runs the task through delegation to a private member on the subclass Args: df (pd.DataFrame): Input DataFrame object. Returns: df (pd.DataFrame): DataFrame object response (dict): Dictionary containing task response information. """ pass @abstractmethod def passed(self) -> bool: """Checks success of task. Returns True if conditions pass.""" pass def summary(self) -> TaskSummary: return self._summary def summarize(self) -> None: self._summary.print() # ============================================================================ # # DATASET FACTORY # # ============================================================================ # class DatasetFactory(Task): """Creates Dataset objects.""" def __init__(self, passport: AssetPassport, dataset_passport: AssetPassport) -> None: super(DatasetFactory, self).__init__(passport=passport) self._dataset_passport = dataset_passport def run(self, data: pd.DataFrame) -> Dataset: self.setup() self._logger.debug("\tStarted {} {}".format(self.__class__.__name__, inspect.stack()[0][3])) aid = self._config.dataset_repo.aid_gen() self._dataset_passport.aid = aid dataset = Dataset( passport=self._dataset_passport, data=data, ) dataset = self._config.dataset_repo.set_version(dataset) self._logger.debug( "\tCompleted {} {}".format(self.__class__.__name__, inspect.stack()[0][3]) ) self.teardown() return dataset def _setup(self) -> None: self._response = TaskResponse() self._response.begin() self._result = TaskResult() def _teardown(self) -> None: self._response.stop() self._result.executed = True self._result.passed = self.passed() self._result.complete = True self._result.completed = datetime.now() @property def passport(self) -> AssetPassport: return self._passport @property def response(self) -> TaskResponse: return self._response @property def result(self) -> TaskResult: return self._result def passed(self) -> bool: return True
33.053381
100
0.463932
791
9,288
5.312263
0.26043
0.033317
0.025702
0.014279
0.165873
0.121371
0.051404
0.051404
0.035697
0.026178
0
0.0063
0.31643
9,288
280
101
33.171429
0.655536
0.418605
0
0.322368
0
0
0.024043
0
0
0
0
0
0
1
0.217105
false
0.184211
0.052632
0.039474
0.434211
0.098684
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
2
e359f824dde6ff522819969499136201763f90fa
322
py
Python
conf_site/speakers/tests/factories.py
jasongrout/conf_site
6b3beb21de8d847cba65dcb6da84464b40739d48
[ "MIT" ]
13
2015-05-22T17:10:22.000Z
2021-07-15T16:45:19.000Z
conf_site/speakers/tests/factories.py
jasongrout/conf_site
6b3beb21de8d847cba65dcb6da84464b40739d48
[ "MIT" ]
758
2015-03-18T13:39:25.000Z
2022-03-31T13:14:09.000Z
conf_site/speakers/tests/factories.py
jasongrout/conf_site
6b3beb21de8d847cba65dcb6da84464b40739d48
[ "MIT" ]
16
2015-03-24T18:53:17.000Z
2020-10-22T21:30:02.000Z
# -*- coding: utf-8 -*- import factory from symposion.speakers.models import Speaker from conf_site.accounts.tests.factories import UserFactory class SpeakerFactory(factory.django.DjangoModelFactory): user = factory.SubFactory(UserFactory) name = factory.Faker("name") class Meta: model = Speaker
21.466667
58
0.73913
36
322
6.583333
0.722222
0
0
0
0
0
0
0
0
0
0
0.003717
0.164596
322
14
59
23
0.877323
0.065217
0
0
0
0
0.013378
0
0
0
0
0
0
1
0
false
0
0.375
0
0.875
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
e36b3c194ac71da00a1987d9f541d4a940300816
332
py
Python
compsocsite/polls/migrations/0108_merge_20180105_1930.py
ReedyChen/opra
86ce88c7219d92e321cd9aa3d0bc2bf631e4b90f
[ "MIT" ]
8
2017-03-07T19:46:51.000Z
2021-06-01T01:41:37.000Z
compsocsite/polls/migrations/0108_merge_20180105_1930.py
ReedyChen/opra
86ce88c7219d92e321cd9aa3d0bc2bf631e4b90f
[ "MIT" ]
null
null
null
compsocsite/polls/migrations/0108_merge_20180105_1930.py
ReedyChen/opra
86ce88c7219d92e321cd9aa3d0bc2bf631e4b90f
[ "MIT" ]
9
2016-06-09T03:36:20.000Z
2019-09-11T20:56:23.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-01-06 00:30 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('polls', '0107_auto_20180101_2108'), ('polls', '0107_auto_20180105_1858'), ] operations = [ ]
19.529412
46
0.659639
40
332
5.2
0.8
0.086538
0.125
0
0
0
0
0
0
0
0
0.184615
0.216867
332
16
47
20.75
0.615385
0.198795
0
0
1
0
0.212928
0.174905
0
0
0
0
0
1
0
false
0
0.222222
0
0.555556
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
e37b4614ad6f2375762685c14b508a5358b41194
184
py
Python
CRONtest/hello.py
liu2z2/TutorCal
41cd0272d59cd1cca439cfef178485d0d8096820
[ "MIT" ]
null
null
null
CRONtest/hello.py
liu2z2/TutorCal
41cd0272d59cd1cca439cfef178485d0d8096820
[ "MIT" ]
null
null
null
CRONtest/hello.py
liu2z2/TutorCal
41cd0272d59cd1cca439cfef178485d0d8096820
[ "MIT" ]
null
null
null
import datetime time=datetime.datetime.today().strftime("%H-%M-%S") text_file = open("/home/pi/TutorCal/CRONtest/"+time+".txt", "w") text_file.write("Hello world!") text_file.close()
26.285714
64
0.711957
28
184
4.571429
0.75
0.1875
0
0
0
0
0
0
0
0
0
0
0.059783
184
7
65
26.285714
0.739884
0
0
0
0
0
0.281081
0.145946
0
0
0
0
0
1
0
false
0
0.2
0
0.2
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
e3850a968708849ad26d08ad8495038926eabd09
248
py
Python
9bus.py
sayonsom/Canvass
e59cd68f26722144abc5caf2d7ae1e7389c39ad1
[ "MIT" ]
9
2018-01-29T10:53:25.000Z
2021-02-21T19:35:23.000Z
9bus.py
cyberange-dev0ps/Canvass
e59cd68f26722144abc5caf2d7ae1e7389c39ad1
[ "MIT" ]
1
2019-06-04T14:43:34.000Z
2021-07-09T08:35:13.000Z
9bus.py
cyberange-dev0ps/Canvass
e59cd68f26722144abc5caf2d7ae1e7389c39ad1
[ "MIT" ]
12
2017-05-04T23:39:10.000Z
2021-09-25T17:05:00.000Z
# There are copyright holders. import pandapower as pp import pandapower.networks as pn net = pn.case9() pp.runpp(net) print ("Canvass NR Power Flow Results At The Buses") print ("------------------------------------------") print (net.res_bus)
22.545455
52
0.612903
33
248
4.575758
0.727273
0.211921
0
0
0
0
0
0
0
0
0
0.004651
0.133065
248
11
53
22.545455
0.697674
0.112903
0
0
0
0
0.385321
0.192661
0
0
0
0
0
1
0
false
0
0.285714
0
0.285714
0.428571
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
2
e388be8ed758ecb9a717bada7d2953a7819ac2aa
315
py
Python
archeutils/urls.py
acdh-oeaw/acdh-django-archeutils
d1d560ce739d3e2eeddd080c4d96e7482fefbbc5
[ "MIT" ]
null
null
null
archeutils/urls.py
acdh-oeaw/acdh-django-archeutils
d1d560ce739d3e2eeddd080c4d96e7482fefbbc5
[ "MIT" ]
null
null
null
archeutils/urls.py
acdh-oeaw/acdh-django-archeutils
d1d560ce739d3e2eeddd080c4d96e7482fefbbc5
[ "MIT" ]
null
null
null
from django.urls import include, path from . import arche_rdf_views app_name = "archeutils" urlpatterns = [ path('<app_name>/<model_name>/<pk>', arche_rdf_views.res_as_arche_graph, name='res_as_arche_graph'), path('<app_name>/<model_name>', arche_rdf_views.qs_as_arche_graph, name='qs_as_arche_graph'), ]
31.5
104
0.75873
50
315
4.32
0.38
0.12963
0.222222
0.148148
0.185185
0
0
0
0
0
0
0
0.101587
315
9
105
35
0.763251
0
0
0
0
0
0.304762
0.161905
0
0
0
0
0
1
0
false
0
0.285714
0
0.285714
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
0
0
0
0
0
2
8b504f70d7990baf24d2b512d627ec9c1ca831af
223
py
Python
src/common/json_attributes.py
rosenloecher-it/enocean-mqtt-bridge
d56e41a1a67e70bdeb1aa46d10f48ed5a12ca59c
[ "MIT" ]
1
2020-12-01T17:10:14.000Z
2020-12-01T17:10:14.000Z
src/common/json_attributes.py
rosenloecher-it/enocean-mqtt-bridge
d56e41a1a67e70bdeb1aa46d10f48ed5a12ca59c
[ "MIT" ]
1
2021-09-19T13:38:02.000Z
2021-09-19T13:38:02.000Z
src/common/json_attributes.py
rosenloecher-it/enocean-mqtt-bridge
d56e41a1a67e70bdeb1aa46d10f48ed5a12ca59c
[ "MIT" ]
null
null
null
class JsonAttributes: TIMESTAMP = "timestamp" STATE = "state" DIM_STATE = "dim_state" SWITCH_STATE = "switch_state" VALUE = "value" BUTTON = "button" SINCE = "since" DEVICE = "device"
13.117647
33
0.596413
22
223
5.863636
0.454545
0.124031
0.20155
0
0
0
0
0
0
0
0
0
0.29148
223
16
34
13.9375
0.816456
0
0
0
0
0
0.256757
0
0
0
0
0
0
1
0
false
0
0
0
1
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
8b58c384ea2a5cec4051907804ed34709b049103
4,126
py
Python
server/music/api.py
tricelex/zc_plugin_youtube_music_video
f3389cafc9e1a6b0fd2d94e0af77e9beec678282
[ "MIT" ]
null
null
null
server/music/api.py
tricelex/zc_plugin_youtube_music_video
f3389cafc9e1a6b0fd2d94e0af77e9beec678282
[ "MIT" ]
null
null
null
server/music/api.py
tricelex/zc_plugin_youtube_music_video
f3389cafc9e1a6b0fd2d94e0af77e9beec678282
[ "MIT" ]
null
null
null
# class SidebarView(GenericAPIView): # permission_classes = [AllowAny] # def get(self, request, *args, **kwargs): # org_id = request.GET.get("org", None) # user_id = request.GET.get("user", None) # room = settings.ROOM_COLLECTION # plugin_id = settings.PLUGIN_ID # roomid = settings.ROOM_ID # token = verify_token # pub_room = get_room_info() # # subscription_channel: org_id_memberid_sidebar # if request.GET.get("org") and request.GET.get("user"): # subscription_channel = "{org_id}_{user_id}_sidebar" # #sidebar_update = "currentWorkspace_userInfo_sidebar" # sidebar_update_payload = { # "event": "sidebar_update", # "plugin_id": "music.zuri.chat", # "data": { # "name": "Music Plugin", # "description": "This is a virtual lounge where people can add, watch and listen to YouTube videos or music", # "plugin_id": plugin_id, # "organisation_id": org_id, # "room_id": roomid, # "user_id": user_id, # "category": "entertainment", # "group_name": "music", # "show_group": False, # "button_url": f"/music/{org_id}/{roomid}", # "public_rooms": [pub_room], # # "starred" : [], # "joined_rooms": [pub_room], # }, # } # # centrifugo_post(sidebar_update_payload, subscription_channel) # # return Response(sidebar_update_payload) # url = "https://api.zuri.chat/sidebar?org={org_id}&user={user_id}" # # http://127.0.0.1:8000/sidebar?org=61695d8bb2cc8a9af4833d46&user=61695d8bb2cc8a9af4833d47 # r = requests.get(url) # # print(r.status_code) # if r.status_code == 200: # # public_url = f"https://api.zuri.chat/data/read/{org_id}/{plugin_id}/{room}/{roomid}" # # r = requests.get(public_url) # publish_to_sidebar(plugin_id, user_id, {"event": "sidebar_update", "data": pub_room}) # centrifugo_post(sidebar_update_payload, subscription_channel) # return Response(r) # else: # centrifugo_post(sidebar_update_payload, subscription_channel) # return Response( # { # "event": "sidebar_update", # "name": "Music Plugin", # "description": "This is a virtual lounge where people can add, watch and listen to YouTube videos or music", # "plugin_id": plugin_id, # "organisation_id": org_id, # "room_id": roomid, # "user_id": user_id, # "group_name": [], # "show_group": False, # "category": "entertainment", # "public_rooms": [pub_room], # "joined_rooms": [pub_room], # } # ) # else: # centrifugo_post(sidebar_update_payload, subscription_channel) # return JsonResponse( # { # "name": "Music Plugin", # "description": "This is a virtual lounge where people can add, watch and listen to YouTube videos or music", # "plugin_id": plugin_id, # "organisation_id": org_id, # "room_id": roomid, # "user_id": user_id, # "group_name": [], # "show_group": False, # "category": "entertainment", # "public_rooms": [pub_room], # "joined_rooms": [pub_room], # } # ) # def is_valid(param): # return param != "" and param is not None
41.26
134
0.479641
374
4,126
5.018717
0.256684
0.046883
0.063932
0.057539
0.488013
0.488013
0.488013
0.488013
0.488013
0.416622
0
0.017423
0.401842
4,126
99
135
41.676768
0.743112
0.953708
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
2
8b5af6372e48aa5e412d730c4fca44191540f238
1,360
py
Python
src/gui/components/weeklycolormesh.py
larashores/spotify-analyzer
98022b178ce3ef1b07a8f005aeba2aeb573125ee
[ "MIT" ]
null
null
null
src/gui/components/weeklycolormesh.py
larashores/spotify-analyzer
98022b178ce3ef1b07a8f005aeba2aeb573125ee
[ "MIT" ]
null
null
null
src/gui/components/weeklycolormesh.py
larashores/spotify-analyzer
98022b178ce3ef1b07a8f005aeba2aeb573125ee
[ "MIT" ]
null
null
null
import collections import colorsys from typing import Iterable, List, Tuple import matplotobjlib as plot from backports import zoneinfo from matplotlib.colors import ListedColormap import utils from gui.components import PlotComponent from gui.options import ArtistChooser, ColorMap, Spinbox from track import Track class WeeklyColorMesh(PlotComponent): name = "Weekly Color Mesh" adjust = plot.SubplotsAdjust(left=0.12, right=0.975, top=0.975, bottom=0.09) options = (ColorMap,) def subplot(self, tracks: List[Track], color_map: ListedColormap) -> plot.SubPlot: # type: ignore # pylint: disable=arguments-differ values = [[0 for i in range(24)] for i in range(7)] for track in tracks: values[-((utils.in_day(track).weekday() - 5)) % 7][utils.in_hour(track).hour - 1] += 1 return plot.SubPlot( plot.Colormesh(values, color_map), x_tick_options=plot.TickOptions( labels=[f"{i+1}\nam" for i in range(11)] + ["12\npm"] + [f"{i+1}\npm" for i in range(11)] + ["12\nam"], values=[i + 0.5 for i in range(24)], ), y_tick_options=plot.TickOptions( labels=["Saturday", "Friday", "Thursday", "Wednesday", "Tuesday", "Monday", "Sunday"], values=[i + 0.5 for i in range(7)], ), )
35.789474
137
0.627206
180
1,360
4.694444
0.455556
0.028402
0.042604
0.078107
0.191716
0.08284
0.047337
0.047337
0
0
0
0.037864
0.242647
1,360
37
138
36.756757
0.782524
0.033824
0
0.068966
0
0
0.073989
0
0
0
0
0
0
1
0.034483
false
0
0.344828
0
0.551724
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
8b6038fb868f4e95b06475e6967de2992f3ee654
2,947
py
Python
src/brouwers/shop/migrations/0021_payment.py
modelbrouwers/modelbrouwers
e0ba4819bf726d6144c0a648fdd4731cdc098a52
[ "MIT" ]
6
2015-03-03T13:23:07.000Z
2021-12-19T18:12:41.000Z
src/brouwers/shop/migrations/0021_payment.py
modelbrouwers/modelbrouwers
e0ba4819bf726d6144c0a648fdd4731cdc098a52
[ "MIT" ]
95
2015-02-07T00:55:39.000Z
2022-02-08T20:22:05.000Z
src/brouwers/shop/migrations/0021_payment.py
modelbrouwers/modelbrouwers
e0ba4819bf726d6144c0a648fdd4731cdc098a52
[ "MIT" ]
2
2016-03-22T16:53:26.000Z
2019-02-09T22:46:04.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-06-29 13:56 from __future__ import unicode_literals import django.contrib.postgres.fields.jsonb import django.db.models.deletion from django.db import migrations, models import brouwers.shop.models.utils class Migration(migrations.Migration): dependencies = [ ("shop", "0020_auto_20190524_0927"), ] operations = [ migrations.CreateModel( name="Payment", fields=[ ( "id", models.AutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ( "reference", models.CharField( default=brouwers.shop.models.utils.get_payment_reference, help_text="A unique payment reference", max_length=16, unique=True, verbose_name="reference", ), ), ( "amount", models.IntegerField( help_text="Amount to be paid, in eurocents.", verbose_name="amount", ), ), ( "data", django.contrib.postgres.fields.jsonb.JSONField( blank=True, default=dict, help_text="The exact payment data is provider-specific", verbose_name="payment data", ), ), ( "created", models.DateTimeField(auto_now_add=True, verbose_name="created"), ), ( "modified", models.DateTimeField(auto_now=True, verbose_name="modified"), ), ( "cart", models.ForeignKey( help_text="The shopping cart that generated this payment.", on_delete=django.db.models.deletion.PROTECT, to="shop.Cart", verbose_name="shopping cart", ), ), ( "payment_method", models.ForeignKey( on_delete=django.db.models.deletion.PROTECT, to="shop.PaymentMethod", verbose_name="Payment method used", ), ), ], options={ "verbose_name": "payment", "verbose_name_plural": "payments", }, ), ]
33.11236
84
0.405836
207
2,947
5.613527
0.458937
0.094664
0.036145
0.056799
0.129088
0.07401
0.07401
0.07401
0.07401
0
0
0.024845
0.508314
2,947
88
85
33.488636
0.777088
0.023414
0
0.2375
1
0
0.133565
0.008
0
0
0
0
0
1
0
false
0
0.0625
0
0.1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
8b73f4c7986a2f8c2bd94b366f876d38ceb6a037
303
py
Python
06source_code/service-center/language-service/bin/language_service.py
dumengnan/unicorn
165330ff8e01bc18e3eca2d8ecf23b5d955f155b
[ "Apache-2.0" ]
null
null
null
06source_code/service-center/language-service/bin/language_service.py
dumengnan/unicorn
165330ff8e01bc18e3eca2d8ecf23b5d955f155b
[ "Apache-2.0" ]
8
2020-01-28T22:31:03.000Z
2022-03-02T03:37:47.000Z
06source_code/service-center/language-service/bin/language_service.py
dumengnan/unicorn
165330ff8e01bc18e3eca2d8ecf23b5d955f155b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 import _load_lib import sys import logging import os from unicorn.language.app\ import main as languae_main if __name__ == '__main__': try: languae_main() except Exception as ex: logging.exception("main except") os._exit(1)
16.833333
40
0.673267
42
303
4.547619
0.666667
0.115183
0
0
0
0
0
0
0
0
0
0.008621
0.234323
303
17
41
17.823529
0.814655
0.118812
0
0
0
0
0.071698
0
0
0
0
0
0
1
0
true
0
0.416667
0
0.416667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
2
8b820e62535a256f6892582e2d661efa4be1b944
1,748
py
Python
model.py
TilenHumar/Vislice
5970fb4d887a5689b906a7190fabb5405b25bbc7
[ "MIT" ]
null
null
null
model.py
TilenHumar/Vislice
5970fb4d887a5689b906a7190fabb5405b25bbc7
[ "MIT" ]
2
2021-04-19T15:51:18.000Z
2021-04-19T16:17:06.000Z
model.py
TilenHumar/Vislice
5970fb4d887a5689b906a7190fabb5405b25bbc7
[ "MIT" ]
null
null
null
import random # najprej konstante STEVILO_DOVOLJENIH_NAPAK = 10 PRAVILNA_CRKA = "+" PONOVLJENA_CRKA = "o" NAPACNA_CRKA = "-" ZMAGA = "W" PORAZ = "X" class Igra: def __init__(self, geslo, crke): self.geslo = geslo.upper() # pravilno geslo self.crke = crke.upper() # do sedaj ugibane črke # v igri so zgolj velike crke def napacne_crke(self): return [crka for crka in self.crke if crka not in self.geslo] def pravilne_crke(self): return [crka for crka in self.crke if crka in self.geslo] def stevilo_napak(self): return len(self.napacne_crke()) def poraz(self): return self.stevilo_napak() > STEVILO_DOVOLJENIH_NAPAK def zmaga (self): return all([i in self.crke for i in self.geslo]) def pravilni_del_gesla(self): rezultat = "" for crka in self.geslo: if crka in self.crke: rezultat += crka else: rezultat += "_" return rezultat def nepravilni_ugibi(self): return " ".join(self.napacne_crke()) def ugibaj(self, crka): crka = crka.upper() if self.poraz(): return PORAZ if crka in self.crke: return PONOVLJENA_CRKA self.crke += crka if self.zmaga(): return ZMAGA if crka in self.geslo: return PRAVILNA_CRKA if self.poraz: return PORAZ return NAPACNA_CRKA bazen_besed = [] with open("besede.txt", encoding ="utf8") as input_file: bazen_besed = input_file.readlines() def nova_igra(bazen_besed): beseda = random.choice(bazen_besed).strip() return Igra(beseda, "")
23
69
0.582952
217
1,748
4.552995
0.322581
0.060729
0.07085
0.05668
0.188259
0.082996
0.082996
0.082996
0.082996
0.082996
0
0.002542
0.324943
1,748
76
70
23
0.834746
0.046911
0
0.078431
0
0
0.012635
0
0
0
0
0
0
1
0.196078
false
0
0.019608
0.117647
0.509804
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
2
8b8bd5685a8cb00d4aca06f90e968e83f7055e18
10,174
py
Python
ioflo/aio/proto/devicing.py
BradyHammond/ioflo
177ac656d7c4ff801aebb0d8b401db365a5248ce
[ "ECL-2.0", "Apache-2.0", "MIT" ]
128
2015-01-14T12:26:56.000Z
2021-11-06T07:09:29.000Z
ioflo/aio/proto/devicing.py
BradyHammond/ioflo
177ac656d7c4ff801aebb0d8b401db365a5248ce
[ "ECL-2.0", "Apache-2.0", "MIT" ]
17
2015-01-28T18:26:50.000Z
2020-11-19T22:08:06.000Z
ioflo/aio/proto/devicing.py
BradyHammond/ioflo
177ac656d7c4ff801aebb0d8b401db365a5248ce
[ "ECL-2.0", "Apache-2.0", "MIT" ]
29
2015-01-27T23:28:31.000Z
2021-05-04T16:37:30.000Z
""" Device Base Package """ from __future__ import absolute_import, division, print_function import struct from binascii import hexlify from collections import deque, namedtuple import enum import socket from ...aid.sixing import * from ...aid.odicting import odict from ...aid.byting import bytify, unbytify, packify, unpackify from ...aid.eventing import eventify, tagify from ...aid import getConsole from .. import aioing from .protoing import MixIn console = getConsole() class Device(MixIn): """ Device Class """ def __init__(self, stack, uid=None, name=None, ha=None, kind=None, ): """ Initialization method for instance Parameters: stack is Stack managing this device required name is user friendly name of device uid is unique device id ha is device host address kind is type of device Attributes: .stack is Stack managing this device required .name is user friendly name of device .uid is unique device id per channel or site .ha is device host address .kind is type of device """ self.stack = stack self.uid = uid if uid is not None else stack.nextUid() self.name = name if name is not None else "Device{0}".format(self.uid) self.ha = ha if ha is not None else '' self.kind = kind def show(self): """ Display device data """ result = ("Device: name={0} uid={1} ha={2} kind={3}\n".format( self.name, self.uid, self.ha, self.kind)) return result def process(self): """ Timer based processing """ pass def receive(self, rx): """ Process received rx msg/pkt/data. """ pass class LocalDevice(Device): """ Local Device Class """ def __init__(self, stack, **kwa): """ Initialization method for instance Assumes local device in stack is created before any remotes are added Inherited Parameters: stack is Stack managing this device required name is user friendly name of device uid is unique device id ha is device host address kind is type of device Inherited Attributes: .stack is Stack managing this device required .name is user friendly name of device .uid is unique device id per channel or site .ha is device host address .kind is type of device """ super(LocalDevice, self).__init__(stack=stack, **kwa) class RemoteDevice(Device): """ Remote Device Class """ def __init__(self, stack, uid=None, **kwa): """ Initialization method for instance Inherited Parameters: stack is Stack managing this device required name is user friendly name of device uid is unique device id ha is device host address kind is type of device Inherited Attributes: .stack is Stack managing this device required .name is user friendly name of device .uid is unique device id per channel or site .ha is device host address .kind is type of device """ if uid is None: uid = stack.nextUid() while uid in stack.remotes or uid in (stack.local.uid,): uid = stack.nextUid() super(RemoteDevice, self).__init__(stack=stack, uid=uid, **kwa) def receive(self, msg): """ Process received rx msg/pkt/data. """ if msg is not None: self.stack.rxMsgs.append(msg) class SingleRemoteDevice(Device): """ Remote Device Class when only one remote in stack .remote Affects how uid is assigned """ def __init__(self, stack, uid=None, uids=None, **kwa): """ Initialization method for instance Inherited Parameters: stack is Stack managing this device required name is user friendly name of device uid is unique device id ha is device host address kind is type of device Parameters: uids is sequence or set of used uids to not use for remote if uid not provided Inherited Attributes: .stack is Stack managing this device required .name is user friendly name of device .uid is unique device id per channel or site .ha is device host address .kind is type of device Attributes: .uids is sequence or set of used uids to not use for remote if uid not provided """ if uid is None: uids = set(uids) if uids is not None else set() if hasattr(stack, 'local'): uids.add(stack.local.uid) uid = stack.nextUid() while uid in uids: uid = stack.nextUid() super(SingleRemoteDevice, self).__init__(stack=stack, uid=uid, **kwa) class IpDevice(Device): """ IP device """ def __init__(self, stack, ha=None, **kwa): """ Initialization method for instance Inherited Parameters: stack is Stack managing this device required name is user friendly name of device uid is unique device id ha is device udp host address, a duple (host,port) kind is type of device Parameters: Inherited Attributes: .stack is Stack managing this device required .name is user friendly name of device .uid is unique device id per channel or site .ha is device udp host address, a duple (host,port) .kind is type of device Attributes: """ if ha: host, port = ha host = aioing.normalizeHost(host) if host in ('0.0.0.0',): host = '127.0.0.1' elif host in ("::", "0:0:0:0:0:0:0:0"): host = "::1" ha = (host, port) else: ha = ('127.0.0.1', stack.Port) super(IpDevice, self).__init__(stack=stack, ha=ha, **kwa) @property def host(self): """ Property that returns host of local interface ha duple (host, port) """ return self.ha[0] @host.setter def host(self, value): """ Setter for host property """ host, port = self.local.ha self.local.ha = (value, port) @property def port(self): """ Property that returns host of local interface ha duple (host, port) """ return self.ha[1] @port.setter def port(self, value): """ Setter for host property """ host, port = self.local.ha self.local.ha = (host, value) class IpLocalDevice(IpDevice, LocalDevice): """ Ip LocalDevice """ def __init__(self, stack, **kwa): """ Initialization method for instance Inherited Parameters: stack is Stack managing this device required name is user friendly name of device uid is unique device id ha is device udp host address, a duple (host,port) kind is type of device Parameters: Inherited Attributes: .stack is Stack managing this device required .name is user friendly name of device .uid is unique device id per channel or site .ha is device udp host address, a duple (host,port) .kind is type of device Attributes: """ super(IpLocalDevice, self).__init__(stack=stack, **kwa) class IpRemoteDevice(IpDevice, RemoteDevice): """ Ip remote device """ def __init__(self, stack, **kwa): """ Initialization method for instance Inherited Parameters: stack is Stack managing this device required name is user friendly name of device uid is unique device id ha is device udp host address, a duple (host,port) kind is type of device Parameters: Inherited Attributes: .stack is Stack managing this device required .name is user friendly name of device .uid is unique device id per channel or site .ha is device udp host address, a duple (host,port) .kind is type of device Attributes: """ super(IpRemoteDevice, self).__init__(stack=stack, **kwa) class IpSingleRemoteDevice(IpDevice, SingleRemoteDevice): """ Ip Single Remote Device Class when only one remote in stack .remote Affects how uid is assigned """ def __init__(self, stack, **kwa): """ Initialization method for instance Inherited Parameters: stack is Stack managing this device required name is user friendly name of device uid is unique device id ha is device udp host address, a duple (host,port) kind is type of device Parameters: Inherited Attributes: .stack is Stack managing this device required .name is user friendly name of device .uid is unique device id per channel or site .ha is device udp host address, a duple (host,port) .kind is type of device Attributes: """ super(IpSingleRemoteDevice, self).__init__(stack=stack, **kwa)
27.276139
91
0.548555
1,183
10,174
4.661877
0.12257
0.046419
0.034814
0.058024
0.720762
0.710426
0.662013
0.650771
0.639166
0.6301
0
0.005104
0.383822
10,174
372
92
27.349462
0.874621
0.472675
0
0.347826
0
0
0.025377
0
0
0
0
0
0
1
0.13913
false
0.017391
0.113043
0
0.347826
0.008696
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
8ba8b01b1342226dbfd45e390f34ba1e3c088e34
123
py
Python
clase1/multiplicadores.py
Munoz-Rojas-Adriana/Computacion_para_Ingenieria
4f695887966a94b6c422d100c2c4ec4a94d1e80e
[ "Apache-2.0" ]
null
null
null
clase1/multiplicadores.py
Munoz-Rojas-Adriana/Computacion_para_Ingenieria
4f695887966a94b6c422d100c2c4ec4a94d1e80e
[ "Apache-2.0" ]
null
null
null
clase1/multiplicadores.py
Munoz-Rojas-Adriana/Computacion_para_Ingenieria
4f695887966a94b6c422d100c2c4ec4a94d1e80e
[ "Apache-2.0" ]
null
null
null
multi = 0 list = (1 , 2 , 3) for i in list: multi = multi + i print (f'la multi total de 1 al 3 es {multi}')
15.375
50
0.528455
24
123
2.708333
0.666667
0
0
0
0
0
0
0
0
0
0
0.075
0.349594
123
8
50
15.375
0.7375
0
0
0
0
0
0.282258
0
0
0
0
0
0
1
0
false
0
0
0
0
0.2
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
8bb369887e18a7fa4f7256d2ff77d3ccf9f84c6a
5,607
py
Python
nfv/nfv-vim/nfv_vim/nfvi/api/v1/_nfvi_network_api.py
SidneyAn/nfv
5f0262a5b6ea4be59f977b9c587c483cbe0e373d
[ "Apache-2.0" ]
2
2020-02-07T19:01:36.000Z
2022-02-23T01:41:46.000Z
nfv/nfv-vim/nfv_vim/nfvi/api/v1/_nfvi_network_api.py
SidneyAn/nfv
5f0262a5b6ea4be59f977b9c587c483cbe0e373d
[ "Apache-2.0" ]
1
2021-01-14T12:02:25.000Z
2021-01-14T12:02:25.000Z
nfv/nfv-vim/nfv_vim/nfvi/api/v1/_nfvi_network_api.py
SidneyAn/nfv
5f0262a5b6ea4be59f977b9c587c483cbe0e373d
[ "Apache-2.0" ]
2
2021-01-13T08:39:21.000Z
2022-02-09T00:21:55.000Z
# # Copyright (c) 2015-2016 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # import abc import six @six.add_metaclass(abc.ABCMeta) class NFVINetworkAPI(object): """ Abstract NFVI Network API Class Definition """ @abc.abstractproperty def name(self): """ Returns the name of plugin """ pass @abc.abstractproperty def version(self): """ Returns the version of the plugin """ pass @abc.abstractproperty def provider(self): """ Returns the vendor who created the plugin """ pass @abc.abstractproperty def signature(self): """ Returns the signature of the plugin """ pass @abc.abstractmethod def get_networks(self, future, paging, callback): """ Get a list of networks using the plugin """ pass @abc.abstractmethod def create_network(self, future, network_name, network_type, segmentation_id, physical_network, shared, callback): """ Create a network using the plugin """ pass @abc.abstractmethod def update_network(self, future, network_uuid, shared, callback): """ Update a network using the plugin """ pass @abc.abstractmethod def delete_network(self, future, network_uuid, callback): """ Delete a network using the plugin """ pass @abc.abstractmethod def get_network(self, future, network_uuid, callback): """ Get a network using the plugin """ pass @abc.abstractmethod def get_subnets(self, future, paging, callback): """ Get a list of subnets using the plugin """ pass @abc.abstractmethod def create_subnet(self, future, network_uuid, subnet_name, ip_version, subnet_ip, subnet_prefix, gateway_ip, dhcp_enabled, callback): """ Create a subnet using the plugin """ pass @abc.abstractmethod def update_subnet(self, future, subnet_uuid, gateway_ip, delete_gateway, dhcp_enabled, callback): """ Update a subnet using the plugin """ pass @abc.abstractmethod def delete_subnet(self, future, subnet_uuid, callback): """ Delete a subnet using the plugin """ pass @abc.abstractmethod def get_subnet(self, future, subnet_uuid, callback): """ Get a subnet using the plugin """ pass @abc.abstractmethod def notify_host_disabled(self, future, host_uuid, host_name, host_personality, callback): """ Notify network host disabled using the plugin """ pass @abc.abstractmethod def enable_host_services(self, future, host_uuid, host_name, host_personality, callback): """ Enable network services on a host using the plugin """ pass @abc.abstractmethod def get_network_agents(self, future, callback): """ Get network agent information using the plugin """ pass @abc.abstractmethod def get_dhcp_agent_networks(self, future, agent_id, callback): """ Get networks hosted by a dhcp agent using the plugin """ pass @abc.abstractmethod def get_agent_routers(self, future, agent_id, callback): """ Get network routers on a hosting agent using the plugin """ pass @abc.abstractmethod def get_router_ports(self, future, router_id, callback): """ Get router ports using the plugin """ pass @abc.abstractmethod def add_network_to_dhcp_agent(self, future, agent_id, network_id, callback): """ Add a network to a dhcp agent using the plugin """ pass @abc.abstractmethod def remove_network_from_dhcp_agent(self, future, agent_id, network_id, callback): """ Remove a network from a dhcp agent using the plugin """ pass @abc.abstractmethod def add_router_to_agent(self, future, agent_id, router_id, callback): """ Add a router to an agent using the plugin """ pass @abc.abstractmethod def remove_router_from_agent(self, future, agent_id, router_id, callback): """ Remove router from an agent using the plugin """ pass @abc.abstractmethod def get_physical_network(self, future, network_id, callback): """ Get physical network of a network using the plugin """ pass @abc.abstractmethod def delete_host_services(self, future, host_uuid, host_name, host_personality, callback): """ Delete network services on a host using the plugin """ pass @abc.abstractmethod def query_host_services(self, future, host_uuid, host_name, host_personality, check_fully_up, callback): """ Query network services on a host using the plugin """ pass @abc.abstractmethod def initialize(self, config_file): """ Initialize the plugin """ pass @abc.abstractmethod def finalize(self): """ Finalize the plugin """ pass
24.809735
85
0.574817
599
5,607
5.228715
0.160267
0.092593
0.11622
0.137931
0.64719
0.618455
0.525224
0.501596
0.393678
0.223819
0
0.002727
0.345996
5,607
225
86
24.92
0.851377
0.227394
0
0.63
0
0
0
0
0
0
0
0
0
1
0.29
false
0.29
0.02
0
0.32
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
2
8bb6d2bd0e69ae1dc3728d097c16522641fbedbf
1,155
py
Python
devlib/exception.py
BayLibre/devlib
efa0ecdfe931caebc9a7dab16bb172b96c3f92cb
[ "Apache-2.0" ]
1
2021-06-19T09:32:50.000Z
2021-06-19T09:32:50.000Z
devlib/exception.py
BayLibre/devlib
efa0ecdfe931caebc9a7dab16bb172b96c3f92cb
[ "Apache-2.0" ]
1
2016-02-08T11:27:34.000Z
2016-02-08T11:27:34.000Z
devlib/exception.py
BayLibre/devlib
efa0ecdfe931caebc9a7dab16bb172b96c3f92cb
[ "Apache-2.0" ]
3
2015-12-15T11:28:06.000Z
2016-03-04T16:36:19.000Z
# Copyright 2013-2015 ARM Limited # # 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 devlib.utils.misc import TimeoutError # NOQA pylint: disable=W0611 class DevlibError(Exception): """Base class for all Workload Automation exceptions.""" pass class TargetError(DevlibError): """An error has occured on the target""" pass class TargetNotRespondingError(DevlibError): """The target is unresponsive.""" def __init__(self, target): super(TargetNotRespondingError, self).__init__('Target {} is not responding.'.format(target)) class HostError(DevlibError): """An error has occured on the host""" pass
28.170732
101
0.732468
155
1,155
5.406452
0.632258
0.071599
0.031026
0.038186
0.078759
0.078759
0.078759
0
0
0
0
0.016913
0.180952
1,155
40
102
28.875
0.868922
0.6329
0
0.3
0
0
0.072165
0
0
0
0
0
0
1
0.1
false
0.3
0.1
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
0
0
1
0
0
1
0
0
2
8bca7c3ef84914924b0c15217d9b07d51210a502
395
py
Python
xrobot_launcher.py
martinRenou/xeus-robot-wheel
e14034c9e7c15417b9b125d3b03f660606df0b4e
[ "BSD-3-Clause" ]
null
null
null
xrobot_launcher.py
martinRenou/xeus-robot-wheel
e14034c9e7c15417b9b125d3b03f660606df0b4e
[ "BSD-3-Clause" ]
null
null
null
xrobot_launcher.py
martinRenou/xeus-robot-wheel
e14034c9e7c15417b9b125d3b03f660606df0b4e
[ "BSD-3-Clause" ]
null
null
null
if __name__ == '__main__': def _xrobot_get_connection_filename(): import argparse parser = argparse.ArgumentParser() parser.add_argument('-f', help='Jupyter kernel connection filename') args, unknown = parser.parse_known_args() return args.f from xrobot import launch as _xrobot_launch _xrobot_launch(_xrobot_get_connection_filename() or '')
35.909091
76
0.701266
45
395
5.644444
0.6
0.212598
0.149606
0.212598
0
0
0
0
0
0
0
0
0.212658
395
10
77
39.5
0.81672
0
0
0
0
0
0.111392
0
0
0
0
0
0
1
0.111111
false
0
0.222222
0
0.444444
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
0
0
0
0
0
0
0
2
8bd259e0e2d2b9af5c910c05de23636129ffb891
113
py
Python
01_Language/01_Functions/python/fflush.py
cliff363825/TwentyFour
09df59bd5d275e66463e343647f46027397d1233
[ "MIT" ]
3
2020-06-28T07:42:51.000Z
2021-01-15T10:32:11.000Z
01_Language/01_Functions/python/fflush.py
cliff363825/TwentyFour
09df59bd5d275e66463e343647f46027397d1233
[ "MIT" ]
9
2021-03-10T22:45:40.000Z
2022-02-27T06:53:20.000Z
01_Language/01_Functions/python/fflush.py
cliff363825/TwentyFour
09df59bd5d275e66463e343647f46027397d1233
[ "MIT" ]
1
2021-01-15T10:51:24.000Z
2021-01-15T10:51:24.000Z
# coding: utf-8 f = open("test.txt", mode="r+") f.write("hello world") f.flush() f.truncate(f.tell()) f.close()
14.125
31
0.610619
21
113
3.285714
0.761905
0
0
0
0
0
0
0
0
0
0
0.01
0.115044
113
7
32
16.142857
0.68
0.115044
0
0
0
0
0.214286
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
8bd88ec45c6933abd1b51585d3a13a40674a382b
225
py
Python
exer/ex5-2.py
vitorsergiota/python
2cc95392a2a52a871e0582e4e900c0aa24a021a1
[ "MIT" ]
null
null
null
exer/ex5-2.py
vitorsergiota/python
2cc95392a2a52a871e0582e4e900c0aa24a021a1
[ "MIT" ]
null
null
null
exer/ex5-2.py
vitorsergiota/python
2cc95392a2a52a871e0582e4e900c0aa24a021a1
[ "MIT" ]
null
null
null
num = int(input('Escreva um digito:')) soma=0 while num > 0 digito = num%10 # obtem algarismo unidades num = num // 10 # remove algarismo unidades if digito % 2 == 0: #par soma = soma + digito print(soma)
25
47
0.622222
33
225
4.242424
0.545455
0.071429
0
0
0
0
0
0
0
0
0
0.048193
0.262222
225
8
48
28.125
0.795181
0.235556
0
0
0
0
0.107143
0
0
0
0
0
0
0
null
null
0
0
null
null
0.125
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
2
8bde558284ee50c285e21e6e1f4a0e2c6265f5bf
21,737
py
Python
pysnmp-with-texts/CISCO-ATM-EXT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/CISCO-ATM-EXT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/CISCO-ATM-EXT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module CISCO-ATM-EXT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-ATM-EXT-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:50:35 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection") atmVclEntry, aal5VccEntry = mibBuilder.importSymbols("ATM-MIB", "atmVclEntry", "aal5VccEntry") ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt") ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup") Unsigned32, iso, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, Counter32, NotificationType, IpAddress, Bits, ModuleIdentity, Gauge32, MibIdentifier, Counter64, ObjectIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "Unsigned32", "iso", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "Counter32", "NotificationType", "IpAddress", "Bits", "ModuleIdentity", "Gauge32", "MibIdentifier", "Counter64", "ObjectIdentity") DisplayString, TextualConvention, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention", "TruthValue") ciscoAtmExtMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 88)) ciscoAtmExtMIB.setRevisions(('2003-01-06 00:00', '1997-06-20 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: ciscoAtmExtMIB.setRevisionsDescriptions(('Added ciscoAtmVclExtOamTable for OAM configuration and state information.', 'Initial version of this MIB module.',)) if mibBuilder.loadTexts: ciscoAtmExtMIB.setLastUpdated('200301060000Z') if mibBuilder.loadTexts: ciscoAtmExtMIB.setOrganization('Cisco Systems, Inc.') if mibBuilder.loadTexts: ciscoAtmExtMIB.setContactInfo(' Cisco Systems Customer Service Postal: 170 W. Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: [email protected]') if mibBuilder.loadTexts: ciscoAtmExtMIB.setDescription('An extension to the Cisco ATM MIB module for managing ATM implementations. Acronyms and terms used in the MIB module: AAL5 -- ATM adaptation layer 5. AIS -- Alarm Indication Signal. CC -- Continuity Check. End-to-end -- End-to-end continuity checking. Monitoring occurs on the entire VC between two ATM end stations. F5 OAM -- OAM information flow between network elements (NEs) used within virtual connections to report degraded virtual channel performance. OAM -- Operations, Administration and Maintenance. RDI -- Remote Detection Indication. Segment -- Segment continuity checking. Monitoring occurs on a VC segment between a router and a first-hop ATM switch. VC -- Virtual Channel. VCC -- Virtual Channel Connection. VCL -- Virtual Channel Link.') ciscoAtmExtMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 88, 1)) cAal5VccExtMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 1)) catmxVcl = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2)) class OamCCStatus(TextualConvention, Integer32): description = 'OAM Continuity check (CC) status. ready(1) -- CC is not activated on VC. waitActiveResponse(2) -- Waiting for active-response. waitActiveConfirm(3) -- Waiting for active-confirm. active(4) -- CC is activated on VC. waitDeactiveConfirm(5) -- Waiting for deactivate confirm.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5)) namedValues = NamedValues(("ready", 1), ("waitActiveResponse", 2), ("waitActiveConfirm", 3), ("active", 4), ("waitDeactiveConfirm", 5)) class OamCCVcState(TextualConvention, Integer32): description = 'OAM Continuity check (CC) VC state. verified(1) -- CC is successful. VC is up. aisrdi(2) -- CC failed. VC is down. notManaged(3) -- VC is not managed by CC.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("verified", 1), ("aisrdi", 2), ("notManaged", 3)) cAal5VccExtTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 1, 1), ) if mibBuilder.loadTexts: cAal5VccExtTable.setStatus('current') if mibBuilder.loadTexts: cAal5VccExtTable.setDescription('This table contains AAL5 VCC performance parameters beyond that provided by cAal5VccEntry.') cAal5VccExtEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 1, 1, 1), ) aal5VccEntry.registerAugmentions(("CISCO-ATM-EXT-MIB", "cAal5VccExtEntry")) cAal5VccExtEntry.setIndexNames(*aal5VccEntry.getIndexNames()) if mibBuilder.loadTexts: cAal5VccExtEntry.setStatus('current') if mibBuilder.loadTexts: cAal5VccExtEntry.setDescription('This list contains the additinal AAL5 VCC performance parameters beyond that provided by cAal5VccEntry.') cAal5VccExtCompEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 1, 1, 1, 1), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: cAal5VccExtCompEnabled.setStatus('current') if mibBuilder.loadTexts: cAal5VccExtCompEnabled.setDescription('Boolean, if compression enabled for VCC.') cAal5VccExtVoice = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 1, 1, 1, 2), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: cAal5VccExtVoice.setStatus('current') if mibBuilder.loadTexts: cAal5VccExtVoice.setDescription('Boolean, TRUE if VCC is used to carry voice.') cAal5VccExtInF5OamCells = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 1, 1, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cAal5VccExtInF5OamCells.setStatus('current') if mibBuilder.loadTexts: cAal5VccExtInF5OamCells.setDescription('Number of OAM F5 end to end loopback cells received through the VCC.') cAal5VccExtOutF5OamCells = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 1, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cAal5VccExtOutF5OamCells.setStatus('current') if mibBuilder.loadTexts: cAal5VccExtOutF5OamCells.setDescription('Number of OAM F5 end to end loopback cells sent through the VCC.') catmxVclOamTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1), ) if mibBuilder.loadTexts: catmxVclOamTable.setStatus('current') if mibBuilder.loadTexts: catmxVclOamTable.setDescription('This table contains Virtual Channel Link (VCL) Oam configuration and state information. This table augments the atmVclTable.') catmxVclOamEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1), ) atmVclEntry.registerAugmentions(("CISCO-ATM-EXT-MIB", "catmxVclOamEntry")) catmxVclOamEntry.setIndexNames(*atmVclEntry.getIndexNames()) if mibBuilder.loadTexts: catmxVclOamEntry.setStatus('current') if mibBuilder.loadTexts: catmxVclOamEntry.setDescription('This list contains Virtual Channel Link (VCL) configuration and state information beyond that provided by atmVclEntry.') catmxVclOamLoopbackFreq = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 1), Unsigned32()).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: catmxVclOamLoopbackFreq.setStatus('current') if mibBuilder.loadTexts: catmxVclOamLoopbackFreq.setDescription('Specifies OAM loopback frequency.') catmxVclOamRetryFreq = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 2), Unsigned32()).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: catmxVclOamRetryFreq.setStatus('current') if mibBuilder.loadTexts: catmxVclOamRetryFreq.setDescription('Specifies OAM retry polling frequency.') catmxVclOamUpRetryCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 3), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: catmxVclOamUpRetryCount.setStatus('current') if mibBuilder.loadTexts: catmxVclOamUpRetryCount.setDescription('Specifies OAM retry count before declaring a VC is up.') catmxVclOamDownRetryCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 4), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: catmxVclOamDownRetryCount.setStatus('current') if mibBuilder.loadTexts: catmxVclOamDownRetryCount.setDescription('Specifies OAM retry count before declaring a VC is down.') catmxVclOamEndCCActCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 5), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: catmxVclOamEndCCActCount.setStatus('current') if mibBuilder.loadTexts: catmxVclOamEndCCActCount.setDescription('Specifies OAM End-to-end Continuity check (CC) Activation retry count.') catmxVclOamEndCCDeActCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 6), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: catmxVclOamEndCCDeActCount.setStatus('current') if mibBuilder.loadTexts: catmxVclOamEndCCDeActCount.setDescription('Specifies OAM End-to-end Continuity check (CC) Deactivation retry count.') catmxVclOamEndCCRetryFreq = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 7), Unsigned32()).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: catmxVclOamEndCCRetryFreq.setStatus('current') if mibBuilder.loadTexts: catmxVclOamEndCCRetryFreq.setDescription('Specifies OAM End-to-end Continuity check (CC) Activation/Deactivation retry frequency.') catmxVclOamSegCCActCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 8), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: catmxVclOamSegCCActCount.setStatus('current') if mibBuilder.loadTexts: catmxVclOamSegCCActCount.setDescription('Specifies OAM Segment Continuity check (CC) Activation retry count.') catmxVclOamSegCCDeActCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 9), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: catmxVclOamSegCCDeActCount.setStatus('current') if mibBuilder.loadTexts: catmxVclOamSegCCDeActCount.setDescription('Specifies OAM Segment Continuity check (CC) Deactivation retry count.') catmxVclOamSegCCRetryFreq = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 10), Unsigned32()).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: catmxVclOamSegCCRetryFreq.setStatus('current') if mibBuilder.loadTexts: catmxVclOamSegCCRetryFreq.setDescription('Specifies OAM Segment Continuity check (CC) Activation/Deactivation retry frequency.') catmxVclOamManage = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 11), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: catmxVclOamManage.setStatus('current') if mibBuilder.loadTexts: catmxVclOamManage.setDescription('Specifies OAM Enable/Disable on the VC. true(1) indicates that OAM is enabled on the VC. false(2) indicates that OAM is disabled on the VC.') catmxVclOamLoopBkStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("disabled", 1), ("sent", 2), ("received", 3), ("failed", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamLoopBkStatus.setStatus('current') if mibBuilder.loadTexts: catmxVclOamLoopBkStatus.setDescription('Indicates OAM loopback status of the VC. disabled(1) -- No OAMs on this VC. sent(2) -- OAM sent, waiting for echo. received(3) -- OAM received from target. failed(4) -- Last OAM did not return.') catmxVclOamVcState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("downRetry", 1), ("verified", 2), ("notVerified", 3), ("upRetry", 4), ("aisRDI", 5), ("aisOut", 6), ("notManaged", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamVcState.setStatus('current') if mibBuilder.loadTexts: catmxVclOamVcState.setDescription('Indicates the state of VC OAM. downRetry(1) -- Loopback failed. Retry sending loopbacks with retry frequency. VC is up. verified(2) -- Loopback is successful. notVerified(3) -- Not verified by loopback, AIS/RDI conditions are cleared. upRetry(4) -- Retry successive loopbacks. VC is down. aisRDI(5) -- Received AIS/RDI. Loopback are not sent in this state. aisOut(6) -- Sending AIS. Loopback and reply are not sent in this state. notManaged(7) -- VC is not managed by OAM.') catmxVclOamEndCCStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 14), OamCCStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamEndCCStatus.setStatus('current') if mibBuilder.loadTexts: catmxVclOamEndCCStatus.setDescription('Indicates OAM End-to-end Continuity check (CC) status.') catmxVclOamSegCCStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 15), OamCCStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamSegCCStatus.setStatus('current') if mibBuilder.loadTexts: catmxVclOamSegCCStatus.setDescription('Indicates OAM Segment Continuity check (CC) status.') catmxVclOamEndCCVcState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 16), OamCCVcState()).setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamEndCCVcState.setStatus('current') if mibBuilder.loadTexts: catmxVclOamEndCCVcState.setDescription('Indicates OAM End-to-end Continuity check (CC) VC state.') catmxVclOamSegCCVcState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 17), OamCCVcState()).setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamSegCCVcState.setStatus('current') if mibBuilder.loadTexts: catmxVclOamSegCCVcState.setDescription('Indicates OAM Segment Continuity check (CC) VC state.') catmxVclOamCellsReceived = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 18), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamCellsReceived.setStatus('current') if mibBuilder.loadTexts: catmxVclOamCellsReceived.setDescription('Indicates the number of OAM cells received on this VC.') catmxVclOamCellsSent = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 19), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamCellsSent.setStatus('current') if mibBuilder.loadTexts: catmxVclOamCellsSent.setDescription('Indicates the number of OAM cells sent on this VC.') catmxVclOamCellsDropped = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 20), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamCellsDropped.setStatus('current') if mibBuilder.loadTexts: catmxVclOamCellsDropped.setDescription('Indicates the number of OAM cells dropped on this VC.') catmxVclOamInF5ais = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 21), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamInF5ais.setStatus('current') if mibBuilder.loadTexts: catmxVclOamInF5ais.setDescription('Indicates the number of received OAM F5 Alarm Indication Signal (AIS) cells from the VC.') catmxVclOamOutF5ais = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 22), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamOutF5ais.setStatus('current') if mibBuilder.loadTexts: catmxVclOamOutF5ais.setDescription('Indicates the number of transmitted OAM F5 Alarm Indication Signal (AIS) cells to the VC.') catmxVclOamInF5rdi = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 23), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamInF5rdi.setStatus('current') if mibBuilder.loadTexts: catmxVclOamInF5rdi.setDescription('Indicates the number of received OAM F5 Remote Detection Indication (RDI) cells from the VC.') catmxVclOamOutF5rdi = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 24), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamOutF5rdi.setStatus('current') if mibBuilder.loadTexts: catmxVclOamOutF5rdi.setDescription('Indicates the number of transmitted OAM F5 Remote Detection Indication (RDI) cells to the VC.') ciscoAal5ExtMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 88, 2)) ciscoAal5ExtMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 88, 2, 1)) ciscoAal5ExtMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 88, 2, 2)) ciscoAal5ExtMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 88, 2, 1, 1)).setObjects(("CISCO-ATM-EXT-MIB", "ciscoAal5ExtMIBGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAal5ExtMIBCompliance = ciscoAal5ExtMIBCompliance.setStatus('deprecated') if mibBuilder.loadTexts: ciscoAal5ExtMIBCompliance.setDescription('This compliance is deprecated in favour of ciscoAal5ExtMIBComplianceRev1. The compliance statement for entities which implement this Cisco AAL5 Extention MIB and support data compression or voice features.') ciscoAal5ExtMIBComplianceRev1 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 88, 2, 1, 2)).setObjects(("CISCO-ATM-EXT-MIB", "ciscoAal5ExtMIBGroup"), ("CISCO-ATM-EXT-MIB", "ciscoAtmExtVclOamGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAal5ExtMIBComplianceRev1 = ciscoAal5ExtMIBComplianceRev1.setStatus('current') if mibBuilder.loadTexts: ciscoAal5ExtMIBComplianceRev1.setDescription('The compliance statement for entities which implement CISCO-ATM-EXT-MIB.') ciscoAal5ExtMIBGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 88, 2, 2, 1)).setObjects(("CISCO-ATM-EXT-MIB", "cAal5VccExtCompEnabled"), ("CISCO-ATM-EXT-MIB", "cAal5VccExtVoice"), ("CISCO-ATM-EXT-MIB", "cAal5VccExtInF5OamCells"), ("CISCO-ATM-EXT-MIB", "cAal5VccExtOutF5OamCells")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAal5ExtMIBGroup = ciscoAal5ExtMIBGroup.setStatus('current') if mibBuilder.loadTexts: ciscoAal5ExtMIBGroup.setDescription('A collection of objects providing AAL5 related parameters.') ciscoAtmExtVclOamGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 88, 2, 2, 2)).setObjects(("CISCO-ATM-EXT-MIB", "catmxVclOamLoopbackFreq"), ("CISCO-ATM-EXT-MIB", "catmxVclOamRetryFreq"), ("CISCO-ATM-EXT-MIB", "catmxVclOamUpRetryCount"), ("CISCO-ATM-EXT-MIB", "catmxVclOamDownRetryCount"), ("CISCO-ATM-EXT-MIB", "catmxVclOamEndCCActCount"), ("CISCO-ATM-EXT-MIB", "catmxVclOamEndCCDeActCount"), ("CISCO-ATM-EXT-MIB", "catmxVclOamEndCCRetryFreq"), ("CISCO-ATM-EXT-MIB", "catmxVclOamSegCCActCount"), ("CISCO-ATM-EXT-MIB", "catmxVclOamSegCCDeActCount"), ("CISCO-ATM-EXT-MIB", "catmxVclOamSegCCRetryFreq"), ("CISCO-ATM-EXT-MIB", "catmxVclOamManage"), ("CISCO-ATM-EXT-MIB", "catmxVclOamLoopBkStatus"), ("CISCO-ATM-EXT-MIB", "catmxVclOamVcState"), ("CISCO-ATM-EXT-MIB", "catmxVclOamEndCCStatus"), ("CISCO-ATM-EXT-MIB", "catmxVclOamSegCCStatus"), ("CISCO-ATM-EXT-MIB", "catmxVclOamEndCCVcState"), ("CISCO-ATM-EXT-MIB", "catmxVclOamSegCCVcState"), ("CISCO-ATM-EXT-MIB", "catmxVclOamCellsReceived"), ("CISCO-ATM-EXT-MIB", "catmxVclOamCellsSent"), ("CISCO-ATM-EXT-MIB", "catmxVclOamCellsDropped"), ("CISCO-ATM-EXT-MIB", "catmxVclOamInF5ais"), ("CISCO-ATM-EXT-MIB", "catmxVclOamOutF5ais"), ("CISCO-ATM-EXT-MIB", "catmxVclOamInF5rdi"), ("CISCO-ATM-EXT-MIB", "catmxVclOamOutF5rdi")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAtmExtVclOamGroup = ciscoAtmExtVclOamGroup.setStatus('current') if mibBuilder.loadTexts: ciscoAtmExtVclOamGroup.setDescription('A collection of objects providing Virtual Channel Link (VCL) OAM configuration and state information.') mibBuilder.exportSymbols("CISCO-ATM-EXT-MIB", catmxVclOamSegCCDeActCount=catmxVclOamSegCCDeActCount, catmxVclOamUpRetryCount=catmxVclOamUpRetryCount, cAal5VccExtVoice=cAal5VccExtVoice, catmxVclOamCellsDropped=catmxVclOamCellsDropped, ciscoAal5ExtMIBGroup=ciscoAal5ExtMIBGroup, catmxVclOamEndCCStatus=catmxVclOamEndCCStatus, catmxVclOamEndCCVcState=catmxVclOamEndCCVcState, catmxVclOamSegCCRetryFreq=catmxVclOamSegCCRetryFreq, ciscoAtmExtMIB=ciscoAtmExtMIB, catmxVclOamSegCCActCount=catmxVclOamSegCCActCount, catmxVclOamLoopBkStatus=catmxVclOamLoopBkStatus, catmxVclOamSegCCStatus=catmxVclOamSegCCStatus, cAal5VccExtTable=cAal5VccExtTable, ciscoAal5ExtMIBCompliance=ciscoAal5ExtMIBCompliance, PYSNMP_MODULE_ID=ciscoAtmExtMIB, cAal5VccExtEntry=cAal5VccExtEntry, catmxVclOamVcState=catmxVclOamVcState, ciscoAtmExtMIBObjects=ciscoAtmExtMIBObjects, catmxVclOamOutF5rdi=catmxVclOamOutF5rdi, ciscoAal5ExtMIBConformance=ciscoAal5ExtMIBConformance, OamCCStatus=OamCCStatus, catmxVclOamTable=catmxVclOamTable, catmxVclOamDownRetryCount=catmxVclOamDownRetryCount, catmxVclOamManage=catmxVclOamManage, catmxVclOamEndCCRetryFreq=catmxVclOamEndCCRetryFreq, ciscoAal5ExtMIBGroups=ciscoAal5ExtMIBGroups, catmxVclOamInF5ais=catmxVclOamInF5ais, cAal5VccExtCompEnabled=cAal5VccExtCompEnabled, OamCCVcState=OamCCVcState, catmxVclOamEndCCActCount=catmxVclOamEndCCActCount, catmxVclOamSegCCVcState=catmxVclOamSegCCVcState, catmxVclOamEntry=catmxVclOamEntry, catmxVclOamEndCCDeActCount=catmxVclOamEndCCDeActCount, catmxVcl=catmxVcl, cAal5VccExtInF5OamCells=cAal5VccExtInF5OamCells, cAal5VccExtOutF5OamCells=cAal5VccExtOutF5OamCells, catmxVclOamOutF5ais=catmxVclOamOutF5ais, ciscoAal5ExtMIBCompliances=ciscoAal5ExtMIBCompliances, catmxVclOamRetryFreq=catmxVclOamRetryFreq, catmxVclOamInF5rdi=catmxVclOamInF5rdi, catmxVclOamCellsReceived=catmxVclOamCellsReceived, catmxVclOamLoopbackFreq=catmxVclOamLoopbackFreq, cAal5VccExtMIBObjects=cAal5VccExtMIBObjects, catmxVclOamCellsSent=catmxVclOamCellsSent, ciscoAtmExtVclOamGroup=ciscoAtmExtVclOamGroup, ciscoAal5ExtMIBComplianceRev1=ciscoAal5ExtMIBComplianceRev1)
134.179012
2,083
0.776096
2,511
21,737
6.717642
0.148148
0.051933
0.090882
0.010197
0.438048
0.319836
0.257233
0.218105
0.15728
0.125682
0
0.051214
0.092745
21,737
161
2,084
135.012422
0.804117
0.015089
0
0.04698
0
0.060403
0.341495
0.030701
0
0
0
0
0
1
0
false
0
0.053691
0
0.120805
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
8bdfada5a195abb5fa1a5addc5ae23054f34a07f
62,005
py
Python
pysnmp-with-texts/ASSETMANAGEMENT-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/ASSETMANAGEMENT-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/ASSETMANAGEMENT-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 ASSETMANAGEMENT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ASSETMANAGEMENT-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:29:30 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection", "SingleValueConstraint") InetPortNumber, InetAddress, InetAddressType = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetPortNumber", "InetAddress", "InetAddressType") ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup") sysName, sysLocation, sysContact = mibBuilder.importSymbols("SNMPv2-MIB", "sysName", "sysLocation", "sysContact") NotificationType, Gauge32, ModuleIdentity, MibIdentifier, Integer32, Counter64, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn, iso, Counter32, Unsigned32, enterprises, ObjectIdentity, TimeTicks, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "Gauge32", "ModuleIdentity", "MibIdentifier", "Integer32", "Counter64", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "Counter32", "Unsigned32", "enterprises", "ObjectIdentity", "TimeTicks", "Bits") DisplayString, TruthValue, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TruthValue", "TextualConvention") raritan = ModuleIdentity((1, 3, 6, 1, 4, 1, 13742)) raritan.setRevisions(('2015-01-05 00:00', '2014-09-25 00:00', '2014-04-04 00:00', '2012-03-29 00:00', '2012-03-26 00:00', '2012-02-14 00:00', '2012-02-10 00:00', '2012-02-08 00:00', '2012-02-07 00:00', '2012-02-03 00:00', '2012-01-17 00:00', '2012-01-04 00:00', '2011-12-08 00:00', '2011-11-11 00:00', '2011-11-09 00:00', '2011-10-25 00:00', '2011-10-05 00:00', '2011-09-05 00:00', '2011-09-01 00:00', '2011-08-23 00:00', '2011-05-18 00:00', '2011-05-04 00:00', '2011-04-15 00:00', '2011-02-18 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: raritan.setRevisionsDescriptions(('The following changes were made. 1) Added agentInetPortNumber under trapInformation 2) Added agentInetPortNumber as a varbind to all traps ', 'The following changes were made. 1) added assetStripCascadePosition to the assetManagement table 2) added rackUnitRelativePosition to the assetManagement table. 3) added assetStripNumberOfRackUnits to the assetManagement table. 4) added assetStripType, assetStripCascadePosition, rackUnitRelativePosition, assetStripNumberOfRackUnits to the following traps. assetTagConnected assetTagDisconnected bladeExtensionConnected bladeExtensionDisconnected ', 'The following changes were made. 1) added bladeTagID to assetTagConnected and assetTagDisconnected traps 2) added rackUnitCount to the following traps. assetTagConnected assetTagDisconnected bladeExtensionConnected bladeExtensionDisconnected assetStripStateChange ', 'The following changes were made. 1) add logParentBladeID to AssetManagementLogEntryStruct ', 'The following changes were made. 1) clarify documentation of LED operation mode: setting ledMode, ledColor or ledColorStr automatically switches the ledOperationMode to manual. ', 'The following changes were made. 1) add logAssetStripState and extend logEventType with assetStripStateChange ', 'The following changes were made. 1) clarify documentation regarding logSlotNumber: it is 0 a) indicating a tag on the main strip b) in case no strip is connected or the value is not valid for a certain log entry ', 'The following changes were made. 1) added bladeExtensionSize to bladeExtensionConnected and bladeExtensionDisconnected traps ', 'The following changes were made. 1) added logSize, oldestLogID, newestLogID and logEventCount 2) added assetManagementLogTable and assetManagementLogEntry ', ' 1) Added assetStripDefaultLEDColorConnected, assetStripDefaultLEDColorConnectedStr, assetStripDefaultLEDColorDisconnected, assetStripDefaultLEDColorDisconnectedStr to AssetStripConfigurationEntryStruct 2) Deprecated defaultLEDColorConnected, defaultLEDColorConnectedStr, defaultLEDColorDisconnected, defaultLEDColorDisconnectedStr ', '1) add rackUnitPosition to the following traps: assetTagConnected, assetTagDisconnected, bladeExtensionConnected, bladeExtensionDisconnected, rackUnitConfigurationChanged 2) rackUnitNumber in the traps now always corresponds with rackUnitID, clarify documentation accordingly ', ' 1) extended AssetStripConfigurationEntryStruct by assetStripType and numberOfComponentAssetStrips 2) added compositeAssetStripCompositionChanged trap ', ' 1) removed bladeSlotNumberingMode from AssetManagementEntryStruct 2) removed BladeSlotNumberingModeEnumeration 3) removed bladeSlotNumberingMode from the rackUnitConfigurationChanged trap ', 'The following changes were made. 1) allow 0 in rackUnitPosition in case there is no strip connected 2) added none (nothing connected) and unknown (strip disconnected) to rackUnitType ', 'The following changes were made. 1) allow a 0 in bladeExtensionSize in case there is no blade extension connected or the asset strip is disconnected. ', 'The following changes were made. 1) added sysContact,sysName, sysLocation to all traps 2) added currentMainTagCount, currentBladeTagCount 3) added maxMainTagCount, maxBladeTagCount 4) added bladeExtensionOverflow 5) added traps bladeExtensionOverflowOccured, bladeExtensionOverflowCleared ', 'The following changes were made. 1) Added assetStripName to all traps ', '1) added rackUnitName ', ' 1) added bladeExtensionConnected, bladeExtensionDisconnected traps 2) in AssetManagementEntryStruct renamed rackUnitSize to bladeExtensionSize 3) added bladeSlotPosition to BladeExtensionEntryStruct 4) added bladeSlotNumberingMode to AssetManagementEntryStruct 5) added BladeSlotNumberingModeEnumeration 6) added bladeSlotNumberingMode to the rackUnitConfigurationChanged trap ', 'Support blade server extension segments: 1) added rackUnitType, rackUnitSize 2) added bladeExtensionTable and bladeExtensionEntry 3) added slotNumber to assetTagConnected and assetTagDisconnected traps ', 'The following changes were made. 1) Modified blinking speeds in AssetManagementLEDModeEnumeration to fastBlink, slowBlink ', 'The following changes were made. 1) Added ledOperationMode to the Tag Connected and Tag Disconnected Traps. 2) Modified the DESCRIPTION of rackUnitNumberingOffset. 3) Modified blinking speeds in AssetManagementLEDModeEnumeration to blinkFastest, blink2ndFastest ', 'The following changes were made. 1) Added DeviceConfigurationParameterEnumeration, RackUnitNumberingModeEnumeration, AssetStripOrientationEnumeration 2) Added deviceConfigurationChanged Trap 3) Added deviceUserName, deviceChangedParameter, changedParameterNewValue to trapInformationGroup 4) Added blinking2(4) to AssetManagementLEDModeEnumeration 5) Add led mode and led color information to the Tag Connected and Tag Disconnected Traps. 6) Added rackUnitNumberingMode, rackUnitNumberingOffset, assetStripOrientation to AssetStripConfigurationEntryStruct 7) Added rackUnitPosition to AssetManagementEntryStruct 8) Added rackUnitConfigurationChanged Trap ', 'The first version of the MIB.',)) if mibBuilder.loadTexts: raritan.setLastUpdated('201501050000Z') if mibBuilder.loadTexts: raritan.setOrganization('Raritan') if mibBuilder.loadTexts: raritan.setContactInfo(' Author: Raritan Americas, Inc. postal: Raritan Americas, Inc. 400 Cottontail Lane Somerset, NJ 08873 email: [email protected] phone: +1 732 764 8886 ') if mibBuilder.loadTexts: raritan.setDescription('This MIB describes the SNMP functions of the asset management capable products from Raritan Computer.') assetManager = MibIdentifier((1, 3, 6, 1, 4, 1, 13742, 7)) traps = MibIdentifier((1, 3, 6, 1, 4, 1, 13742, 7, 0)) trapInformation = MibIdentifier((1, 3, 6, 1, 4, 1, 13742, 7, 0, 0)) configuration = MibIdentifier((1, 3, 6, 1, 4, 1, 13742, 7, 1)) conformance = MibIdentifier((1, 3, 6, 1, 4, 1, 13742, 7, 2)) log = MibIdentifier((1, 3, 6, 1, 4, 1, 13742, 7, 3)) assetStrip = MibIdentifier((1, 3, 6, 1, 4, 1, 13742, 7, 1, 6)) assetManagement = MibIdentifier((1, 3, 6, 1, 4, 1, 13742, 7, 1, 7)) compliances = MibIdentifier((1, 3, 6, 1, 4, 1, 13742, 7, 2, 1)) groups = MibIdentifier((1, 3, 6, 1, 4, 1, 13742, 7, 2, 2)) complianceRev1 = ModuleCompliance((1, 3, 6, 1, 4, 1, 13742, 7, 2, 1, 1)).setObjects(("ASSETMANAGEMENT-MIB", "configGroup"), ("ASSETMANAGEMENT-MIB", "assetManagementGroup"), ("ASSETMANAGEMENT-MIB", "trapInformationGroup"), ("ASSETMANAGEMENT-MIB", "trapsGroup"), ("ASSETMANAGEMENT-MIB", "logGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): complianceRev1 = complianceRev1.setStatus('deprecated') if mibBuilder.loadTexts: complianceRev1.setDescription('The requirements for conformance to the ASSETMANAGEMENT-MIB. This is deprecated in favor of complianceRev2') complianceRev2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 13742, 7, 2, 1, 2)).setObjects(("ASSETMANAGEMENT-MIB", "configGroup2"), ("ASSETMANAGEMENT-MIB", "assetManagementGroup"), ("ASSETMANAGEMENT-MIB", "trapInformationGroup"), ("ASSETMANAGEMENT-MIB", "trapsGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): complianceRev2 = complianceRev2.setStatus('current') if mibBuilder.loadTexts: complianceRev2.setDescription('The requirements for conformance to the ASSETMANAGEMENT-MIB.') configGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 13742, 7, 2, 2, 1)).setObjects(("ASSETMANAGEMENT-MIB", "defaultLEDColorConnected"), ("ASSETMANAGEMENT-MIB", "defaultLEDColorConnectedStr"), ("ASSETMANAGEMENT-MIB", "defaultLEDColorDisconnected"), ("ASSETMANAGEMENT-MIB", "defaultLEDColorDisconnectedStr")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): configGroup = configGroup.setStatus('deprecated') if mibBuilder.loadTexts: configGroup.setDescription('A collection of objects representing configuration data. ') configGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 13742, 7, 2, 2, 5)).setObjects(("ASSETMANAGEMENT-MIB", "assetStripCount"), ("ASSETMANAGEMENT-MIB", "assetStripState"), ("ASSETMANAGEMENT-MIB", "assetStripName"), ("ASSETMANAGEMENT-MIB", "rackUnitCount"), ("ASSETMANAGEMENT-MIB", "rackUnitNumberingMode"), ("ASSETMANAGEMENT-MIB", "rackUnitNumberingOffset"), ("ASSETMANAGEMENT-MIB", "assetStripOrientation"), ("ASSETMANAGEMENT-MIB", "currentMainTagCount"), ("ASSETMANAGEMENT-MIB", "currentBladeTagCount"), ("ASSETMANAGEMENT-MIB", "maxMainTagCount"), ("ASSETMANAGEMENT-MIB", "maxBladeTagCount"), ("ASSETMANAGEMENT-MIB", "bladeExtensionOverflow"), ("ASSETMANAGEMENT-MIB", "assetStripType"), ("ASSETMANAGEMENT-MIB", "numberOfComponentAssetStrips"), ("ASSETMANAGEMENT-MIB", "assetStripDefaultLEDColorConnected"), ("ASSETMANAGEMENT-MIB", "assetStripDefaultLEDColorConnectedStr"), ("ASSETMANAGEMENT-MIB", "assetStripDefaultLEDColorDisconnected"), ("ASSETMANAGEMENT-MIB", "assetStripDefaultLEDColorDisconnectedStr")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): configGroup2 = configGroup2.setStatus('current') if mibBuilder.loadTexts: configGroup2.setDescription('A collection of objects representing configuration data.') assetManagementGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 13742, 7, 2, 2, 2)).setObjects(("ASSETMANAGEMENT-MIB", "ledOperationMode"), ("ASSETMANAGEMENT-MIB", "ledMode"), ("ASSETMANAGEMENT-MIB", "ledColor"), ("ASSETMANAGEMENT-MIB", "ledColorStr"), ("ASSETMANAGEMENT-MIB", "tagID"), ("ASSETMANAGEMENT-MIB", "bladeTagID"), ("ASSETMANAGEMENT-MIB", "tagFamily"), ("ASSETMANAGEMENT-MIB", "rackUnitPosition"), ("ASSETMANAGEMENT-MIB", "rackUnitType"), ("ASSETMANAGEMENT-MIB", "bladeExtensionSize"), ("ASSETMANAGEMENT-MIB", "bladeSlotPosition"), ("ASSETMANAGEMENT-MIB", "rackUnitName"), ("ASSETMANAGEMENT-MIB", "assetStripCascadePosition"), ("ASSETMANAGEMENT-MIB", "rackUnitRelativePosition"), ("ASSETMANAGEMENT-MIB", "assetStripNumberOfRackUnits")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): assetManagementGroup = assetManagementGroup.setStatus('current') if mibBuilder.loadTexts: assetManagementGroup.setDescription('A collection of objects providing the ability to control the asset management strip.') trapsGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 13742, 7, 2, 2, 3)).setObjects(("ASSETMANAGEMENT-MIB", "assetStripStateChange"), ("ASSETMANAGEMENT-MIB", "assetTagConnected"), ("ASSETMANAGEMENT-MIB", "assetTagDisconnected"), ("ASSETMANAGEMENT-MIB", "assetStripFirmwareUpdate"), ("ASSETMANAGEMENT-MIB", "deviceConfigurationChanged"), ("ASSETMANAGEMENT-MIB", "rackUnitConfigurationChanged"), ("ASSETMANAGEMENT-MIB", "bladeExtensionConnected"), ("ASSETMANAGEMENT-MIB", "bladeExtensionDisconnected"), ("ASSETMANAGEMENT-MIB", "bladeExtensionOverflowOccured"), ("ASSETMANAGEMENT-MIB", "bladeExtensionOverflowCleared"), ("ASSETMANAGEMENT-MIB", "compositeAssetStripCompositionChanged")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): trapsGroup = trapsGroup.setStatus('current') if mibBuilder.loadTexts: trapsGroup.setDescription('A collection of traps.') trapInformationGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 13742, 7, 2, 2, 4)).setObjects(("ASSETMANAGEMENT-MIB", "deviceName"), ("ASSETMANAGEMENT-MIB", "deviceInetAddressType"), ("ASSETMANAGEMENT-MIB", "deviceInetIPAddress"), ("ASSETMANAGEMENT-MIB", "assetStripNumber"), ("ASSETMANAGEMENT-MIB", "rackUnitNumber"), ("ASSETMANAGEMENT-MIB", "slotNumber"), ("ASSETMANAGEMENT-MIB", "assetStripFirmwareUpdateState"), ("ASSETMANAGEMENT-MIB", "deviceUserName"), ("ASSETMANAGEMENT-MIB", "deviceChangedParameter"), ("ASSETMANAGEMENT-MIB", "changedParameterNewValue"), ("ASSETMANAGEMENT-MIB", "oldNumberOfComponentAssetStrips"), ("ASSETMANAGEMENT-MIB", "agentInetPortNumber")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): trapInformationGroup = trapInformationGroup.setStatus('current') if mibBuilder.loadTexts: trapInformationGroup.setDescription('A collection of objects providing information in the traps.') logGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 13742, 7, 2, 2, 6)).setObjects(("ASSETMANAGEMENT-MIB", "logSize"), ("ASSETMANAGEMENT-MIB", "oldestLogID"), ("ASSETMANAGEMENT-MIB", "newestLogID"), ("ASSETMANAGEMENT-MIB", "logEventCount"), ("ASSETMANAGEMENT-MIB", "logTimeStamp"), ("ASSETMANAGEMENT-MIB", "logEventType"), ("ASSETMANAGEMENT-MIB", "logAssetStripNumber"), ("ASSETMANAGEMENT-MIB", "logRackUnitNumber"), ("ASSETMANAGEMENT-MIB", "logRackUnitPosition"), ("ASSETMANAGEMENT-MIB", "logSlotNumber"), ("ASSETMANAGEMENT-MIB", "logTagID"), ("ASSETMANAGEMENT-MIB", "logAssetStripState"), ("ASSETMANAGEMENT-MIB", "logParentBladeID")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): logGroup = logGroup.setStatus('current') if mibBuilder.loadTexts: logGroup.setDescription('A collection of objects representing log data.') class AssetManagementLEDModeEnumeration(TextualConvention, Integer32): description = 'The mode of an LED for the asset manager.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4)) namedValues = NamedValues(("on", 1), ("off", 2), ("fastBlink", 3), ("slowBlink", 4)) class AssetManagementLEDOperationModeEnumeration(TextualConvention, Integer32): description = 'The operation mode of an LED for the asset manager.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("manual", 1), ("automatic", 2)) class AssetStripStateEnumeration(TextualConvention, Integer32): description = 'The state of an asset strip.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4)) namedValues = NamedValues(("disconnected", 1), ("firmwareUpdate", 2), ("unsupported", 3), ("available", 4)) class AssetStripFirmwareUpdateStateEnumeration(TextualConvention, Integer32): description = 'The state of an asset strip firmware update.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("started", 1), ("successful", 2), ("failed", 3)) class RackUnitTypeEnumeration(TextualConvention, Integer32): description = 'Type of an asset tag.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 30, 31)) namedValues = NamedValues(("single", 1), ("blade", 2), ("none", 30), ("unknown", 31)) class RGBCOLOR(TextualConvention, OctetString): description = 'An RGB color value.' status = 'current' displayHint = '1d;' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(3, 3) fixedLength = 3 class RackUnitNumberingModeEnumeration(TextualConvention, Integer32): description = 'The configurable parameters.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1)) namedValues = NamedValues(("topDown", 0), ("bottomUp", 1)) class AssetStripOrientationEnumeration(TextualConvention, Integer32): description = 'The configurable parameters.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1)) namedValues = NamedValues(("topConnector", 0), ("bottomConnector", 1)) class DeviceConfigurationParameterEnumeration(TextualConvention, Integer32): description = 'The configurable parameters.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6)) namedValues = NamedValues(("defaultLEDColorConnected", 0), ("defaultLEDColorDisconnected", 1), ("rackUnitCount", 2), ("assetStripName", 3), ("assetStripRackUnitNumberingMode", 4), ("assetStripRackUnitNumberingOffset", 5), ("assetStripOrientation", 6)) class AssetStripTypeEnumeration(TextualConvention, Integer32): description = 'The asset strip types.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1)) namedValues = NamedValues(("simple", 0), ("composite", 1)) class LogEventTypeEnumeration(TextualConvention, Integer32): description = 'The type of a log event.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3)) namedValues = NamedValues(("empty", 0), ("assetTagConnected", 1), ("assetTagDisconnected", 2), ("assetStripStateChange", 3)) assetStripCount = MibScalar((1, 3, 6, 1, 4, 1, 13742, 7, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: assetStripCount.setStatus('current') if mibBuilder.loadTexts: assetStripCount.setDescription('The number of asset management strip units supported.') defaultLEDColorConnected = MibScalar((1, 3, 6, 1, 4, 1, 13742, 7, 1, 2), RGBCOLOR()).setMaxAccess("readwrite") if mibBuilder.loadTexts: defaultLEDColorConnected.setStatus('deprecated') if mibBuilder.loadTexts: defaultLEDColorConnected.setDescription('Default color of all LEDs (RGB) when a tag is connected during automatic operation; in binary format. This is deprecated in favor of assetStripDefaultLEDColorConnected For SET operations, the value will be applied to all asset strips For GET operations, the value returned will be the value corresponding to asset strip 1') defaultLEDColorConnectedStr = MibScalar((1, 3, 6, 1, 4, 1, 13742, 7, 1, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: defaultLEDColorConnectedStr.setStatus('deprecated') if mibBuilder.loadTexts: defaultLEDColorConnectedStr.setDescription('Default color of all LEDs (RGB) when a tag is connected during automatic operation; string with 3 hex octets This is deprecated in favor of assetStripDefaultLEDColorConnectedStr For SET operations, the value will be applied to all asset strips For GET operations, the value returned will be the value corresponding to asset strip 1') defaultLEDColorDisconnected = MibScalar((1, 3, 6, 1, 4, 1, 13742, 7, 1, 4), RGBCOLOR()).setMaxAccess("readwrite") if mibBuilder.loadTexts: defaultLEDColorDisconnected.setStatus('deprecated') if mibBuilder.loadTexts: defaultLEDColorDisconnected.setDescription('Default color of all LEDs (RGB) when no tag is connected during automatic operation; in binary format. This is deprecated in favor of assetStripDefaultLEDColorDisConnected For SET operations, the value will be applied to all asset strips For GET operations, the value returned will be the value corresponding to asset strip 1') defaultLEDColorDisconnectedStr = MibScalar((1, 3, 6, 1, 4, 1, 13742, 7, 1, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: defaultLEDColorDisconnectedStr.setStatus('deprecated') if mibBuilder.loadTexts: defaultLEDColorDisconnectedStr.setDescription('Default color of all LEDs (RGB) when no tag is connected during automatic operation; string with 3 hex octets This is deprecated in favor of assetStripDefaultLEDColorDisconnectedStr For SET operations, the value will be applied to all asset strips For GET operations, the value returned will be the value corresponding to asset strip 1') assetStripConfigurationTable = MibTable((1, 3, 6, 1, 4, 1, 13742, 7, 1, 6, 1), ) if mibBuilder.loadTexts: assetStripConfigurationTable.setStatus('current') if mibBuilder.loadTexts: assetStripConfigurationTable.setDescription('A list of configuration entries. The number of entries is given by the value of assetStripCount.') assetStripConfigurationEntry = MibTableRow((1, 3, 6, 1, 4, 1, 13742, 7, 1, 6, 1, 1), ).setIndexNames((0, "ASSETMANAGEMENT-MIB", "assetStripID")) if mibBuilder.loadTexts: assetStripConfigurationEntry.setStatus('current') if mibBuilder.loadTexts: assetStripConfigurationEntry.setDescription('An entry containing configuration objects for a particular asset management strip unit.') assetStripID = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 6, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 256))) if mibBuilder.loadTexts: assetStripID.setStatus('current') if mibBuilder.loadTexts: assetStripID.setDescription('A unique value for each asset strip. Its value ranges between 1 and the value of assetStripCount.') rackUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 6, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(8, 64))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rackUnitCount.setStatus('current') if mibBuilder.loadTexts: rackUnitCount.setDescription('The number of rack-units for the asset management.') assetStripState = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 6, 1, 1, 3), AssetStripStateEnumeration()).setMaxAccess("readonly") if mibBuilder.loadTexts: assetStripState.setStatus('current') if mibBuilder.loadTexts: assetStripState.setDescription('Asset management strip state.') assetStripName = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 6, 1, 1, 4), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: assetStripName.setStatus('current') if mibBuilder.loadTexts: assetStripName.setDescription('Asset management strip name.') rackUnitNumberingMode = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 6, 1, 1, 5), RackUnitNumberingModeEnumeration()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rackUnitNumberingMode.setStatus('current') if mibBuilder.loadTexts: rackUnitNumberingMode.setDescription('The rack unit nmbering mode for this asset strip.') rackUnitNumberingOffset = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 6, 1, 1, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rackUnitNumberingOffset.setStatus('current') if mibBuilder.loadTexts: rackUnitNumberingOffset.setDescription('The offset (starting value) for rack Unit Numbering; This takes care of the case in which the asset strip is monitoring not all the assets but a subset of it, starting from racknumberingOffset. For example, the asset strip may be monitoring assets from 10 through 26; default value is 1 ') assetStripOrientation = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 6, 1, 1, 7), AssetStripOrientationEnumeration()).setMaxAccess("readwrite") if mibBuilder.loadTexts: assetStripOrientation.setStatus('current') if mibBuilder.loadTexts: assetStripOrientation.setDescription('Is the asset strip oriented such that the connector is at the top or the bottom? If the asset strip has a tilt sensor, then this varaible is read-only and an to set(write) it will result in an error. If the asset strip does not have a tilt sensor, then this variable is read-write ') currentMainTagCount = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 6, 1, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: currentMainTagCount.setStatus('current') if mibBuilder.loadTexts: currentMainTagCount.setDescription('Number of tags currently connected to the main strip.') currentBladeTagCount = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 6, 1, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: currentBladeTagCount.setStatus('current') if mibBuilder.loadTexts: currentBladeTagCount.setDescription('Number of tags currently connected to blade extensions. This may be larger than the maxBladeTagCount. In this case an overflow occured and all tags over maxBladeTagCount are not recognized.') maxMainTagCount = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 6, 1, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: maxMainTagCount.setStatus('current') if mibBuilder.loadTexts: maxMainTagCount.setDescription('Maximum number of tags on the main asset strip.') maxBladeTagCount = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 6, 1, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: maxBladeTagCount.setStatus('current') if mibBuilder.loadTexts: maxBladeTagCount.setDescription('Maximum number of blade tags supported.') bladeExtensionOverflow = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 6, 1, 1, 12), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: bladeExtensionOverflow.setStatus('current') if mibBuilder.loadTexts: bladeExtensionOverflow.setDescription("Set if the maximum number of supported tags on blade extensions is reached. When this flag is set, new tags on blade extensions won't be discovered anymore until other tags on blade extensions are removed.") assetStripType = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 6, 1, 1, 13), AssetStripTypeEnumeration()).setMaxAccess("readonly") if mibBuilder.loadTexts: assetStripType.setStatus('current') if mibBuilder.loadTexts: assetStripType.setDescription('The asset strip type.') numberOfComponentAssetStrips = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 6, 1, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: numberOfComponentAssetStrips.setStatus('current') if mibBuilder.loadTexts: numberOfComponentAssetStrips.setDescription('The number of components building a composite asset strip.') assetStripDefaultLEDColorConnected = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 6, 1, 1, 15), RGBCOLOR()).setMaxAccess("readwrite") if mibBuilder.loadTexts: assetStripDefaultLEDColorConnected.setStatus('current') if mibBuilder.loadTexts: assetStripDefaultLEDColorConnected.setDescription('Default color of all LEDs (RGB) when a tag is connected during automatic operation; in binary format.') assetStripDefaultLEDColorConnectedStr = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 6, 1, 1, 16), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: assetStripDefaultLEDColorConnectedStr.setStatus('current') if mibBuilder.loadTexts: assetStripDefaultLEDColorConnectedStr.setDescription('Default color of all LEDs (RGB) when a tag is connected during automatic operation; string with 3 hex octets') assetStripDefaultLEDColorDisconnected = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 6, 1, 1, 17), RGBCOLOR()).setMaxAccess("readwrite") if mibBuilder.loadTexts: assetStripDefaultLEDColorDisconnected.setStatus('current') if mibBuilder.loadTexts: assetStripDefaultLEDColorDisconnected.setDescription('Default color of all LEDs (RGB) when no tag is connected during automatic operation; in binary format.') assetStripDefaultLEDColorDisconnectedStr = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 6, 1, 1, 18), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: assetStripDefaultLEDColorDisconnectedStr.setStatus('current') if mibBuilder.loadTexts: assetStripDefaultLEDColorDisconnectedStr.setDescription('Default color of all LEDs (RGB) when no tag is connected during automatic operation; string with 3 hex octets') assetManagementTable = MibTable((1, 3, 6, 1, 4, 1, 13742, 7, 1, 7, 1), ) if mibBuilder.loadTexts: assetManagementTable.setStatus('current') if mibBuilder.loadTexts: assetManagementTable.setDescription('A list of asset management extries containing tag information and LED state. The number of entries is given by the value of rackUnitCount.') assetManagementEntry = MibTableRow((1, 3, 6, 1, 4, 1, 13742, 7, 1, 7, 1, 1), ).setIndexNames((0, "ASSETMANAGEMENT-MIB", "assetStripID"), (0, "ASSETMANAGEMENT-MIB", "rackUnitID")) if mibBuilder.loadTexts: assetManagementEntry.setStatus('current') if mibBuilder.loadTexts: assetManagementEntry.setDescription('An entry containing tag information and LED state for a rack unit.') rackUnitID = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 7, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 256))) if mibBuilder.loadTexts: rackUnitID.setStatus('current') if mibBuilder.loadTexts: rackUnitID.setDescription('A unique value for each rack unit. Its value ranges between 1 and the value of rackUnitCount.') ledOperationMode = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 7, 1, 1, 2), AssetManagementLEDOperationModeEnumeration()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ledOperationMode.setStatus('current') if mibBuilder.loadTexts: ledOperationMode.setDescription('Operation mode of the LED (manual or automatic, based on tag connection).') ledMode = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 7, 1, 1, 3), AssetManagementLEDModeEnumeration()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ledMode.setStatus('current') if mibBuilder.loadTexts: ledMode.setDescription('Mode of the LED (on, off, fastBlink,slowBlink). Setting this value automatically switches the ledOperationMode to manual.') ledColor = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 7, 1, 1, 4), RGBCOLOR()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ledColor.setStatus('current') if mibBuilder.loadTexts: ledColor.setDescription('Color of the LED (RGB) in binary format. Setting this value automatically switches the ledOperationMode to manual.') ledColorStr = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 7, 1, 1, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ledColorStr.setStatus('current') if mibBuilder.loadTexts: ledColorStr.setDescription('Color of the LED (RGB) in string format. It contains 3 hex octets for the RGB colors. Setting this value automatically switches the ledOperationMode to manual.') tagID = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 7, 1, 1, 6), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: tagID.setStatus('current') if mibBuilder.loadTexts: tagID.setDescription('Asset management tag attached to the rack unit. Empty in case there is no tag attached.') tagFamily = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 7, 1, 1, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: tagFamily.setStatus('current') if mibBuilder.loadTexts: tagFamily.setDescription('Family of the asset management tag attached to the rack unit. Empty in case there is no tag attached.') rackUnitPosition = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 7, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 256))).setMaxAccess("readonly") if mibBuilder.loadTexts: rackUnitPosition.setStatus('current') if mibBuilder.loadTexts: rackUnitPosition.setDescription('A number associated with each rack unit. Its value depends on the rack unit numbering mode. It ranges between 1 and the value of rackUnitCount. If the asset strip is disconnected, then the value is 0.') rackUnitType = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 7, 1, 1, 9), RackUnitTypeEnumeration()).setMaxAccess("readonly") if mibBuilder.loadTexts: rackUnitType.setStatus('current') if mibBuilder.loadTexts: rackUnitType.setDescription('Type of the connected tag (single server or blade extension). If the asset strip is disconnected, then the value is unknown. If the asset tag is disconnected, then the value is none.') bladeExtensionSize = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 7, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: bladeExtensionSize.setStatus('current') if mibBuilder.loadTexts: bladeExtensionSize.setDescription('In case a blade extension is connected this returns the number of slots on the extension. If the asset strip is disconnected or no blade is connected, then the value is 0.') rackUnitName = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 7, 1, 1, 12), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rackUnitName.setStatus('current') if mibBuilder.loadTexts: rackUnitName.setDescription('Name for a specific rackunit, may be feeely chosen.') assetStripCascadePosition = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 7, 1, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 99))).setMaxAccess("readonly") if mibBuilder.loadTexts: assetStripCascadePosition.setStatus('current') if mibBuilder.loadTexts: assetStripCascadePosition.setDescription('This is the position of the asset Strip in a cascaded chain. Numbered in ascending order starting with the asset strip connected to the device (EMX/PX). For non-cascaded asset strips, value = 1') rackUnitRelativePosition = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 7, 1, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 99))).setMaxAccess("readonly") if mibBuilder.loadTexts: rackUnitRelativePosition.setStatus('current') if mibBuilder.loadTexts: rackUnitRelativePosition.setDescription('This is the relative position of the rackUnit within the assetStrip. For cascaded asset strips such as the AMS-M2-Z and AMS-M3-Z, it is numbered in ascending order starting with the rackunit closest to the asset strip edge with the connector. For non-cascaded asset strips, value = 1') assetStripNumberOfRackUnits = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 7, 1, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 256))).setMaxAccess("readonly") if mibBuilder.loadTexts: assetStripNumberOfRackUnits.setStatus('current') if mibBuilder.loadTexts: assetStripNumberOfRackUnits.setDescription(' For non-cascaded asset strips, value = rackUnitCount For cascaded asset strips, it is the number of rack units in the asset Strip. Examples: 2 forAMS-M2-Z, 3 for AMS-M3-Z. ') bladeExtensionTable = MibTable((1, 3, 6, 1, 4, 1, 13742, 7, 1, 7, 2), ) if mibBuilder.loadTexts: bladeExtensionTable.setStatus('current') if mibBuilder.loadTexts: bladeExtensionTable.setDescription('A list of blade server extension entries containing tag information.') bladeExtensionEntry = MibTableRow((1, 3, 6, 1, 4, 1, 13742, 7, 1, 7, 2, 1), ).setIndexNames((0, "ASSETMANAGEMENT-MIB", "assetStripID"), (0, "ASSETMANAGEMENT-MIB", "rackUnitID"), (0, "ASSETMANAGEMENT-MIB", "bladeSlotID")) if mibBuilder.loadTexts: bladeExtensionEntry.setStatus('current') if mibBuilder.loadTexts: bladeExtensionEntry.setDescription('An entry containing tag information for a blade server extension.') bladeSlotID = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 7, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))) if mibBuilder.loadTexts: bladeSlotID.setStatus('current') if mibBuilder.loadTexts: bladeSlotID.setDescription('A unique value for each slot on a blade extension.') bladeTagID = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 7, 2, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: bladeTagID.setStatus('current') if mibBuilder.loadTexts: bladeTagID.setDescription('Asset management tag attached to a blade extension at the rack unit. Empty in case there is no tag attached.') bladeSlotPosition = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 1, 7, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 256))).setMaxAccess("readonly") if mibBuilder.loadTexts: bladeSlotPosition.setStatus('current') if mibBuilder.loadTexts: bladeSlotPosition.setDescription('A number associated with each blade slot. It ranges between 1 and the value of bladeExtensionSize.') logConfiguration = MibIdentifier((1, 3, 6, 1, 4, 1, 13742, 7, 3, 1)) logSize = MibScalar((1, 3, 6, 1, 4, 1, 13742, 7, 3, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: logSize.setStatus('current') if mibBuilder.loadTexts: logSize.setDescription('The number of entries in the asset management log table.') oldestLogID = MibScalar((1, 3, 6, 1, 4, 1, 13742, 7, 3, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: oldestLogID.setStatus('current') if mibBuilder.loadTexts: oldestLogID.setDescription('The index of the oldest entry in the log table.') newestLogID = MibScalar((1, 3, 6, 1, 4, 1, 13742, 7, 3, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: newestLogID.setStatus('current') if mibBuilder.loadTexts: newestLogID.setDescription('The index of the newest entry in the log table.') logEventCount = MibScalar((1, 3, 6, 1, 4, 1, 13742, 7, 3, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: logEventCount.setStatus('current') if mibBuilder.loadTexts: logEventCount.setDescription('The total number of logged events.') assetManagementLogTable = MibTable((1, 3, 6, 1, 4, 1, 13742, 7, 3, 2), ) if mibBuilder.loadTexts: assetManagementLogTable.setStatus('current') if mibBuilder.loadTexts: assetManagementLogTable.setDescription('A ring buffer containing asset management events.') assetManagementLogEntry = MibTableRow((1, 3, 6, 1, 4, 1, 13742, 7, 3, 2, 1), ).setIndexNames((0, "ASSETMANAGEMENT-MIB", "logIndex")) if mibBuilder.loadTexts: assetManagementLogEntry.setStatus('current') if mibBuilder.loadTexts: assetManagementLogEntry.setDescription('An entry in the asset management log table.') logIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 3, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 5000))) if mibBuilder.loadTexts: logIndex.setStatus('current') if mibBuilder.loadTexts: logIndex.setDescription('The index of an entry in the log ring buffer. Its value ranges between 1 and logSize.') logTimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 3, 2, 1, 2), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: logTimeStamp.setStatus('current') if mibBuilder.loadTexts: logTimeStamp.setDescription('The time of the log entry in seconds relative to January 1, 1970 00:00 UTC.') logEventType = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 3, 2, 1, 3), LogEventTypeEnumeration()).setMaxAccess("readonly") if mibBuilder.loadTexts: logEventType.setStatus('current') if mibBuilder.loadTexts: logEventType.setDescription('The type of this log entry.') logAssetStripNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 3, 2, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 256))).setMaxAccess("readonly") if mibBuilder.loadTexts: logAssetStripNumber.setStatus('current') if mibBuilder.loadTexts: logAssetStripNumber.setDescription('A unique value for each asset strip. Its value ranges between 1 and the value of assetStripCount.') logRackUnitNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 3, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 256))).setMaxAccess("readonly") if mibBuilder.loadTexts: logRackUnitNumber.setStatus('current') if mibBuilder.loadTexts: logRackUnitNumber.setDescription('A unique value for each rack unit. Its value ranges between 1 and the value of rackUnitCount. It corresponds with rackUnitID, the fixed ordinal index of each rack unit.') logRackUnitPosition = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 3, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 256))).setMaxAccess("readonly") if mibBuilder.loadTexts: logRackUnitPosition.setStatus('current') if mibBuilder.loadTexts: logRackUnitPosition.setDescription('A number associated with each rack unit. Its value depends on the rack unit numbering mode. It ranges between 1 and the value of rackUnitCount. If the asset strip is disconnected, then the value is 0.') logSlotNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 3, 2, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: logSlotNumber.setStatus('current') if mibBuilder.loadTexts: logSlotNumber.setDescription('A unique value for each slot on a blade extension. Value of 0 indicates a tag on the main strip. If the asset strip is disconnected, the value is 0 as well. Use logEventType to distinguish the validity.') logTagID = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 3, 2, 1, 8), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: logTagID.setStatus('current') if mibBuilder.loadTexts: logTagID.setDescription('Asset management tag attached to the rack unit. Empty in case there is no tag attached.') logAssetStripState = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 3, 2, 1, 9), AssetStripStateEnumeration()).setMaxAccess("readonly") if mibBuilder.loadTexts: logAssetStripState.setStatus('current') if mibBuilder.loadTexts: logAssetStripState.setDescription('Asset management strip state.') logParentBladeID = MibTableColumn((1, 3, 6, 1, 4, 1, 13742, 7, 3, 2, 1, 10), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: logParentBladeID.setStatus('current') if mibBuilder.loadTexts: logParentBladeID.setDescription('In case the tag is attached to a blade extension, this indicates the tagID of the extension. Empty in case there is no tag attached or the tag is attached on the main strip.') deviceName = MibScalar((1, 3, 6, 1, 4, 1, 13742, 7, 0, 0, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: deviceName.setStatus('current') if mibBuilder.loadTexts: deviceName.setDescription('The user-defined name for the Device.') deviceInetAddressType = MibScalar((1, 3, 6, 1, 4, 1, 13742, 7, 0, 0, 2), InetAddressType()).setMaxAccess("readonly") if mibBuilder.loadTexts: deviceInetAddressType.setStatus('current') if mibBuilder.loadTexts: deviceInetAddressType.setDescription('The type of address format') deviceInetIPAddress = MibScalar((1, 3, 6, 1, 4, 1, 13742, 7, 0, 0, 3), InetAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: deviceInetIPAddress.setStatus('current') if mibBuilder.loadTexts: deviceInetIPAddress.setDescription('The current IP address. A value of 0.0.0.0 indicates an error or an unset option.') assetStripNumber = MibScalar((1, 3, 6, 1, 4, 1, 13742, 7, 0, 0, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 256))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: assetStripNumber.setStatus('current') if mibBuilder.loadTexts: assetStripNumber.setDescription('A unique value for each asset strip. Its value ranges between 1 and the value of assetStripCount.') rackUnitNumber = MibScalar((1, 3, 6, 1, 4, 1, 13742, 7, 0, 0, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 256))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: rackUnitNumber.setStatus('current') if mibBuilder.loadTexts: rackUnitNumber.setDescription('A unique value for each rack unit. Its value ranges between 1 and the value of rackUnitCount. It corresponds with rackUnitID, the fixed ordinal index of each rack unit.') assetStripFirmwareUpdateState = MibScalar((1, 3, 6, 1, 4, 1, 13742, 7, 0, 0, 6), AssetStripFirmwareUpdateStateEnumeration()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: assetStripFirmwareUpdateState.setStatus('current') if mibBuilder.loadTexts: assetStripFirmwareUpdateState.setDescription('The new asset strip firmware update state.') deviceUserName = MibScalar((1, 3, 6, 1, 4, 1, 13742, 7, 0, 0, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: deviceUserName.setStatus('current') if mibBuilder.loadTexts: deviceUserName.setDescription('The user currently logged in.') deviceChangedParameter = MibScalar((1, 3, 6, 1, 4, 1, 13742, 7, 0, 0, 8), DeviceConfigurationParameterEnumeration()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: deviceChangedParameter.setStatus('current') if mibBuilder.loadTexts: deviceChangedParameter.setDescription('Description of the parameter(s) that changed. ') changedParameterNewValue = MibScalar((1, 3, 6, 1, 4, 1, 13742, 7, 0, 0, 9), DisplayString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: changedParameterNewValue.setStatus('current') if mibBuilder.loadTexts: changedParameterNewValue.setDescription('The new value of the changed parameter.') slotNumber = MibScalar((1, 3, 6, 1, 4, 1, 13742, 7, 0, 0, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 16))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: slotNumber.setStatus('current') if mibBuilder.loadTexts: slotNumber.setDescription('A unique value for each slot on a blade extension. Value of 0 indicates a tag on the main strip.') oldNumberOfComponentAssetStrips = MibScalar((1, 3, 6, 1, 4, 1, 13742, 7, 0, 0, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: oldNumberOfComponentAssetStrips.setStatus('current') if mibBuilder.loadTexts: oldNumberOfComponentAssetStrips.setDescription('The old number of components building a composite asset strip.') agentInetPortNumber = MibScalar((1, 3, 6, 1, 4, 1, 13742, 7, 0, 0, 12), InetPortNumber()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: agentInetPortNumber.setStatus('current') if mibBuilder.loadTexts: agentInetPortNumber.setDescription('The UDP port number used for accessing the SNMP agent on the device. Examples: If the associated device MIB (PX2-MIB, EMD-MIB) has deviceCascadeType set to portForwarding, then master: 50500 slave 1:50501 slave 2: 50502 ...... If cascading mode is not portForwarding and default (Standard) ports are being used, then port: 161 ') assetTagConnected = NotificationType((1, 3, 6, 1, 4, 1, 13742, 7, 0, 1)).setObjects(("ASSETMANAGEMENT-MIB", "deviceName"), ("SNMPv2-MIB", "sysContact"), ("SNMPv2-MIB", "sysName"), ("SNMPv2-MIB", "sysLocation"), ("ASSETMANAGEMENT-MIB", "deviceInetAddressType"), ("ASSETMANAGEMENT-MIB", "deviceInetIPAddress"), ("ASSETMANAGEMENT-MIB", "agentInetPortNumber"), ("ASSETMANAGEMENT-MIB", "assetStripNumber"), ("ASSETMANAGEMENT-MIB", "assetStripName"), ("ASSETMANAGEMENT-MIB", "rackUnitNumber"), ("ASSETMANAGEMENT-MIB", "rackUnitPosition"), ("ASSETMANAGEMENT-MIB", "rackUnitName"), ("ASSETMANAGEMENT-MIB", "slotNumber"), ("ASSETMANAGEMENT-MIB", "tagID"), ("ASSETMANAGEMENT-MIB", "bladeTagID"), ("ASSETMANAGEMENT-MIB", "ledColor"), ("ASSETMANAGEMENT-MIB", "ledMode"), ("ASSETMANAGEMENT-MIB", "ledOperationMode"), ("ASSETMANAGEMENT-MIB", "rackUnitCount"), ("ASSETMANAGEMENT-MIB", "assetStripType"), ("ASSETMANAGEMENT-MIB", "assetStripCascadePosition"), ("ASSETMANAGEMENT-MIB", "rackUnitRelativePosition"), ("ASSETMANAGEMENT-MIB", "assetStripNumberOfRackUnits")) if mibBuilder.loadTexts: assetTagConnected.setStatus('current') if mibBuilder.loadTexts: assetTagConnected.setDescription('The asset tag of a rack unit was connected. bladeTagID is empty if the asset tag is not on a blade extension.') assetTagDisconnected = NotificationType((1, 3, 6, 1, 4, 1, 13742, 7, 0, 2)).setObjects(("ASSETMANAGEMENT-MIB", "deviceName"), ("SNMPv2-MIB", "sysContact"), ("SNMPv2-MIB", "sysName"), ("SNMPv2-MIB", "sysLocation"), ("ASSETMANAGEMENT-MIB", "deviceInetAddressType"), ("ASSETMANAGEMENT-MIB", "deviceInetIPAddress"), ("ASSETMANAGEMENT-MIB", "agentInetPortNumber"), ("ASSETMANAGEMENT-MIB", "assetStripNumber"), ("ASSETMANAGEMENT-MIB", "assetStripName"), ("ASSETMANAGEMENT-MIB", "rackUnitNumber"), ("ASSETMANAGEMENT-MIB", "rackUnitPosition"), ("ASSETMANAGEMENT-MIB", "rackUnitName"), ("ASSETMANAGEMENT-MIB", "slotNumber"), ("ASSETMANAGEMENT-MIB", "tagID"), ("ASSETMANAGEMENT-MIB", "bladeTagID"), ("ASSETMANAGEMENT-MIB", "ledColor"), ("ASSETMANAGEMENT-MIB", "ledMode"), ("ASSETMANAGEMENT-MIB", "ledOperationMode"), ("ASSETMANAGEMENT-MIB", "rackUnitCount"), ("ASSETMANAGEMENT-MIB", "assetStripType"), ("ASSETMANAGEMENT-MIB", "assetStripCascadePosition"), ("ASSETMANAGEMENT-MIB", "rackUnitRelativePosition"), ("ASSETMANAGEMENT-MIB", "assetStripNumberOfRackUnits")) if mibBuilder.loadTexts: assetTagDisconnected.setStatus('current') if mibBuilder.loadTexts: assetTagDisconnected.setDescription('The asset tag of a rack unit was disconnected. bladeTagID is empty if the asset tag is not on a blade extension.') assetStripStateChange = NotificationType((1, 3, 6, 1, 4, 1, 13742, 7, 0, 3)).setObjects(("ASSETMANAGEMENT-MIB", "deviceName"), ("SNMPv2-MIB", "sysContact"), ("SNMPv2-MIB", "sysName"), ("SNMPv2-MIB", "sysLocation"), ("ASSETMANAGEMENT-MIB", "deviceInetAddressType"), ("ASSETMANAGEMENT-MIB", "deviceInetIPAddress"), ("ASSETMANAGEMENT-MIB", "agentInetPortNumber"), ("ASSETMANAGEMENT-MIB", "assetStripNumber"), ("ASSETMANAGEMENT-MIB", "assetStripName"), ("ASSETMANAGEMENT-MIB", "assetStripState"), ("ASSETMANAGEMENT-MIB", "rackUnitCount")) if mibBuilder.loadTexts: assetStripStateChange.setStatus('current') if mibBuilder.loadTexts: assetStripStateChange.setDescription('The asset strip unit changed its state.') assetStripFirmwareUpdate = NotificationType((1, 3, 6, 1, 4, 1, 13742, 7, 0, 4)).setObjects(("ASSETMANAGEMENT-MIB", "deviceName"), ("SNMPv2-MIB", "sysContact"), ("SNMPv2-MIB", "sysName"), ("SNMPv2-MIB", "sysLocation"), ("ASSETMANAGEMENT-MIB", "deviceInetAddressType"), ("ASSETMANAGEMENT-MIB", "deviceInetIPAddress"), ("ASSETMANAGEMENT-MIB", "agentInetPortNumber"), ("ASSETMANAGEMENT-MIB", "assetStripNumber"), ("ASSETMANAGEMENT-MIB", "assetStripName"), ("ASSETMANAGEMENT-MIB", "assetStripFirmwareUpdateState")) if mibBuilder.loadTexts: assetStripFirmwareUpdate.setStatus('current') if mibBuilder.loadTexts: assetStripFirmwareUpdate.setDescription('Asset strip firmware update state change.') deviceConfigurationChanged = NotificationType((1, 3, 6, 1, 4, 1, 13742, 7, 0, 5)).setObjects(("ASSETMANAGEMENT-MIB", "deviceName"), ("SNMPv2-MIB", "sysContact"), ("SNMPv2-MIB", "sysName"), ("SNMPv2-MIB", "sysLocation"), ("ASSETMANAGEMENT-MIB", "deviceInetAddressType"), ("ASSETMANAGEMENT-MIB", "deviceInetIPAddress"), ("ASSETMANAGEMENT-MIB", "agentInetPortNumber"), ("ASSETMANAGEMENT-MIB", "deviceUserName"), ("ASSETMANAGEMENT-MIB", "assetStripNumber"), ("ASSETMANAGEMENT-MIB", "assetStripName"), ("ASSETMANAGEMENT-MIB", "deviceChangedParameter"), ("ASSETMANAGEMENT-MIB", "changedParameterNewValue")) if mibBuilder.loadTexts: deviceConfigurationChanged.setStatus('current') if mibBuilder.loadTexts: deviceConfigurationChanged.setDescription('Assetstrip configuration has changed') rackUnitConfigurationChanged = NotificationType((1, 3, 6, 1, 4, 1, 13742, 7, 0, 6)).setObjects(("ASSETMANAGEMENT-MIB", "deviceName"), ("SNMPv2-MIB", "sysContact"), ("SNMPv2-MIB", "sysName"), ("SNMPv2-MIB", "sysLocation"), ("ASSETMANAGEMENT-MIB", "deviceInetAddressType"), ("ASSETMANAGEMENT-MIB", "deviceInetIPAddress"), ("ASSETMANAGEMENT-MIB", "agentInetPortNumber"), ("ASSETMANAGEMENT-MIB", "deviceUserName"), ("ASSETMANAGEMENT-MIB", "assetStripNumber"), ("ASSETMANAGEMENT-MIB", "assetStripName"), ("ASSETMANAGEMENT-MIB", "rackUnitNumber"), ("ASSETMANAGEMENT-MIB", "rackUnitPosition"), ("ASSETMANAGEMENT-MIB", "rackUnitName"), ("ASSETMANAGEMENT-MIB", "ledColor"), ("ASSETMANAGEMENT-MIB", "ledMode"), ("ASSETMANAGEMENT-MIB", "ledOperationMode")) if mibBuilder.loadTexts: rackUnitConfigurationChanged.setStatus('current') if mibBuilder.loadTexts: rackUnitConfigurationChanged.setDescription('Assetstrip configuration has changed') bladeExtensionConnected = NotificationType((1, 3, 6, 1, 4, 1, 13742, 7, 0, 7)).setObjects(("ASSETMANAGEMENT-MIB", "deviceName"), ("SNMPv2-MIB", "sysContact"), ("SNMPv2-MIB", "sysName"), ("SNMPv2-MIB", "sysLocation"), ("ASSETMANAGEMENT-MIB", "deviceInetAddressType"), ("ASSETMANAGEMENT-MIB", "deviceInetIPAddress"), ("ASSETMANAGEMENT-MIB", "agentInetPortNumber"), ("ASSETMANAGEMENT-MIB", "assetStripNumber"), ("ASSETMANAGEMENT-MIB", "assetStripName"), ("ASSETMANAGEMENT-MIB", "rackUnitNumber"), ("ASSETMANAGEMENT-MIB", "rackUnitPosition"), ("ASSETMANAGEMENT-MIB", "rackUnitName"), ("ASSETMANAGEMENT-MIB", "tagID"), ("ASSETMANAGEMENT-MIB", "bladeExtensionSize"), ("ASSETMANAGEMENT-MIB", "ledColor"), ("ASSETMANAGEMENT-MIB", "ledMode"), ("ASSETMANAGEMENT-MIB", "ledOperationMode"), ("ASSETMANAGEMENT-MIB", "rackUnitCount"), ("ASSETMANAGEMENT-MIB", "assetStripType"), ("ASSETMANAGEMENT-MIB", "assetStripCascadePosition"), ("ASSETMANAGEMENT-MIB", "rackUnitRelativePosition"), ("ASSETMANAGEMENT-MIB", "assetStripNumberOfRackUnits")) if mibBuilder.loadTexts: bladeExtensionConnected.setStatus('current') if mibBuilder.loadTexts: bladeExtensionConnected.setDescription('A blade extension has been connected to the rackunit.') bladeExtensionDisconnected = NotificationType((1, 3, 6, 1, 4, 1, 13742, 7, 0, 8)).setObjects(("ASSETMANAGEMENT-MIB", "deviceName"), ("SNMPv2-MIB", "sysContact"), ("SNMPv2-MIB", "sysName"), ("SNMPv2-MIB", "sysLocation"), ("ASSETMANAGEMENT-MIB", "deviceInetAddressType"), ("ASSETMANAGEMENT-MIB", "deviceInetIPAddress"), ("ASSETMANAGEMENT-MIB", "agentInetPortNumber"), ("ASSETMANAGEMENT-MIB", "assetStripNumber"), ("ASSETMANAGEMENT-MIB", "assetStripName"), ("ASSETMANAGEMENT-MIB", "rackUnitNumber"), ("ASSETMANAGEMENT-MIB", "rackUnitPosition"), ("ASSETMANAGEMENT-MIB", "rackUnitName"), ("ASSETMANAGEMENT-MIB", "tagID"), ("ASSETMANAGEMENT-MIB", "bladeExtensionSize"), ("ASSETMANAGEMENT-MIB", "ledColor"), ("ASSETMANAGEMENT-MIB", "ledMode"), ("ASSETMANAGEMENT-MIB", "ledOperationMode"), ("ASSETMANAGEMENT-MIB", "rackUnitCount"), ("ASSETMANAGEMENT-MIB", "assetStripType"), ("ASSETMANAGEMENT-MIB", "assetStripCascadePosition"), ("ASSETMANAGEMENT-MIB", "rackUnitRelativePosition"), ("ASSETMANAGEMENT-MIB", "assetStripNumberOfRackUnits")) if mibBuilder.loadTexts: bladeExtensionDisconnected.setStatus('current') if mibBuilder.loadTexts: bladeExtensionDisconnected.setDescription('A blade extension has been disconnected from the rackunit.') bladeExtensionOverflowOccured = NotificationType((1, 3, 6, 1, 4, 1, 13742, 7, 0, 9)).setObjects(("ASSETMANAGEMENT-MIB", "deviceName"), ("SNMPv2-MIB", "sysContact"), ("SNMPv2-MIB", "sysName"), ("SNMPv2-MIB", "sysLocation"), ("ASSETMANAGEMENT-MIB", "deviceInetAddressType"), ("ASSETMANAGEMENT-MIB", "deviceInetIPAddress"), ("ASSETMANAGEMENT-MIB", "agentInetPortNumber"), ("ASSETMANAGEMENT-MIB", "assetStripNumber"), ("ASSETMANAGEMENT-MIB", "assetStripName")) if mibBuilder.loadTexts: bladeExtensionOverflowOccured.setStatus('current') if mibBuilder.loadTexts: bladeExtensionOverflowOccured.setDescription("Maximum number of supported tags on blade extension was reached. The asset strip won't detect any new tags on blade extensions until some are removed.") bladeExtensionOverflowCleared = NotificationType((1, 3, 6, 1, 4, 1, 13742, 7, 0, 10)).setObjects(("ASSETMANAGEMENT-MIB", "deviceName"), ("SNMPv2-MIB", "sysContact"), ("SNMPv2-MIB", "sysName"), ("SNMPv2-MIB", "sysLocation"), ("ASSETMANAGEMENT-MIB", "deviceInetAddressType"), ("ASSETMANAGEMENT-MIB", "deviceInetIPAddress"), ("ASSETMANAGEMENT-MIB", "agentInetPortNumber"), ("ASSETMANAGEMENT-MIB", "assetStripNumber"), ("ASSETMANAGEMENT-MIB", "assetStripName")) if mibBuilder.loadTexts: bladeExtensionOverflowCleared.setStatus('current') if mibBuilder.loadTexts: bladeExtensionOverflowCleared.setDescription('Free space for new tags on blade extensions is available again.') compositeAssetStripCompositionChanged = NotificationType((1, 3, 6, 1, 4, 1, 13742, 7, 0, 11)).setObjects(("ASSETMANAGEMENT-MIB", "deviceName"), ("SNMPv2-MIB", "sysContact"), ("SNMPv2-MIB", "sysName"), ("SNMPv2-MIB", "sysLocation"), ("ASSETMANAGEMENT-MIB", "deviceInetAddressType"), ("ASSETMANAGEMENT-MIB", "deviceInetIPAddress"), ("ASSETMANAGEMENT-MIB", "agentInetPortNumber"), ("ASSETMANAGEMENT-MIB", "assetStripNumber"), ("ASSETMANAGEMENT-MIB", "assetStripName"), ("ASSETMANAGEMENT-MIB", "oldNumberOfComponentAssetStrips"), ("ASSETMANAGEMENT-MIB", "numberOfComponentAssetStrips")) if mibBuilder.loadTexts: compositeAssetStripCompositionChanged.setStatus('current') if mibBuilder.loadTexts: compositeAssetStripCompositionChanged.setDescription('The composition of an composite asset strip changed.') mibBuilder.exportSymbols("ASSETMANAGEMENT-MIB", bladeExtensionConnected=bladeExtensionConnected, logParentBladeID=logParentBladeID, assetManagement=assetManagement, assetStripFirmwareUpdate=assetStripFirmwareUpdate, assetStripDefaultLEDColorDisconnected=assetStripDefaultLEDColorDisconnected, deviceUserName=deviceUserName, compositeAssetStripCompositionChanged=compositeAssetStripCompositionChanged, compliances=compliances, assetStripConfigurationEntry=assetStripConfigurationEntry, logAssetStripNumber=logAssetStripNumber, rackUnitType=rackUnitType, rackUnitConfigurationChanged=rackUnitConfigurationChanged, assetStripDefaultLEDColorDisconnectedStr=assetStripDefaultLEDColorDisconnectedStr, logIndex=logIndex, assetManager=assetManager, assetStripNumberOfRackUnits=assetStripNumberOfRackUnits, assetStripName=assetStripName, defaultLEDColorDisconnectedStr=defaultLEDColorDisconnectedStr, AssetStripFirmwareUpdateStateEnumeration=AssetStripFirmwareUpdateStateEnumeration, rackUnitCount=rackUnitCount, numberOfComponentAssetStrips=numberOfComponentAssetStrips, assetTagConnected=assetTagConnected, configGroup2=configGroup2, traps=traps, LogEventTypeEnumeration=LogEventTypeEnumeration, oldestLogID=oldestLogID, logGroup=logGroup, rackUnitName=rackUnitName, ledMode=ledMode, assetManagementLogEntry=assetManagementLogEntry, trapInformationGroup=trapInformationGroup, complianceRev2=complianceRev2, currentMainTagCount=currentMainTagCount, currentBladeTagCount=currentBladeTagCount, bladeExtensionDisconnected=bladeExtensionDisconnected, logEventCount=logEventCount, conformance=conformance, maxMainTagCount=maxMainTagCount, bladeSlotID=bladeSlotID, logSize=logSize, bladeExtensionOverflow=bladeExtensionOverflow, defaultLEDColorConnectedStr=defaultLEDColorConnectedStr, raritan=raritan, assetManagementLogTable=assetManagementLogTable, ledOperationMode=ledOperationMode, assetManagementGroup=assetManagementGroup, AssetManagementLEDModeEnumeration=AssetManagementLEDModeEnumeration, RackUnitNumberingModeEnumeration=RackUnitNumberingModeEnumeration, bladeSlotPosition=bladeSlotPosition, configuration=configuration, assetStripStateChange=assetStripStateChange, defaultLEDColorConnected=defaultLEDColorConnected, assetStripID=assetStripID, assetStripType=assetStripType, tagFamily=tagFamily, logRackUnitNumber=logRackUnitNumber, deviceInetIPAddress=deviceInetIPAddress, rackUnitNumberingOffset=rackUnitNumberingOffset, assetStripConfigurationTable=assetStripConfigurationTable, assetStripState=assetStripState, assetManagementTable=assetManagementTable, assetTagDisconnected=assetTagDisconnected, configGroup=configGroup, assetStrip=assetStrip, slotNumber=slotNumber, log=log, assetStripDefaultLEDColorConnectedStr=assetStripDefaultLEDColorConnectedStr, logTimeStamp=logTimeStamp, deviceName=deviceName, logSlotNumber=logSlotNumber, RackUnitTypeEnumeration=RackUnitTypeEnumeration, trapsGroup=trapsGroup, AssetStripTypeEnumeration=AssetStripTypeEnumeration, assetStripDefaultLEDColorConnected=assetStripDefaultLEDColorConnected, tagID=tagID, logAssetStripState=logAssetStripState, PYSNMP_MODULE_ID=raritan, trapInformation=trapInformation, logEventType=logEventType, bladeTagID=bladeTagID, rackUnitID=rackUnitID, deviceInetAddressType=deviceInetAddressType, bladeExtensionEntry=bladeExtensionEntry, rackUnitNumberingMode=rackUnitNumberingMode, bladeExtensionSize=bladeExtensionSize, logConfiguration=logConfiguration, bladeExtensionOverflowOccured=bladeExtensionOverflowOccured, newestLogID=newestLogID, deviceConfigurationChanged=deviceConfigurationChanged, rackUnitRelativePosition=rackUnitRelativePosition, assetStripCascadePosition=assetStripCascadePosition, agentInetPortNumber=agentInetPortNumber, maxBladeTagCount=maxBladeTagCount, assetStripOrientation=assetStripOrientation, logTagID=logTagID, rackUnitNumber=rackUnitNumber, RGBCOLOR=RGBCOLOR, assetStripNumber=assetStripNumber, bladeExtensionTable=bladeExtensionTable, ledColor=ledColor, oldNumberOfComponentAssetStrips=oldNumberOfComponentAssetStrips, deviceChangedParameter=deviceChangedParameter, defaultLEDColorDisconnected=defaultLEDColorDisconnected, changedParameterNewValue=changedParameterNewValue, complianceRev1=complianceRev1, logRackUnitPosition=logRackUnitPosition, AssetStripOrientationEnumeration=AssetStripOrientationEnumeration, assetStripFirmwareUpdateState=assetStripFirmwareUpdateState, groups=groups, rackUnitPosition=rackUnitPosition, AssetManagementLEDOperationModeEnumeration=AssetManagementLEDOperationModeEnumeration, assetStripCount=assetStripCount, assetManagementEntry=assetManagementEntry, DeviceConfigurationParameterEnumeration=DeviceConfigurationParameterEnumeration, ledColorStr=ledColorStr, bladeExtensionOverflowCleared=bladeExtensionOverflowCleared, AssetStripStateEnumeration=AssetStripStateEnumeration)
157.773537
5,190
0.784856
6,713
62,005
7.249069
0.089379
0.084705
0.078972
0.008631
0.536547
0.414463
0.367035
0.34256
0.313996
0.29505
0
0.044921
0.091315
62,005
392
5,191
158.17602
0.818771
0.005354
0
0.075472
0
0.137466
0.434581
0.0595
0
0
0
0
0
1
0
false
0
0.021563
0
0.172507
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
8bec7a78ef815c669108337b9955421ae8412b87
1,192
py
Python
deep-rl/lib/python2.7/site-packages/OpenGL/raw/GL/ARB/get_program_binary.py
ShujaKhalid/deep-rl
99c6ba6c3095d1bfdab81bd01395ced96bddd611
[ "MIT" ]
210
2016-04-09T14:26:00.000Z
2022-03-25T18:36:19.000Z
deep-rl/lib/python2.7/site-packages/OpenGL/raw/GL/ARB/get_program_binary.py
ShujaKhalid/deep-rl
99c6ba6c3095d1bfdab81bd01395ced96bddd611
[ "MIT" ]
72
2016-09-04T09:30:19.000Z
2022-03-27T17:06:53.000Z
deep-rl/lib/python2.7/site-packages/OpenGL/raw/GL/ARB/get_program_binary.py
ShujaKhalid/deep-rl
99c6ba6c3095d1bfdab81bd01395ced96bddd611
[ "MIT" ]
64
2016-04-09T14:26:49.000Z
2022-03-21T11:19:47.000Z
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GL import _types as _cs # End users want this... from OpenGL.raw.GL._types import * from OpenGL.raw.GL import _errors from OpenGL.constant import Constant as _C import ctypes _EXTENSION_NAME = 'GL_ARB_get_program_binary' def _f( function ): return _p.createFunction( function,_p.PLATFORM.GL,'GL_ARB_get_program_binary',error_checker=_errors._error_checker) GL_NUM_PROGRAM_BINARY_FORMATS=_C('GL_NUM_PROGRAM_BINARY_FORMATS',0x87FE) GL_PROGRAM_BINARY_FORMATS=_C('GL_PROGRAM_BINARY_FORMATS',0x87FF) GL_PROGRAM_BINARY_LENGTH=_C('GL_PROGRAM_BINARY_LENGTH',0x8741) GL_PROGRAM_BINARY_RETRIEVABLE_HINT=_C('GL_PROGRAM_BINARY_RETRIEVABLE_HINT',0x8257) @_f @_p.types(None,_cs.GLuint,_cs.GLsizei,arrays.GLsizeiArray,arrays.GLuintArray,ctypes.c_void_p) def glGetProgramBinary(program,bufSize,length,binaryFormat,binary):pass @_f @_p.types(None,_cs.GLuint,_cs.GLenum,ctypes.c_void_p,_cs.GLsizei) def glProgramBinary(program,binaryFormat,binary,length):pass @_f @_p.types(None,_cs.GLuint,_cs.GLenum,_cs.GLint) def glProgramParameteri(program,pname,value):pass
44.148148
119
0.833054
184
1,192
4.994565
0.369565
0.141458
0.097933
0.048966
0.352557
0.090316
0.090316
0.067465
0.067465
0
0
0.01435
0.064597
1,192
26
120
45.846154
0.809865
0.083893
0
0.136364
1
0
0.149309
0.149309
0
0
0.02212
0
0
1
0.181818
false
0.136364
0.272727
0.045455
0.5
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
4735a6be395ffd4914453c63b7dd438db0593092
629
py
Python
parseridge/parser/training/callbacks/save_model_callback.py
jgontrum/parseridge
f87ef82a9468addeb09a91c3b5310db38840bf0f
[ "Apache-2.0" ]
6
2019-10-06T23:00:29.000Z
2020-04-08T02:04:24.000Z
parseridge/parser/training/callbacks/save_model_callback.py
jgontrum/parseridge
f87ef82a9468addeb09a91c3b5310db38840bf0f
[ "Apache-2.0" ]
2
2020-04-28T12:06:23.000Z
2020-04-28T13:30:03.000Z
parseridge/parser/training/callbacks/save_model_callback.py
jgontrum/parseridge
f87ef82a9468addeb09a91c3b5310db38840bf0f
[ "Apache-2.0" ]
1
2019-12-23T00:53:38.000Z
2019-12-23T00:53:38.000Z
import os from typing import Any, Optional import torch from parseridge.parser.modules.data_parallel import Module from parseridge.parser.training.callbacks.base_callback import Callback class SaveModelCallback(Callback): _order = 5 def __init__(self, folder_path: Optional[str] = None): self.folder = folder_path if self.folder: os.makedirs(folder_path, exist_ok=True) def on_epoch_end(self, epoch: int, model: Module, **kwargs: Any) -> None: if self.folder: file_name = f"{self.folder}/epoch_{epoch}.torch" torch.save(model.state_dict(), file_name)
28.590909
77
0.696343
83
629
5.072289
0.542169
0.118765
0.095012
0
0
0
0
0
0
0
0
0.002004
0.206677
629
21
78
29.952381
0.841683
0
0
0.133333
0
0
0.052464
0.052464
0
0
0
0
0
1
0.133333
false
0
0.333333
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
0
0
0
1
0
1
0
0
2
4739f9dd85a98ca4914a3d95480d40fee9c3fdfc
192
py
Python
ex021.py
Jordemar-D-Bousquet/Exercicios_Python
705d4c83720db033841f01aa843e4dbab08f1423
[ "MIT" ]
null
null
null
ex021.py
Jordemar-D-Bousquet/Exercicios_Python
705d4c83720db033841f01aa843e4dbab08f1423
[ "MIT" ]
null
null
null
ex021.py
Jordemar-D-Bousquet/Exercicios_Python
705d4c83720db033841f01aa843e4dbab08f1423
[ "MIT" ]
null
null
null
# Faça um programa em Python que abra e reproduza o áudio de um arquivo MP3. from pygame import mixer mixer.init() mixer.music.load('ex021.mp3') mixer.music.play() input('Agora vc escuta?')
21.333333
76
0.744792
33
192
4.333333
0.818182
0.13986
0
0
0
0
0
0
0
0
0
0.030488
0.145833
192
8
77
24
0.841463
0.385417
0
0
0
0
0.215517
0
0
0
0
0
0
1
0
true
0
0.2
0
0.2
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
2
473a6e55a1141afc8bdd4f4dc054a62915b0f948
320
py
Python
Module 2/Chapter 7/ch7_yahooweatherapi.py
saicharanabhishek/machinelearning_examples
f89857ae7e1a2baa76951fe1d55541832d0f0d20
[ "MIT" ]
101
2016-11-08T11:17:55.000Z
2021-12-24T10:43:32.000Z
Module 2/Chapter 7/ch7_yahooweatherapi.py
saicharanabhishek/machinelearning_examples
f89857ae7e1a2baa76951fe1d55541832d0f0d20
[ "MIT" ]
2
2017-11-28T11:22:25.000Z
2019-02-12T17:09:18.000Z
Module 2/Chapter 7/ch7_yahooweatherapi.py
saicharanabhishek/machinelearning_examples
f89857ae7e1a2baa76951fe1d55541832d0f0d20
[ "MIT" ]
102
2016-10-22T12:14:23.000Z
2022-03-26T19:59:09.000Z
import urllib, json baseurl = 'https://query.yahooapis.com/v1/public/yql?' yql_query = "select item.condition from weather.forecast where woeid=9807" yql_url = baseurl + urllib.urlencode({'q':yql_query}) + "&format=json" result = urllib.urlopen(yql_url).read() data = json.loads(result) print data['query']['results']
32
74
0.7375
46
320
5.043478
0.673913
0.068966
0
0
0
0
0
0
0
0
0
0.017301
0.096875
320
9
75
35.555556
0.785467
0
0
0
0
0
0.396875
0
0
0
0
0
0
0
null
null
0
0.142857
null
null
0.142857
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
2
473a74f5da28e0b4ce33777ece6a2e2116a72644
1,697
py
Python
lib/assets/Lib/signal.py
s6007589/cafe-grader-web
18a993801c698fb7b7ec6ae5f4b67920503cb242
[ "MIT" ]
25
2016-09-04T07:34:13.000Z
2022-02-14T07:39:02.000Z
lib/assets/Lib/signal.py
it56660024/cafe-grader-web
e9a1305fd62e79e54f6961f97ddc5cd57bafd73c
[ "MIT" ]
25
2015-02-05T03:59:27.000Z
2022-02-11T16:54:04.000Z
lib/assets/Lib/signal.py
it56660024/cafe-grader-web
e9a1305fd62e79e54f6961f97ddc5cd57bafd73c
[ "MIT" ]
16
2016-09-05T00:30:27.000Z
2021-12-05T11:07:02.000Z
"""This module provides mechanisms to use signal handlers in Python. Functions: alarm() -- cause SIGALRM after a specified time [Unix only] setitimer() -- cause a signal (described below) after a specified float time and the timer may restart then [Unix only] getitimer() -- get current value of timer [Unix only] signal() -- set the action for a given signal getsignal() -- get the signal action for a given signal pause() -- wait until a signal arrives [Unix only] default_int_handler() -- default SIGINT handler signal constants: SIG_DFL -- used to refer to the system default handler SIG_IGN -- used to ignore the signal NSIG -- number of defined signals SIGINT, SIGTERM, etc. -- signal numbers itimer constants: ITIMER_REAL -- decrements in real time, and delivers SIGALRM upon expiration ITIMER_VIRTUAL -- decrements only when the process is executing, and delivers SIGVTALRM upon expiration ITIMER_PROF -- decrements both when the process is executing and when the system is executing on behalf of the process. Coupled with ITIMER_VIRTUAL, this timer is usually used to profile the time spent by the application in user and kernel space. SIGPROF is delivered upon expiration. *** IMPORTANT NOTICE *** A signal handler function is called with two arguments: the first is the signal number, the second is the interrupted stack frame.""" CTRL_BREAK_EVENT=1 CTRL_C_EVENT=0 NSIG=23 SIGABRT=22 SIGBREAK=21 SIGFPE=8 SIGILL=4 SIGINT=2 SIGSEGV=11 SIGTERM=15 SIG_DFL=0 SIG_IGN=1 def signal(signalnum, handler) : pass
32.634615
78
0.700059
240
1,697
4.891667
0.516667
0.027257
0.025554
0.025554
0.083475
0.0477
0
0
0
0
0
0.01324
0.243371
1,697
51
79
33.27451
0.90109
0.860931
0
0
0
0
0
0
0
0
0
0
0
1
0.071429
false
0.071429
0
0
0.071429
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
47405d3453babd25d32b1eab577b6c049070e9a0
52
py
Python
src/config.py
kimminwyk/apache-log-parsing
1fcf06dc349c37ab02b91c2c48e3dc8f6f5d4b4e
[ "MIT" ]
1
2021-03-31T00:14:38.000Z
2021-03-31T00:14:38.000Z
src/config.py
kimminwyk/apache-log-parsing
1fcf06dc349c37ab02b91c2c48e3dc8f6f5d4b4e
[ "MIT" ]
null
null
null
src/config.py
kimminwyk/apache-log-parsing
1fcf06dc349c37ab02b91c2c48e3dc8f6f5d4b4e
[ "MIT" ]
null
null
null
default = False actions = 'store_true' ENC = 'utf-8'
17.333333
22
0.692308
8
52
4.375
1
0
0
0
0
0
0
0
0
0
0
0.022727
0.153846
52
3
23
17.333333
0.772727
0
0
0
0
0
0.283019
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
4740a5904496fd65f865863d0eb457e3b97598a9
10,751
py
Python
UniGrammar/tools/regExps/python/prelifter.py
UniGrammar/UniGrammar.py
560152ff5ff3f0651171044f6b5046fd8d895960
[ "Unlicense" ]
2
2020-06-17T16:57:23.000Z
2022-02-24T13:29:01.000Z
UniGrammar/tools/regExps/python/prelifter.py
KOLANICH/UniGrammar.py
d83f2f605073898b454868b98e2ecdefc4d9f7ca
[ "Unlicense" ]
null
null
null
UniGrammar/tools/regExps/python/prelifter.py
KOLANICH/UniGrammar.py
d83f2f605073898b454868b98e2ecdefc4d9f7ca
[ "Unlicense" ]
null
null
null
import sre_constants as sc import sre_parse as sp import typing import unicodedata from pprint import pprint from RichConsole import groups, rsjoin from .knowledge import CAPTURE_GROUP, LITERAL_STR class RXASTNode: """Current AST generated by sre_parse is badly structured and doesn't suit well for our purposes. So we lift into an own AST class for RX first, and then do multiple passes""" __slots__ = ("name", "type", "argsDic") HIGHLIGHT = (groups.Fore.lightmagentaEx, groups.Fore.lightcyanEx, groups.Fore.lightyellowEx) def __init__(self, name: typing.Optional[str], typ: int, argsDic: typing.Mapping[str, typing.Any]): self.__class__.name.__set__(self, name) self.__class__.type.__set__(self, typ) self.__class__.argsDic.__set__(self, argsDic) def __getattr__(self, k: str): try: return self.argsDic[k] except KeyError as ex: raise AttributeError(*ex.args) from ex def __setattr__(self, k: str, v): if k in self.__class__.__slots__: #raise Exception("Fucking shit, it must never be called in the case of slots") getattr(self.__class__, k).__set__(self, v) else: self.argsDic[k] = v def __rsrepr__(self): return groups.Fore.lightgreenEx(self.__class__.__name__) + "(" + rsjoin(groups.Fore.lightblueEx(", "), (hl(getattr(self, k).__rsrepr__() if hasattr(getattr(self, k), "__rsrepr__") else repr(getattr(self, k))) for k, hl in zip(self.__class__.__slots__, self.__class__.HIGHLIGHT))) + ")" def __repr__(self): return str(self.__rsrepr__()) class RecursivePass: """A lot of flexibility is built into this class. Don't optimize it away!""" __slots__ = ("preLifter",) RECURSIVE_ARG = "children" DEPENDS = None # Used for documenting passes dependencies, not enforced for now def __init__(self, preLifter): self.preLifter = preLifter def shouldProcess(self, node): return True def processNode(self, parsed): raise NotImplementedError def processNodeIfNeeded(self, node): if self.shouldProcess(node): node = self.processNode(node) return node def shouldRecurse(self, node): return hasattr(node, self.__class__.RECURSIVE_ARG) def recurseIntoNodeIfNeeded(self, node): if self.shouldRecurse(node): node = self.recurseIntoNode(node) return node def processChild(self, node): node = self.processNodeIfNeeded(node) node = self.recurseIntoNodeIfNeeded(node) return node def processChildren(self, children): return [self.processChild(el) for el in children] def recurseIntoNode(self, node): children = getattr(node, self.__class__.RECURSIVE_ARG) children = self.processChildren(children) setattr(node, self.__class__.RECURSIVE_ARG, children) return node def __call__(self, node): return self.processChild(node) class SingleElPreLifter: __slots__ = ("visitor",) def __init__(self, visitor): self.visitor = visitor def __call__(self, node): print(node) tp = node[0] args = node[1] if not isinstance(args, (list, tuple)): args = (args,) argNames = getattr(self.visitor, tp.name) if isinstance(argNames, str): argMapping = {argNames: args} else: argMapping = dict(zip(argNames, args)) return RXASTNode(None, tp, argMapping) class REFirstPassVisitor: ASSERT = ASSERT_NOT = ("relativePosition", "children") SUBPATTERN = ("id", "children") BRANCH = ("unkn", "children") MAX_REPEAT = MIN_REPEAT = ("minCount", "maxCount", "children") GROUPREF = ("backRef",) GROUPREF_EXISTS = ("backRef", "trueBranch", "falseBranch") IN = "args" LITERAL = ("charCode",) ANY = ("reserved",) AT = ("where",) singleElPreLifter = SingleElPreLifter(REFirstPassVisitor) class RE_IN_FirstPassVisitor: NEGATE = () LITERAL = ("charCode",) CATEGORY = ("enumV",) RANGE = ("start", "stop") re_IN_FlatPreLifter = SingleElPreLifter(RE_IN_FirstPassVisitor) class RecursivePreLifter(RecursivePass): """Creates the initial AST. It is a prerequisite of every other pass because `RecursivePass` assummes that this was done in order to operate. It was possible to implement `RecursivePreLifter` above `RecursivePass` only because recursing is done only after `processNode` is called""" __slots__ = () DEPENDS = () def processNode(self, node): node.children = [singleElPreLifter(el) for el in node.children] return node def shouldProcess(self, node): return self.shouldRecurse(node) RecursivePass.DEPENDS = (RecursivePreLifter,) # The default value. class Lift_IN_args(RecursivePass): """Lifts `IN` subtrees. They are not lifted in `RecursivePreLifter` because they have own enum namespace, potentially conflicting with `OPCODES`.""" __slots__ = () DEPENDS = (RecursivePreLifter,) def processNode(self, node): node.children = [re_IN_FlatPreLifter(el) for el in node.args] del node.argsDic["args"] return node def shouldProcess(self, node): return node.type == sc.IN class CombineLiterals(RecursivePass): """The regex engine used in python treats a sequence of fixed chars as ... sequence of fixed chars. For our purposes it may make sense to combine them into words, because some grammars DSLs support keywords, it also allows more compact grammars""" __slots__ = () DEPENDS = (RecursivePreLifter, Lift_IN_args) # without Lift_IN_args children in IN will be incorrect def processNode(self, node): processed = [] currentString = [] def finishStr(): nonlocal currentString if currentString: v = "".join(chr(el.charCode) for el in currentString) if len(v) == 1: typ = sc.LITERAL else: typ = LITERAL_STR res = RXASTNode(None, typ, {"literal": v}) currentString = [] processed.append(res) for el in node.children: if el.type == sc.LITERAL: currentString.append(el) else: finishStr() processed.append(el) finishStr() node.children = processed return node def shouldProcess(self, node): return hasattr(node, "children") class AttrReplacerPass(RecursivePass): """Replaces one attr with another one""" __slots__ = ("shouldDelete",) DEPENDS = (RecursivePreLifter,) SRC_ID_ATTR = None TGT_ID_ATTR = None def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.shouldDelete = self.__class__.SRC_ID_ATTR != self.__class__.TGT_ID_ATTR def remapValue(self, prevValue): raise NotImplementedError def processNode(self, node): iD = getattr(node, self.__class__.SRC_ID_ATTR) iD = self.remapValue(iD) if self.shouldDelete: del node.argsDic[self.__class__.SRC_ID_ATTR] setattr(node, self.__class__.TGT_ID_ATTR, iD) return node def shouldProcess(self, node): raise NotImplementedError class DecodeIdsBackToNames(AttrReplacerPass): """id to name replacer""" __slots__ = () DEPENDS = (RecursivePreLifter,) SRC_ID_ATTR = "backRef" TGT_ID_ATTR = "backRef" def remapValue(self, iD): if isinstance(iD, int): iD = self.preLifter.groupsInvertedIdx.get(iD, iD) if isinstance(iD, int): iD = "cap_" + str(iD) elif isinstance(iD, str): pass return iD class AssignBackRefsNames(DecodeIdsBackToNames): """This pass * assigns `name`s to backrefs in the case of named groups""" __slots__ = ("shouldDelete",) DEPENDS = (RecursivePreLifter,) SRC_ID_ATTR = "backRef" TGT_ID_ATTR = "backRef" NODE_TYPES = frozenset({sc.GROUPREF, sc.GROUPREF_EXISTS}) def shouldProcess(self, node): return node.type in self.__class__.NODE_TYPES class AssignGroupsNamesAndCaptures(DecodeIdsBackToNames): """This pass * assigns `name`s (used as ids in UG) to named capturing groups * generates and assigns `name`s (used as ids in UG) to unnamed but indexec capturing groups * separates capturing functionality from group functionality. So capturing groups are now 2 nodes, 1 for a group itself, another one for capturing, and uncaptured groups are only 1 node, for the group itself only.""" __slots__ = () DEPENDS = (RecursivePreLifter,) SRC_ID_ATTR = "id" TGT_ID_ATTR = "name" def processNode(self, node): res = None node = super().processNode(node) iD = node.name # it is set to anything only if `id` is not None, ... if iD is not None: # ... , so it is a capturing group res = RXASTNode(iD, CAPTURE_GROUP, {"children": [node]}) else: res = node return res def shouldProcess(self, node): return node.type == sc.SUBPATTERN and self.__class__.SRC_ID_ATTR in node.argsDic class EliminateUnneededSingleItemGroups(RecursivePass): """The regexp engine tends to create groups even if there is a single item in it and it is non-capturing. We replace the group node with its content in this case""" __slots__ = () DEPENDS = (RecursivePreLifter, AssignGroupsNamesAndCaptures) # must be executed after AssignGroupsNamesAndCaptures, otherwise the info about captures and assigned ids may be lost def processNode(self, node): if len(node.children) == 1: child = node.children[0] if child.name is None: child.name = node.name return child return node def shouldProcess(self, node): return node.type == sc.SUBPATTERN class AssignLiteralsNames(RecursivePass): __slots__ = () DEPENDS = (RecursivePreLifter, CombineLiterals) # though it doesn't require CombineLiterals be executed to run without an error, the results will be incorrect otherwise def processNode(self, node): node.name = "CHAR_" + unicodedata.name(node.literal).replace(" ", "_").upper() return node def shouldProcess(self, node): return node.type == sc.LITERAL and node.name is None class AssignKeywordsNames(RecursivePass): __slots__ = () DEPENDS = (RecursivePreLifter, CombineLiterals) def processNode(self, node): node.name = "KW_" + node.literal return node def shouldProcess(self, node): return node.type == LITERAL_STR and node.name is None class PythonRXAST: __slots__ = ("pattern", "root", "groupsInvertedIdx") PASSES = [ RecursivePreLifter, Lift_IN_args, AssignGroupsNamesAndCaptures, EliminateUnneededSingleItemGroups, AssignBackRefsNames, CombineLiterals, AssignLiteralsNames, AssignKeywordsNames, ] def __init__(self, grammarText: str): children = sp.parse(grammarText, sp.SRE_FLAG_VERBOSE) self.__class__.pattern.__set__(self, children.pattern) self.__class__.groupsInvertedIdx.__set__(self, {v: k for k, v in children.pattern.groupdict.items()}) root = RXASTNode(None, sc.SUBPATTERN, {"id": None, "children": list(children)}) for pasCtor in self.__class__.PASSES: pas = pasCtor(self) root = pas(root) #print("Pass", pas.__class__.__name__, ": ", groups.Fore.lightgreenEx("OK")) #pprint(root) self.__class__.root.__set__(self, root) print(root) def __getattr__(self, k: str): return getattr(self.pattern, k) def __setattr__(self, k: str, v): setattr(self.pattern, k, v) def __repr__(self): return repr(self.pattern)
27.217722
287
0.728583
1,372
10,751
5.466472
0.239067
0.026667
0.020533
0.032
0.200267
0.143467
0.0816
0.0568
0.0568
0.0352
0
0.000887
0.161101
10,751
394
288
27.286802
0.830691
0.203237
0
0.29249
0
0
0.040235
0
0
0
0
0
0.003953
1
0.166008
false
0.067194
0.027668
0.063241
0.592885
0.011858
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
2
4747b2ce44f8edfeed9025dd5538e36cd606b1dc
436
py
Python
labs/lab10/demo/src/cpu_multiprocessing.py
Alvant/AdvancedPython2020
c5a6439f100ff6a32168366f6a74e5ca0e79d0bc
[ "MIT" ]
null
null
null
labs/lab10/demo/src/cpu_multiprocessing.py
Alvant/AdvancedPython2020
c5a6439f100ff6a32168366f6a74e5ca0e79d0bc
[ "MIT" ]
7
2021-09-12T17:15:27.000Z
2022-03-01T17:50:18.000Z
labs/lab10/demo/src/cpu_multiprocessing.py
Alvant/AdvancedPython
b036d124d0ccaa325b356db1a189e6ef10e1f21f
[ "MIT" ]
2
2021-09-26T10:00:25.000Z
2021-11-07T19:01:33.000Z
import multiprocessing import time from typing import List from constants import CPU_BIG_NUMBERS from utils import show_execution_time def cpu_bound(number: int) -> int: return sum(i * i for i in range(number)) def find_sums(numbers: List[int]) -> None: with multiprocessing.Pool() as pool: pool.map(cpu_bound, numbers) if __name__ == "__main__": show_execution_time(func=lambda: find_sums(CPU_BIG_NUMBERS))
20.761905
64
0.743119
65
436
4.676923
0.538462
0.039474
0.085526
0
0
0
0
0
0
0
0
0
0.169725
436
20
65
21.8
0.839779
0
0
0
0
0
0.018349
0
0
0
0
0
0
1
0.166667
false
0
0.416667
0.083333
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
474d460f8c93e195c3909578035ee5726563b9b7
773
py
Python
flox_aws/configure.py
getflox/flox-aws
9642e291afa3ddedd9eed566b43a640e9bb0c537
[ "MIT" ]
null
null
null
flox_aws/configure.py
getflox/flox-aws
9642e291afa3ddedd9eed566b43a640e9bb0c537
[ "MIT" ]
null
null
null
flox_aws/configure.py
getflox/flox-aws
9642e291afa3ddedd9eed566b43a640e9bb0c537
[ "MIT" ]
null
null
null
from floxcore.config import Configuration, ParamDefinition class AWSConfiguration(Configuration): def parameters(self): return ( ParamDefinition("region", "AWS Default region"), ParamDefinition("role_arn", "Role (ARN) to be assumed", default="", filter_empty=False), ParamDefinition("mfa_arn", "Multi factor authentication device ARN", default="", filter_empty=False), ParamDefinition("kms", "Default KMS key to be used for encryption", default=""), ) def secrets(self): return ( ParamDefinition("key_id", "AWS Key Id", secret=True, default=""), ParamDefinition("key_secret", "AWS Secret Key", secret=True, default=""), ) def schema(self): pass
36.809524
113
0.630013
79
773
6.088608
0.493671
0.04158
0.10395
0.095634
0.158004
0
0
0
0
0
0
0
0.245796
773
20
114
38.65
0.825043
0
0
0.125
0
0
0.239327
0
0
0
0
0
0
1
0.1875
false
0.0625
0.0625
0.125
0.4375
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
1
0
0
0
2
475312b91a3851e28b34370218eea8c022b8aff7
5,598
py
Python
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/settings/base.py
mistalaba/cookiecutter-simple-django
979780b3dea3b0ab51e780cc7d98e9ba66004b09
[ "BSD-3-Clause" ]
null
null
null
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/settings/base.py
mistalaba/cookiecutter-simple-django
979780b3dea3b0ab51e780cc7d98e9ba66004b09
[ "BSD-3-Clause" ]
null
null
null
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/settings/base.py
mistalaba/cookiecutter-simple-django
979780b3dea3b0ab51e780cc7d98e9ba66004b09
[ "BSD-3-Clause" ]
1
2021-10-21T01:45:32.000Z
2021-10-21T01:45:32.000Z
import os import sys # PATH vars BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) ROOT_DIR = lambda *x: os.path.join(BASE_DIR, *x) APPS_DIR = os.path.join(ROOT_DIR(), "apps") sys.path.insert(0, APPS_DIR) # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'CHANGE THIS!!!' ALLOWED_HOSTS = [] INSTALLED_APPS = [ "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.sites", "django.contrib.messages", "django.contrib.staticfiles", "django.contrib.humanize", # Handy template tags {%- if cookiecutter.use_cms == 'django-cms' %} "djangocms_admin_style", "cms", "menus", "treebeard", "sekizai", {%- elif cookiecutter.use_cms == 'wagtail' %} 'wagtail.contrib.forms', 'wagtail.contrib.redirects', 'wagtail.embeds', 'wagtail.sites', 'wagtail.users', 'wagtail.snippets', 'wagtail.documents', 'wagtail.images', 'wagtail.search', 'wagtail.admin', 'wagtail.core', 'modelcluster', 'taggit', {%- endif %} "django.contrib.admin", ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', {%- if cookiecutter.use_cms == 'django-cms' %} 'cms.middleware.user.CurrentUserMiddleware', 'cms.middleware.page.CurrentPageMiddleware', 'cms.middleware.toolbar.ToolbarMiddleware', 'cms.middleware.language.LanguageCookieMiddleware', 'cms.middleware.utils.ApphookReloadMiddleware', {%- elif cookiecutter.use_cms == 'wagtail' %} 'wagtail.core.middleware.SiteMiddleware', 'wagtail.contrib.redirects.middleware.RedirectMiddleware', {%- endif %} ] ROOT_URLCONF = '{{cookiecutter.project_slug}}.urls' # Python dotted path to the WSGI application used by Django's runserver. WSGI_APPLICATION = '{{cookiecutter.project_slug}}.wsgi.application' LANGUAGE_CODE = 'en' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True SITE_ID = 1 STATIC_ROOT = str(ROOT_DIR("staticfiles")) STATIC_URL = "/static/" STATICFILES_DIRS = [str(ROOT_DIR("static"))] STATICFILES_FINDERS = [ "django.contrib.staticfiles.finders.FileSystemFinder", "django.contrib.staticfiles.finders.AppDirectoriesFinder", ] TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'APP_DIRS': True, 'DIRS': [ ROOT_DIR('templates'), ], 'OPTIONS': { # 'debug': DEBUG, 'context_processors': [ 'django.contrib.auth.context_processors.auth', 'django.template.context_processors.debug', 'django.template.context_processors.i18n', 'django.template.context_processors.media', 'django.template.context_processors.static', 'django.template.context_processors.tz', 'django.contrib.messages.context_processors.messages', 'django.template.context_processors.request', {%- if cookiecutter.use_cms == 'django-cms' %} 'sekizai.context_processors.sekizai', 'cms.context_processors.cms_settings', {%- elif cookiecutter.use_cms == 'wagtail' %} {%- endif %} ], }, } ] PASSWORD_HASHERS = [ "django.contrib.auth.hashers.Argon2PasswordHasher", "django.contrib.auth.hashers.PBKDF2PasswordHasher", "django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher", "django.contrib.auth.hashers.BCryptSHA256PasswordHasher", ] AUTH_PASSWORD_VALIDATORS = [ {'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator'}, {'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator'}, {'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator'}, {'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator'}, ] {%- if cookiecutter.use_cms == 'django-cms' %} LANGUAGES = [ ('en', 'English'), ('dk', 'Danish'), ] CMS_TEMPLATES = [ ('home.html', 'Home page template'), ] {%- endif %} LOGGING = { "version": 1, "disable_existing_loggers": True, "formatters": { "verbose": { "format": "%(levelname)s %(asctime)s %(module)s " "%(process)d %(thread)d %(message)s" } }, "handlers": { "console": { "level": "DEBUG", "class": "logging.StreamHandler", "formatter": "verbose", } }, "root": {"level": "INFO", "handlers": ["console"]}, "loggers": { "django.db.backends": { "level": "ERROR", "handlers": ["console"], "propagate": False, }, # Errors logged by the SDK itself "sentry_sdk": {"level": "ERROR", "handlers": ["console"], "propagate": False}, "django.security.DisallowedHost": { "level": "ERROR", "handlers": ["console"], "propagate": False, }, }, } {%- if cookiecutter.use_cms == 'wagtail' %} WAGTAIL_SITE_NAME = '{{ cookiecutter.project_name }}' {%- endif %} # .local.py overrides all the common settings. try: from .local import * # noqa except ImportError: pass
29.463158
89
0.642551
532
5,598
6.635338
0.368421
0.084703
0.052975
0.052691
0.160623
0.143343
0.012748
0.012748
0
0
0
0.003593
0.204537
5,598
189
90
29.619048
0.789131
0.046981
0
0.125786
0
0
0.534923
0.389598
0
0
0
0
0
0
null
null
0.069182
0.025157
null
null
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
1
0
0
1
0
0
0
0
0
2
475531486c43c1c7dffcddd44fa86cc2df76cfd3
783
py
Python
alimama/alimama/items.py
Yoochao/tbk
b3a6aff905cf9d7dbe161813e1bbe968d86b5320
[ "Apache-2.0" ]
null
null
null
alimama/alimama/items.py
Yoochao/tbk
b3a6aff905cf9d7dbe161813e1bbe968d86b5320
[ "Apache-2.0" ]
null
null
null
alimama/alimama/items.py
Yoochao/tbk
b3a6aff905cf9d7dbe161813e1bbe968d86b5320
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy class AlimamaItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() url = scrapy.Field() img = scrapy.Field() title = scrapy.Field() coupon = scrapy.Field() price = scrapy.Field() monthly_sales = scrapy.Field() commission_rate = scrapy.Field() commission = scrapy.Field() shop_prom_url = scrapy.Field() prom_short_url = scrapy.Field() prom_short_ull_c = scrapy.Field() prom_long_url = scrapy.Field() prom_long_url_c = scrapy.Field() prom_taotoken_url = scrapy.Field() prom_taotoken_url_c = scrapy.Field() pass
26.1
51
0.67433
105
783
4.847619
0.447619
0.345776
0.176817
0.141454
0.278978
0
0
0
0
0
0
0.001605
0.204342
783
29
52
27
0.815409
0.260536
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0.055556
0.055556
0
0.944444
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
0
0
0
2
476520ec9bb115901083a55e2fef94cc44775b6c
2,453
py
Python
azure-mgmt/tests/test_graphrbac.py
HydAu/AzureSDKForPython
5cbe34e9e0b8ea1faacc9f205633ccc0b885c0f3
[ "Apache-2.0" ]
null
null
null
azure-mgmt/tests/test_graphrbac.py
HydAu/AzureSDKForPython
5cbe34e9e0b8ea1faacc9f205633ccc0b885c0f3
[ "Apache-2.0" ]
null
null
null
azure-mgmt/tests/test_graphrbac.py
HydAu/AzureSDKForPython
5cbe34e9e0b8ea1faacc9f205633ccc0b885c0f3
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 #------------------------------------------------------------------------- # Copyright (c) Microsoft. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #-------------------------------------------------------------------------- import unittest import azure.graphrbac from testutils.common_recordingtestcase import record from tests.mgmt_testcase import HttpStatusCode, AzureMgmtTestCase class GraphRbacTest(AzureMgmtTestCase): def setUp(self): super(GraphRbacTest, self).setUp() self.graphrbac_client = self.create_basic_client( azure.graphrbac.GraphRbacManagementClient, tenant_id=self.settings.AD_DOMAIN ) @record def test_graphrbac_users(self): user = self.graphrbac_client.user_operations.create( azure.graphrbac.models.UserCreateParameters( user_principal_name="testbuddy@{}".format(self.settings.AD_DOMAIN), account_enabled=False, display_name='Test Buddy', mail_nickname='testbuddy', password_profile=azure.graphrbac.models.UserCreateParametersPasswordProfile( password='MyStr0ngP4ssword', force_change_password_next_login=True ) ) ) self.assertEqual(user.display_name, 'Test Buddy') user = self.graphrbac_client.user_operations.get(user.object_id) self.assertEqual(user.display_name, 'Test Buddy') users = self.graphrbac_client.user_operations.list( filter="displayName eq 'Test Buddy'" ) users = list(users) self.assertEqual(len(users), 1) self.assertEqual(users[0].display_name, 'Test Buddy') self.graphrbac_client.user_operations.delete(user.object_id) #------------------------------------------------------------------------------ if __name__ == '__main__': unittest.main()
37.738462
92
0.622911
256
2,453
5.8125
0.53125
0.040323
0.063844
0.061828
0.146505
0.102151
0.052419
0
0
0
0
0.004642
0.209539
2,453
64
93
38.328125
0.762249
0.32817
0
0.054054
0
0
0.068712
0
0
0
0
0
0.108108
0
null
null
0.081081
0.108108
null
null
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
1
0
0
1
0
0
0
0
0
2
477431852e85302c53a80c1bc87e296848214e08
267
py
Python
scripts/turnOnOffGPIO.py
yomboprime/RaspiGarage
c6bd7b92066ec087cc0d59afe6664e8ae5cb46ed
[ "MIT" ]
null
null
null
scripts/turnOnOffGPIO.py
yomboprime/RaspiGarage
c6bd7b92066ec087cc0d59afe6664e8ae5cb46ed
[ "MIT" ]
null
null
null
scripts/turnOnOffGPIO.py
yomboprime/RaspiGarage
c6bd7b92066ec087cc0d59afe6664e8ae5cb46ed
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys if not os.getegid() == 0: sys.exit( 'Script must be run as root' ) from pyA20.gpio import gpio from pyA20.gpio import port pin = port.PA12 gpio.init() gpio.setcfg(pin, gpio.OUTPUT) gpio.output(pin, int(sys.argv[1]))
16.6875
44
0.700375
48
267
3.895833
0.625
0.096257
0.139037
0.203209
0
0
0
0
0
0
0
0.035714
0.161049
267
16
45
16.6875
0.799107
0.074906
0
0
0
0
0.105263
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
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
0
0
0
2