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
cdbfdebd410dabc6e262f001f9324c7ae6259a07
9,865
py
Python
sdk/python/pulumi_lxd/storage_pool.py
soupdiver/pulumi-lxd
258395aefd6a4cf138d470d7de70babed3310063
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_lxd/storage_pool.py
soupdiver/pulumi-lxd
258395aefd6a4cf138d470d7de70babed3310063
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_lxd/storage_pool.py
soupdiver/pulumi-lxd
258395aefd6a4cf138d470d7de70babed3310063
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['StoragePoolArgs', 'StoragePool'] @pulumi.input_type class StoragePoolArgs: def __init__(__self__, *, driver: pulumi.Input[str], config: Optional[pulumi.Input[Mapping[str, Any]]] = None, name: Optional[pulumi.Input[str]] = None, remote: Optional[pulumi.Input[str]] = None, target: Optional[pulumi.Input[str]] = None): """ The set of arguments for constructing a StoragePool resource. """ pulumi.set(__self__, "driver", driver) if config is not None: pulumi.set(__self__, "config", config) if name is not None: pulumi.set(__self__, "name", name) if remote is not None: pulumi.set(__self__, "remote", remote) if target is not None: pulumi.set(__self__, "target", target) @property @pulumi.getter def driver(self) -> pulumi.Input[str]: return pulumi.get(self, "driver") @driver.setter def driver(self, value: pulumi.Input[str]): pulumi.set(self, "driver", value) @property @pulumi.getter def config(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: return pulumi.get(self, "config") @config.setter def config(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): pulumi.set(self, "config", value) @property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "name") @name.setter def name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "name", value) @property @pulumi.getter def remote(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "remote") @remote.setter def remote(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "remote", value) @property @pulumi.getter def target(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "target") @target.setter def target(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "target", value) @pulumi.input_type class _StoragePoolState: def __init__(__self__, *, config: Optional[pulumi.Input[Mapping[str, Any]]] = None, driver: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, remote: Optional[pulumi.Input[str]] = None, target: Optional[pulumi.Input[str]] = None): """ Input properties used for looking up and filtering StoragePool resources. """ if config is not None: pulumi.set(__self__, "config", config) if driver is not None: pulumi.set(__self__, "driver", driver) if name is not None: pulumi.set(__self__, "name", name) if remote is not None: pulumi.set(__self__, "remote", remote) if target is not None: pulumi.set(__self__, "target", target) @property @pulumi.getter def config(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: return pulumi.get(self, "config") @config.setter def config(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): pulumi.set(self, "config", value) @property @pulumi.getter def driver(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "driver") @driver.setter def driver(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "driver", value) @property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "name") @name.setter def name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "name", value) @property @pulumi.getter def remote(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "remote") @remote.setter def remote(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "remote", value) @property @pulumi.getter def target(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "target") @target.setter def target(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "target", value) class StoragePool(pulumi.CustomResource): @overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, config: Optional[pulumi.Input[Mapping[str, Any]]] = None, driver: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, remote: Optional[pulumi.Input[str]] = None, target: Optional[pulumi.Input[str]] = None, __props__=None): """ Create a StoragePool resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. """ ... @overload def __init__(__self__, resource_name: str, args: StoragePoolArgs, opts: Optional[pulumi.ResourceOptions] = None): """ Create a StoragePool resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param StoragePoolArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. """ ... def __init__(__self__, resource_name: str, *args, **kwargs): resource_args, opts = _utilities.get_resource_args_opts(StoragePoolArgs, pulumi.ResourceOptions, *args, **kwargs) if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, config: Optional[pulumi.Input[Mapping[str, Any]]] = None, driver: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, remote: Optional[pulumi.Input[str]] = None, target: Optional[pulumi.Input[str]] = None, __props__=None): if opts is None: opts = pulumi.ResourceOptions() if not isinstance(opts, pulumi.ResourceOptions): raise TypeError('Expected resource options to be a ResourceOptions instance') if opts.version is None: opts.version = _utilities.get_version() if opts.id is None: if __props__ is not None: raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = StoragePoolArgs.__new__(StoragePoolArgs) __props__.__dict__["config"] = config if driver is None and not opts.urn: raise TypeError("Missing required property 'driver'") __props__.__dict__["driver"] = driver __props__.__dict__["name"] = name __props__.__dict__["remote"] = remote __props__.__dict__["target"] = target super(StoragePool, __self__).__init__( 'lxd:index/storagePool:StoragePool', resource_name, __props__, opts) @staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, config: Optional[pulumi.Input[Mapping[str, Any]]] = None, driver: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, remote: Optional[pulumi.Input[str]] = None, target: Optional[pulumi.Input[str]] = None) -> 'StoragePool': """ Get an existing StoragePool resource's state with the given name, id, and optional extra properties used to qualify the lookup. :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = _StoragePoolState.__new__(_StoragePoolState) __props__.__dict__["config"] = config __props__.__dict__["driver"] = driver __props__.__dict__["name"] = name __props__.__dict__["remote"] = remote __props__.__dict__["target"] = target return StoragePool(resource_name, opts=opts, __props__=__props__) @property @pulumi.getter def config(self) -> pulumi.Output[Optional[Mapping[str, Any]]]: return pulumi.get(self, "config") @property @pulumi.getter def driver(self) -> pulumi.Output[str]: return pulumi.get(self, "driver") @property @pulumi.getter def name(self) -> pulumi.Output[str]: return pulumi.get(self, "name") @property @pulumi.getter def remote(self) -> pulumi.Output[Optional[str]]: return pulumi.get(self, "remote") @property @pulumi.getter def target(self) -> pulumi.Output[Optional[str]]: return pulumi.get(self, "target")
36.537037
134
0.612772
1,106
9,865
5.22604
0.116637
0.093253
0.138062
0.125606
0.701903
0.677682
0.642215
0.621799
0.569896
0.550519
0
0.000139
0.271059
9,865
269
135
36.672862
0.803643
0.114242
0
0.738916
1
0
0.060021
0.003861
0
0
0
0
0
1
0.157635
false
0.004926
0.024631
0.073892
0.275862
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
cdc03a673508303ece1f5863b005a7e35ded2d5c
648
py
Python
queries/staff.py
CaladBlogBaal/Victorique
1574909ae2c70502a31e9380bec44e3a8c274ee9
[ "MIT" ]
null
null
null
queries/staff.py
CaladBlogBaal/Victorique
1574909ae2c70502a31e9380bec44e3a8c274ee9
[ "MIT" ]
null
null
null
queries/staff.py
CaladBlogBaal/Victorique
1574909ae2c70502a31e9380bec44e3a8c274ee9
[ "MIT" ]
null
null
null
def search_staff(): query = """ query ($id: Int, $search: String, $type: MediaType) { Media(search: $search, id: $id, type: $type) { id idMal type title { romaji english } staff { edges { node { primaryOccupations siteUrl image { large } name { full } } } } } } """ return query
20.903226
61
0.279321
35
648
5.142857
0.657143
0
0
0
0
0
0
0
0
0
0
0
0.649691
648
30
62
21.6
0.792952
0
0
0
0
0
0.913447
0
0
0
0
0
0
1
0.034483
false
0
0
0
0.068966
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
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
cdc056364f7bc004652a78bfc4dbc4ff486e11c7
2,446
py
Python
web/models.py
louis-xuy/scrapy_helper
14acdb8c23316cc1d83c2526ce024447cf60ccbf
[ "MIT" ]
89
2018-01-13T06:51:41.000Z
2021-12-27T05:52:46.000Z
web/models.py
louis-xuy/scrapy_helper
14acdb8c23316cc1d83c2526ce024447cf60ccbf
[ "MIT" ]
1
2022-03-02T15:04:10.000Z
2022-03-02T15:04:10.000Z
web/models.py
louis-xuy/scrapy_helper
14acdb8c23316cc1d83c2526ce024447cf60ccbf
[ "MIT" ]
37
2018-01-16T06:24:17.000Z
2021-12-27T05:52:54.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models from django.contrib.auth.models import User from web.template_engine import generate_crawl class Project(models.Model): PIPELINE_CHOICES = { "1": "JsonWriterPipeline", "2": "ImagesPipeline", "3": "MongoPipeline", "4": "CsvWriterPipeline", "5": "ElasticSearchPipeline" } RUN_STATUS = ( (0, u"构建中"), (1, u'初始化'), (2, u'运行'), (3, u'停止'), ) user = models.ForeignKey(User) name = models.CharField(max_length=200) alias = models.CharField(max_length=200) domain = models.TextField() start_urls = models.TextField() user_agents = models.TextField(default="Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0") pipelines = models.CharField(max_length=100) download_delay = models.IntegerField(default=3) image_urls = models.CharField(max_length=50, null=True, blank=True) images = models.CharField(max_length=50, null=True, blank=True) md5 = models.CharField(max_length=64, null=True, blank=True) status = models.IntegerField(choices=RUN_STATUS, default=0) is_public = models.BooleanField(default=False) is_delete = models.BooleanField(default=False) created = models.DateTimeField(auto_now_add=True) updated = models.DateTimeField(auto_now=True) @property def get_pipelines(self): return [self.PIPELINE_CHOICES[pipeline] for pipeline in self.pipelines.split(",")] class Rule(models.Model): project = models.ForeignKey(Project, null=True, blank=True) path = models.CharField(max_length=256) callback_func = models.CharField(max_length=50, verbose_name=u"回调", null=True, blank=True) created = models.DateTimeField(auto_now_add=True) updated = models.DateTimeField(auto_now=True) class Field(models.Model): rule = models.ForeignKey(Rule, null=True, blank=True) name = models.CharField(max_length=200) path = models.CharField(max_length=256) created = models.DateTimeField(auto_now_add=True) updated = models.DateTimeField(auto_now=True) def update_crawl_tmeplate(project): rule_fields = [] rules = Rule.objects.filter(project=project) for rule in rules: fields = Field.objects.filter(rule=rule) rule_fields.append({"rule": rule, "fields": fields}) generate_crawl(project, rule_fields)
32.613333
118
0.696239
311
2,446
5.33119
0.360129
0.09047
0.108565
0.144753
0.297949
0.265983
0.191194
0.191194
0.191194
0.139324
0
0.029397
0.179477
2,446
74
119
33.054054
0.796712
0.008585
0
0.178571
1
0.017857
0.075526
0.008667
0
0
0
0
0
1
0.035714
false
0
0.071429
0.017857
0.678571
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
cdcbfa1f87ab6ba2f25e3b1c7e03ecf44681101e
578
py
Python
src/OTLMOW/OTLModel/Classes/PTVerwerkingseenheid.py
davidvlaminck/OTLClassPython
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
[ "MIT" ]
2
2022-02-01T08:58:11.000Z
2022-02-08T13:35:17.000Z
src/OTLMOW/OTLModel/Classes/PTVerwerkingseenheid.py
davidvlaminck/OTLMOW
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
[ "MIT" ]
null
null
null
src/OTLMOW/OTLModel/Classes/PTVerwerkingseenheid.py
davidvlaminck/OTLMOW
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
[ "MIT" ]
null
null
null
# coding=utf-8 from OTLMOW.OTLModel.Classes.PTModuleMetFirmware import PTModuleMetFirmware # Generated with OTLClassCreator. To modify: extend, do not edit class PTVerwerkingseenheid(PTModuleMetFirmware): """Ook LS-kaart of Local Stationkaart genoemd, de centrale verwerkingseenheid die in verbinding staat met één of meerdere demodulatoren.""" typeURI = 'https://wegenenverkeer.data.vlaanderen.be/ns/onderdeel#PTVerwerkingseenheid' """De URI van het object volgens https://www.w3.org/2001/XMLSchema#anyURI.""" def __init__(self): super().__init__()
41.285714
143
0.768166
68
578
6.411765
0.897059
0
0
0
0
0
0
0
0
0
0
0.011976
0.133218
578
13
144
44.461538
0.858283
0.363322
0
0
1
0
0.264085
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.8
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
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
cddb8d7585d04d797877f267c1c96691d981d1b7
144
py
Python
atcoder/AtCoder_Beginner_Contest_155/abc155A.py
juseongkr/BOJ
8f10a2bf9a7d695455493fbe7423347a8b648416
[ "Apache-2.0" ]
7
2020-02-03T10:00:19.000Z
2021-11-16T11:03:57.000Z
atcoder/AtCoder_Beginner_Contest_155/abc155A.py
juseongkr/Algorithm-training
8f10a2bf9a7d695455493fbe7423347a8b648416
[ "Apache-2.0" ]
1
2021-01-03T06:58:24.000Z
2021-01-03T06:58:24.000Z
atcoder/AtCoder_Beginner_Contest_155/abc155A.py
juseongkr/Algorithm-training
8f10a2bf9a7d695455493fbe7423347a8b648416
[ "Apache-2.0" ]
1
2020-01-22T14:34:03.000Z
2020-01-22T14:34:03.000Z
a, b, c = map(int, input().split()) if (a == b and a != c) or (a ==c and a != b) or (b == c and b != a): print("Yes") else: print("No")
24
68
0.451389
30
144
2.166667
0.466667
0.092308
0
0
0
0
0
0
0
0
0
0
0.277778
144
5
69
28.8
0.625
0
0
0
0
0
0.034722
0
0
0
0
0
0
1
0
true
0
0
0
0
0.4
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
cdf740ad65fa93433a4949c1f50e21cfbd89e44c
2,836
py
Python
tests/test_template_cache.py
jg-rp/liquid
a2946d3ee7f8ac0c8db05f943ff8deb10bfad18c
[ "MIT" ]
19
2021-03-20T05:44:23.000Z
2022-03-24T18:34:34.000Z
tests/test_template_cache.py
jg-rp/liquid
a2946d3ee7f8ac0c8db05f943ff8deb10bfad18c
[ "MIT" ]
50
2020-12-07T15:30:56.000Z
2022-03-25T17:10:10.000Z
tests/test_template_cache.py
jg-rp/liquid
a2946d3ee7f8ac0c8db05f943ff8deb10bfad18c
[ "MIT" ]
3
2021-01-24T15:51:22.000Z
2022-03-25T16:00:17.000Z
"""Template cache test cases.""" # pylint: disable=missing-class-docstring import unittest from liquid.utils import LRUCache class TemplateCacheTestCase(unittest.TestCase): def setUp(self) -> None: self.cache = LRUCache(capacity=5) self.cache["foo"] = "bar" self.cache["some"] = "other" def test_copy(self): """Test that we can copy a cache.""" copy = self.cache.copy() self.assertEqual(self.cache.items(), copy.items()) copy["some"] = "different" self.assertNotEqual(self.cache.items(), copy.items()) def test_set_default(self): """Test that we can set a default value for cache keys.""" self.cache.setdefault("foo", "baz") self.assertEqual(self.cache["foo"], "bar") val = self.cache.setdefault("hello", "there") self.assertEqual(self.cache["hello"], val) def test_clear(self): """Test that we can clear all items from the cache.""" self.assertEqual(len(self.cache), 2) self.cache.clear() self.assertEqual(len(self.cache), 0) def test_contains(self): """Test that we can check for membership.""" self.assertEqual("foo" in self.cache, True) def test_delete(self): """Test that we can remove items from the cache.""" self.assertEqual(len(self.cache), 2) del self.cache["foo"] self.assertEqual("foo" in self.cache, False) self.assertEqual(len(self.cache), 1) def test_values(self): """Test that we can get a list of cache values.""" self.assertEqual(self.cache.values(), ["other", "bar"]) def test_keys(self): """Test that we can get a list of cache keys.""" self.assertEqual(self.cache.keys(), ["some", "foo"]) def test_reversed(self): """Test that we can get a list of cache keys, oldest first.""" self.assertEqual(list(reversed(self.cache)), ["foo", "some"]) def test_capacity(self): """Test that the cache does not exceed capacity.""" self.cache["a"] = 1 self.cache["b"] = 2 self.cache["c"] = 3 self.assertEqual(len(self.cache), 5) self.cache["d"] = 4 self.assertEqual(len(self.cache), 5) def test_priority(self): """Test that recently used items are not removed from the cache.""" self.cache["a"] = 1 self.cache["b"] = 2 self.cache["c"] = 3 self.assertEqual(len(self.cache), 5) self.assertEqual("foo" in self.cache, True) self.cache["d"] = 4 self.assertEqual("foo" in self.cache, False) self.assertEqual("some" in self.cache, True) self.cache["some"] = "updated" self.cache["e"] = 5 self.assertEqual("some" in self.cache, True) self.assertEqual("a" in self.cache, False)
33.364706
75
0.597673
377
2,836
4.466844
0.222812
0.208432
0.071259
0.066508
0.454869
0.353919
0.323634
0.286817
0.250594
0.192399
0
0.007992
0.25
2,836
84
76
33.761905
0.783733
0.189704
0
0.351852
0
0
0.05397
0
0
0
0
0
0.388889
1
0.203704
false
0
0.037037
0
0.259259
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
2
cdf8a6d7a5b7c0c87f8740884b85e1a79c1fa97e
220
py
Python
app/src/utils/serializer.py
Andrea-MariaDB/Flask-REST-Server-Repository
f5d1ceffeb3456b200b90e4f05d7430aa3f1eea4
[ "MIT" ]
5
2019-09-18T11:48:16.000Z
2021-11-09T11:24:12.000Z
app/src/utils/serializer.py
Andrea-MariaDB/Flask-REST-Server-Repository
f5d1ceffeb3456b200b90e4f05d7430aa3f1eea4
[ "MIT" ]
11
2019-09-13T07:14:25.000Z
2021-06-02T00:54:06.000Z
app/src/utils/serializer.py
Andrea-MariaDB/Flask-REST-Server-Repository
f5d1ceffeb3456b200b90e4f05d7430aa3f1eea4
[ "MIT" ]
3
2019-10-11T09:36:04.000Z
2019-12-20T10:17:32.000Z
""" Module to implement ping data objects """ from flask_restplus import Namespace class AppSerializer: """ Serializer for server """ ping_api = Namespace("ping", description="ping related operations")
18.333333
71
0.704545
24
220
6.375
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.195455
220
11
72
20
0.864407
0.268182
0
0
0
0
0.195652
0
0
0
0
0
0
1
0
false
0
0.333333
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
1
0
0
0
0
2
a80c629cf602f14c214953342442f48ea22e7574
56
py
Python
corehq/apps/domain/__init__.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
471
2015-01-10T02:55:01.000Z
2022-03-29T18:07:18.000Z
corehq/apps/domain/__init__.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
14,354
2015-01-01T07:38:23.000Z
2022-03-31T20:55:14.000Z
corehq/apps/domain/__init__.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
175
2015-01-06T07:16:47.000Z
2022-03-29T13:27:01.000Z
SHARED_DOMAIN = "<shared>" UNKNOWN_DOMAIN = "<unknown>"
18.666667
28
0.714286
6
56
6.333333
0.5
0
0
0
0
0
0
0
0
0
0
0
0.107143
56
2
29
28
0.76
0
0
0
0
0
0.303571
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
a8132d659a88836ca240832d295ed0c22b9f46e8
444
py
Python
day06/test_day06.py
lukasHD/adventOfCode2020
fa171f3ad8232a0542d544d3de9b2b9d8fdf8ccd
[ "MIT" ]
null
null
null
day06/test_day06.py
lukasHD/adventOfCode2020
fa171f3ad8232a0542d544d3de9b2b9d8fdf8ccd
[ "MIT" ]
null
null
null
day06/test_day06.py
lukasHD/adventOfCode2020
fa171f3ad8232a0542d544d3de9b2b9d8fdf8ccd
[ "MIT" ]
null
null
null
import day06 as day INPUTFOLDER = day.get_path() def test_part_1(): result = day.run_part_1(INPUTFOLDER+"/test1") assert result == 11 def test_part_1_real(): result = day.run_part_1(INPUTFOLDER+"/input1") assert result == 6551 def test_part_2(): result = day.run_part_2(INPUTFOLDER+"/test1") assert result == 6 def test_part_2_real(): result = day.run_part_2(INPUTFOLDER+"/input1") assert result == 3358
19.304348
50
0.686937
66
444
4.333333
0.333333
0.097902
0.153846
0.223776
0.41958
0.391608
0
0
0
0
0
0.069252
0.186937
444
22
51
20.181818
0.722992
0
0
0
0
0
0.058559
0
0
0
0
0
0.285714
1
0.285714
false
0
0.071429
0
0.357143
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
2
a819bd24daff42f1adb024d8cb709714339d0908
1,227
py
Python
lib/googlecloudsdk/command_lib/compute/os_config/declarative.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
lib/googlecloudsdk/command_lib/compute/os_config/declarative.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/command_lib/compute/os_config/declarative.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
# -*- coding: utf-8 -*- # # Copyright 2021 Google LLC. 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. """Hooks for declarative commands.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals def SetDefaultPageSizeRequestHook(default_page_size): """Create a modify_request_hook that applies default_page_size to args. Args: default_page_size: The page size to use when not specified by the user. Returns: A modify_request_hook that updates `args.page_size` when not set by user. """ def Hook(unused_ref, args, request): if not args.page_size: args.page_size = int(default_page_size) return request return Hook
34.083333
77
0.758761
183
1,227
4.923497
0.557377
0.071032
0.066593
0.035516
0.048835
0
0
0
0
0
0
0.008858
0.171964
1,227
35
78
35.057143
0.877953
0.700897
0
0
0
0
0
0
0
0
0
0
0
1
0.222222
false
0
0.333333
0
0.777778
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
0
0
0
2
a822ca9835e689e3c9c45d87c61097be83c11776
3,044
py
Python
yargy/token.py
xepozz/yargy
8ce746c00b2053e2ba117b3367ee914b87eba53b
[ "MIT" ]
250
2017-09-19T14:07:45.000Z
2022-03-31T16:08:52.000Z
yargy/token.py
xepozz/yargy
8ce746c00b2053e2ba117b3367ee914b87eba53b
[ "MIT" ]
56
2017-09-07T12:23:08.000Z
2022-01-25T08:53:09.000Z
yargy/token.py
xepozz/yargy
8ce746c00b2053e2ba117b3367ee914b87eba53b
[ "MIT" ]
38
2017-10-15T19:43:56.000Z
2022-01-25T08:30:53.000Z
from .record import Record from .span import Span class Token(Record): __attributes__ = ['value', 'span', 'type'] def __init__(self, value, span, type): self.value = value self.span = span self.type = type @property def normalized(self): return self.value.lower() def morphed(self, forms): return MorphToken( self.value, self.span, self.type, forms ) def tagged(self, tag): return TagToken( self.value, self.span, self.type, tag ) def is_token(item): return isinstance(item, Token) class MorphToken(Token): __attributes__ = ['value', 'span', 'type', 'forms'] def __init__(self, value, span, type, forms): Token.__init__(self, value, span, type) self.forms = forms @property def normalized(self): form = self.forms[0] return form.normalized def tagged(self, tag): return MorphTagToken( self.value, self.span, self.type, tag, self.forms ) def constrained(self, forms): return MorphToken( self.value, self.span, self.type, forms ) def is_morph_token(item): return isinstance(item, MorphToken) class TagToken(Token): __attributes__ = ['value', 'span', 'type', 'tag'] def __init__(self, value, span, type, tag): Token.__init__(self, value, span, type) self.tag = tag def is_tag_token(item): return isinstance(item, TagToken) class MorphTagToken(MorphToken, TagToken): __attributes__ = ['value', 'span', 'type', 'tag', 'forms'] def __init__(self, value, span, type, tag, forms): Token.__init__(self, value, span, type) self.tag = tag self.forms = forms def constrained(self, forms): return MorphTagToken( self.value, self.span, self.type, self.tag, forms ) def format_tokens(tokens): previous = None for token in tokens: if previous: _, stop = previous.span start, _ = token.span if start - stop > 0: yield ' ' previous = token yield token.value def join_tokens(tokens): return ''.join(format_tokens(tokens)) def normalize_token(token): return Token( token.normalized, token.span, token.type ) def join_normalized_tokens(tokens): return join_tokens( normalize_token(_) for _ in tokens ) def inflect_token(token, grams): if is_morph_token(token): form = token.forms[0] value = form.inflect(grams) else: value = token.normalized return Token( value, token.span, token.type ) def join_inflected_tokens(tokens, grams): return join_tokens( inflect_token(_, grams) for _ in tokens ) def get_tokens_span(tokens): head, tail = tokens[0], tokens[-1] return Span(head.span.start, tail.span.stop)
20.993103
62
0.583771
347
3,044
4.913545
0.144092
0.0739
0.083871
0.069795
0.449853
0.328446
0.255132
0.185337
0.110264
0.068035
0
0.002376
0.308804
3,044
144
63
21.138889
0.807985
0
0
0.346154
0
0
0.022675
0
0
0
0
0
0
1
0.201923
false
0
0.019231
0.125
0.451923
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
a835bedca45ce94c3ea2e9daababc392f0792267
12,985
py
Python
public/content_emailer_master_py.py
erood/content_emailer
6a6717e7ed9dcd94ce87470ff70474cc126b45e1
[ "MIT" ]
1
2021-02-15T19:25:43.000Z
2021-02-15T19:25:43.000Z
public/content_emailer_master_py.py
erood/content_emailer
6a6717e7ed9dcd94ce87470ff70474cc126b45e1
[ "MIT" ]
null
null
null
public/content_emailer_master_py.py
erood/content_emailer
6a6717e7ed9dcd94ce87470ff70474cc126b45e1
[ "MIT" ]
null
null
null
#important command line function to get mongo uri -- # heroku config --app sheltered-ocean-45405 | grep MONGODB_URI #where you literally type in MONGODB_URI, generates code like such: mongodb://heroku_xph57032:sb1vurrej7o36g0jumoh534qpr@ds141108.mlab.com:41108/heroku_xph57032 #the code is then fed into the client import pymongo import pandas as pd import pprint import numpy as np import csv, sys import praw import operator import datetime #set up praw reddit = praw.Reddit(client_id='D7tXhzmCZKD1Ig', client_secret='a8Cs1yp7GUakwc-Hzkd1twMRRcU', user_agent='Script for top domains posted on reddit') from pymongo import MongoClient client = MongoClient() client = MongoClient('mongodb://heroku_c6w3t5x5:k6orit3e4osatg7m04senkq3vn@ds163918.mlab.com:63918/heroku_c6w3t5x5') db = client['heroku_c6w3t5x5'] users = db.users users = pd.DataFrame(list(users.find())) users.head() ################################################################################################ def SendEmail(to_email): #gmail style docs: https://developers.google.com/gmail/design/css#example import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from_address = "erood20@gmail.com" to_address = to_email # Create message container - the correct MIME type is multipart/alternative. msg = MIMEMultipart('alternative') now = datetime.datetime.now() subject_date = now.strftime("%m-%d-%Y") msg['Subject'] = "Storyrake Summary - "+subject_date msg['From'] = from_address msg['To'] = to_address # Create the body of the message (a plain-text and an HTML version). html = """\ <html> <head> <style> .colored { font-size:16px; color:#4f4c52; } .footer { font-size:14px; font-color: #777; } .reddit_table { border-spacing: 25px; font-size:16px; padding-left:0px; } .subreddit_row { font-weight:bold; font-size:20px; color:#341f97; } .highlight{ border: 2px solid #f99854; border-radius: 3px; padding: 4px; } .container{ padding-left:10px; } .col-md-8{ width:85%; } .link{ width:65% !important; } .score_date{ width:10% !important; } .reddit_table { color: #4f4c52; } </style> </head> <div class="container"> <body> <p class='colored'>Hi,<br> <br> Below is your Reddit summary: </p> """ html +=\ """ <div class="col-md-8"> <table class="reddit_table"> """ for index, row in df_final.iterrows(): if index % 5 == 0: #html += ("<br>") html += (("<tr class='subreddit_row'><td><span class='highlight'>%s</span></td></tr>" %(row['subreddit'] ))) #html += ("<thead class='row_title'><td>Link</td><td>Score</td><td>Date</td></thead>") else: pass html += ("<tr><td class='link'><a href=%s>%s</a></td><td class='score_date'>%s</td><td class='score_date'>%s</td></tr>" %(row['url'],row['title'], row['score']+' pts', row['time'])) html+=\ """ </table> <hr> </div> <p class='footer'> <i>To add/remove subreddits, change your preferred frequency, or unsubscribe <a href=www.storyrake.com>click here</a><i>. </p> </div> """ # Record the MIME types of both parts - text/plain and text/html. part2 = MIMEText(html, 'html') # Attach parts into message container. # According to RFC 2046, the last part of a multipart message, in this case # the HTML message, is best and preferred. msg.attach(part2) # Credentials (if needed) #username = 'erood20@gmail.com' #password = 'uoyuktglpyvxqycv' username = 'storyrake@gmail.com' password = 'zgatluyspdmsakag' # The actual mail send server = smtplib.SMTP('smtp.gmail.com', 587) server.ehlo() server.starttls() server.login(username,password) server.sendmail(from_address, to_address, msg.as_string()) server.quit() #MAIN for index, row in users.iterrows(): if row['frequency'] == 'Daily': #variables praw_freq = 'day' to_email = row['email'] s_list = row['subreddits'] s_list = s_list.split(",") ### Crawl reddit, clean output ### #dictionaries domains_sub = {} domains_score = {} domains_title = {} domains_time = {} #loop through list of subreddits for i in s_list: #--Pull in score for given submission id--# subreddit = reddit.subreddit(i) submissions = subreddit.top(praw_freq, limit=5) #sum score across submissions for s in submissions: if s.id in domains_score.keys(): domains_score[s.id] += s.score else: domains_score[s.id] = s.score df_score = pd.DataFrame.from_dict(domains_score, orient='index').reset_index() df_score.columns = ['id','score'] #--Grab subreddit for given submission ID--# subreddit = reddit.subreddit(i) submissions = subreddit.top(praw_freq, limit=5) for s in submissions: if s.id in domains_sub.keys(): #(1) works for generating total score: domains_sub[s.id] = s.subreddit.display_name else: #(2) #works for generating total score: domains_sub[s.id] = s.subreddit.display_name #--Grab title for given submission ID--# subreddit = reddit.subreddit(i) submissions = subreddit.top(praw_freq, limit=5) for s in submissions: if s.id in domains_title.keys(): #(1) works for generating total score: domains_title[s.id] = s.title else: #(2) #works for generating total score: domains_title[s.id] = s.title #--Grab time for given submission ID--# subreddit = reddit.subreddit(i) submissions = subreddit.top(praw_freq, limit=50) for s in submissions: if s.id in domains_time.keys(): #(1) works for generating total score: domains_time[s.id] = datetime.datetime.fromtimestamp(s.created).date() #datetime.datetime.fromtimestamp(s.created) else: #(2) #works for generating total score: domains_time[s.id] = datetime.datetime.fromtimestamp(s.created).date() df_subreddit = pd.DataFrame.from_dict(domains_sub, orient='index').reset_index() df_subreddit.columns = ['id','subreddit'] df_title = pd.DataFrame.from_dict(domains_title, orient='index').reset_index() df_title.columns = ['id','title'] df_time = pd.DataFrame.from_dict(domains_time, orient='index').reset_index() df_time.columns = ['id','time'] #merge the three tables together, using submission ID as primary key df_sub_score = df_subreddit.merge(df_score, how='left', on="id") df_title_score_sub = df_sub_score.merge(df_title, how='left', on='id') df_final = df_title_score_sub.merge(df_time, how='left', on='id') # Add in submission URL using the 'id' df_final['url'] = ['www.reddit.com/']+df_final['id'].astype(str) #sort by highest score df_final = df_final.sort_values(['subreddit', 'score'], ascending=[True, False]) #chop down to just subreddit, score, time, url df_final = df_final[['subreddit','score','time','url','title']] #only keep top X for given subreddit df_final = df_final.groupby('subreddit').head(5) #clean index to loop through 1 subreddit per 5 posts df_final = df_final.reset_index() df_final.drop(['index'], axis = 1, inplace = True) #store score as string so can label with points df_final['score'] = df_final['score'].astype(str) ### Send email ### SendEmail(to_email) elif row['frequency'] == 'Weekly' and datetime.datetime.today().weekday() == 3: #variables praw_freq = 'week' to_email = row['email'] s_list = row['subreddits'] s_list = s_list.split(",") ### Crawl reddit, clean output ### #dictionaries domains_sub = {} domains_score = {} domains_title = {} domains_time = {} #loop through list of subreddits for i in s_list: #--Pull in score for given submission id--# subreddit = reddit.subreddit(i) submissions = subreddit.top(praw_freq, limit=5) #sum score across submissions for s in submissions: if s.id in domains_score.keys(): domains_score[s.id] += s.score else: domains_score[s.id] = s.score df_score = pd.DataFrame.from_dict(domains_score, orient='index').reset_index() df_score.columns = ['id','score'] #--Grab subreddit for given submission ID--# subreddit = reddit.subreddit(i) submissions = subreddit.top(praw_freq, limit=5) for s in submissions: if s.id in domains_sub.keys(): #(1) works for generating total score: domains_sub[s.id] = s.subreddit.display_name else: #(2) #works for generating total score: domains_sub[s.id] = s.subreddit.display_name #--Grab title for given submission ID--# subreddit = reddit.subreddit(i) submissions = subreddit.top(praw_freq, limit=5) for s in submissions: if s.id in domains_title.keys(): #(1) works for generating total score: domains_title[s.id] = s.title else: #(2) #works for generating total score: domains_title[s.id] = s.title #--Grab time for given submission ID--# subreddit = reddit.subreddit(i) submissions = subreddit.top(praw_freq, limit=50) for s in submissions: if s.id in domains_time.keys(): #(1) works for generating total score: domains_time[s.id] = datetime.datetime.fromtimestamp(s.created).date() #datetime.datetime.fromtimestamp(s.created) else: #(2) #works for generating total score: domains_time[s.id] = datetime.datetime.fromtimestamp(s.created).date() df_subreddit = pd.DataFrame.from_dict(domains_sub, orient='index').reset_index() df_subreddit.columns = ['id','subreddit'] df_title = pd.DataFrame.from_dict(domains_title, orient='index').reset_index() df_title.columns = ['id','title'] df_time = pd.DataFrame.from_dict(domains_time, orient='index').reset_index() df_time.columns = ['id','time'] #merge the three tables together, using submission ID as primary key df_sub_score = df_subreddit.merge(df_score, how='left', on="id") df_title_score_sub = df_sub_score.merge(df_title, how='left', on='id') df_final = df_title_score_sub.merge(df_time, how='left', on='id') # Add in submission URL using the 'id' df_final['url'] = ['www.reddit.com/']+df_final['id'].astype(str) #sort by highest score df_final = df_final.sort_values(['subreddit', 'score'], ascending=[True, False]) #chop down to just subreddit, score, time, url df_final = df_final[['subreddit','score','time','url','title']] #only keep top X for given subreddit df_final = df_final.groupby('subreddit').head(5) #clean index to loop through 1 subreddit per 5 posts df_final = df_final.reset_index() df_final.drop(['index'], axis = 1, inplace = True) #store score as string so can label with points df_final['score'] = df_final['score'].astype(str) ### Send email ### SendEmail(to_email) else: pass
31.904177
189
0.555795
1,511
12,985
4.651224
0.203839
0.028884
0.00683
0.039271
0.631474
0.631474
0.631474
0.625783
0.625783
0.625783
0
0.018221
0.319523
12,985
406
190
31.982759
0.777162
0.206469
0
0.564815
1
0.009259
0.202261
0.029738
0
0
0
0
0
1
0.00463
false
0.018519
0.064815
0
0.069444
0.00463
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
a8379714fea84626c6bb026d68e146f5cc555c3e
200
py
Python
search-a-2d-matrix/search-a-2d-matrix.py
Atri10/Leet-code---Atri_Patel
49fc59b9147a44ab04a66128fbb2ef259b5f7b7c
[ "MIT" ]
1
2021-10-10T20:21:18.000Z
2021-10-10T20:21:18.000Z
search-a-2d-matrix/search-a-2d-matrix.py
Atri10/Leet-code---Atri_Patel
49fc59b9147a44ab04a66128fbb2ef259b5f7b7c
[ "MIT" ]
null
null
null
search-a-2d-matrix/search-a-2d-matrix.py
Atri10/Leet-code---Atri_Patel
49fc59b9147a44ab04a66128fbb2ef259b5f7b7c
[ "MIT" ]
null
null
null
class Solution: def searchMatrix(self, matrix: List[List[int]], target: int) -> bool: for i in matrix: for j in i: if j==target:return True return False
33.333333
73
0.555
27
200
4.111111
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.35
200
6
74
33.333333
0.853846
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
b51c36dd2cbaefd53a9c69bfc36466645473418b
1,449
py
Python
yaml2jupyterhub/helm_setup.py
Quansight-Labs/yaml2jupyterhub
e0e189b7da1d41e1378a4e7d6a9920496d0b68e5
[ "MIT" ]
null
null
null
yaml2jupyterhub/helm_setup.py
Quansight-Labs/yaml2jupyterhub
e0e189b7da1d41e1378a4e7d6a9920496d0b68e5
[ "MIT" ]
null
null
null
yaml2jupyterhub/helm_setup.py
Quansight-Labs/yaml2jupyterhub
e0e189b7da1d41e1378a4e7d6a9920496d0b68e5
[ "MIT" ]
1
2020-04-24T15:58:52.000Z
2020-04-24T15:58:52.000Z
import shlex from collections import OrderedDict def helm_setup_steps(config): helm_setup = OrderedDict() # 1. Create service account for helm helm_service_account = """ kubectl --namespace kube-system \ create serviceaccount tiller """ helm_setup["helm_service_account"] = shlex.split(helm_service_account) # 2. Give helm full permissions to manage cluster helm_permissions = """ kubectl create clusterrolebinding tiller \ --clusterrole cluster-admin \ --serviceaccount=kube-system:tiller """ helm_setup["helm_permissions"] = shlex.split(helm_permissions) # 3. Initialize helm on the server helm_initialize = "helm init --service-account tiller --wait" helm_setup["helm_initialize"] = shlex.split(helm_initialize) # 4. Secure tiller secure_tiller = """ kubectl patch deployment tiller-deploy \ --namespace=kube-system \ --type=json \ --patch='[{"op": "add", "path": "/spec/template/spec/containers/0/command", "value": ["/tiller", "--listen=localhost:44134"]}]' """ helm_setup["secure_tiller"] = shlex.split(secure_tiller) # 5. Wait for tiller to start helm_setup["wait_tiller_online"] = ["sleep", config["helm_startup_wait"]] return helm_setup.items() def setup_helm(config, env): for name, cmd in helm_setup_steps(config): # TODO: Run subprocess.run(cmd) here...
31.5
139
0.663906
168
1,449
5.541667
0.434524
0.087003
0.058002
0.042965
0
0
0
0
0
0
0
0.009658
0.213941
1,449
45
140
32.2
0.807726
0.136646
0
0.107143
0
0.035714
0.502412
0.105305
0
0
0
0.022222
0
0
null
null
0
0.071429
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
1
0
1
0
0
0
0
0
0
0
0
2
b5602e180d405a22bcc72938c460a611ca1f6537
157
py
Python
LISTS1/TASK2.py
MakarFadeev/PythonTasks
2ae18c3c6a50808f985966d3304a6af6824ce686
[ "Apache-2.0" ]
2
2020-11-13T05:59:45.000Z
2020-11-29T09:26:20.000Z
LIST1/TASK2.py
MakarFadeev/PythonTasks
2ae18c3c6a50808f985966d3304a6af6824ce686
[ "Apache-2.0" ]
1
2020-10-29T18:14:10.000Z
2020-10-29T18:14:10.000Z
LISTS1/TASK2.py
MakarFadeev/PythonTasks
2ae18c3c6a50808f985966d3304a6af6824ce686
[ "Apache-2.0" ]
null
null
null
print('Введите меню (через пробелы)') menu = input().split(' ') string = 'test0' for string in menu: if(string[0].isupper() == True): print(string)
22.428571
37
0.630573
21
157
4.714286
0.761905
0
0
0
0
0
0
0
0
0
0
0.015504
0.178344
157
6
38
26.166667
0.751938
0
0
0
0
0
0.216561
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
b564f07598da5fbf9a8eb455abf73171fdffe02d
350
py
Python
lib/prefs.py
Taremin/TareminPoseChecker
e6a44e72a11649f04648a8fc84e23786b418118d
[ "MIT" ]
null
null
null
lib/prefs.py
Taremin/TareminPoseChecker
e6a44e72a11649f04648a8fc84e23786b418118d
[ "MIT" ]
null
null
null
lib/prefs.py
Taremin/TareminPoseChecker
e6a44e72a11649f04648a8fc84e23786b418118d
[ "MIT" ]
null
null
null
import bpy from . import util class TareminPoseCheckerPreferences(bpy.types.AddonPreferences): bl_idname = util.get_addon_name() is_debug: bpy.props.BoolProperty( name="Debug mode", # TODO default=False, ) def draw(self, context): layout = self.layout layout.prop(self, "is_debug")
21.875
65
0.631429
39
350
5.538462
0.692308
0.064815
0
0
0
0
0
0
0
0
0
0
0.271429
350
15
66
23.333333
0.847059
0.011429
0
0
0
0
0.054711
0
0
0
0
0.066667
0
1
0.090909
false
0
0.181818
0
0.545455
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
1
0
0
2
b572818da4272ffbacddeb8ba901760438830df1
5,568
py
Python
source_code/hsic.py
ksatriow/HSIC
da71fcdbc90a90e2d81114983044c9cdf1c18e68
[ "Apache-2.0" ]
2
2021-05-18T00:55:29.000Z
2021-05-23T11:27:08.000Z
source_code/hsic.py
ksatriow/HSIC
da71fcdbc90a90e2d81114983044c9cdf1c18e68
[ "Apache-2.0" ]
null
null
null
source_code/hsic.py
ksatriow/HSIC
da71fcdbc90a90e2d81114983044c9cdf1c18e68
[ "Apache-2.0" ]
1
2021-05-18T00:55:50.000Z
2021-05-18T00:55:50.000Z
# -*- coding: utf-8 -*- """ML-Intermediate-Final Submission.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1TZWj9C9lAJqyR8YQsYq6w7FX5r5Yr0Nk """ import tensorflow as tf import pandas as pd import numpy as np from tensorflow import feature_column from tensorflow.keras import layers from tensorflow.keras.optimizers import RMSprop from tensorflow.keras.preprocessing.image import ImageDataGenerator from sklearn.model_selection import train_test_split from keras.utils import np_utils import matplotlib.pyplot as plt import keras import cv2 import os import glob import platform print('Python version:', platform.python_version()) print('Tensorflow version:', tf.__version__) print('Keras version:', tf.keras.__version__) from google.colab import drive drive.mount('/content/gdrive') !ls /content/gdrive/'My Drive'/dataset/ !unzip "/content/gdrive/My Drive/dataset/nfruits.zip" !ls print(os.listdir("../content/fruits-360")) img=glob.glob(("../content/fruits-360/Training/*")) for i in img: print(i) training_fruit_img = [] training_label = [] for dir_path in glob.glob("../content/fruits-360/Training/*"): img_label = dir_path.split("/")[-1] for image_path in glob.glob(os.path.join(dir_path,"*.jpg")): image = cv2.imread(image_path,cv2.IMREAD_COLOR) image = cv2.resize(image, (64, 64)) image = cv2.cvtColor(image, cv2.COLOR_RGB2BGR) training_fruit_img.append(image) training_label.append(img_label) training_fruit_img = np.array(training_fruit_img) training_label = np.array(training_label) len(np.unique(training_label)) label_to_id = {v:k for k,v in enumerate(np.unique(training_label)) } id_to_label = {v:k for k,v in label_to_id.items() } print(id_to_label) print(len(training_label)) training_label_id = np.array([label_to_id[i] for i in training_label]) training_label_id training_fruit_img.shape,training_label_id.shape validation_fruit_img=[] validation_label =[] for dir_path in glob.glob("../content/fruits-360/Test/*"): img_label = dir_path.split("/")[-1] for image_path in glob.glob(os.path.join(dir_path,"*.jpg")): image = cv2.imread(image_path,cv2.IMREAD_COLOR) image = cv2.resize(image, (64, 64)) image = cv2.cvtColor(image, cv2.COLOR_RGB2BGR) validation_fruit_img.append(image) validation_label.append(img_label) validation_fruit_img = np.array(validation_fruit_img) validation_label = np.array(validation_label) len(np.unique(validation_label)) validation_label_id = np.array([label_to_id[i] for i in validation_label]) validation_fruit_img.shape,validation_label_id.shape X_train,X_test = training_fruit_img,validation_fruit_img Y_train,Y_test =training_label_id,validation_label_id X_train = X_train/255 X_test = X_test/255 X_flat_train = X_train.reshape(X_train.shape[0],64*64*3) X_flat_test = X_test.reshape(X_test.shape[0],64*64*3) #One Hot Encode the Output Y_train = keras.utils.to_categorical(Y_train, 120) Y_test = keras.utils.to_categorical(Y_test, 120) print('Original Sizes:', X_train.shape, X_test.shape, Y_train.shape, Y_test.shape) print('Flattened:', X_flat_train.shape, X_flat_test.shape) print(X_train[1200].shape) plt.imshow(X_train[1200]) plt.show() from keras.models import Sequential,Model from keras.layers import Dense,Dropout,Conv2D,MaxPooling2D,Flatten,Activation,BatchNormalization from keras.optimizers import Adamax from keras.layers.advanced_activations import LeakyReLU from keras import backend as K model = Sequential() model.add(Conv2D(16,(5,5),input_shape=(64,64,3),padding='same')) model.add(LeakyReLU(0.5)) model.add(BatchNormalization()) model.add(MaxPooling2D(pool_size=(2,2))) model.add(Conv2D(32,(5,5),padding='same')) model.add(LeakyReLU(0.5)) model.add(BatchNormalization()) model.add(MaxPooling2D(pool_size=(2,2))) model.add(Dropout(0.25)) model.add(Conv2D(64,(5,5),padding='same')) model.add(LeakyReLU(0.5)) model.add(BatchNormalization()) model.add(MaxPooling2D(pool_size=(2,2))) model.add(Conv2D(128,(5,5),padding='same')) model.add(LeakyReLU(0.5)) model.add(BatchNormalization()) model.add(MaxPooling2D(pool_size=(2,2))) model.add(Flatten()) model.add(Dense(256,activation='relu')) #model.add(LeakyReLU(0.1)) model.add(Dropout(0.5)) model.add(Dense(120)) model.add(Activation("softmax")) model.summary() class myCallback(tf.keras.callbacks.Callback): def on_epoch_end(self, epoch, logs={}): if(logs.get('accuracy')>0.97): print("\nAkurasi telah mencapai >90%!") self.model.stop_training = True callbacks = myCallback() model.compile(loss='categorical_crossentropy', optimizer = Adamax(), metrics=['accuracy']) history = model.fit(X_train, Y_train, batch_size=128, epochs=12, verbose=1, callbacks=[callbacks], validation_data = (X_test,Y_test) ) plt.plot(history.history['accuracy']) plt.plot(history.history['val_accuracy']) plt.title('model accuracy') plt.ylabel('accuracy') plt.xlabel('epoch') plt.legend(['train', 'val'], loc='upper left') plt.show() plt.plot(history.history['loss']) plt.plot(history.history['val_loss']) plt.title('model loss') plt.ylabel('loss') plt.xlabel('epoch') plt.legend(['train', 'val'], loc='upper left') plt.show() # Konversi model. converter = tf.lite.TFLiteConverter.from_keras_model(model) tflite_model = converter.convert() with tf.io.gfile.GFile('model.tflite', 'wb') as f: f.write(tflite_model)
29.151832
96
0.735991
830
5,568
4.756627
0.244578
0.046606
0.024316
0.022796
0.341185
0.256332
0.241641
0.241641
0.241641
0.241641
0
0.030402
0.119792
5,568
191
97
29.151832
0.775148
0
0
0.208633
1
0
0.09275
0.030664
0
0
0
0
0
0
null
null
0
0.151079
null
null
0.079137
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
b58ec551cddb8ef27792b6c6decb54e268bf9353
3,938
py
Python
falcon-monit-scripts/redis/redis-monitor.py
HelloTalk/web_install
7b09668704c068a6b01650b816f32ef749513e39
[ "MIT" ]
6
2016-03-23T10:09:31.000Z
2019-09-16T10:08:26.000Z
falcon-monit-scripts/redis/redis-monitor.py
HelloTalk/web_install
7b09668704c068a6b01650b816f32ef749513e39
[ "MIT" ]
null
null
null
falcon-monit-scripts/redis/redis-monitor.py
HelloTalk/web_install
7b09668704c068a6b01650b816f32ef749513e39
[ "MIT" ]
7
2016-03-24T02:15:39.000Z
2019-12-10T09:44:02.000Z
#!/bin/env python #-*- coding:utf-8 -*- __author__ = 'iambocai' import json import time import socket import os import re import sys import commands import urllib2, base64 class RedisStats: # 如果你是自己编译部署到redis,请将下面的值替换为你到redis-cli路径 _redis_cli = '/usr/local/redis/redis-cli' _stat_regex = re.compile(ur'(\w+):([0-9]+\.?[0-9]*)\r') def __init__(self, port='6379', passwd=None, host='127.0.0.1'): self._cmd = '%s -h %s -p %s info' % (self._redis_cli, host, port) if passwd not in ['', None]: self._cmd = '%s -h %s -p %s -a %s info' % (self._redis_cli, host, port, passwd) def stats(self): ' Return a dict containing redis stats ' info = commands.getoutput(self._cmd) return dict(self._stat_regex.findall(info)) def main(): ip = socket.gethostname() timestamp = int(time.time()) step = 60 # inst_list中保存了redis配置文件列表,程序将从这些配置中读取port和password,建议使用动态发现的方法获得,如: # inst_list = [ i for i in commands.getoutput("find /etc/ -name 'redis*.conf'" ).split('\n') ] insts_list = [ '/usr/local/redis/redis.conf' ] p = [] print("endpotin=",ip) monit_keys = [ ('connected_clients','GAUGE'), ('blocked_clients','GAUGE'), ('used_memory','GAUGE'), ('used_memory_rss','GAUGE'), ('mem_fragmentation_ratio','GAUGE'), ('total_commands_processed','COUNTER'), ('rejected_connections','COUNTER'), ('expired_keys','COUNTER'), ('evicted_keys','COUNTER'), ('keyspace_hits','COUNTER'), ('keyspace_misses','COUNTER'), ('keyspace_hit_ratio','GAUGE'), ] for inst in insts_list: port = commands.getoutput("sed -n 's/^port *\([0-9]\{4,5\}\)/\\1/p' %s" % inst) passwd = commands.getoutput("sed -n 's/^requirepass *\([^ ]*\)/\\1/p' %s" % inst) metric = "redis" endpoint = ip tags = 'port=%s' % port try: conn = RedisStats(port, passwd) stats = conn.stats() except Exception,e: continue for key,vtype in monit_keys: #一些老版本的redis中info输出的信息很少,如果缺少一些我们需要采集的key就跳过 if key not in stats.keys(): continue #计算命中率 if key == 'keyspace_hit_ratio': try: value = float(stats['keyspace_hits'])/(int(stats['keyspace_hits']) + int(stats['keyspace_misses'])) except ZeroDivisionError: value = 0 #碎片率是浮点数 elif key == 'mem_fragmentation_ratio': value = float(stats[key]) else: #其他的都采集成counter,int try: value = int(stats[key]) except: continue i = { 'Metric': '%s.%s' % (metric, key), 'Endpoint': endpoint, 'Timestamp': timestamp, 'Step': step, 'Value': value, 'CounterType': vtype, 'TAGS': tags } p.append(i) print json.dumps(p, sort_keys=True,indent=4) method = "POST" handler = urllib2.HTTPHandler() opener = urllib2.build_opener(handler) url = 'http://127.0.0.1:1988/v1/push' request = urllib2.Request(url, data=json.dumps(p) ) request.add_header("Content-Type",'application/json') request.get_method = lambda: method try: connection = opener.open(request) except urllib2.HTTPError,e: connection = e # check. Substitute with appropriate HTTP code. if connection.code == 200: print connection.read() else: print '{"err":1,"msg":"%s"}' % connection if __name__ == '__main__': proc = commands.getoutput(' ps -ef|grep %s|grep -v grep|wc -l ' % os.path.basename(sys.argv[0])) sys.stdout.flush() if int(proc) < 5: main()
32.01626
119
0.544693
438
3,938
4.755708
0.415525
0.040807
0.012482
0.017283
0.081613
0.06049
0.035046
0
0
0
0
0.017929
0.305993
3,938
122
120
32.278689
0.744237
0.090401
0
0.091837
0
0.010204
0.227604
0.048152
0
0
0
0
0
0
null
null
0.05102
0.081633
null
null
0.040816
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
b58fa3f4e3f0a5045209fa8a50dd789c9600b917
248
py
Python
Python3/Projetos/script.py
cauabeisola/Projetos-e-afins
61492014393e4bc7506ba1490d3790778af1ab4a
[ "MIT" ]
1
2021-11-25T23:30:28.000Z
2021-11-25T23:30:28.000Z
Python3/Projetos/script.py
cauabeisola/Projetos-e-afins
61492014393e4bc7506ba1490d3790778af1ab4a
[ "MIT" ]
null
null
null
Python3/Projetos/script.py
cauabeisola/Projetos-e-afins
61492014393e4bc7506ba1490d3790778af1ab4a
[ "MIT" ]
null
null
null
import pyautogui from time import sleep f = open("../msc/script.txt", 'r') pyautogui.press("win") sleep(1) pyautogui.typewrite('powershell') pyautogui.press("enter") sleep(2) for word in f: pyautogui.typewrite(word) pyautogui.press("enter")
22.545455
34
0.721774
35
248
5.114286
0.6
0.234637
0.212291
0
0
0
0
0
0
0
0
0.009091
0.112903
248
11
35
22.545455
0.804545
0
0
0.181818
0
0
0.164659
0
0
0
0
0
0
1
0
false
0
0.181818
0
0.181818
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
b5929a65fffcd7482d5f565eae50962c16b7d18e
4,760
py
Python
ios_sdk/bin/ios/Gen4SDK.framework/Headers/inc/m2m2/master_definitions/common_application_interface.py
analogdevicesinc/ApplicationsWaveTool
0c1f236dd0745caa3187841ee1a882f209ac3ebe
[ "Apache-2.0" ]
2
2019-03-11T15:24:51.000Z
2022-03-07T09:42:05.000Z
M4_Eval_SDK/Source/inc/m2m2/master_definitions/common_application_interface.py
analogdevicesinc/ApplicationsWaveTool
0c1f236dd0745caa3187841ee1a882f209ac3ebe
[ "Apache-2.0" ]
null
null
null
M4_Eval_SDK/Source/inc/m2m2/master_definitions/common_application_interface.py
analogdevicesinc/ApplicationsWaveTool
0c1f236dd0745caa3187841ee1a882f209ac3ebe
[ "Apache-2.0" ]
1
2021-03-16T08:26:05.000Z
2021-03-16T08:26:05.000Z
#!/usr/bin/env python3 from ctypes import * import m2m2_core M2M2_APP_COMMON_STATUS_ENUM_t = { "type":c_uint8, "enum_values": [ ("M2M2_APP_COMMON_STATUS_OK", 0x00), ("M2M2_APP_COMMON_STATUS_ERROR", 0x01), ("M2M2_APP_COMMON_STATUS_STREAM_STARTED", 0x02), ("M2M2_APP_COMMON_STATUS_STREAM_STOPPED", 0x03), ("M2M2_APP_COMMON_STATUS_STREAM_IN_PROGRESS", 0x04), ("M2M2_APP_COMMON_STATUS_STREAM_DEACTIVATED", 0x05), ("M2M2_APP_COMMON_STATUS_STREAM_COUNT_DECREMENT", 0x06), ("M2M2_APP_COMMON_STATUS_STREAM_NOT_STARTED", 0x07), ("M2M2_APP_COMMON_STATUS_STREAM_NOT_STOPPED", 0x08), ("M2M2_APP_COMMON_STATUS_SUBSCRIBER_ADDED", 0x09), ("M2M2_APP_COMMON_STATUS_SUBSCRIBER_REMOVED", 0x0A), ("M2M2_APP_COMMON_STATUS_SUBSCRIBER_COUNT_DECREMENT", 0x0B), ("__M2M2_APP_COMMON_STATUS_HIGHEST", 0x20), ] } M2M2_APP_COMMON_CMD_ENUM_t = { "type":c_uint8, "enum_values": [ ("M2M2_APP_COMMON_CMD_GET_VERSION_REQ", 0x00), ("M2M2_APP_COMMON_CMD_GET_VERSION_RESP", 0x01), ("M2M2_APP_COMMON_CMD_GET_STATUS_REQ", 0x02), ("M2M2_APP_COMMON_CMD_GET_STATUS_RESP", 0x03), ("M2M2_APP_COMMON_CMD_STREAM_START_REQ", 0x04), ("M2M2_APP_COMMON_CMD_STREAM_START_RESP", 0x05), ("M2M2_APP_COMMON_CMD_STREAM_STOP_REQ", 0x06), ("M2M2_APP_COMMON_CMD_STREAM_STOP_RESP", 0x07), ("M2M2_APP_COMMON_CMD_STREAM_PAUSE_REQ", 0x08), ("M2M2_APP_COMMON_CMD_STREAM_PAUSE_RESP", 0x09), ("M2M2_APP_COMMON_CMD_STREAM_UNPAUSE_REQ", 0x0A), ("M2M2_APP_COMMON_CMD_STREAM_UNPAUSE_RESP", 0x0B), ("M2M2_APP_COMMON_CMD_STREAM_SUBSCRIBE_REQ", 0x0C), ("M2M2_APP_COMMON_CMD_STREAM_SUBSCRIBE_RESP", 0x0D), ("M2M2_APP_COMMON_CMD_STREAM_UNSUBSCRIBE_REQ", 0x0E), ("M2M2_APP_COMMON_CMD_STREAM_UNSUBSCRIBE_RESP", 0x0F), ("M2M2_APP_COMMON_CMD_SENSOR_STATUS_QUERY_REQ", 0x10), ("M2M2_APP_COMMON_CMD_SENSOR_STATUS_QUERY_RESP", 0x11), ("M2M2_APP_COMMON_CMD_GET_LCFG_REQ", 0x12), ("M2M2_APP_COMMON_CMD_GET_LCFG_RESP", 0x13), ("M2M2_APP_COMMON_CMD_SET_LCFG_REQ", 0x14), ("M2M2_APP_COMMON_CMD_SET_LCFG_RESP", 0x15), ("M2M2_APP_COMMON_CMD_READ_LCFG_REQ", 0x16), ("M2M2_APP_COMMON_CMD_READ_LCFG_RESP", 0x17), ("M2M2_APP_COMMON_CMD_WRITE_LCFG_REQ", 0x18), ("M2M2_APP_COMMON_CMD_WRITE_LCFG_RESP", 0x19), ("M2M2_APP_COMMON_CMD_PING_REQ", 0x1A), ("M2M2_APP_COMMON_CMD_PING_RESP", 0x1B), ("__M2M2_APP_COMMON_CMD_HIGHEST", 0x20), ] } _m2m2_app_common_cmd_t = { "struct_fields": [ {"name":"command", "type":c_uint8}, {"name":"status", "type":c_uint8}, ] } m2m2_app_common_ver_req_t = { "struct_fields": [ {"name":"command", "type":c_uint8}, {"name":"status", "type":c_uint8}, ] } m2m2_app_common_ping_t = { "struct_fields": [ {"name":None, "type":_m2m2_app_common_cmd_t}, {"name":"sequence_num", "type":c_uint32}, ] } m2m2_app_common_version_t = { "struct_fields": [ {"name":None, "type":_m2m2_app_common_cmd_t}, {"name":"major", "type":c_uint16}, {"name":"minor", "type":c_uint16}, {"name":"patch", "type":c_uint16}, {"name":"verstr", "length":10, "type":c_uint8}, {"name":"str", "length":40, "type":c_uint8}, ] } m2m2_app_common_status_t = { "struct_fields": [ {"name":None, "type":_m2m2_app_common_cmd_t}, {"name":"stream", "type":m2m2_core.M2M2_ADDR_ENUM_t}, {"name":"num_subscribers", "type":c_uint8}, {"name":"num_start_reqs", "type":c_uint8}, ] } m2m2_app_common_sub_op_t = { "struct_fields": [ {"name":None, "type":_m2m2_app_common_cmd_t}, {"name":"stream", "type":m2m2_core.M2M2_ADDR_ENUM_t}, ] } m2m2_sensor_dcfg_data_t = { "struct_fields": [ {"name":None, "type":_m2m2_app_common_cmd_t}, {"name":"size", "type":c_uint8}, {"name":"dcfgdata", "length":140, "type":c_uint8}, ] } m2m2_app_lcfg_data_t = { "struct_fields": [ {"name":None, "type":_m2m2_app_common_cmd_t}, {"name":"size", "type":c_uint8}, {"name":"lcfgdata", "length":224, "type":c_uint8}, ] } _m2m2_app_data_stream_hdr_t = { "struct_fields": [ {"name":None, "type":_m2m2_app_common_cmd_t}, {"name":"sequence_num", "type":c_uint16}, ] }
29.565217
66
0.612605
593
4,760
4.288364
0.187184
0.162407
0.291388
0.239088
0.709005
0.59654
0.289422
0.263468
0.263468
0.263468
0
0.07836
0.246639
4,760
160
67
29.75
0.630786
0.004412
0
0.376712
0
0
0.433516
0.324187
0
0
0.035458
0
0
1
0
false
0
0.013699
0
0.013699
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
b59a58a7f4ad75afd984bab04b9c1e5aec2e81b9
287
py
Python
computerwords/stdlib/__init__.py
irskep/computerwords
8bad47796f3cfc8e17da57f0dd913f2c0ba71ca5
[ "BSD-3-Clause" ]
null
null
null
computerwords/stdlib/__init__.py
irskep/computerwords
8bad47796f3cfc8e17da57f0dd913f2c0ba71ca5
[ "BSD-3-Clause" ]
13
2016-03-03T20:48:10.000Z
2016-05-09T00:26:59.000Z
computerwords/stdlib/__init__.py
irskep/computerwords
8bad47796f3cfc8e17da57f0dd913f2c0ba71ca5
[ "BSD-3-Clause" ]
null
null
null
from computerwords.library import Library from .basics import add_basics from .html import add_html from .links import add_links from .table_of_contents import add_table_of_contents stdlib = Library() add_basics(stdlib) add_html(stdlib) add_links(stdlib) add_table_of_contents(stdlib)
22.076923
52
0.843206
45
287
5.066667
0.266667
0.157895
0.197368
0.157895
0.210526
0
0
0
0
0
0
0
0.101045
287
12
53
23.916667
0.883721
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
2
b5a244d82c6fe082bd70c84b936db7fc9220bb28
684
py
Python
timing/fuzzers/015-mult/fuzzer.py
Keno/prjtrellis
3311e6d814e0001c8785d6d77a4c93e327875b6d
[ "ISC" ]
256
2018-03-05T00:28:46.000Z
2022-03-04T22:33:29.000Z
timing/fuzzers/015-mult/fuzzer.py
Keno/prjtrellis
3311e6d814e0001c8785d6d77a4c93e327875b6d
[ "ISC" ]
70
2018-03-12T21:55:02.000Z
2020-06-22T12:06:08.000Z
timing/fuzzers/015-mult/fuzzer.py
Keno/prjtrellis
3311e6d814e0001c8785d6d77a4c93e327875b6d
[ "ISC" ]
68
2018-03-12T21:05:01.000Z
2021-03-14T21:08:33.000Z
import cell_fuzzers def include_cell(name, type): return type.startswith("mult_reg") def rewrite_cell_pipemode(name, type): if type.startswith("mult_reg"): return "MULT18X18D:REGS={}".format(type.split("_", 2)[2]) else: return type def rewrite_pin(name, type, pin): # All DSP pins have the same timings if not name.startswith("mult_reg"): return pin if pin[0] in "ABCP" and pin[1:].isdigit(): return pin[0] else: return pin def main(): cell_fuzzers.build_and_add(["mult_pipemode.v"], inc_cell=include_cell, rw_cell_func=rewrite_cell_pipemode, rw_pin_func=rewrite_pin) if __name__ == "__main__": main()
25.333333
135
0.669591
100
684
4.28
0.42
0.056075
0.119159
0.098131
0
0
0
0
0
0
0
0.016514
0.203216
684
26
136
26.307692
0.768807
0.049708
0
0.210526
0
0
0.108025
0
0
0
0
0
0
1
0.210526
false
0
0.052632
0.052632
0.578947
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
b5a75483f6ba6d9a8bdb87d89473fe3328bb3c18
283
py
Python
solutions/practice/perfectSquare.py
mrparkonline/py_conditionals
d9420ec8c9a69689d8a87b4232db288d620b22bb
[ "MIT" ]
null
null
null
solutions/practice/perfectSquare.py
mrparkonline/py_conditionals
d9420ec8c9a69689d8a87b4232db288d620b22bb
[ "MIT" ]
null
null
null
solutions/practice/perfectSquare.py
mrparkonline/py_conditionals
d9420ec8c9a69689d8a87b4232db288d620b22bb
[ "MIT" ]
null
null
null
# Create a program to check if an integer is a perfect square. # 4, 9, 25 any ideas? Use Square Root # input num = int(input('Enter a value: ')) # processing & output if (num ** 0.5) % 1 != 0: print(num, 'is not a perfect square.') else: print(num, 'is a perfect square.')
23.583333
62
0.636042
49
283
3.673469
0.632653
0.133333
0.233333
0.177778
0
0
0
0
0
0
0
0.03653
0.226148
283
12
63
23.583333
0.785388
0.431095
0
0
0
0
0.375796
0
0
0
0
0
0
1
0
false
0
0
0
0
0.4
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
b5aa4207d564f841fd6dad4a23eb8fb7bdd9c75a
11,178
py
Python
measurement/tests.py
sigurdsa/angelika-api
df594ecf34c29ab94d424a0697d77157a50c3500
[ "MIT" ]
2
2015-01-30T09:38:45.000Z
2018-02-12T09:38:11.000Z
measurement/tests.py
sigurdsa/angelika-api
df594ecf34c29ab94d424a0697d77157a50c3500
[ "MIT" ]
null
null
null
measurement/tests.py
sigurdsa/angelika-api
df594ecf34c29ab94d424a0697d77157a50c3500
[ "MIT" ]
null
null
null
from test.testcase import AngelikaAPITestCase from patient.models import Patient from measurement.models import Measurement from threshold_value.models import ThresholdValue from alarm.models import Alarm import time class PostMeasurementTests(AngelikaAPITestCase): def create_and_authenticate_hub(self): hub_user = self.create_hub('hub1') self.patient = Patient.objects.get(user__username='larsoverhaug') self.patient.hub = hub_user self.patient.save() self.force_authenticate('hub1') def test_post_ignored_measurements(self): self.create_and_authenticate_hub() data = { "Measurements": [ { "date": 1414972800, "type": "distance", "unit": "m", "value": 962.26 }, { "date": 1414972800, "type": "calories", "unit": "kcal", "value": 48.92 }, { "date": 1414972800, "type": "steps", "unit": "steps", "value": 1067 } ], "Observation": { "hub_id": "hub1" } } self.assertEqual(Measurement.objects.count(), 0) # Nothing is created yet response = self.client.post('/post-measurements/', data, 'json') self.assertEqual(response.status_code, 201) # Created self.assertEqual(response.data["num_measurements_created"], 1) # One object created self.assertEqual(Measurement.objects.count(), 1) # One object created self.assertAlmostEqual(Measurement.objects.first().value, 1067.0) # Correct no of steps self.assertEqual(Measurement.objects.first().patient, self.patient) # Correct patient self.assertEqual(Alarm.objects.count(), 0) def test_post_when_not_authenticated(self): response = self.client.post('/post-measurements/', {}, 'json') self.assertEqual(response.status_code, 401) def test_post_bad_hub_id(self): self.create_and_authenticate_hub() data = { "Measurements": [ { "date": 1414972800, "type": "steps", "unit": "steps", "value": 1067 } ], "Observation": { "hub_id": "dsfkjhdsfkjhdsf" } } response = self.client.post('/post-measurements/', data, 'json') self.assertEqual(response.status_code, 400) def test_post_abnormal_low_measurements(self): self.create_and_authenticate_hub() ThresholdValue.objects.create( value=49, patient=self.patient, type='P', is_upper_threshold=False, ) ThresholdValue.objects.create( value=165, patient=self.patient, type='P', is_upper_threshold=True, ) measurement_time = int(time.time()) + 10000 data = { "Measurements": [ { "date": measurement_time, "type": "heart_rate", "unit": "bpm", "value": 42 } ], "Observation": { "hub_id": "hub1" } } response = self.client.post('/post-measurements/', data, 'json') self.assertEqual(response.status_code, 201) # Created self.assertEqual(Measurement.objects.count(), 1) self.assertEqual(Alarm.objects.count(), 1) self.assertEqual(Alarm.objects.first().measurement.pk, Measurement.objects.first().pk) self.assertEqual(Alarm.objects.first().reason, False) def test_post_abnormal_high_measurement(self): self.create_and_authenticate_hub() ThresholdValue.objects.create( value=49, patient=self.patient, type='P', is_upper_threshold=False, ) ThresholdValue.objects.create( value=165, patient=self.patient, type='P', is_upper_threshold=True, ) measurement_time = int(time.time()) + 10000 data = { "Measurements": [ { "date": measurement_time, "type": "heart_rate", "unit": "bpm", "value": 180 } ], "Observation": { "hub_id": "hub1" } } response = self.client.post('/post-measurements/', data, 'json') self.assertEqual(response.status_code, 201) # Created self.assertEqual(Measurement.objects.count(), 1) self.assertEqual(Alarm.objects.count(), 1) self.assertEqual(Alarm.objects.first().measurement.pk, Measurement.objects.first().pk) self.assertEqual(Alarm.objects.first().reason, True) def test_post_high_o2_measurement(self): self.create_and_authenticate_hub() ThresholdValue.objects.create( value=60, patient=self.patient, type='O', is_upper_threshold=False, ) ThresholdValue.objects.create( value=85, patient=self.patient, type='O', is_upper_threshold=True, ) measurement_time = int(time.time()) + 10000 data = { "Measurements": [ { "date": measurement_time, "type": "spo2", "unit": "percent", "value": 89 } ], "Observation": { "hub_id": "hub1" } } response = self.client.post('/post-measurements/', data, 'json') self.assertEqual(response.status_code, 201) # Created self.assertEqual(Measurement.objects.count(), 1) self.assertEqual(Alarm.objects.count(), 0) # no alarm is created for a "too high" O2 value def test_post_abnormal_low_measurements_repeatedly(self): self.create_and_authenticate_hub() ThresholdValue.objects.create( value=49, patient=self.patient, type='P', is_upper_threshold=False, ) ThresholdValue.objects.create( value=165, patient=self.patient, type='P', is_upper_threshold=True, ) measurement_time = int(time.time()) + 10000 data = { "Measurements": [ { "date": measurement_time, "type": "heart_rate", "unit": "bpm", "value": 42 } ], "Observation": { "hub_id": "hub1" } } response = self.client.post('/post-measurements/', data, 'json') self.assertEqual(response.status_code, 201) # Created self.assertEqual(Measurement.objects.count(), 1) self.assertEqual(Alarm.objects.count(), 1) data = { "Measurements": [ { "date": measurement_time + 500, "type": "heart_rate", "unit": "bpm", "value": 41 } ], "Observation": { "hub_id": "hub1" } } response = self.client.post('/post-measurements/', data, 'json') self.assertEqual(response.status_code, 201) # Created self.assertEqual(Measurement.objects.count(), 2) self.assertEqual(Alarm.objects.count(), 1) # no new alarm has been created def test_post_abnormal_low_measurements_multiple_patients(self): self.create_and_authenticate_hub() hub_user2 = self.create_hub('hub2') kristin = self.create_patient('kristin', 'Kristin Hegine', 'Taraldsen', '08105534879') kristin.hub = hub_user2 kristin.save() ThresholdValue.objects.create( value=49, patient=self.patient, type='P', is_upper_threshold=False, ) ThresholdValue.objects.create( value=165, patient=self.patient, type='P', is_upper_threshold=True, ) ThresholdValue.objects.create( value=46, patient=kristin, type='P', is_upper_threshold=False, ) ThresholdValue.objects.create( value=160, patient=kristin, type='P', is_upper_threshold=True, ) measurement_time = int(time.time()) + 10000 data1 = { "Measurements": [ { "date": measurement_time, "type": "heart_rate", "unit": "bpm", "value": 42 } ], "Observation": { "hub_id": "hub1" } } response = self.client.post('/post-measurements/', data1, 'json') self.assertEqual(response.status_code, 201) # Created self.assertEqual(Measurement.objects.count(), 1) self.assertEqual(Alarm.objects.count(), 1) self.force_authenticate('hub2') data2 = { "Measurements": [ { "date": measurement_time + 50, "type": "heart_rate", "unit": "bpm", "value": 45 } ], "Observation": { "hub_id": "hub2" } } response = self.client.post('/post-measurements/', data2, 'json') self.assertEqual(response.status_code, 201) # Created self.assertEqual(Measurement.objects.count(), 2) self.assertEqual(Alarm.objects.count(), 2) # another alarm has been created def test_update_daily_activity_measurement(self): self.create_and_authenticate_hub() measurement_time = int(time.time()) data = { "Measurements": [ { "date": measurement_time, "type": "steps", "unit": "steps", "value": 656 } ], "Observation": { "hub_id": "hub1" } } response = self.client.post('/post-measurements/', data, 'json') self.assertEqual(response.status_code, 201) # Created self.assertEqual(Measurement.objects.count(), 1) data['Measurements'][0]['value'] = 890 response = self.client.post('/post-measurements/', data, 'json') self.assertEqual(response.status_code, 200) # OK self.assertEqual(Measurement.objects.count(), 1) self.assertEqual(Measurement.objects.first().value, 890)
31.223464
99
0.504205
968
11,178
5.672521
0.139463
0.103806
0.061555
0.078128
0.78747
0.746494
0.672919
0.647241
0.619377
0.619377
0
0.03395
0.380748
11,178
357
100
31.310924
0.759318
0.02487
0
0.602606
0
0
0.099531
0.002206
0
0
0
0
0.127036
1
0.032573
false
0
0.019544
0
0.055375
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
b5b47b6eed6526e455bda16583f9d9b3352ad615
166
py
Python
openhousens/urls.py
ciudadanointeligente/openhousens.ca
65e1d24cf50be34b59978ba2665b83550320877b
[ "MIT" ]
8
2015-04-14T19:28:13.000Z
2021-08-12T13:56:14.000Z
openhousens/urls.py
opennorth/openhousens.ca
050547f5caf6e02a3f463312920f4ff54decfdea
[ "MIT" ]
6
2015-05-12T17:03:27.000Z
2016-01-25T23:57:22.000Z
openhousens/urls.py
opennorth/openhousens.ca
050547f5caf6e02a3f463312920f4ff54decfdea
[ "MIT" ]
1
2019-06-26T13:51:47.000Z
2019-06-26T13:51:47.000Z
from django.conf.urls import patterns, include urlpatterns = patterns('', (r'', include('legislature.urls', namespace='legislature', app_name='legislature')), )
27.666667
88
0.722892
18
166
6.611111
0.722222
0
0
0
0
0
0
0
0
0
0
0
0.108434
166
5
89
33.2
0.804054
0
0
0
0
0
0.228916
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
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
a92f347682d47a13cbbe20851ef09b2931c3e019
15,354
py
Python
pycherwell/models/business_object_permission.py
greenpau/pycherwell
2a25446d5cf86d69e6158067faf27ce250aba966
[ "Apache-2.0" ]
2
2020-04-09T16:41:25.000Z
2020-08-25T21:07:53.000Z
pycherwell/models/business_object_permission.py
greenpau/pycherwell
2a25446d5cf86d69e6158067faf27ce250aba966
[ "Apache-2.0" ]
15
2020-02-12T14:57:30.000Z
2020-11-27T23:34:15.000Z
pycherwell/models/business_object_permission.py
greenpau/pycherwell
2a25446d5cf86d69e6158067faf27ce250aba966
[ "Apache-2.0" ]
2
2020-02-12T14:57:38.000Z
2021-07-30T11:32:28.000Z
# coding: utf-8 """ Cherwell REST API Unofficial Python Cherwell REST API library. # noqa: E501 The version of the OpenAPI document: 9.3.2 Contact: See AUTHORS. Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from pycherwell.configuration import Configuration class BusinessObjectPermission(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'bus_ob_id': 'str', 'bus_ob_name': 'str', 'department_member_edit': 'bool', 'department_member_view': 'bool', 'edit': 'bool', 'field_permissions': 'list[FieldPermission]', 'manager_of_owner_edit': 'bool', 'manager_of_owner_view': 'bool', 'owner_edit': 'bool', 'owner_view': 'bool', 'team_edit': 'bool', 'team_manager_of_owner_edit': 'bool', 'team_manager_of_owner_view': 'bool', 'team_view': 'bool', 'view': 'bool' } attribute_map = { 'bus_ob_id': 'busObId', 'bus_ob_name': 'busObName', 'department_member_edit': 'departmentMemberEdit', 'department_member_view': 'departmentMemberView', 'edit': 'edit', 'field_permissions': 'fieldPermissions', 'manager_of_owner_edit': 'managerOfOwnerEdit', 'manager_of_owner_view': 'managerOfOwnerView', 'owner_edit': 'ownerEdit', 'owner_view': 'ownerView', 'team_edit': 'teamEdit', 'team_manager_of_owner_edit': 'teamManagerOfOwnerEdit', 'team_manager_of_owner_view': 'teamManagerOfOwnerView', 'team_view': 'teamView', 'view': 'view' } def __init__(self, bus_ob_id=None, bus_ob_name=None, department_member_edit=None, department_member_view=None, edit=None, field_permissions=None, manager_of_owner_edit=None, manager_of_owner_view=None, owner_edit=None, owner_view=None, team_edit=None, team_manager_of_owner_edit=None, team_manager_of_owner_view=None, team_view=None, view=None, local_vars_configuration=None): # noqa: E501 """BusinessObjectPermission - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._bus_ob_id = None self._bus_ob_name = None self._department_member_edit = None self._department_member_view = None self._edit = None self._field_permissions = None self._manager_of_owner_edit = None self._manager_of_owner_view = None self._owner_edit = None self._owner_view = None self._team_edit = None self._team_manager_of_owner_edit = None self._team_manager_of_owner_view = None self._team_view = None self._view = None self.discriminator = None if bus_ob_id is not None: self.bus_ob_id = bus_ob_id if bus_ob_name is not None: self.bus_ob_name = bus_ob_name if department_member_edit is not None: self.department_member_edit = department_member_edit if department_member_view is not None: self.department_member_view = department_member_view if edit is not None: self.edit = edit if field_permissions is not None: self.field_permissions = field_permissions if manager_of_owner_edit is not None: self.manager_of_owner_edit = manager_of_owner_edit if manager_of_owner_view is not None: self.manager_of_owner_view = manager_of_owner_view if owner_edit is not None: self.owner_edit = owner_edit if owner_view is not None: self.owner_view = owner_view if team_edit is not None: self.team_edit = team_edit if team_manager_of_owner_edit is not None: self.team_manager_of_owner_edit = team_manager_of_owner_edit if team_manager_of_owner_view is not None: self.team_manager_of_owner_view = team_manager_of_owner_view if team_view is not None: self.team_view = team_view if view is not None: self.view = view @property def bus_ob_id(self): """Gets the bus_ob_id of this BusinessObjectPermission. # noqa: E501 :return: The bus_ob_id of this BusinessObjectPermission. # noqa: E501 :rtype: str """ return self._bus_ob_id @bus_ob_id.setter def bus_ob_id(self, bus_ob_id): """Sets the bus_ob_id of this BusinessObjectPermission. :param bus_ob_id: The bus_ob_id of this BusinessObjectPermission. # noqa: E501 :type: str """ self._bus_ob_id = bus_ob_id @property def bus_ob_name(self): """Gets the bus_ob_name of this BusinessObjectPermission. # noqa: E501 :return: The bus_ob_name of this BusinessObjectPermission. # noqa: E501 :rtype: str """ return self._bus_ob_name @bus_ob_name.setter def bus_ob_name(self, bus_ob_name): """Sets the bus_ob_name of this BusinessObjectPermission. :param bus_ob_name: The bus_ob_name of this BusinessObjectPermission. # noqa: E501 :type: str """ self._bus_ob_name = bus_ob_name @property def department_member_edit(self): """Gets the department_member_edit of this BusinessObjectPermission. # noqa: E501 :return: The department_member_edit of this BusinessObjectPermission. # noqa: E501 :rtype: bool """ return self._department_member_edit @department_member_edit.setter def department_member_edit(self, department_member_edit): """Sets the department_member_edit of this BusinessObjectPermission. :param department_member_edit: The department_member_edit of this BusinessObjectPermission. # noqa: E501 :type: bool """ self._department_member_edit = department_member_edit @property def department_member_view(self): """Gets the department_member_view of this BusinessObjectPermission. # noqa: E501 :return: The department_member_view of this BusinessObjectPermission. # noqa: E501 :rtype: bool """ return self._department_member_view @department_member_view.setter def department_member_view(self, department_member_view): """Sets the department_member_view of this BusinessObjectPermission. :param department_member_view: The department_member_view of this BusinessObjectPermission. # noqa: E501 :type: bool """ self._department_member_view = department_member_view @property def edit(self): """Gets the edit of this BusinessObjectPermission. # noqa: E501 :return: The edit of this BusinessObjectPermission. # noqa: E501 :rtype: bool """ return self._edit @edit.setter def edit(self, edit): """Sets the edit of this BusinessObjectPermission. :param edit: The edit of this BusinessObjectPermission. # noqa: E501 :type: bool """ self._edit = edit @property def field_permissions(self): """Gets the field_permissions of this BusinessObjectPermission. # noqa: E501 :return: The field_permissions of this BusinessObjectPermission. # noqa: E501 :rtype: list[FieldPermission] """ return self._field_permissions @field_permissions.setter def field_permissions(self, field_permissions): """Sets the field_permissions of this BusinessObjectPermission. :param field_permissions: The field_permissions of this BusinessObjectPermission. # noqa: E501 :type: list[FieldPermission] """ self._field_permissions = field_permissions @property def manager_of_owner_edit(self): """Gets the manager_of_owner_edit of this BusinessObjectPermission. # noqa: E501 :return: The manager_of_owner_edit of this BusinessObjectPermission. # noqa: E501 :rtype: bool """ return self._manager_of_owner_edit @manager_of_owner_edit.setter def manager_of_owner_edit(self, manager_of_owner_edit): """Sets the manager_of_owner_edit of this BusinessObjectPermission. :param manager_of_owner_edit: The manager_of_owner_edit of this BusinessObjectPermission. # noqa: E501 :type: bool """ self._manager_of_owner_edit = manager_of_owner_edit @property def manager_of_owner_view(self): """Gets the manager_of_owner_view of this BusinessObjectPermission. # noqa: E501 :return: The manager_of_owner_view of this BusinessObjectPermission. # noqa: E501 :rtype: bool """ return self._manager_of_owner_view @manager_of_owner_view.setter def manager_of_owner_view(self, manager_of_owner_view): """Sets the manager_of_owner_view of this BusinessObjectPermission. :param manager_of_owner_view: The manager_of_owner_view of this BusinessObjectPermission. # noqa: E501 :type: bool """ self._manager_of_owner_view = manager_of_owner_view @property def owner_edit(self): """Gets the owner_edit of this BusinessObjectPermission. # noqa: E501 :return: The owner_edit of this BusinessObjectPermission. # noqa: E501 :rtype: bool """ return self._owner_edit @owner_edit.setter def owner_edit(self, owner_edit): """Sets the owner_edit of this BusinessObjectPermission. :param owner_edit: The owner_edit of this BusinessObjectPermission. # noqa: E501 :type: bool """ self._owner_edit = owner_edit @property def owner_view(self): """Gets the owner_view of this BusinessObjectPermission. # noqa: E501 :return: The owner_view of this BusinessObjectPermission. # noqa: E501 :rtype: bool """ return self._owner_view @owner_view.setter def owner_view(self, owner_view): """Sets the owner_view of this BusinessObjectPermission. :param owner_view: The owner_view of this BusinessObjectPermission. # noqa: E501 :type: bool """ self._owner_view = owner_view @property def team_edit(self): """Gets the team_edit of this BusinessObjectPermission. # noqa: E501 :return: The team_edit of this BusinessObjectPermission. # noqa: E501 :rtype: bool """ return self._team_edit @team_edit.setter def team_edit(self, team_edit): """Sets the team_edit of this BusinessObjectPermission. :param team_edit: The team_edit of this BusinessObjectPermission. # noqa: E501 :type: bool """ self._team_edit = team_edit @property def team_manager_of_owner_edit(self): """Gets the team_manager_of_owner_edit of this BusinessObjectPermission. # noqa: E501 :return: The team_manager_of_owner_edit of this BusinessObjectPermission. # noqa: E501 :rtype: bool """ return self._team_manager_of_owner_edit @team_manager_of_owner_edit.setter def team_manager_of_owner_edit(self, team_manager_of_owner_edit): """Sets the team_manager_of_owner_edit of this BusinessObjectPermission. :param team_manager_of_owner_edit: The team_manager_of_owner_edit of this BusinessObjectPermission. # noqa: E501 :type: bool """ self._team_manager_of_owner_edit = team_manager_of_owner_edit @property def team_manager_of_owner_view(self): """Gets the team_manager_of_owner_view of this BusinessObjectPermission. # noqa: E501 :return: The team_manager_of_owner_view of this BusinessObjectPermission. # noqa: E501 :rtype: bool """ return self._team_manager_of_owner_view @team_manager_of_owner_view.setter def team_manager_of_owner_view(self, team_manager_of_owner_view): """Sets the team_manager_of_owner_view of this BusinessObjectPermission. :param team_manager_of_owner_view: The team_manager_of_owner_view of this BusinessObjectPermission. # noqa: E501 :type: bool """ self._team_manager_of_owner_view = team_manager_of_owner_view @property def team_view(self): """Gets the team_view of this BusinessObjectPermission. # noqa: E501 :return: The team_view of this BusinessObjectPermission. # noqa: E501 :rtype: bool """ return self._team_view @team_view.setter def team_view(self, team_view): """Sets the team_view of this BusinessObjectPermission. :param team_view: The team_view of this BusinessObjectPermission. # noqa: E501 :type: bool """ self._team_view = team_view @property def view(self): """Gets the view of this BusinessObjectPermission. # noqa: E501 :return: The view of this BusinessObjectPermission. # noqa: E501 :rtype: bool """ return self._view @view.setter def view(self, view): """Sets the view of this BusinessObjectPermission. :param view: The view of this BusinessObjectPermission. # noqa: E501 :type: bool """ self._view = view def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, BusinessObjectPermission): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, BusinessObjectPermission): return True return self.to_dict() != other.to_dict()
31.592593
394
0.652403
1,842
15,354
5.110206
0.075461
0.072665
0.113035
0.162541
0.720705
0.619675
0.530649
0.432275
0.363115
0.257941
0
0.013741
0.270092
15,354
485
395
31.657732
0.82618
0.362707
0
0.090047
1
0
0.085704
0.039925
0
0
0
0
0
1
0.170616
false
0
0.018957
0
0.308057
0.009479
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
a96c2c37546c409002343aed74121c025c71af79
656
py
Python
botwinick_math/geo/circles.py
dbotwinick/python-botwinick-math
52f038c277e27243f82aed2000137fb2ee6f1dae
[ "BSD-3-Clause" ]
null
null
null
botwinick_math/geo/circles.py
dbotwinick/python-botwinick-math
52f038c277e27243f82aed2000137fb2ee6f1dae
[ "BSD-3-Clause" ]
null
null
null
botwinick_math/geo/circles.py
dbotwinick/python-botwinick-math
52f038c277e27243f82aed2000137fb2ee6f1dae
[ "BSD-3-Clause" ]
null
null
null
# author: Drew Botwinick, Botwinick Innovations # license: 3-clause BSD from math import pi def r2a(radius): """ Circle: radius to area :param radius: radius :return: area """ return pi * radius ** 2.0 def a2r(area): """ Circle: area to radius :param area: area :return: radius """ return (area / pi) ** 0.5 def d2a(diameter): """ Circle: diameter to area :param diameter: diameter :return: area """ return 0.25 * pi * diameter ** 2.0 def a2d(area): """ Circle: area to diameter :param area: area :return: diameter """ return 2.0 * (area / pi) ** 0.5
16
47
0.565549
85
656
4.364706
0.329412
0.107817
0.059299
0.086253
0
0
0
0
0
0
0
0.039387
0.303354
656
40
48
16.4
0.772429
0.472561
0
0
0
0
0
0
0
0
0
0
0
1
0.444444
false
0
0.111111
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
1
0
0
0
0
1
0
0
2
a990706e587a94d37b15147c1783171a5b684c7e
248
py
Python
ugly-number/Solution.37760247.py
rahul-ramadas/leetcode
6c84c2333a613729361c5cdb63dc3fc80203b340
[ "MIT" ]
null
null
null
ugly-number/Solution.37760247.py
rahul-ramadas/leetcode
6c84c2333a613729361c5cdb63dc3fc80203b340
[ "MIT" ]
1
2016-09-11T22:26:17.000Z
2016-09-13T01:49:48.000Z
ugly-number/Solution.37760247.py
rahul-ramadas/leetcode
6c84c2333a613729361c5cdb63dc3fc80203b340
[ "MIT" ]
null
null
null
class Solution(object): def isUgly(self, num): if not num: return False for factor in (2, 3, 5): while num % factor == 0: num /= factor return num == 1
22.545455
37
0.41129
27
248
3.777778
0.740741
0.176471
0
0
0
0
0
0
0
0
0
0.04065
0.504032
248
10
38
24.8
0.788618
0
0
0
0
0
0
0
0
0
0
0
0
1
0.125
false
0
0
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
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
8d2ab08e4b6f230b4d8850f954b38bebd839be81
329
py
Python
examples/tables/payment.py
rayattack/supersql
0a592e7f303ac18b8df7bebac226b26f38f6d192
[ "MIT" ]
2
2019-11-04T00:19:30.000Z
2020-10-04T01:24:04.000Z
examples/tables/payment.py
tersoo/supersql
4d20bd72a9de50e485ce79285c355a1a7ac04b55
[ "MIT" ]
2
2021-03-31T14:07:04.000Z
2021-03-31T14:07:20.000Z
examples/tables/payment.py
tersoo/supersql
4d20bd72a9de50e485ce79285c355a1a7ac04b55
[ "MIT" ]
2
2021-03-30T21:40:14.000Z
2022-03-17T20:52:25.000Z
from supersql import Table from supersql import Integer, String, Timestamp class Payment(Table): payment_id = Integer() customer_id = Integer(fk="table.column") staff_id = Integer(fk="table.column") rental_id = Integer(fk="table.column") amount = Integer() payment_date = Timestamp() paym = Payment()
21.933333
47
0.699088
41
329
5.487805
0.439024
0.16
0.146667
0.213333
0.293333
0
0
0
0
0
0
0
0.18541
329
14
48
23.5
0.839552
0
0
0
0
0
0.109422
0
0
0
0
0
0
1
0
false
0
0.2
0
0.9
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
8d3fa244d83fd265c4542a63634af1074d1487a7
2,461
py
Python
inference.py
innovator1311/tacotron2
7425beca0f5fea5bb669dc3de2387e309ea0b5a7
[ "BSD-3-Clause" ]
null
null
null
inference.py
innovator1311/tacotron2
7425beca0f5fea5bb669dc3de2387e309ea0b5a7
[ "BSD-3-Clause" ]
null
null
null
inference.py
innovator1311/tacotron2
7425beca0f5fea5bb669dc3de2387e309ea0b5a7
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # ## Tacotron 2 inference code # Edit the variables **checkpoint_path** and **text** to match yours and run the entire code to generate plots of mel outputs, alignments and audio synthesis from the generated mel-spectrogram using Griffin-Lim. # #### Import libraries and setup matplotlib # In[1]: import matplotlib import matplotlib.pylab as plt import IPython.display as ipd import sys sys.path.append('waveglow/') import numpy as np import torch from hparams import create_hparams from model import Tacotron2 from layers import TacotronSTFT, STFT from audio_processing import griffin_lim from train import load_model from text import text_to_sequence #from denoiser import Denoiser import scipy #import scipy.io.wavfile.write as write from resemblyzer import VoiceEncoder, preprocess_wav from pathlib import Path from viphoneme import vi2IPA_split delimit ="/" hparams = create_hparams() hparams.sampling_rate = 22050 ## config here checkpoint_path = "../drive/MyDrive/MultiSpeaker_Tacotron2/checkpoints/checkpoint_0" model = load_model(hparams) model.load_state_dict(torch.load(checkpoint_path)['state_dict']) _ = model.cuda().eval().half() ## config here waveglow_path = '../drive/MyDrive/MultiSpeaker_Tacotron2/checkpoints/waveglow_256channels_universal_v5.pt' waveglow = torch.load(waveglow_path)['model'] waveglow.cuda().eval().half() for k in waveglow.convinv: k.float() #denoiser = Denoiser(waveglow) ## config here text = "đây là câu thoại đơn giản" text = vi2IPA_split(text, delimit) sequence = np.array(text_to_sequence(text, ['english_cleaners']))[None, :] sequence = torch.autograd.Variable( torch.from_numpy(sequence)).cuda().long() ### ## config here fpath = Path("../1320_00000.mp3") wav = preprocess_wav(fpath) encoder = VoiceEncoder() embed = encoder.embed_utterance(wav) embed = torch.HalfTensor(embed).to("cuda") ### mel_outputs, mel_outputs_postnet, _, alignments = model.inference(sequence, embed) #plot_data((mel_outputs.float().data.cpu().numpy()[0], # mel_outputs_postnet.float().data.cpu().numpy()[0], # alignments.float().data.cpu().numpy()[0].T)) with torch.no_grad(): audio = waveglow.infer(mel_outputs_postnet, sigma=0.666) scipy.io.wavfile.write("../test.wav", hparams.sampling_rate, audio[0].cpu().numpy()) #audio_denoised = denoiser(audio, strength=0.01)[:, 0] #ipd.Audio(audio_denoised.cpu().numpy(), rate=hparams.sampling_rate)
27.965909
211
0.754165
341
2,461
5.29912
0.407625
0.033204
0.031544
0.028224
0.083011
0.053127
0
0
0
0
0
0.018408
0.117026
2,461
87
212
28.287356
0.813162
0.305567
0
0
1
0
0.149432
0.090855
0
0
0
0
0
1
0
false
0
0.372093
0
0.372093
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
1
0
0
0
0
2
8d412ee0cad7874fa4389e0c9a16b9a4fb11a645
660
py
Python
server.py
afidegnum/myelm
3c3f268a7c8f8648153f0b750dd39e508ccf9ee6
[ "Apache-2.0" ]
1
2018-06-07T15:11:48.000Z
2018-06-07T15:11:48.000Z
server.py
afidegnum/myelm
3c3f268a7c8f8648153f0b750dd39e508ccf9ee6
[ "Apache-2.0" ]
null
null
null
server.py
afidegnum/myelm
3c3f268a7c8f8648153f0b750dd39e508ccf9ee6
[ "Apache-2.0" ]
null
null
null
from flask import Flask, jsonify, render_template, request from flask_cors import CORS app = Flask(__name__) @app.route('/') def index(): return render_template('index.html') @app.route("/api/user/login", methods=["GET", "POST"]) def login(*args, **kwargs): # print 'Got request for login' # print args # print kwargs # print request.args # print request.args.get("username") # print request.values.get("username") user = request.form.get('username') print request.form.get('password') response = {'username': user} return jsonify(response) if __name__ == "__main__": app.run(host='0.0.0.0', port=8080)
22
58
0.660606
87
660
4.83908
0.436782
0.114014
0.07601
0.109264
0
0
0
0
0
0
0
0.014815
0.181818
660
29
59
22.758621
0.764815
0.218182
0
0
0
0
0.141454
0
0
0
0
0
0
0
null
null
0.071429
0.142857
null
null
0.071429
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
8d4f8c10a012d97b2744cf0791e5c098e51dd72a
970
py
Python
myModule.py
cloud322/HelloPython
5b11c07018e986928433be28ba88f0e4f44f2346
[ "Apache-2.0" ]
null
null
null
myModule.py
cloud322/HelloPython
5b11c07018e986928433be28ba88f0e4f44f2346
[ "Apache-2.0" ]
null
null
null
myModule.py
cloud322/HelloPython
5b11c07018e986928433be28ba88f0e4f44f2346
[ "Apache-2.0" ]
null
null
null
#module 사용 # 프로그램구성하는독립적인(함수 /클래스) 단위를 각가 정의하고 관리하는 방법 #자주사용하는 일반적인 긴으은 모듈로 한번 만들어 두면 #필요할떄 마다 도입해서 활용할 수 있다 #모듈 : 관련성있는 데이터를, 함수, 클래스 #모듈사용하려면 import 명령어로 #인터프리터에게 사용여부를 알려야 #import Lab03 import math #import random as r from random import randint #모듈명 아예줄여쓰기 from math import pi, sqrt #ㅊㅊ # from math import * #비추 import cloud #import cloud.Hello as ch from cloud.Hello import sayHello #모듈 호출 할떄 # print(math.pi) print(pi) # print(math.sqrt(4)) print(sqrt(4)) # print(r.randint(1,10)) print(randint(1,10)) #import 모듈이름 as 별칭 #함수호출시 모듈 명까지 기술하는 것은 왠지 불편 #from 모듈명 import 함수명 #사용자가 만들 모듈을 다른 파일에서 참조하려면 #두파일이 모두 같은 위치에 있어야함 즉 프로젝트 내에서 서로 참조 하려면 #이 파일들은 같은 위치에 저장되어 있어야 함 #한편 python IDE 나 다른프로젝트에서 모듈을 참조하려면 #pythonPath 가 정의한 위치에 모듈을 저장해둔다 #python 설치위치 나 python 설치위치/Lib #cloud.isLeapYear() #python package #다수의 개발자가 만든 모듈 이름이 서로 같을 경우 #python 에서는 패키지라는 개념을 이용해서 해결 # 연산자 . 를 이용해서 모듈을 계층적 디렉토리로 관리 #파이썬에서 디렉토리가 패키지로 인식하려면 #__init__.py 반드시있어야함 sayHello()
18.301887
43
0.723711
185
970
3.772973
0.659459
0.04298
0.040115
0
0
0
0
0
0
0
0
0.012837
0.196907
970
53
44
18.301887
0.883184
0.743299
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.555556
0
0.555556
0.333333
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
8d57f48dc614e70ddd26dfc0faf92b091976adce
59,134
py
Python
nknsdk/pb/nodemessage_pb2.py
bufrr/nkn-sdk-py3
ded73f845e014c6ab758f5297bf1c9fb6ce41d30
[ "Apache-2.0" ]
8
2019-08-19T08:20:01.000Z
2022-01-24T15:08:05.000Z
nknsdk/pb/nodemessage_pb2.py
bufrr/nkn-sdk-py3
ded73f845e014c6ab758f5297bf1c9fb6ce41d30
[ "Apache-2.0" ]
2
2020-05-01T23:47:34.000Z
2022-01-30T09:31:53.000Z
nknsdk/pb/nodemessage_pb2.py
bufrr/nkn-sdk-py3
ded73f845e014c6ab758f5297bf1c9fb6ce41d30
[ "Apache-2.0" ]
6
2019-07-25T13:10:38.000Z
2022-01-24T15:08:07.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: pb/nodemessage.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() from pb import node_pb2 as pb_dot_node__pb2 from pb import sigchain_pb2 as pb_dot_sigchain__pb2 from pb import block_pb2 as pb_dot_block__pb2 from pb import transaction_pb2 as pb_dot_transaction__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='pb/nodemessage.proto', package='pb', syntax='proto3', serialized_options=None, serialized_pb=_b('\n\x14pb/nodemessage.proto\x12\x02pb\x1a\rpb/node.proto\x1a\x11pb/sigchain.proto\x1a\x0epb/block.proto\x1a\x14pb/transaction.proto\"I\n\x0fUnsignedMessage\x12%\n\x0cmessage_type\x18\x01 \x01(\x0e\x32\x0f.pb.MessageType\x12\x0f\n\x07message\x18\x02 \x01(\x0c\"3\n\rSignedMessage\x12\x0f\n\x07message\x18\x01 \x01(\x0c\x12\x11\n\tsignature\x18\x02 \x01(\x0c\"*\n\x04Vote\x12\x0e\n\x06height\x18\x01 \x01(\r\x12\x12\n\nblock_hash\x18\x02 \x01(\x0c\"8\n\x12IHaveBlockProposal\x12\x0e\n\x06height\x18\x01 \x01(\r\x12\x12\n\nblock_hash\x18\x02 \x01(\x0c\"\x86\x01\n\x14RequestBlockProposal\x12\x12\n\nblock_hash\x18\x01 \x01(\x0c\x12(\n\x04type\x18\x02 \x01(\x0e\x32\x1a.pb.RequestTransactionType\x12\x17\n\x0fshort_hash_salt\x18\x03 \x01(\x0c\x12\x17\n\x0fshort_hash_size\x18\x04 \x01(\r\"P\n\x19RequestBlockProposalReply\x12\x18\n\x05\x62lock\x18\x01 \x01(\x0b\x32\t.pb.Block\x12\x19\n\x11transactions_hash\x18\x02 \x03(\x0c\"\xa8\x01\n\x1bRequestProposalTransactions\x12\x12\n\nblock_hash\x18\x01 \x01(\x0c\x12(\n\x04type\x18\x02 \x01(\x0e\x32\x1a.pb.RequestTransactionType\x12\x17\n\x0fshort_hash_salt\x18\x03 \x01(\x0c\x12\x17\n\x0fshort_hash_size\x18\x04 \x01(\r\x12\x19\n\x11transactions_hash\x18\x05 \x03(\x0c\"I\n RequestProposalTransactionsReply\x12%\n\x0ctransactions\x18\x01 \x03(\x0b\x32\x0f.pb.Transaction\"\x13\n\x11GetConsensusState\"\xa6\x01\n\x16GetConsensusStateReply\x12\x19\n\x11ledger_block_hash\x18\x02 \x01(\x0c\x12\x15\n\rledger_height\x18\x01 \x01(\r\x12\x18\n\x10\x63onsensus_height\x18\x03 \x01(\r\x12\x1d\n\x15min_verifiable_height\x18\x05 \x01(\r\x12!\n\nsync_state\x18\x04 \x01(\x0e\x32\r.pb.SyncState\";\n\x0fGetBlockHeaders\x12\x14\n\x0cstart_height\x18\x01 \x01(\r\x12\x12\n\nend_height\x18\x02 \x01(\r\"9\n\x14GetBlockHeadersReply\x12!\n\rblock_headers\x18\x01 \x03(\x0b\x32\n.pb.Header\"5\n\tGetBlocks\x12\x14\n\x0cstart_height\x18\x01 \x01(\r\x12\x12\n\nend_height\x18\x02 \x01(\r\"+\n\x0eGetBlocksReply\x12\x19\n\x06\x62locks\x18\x01 \x03(\x0b\x32\t.pb.Block\"\xb5\x01\n\x05Relay\x12\x16\n\x0esrc_identifier\x18\x01 \x01(\t\x12\x12\n\nsrc_pubkey\x18\x06 \x01(\x0c\x12\x0f\n\x07\x64\x65st_id\x18\x02 \x01(\x0c\x12\x0f\n\x07payload\x18\x03 \x01(\x0c\x12\x1b\n\x13max_holding_seconds\x18\x05 \x01(\r\x12\x12\n\nblock_hash\x18\x07 \x01(\x0c\x12\x16\n\x0elast_signature\x18\x08 \x01(\x0c\x12\x15\n\rsig_chain_len\x18\t \x01(\r\"5\n\x0cTransactions\x12%\n\x0ctransactions\x18\x01 \x03(\x0b\x32\x0f.pb.Transaction\"\\\n\x17\x42\x61\x63ktrackSignatureChain\x12)\n\x0fsig_chain_elems\x18\x01 \x03(\x0b\x32\x10.pb.SigChainElem\x12\x16\n\x0eprev_signature\x18\x02 \x01(\x0c\"H\n\x1eIHaveSignatureChainTransaction\x12\x0e\n\x06height\x18\x01 \x01(\r\x12\x16\n\x0esignature_hash\x18\x02 \x01(\x0c\":\n RequestSignatureChainTransaction\x12\x16\n\x0esignature_hash\x18\x01 \x01(\x0c\"M\n%RequestSignatureChainTransactionReply\x12$\n\x0btransaction\x18\x01 \x01(\x0b\x32\x0f.pb.Transaction*\xb3\x04\n\x0bMessageType\x12\'\n#MESSAGE_TYPE_PLACEHOLDER_DO_NOT_USE\x10\x00\x12\x08\n\x04VOTE\x10\x01\x12\x19\n\x15I_HAVE_BLOCK_PROPOSAL\x10\x02\x12\x1a\n\x16REQUEST_BLOCK_PROPOSAL\x10\x03\x12 \n\x1cREQUEST_BLOCK_PROPOSAL_REPLY\x10\x04\x12\x17\n\x13GET_CONSENSUS_STATE\x10\x05\x12\x1d\n\x19GET_CONSENSUS_STATE_REPLY\x10\x06\x12\x15\n\x11GET_BLOCK_HEADERS\x10\x07\x12\x1b\n\x17GET_BLOCK_HEADERS_REPLY\x10\x08\x12\x0e\n\nGET_BLOCKS\x10\t\x12\x14\n\x10GET_BLOCKS_REPLY\x10\n\x12\t\n\x05RELAY\x10\x0b\x12\x10\n\x0cTRANSACTIONS\x10\x0c\x12\x1d\n\x19\x42\x41\x43KTRACK_SIGNATURE_CHAIN\x10\r\x12!\n\x1dREQUEST_PROPOSAL_TRANSACTIONS\x10\x0e\x12\'\n#REQUEST_PROPOSAL_TRANSACTIONS_REPLY\x10\x0f\x12&\n\"I_HAVE_SIGNATURE_CHAIN_TRANSACTION\x10\x10\x12\'\n#REQUEST_SIGNATURE_CHAIN_TRANSACTION\x10\x11\x12-\n)REQUEST_SIGNATURE_CHAIN_TRANSACTION_REPLY\x10\x12*C\n\x18\x41llowedSignedMessageType\x12\'\n#ALLOW_SIGNED_PLACEHOLDER_DO_NOT_USE\x10\x00*\xc9\x06\n\x1a\x41llowedUnsignedMessageType\x12)\n%ALLOW_UNSIGNED_PLACEHOLDER_DO_NOT_USE\x10\x00\x12\x17\n\x13\x41LLOW_UNSIGNED_VOTE\x10\x01\x12(\n$ALLOW_UNSIGNED_I_HAVE_BLOCK_PROPOSAL\x10\x02\x12)\n%ALLOW_UNSIGNED_REQUEST_BLOCK_PROPOSAL\x10\x03\x12&\n\"ALLOW_UNSIGNED_REQUEST_BLOCK_REPLY\x10\x04\x12&\n\"ALLOW_UNSIGNED_GET_CONSENSUS_STATE\x10\x05\x12,\n(ALLOW_UNSIGNED_GET_CONSENSUS_STATE_REPLY\x10\x06\x12$\n ALLOW_UNSIGNED_GET_BLOCK_HEADERS\x10\x07\x12*\n&ALLOW_UNSIGNED_GET_BLOCK_HEADERS_REPLY\x10\x08\x12\x1d\n\x19\x41LLOW_UNSIGNED_GET_BLOCKS\x10\t\x12#\n\x1f\x41LLOW_UNSIGNED_GET_BLOCKS_REPLY\x10\n\x12\x18\n\x14\x41LLOW_UNSIGNED_RELAY\x10\x0b\x12\x1f\n\x1b\x41LLOW_UNSIGNED_TRANSACTIONS\x10\x0c\x12,\n(ALLOW_UNSIGNED_BACKTRACK_SIGNATURE_CHAIN\x10\r\x12\x30\n,ALLOW_UNSIGNED_REQUEST_PROPOSAL_TRANSACTIONS\x10\x0e\x12\x36\n2ALLOW_UNSIGNED_REQUEST_PROPOSAL_TRANSACTIONS_REPLY\x10\x0f\x12\x35\n1ALLOW_UNSIGNED_I_HAVE_SIGNATURE_CHAIN_TRANSACTION\x10\x10\x12\x36\n2ALLOW_UNSIGNED_REQUEST_SIGNATURE_CHAIN_TRANSACTION\x10\x11\x12<\n8ALLOW_UNSIGNED_REQUEST_SIGNATURE_CHAIN_TRANSACTION_REPLY\x10\x12*\xea\x05\n\x18\x41llowedDirectMessageType\x12\'\n#ALLOW_DIRECT_PLACEHOLDER_DO_NOT_USE\x10\x00\x12\x15\n\x11\x41LLOW_DIRECT_VOTE\x10\x01\x12&\n\"ALLOW_DIRECT_I_HAVE_BLOCK_PROPOSAL\x10\x02\x12\'\n#ALLOW_DIRECT_REQUEST_BLOCK_PROPOSAL\x10\x03\x12$\n ALLOW_DIRECT_REQUEST_BLOCK_REPLY\x10\x04\x12$\n ALLOW_DIRECT_GET_CONSENSUS_STATE\x10\x05\x12*\n&ALLOW_DIRECT_GET_CONSENSUS_STATE_REPLY\x10\x06\x12\"\n\x1e\x41LLOW_DIRECT_GET_BLOCK_HEADERS\x10\x07\x12(\n$ALLOW_DIRECT_GET_BLOCK_HEADERS_REPLY\x10\x08\x12\x1b\n\x17\x41LLOW_DIRECT_GET_BLOCKS\x10\t\x12!\n\x1d\x41LLOW_DIRECT_GET_BLOCKS_REPLY\x10\n\x12*\n&ALLOW_DIRECT_BACKTRACK_SIGNATURE_CHAIN\x10\r\x12.\n*ALLOW_DIRECT_REQUEST_PROPOSAL_TRANSACTIONS\x10\x0e\x12\x34\n0ALLOW_DIRECT_REQUEST_PROPOSAL_TRANSACTIONS_REPLY\x10\x0f\x12\x33\n/ALLOW_DIRECT_I_HAVE_SIGNATURE_CHAIN_TRANSACTION\x10\x10\x12\x34\n0ALLOW_DIRECT_REQUEST_SIGNATURE_CHAIN_TRANSACTION\x10\x11\x12:\n6ALLOW_DIRECT_REQUEST_SIGNATURE_CHAIN_TRANSACTION_REPLY\x10\x12*X\n\x17\x41llowedRelayMessageType\x12&\n\"ALLOW_RELAY_PLACEHOLDER_DO_NOT_USE\x10\x00\x12\x15\n\x11\x41LLOW_RELAY_RELAY\x10\x0b*y\n\x1f\x41llowedBroadcastPushMessageType\x12/\n+ALLOW_BROADCAST_PUSH_PLACEHOLDER_DO_NOT_USE\x10\x00\x12%\n!ALLOW_BROADCAST_PUSH_TRANSACTIONS\x10\x0c*R\n\x1f\x41llowedBroadcastPullMessageType\x12/\n+ALLOW_BROADCAST_PULL_PLACEHOLDER_DO_NOT_USE\x10\x00*y\n\x1f\x41llowedBroadcastTreeMessageType\x12/\n+ALLOW_BROADCAST_TREE_PLACEHOLDER_DO_NOT_USE\x10\x00\x12%\n!ALLOW_BROADCAST_TREE_TRANSACTIONS\x10\x0c*x\n\x16RequestTransactionType\x12\x1c\n\x18REQUEST_FULL_TRANSACTION\x10\x00\x12\x1c\n\x18REQUEST_TRANSACTION_HASH\x10\x01\x12\"\n\x1eREQUEST_TRANSACTION_SHORT_HASH\x10\x02\x62\x06proto3') , dependencies=[pb_dot_node__pb2.DESCRIPTOR,pb_dot_sigchain__pb2.DESCRIPTOR,pb_dot_block__pb2.DESCRIPTOR,pb_dot_transaction__pb2.DESCRIPTOR,]) _MESSAGETYPE = _descriptor.EnumDescriptor( name='MessageType', full_name='pb.MessageType', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='MESSAGE_TYPE_PLACEHOLDER_DO_NOT_USE', index=0, number=0, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='VOTE', index=1, number=1, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='I_HAVE_BLOCK_PROPOSAL', index=2, number=2, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='REQUEST_BLOCK_PROPOSAL', index=3, number=3, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='REQUEST_BLOCK_PROPOSAL_REPLY', index=4, number=4, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='GET_CONSENSUS_STATE', index=5, number=5, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='GET_CONSENSUS_STATE_REPLY', index=6, number=6, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='GET_BLOCK_HEADERS', index=7, number=7, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='GET_BLOCK_HEADERS_REPLY', index=8, number=8, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='GET_BLOCKS', index=9, number=9, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='GET_BLOCKS_REPLY', index=10, number=10, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='RELAY', index=11, number=11, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='TRANSACTIONS', index=12, number=12, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='BACKTRACK_SIGNATURE_CHAIN', index=13, number=13, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='REQUEST_PROPOSAL_TRANSACTIONS', index=14, number=14, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='REQUEST_PROPOSAL_TRANSACTIONS_REPLY', index=15, number=15, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='I_HAVE_SIGNATURE_CHAIN_TRANSACTION', index=16, number=16, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='REQUEST_SIGNATURE_CHAIN_TRANSACTION', index=17, number=17, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='REQUEST_SIGNATURE_CHAIN_TRANSACTION_REPLY', index=18, number=18, serialized_options=None, type=None), ], containing_type=None, serialized_options=None, serialized_start=1752, serialized_end=2315, ) _sym_db.RegisterEnumDescriptor(_MESSAGETYPE) MessageType = enum_type_wrapper.EnumTypeWrapper(_MESSAGETYPE) _ALLOWEDSIGNEDMESSAGETYPE = _descriptor.EnumDescriptor( name='AllowedSignedMessageType', full_name='pb.AllowedSignedMessageType', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='ALLOW_SIGNED_PLACEHOLDER_DO_NOT_USE', index=0, number=0, serialized_options=None, type=None), ], containing_type=None, serialized_options=None, serialized_start=2317, serialized_end=2384, ) _sym_db.RegisterEnumDescriptor(_ALLOWEDSIGNEDMESSAGETYPE) AllowedSignedMessageType = enum_type_wrapper.EnumTypeWrapper(_ALLOWEDSIGNEDMESSAGETYPE) _ALLOWEDUNSIGNEDMESSAGETYPE = _descriptor.EnumDescriptor( name='AllowedUnsignedMessageType', full_name='pb.AllowedUnsignedMessageType', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='ALLOW_UNSIGNED_PLACEHOLDER_DO_NOT_USE', index=0, number=0, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_UNSIGNED_VOTE', index=1, number=1, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_UNSIGNED_I_HAVE_BLOCK_PROPOSAL', index=2, number=2, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_UNSIGNED_REQUEST_BLOCK_PROPOSAL', index=3, number=3, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_UNSIGNED_REQUEST_BLOCK_REPLY', index=4, number=4, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_UNSIGNED_GET_CONSENSUS_STATE', index=5, number=5, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_UNSIGNED_GET_CONSENSUS_STATE_REPLY', index=6, number=6, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_UNSIGNED_GET_BLOCK_HEADERS', index=7, number=7, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_UNSIGNED_GET_BLOCK_HEADERS_REPLY', index=8, number=8, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_UNSIGNED_GET_BLOCKS', index=9, number=9, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_UNSIGNED_GET_BLOCKS_REPLY', index=10, number=10, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_UNSIGNED_RELAY', index=11, number=11, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_UNSIGNED_TRANSACTIONS', index=12, number=12, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_UNSIGNED_BACKTRACK_SIGNATURE_CHAIN', index=13, number=13, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_UNSIGNED_REQUEST_PROPOSAL_TRANSACTIONS', index=14, number=14, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_UNSIGNED_REQUEST_PROPOSAL_TRANSACTIONS_REPLY', index=15, number=15, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_UNSIGNED_I_HAVE_SIGNATURE_CHAIN_TRANSACTION', index=16, number=16, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_UNSIGNED_REQUEST_SIGNATURE_CHAIN_TRANSACTION', index=17, number=17, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_UNSIGNED_REQUEST_SIGNATURE_CHAIN_TRANSACTION_REPLY', index=18, number=18, serialized_options=None, type=None), ], containing_type=None, serialized_options=None, serialized_start=2387, serialized_end=3228, ) _sym_db.RegisterEnumDescriptor(_ALLOWEDUNSIGNEDMESSAGETYPE) AllowedUnsignedMessageType = enum_type_wrapper.EnumTypeWrapper(_ALLOWEDUNSIGNEDMESSAGETYPE) _ALLOWEDDIRECTMESSAGETYPE = _descriptor.EnumDescriptor( name='AllowedDirectMessageType', full_name='pb.AllowedDirectMessageType', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='ALLOW_DIRECT_PLACEHOLDER_DO_NOT_USE', index=0, number=0, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_DIRECT_VOTE', index=1, number=1, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_DIRECT_I_HAVE_BLOCK_PROPOSAL', index=2, number=2, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_DIRECT_REQUEST_BLOCK_PROPOSAL', index=3, number=3, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_DIRECT_REQUEST_BLOCK_REPLY', index=4, number=4, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_DIRECT_GET_CONSENSUS_STATE', index=5, number=5, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_DIRECT_GET_CONSENSUS_STATE_REPLY', index=6, number=6, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_DIRECT_GET_BLOCK_HEADERS', index=7, number=7, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_DIRECT_GET_BLOCK_HEADERS_REPLY', index=8, number=8, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_DIRECT_GET_BLOCKS', index=9, number=9, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_DIRECT_GET_BLOCKS_REPLY', index=10, number=10, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_DIRECT_BACKTRACK_SIGNATURE_CHAIN', index=11, number=13, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_DIRECT_REQUEST_PROPOSAL_TRANSACTIONS', index=12, number=14, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_DIRECT_REQUEST_PROPOSAL_TRANSACTIONS_REPLY', index=13, number=15, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_DIRECT_I_HAVE_SIGNATURE_CHAIN_TRANSACTION', index=14, number=16, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_DIRECT_REQUEST_SIGNATURE_CHAIN_TRANSACTION', index=15, number=17, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_DIRECT_REQUEST_SIGNATURE_CHAIN_TRANSACTION_REPLY', index=16, number=18, serialized_options=None, type=None), ], containing_type=None, serialized_options=None, serialized_start=3231, serialized_end=3977, ) _sym_db.RegisterEnumDescriptor(_ALLOWEDDIRECTMESSAGETYPE) AllowedDirectMessageType = enum_type_wrapper.EnumTypeWrapper(_ALLOWEDDIRECTMESSAGETYPE) _ALLOWEDRELAYMESSAGETYPE = _descriptor.EnumDescriptor( name='AllowedRelayMessageType', full_name='pb.AllowedRelayMessageType', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='ALLOW_RELAY_PLACEHOLDER_DO_NOT_USE', index=0, number=0, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_RELAY_RELAY', index=1, number=11, serialized_options=None, type=None), ], containing_type=None, serialized_options=None, serialized_start=3979, serialized_end=4067, ) _sym_db.RegisterEnumDescriptor(_ALLOWEDRELAYMESSAGETYPE) AllowedRelayMessageType = enum_type_wrapper.EnumTypeWrapper(_ALLOWEDRELAYMESSAGETYPE) _ALLOWEDBROADCASTPUSHMESSAGETYPE = _descriptor.EnumDescriptor( name='AllowedBroadcastPushMessageType', full_name='pb.AllowedBroadcastPushMessageType', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='ALLOW_BROADCAST_PUSH_PLACEHOLDER_DO_NOT_USE', index=0, number=0, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_BROADCAST_PUSH_TRANSACTIONS', index=1, number=12, serialized_options=None, type=None), ], containing_type=None, serialized_options=None, serialized_start=4069, serialized_end=4190, ) _sym_db.RegisterEnumDescriptor(_ALLOWEDBROADCASTPUSHMESSAGETYPE) AllowedBroadcastPushMessageType = enum_type_wrapper.EnumTypeWrapper(_ALLOWEDBROADCASTPUSHMESSAGETYPE) _ALLOWEDBROADCASTPULLMESSAGETYPE = _descriptor.EnumDescriptor( name='AllowedBroadcastPullMessageType', full_name='pb.AllowedBroadcastPullMessageType', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='ALLOW_BROADCAST_PULL_PLACEHOLDER_DO_NOT_USE', index=0, number=0, serialized_options=None, type=None), ], containing_type=None, serialized_options=None, serialized_start=4192, serialized_end=4274, ) _sym_db.RegisterEnumDescriptor(_ALLOWEDBROADCASTPULLMESSAGETYPE) AllowedBroadcastPullMessageType = enum_type_wrapper.EnumTypeWrapper(_ALLOWEDBROADCASTPULLMESSAGETYPE) _ALLOWEDBROADCASTTREEMESSAGETYPE = _descriptor.EnumDescriptor( name='AllowedBroadcastTreeMessageType', full_name='pb.AllowedBroadcastTreeMessageType', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='ALLOW_BROADCAST_TREE_PLACEHOLDER_DO_NOT_USE', index=0, number=0, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='ALLOW_BROADCAST_TREE_TRANSACTIONS', index=1, number=12, serialized_options=None, type=None), ], containing_type=None, serialized_options=None, serialized_start=4276, serialized_end=4397, ) _sym_db.RegisterEnumDescriptor(_ALLOWEDBROADCASTTREEMESSAGETYPE) AllowedBroadcastTreeMessageType = enum_type_wrapper.EnumTypeWrapper(_ALLOWEDBROADCASTTREEMESSAGETYPE) _REQUESTTRANSACTIONTYPE = _descriptor.EnumDescriptor( name='RequestTransactionType', full_name='pb.RequestTransactionType', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='REQUEST_FULL_TRANSACTION', index=0, number=0, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='REQUEST_TRANSACTION_HASH', index=1, number=1, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( name='REQUEST_TRANSACTION_SHORT_HASH', index=2, number=2, serialized_options=None, type=None), ], containing_type=None, serialized_options=None, serialized_start=4399, serialized_end=4519, ) _sym_db.RegisterEnumDescriptor(_REQUESTTRANSACTIONTYPE) RequestTransactionType = enum_type_wrapper.EnumTypeWrapper(_REQUESTTRANSACTIONTYPE) MESSAGE_TYPE_PLACEHOLDER_DO_NOT_USE = 0 VOTE = 1 I_HAVE_BLOCK_PROPOSAL = 2 REQUEST_BLOCK_PROPOSAL = 3 REQUEST_BLOCK_PROPOSAL_REPLY = 4 GET_CONSENSUS_STATE = 5 GET_CONSENSUS_STATE_REPLY = 6 GET_BLOCK_HEADERS = 7 GET_BLOCK_HEADERS_REPLY = 8 GET_BLOCKS = 9 GET_BLOCKS_REPLY = 10 RELAY = 11 TRANSACTIONS = 12 BACKTRACK_SIGNATURE_CHAIN = 13 REQUEST_PROPOSAL_TRANSACTIONS = 14 REQUEST_PROPOSAL_TRANSACTIONS_REPLY = 15 I_HAVE_SIGNATURE_CHAIN_TRANSACTION = 16 REQUEST_SIGNATURE_CHAIN_TRANSACTION = 17 REQUEST_SIGNATURE_CHAIN_TRANSACTION_REPLY = 18 ALLOW_SIGNED_PLACEHOLDER_DO_NOT_USE = 0 ALLOW_UNSIGNED_PLACEHOLDER_DO_NOT_USE = 0 ALLOW_UNSIGNED_VOTE = 1 ALLOW_UNSIGNED_I_HAVE_BLOCK_PROPOSAL = 2 ALLOW_UNSIGNED_REQUEST_BLOCK_PROPOSAL = 3 ALLOW_UNSIGNED_REQUEST_BLOCK_REPLY = 4 ALLOW_UNSIGNED_GET_CONSENSUS_STATE = 5 ALLOW_UNSIGNED_GET_CONSENSUS_STATE_REPLY = 6 ALLOW_UNSIGNED_GET_BLOCK_HEADERS = 7 ALLOW_UNSIGNED_GET_BLOCK_HEADERS_REPLY = 8 ALLOW_UNSIGNED_GET_BLOCKS = 9 ALLOW_UNSIGNED_GET_BLOCKS_REPLY = 10 ALLOW_UNSIGNED_RELAY = 11 ALLOW_UNSIGNED_TRANSACTIONS = 12 ALLOW_UNSIGNED_BACKTRACK_SIGNATURE_CHAIN = 13 ALLOW_UNSIGNED_REQUEST_PROPOSAL_TRANSACTIONS = 14 ALLOW_UNSIGNED_REQUEST_PROPOSAL_TRANSACTIONS_REPLY = 15 ALLOW_UNSIGNED_I_HAVE_SIGNATURE_CHAIN_TRANSACTION = 16 ALLOW_UNSIGNED_REQUEST_SIGNATURE_CHAIN_TRANSACTION = 17 ALLOW_UNSIGNED_REQUEST_SIGNATURE_CHAIN_TRANSACTION_REPLY = 18 ALLOW_DIRECT_PLACEHOLDER_DO_NOT_USE = 0 ALLOW_DIRECT_VOTE = 1 ALLOW_DIRECT_I_HAVE_BLOCK_PROPOSAL = 2 ALLOW_DIRECT_REQUEST_BLOCK_PROPOSAL = 3 ALLOW_DIRECT_REQUEST_BLOCK_REPLY = 4 ALLOW_DIRECT_GET_CONSENSUS_STATE = 5 ALLOW_DIRECT_GET_CONSENSUS_STATE_REPLY = 6 ALLOW_DIRECT_GET_BLOCK_HEADERS = 7 ALLOW_DIRECT_GET_BLOCK_HEADERS_REPLY = 8 ALLOW_DIRECT_GET_BLOCKS = 9 ALLOW_DIRECT_GET_BLOCKS_REPLY = 10 ALLOW_DIRECT_BACKTRACK_SIGNATURE_CHAIN = 13 ALLOW_DIRECT_REQUEST_PROPOSAL_TRANSACTIONS = 14 ALLOW_DIRECT_REQUEST_PROPOSAL_TRANSACTIONS_REPLY = 15 ALLOW_DIRECT_I_HAVE_SIGNATURE_CHAIN_TRANSACTION = 16 ALLOW_DIRECT_REQUEST_SIGNATURE_CHAIN_TRANSACTION = 17 ALLOW_DIRECT_REQUEST_SIGNATURE_CHAIN_TRANSACTION_REPLY = 18 ALLOW_RELAY_PLACEHOLDER_DO_NOT_USE = 0 ALLOW_RELAY_RELAY = 11 ALLOW_BROADCAST_PUSH_PLACEHOLDER_DO_NOT_USE = 0 ALLOW_BROADCAST_PUSH_TRANSACTIONS = 12 ALLOW_BROADCAST_PULL_PLACEHOLDER_DO_NOT_USE = 0 ALLOW_BROADCAST_TREE_PLACEHOLDER_DO_NOT_USE = 0 ALLOW_BROADCAST_TREE_TRANSACTIONS = 12 REQUEST_FULL_TRANSACTION = 0 REQUEST_TRANSACTION_HASH = 1 REQUEST_TRANSACTION_SHORT_HASH = 2 _UNSIGNEDMESSAGE = _descriptor.Descriptor( name='UnsignedMessage', full_name='pb.UnsignedMessage', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='message_type', full_name='pb.UnsignedMessage.message_type', index=0, number=1, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='message', full_name='pb.UnsignedMessage.message', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=100, serialized_end=173, ) _SIGNEDMESSAGE = _descriptor.Descriptor( name='SignedMessage', full_name='pb.SignedMessage', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='message', full_name='pb.SignedMessage.message', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='signature', full_name='pb.SignedMessage.signature', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=175, serialized_end=226, ) _VOTE = _descriptor.Descriptor( name='Vote', full_name='pb.Vote', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='height', full_name='pb.Vote.height', index=0, number=1, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='block_hash', full_name='pb.Vote.block_hash', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=228, serialized_end=270, ) _IHAVEBLOCKPROPOSAL = _descriptor.Descriptor( name='IHaveBlockProposal', full_name='pb.IHaveBlockProposal', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='height', full_name='pb.IHaveBlockProposal.height', index=0, number=1, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='block_hash', full_name='pb.IHaveBlockProposal.block_hash', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=272, serialized_end=328, ) _REQUESTBLOCKPROPOSAL = _descriptor.Descriptor( name='RequestBlockProposal', full_name='pb.RequestBlockProposal', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='block_hash', full_name='pb.RequestBlockProposal.block_hash', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='type', full_name='pb.RequestBlockProposal.type', index=1, number=2, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='short_hash_salt', full_name='pb.RequestBlockProposal.short_hash_salt', index=2, number=3, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='short_hash_size', full_name='pb.RequestBlockProposal.short_hash_size', index=3, number=4, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=331, serialized_end=465, ) _REQUESTBLOCKPROPOSALREPLY = _descriptor.Descriptor( name='RequestBlockProposalReply', full_name='pb.RequestBlockProposalReply', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='block', full_name='pb.RequestBlockProposalReply.block', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='transactions_hash', full_name='pb.RequestBlockProposalReply.transactions_hash', index=1, number=2, type=12, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=467, serialized_end=547, ) _REQUESTPROPOSALTRANSACTIONS = _descriptor.Descriptor( name='RequestProposalTransactions', full_name='pb.RequestProposalTransactions', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='block_hash', full_name='pb.RequestProposalTransactions.block_hash', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='type', full_name='pb.RequestProposalTransactions.type', index=1, number=2, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='short_hash_salt', full_name='pb.RequestProposalTransactions.short_hash_salt', index=2, number=3, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='short_hash_size', full_name='pb.RequestProposalTransactions.short_hash_size', index=3, number=4, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='transactions_hash', full_name='pb.RequestProposalTransactions.transactions_hash', index=4, number=5, type=12, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=550, serialized_end=718, ) _REQUESTPROPOSALTRANSACTIONSREPLY = _descriptor.Descriptor( name='RequestProposalTransactionsReply', full_name='pb.RequestProposalTransactionsReply', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='transactions', full_name='pb.RequestProposalTransactionsReply.transactions', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=720, serialized_end=793, ) _GETCONSENSUSSTATE = _descriptor.Descriptor( name='GetConsensusState', full_name='pb.GetConsensusState', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=795, serialized_end=814, ) _GETCONSENSUSSTATEREPLY = _descriptor.Descriptor( name='GetConsensusStateReply', full_name='pb.GetConsensusStateReply', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='ledger_block_hash', full_name='pb.GetConsensusStateReply.ledger_block_hash', index=0, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='ledger_height', full_name='pb.GetConsensusStateReply.ledger_height', index=1, number=1, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='consensus_height', full_name='pb.GetConsensusStateReply.consensus_height', index=2, number=3, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='min_verifiable_height', full_name='pb.GetConsensusStateReply.min_verifiable_height', index=3, number=5, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='sync_state', full_name='pb.GetConsensusStateReply.sync_state', index=4, number=4, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=817, serialized_end=983, ) _GETBLOCKHEADERS = _descriptor.Descriptor( name='GetBlockHeaders', full_name='pb.GetBlockHeaders', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='start_height', full_name='pb.GetBlockHeaders.start_height', index=0, number=1, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='end_height', full_name='pb.GetBlockHeaders.end_height', index=1, number=2, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=985, serialized_end=1044, ) _GETBLOCKHEADERSREPLY = _descriptor.Descriptor( name='GetBlockHeadersReply', full_name='pb.GetBlockHeadersReply', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='block_headers', full_name='pb.GetBlockHeadersReply.block_headers', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1046, serialized_end=1103, ) _GETBLOCKS = _descriptor.Descriptor( name='GetBlocks', full_name='pb.GetBlocks', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='start_height', full_name='pb.GetBlocks.start_height', index=0, number=1, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='end_height', full_name='pb.GetBlocks.end_height', index=1, number=2, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1105, serialized_end=1158, ) _GETBLOCKSREPLY = _descriptor.Descriptor( name='GetBlocksReply', full_name='pb.GetBlocksReply', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='blocks', full_name='pb.GetBlocksReply.blocks', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1160, serialized_end=1203, ) _RELAY = _descriptor.Descriptor( name='Relay', full_name='pb.Relay', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='src_identifier', full_name='pb.Relay.src_identifier', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='src_pubkey', full_name='pb.Relay.src_pubkey', index=1, number=6, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='dest_id', full_name='pb.Relay.dest_id', index=2, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='payload', full_name='pb.Relay.payload', index=3, number=3, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='max_holding_seconds', full_name='pb.Relay.max_holding_seconds', index=4, number=5, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='block_hash', full_name='pb.Relay.block_hash', index=5, number=7, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='last_signature', full_name='pb.Relay.last_signature', index=6, number=8, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='sig_chain_len', full_name='pb.Relay.sig_chain_len', index=7, number=9, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1206, serialized_end=1387, ) _TRANSACTIONS = _descriptor.Descriptor( name='Transactions', full_name='pb.Transactions', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='transactions', full_name='pb.Transactions.transactions', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1389, serialized_end=1442, ) _BACKTRACKSIGNATURECHAIN = _descriptor.Descriptor( name='BacktrackSignatureChain', full_name='pb.BacktrackSignatureChain', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='sig_chain_elems', full_name='pb.BacktrackSignatureChain.sig_chain_elems', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='prev_signature', full_name='pb.BacktrackSignatureChain.prev_signature', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1444, serialized_end=1536, ) _IHAVESIGNATURECHAINTRANSACTION = _descriptor.Descriptor( name='IHaveSignatureChainTransaction', full_name='pb.IHaveSignatureChainTransaction', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='height', full_name='pb.IHaveSignatureChainTransaction.height', index=0, number=1, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='signature_hash', full_name='pb.IHaveSignatureChainTransaction.signature_hash', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1538, serialized_end=1610, ) _REQUESTSIGNATURECHAINTRANSACTION = _descriptor.Descriptor( name='RequestSignatureChainTransaction', full_name='pb.RequestSignatureChainTransaction', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='signature_hash', full_name='pb.RequestSignatureChainTransaction.signature_hash', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1612, serialized_end=1670, ) _REQUESTSIGNATURECHAINTRANSACTIONREPLY = _descriptor.Descriptor( name='RequestSignatureChainTransactionReply', full_name='pb.RequestSignatureChainTransactionReply', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='transaction', full_name='pb.RequestSignatureChainTransactionReply.transaction', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1672, serialized_end=1749, ) _UNSIGNEDMESSAGE.fields_by_name['message_type'].enum_type = _MESSAGETYPE _REQUESTBLOCKPROPOSAL.fields_by_name['type'].enum_type = _REQUESTTRANSACTIONTYPE _REQUESTBLOCKPROPOSALREPLY.fields_by_name['block'].message_type = pb_dot_block__pb2._BLOCK _REQUESTPROPOSALTRANSACTIONS.fields_by_name['type'].enum_type = _REQUESTTRANSACTIONTYPE _REQUESTPROPOSALTRANSACTIONSREPLY.fields_by_name['transactions'].message_type = pb_dot_transaction__pb2._TRANSACTION _GETCONSENSUSSTATEREPLY.fields_by_name['sync_state'].enum_type = pb_dot_node__pb2._SYNCSTATE _GETBLOCKHEADERSREPLY.fields_by_name['block_headers'].message_type = pb_dot_block__pb2._HEADER _GETBLOCKSREPLY.fields_by_name['blocks'].message_type = pb_dot_block__pb2._BLOCK _TRANSACTIONS.fields_by_name['transactions'].message_type = pb_dot_transaction__pb2._TRANSACTION _BACKTRACKSIGNATURECHAIN.fields_by_name['sig_chain_elems'].message_type = pb_dot_sigchain__pb2._SIGCHAINELEM _REQUESTSIGNATURECHAINTRANSACTIONREPLY.fields_by_name['transaction'].message_type = pb_dot_transaction__pb2._TRANSACTION DESCRIPTOR.message_types_by_name['UnsignedMessage'] = _UNSIGNEDMESSAGE DESCRIPTOR.message_types_by_name['SignedMessage'] = _SIGNEDMESSAGE DESCRIPTOR.message_types_by_name['Vote'] = _VOTE DESCRIPTOR.message_types_by_name['IHaveBlockProposal'] = _IHAVEBLOCKPROPOSAL DESCRIPTOR.message_types_by_name['RequestBlockProposal'] = _REQUESTBLOCKPROPOSAL DESCRIPTOR.message_types_by_name['RequestBlockProposalReply'] = _REQUESTBLOCKPROPOSALREPLY DESCRIPTOR.message_types_by_name['RequestProposalTransactions'] = _REQUESTPROPOSALTRANSACTIONS DESCRIPTOR.message_types_by_name['RequestProposalTransactionsReply'] = _REQUESTPROPOSALTRANSACTIONSREPLY DESCRIPTOR.message_types_by_name['GetConsensusState'] = _GETCONSENSUSSTATE DESCRIPTOR.message_types_by_name['GetConsensusStateReply'] = _GETCONSENSUSSTATEREPLY DESCRIPTOR.message_types_by_name['GetBlockHeaders'] = _GETBLOCKHEADERS DESCRIPTOR.message_types_by_name['GetBlockHeadersReply'] = _GETBLOCKHEADERSREPLY DESCRIPTOR.message_types_by_name['GetBlocks'] = _GETBLOCKS DESCRIPTOR.message_types_by_name['GetBlocksReply'] = _GETBLOCKSREPLY DESCRIPTOR.message_types_by_name['Relay'] = _RELAY DESCRIPTOR.message_types_by_name['Transactions'] = _TRANSACTIONS DESCRIPTOR.message_types_by_name['BacktrackSignatureChain'] = _BACKTRACKSIGNATURECHAIN DESCRIPTOR.message_types_by_name['IHaveSignatureChainTransaction'] = _IHAVESIGNATURECHAINTRANSACTION DESCRIPTOR.message_types_by_name['RequestSignatureChainTransaction'] = _REQUESTSIGNATURECHAINTRANSACTION DESCRIPTOR.message_types_by_name['RequestSignatureChainTransactionReply'] = _REQUESTSIGNATURECHAINTRANSACTIONREPLY DESCRIPTOR.enum_types_by_name['MessageType'] = _MESSAGETYPE DESCRIPTOR.enum_types_by_name['AllowedSignedMessageType'] = _ALLOWEDSIGNEDMESSAGETYPE DESCRIPTOR.enum_types_by_name['AllowedUnsignedMessageType'] = _ALLOWEDUNSIGNEDMESSAGETYPE DESCRIPTOR.enum_types_by_name['AllowedDirectMessageType'] = _ALLOWEDDIRECTMESSAGETYPE DESCRIPTOR.enum_types_by_name['AllowedRelayMessageType'] = _ALLOWEDRELAYMESSAGETYPE DESCRIPTOR.enum_types_by_name['AllowedBroadcastPushMessageType'] = _ALLOWEDBROADCASTPUSHMESSAGETYPE DESCRIPTOR.enum_types_by_name['AllowedBroadcastPullMessageType'] = _ALLOWEDBROADCASTPULLMESSAGETYPE DESCRIPTOR.enum_types_by_name['AllowedBroadcastTreeMessageType'] = _ALLOWEDBROADCASTTREEMESSAGETYPE DESCRIPTOR.enum_types_by_name['RequestTransactionType'] = _REQUESTTRANSACTIONTYPE _sym_db.RegisterFileDescriptor(DESCRIPTOR) UnsignedMessage = _reflection.GeneratedProtocolMessageType('UnsignedMessage', (_message.Message,), dict( DESCRIPTOR = _UNSIGNEDMESSAGE, __module__ = 'pb.nodemessage_pb2' # @@protoc_insertion_point(class_scope:pb.UnsignedMessage) )) _sym_db.RegisterMessage(UnsignedMessage) SignedMessage = _reflection.GeneratedProtocolMessageType('SignedMessage', (_message.Message,), dict( DESCRIPTOR = _SIGNEDMESSAGE, __module__ = 'pb.nodemessage_pb2' # @@protoc_insertion_point(class_scope:pb.SignedMessage) )) _sym_db.RegisterMessage(SignedMessage) Vote = _reflection.GeneratedProtocolMessageType('Vote', (_message.Message,), dict( DESCRIPTOR = _VOTE, __module__ = 'pb.nodemessage_pb2' # @@protoc_insertion_point(class_scope:pb.Vote) )) _sym_db.RegisterMessage(Vote) IHaveBlockProposal = _reflection.GeneratedProtocolMessageType('IHaveBlockProposal', (_message.Message,), dict( DESCRIPTOR = _IHAVEBLOCKPROPOSAL, __module__ = 'pb.nodemessage_pb2' # @@protoc_insertion_point(class_scope:pb.IHaveBlockProposal) )) _sym_db.RegisterMessage(IHaveBlockProposal) RequestBlockProposal = _reflection.GeneratedProtocolMessageType('RequestBlockProposal', (_message.Message,), dict( DESCRIPTOR = _REQUESTBLOCKPROPOSAL, __module__ = 'pb.nodemessage_pb2' # @@protoc_insertion_point(class_scope:pb.RequestBlockProposal) )) _sym_db.RegisterMessage(RequestBlockProposal) RequestBlockProposalReply = _reflection.GeneratedProtocolMessageType('RequestBlockProposalReply', (_message.Message,), dict( DESCRIPTOR = _REQUESTBLOCKPROPOSALREPLY, __module__ = 'pb.nodemessage_pb2' # @@protoc_insertion_point(class_scope:pb.RequestBlockProposalReply) )) _sym_db.RegisterMessage(RequestBlockProposalReply) RequestProposalTransactions = _reflection.GeneratedProtocolMessageType('RequestProposalTransactions', (_message.Message,), dict( DESCRIPTOR = _REQUESTPROPOSALTRANSACTIONS, __module__ = 'pb.nodemessage_pb2' # @@protoc_insertion_point(class_scope:pb.RequestProposalTransactions) )) _sym_db.RegisterMessage(RequestProposalTransactions) RequestProposalTransactionsReply = _reflection.GeneratedProtocolMessageType('RequestProposalTransactionsReply', (_message.Message,), dict( DESCRIPTOR = _REQUESTPROPOSALTRANSACTIONSREPLY, __module__ = 'pb.nodemessage_pb2' # @@protoc_insertion_point(class_scope:pb.RequestProposalTransactionsReply) )) _sym_db.RegisterMessage(RequestProposalTransactionsReply) GetConsensusState = _reflection.GeneratedProtocolMessageType('GetConsensusState', (_message.Message,), dict( DESCRIPTOR = _GETCONSENSUSSTATE, __module__ = 'pb.nodemessage_pb2' # @@protoc_insertion_point(class_scope:pb.GetConsensusState) )) _sym_db.RegisterMessage(GetConsensusState) GetConsensusStateReply = _reflection.GeneratedProtocolMessageType('GetConsensusStateReply', (_message.Message,), dict( DESCRIPTOR = _GETCONSENSUSSTATEREPLY, __module__ = 'pb.nodemessage_pb2' # @@protoc_insertion_point(class_scope:pb.GetConsensusStateReply) )) _sym_db.RegisterMessage(GetConsensusStateReply) GetBlockHeaders = _reflection.GeneratedProtocolMessageType('GetBlockHeaders', (_message.Message,), dict( DESCRIPTOR = _GETBLOCKHEADERS, __module__ = 'pb.nodemessage_pb2' # @@protoc_insertion_point(class_scope:pb.GetBlockHeaders) )) _sym_db.RegisterMessage(GetBlockHeaders) GetBlockHeadersReply = _reflection.GeneratedProtocolMessageType('GetBlockHeadersReply', (_message.Message,), dict( DESCRIPTOR = _GETBLOCKHEADERSREPLY, __module__ = 'pb.nodemessage_pb2' # @@protoc_insertion_point(class_scope:pb.GetBlockHeadersReply) )) _sym_db.RegisterMessage(GetBlockHeadersReply) GetBlocks = _reflection.GeneratedProtocolMessageType('GetBlocks', (_message.Message,), dict( DESCRIPTOR = _GETBLOCKS, __module__ = 'pb.nodemessage_pb2' # @@protoc_insertion_point(class_scope:pb.GetBlocks) )) _sym_db.RegisterMessage(GetBlocks) GetBlocksReply = _reflection.GeneratedProtocolMessageType('GetBlocksReply', (_message.Message,), dict( DESCRIPTOR = _GETBLOCKSREPLY, __module__ = 'pb.nodemessage_pb2' # @@protoc_insertion_point(class_scope:pb.GetBlocksReply) )) _sym_db.RegisterMessage(GetBlocksReply) Relay = _reflection.GeneratedProtocolMessageType('Relay', (_message.Message,), dict( DESCRIPTOR = _RELAY, __module__ = 'pb.nodemessage_pb2' # @@protoc_insertion_point(class_scope:pb.Relay) )) _sym_db.RegisterMessage(Relay) Transactions = _reflection.GeneratedProtocolMessageType('Transactions', (_message.Message,), dict( DESCRIPTOR = _TRANSACTIONS, __module__ = 'pb.nodemessage_pb2' # @@protoc_insertion_point(class_scope:pb.Transactions) )) _sym_db.RegisterMessage(Transactions) BacktrackSignatureChain = _reflection.GeneratedProtocolMessageType('BacktrackSignatureChain', (_message.Message,), dict( DESCRIPTOR = _BACKTRACKSIGNATURECHAIN, __module__ = 'pb.nodemessage_pb2' # @@protoc_insertion_point(class_scope:pb.BacktrackSignatureChain) )) _sym_db.RegisterMessage(BacktrackSignatureChain) IHaveSignatureChainTransaction = _reflection.GeneratedProtocolMessageType('IHaveSignatureChainTransaction', (_message.Message,), dict( DESCRIPTOR = _IHAVESIGNATURECHAINTRANSACTION, __module__ = 'pb.nodemessage_pb2' # @@protoc_insertion_point(class_scope:pb.IHaveSignatureChainTransaction) )) _sym_db.RegisterMessage(IHaveSignatureChainTransaction) RequestSignatureChainTransaction = _reflection.GeneratedProtocolMessageType('RequestSignatureChainTransaction', (_message.Message,), dict( DESCRIPTOR = _REQUESTSIGNATURECHAINTRANSACTION, __module__ = 'pb.nodemessage_pb2' # @@protoc_insertion_point(class_scope:pb.RequestSignatureChainTransaction) )) _sym_db.RegisterMessage(RequestSignatureChainTransaction) RequestSignatureChainTransactionReply = _reflection.GeneratedProtocolMessageType('RequestSignatureChainTransactionReply', (_message.Message,), dict( DESCRIPTOR = _REQUESTSIGNATURECHAINTRANSACTIONREPLY, __module__ = 'pb.nodemessage_pb2' # @@protoc_insertion_point(class_scope:pb.RequestSignatureChainTransactionReply) )) _sym_db.RegisterMessage(RequestSignatureChainTransactionReply) # @@protoc_insertion_point(module_scope)
39.820875
6,641
0.770673
6,969
59,134
6.192854
0.055532
0.04319
0.069095
0.038232
0.664906
0.608809
0.576023
0.546365
0.528847
0.519857
0
0.038428
0.120303
59,134
1,484
6,642
39.847709
0.791215
0.023844
0
0.637418
1
0.003626
0.211307
0.174599
0
0
0
0
0
1
0
false
0
0.007252
0
0.007252
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
8d647c010b221aef04cd290d2c7382424836c4d6
2,123
py
Python
clients/Python/ChessPieces.py
MartinThoma/community-chess
5e482c3d166e95f74242cbd82387f5265aa73740
[ "MIT" ]
null
null
null
clients/Python/ChessPieces.py
MartinThoma/community-chess
5e482c3d166e95f74242cbd82387f5265aa73740
[ "MIT" ]
null
null
null
clients/Python/ChessPieces.py
MartinThoma/community-chess
5e482c3d166e95f74242cbd82387f5265aa73740
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- class ChessPiece(object): """ This is a super class for chess pieces """ def __init__(self, letter, value, x, y): self.letter = letter self.color = self.getColor() self.value = value self.x = x self.y = y def __str__(self): return self.letter def __repr__(self): pythonRepresentation = ("Piece:\t%s\n" % self.letter) pythonRepresentation += ("Value:\t%i\n" % self.value) pythonRepresentation += ("Position:\t(%i|%i)\n" % (self.x, self.y)) return pythonRepresentation #return self.letter def getColor(self): if self.letter.isupper(): color = 'white' else: color = 'black' self.color = color def standardMoves(self): """ Get a list of vectors for the standard moves. """ return [] def captureMoves(self): """ Get a list of vectors for the caputure moves. """ return [] class Pawn(ChessPiece): """ This is a pawn class """ def __init__(self, letter, x, y): ChessPiece.__init__(self, letter, 1, x, y) def standardMoves(self): if self.color == 'white': return [(0,1)] else: return [(0,-1)] def captureMoves(self): if self.color == 'white': return [(1,1), (-1,1)] else: return [(1,-1), (-1,-1)] class King(ChessPiece): """ This is a king class """ def __init__(self, letter, x, y): ChessPiece.__init__(self, letter, 1, x, y) self.moves = [(0,1),(1,0),(0,-1),(-1,0),(1,1),(-1,1),(1,-1),(-1,-1)] def standardMoves(self): return self.moves def captureMoves(self): return self.moves class Knight(ChessPiece): """ This is a king class """ def __init__(self, letter, x, y): ChessPiece.__init__(self, letter, 1, x, y) self.moves = [(1,2),(-1,2),(1,-2),(-1,-2),(2,1),(-2,1),(2,-1),(-2,-1)] def standardMoves(self): return self.moves def captureMoves(self): return self.moves
27.217949
78
0.535092
274
2,123
4.014599
0.20438
0.027273
0.027273
0.025455
0.45
0.437273
0.39
0.37
0.320909
0.320909
0
0.032193
0.297692
2,123
77
79
27.571429
0.705567
0.120584
0
0.471698
0
0
0.035011
0
0
0
0
0
0
1
0.283019
false
0
0
0.09434
0.584906
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
8d6678a451448268d4642ea22c58bdf94fc40767
3,907
py
Python
clevr_parser/parser.py
raeidsaqur/clevr_parser
9edf5975075b7fa01e944740f571b18e1b40f02a
[ "MIT" ]
3
2020-12-21T06:28:29.000Z
2021-12-13T19:17:25.000Z
clevr_parser/parser.py
raeidsaqur/clevr_parser
9edf5975075b7fa01e944740f571b18e1b40f02a
[ "MIT" ]
1
2020-10-25T20:13:26.000Z
2020-10-25T20:13:26.000Z
clevr_parser/parser.py
raeidsaqur/clevr-parser
9edf5975075b7fa01e944740f571b18e1b40f02a
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # File: parser.py # Author: Raeid Saqur # Email: rsaqur@cs.princeton.edu # Created on: 2020-05-02 # # This file is part of CLEVR-PARSER # Distributed under terms of the MIT License from .utils import trace __all__ = ['Parser', 'get_default_parser', 'parse'] def _load_backends(): from . import backends class Parser(object): """ Example:: >>> parser = Parser(backend, **init_kwargs) >>> graph = parser.parse('Thre is a large red rubber ball to the right of a green cylinder') """ _default_backend = 'spacy' _backend_registry = dict() def __init__(self, backend=None, **kwargs): _load_backends() self.backend = backend if self.backend is None: self.backend = type(self)._default_backend if self.backend not in type(self)._backend_registry: raise ValueError('Unknown backend: {}.'.format(self.backend)) self._init_kwargs = kwargs self._inst = type(self)._backend_registry[self.backend](**kwargs) #print(f"Instantiated parser {type(self._inst)} at {hex(id(self._inst))}") def __call__(self, *args, **kwargs): return self.unwrapped(self) @property def init_kwargs(self): """ Get the keyward arguments used for initializing the backend. """ return self._init_kwargs @property def unwrapped(self): """ Get the backend. """ return self._inst def parse(self, sentence, *args, **kwargs): """ Parse a sentence into a scene graph. Args: sentence (str): the input sentence. Returns: graph (dict): the parsed scene graph. Please refer to the README file for the specification of the return value. """ return self.unwrapped.parse(sentence, *args, **kwargs) @classmethod def register_backend(cls, backend): """ Register a class as the backend. The backend should implement a method named `parse` having the following signature: `parse(sentence, <other_keyward_arguments>)`. To register your customized backend as the parser, use this class method as a decorator on your class. Example:: >>> @Parser.register_backend >>> class CustomizedBackend(Backend): >>> # Your implementation follows... >>> pass """ try: cls._backend_registry[backend.__identifier__] = backend except Exception as e: raise ImportError('Unable to register backend: {}.'.format(backend.__name__)) from e def get_backend(self, identifier=None, **kwargs): if identifier is None: return self._default_backend if identifier in self._backend_registry: _backend = self._backend_registry[identifier] if _backend == type(self._inst): # Already instantiated return self._inst return _backend(**kwargs) # --------------------------------------------------------------------------# _default_parser = None def get_default_parser(): """ Get the default parser. The default parser is a global one (singleton). """ global _default_parser if _default_parser is None: _default_parser = Parser() return _default_parser def parse(sentence, *args, **kwargs): """ Parse the sentence using the default parser. This ia an easy-to-use feature for those who do not want to configure their own parsers and want to use the parser at different places in their codes. Please note that the default parser is a singleton. Thus, if you are using a stateful parser, you need to be careful about sharing this parser everywhere. """ return get_default_parser().parse(sentence, *args, **kwargs)
30.053846
96
0.618633
460
3,907
5.084783
0.358696
0.066695
0.032493
0.0295
0.016246
0
0
0
0
0
0
0.003498
0.268237
3,907
129
97
30.286822
0.814621
0.420783
0
0.083333
0
0
0.043191
0
0
0
0
0
0
1
0.208333
false
0
0.0625
0.020833
0.520833
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
8d6ae4388678b8b9e1893a71c3845abad8a45685
508
py
Python
synergy/workers/identity_worker.py
hwknsj/scheduler
6740331360f49083c208085fb5a60ce80ebf418b
[ "BSD-3-Clause" ]
15
2015-02-01T09:20:23.000Z
2021-04-27T08:46:45.000Z
synergy/workers/identity_worker.py
hwknsj/scheduler
6740331360f49083c208085fb5a60ce80ebf418b
[ "BSD-3-Clause" ]
26
2015-01-12T22:28:40.000Z
2021-07-05T01:22:17.000Z
synergy/workers/identity_worker.py
hwknsj/scheduler
6740331360f49083c208085fb5a60ce80ebf418b
[ "BSD-3-Clause" ]
2
2016-07-21T03:02:46.000Z
2019-10-03T23:59:23.000Z
__author__ = 'Bohdan Mushkevych' from synergy.db.model import unit_of_work from synergy.workers.abstract_uow_aware_worker import AbstractUowAwareWorker class IdentityWorker(AbstractUowAwareWorker): """ Marks any incoming unit_of_work as <complete> """ def __init__(self, process_name): super(IdentityWorker, self).__init__(process_name) def __del__(self): super(IdentityWorker, self).__del__() def _process_uow(self, uow): return 0, unit_of_work.STATE_PROCESSED
28.222222
76
0.751969
61
508
5.704918
0.57377
0.051724
0.086207
0
0
0
0
0
0
0
0
0.002353
0.163386
508
17
77
29.882353
0.816471
0.088583
0
0
0
0
0.037363
0
0
0
0
0
0
1
0.3
false
0
0.2
0.1
0.7
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
8d6d949c0094001eced34498f5ac03c00400d952
557
py
Python
app.py
geekwhocodes/twitter_sentiment_analysis_tb
c770276d65970608a02e779e1f1c08226fccc49b
[ "Apache-2.0" ]
null
null
null
app.py
geekwhocodes/twitter_sentiment_analysis_tb
c770276d65970608a02e779e1f1c08226fccc49b
[ "Apache-2.0" ]
null
null
null
app.py
geekwhocodes/twitter_sentiment_analysis_tb
c770276d65970608a02e779e1f1c08226fccc49b
[ "Apache-2.0" ]
null
null
null
import streamListener import helper import old_stats import credentials from tweepy import OAuthHandler from tweepy import Stream if __name__ == '__main__': TwitterStreamListner = streamListener.TwitterStreamListener() access_token, access_token_secret, consumer_key, consumer_secret = credentials.getCredentials() auth = OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_token_secret) stream = Stream(auth, TwitterStreamListner) stream.filter(track=helper.getHandlesToTrack(), async=False)
34.8125
99
0.807899
60
557
7.15
0.466667
0.128205
0.118881
0.153846
0.130536
0
0
0
0
0
0
0
0.125673
557
15
100
37.133333
0.880903
0
0
0
0
0
0.014363
0
0
0
0
0
0
0
null
null
0
0.461538
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
0
1
0
0
0
0
2
8d72bcd1a2de5e172cb8310802b1fdcb1ad359b7
38,024
py
Python
vmflib2/games/portal.py
Trainzack/vmflib2
9bc9803b3c8c644346b5a5eb864c0deaf544d8a6
[ "BSD-2-Clause" ]
1
2021-02-11T17:52:48.000Z
2021-02-11T17:52:48.000Z
vmflib2/games/portal.py
Trainzack/vmflib2
9bc9803b3c8c644346b5a5eb864c0deaf544d8a6
[ "BSD-2-Clause" ]
null
null
null
vmflib2/games/portal.py
Trainzack/vmflib2
9bc9803b3c8c644346b5a5eb864c0deaf544d8a6
[ "BSD-2-Clause" ]
1
2021-02-12T18:56:51.000Z
2021-02-12T18:56:51.000Z
""" Helper classes for creating maps in any Source Engine game that uses portal.fgd. This file was auto-generated by import_fgd.py on 2020-01-19 09:11:17.468094. """ from vmflib2.vmf import * class EnvLightrailEndpoint(Entity): """ Auto-generated from portal.fgd, line 338. Special effects for the endpoints of the lightrail. """ def __init__(self, vmf_map: "ValveMap", origin: "Origin"="0 0 0", angles: "Origin"="0 0 0", targetname: str="", parentname: str="", spawnflags="", small_fx_scale: float=1, large_fx_scale: float=1): Entity.__init__(self, "env_lightrail_endpoint", vmf_map) # Origin : This entity's location in 3D space. self.origin: "Origin" = origin # Pitch Yaw Roll (Y Z X) : This entity's orientation in the world. Pitch is rotation around the Y axis, self.angles: "Origin" = angles # Name : The name that other entities refer to this entity by. self.targetname: str = targetname # Parent : The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent. self.parentname: str = parentname # TODO: Replace this filler. : self.spawnflags = spawnflags # Scale Small FX : Scale of the small effect. 1 is the default size, 2 is twice that, etc. self.small_fx_scale: float = small_fx_scale # Scale Large FX : Scale of the large effect. 1 is the default size, 2 is twice that, etc. self.large_fx_scale: float = large_fx_scale self.auto_properties.extend(["origin", "angles", "targetname", "parentname", "spawnflags", "small_fx_scale", "large_fx_scale"]) class EnvPortalCredits(Entity): """ Auto-generated from portal.fgd, line 364. An entity to control the rolling credits for portal. """ def __init__(self, vmf_map: "ValveMap", origin: "Origin"="0 0 0", targetname: str=""): Entity.__init__(self, "env_portal_credits", vmf_map) # Origin : This entity's location in 3D space. self.origin: "Origin" = origin # Name : The name that other entities refer to this entity by. self.targetname: str = targetname self.auto_properties.extend(["origin", "targetname"]) class EnvPortalPathTrack(Entity): """ Auto-generated from portal.fgd, line 45. An entity used to build paths for other entities to follow. Each path_track is a node on the path, each holding the name of the next path_track in the path. """ def __init__(self, vmf_map: "ValveMap", origin: "Origin"="0 0 0", targetname: str="", parentname: str="", angles: "Origin"="0 0 0", spawnflags="", Track_beam_scale: float=0, End_point_scale: float=0, End_point_fadeout: float=0, End_point_fadein: float=0, target: str="", altpath: str="", speed: float=0, radius: float=0, orientationtype=1): Entity.__init__(self, "env_portal_path_track", vmf_map) # Origin : This entity's location in 3D space. self.origin: "Origin" = origin # Name : The name that other entities refer to this entity by. self.targetname: str = targetname # Parent : The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent. self.parentname: str = parentname # Pitch Yaw Roll (Y Z X) : This entity's orientation in the world. Pitch is rotation around the Y axis, self.angles: "Origin" = angles # TODO: Replace this filler. : self.spawnflags = spawnflags # Scale Track FX : The amount to scale the track FX size self.Track_beam_scale: float = Track_beam_scale # Scale Endpoint FX : The amount to scale the endpoint FX size. self.End_point_scale: float = End_point_scale # Fade Out Endpoint : Amount of time to fade out the endpoint FX self.End_point_fadeout: float = End_point_fadeout # Fade In Endpoint : Amount of time to fade in the endpoint FX self.End_point_fadein: float = End_point_fadein # Next Stop Target : The next path_track in the path. self.target: str = target # Branch Path : An alternative path_track to be the next node in the path. Useful for making branching paths. Use the ToggleAlternatePath / EnableAlternatePath inputs to make the alternative path active. self.altpath: str = altpath # New Train Speed : When the train reaches this path_track, it will set its speed to this speed. self.speed: float = speed # Path radius : Used by NPCs who follow track paths (attack chopper/gunship). This tells them the maximum distance they're allowed to be from the path at this node. self.radius: float = radius # Orientation Type : The way that the path follower faces as it moves through this path track. self.orientationtype = orientationtype self.auto_properties.extend(["origin", "targetname", "parentname", "angles", "spawnflags", "Track_beam_scale", "End_point_scale", "End_point_fadeout", "End_point_fadein", "target", "altpath", "speed", "radius", "orientationtype"]) class FuncLiquidportal(Entity): """ Auto-generated from portal.fgd, line 174. A space that fills with portal liquid and teleports entities when done filling """ def __init__(self, vmf_map: "ValveMap", origin: "Origin"="", angles: "Origin"="0 0 0", InitialLinkedPortal: str="", FillTime: float=10): Entity.__init__(self, "func_liquidportal", vmf_map) # Origin (X Y Z) : The position of this entity's center in the world. Rotating entities typically rotate around their origin. self.origin: "Origin" = origin # Pitch Yaw Roll (Y Z X) : This entity's orientation in the world. Pitch is rotation around the Y axis, self.angles: "Origin" = angles # Linked liquid portal. : self.InitialLinkedPortal: str = InitialLinkedPortal # Fill Time (sec) : How long the volume takes to fill in seconds. self.FillTime: float = FillTime self.auto_properties.extend(["origin", "angles", "InitialLinkedPortal", "FillTime"]) class FuncNoportalVolume(Entity): """ Auto-generated from portal.fgd, line 127. A region in which no portal can be placed """ def __init__(self, vmf_map: "ValveMap", targetname: str="", parentname: str="", spawnflags=""): Entity.__init__(self, "func_noportal_volume", vmf_map) # Name : The name that other entities refer to this entity by. self.targetname: str = targetname # Parent : The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent. self.parentname: str = parentname # TODO: Replace this filler. : self.spawnflags = spawnflags self.auto_properties.extend(["targetname", "parentname", "spawnflags"]) class FuncPortalBumper(Entity): """ Auto-generated from portal.fgd, line 140. A region that portals trace to fit outside of but can be place on """ def __init__(self, vmf_map: "ValveMap", targetname: str="", parentname: str="", spawnflags=""): Entity.__init__(self, "func_portal_bumper", vmf_map) # Name : The name that other entities refer to this entity by. self.targetname: str = targetname # Parent : The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent. self.parentname: str = parentname # TODO: Replace this filler. : self.spawnflags = spawnflags self.auto_properties.extend(["targetname", "parentname", "spawnflags"]) class FuncPortalDetector(Entity): """ Auto-generated from portal.fgd, line 154. A region that fires an output if a portal is placed in it """ def __init__(self, vmf_map: "ValveMap", targetname: str="", parentname: str="", spawnflags="", LinkageGroupID: int=0): Entity.__init__(self, "func_portal_detector", vmf_map) # Name : The name that other entities refer to this entity by. self.targetname: str = targetname # Parent : The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent. self.parentname: str = parentname # TODO: Replace this filler. : self.spawnflags = spawnflags # Portal pair ID that it detects : self.LinkageGroupID: int = LinkageGroupID self.auto_properties.extend(["targetname", "parentname", "spawnflags", "LinkageGroupID"]) class FuncPortalOrientation(Entity): """ Auto-generated from portal.fgd, line 107. Adjusts a portal's rotation to match a specified angle. The 'Bottom' of the portal points in the specified diretion. """ def __init__(self, vmf_map: "ValveMap", targetname: str="", parentname: str="", StartDisabled=0, AnglesToFace: "Origin"="0 0 0", MatchLinkedAngles=0): Entity.__init__(self, "func_portal_orientation", vmf_map) # Name : The name that other entities refer to this entity by. self.targetname: str = targetname # Parent : The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent. self.parentname: str = parentname # Start Disabled : self.StartDisabled = StartDisabled # Angles to face : The 'floor' of the portal pair linkage will be in this direction. self.AnglesToFace: "Origin" = AnglesToFace # Match linked angles. : If set, portals placed in this volume will have their angles match their linked portals. This only works for floor or ceiling portals with a currently linked partner. self.MatchLinkedAngles = MatchLinkedAngles self.auto_properties.extend(["targetname", "parentname", "StartDisabled", "AnglesToFace", "MatchLinkedAngles"]) class FuncWeightButton(Entity): """ Auto-generated from portal.fgd, line 118. A button which activates after a specified amount of weight is applied """ def __init__(self, vmf_map: "ValveMap", targetname: str="", WeightToActivate: float=""): Entity.__init__(self, "func_weight_button", vmf_map) # Name : The name that other entities refer to this entity by. self.targetname: str = targetname # Amount of weight required before this button activates. : self.WeightToActivate: float = WeightToActivate self.auto_properties.extend(["targetname", "WeightToActivate"]) class InfoLightingRelative(Entity): """ Auto-generated from portal.fgd, line 385. """ def __init__(self, vmf_map: "ValveMap", origin: "Origin"="0 0 0", targetname: str="", parentname: str="", LightingLandmark: str=""): Entity.__init__(self, "info_lighting_relative", vmf_map) # Origin : This entity's location in 3D space. self.origin: "Origin" = origin # Name : The name that other entities refer to this entity by. self.targetname: str = targetname # Parent : The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent. self.parentname: str = parentname # Lighting Landmark : Entity at which the reference origin is contained. self.LightingLandmark: str = LightingLandmark self.auto_properties.extend(["origin", "targetname", "parentname", "LightingLandmark"]) class NpcPortalTurretFloor(Entity): """ Auto-generated from portal.fgd, line 267. Combine (Portal) Floor Turret """ def __init__(self, vmf_map: "ValveMap", origin: "Origin"="0 0 0", targetname: str="", angles: "Origin"="0 0 0", spawnflags="", SkinNumber: int=0, DamageForce=1): Entity.__init__(self, "npc_portal_turret_floor", vmf_map) # Origin : This entity's location in 3D space. self.origin: "Origin" = origin # Name : The name that other entities refer to this entity by. self.targetname: str = targetname # Pitch Yaw Roll (Y Z X) : This entity's orientation in the world. Pitch is rotation around the Y axis, self.angles: "Origin" = angles # TODO: Replace this filler. : self.spawnflags = spawnflags # Skin Number : Which skin to use for this turret. Set to 0 to select randomly. self.SkinNumber: int = SkinNumber # Damage pushes player : Being hit by this turret will push the player back. self.DamageForce = DamageForce self.auto_properties.extend(["origin", "targetname", "angles", "spawnflags", "SkinNumber", "DamageForce"]) class NpcPortalTurretGround(Entity): """ Auto-generated from portal.fgd, line 243. Combine (Portal) ground turret """ def __init__(self, vmf_map: "ValveMap", origin: "Origin"="0 0 0", targetname: str="", angles: "Origin"="0 0 0", renderfx=0, rendermode=0, renderamt: int=255, rendercolor: "RGB"="255 255 255", disablereceiveshadows=0, damagefilter: str="", ResponseContext: str="", disableshadows=0, target: str="", squadname: str="", hintgroup: str="", hintlimiting=0, spawnflags="", sleepstate=0, wakeradius: float=0, wakesquad=0, enemyfilter: str="", ignoreunseenenemies=0, physdamagescale: float="1.0", parentname: str="", ConeOfFire: float=60): Entity.__init__(self, "npc_portal_turret_ground", vmf_map) # Origin : This entity's location in 3D space. self.origin: "Origin" = origin # Name : The name that other entities refer to this entity by. self.targetname: str = targetname # Pitch Yaw Roll (Y Z X) : This entity's orientation in the world. Pitch is rotation around the Y axis, self.angles: "Origin" = angles # Render FX : self.renderfx = renderfx # Render Mode : Used to set a non-standard rendering mode on this entity. See also 'FX Amount' and 'FX Color'. self.rendermode = rendermode # FX Amount (0 - 255) : The FX amount is used by the selected Render Mode. self.renderamt: int = renderamt # FX Color (R G B) : The FX color is used by the selected Render Mode. self.rendercolor: "RGB" = rendercolor # Disable Receiving Shadows : self.disablereceiveshadows = disablereceiveshadows # Damage Filter : Name of the filter entity that controls which entities can damage us. self.damagefilter: str = damagefilter # Response Contexts : Response system context(s) for this entity. Format should be: 'key:value,key2:value2,etc'. When this entity speaks, the list of keys & values will be passed to the response rules system. self.ResponseContext: str = ResponseContext # Disable shadows : self.disableshadows = disableshadows # Target Path Corner : If set, the name of a path corner entity that this NPC will walk to, after spawning. self.target: str = target # Squad Name : NPCs that are in the same squad (i.e. have matching squad names) will share information about enemies, and will take turns attacking and covering each other. self.squadname: str = squadname # Hint Group : Hint groups are used by NPCs to restrict their hint-node searching to a subset of the map's hint nodes. Only hint nodes with matching hint group names will be considered by this NPC. self.hintgroup: str = hintgroup # Hint Limit Nav : Limits NPC to using specified hint group for navigation requests, but does not limit local navigation. self.hintlimiting = hintlimiting # TODO: Replace this filler. : self.spawnflags = spawnflags # Sleep State : Holds the NPC in stasis until specified condition. See also 'Wake Radius' and 'Wake Squad'. self.sleepstate = sleepstate # Wake Radius : Auto-wake if player within this distance self.wakeradius: float = wakeradius # Wake Squad : Wake all of the NPCs squadmates if the NPC is woken self.wakesquad = wakesquad # Enemy Filter : Filter by which to filter potential enemies self.enemyfilter: str = enemyfilter # Ignore unseen enemies : Prefer visible enemies, regardless of distance or relationship priority self.ignoreunseenenemies = ignoreunseenenemies # Physics Impact Damage Scale : Scales damage energy when this character is hit by a physics object. With a value of 0 the NPC will take no damage from physics. self.physdamagescale: float = physdamagescale # Parent : The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent. self.parentname: str = parentname # Cone of Fire : Cone of fire in degrees. self.ConeOfFire: float = ConeOfFire self.auto_properties.extend(["origin", "targetname", "angles", "renderfx", "rendermode", "renderamt", "rendercolor", "disablereceiveshadows", "damagefilter", "ResponseContext", "disableshadows", "target", "squadname", "hintgroup", "hintlimiting", "spawnflags", "sleepstate", "wakeradius", "wakesquad", "enemyfilter", "ignoreunseenenemies", "physdamagescale", "parentname", "ConeOfFire"]) class NpcRocketTurret(Entity): """ Auto-generated from portal.fgd, line 27. Aims a rocket at a target. """ def __init__(self, vmf_map: "ValveMap", origin: "Origin"="0 0 0", parentname: str="", targetname: str="", angles: "Origin"="0 0 0", spawnflags=""): Entity.__init__(self, "npc_rocket_turret", vmf_map) # Origin : This entity's location in 3D space. self.origin: "Origin" = origin # Parent : The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent. self.parentname: str = parentname # Name : The name that other entities refer to this entity by. self.targetname: str = targetname # Pitch Yaw Roll (Y Z X) : This entity's orientation in the world. Pitch is rotation around the Y axis, self.angles: "Origin" = angles # TODO: Replace this filler. : self.spawnflags = spawnflags self.auto_properties.extend(["origin", "parentname", "targetname", "angles", "spawnflags"]) class NpcSecurityCamera(Entity): """ Auto-generated from portal.fgd, line 278. Security Camera """ def __init__(self, vmf_map: "ValveMap", origin: "Origin"="0 0 0", targetname: str="", angles: "Origin"="0 0 0", model: str="", skin: int=0, modelscale: float="1.0", disableshadows=0, spawnflags=""): Entity.__init__(self, "npc_security_camera", vmf_map) # Origin : This entity's location in 3D space. self.origin: "Origin" = origin # Name : The name that other entities refer to this entity by. self.targetname: str = targetname # Pitch Yaw Roll (Y Z X) : This entity's orientation in the world. Pitch is rotation around the Y axis, self.angles: "Origin" = angles # World Model : self.model: str = model # Skin : Some models have multiple versions of their textures, called skins. Set this to a number other than 0 to use that skin instead of the default. self.skin: int = skin # Model Scale : A multiplier for the size of the model. self.modelscale: float = modelscale # Disable Shadows : Used to disable dynamic shadows on this entity. self.disableshadows = disableshadows # TODO: Replace this filler. : self.spawnflags = spawnflags self.auto_properties.extend(["origin", "targetname", "angles", "model", "skin", "modelscale", "disableshadows", "spawnflags"]) class PointEnergyBallLauncher(Entity): """ Auto-generated from portal.fgd, line 15. Launches energy balls. """ def __init__(self, vmf_map: "ValveMap", origin: "Origin"="", angles: "Origin"="0 0 0", globalname: str="", spawnflags="", ballcount: int=3, minspeed: float="300.0", maxspeed: float="600.0", ballradius: float="20.0", balltype="Combine Energy Ball 1", ballrespawntime: float="4.0f", parentname: str="", targetname: str="", BallLifetime: float=12, MinLifeAfterPortal: float=6): Entity.__init__(self, "point_energy_ball_launcher", vmf_map) # Origin (X Y Z) : The position of this entity's center in the world. Rotating entities typically rotate around their origin. self.origin: "Origin" = origin # Pitch Yaw Roll (Y Z X) : This entity's orientation in the world. Pitch is rotation around the Y axis, self.angles: "Origin" = angles # Global Entity Name : Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state. self.globalname: str = globalname # TODO: Replace this filler. : self.spawnflags = spawnflags # Ball count : This is how many balls will be bouncing around inside the spawner self.ballcount: int = ballcount # Min ball speed : The minimum speed of balls that fly in the spawner self.minspeed: float = minspeed # Max ball speed : The maximum speed of balls that fly in the spawner self.maxspeed: float = maxspeed # Ball radius : The radius of the energy balls self.ballradius: float = ballradius # Ball Type : self.balltype = balltype # Ball Respawn Time : The energy balls respawn time self.ballrespawntime: float = ballrespawntime # Parent : The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent. self.parentname: str = parentname # Name : The name that other entities refer to this entity by. self.targetname: str = targetname # Ball Lifetime : The time in seconds the ball will live before self-destructing. A negative value will give infinite life. self.BallLifetime: float = BallLifetime # Min life after portal transition : When energy balls created by this launcher pass through a portal and their life is refreshed to be this number at minimum. self.MinLifeAfterPortal: float = MinLifeAfterPortal self.auto_properties.extend(["origin", "angles", "globalname", "spawnflags", "ballcount", "minspeed", "maxspeed", "ballradius", "balltype", "ballrespawntime", "parentname", "targetname", "BallLifetime", "MinLifeAfterPortal"]) class PropGladosCore(Entity): """ Auto-generated from portal.fgd, line 249. Core of GlaDOS computer. """ def __init__(self, vmf_map: "ValveMap", origin: "Origin"="0 0 0", globalname: str="", angles: "Origin"="0 0 0", model: str="", skin: int=0, modelscale: float="1.0", targetname: str="", damagefilter: str="", disableshadows=0, ExplodeDamage: float=0, ExplodeRadius: float=0, PerformanceMode=0, BreakModelMessage: str="", pressuredelay: float=0, mindxlevel=0, maxdxlevel=0, fademindist: float=-1, fademaxdist: float=0, fadescale: float=1, spawnflags="", minhealthdmg: int=0, shadowcastdist: int=0, physdamagescale: float="0.1", Damagetype=0, nodamageforces=0, inertiaScale: float="1.0", massScale: float="0", overridescript: str="", damagetoenablemotion: int=0, forcetoenablemotion: float=0, puntsound: str="", CoreType=1, DelayBetweenLines: float="0.4"): Entity.__init__(self, "prop_glados_core", vmf_map) # Origin : This entity's location in 3D space. self.origin: "Origin" = origin # Global Entity Name : Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state. self.globalname: str = globalname # Pitch Yaw Roll (Y Z X) : This entity's orientation in the world. Pitch is rotation around the Y axis, self.angles: "Origin" = angles # World Model : self.model: str = model # Skin : Some models have multiple versions of their textures, called skins. Set this to a number other than 0 to use that skin instead of the default. self.skin: int = skin # Model Scale : A multiplier for the size of the model. self.modelscale: float = modelscale # Name : The name that other entities refer to this entity by. self.targetname: str = targetname # Damage Filter : Name of the filter entity that controls which entities can damage us. self.damagefilter: str = damagefilter # Disable shadows : self.disableshadows = disableshadows # Explosion Damage : If non-zero, when this entity breaks it will create an explosion that causes the specified amount of damage. See also 'Explosion Radius'. self.ExplodeDamage: float = ExplodeDamage # Explosion Radius : If non-zero, when this entity breaks it will create an explosion with a radius of the specified amount. See also 'Explosion Damage'. self.ExplodeRadius: float = ExplodeRadius # Performance Mode : Used to limit the amount of gibs produced when this entity breaks, for performance reasons. self.PerformanceMode = PerformanceMode # Break Model Message : If set, will use this break model message instead of the normal break behavior. self.BreakModelMessage: str = BreakModelMessage # Pressure Delay : Delay, in seconds, after 'broken' by pressure before breaking apart (allows for sound to play before breaking apart). self.pressuredelay: float = pressuredelay # Minimum DX Level : self.mindxlevel = mindxlevel # Maximum DX Level : self.maxdxlevel = maxdxlevel # Start Fade Dist : Distance at which the prop starts to fade (<0 = use fademaxdist). self.fademindist: float = fademindist # End Fade Dist : Max fade distance at which the prop is visible (0 = don't fade out) self.fademaxdist: float = fademaxdist # Fade Scale : If you specify a fade in the worldspawn, or if the engine is running under dx7, then the engine will forcibly fade out props even if fademindist/fademaxdist isn't specified. self.fadescale: float = fadescale # TODO: Replace this filler. : self.spawnflags = spawnflags # Min Damage to Hurt : The prop will ignore any damage events if the damage is less than this amount. self.minhealthdmg: int = minhealthdmg # Shadow Cast Distance : Use this to override how far this object casts shadows. 0 = default distance. self.shadowcastdist: int = shadowcastdist # Physics Impact Damage Scale : Scales damage energy when this object is hit by a physics object. NOTE: 0 means this feature is disabled for backwards compatibility.\nSet to 1.0 for materials as strong as flesh, smaller numbers indicate stronger materials. self.physdamagescale: float = physdamagescale # Impact damage type : self.Damagetype = Damagetype # Damaging it Doesn't Push It : Used to determine whether or not damage should cause the brush to move. self.nodamageforces = nodamageforces # Scale Factor For Inertia : Scales the angular mass of an object. Used to hack angular damage and collision response. self.inertiaScale: float = inertiaScale # Mass Scale : A scale multiplier for the object's mass. self.massScale: float = massScale # Override Parameters : A list of physics key/value pairs that are usually in a physics prop .qc file. Format is 'key,value,key,value,etc'. self.overridescript: str = overridescript # Health Level to Override Motion : If specified, this object will start motion disabled. Once its health has dropped below this specified amount, it will enable motion. self.damagetoenablemotion: int = damagetoenablemotion # Physics Impact Force to Override Motion : If specified, this object will start motion disabled. Any impact that imparts a force greater than this value on the physbox will enable motion. self.forcetoenablemotion: float = forcetoenablemotion # Sound to make when punted : self.puntsound: str = puntsound # Core Personality : Which personality VO set the core is set to. self.CoreType = CoreType # Pause (in secs) between VO Lines. : When the core is talking, this is the number of seconds delay between it's spoken lines. self.DelayBetweenLines: float = DelayBetweenLines self.auto_properties.extend(["origin", "globalname", "angles", "model", "skin", "modelscale", "targetname", "damagefilter", "disableshadows", "ExplodeDamage", "ExplodeRadius", "PerformanceMode", "BreakModelMessage", "pressuredelay", "mindxlevel", "maxdxlevel", "fademindist", "fademaxdist", "fadescale", "spawnflags", "minhealthdmg", "shadowcastdist", "physdamagescale", "Damagetype", "nodamageforces", "inertiaScale", "massScale", "overridescript", "damagetoenablemotion", "forcetoenablemotion", "puntsound", "CoreType", "DelayBetweenLines"]) class PropPortal(Entity): """ Auto-generated from portal.fgd, line 195. A portal """ def __init__(self, vmf_map: "ValveMap", origin: "Origin"="0 0 0", targetname: str="", angles: "Origin"="0 0 0", Activated=1, PortalTwo=0, LinkageGroupID: int=0): Entity.__init__(self, "prop_portal", vmf_map) # Origin : This entity's location in 3D space. self.origin: "Origin" = origin # Name : The name that other entities refer to this entity by. self.targetname: str = targetname # Pitch Yaw Roll (Y Z X) : This entity's orientation in the world. Pitch is rotation around the Y axis, self.angles: "Origin" = angles # Start Activated : An inactive portal will not be drawn and will not teleport entites self.Activated = Activated # Portal Number : A portal has to logically be either portal 1 or portal 2 self.PortalTwo = PortalTwo # Portal pair ID that it belongs to : self.LinkageGroupID: int = LinkageGroupID self.auto_properties.extend(["origin", "targetname", "angles", "Activated", "PortalTwo", "LinkageGroupID"]) class PropPortalStatsDisplay(Entity): """ Auto-generated from portal.fgd, line 308. Portal Stats Display """ def __init__(self, vmf_map: "ValveMap", origin: "Origin"="0 0 0", targetname: str="", angles: "Origin"="0 0 0", parentname: str="", globalname: str=""): Entity.__init__(self, "prop_portal_stats_display", vmf_map) # Origin : This entity's location in 3D space. self.origin: "Origin" = origin # Name : The name that other entities refer to this entity by. self.targetname: str = targetname # Pitch Yaw Roll (Y Z X) : This entity's orientation in the world. Pitch is rotation around the Y axis, self.angles: "Origin" = angles # Parent : The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent. self.parentname: str = parentname # Global Entity Name : Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state. self.globalname: str = globalname self.auto_properties.extend(["origin", "targetname", "angles", "parentname", "globalname"]) class PropTelescopicArm(Entity): """ Auto-generated from portal.fgd, line 296. Telescopic Arm """ def __init__(self, vmf_map: "ValveMap", origin: "Origin"="0 0 0", targetname: str="", angles: "Origin"="0 0 0", model: str="", skin: int=0, modelscale: float="1.0", disableshadows=0): Entity.__init__(self, "prop_telescopic_arm", vmf_map) # Origin : This entity's location in 3D space. self.origin: "Origin" = origin # Name : The name that other entities refer to this entity by. self.targetname: str = targetname # Pitch Yaw Roll (Y Z X) : This entity's orientation in the world. Pitch is rotation around the Y axis, self.angles: "Origin" = angles # World Model : self.model: str = model # Skin : Some models have multiple versions of their textures, called skins. Set this to a number other than 0 to use that skin instead of the default. self.skin: int = skin # Model Scale : A multiplier for the size of the model. self.modelscale: float = modelscale # Disable Shadows : Used to disable dynamic shadows on this entity. self.disableshadows = disableshadows self.auto_properties.extend(["origin", "targetname", "angles", "model", "skin", "modelscale", "disableshadows"]) class TriggerPortalCleanser(Entity): """ Auto-generated from portal.fgd, line 98. A trigger volume that disolves any entities that touch it and fizzles active portals when the player touches it. """ def __init__(self, vmf_map: "ValveMap", parentname: str="", origin: "Origin"="", StartDisabled=0, globalname: str="", spawnflags="", filtername: str="", targetname: str=""): Entity.__init__(self, "trigger_portal_cleanser", vmf_map) # Parent : The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent. self.parentname: str = parentname # Origin (X Y Z) : The position of this entity's center in the world. Rotating entities typically rotate around their origin. self.origin: "Origin" = origin # Start Disabled : self.StartDisabled = StartDisabled # Global Entity Name : Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state. self.globalname: str = globalname # TODO: Replace this filler. : self.spawnflags = spawnflags # Filter Name : Filter to use to see if activator triggers me. See filter_activator_name for more explanation. self.filtername: str = filtername # Name : The name that other entities refer to this entity by. self.targetname: str = targetname self.auto_properties.extend(["parentname", "origin", "StartDisabled", "globalname", "spawnflags", "filtername", "targetname"]) class VguiNeurotoxinCountdown(Entity): """ Auto-generated from portal.fgd, line 322. Neurotoxin Countdown """ def __init__(self, vmf_map: "ValveMap", origin: "Origin"="0 0 0", targetname: str="", angles: "Origin"="0 0 0", parentname: str="", width: int=256, height: int=128): Entity.__init__(self, "vgui_neurotoxin_countdown", vmf_map) # Origin : This entity's location in 3D space. self.origin: "Origin" = origin # Name : The name that other entities refer to this entity by. self.targetname: str = targetname # Pitch Yaw Roll (Y Z X) : This entity's orientation in the world. Pitch is rotation around the Y axis, self.angles: "Origin" = angles # Parent : The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent. self.parentname: str = parentname # Panel width : Width of the panel in units. self.width: int = width # Panel height : Height of the panel in units. self.height: int = height self.auto_properties.extend(["origin", "targetname", "angles", "parentname", "width", "height"]) class WeaponPortalgun(Entity): """ Auto-generated from portal.fgd, line 217. Portalgun """ def __init__(self, vmf_map: "ValveMap", origin: "Origin"="0 0 0", angles: "Origin"="0 0 0", spawnflags="", fademindist: float=-1, fademaxdist: float=0, fadescale: float=1, targetname: str="", parentname: str="", CanFirePortal1=1, CanFirePortal2=1): Entity.__init__(self, "weapon_portalgun", vmf_map) # Origin : This entity's location in 3D space. self.origin: "Origin" = origin # Pitch Yaw Roll (Y Z X) : This entity's orientation in the world. Pitch is rotation around the Y axis, self.angles: "Origin" = angles # TODO: Replace this filler. : self.spawnflags = spawnflags # Start Fade Dist/Pixels : Distance at which the prop starts to fade (<0 = use fademaxdist). If 'Screen Space Fade' is selected, this represents the number of pixels wide covered by the prop when it starts to fade. self.fademindist: float = fademindist # End Fade Dist/Pixels : Maximum distance at which the prop is visible (0 = don't fade out). If 'Screen Space Fade' is selected, this represents the *minimum* number of pixels wide covered by the prop when it fades. self.fademaxdist: float = fademaxdist # Fade Scale : If you specify a fade in the worldspawn, or if the engine is running under dx7, then the engine will forcibly fade out props even if fademindist/fademaxdist isn't specified. self.fadescale: float = fadescale # Name : The name that other entities refer to this entity by. self.targetname: str = targetname # Parent : The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent. self.parentname: str = parentname # Can Fire Portal 1 : Can this portalgun create blue portals? self.CanFirePortal1 = CanFirePortal1 # Can Fire Portal 2 : Can this portalgun create red portals? self.CanFirePortal2 = CanFirePortal2 self.auto_properties.extend(["origin", "angles", "spawnflags", "fademindist", "fademaxdist", "fadescale", "targetname", "parentname", "CanFirePortal1", "CanFirePortal2"])
52.811111
756
0.681938
4,919
38,024
5.201464
0.136003
0.030485
0.019347
0.010201
0.563394
0.54479
0.518252
0.466896
0.450559
0.436645
0
0.011232
0.22733
38,024
719
757
52.884562
0.859632
0.462892
0
0.432836
1
0
0.15331
0.012868
0
0
0
0.018081
0
1
0.08209
false
0
0.003731
0
0.16791
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
1
0
0
0
0
0
0
0
0
0
0
2
8d949539b4f5ffd1a631e632da366aaea5ce8be1
747
py
Python
src/crypto_functions.py
MichaelAquilina/Cryptography
4a9d495a495c24b8e1ec953dae55a7d92e01153b
[ "MIT" ]
1
2021-07-13T20:22:04.000Z
2021-07-13T20:22:04.000Z
src/crypto_functions.py
MichaelAquilina/Cryptography
4a9d495a495c24b8e1ec953dae55a7d92e01153b
[ "MIT" ]
null
null
null
src/crypto_functions.py
MichaelAquilina/Cryptography
4a9d495a495c24b8e1ec953dae55a7d92e01153b
[ "MIT" ]
null
null
null
from string import ascii_letters def hex_to_ascii(value): hex_text = hex(value)[2:-1] if len(hex_text) % 2 == 1: return ('0'+hex_text).decode('hex') else: return hex_text.decode('hex') def ascii_to_hex(value): return int(value.encode('hex'), 16) # Method used to generate the original ciphertexts # xor two strings of different lengths def strxor(a, b): if len(a) > len(b): return "".join([chr(ord(x) ^ ord(y)) for (x, y) in zip(a[:len(b)], b)]) else: return "".join([chr(ord(x) ^ ord(y)) for (x, y) in zip(a, b[:len(a)])]) def is_valid_text(attempt_text): for c in attempt_text: if c not in ascii_letters and c != ' ': return False return True
23.34375
79
0.5917
123
747
3.479675
0.422764
0.065421
0.060748
0.074766
0.149533
0.149533
0.149533
0.149533
0.149533
0.149533
0
0.012567
0.254351
747
31
80
24.096774
0.755835
0.113788
0
0.105263
0
0
0.016692
0
0
0
0
0
0
1
0.210526
false
0
0.052632
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
a5c02c77bdac2085ed8018a6c5c64fd03e975ee4
453
py
Python
scripta/render.py
rec/ascript
99975ca4e94c5791ee09864ce7cb23e2d43f7cd6
[ "MIT" ]
1
2021-08-04T18:06:37.000Z
2021-08-04T18:06:37.000Z
scripta/render.py
rec/scripta
99975ca4e94c5791ee09864ce7cb23e2d43f7cd6
[ "MIT" ]
6
2020-06-25T16:16:36.000Z
2020-06-25T23:54:57.000Z
scripta/render.py
rec/ascript
99975ca4e94c5791ee09864ce7cb23e2d43f7cd6
[ "MIT" ]
null
null
null
from termtosvg import anim from termtosvg import asciicast from termtosvg import config from termtosvg import term DEFAULT_THEME = 'solarized_light' def render_file(cast_file, svg_file, theme=None): asciicast_records = asciicast.read_records(str(cast_file)) geometry, frames = term.timed_frames(asciicast_records) tmpl = config.default_templates()[theme or DEFAULT_THEME] anim.render_animation(frames, geometry, str(svg_file), tmpl)
30.2
64
0.794702
61
453
5.672131
0.442623
0.150289
0.219653
0
0
0
0
0
0
0
0
0
0.130243
453
14
65
32.357143
0.878173
0
0
0
0
0
0.033113
0
0
0
0
0
0
1
0.1
false
0
0.4
0
0.5
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
2
a5d1c730d4a8f023aa1771347eada4e74c851757
3,881
py
Python
dags/utils/voting/fetch_polls.py
makerdao-data/airflow-docker-image
498b8ff83c0e9651c3fd36a91a516ea80f32e8a7
[ "Apache-2.0" ]
null
null
null
dags/utils/voting/fetch_polls.py
makerdao-data/airflow-docker-image
498b8ff83c0e9651c3fd36a91a516ea80f32e8a7
[ "Apache-2.0" ]
1
2022-03-22T13:57:44.000Z
2022-03-22T13:57:44.000Z
dags/utils/voting/fetch_polls.py
makerdao-data/airflow-docker-image
498b8ff83c0e9651c3fd36a91a516ea80f32e8a7
[ "Apache-2.0" ]
null
null
null
from dags.utils.bq_adapters import extract_calls_gas def _fetch_polls(**setup): calls = extract_calls_gas( setup['start_block'] + 1, setup['end_block'], setup['start_time'], setup['end_time'], (setup['polls_address'],), setup['polls_abi'], ) records = [ [ setup['load_id'], call.block_number, call.timestamp.__str__()[:19], call.breadcrumb, call.tx_hash, call.tx_index, call.type, str(call.value), call.from_address, call.to_address, call.function, call.arguments, call.outputs, call.error, call.status, call.gas_used, call.gas_price, ] for call in calls if call.function != '' ] calls_num = len(calls) calls = extract_calls_gas( setup['start_block'] + 1, setup['end_block'], setup['start_time'], setup['end_time'], (setup['new_polls_address'],), setup['new_polls_abi'], ) for call in calls: if call.function == 'voteMany': for i, poll in enumerate(call.arguments[0]['value']): option = call.arguments[1]['value'][i] if i < len(call.arguments[1]['value']) else None arguments = [ dict(name='pollId', type='uint256', value=poll), dict(name='optionId', type='uint256', value=option), ] record = [ setup['load_id'], call.block_number, call.timestamp.__str__()[:19], call.breadcrumb, call.tx_hash, call.tx_index, call.type, str(call.value), call.from_address, call.to_address, 'vote', arguments, [], call.error, call.status, call.gas_used / len(call.arguments[0]['value']), call.gas_price, ] records.append(record) elif call.function == 'withdrawPolls': for poll in call.arguments[0]['value']: arguments = [dict(name='pollId', type='uint256', value=poll)] record = [ setup['load_id'], call.block_number, call.timestamp.__str__()[:19], call.breadcrumb, call.tx_hash, call.tx_index, call.type, str(call.value), call.from_address, call.to_address, 'withdrawPoll', arguments, [], call.error, call.status, call.gas_used, call.gas_price, ] records.append(record) else: record = [ setup['load_id'], call.block_number, call.timestamp.__str__()[:19], call.breadcrumb, call.tx_hash, call.tx_index, call.type, str(call.value), call.from_address, call.to_address, call.function, call.arguments, call.outputs, call.error, call.status, call.gas_used, call.gas_price, ] records.append(record) print(f"POLLS: {len(calls) + calls_num} read, {len(records)} written") return records
29.853846
103
0.427725
342
3,881
4.640351
0.210526
0.030246
0.027725
0.037807
0.720227
0.720227
0.700693
0.665406
0.58097
0.58097
0
0.011577
0.465859
3,881
129
104
30.085271
0.75398
0
0
0.698276
0
0
0.082195
0
0
0
0
0
0
1
0.008621
false
0
0.008621
0
0.025862
0.008621
0
0
0
null
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
a5dd5214f7e8785457b2f11f7ab2a352bababde0
986
py
Python
main.py
Busola-git/database_creation
7b71493ff9b3272d118250b892d842a6450bdacb
[ "MIT" ]
null
null
null
main.py
Busola-git/database_creation
7b71493ff9b3272d118250b892d842a6450bdacb
[ "MIT" ]
null
null
null
main.py
Busola-git/database_creation
7b71493ff9b3272d118250b892d842a6450bdacb
[ "MIT" ]
null
null
null
import pprint from yahoo_ff.database import stocks_database from yahoo_ff.yahoo_ff import yahoo_ff def main(): stocks_database('sp500') # pp = pprint.PrettyPrinter(indent=0) # # aapl = yahoo_ff('aapl') # # pp.pprint(aapl.keystats) # # # go through all stocks # sp500 = stocks_database('sp500') # # # assign the stock to object # aapl = sp500.take('aapl') # # # get variables # pp.pprint(aapl) # pp.pprint(aapl.infos) # pp.pprint(aapl.infos['sector']) # # ends = list(reversed(aapl.incomestatement_annual['endofperiod'])) # pp.pprint(ends) # # p = aapl.pricehistory['Adj. Close'].asof(ends) # pp.pprint(p.values) # # e = list(reversed(aapl.incomestatement_annual['Earnings Before Interest And Taxes'])) # pp.pprint(e) # # pe = [price/earnings for price, earnings in zip(p, e)] # pp.pprint(pe) def empty_space(): print '\n' if __name__ == "__main__": main()
22.409091
91
0.61359
123
986
4.764228
0.471545
0.122867
0.081911
0.054608
0.12628
0
0
0
0
0
0
0.017356
0.240365
986
43
92
22.930233
0.76502
0.604462
0
0
0
0
0.041899
0
0
0
0
0
0
0
null
null
0
0.333333
null
null
0.222222
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
2
a5dda001b3201d0503dee1dc6fcac3178a378e5f
123
py
Python
ch04/04_20.py
leeseedong/book-cryptocurrency
58c0bb3f5a80f8cc73ba47c4839be3bd33c9d67c
[ "Apache-2.0" ]
121
2019-03-23T13:53:06.000Z
2022-03-28T15:15:03.000Z
ch04/04_20.py
leeseedong/book-cryptocurrency
58c0bb3f5a80f8cc73ba47c4839be3bd33c9d67c
[ "Apache-2.0" ]
3
2021-04-14T14:31:26.000Z
2021-05-09T13:46:14.000Z
ch04/04_20.py
leeseedong/book-cryptocurrency
58c0bb3f5a80f8cc73ba47c4839be3bd33c9d67c
[ "Apache-2.0" ]
114
2019-03-21T13:43:03.000Z
2022-03-31T18:42:11.000Z
import pandas as pd url = "https://finance.naver.com/item/sise_day.nhn?code=066570" df = pd.read_html(url) print(df[0])
24.6
64
0.715447
23
123
3.73913
0.869565
0
0
0
0
0
0
0
0
0
0
0.06422
0.113821
123
4
65
30.75
0.724771
0
0
0
0
0
0.447154
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
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
a5dfb46c0b331895c8a7adbd0dc1052fb22b161b
3,221
py
Python
backend/user/model.py
pe2mbs/example_webapp_angular
05122bbf6ad954ad8a14ead7a9f90ee6fff60871
[ "MIT" ]
null
null
null
backend/user/model.py
pe2mbs/example_webapp_angular
05122bbf6ad954ad8a14ead7a9f90ee6fff60871
[ "MIT" ]
8
2020-12-08T07:22:58.000Z
2022-03-02T10:32:49.000Z
backend/user/model.py
pe2mbs/example_webapp_angular
05122bbf6ad954ad8a14ead7a9f90ee6fff60871
[ "MIT" ]
null
null
null
# # Python backend and Angular frontend code generation by gencrud # Copyright (C) 2018-2021 Marc Bertens-Nguyen m.bertens@pe2mbs.nl # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Library General Public License GPL-2.0-only # as published by the Free Software Foundation. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License GPL-2.0-only along with this library; if not, write to the # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, # Boston, MA 02110-1301 USA # # gencrud: 2021-04-04 08:26:10 version 2.1.680 by user mbertens # import webapp2.api as API from webapp2.common.dbmem import DbBaseMemory from webapp2.common.crudmixin import CrudModelMixin class User( API.db.Model, CrudModelMixin ): """Model for the user table, this is generated by the gencrud.py module When modifing the file make sure that you remove the table from the configuration. """ __field_list__ = ['U_ID', 'U_ACTIVE', 'U_NAME', 'U_ROLE', 'U_HASH_PASSWORD', 'U_MUST_CHANGE', 'U_FIRST_NAME', 'U_MIDDLE_NAME', 'U_LAST_NAME', 'U_EMAIL', 'U_REMARK', 'U_LOCALE', 'U_LISTITEMS', 'U_PROFILE'] __tablename__ = 'user' U_ID = API.db.Column( "u_id", API.db.Integer, autoincrement = True, primary_key = True ) U_ACTIVE = API.db.Column( "u_active", API.db.Boolean, default = False ) U_NAME = API.db.Column( "u_name", API.db.String( 30 ), nullable = False ) U_ROLE = API.db.Column( "u_role", API.db.Integer, API.db.ForeignKey( "roles.r_id" ) ) U_HASH_PASSWORD = API.db.Column( "u_hash_password", API.db.String( 255 ), nullable = False ) U_MUST_CHANGE = API.db.Column( "u_must_change", API.db.Boolean, default = False ) U_FIRST_NAME = API.db.Column( "u_first_name", API.db.String( 50 ), nullable = False ) U_MIDDLE_NAME = API.db.Column( "u_middle_name", API.db.String( 50 ), default = "NULL" ) U_LAST_NAME = API.db.Column( "u_last_name", API.db.String( 50 ), nullable = False ) U_EMAIL = API.db.Column( "u_email", API.db.String( 100 ), nullable = False ) U_REMARK = API.db.Column( "u_remark", API.db.LONGTEXT, default = "NULL" ) U_LOCALE = API.db.Column( "u_locale", API.db.Integer, default = 1 ) U_LISTITEMS = API.db.Column( "u_listitems", API.db.Integer, default = 10 ) U_PROFILE = API.db.Column( "u_profile", API.db.LONGTEXT, default = "NULL" ) U_ROLE_FK = API.db.relationship( 'Role', backref = 'user', lazy = True ) API.db.UniqueConstraint( 'U_NAME', name='U_NAME_IDX' ) def memoryInstance( self ): return UserMemory( self ) API.dbtables.register( User ) class UserMemory( DbBaseMemory ): __model_cls__ = User __tablename__ = 'user' API.memorytables.register( UserMemory )
49.553846
214
0.6647
467
3,221
4.408994
0.374732
0.077708
0.074794
0.081593
0.222438
0.137445
0.072851
0.072851
0.042739
0.042739
0
0.02519
0.223533
3,221
64
215
50.328125
0.798081
0.317603
0
0.068966
0
0
0.146026
0
0
0
0
0
0
1
0.034483
false
0.068966
0.103448
0.034483
0.896552
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
a5f0d361fe3ac77dc066326d60c048689e58bcd4
800
py
Python
partrackanareport/nafftools.py
tomerten/partrackanareport
c2548a2e24e661e76be262e7e6e4f695aeeaec9c
[ "MIT" ]
null
null
null
partrackanareport/nafftools.py
tomerten/partrackanareport
c2548a2e24e661e76be262e7e6e4f695aeeaec9c
[ "MIT" ]
null
null
null
partrackanareport/nafftools.py
tomerten/partrackanareport
c2548a2e24e661e76be262e7e6e4f695aeeaec9c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Module partrackanareport.nafftools ================================================================= A module """ # your imports here ... import multiprocessing from collections import ChainMap from typing import Generator import dask.delayed as delay import numpy as np import PyNAFF as pnf from dask import dataframe as dd from joblib import Parallel, delayed from tqdm import tqdm def divide_list_in_n_equal_chunks(_list: list, n: int) -> Generator: """Method to divide a list in n equal chuncks. Parameters ---------- _list : list list to divide n : int number of chuncks Yields ------- Generator chunk generator """ for i in range(0, len(_list), n): yield _list[i : i + n]
19.512195
68
0.59
98
800
4.72449
0.530612
0.051836
0.030238
0.051836
0
0
0
0
0
0
0
0.003311
0.245
800
40
69
20
0.763245
0.42875
0
0
0
0
0
0
0
0
0
0
0
1
0.083333
false
0
0.75
0
0.833333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
a5fd0d57b1b3ac40b8ca1d4257afb908a021ee6a
4,536
py
Python
tools/onnx2tf.py
rehohoho/mmsegmentation
a73ae7a421e07741fda62c9d81b335cbc4b7f7d6
[ "Apache-2.0" ]
null
null
null
tools/onnx2tf.py
rehohoho/mmsegmentation
a73ae7a421e07741fda62c9d81b335cbc4b7f7d6
[ "Apache-2.0" ]
null
null
null
tools/onnx2tf.py
rehohoho/mmsegmentation
a73ae7a421e07741fda62c9d81b335cbc4b7f7d6
[ "Apache-2.0" ]
null
null
null
""" Resize supported attributes combination in onnx-tensorflow dependency ____________________________________________________________________________________________________________________________________________________ | mode | coordinate_transformation_mode | cubic_coeff_a | exclude_outside | extrapolation_value | nearest_mode | scales | sizes | |_________|________________________________|_______________|_________________|_____________________|___________________|_______________|___________| | nearest | align_corners | not apply | 0 | not apply | round_prefer_ceil | supported (1) | supported | |---------|--------------------------------|---------------|-----------------|---------------------|-------------------|---------------|-----------| | nearest | asymmetric | not apply | 0 | not apply | floor | supported (1) | supported | |---------|--------------------------------|---------------|-----------------|---------------------|-------------------|---------------|-----------| | nearest | tf_half_pixel_for_nn | not apply | 0 | not apply | floor | supported (1) | supported | |---------|--------------------------------|---------------|-----------------|---------------------|-------------------|---------------|-----------| | linear | align_corners | not apply | 0 | not apply | not apply | supported (1) | supported | |---------|--------------------------------|---------------|-----------------|---------------------|-------------------|---------------|-----------| | linear | asymmetric | not apply | 0 | not apply | not apply | supported (1) | supported | |---------|--------------------------------|---------------|-----------------|---------------------|-------------------|---------------|-----------| | linear | half_pixel | not apply | 0 | not apply | not apply | supported (1) | supported | |---------|--------------------------------|---------------|-----------------|---------------------|-------------------|---------------|-----------| | cubic | align_corners | -0.5 | 1 | not apply | not apply | supported (1) | supported | |---------|--------------------------------|---------------|-----------------|---------------------|-------------------|---------------|-----------| | cubic | asymmetric | -0.5 | 1 | not apply | not apply | supported (1) | supported | |---------|--------------------------------|---------------|-----------------|---------------------|-------------------|---------------|-----------| | cubic | half_pixel | -0.5 | 1 | not apply | not apply | supported (1) | supported | |---------|--------------------------------|---------------|-----------------|---------------------|-------------------|---------------|-----------| | nearest | tf_crop_and_resize | not apply | 0 | any float value | round_prefer_ceil | supported | supported | |---------|--------------------------------|---------------|-----------------|---------------------|-------------------|---------------|-----------| | linear | tf_crop_and_resize | not apply | 0 | any float value | not apply | supported | supported | |---------|--------------------------------|---------------|-----------------|---------------------|-------------------|---------------|-----------| Dependencies: git clone https://github.com/onnx/onnx-tensorflow.git && cd onnx-tensorflow pip install -e . pip install tensorflow Usage: python tools/onnx2tf.py \ --onnx_in=work_dirs/ocrnet_hr18_512x1024_20k_labelmefacade/latest.onnx \ --tf_out=work_dirs/ocrnet_hr18_512x1024_20k_labelmefacade/latest.pb """ import argparse from onnx_tf.backend import prepare import onnx parser = argparse.ArgumentParser(description='Convert ONNX to Tensorflow SavedModel') parser.add_argument('--onnx_in', help='checkpoint file', default=None) parser.add_argument('--tf_out', help='output file', default=None) args = parser.parse_args() onnx_model = onnx.load(args.onnx_in) tf_rep = prepare(onnx_model) tf_rep.export_graph(args.tf_out)
85.584906
149
0.382055
278
4,536
5.017986
0.33813
0.137634
0.122581
0.051613
0.431541
0.420072
0.405735
0.376344
0.303943
0.245161
0
0.013649
0.208554
4,536
52
150
87.230769
0.37493
0.905644
0
0
0
0
0.191388
0
0
0
0
0
0
1
0
false
0
0.3
0
0.3
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
570126148619971a7334c07398dc0f26ab5221f3
4,396
py
Python
vit_jax/train_test.py
Oussamayousre/vision_transformer
ed326dcb7a72d7989d873b492702f5952b6f0338
[ "Apache-2.0" ]
4,825
2020-10-21T12:35:18.000Z
2022-03-31T13:35:21.000Z
vit_jax/train_test.py
marksandler2/vision_transformer
88a52f8892c80c10de99194990a517b4d80485fd
[ "Apache-2.0" ]
154
2020-10-23T14:49:48.000Z
2022-03-21T13:19:01.000Z
vit_jax/train_test.py
marksandler2/vision_transformer
88a52f8892c80c10de99194990a517b4d80485fd
[ "Apache-2.0" ]
681
2020-10-23T01:34:20.000Z
2022-03-30T05:51:57.000Z
# Copyright 2021 Google LLC. # # 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 os import tempfile from absl.testing import absltest from absl.testing import parameterized import ml_collections from vit_jax import test_utils from vit_jax import train from vit_jax.configs import common from vit_jax.configs import models class TrainTest(parameterized.TestCase): @parameterized.named_parameters( ('tfds', 'tfds'), ('directory', 'directory'), ) def test_train_and_evaluate(self, dataset_source): config = common.get_config() config.model = models.get_testing_config() config.batch = 64 config.accum_steps = 2 config.batch_eval = 8 config.total_steps = 1 with tempfile.TemporaryDirectory() as workdir: if dataset_source == 'tfds': config.dataset = 'cifar10' config.pp = ml_collections.ConfigDict( {'train': 'train[:98%]', 'test': 'test', 'crop': 224}) elif dataset_source == 'directory': config.dataset = os.path.join(workdir, 'dataset') config.pp = ml_collections.ConfigDict({'crop': 224}) for mode in ('train', 'test'): for class_name in ('test1', 'test2'): for i in range(8): path = os.path.join(config.dataset, mode, class_name, f'{i}.jpg') os.makedirs(os.path.dirname(path), exist_ok=True) with open(path, 'wb') as f: f.write(JPG_BLACK_1PX) else: raise ValueError(f'Unknown dataset_source: "{dataset_source}"') config.pretrained_dir = workdir test_utils.create_checkpoint(config.model, f'{workdir}/testing.npz') opt_pmap = train.train_and_evaluate(config, workdir) self.assertTrue(os.path.exists(f'{workdir}/checkpoint_1')) if __name__ == '__main__': absltest.main() # from PIL import Image # import numpy as np # Image.fromarray(np.array([[[0, 0, 0]]], np.uint8)).save('black1px.jpg') # print(repr(file('black1px.jpg', 'rb').read())) JPG_BLACK_1PX = b'\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x00\x00\x01\x00\x01\x00\x00\xff\xdb\x00C\x00\x08\x06\x06\x07\x06\x05\x08\x07\x07\x07\t\t\x08\n\x0c\x14\r\x0c\x0b\x0b\x0c\x19\x12\x13\x0f\x14\x1d\x1a\x1f\x1e\x1d\x1a\x1c\x1c $.\' ",#\x1c\x1c(7),01444\x1f\'9=82<.342\xff\xdb\x00C\x01\t\t\t\x0c\x0b\x0c\x18\r\r\x182!\x1c!22222222222222222222222222222222222222222222222222\xff\xc0\x00\x11\x08\x00\x01\x00\x01\x03\x01"\x00\x02\x11\x01\x03\x11\x01\xff\xc4\x00\x1f\x00\x00\x01\x05\x01\x01\x01\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\xff\xc4\x00\xb5\x10\x00\x02\x01\x03\x03\x02\x04\x03\x05\x05\x04\x04\x00\x00\x01}\x01\x02\x03\x00\x04\x11\x05\x12!1A\x06\x13Qa\x07"q\x142\x81\x91\xa1\x08#B\xb1\xc1\x15R\xd1\xf0$3br\x82\t\n\x16\x17\x18\x19\x1a%&\'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz\x83\x84\x85\x86\x87\x88\x89\x8a\x92\x93\x94\x95\x96\x97\x98\x99\x9a\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xff\xc4\x00\x1f\x01\x00\x03\x01\x01\x01\x01\x01\x01\x01\x01\x01\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\xff\xc4\x00\xb5\x11\x00\x02\x01\x02\x04\x04\x03\x04\x07\x05\x04\x04\x00\x01\x02w\x00\x01\x02\x03\x11\x04\x05!1\x06\x12AQ\x07aq\x13"2\x81\x08\x14B\x91\xa1\xb1\xc1\t#3R\xf0\x15br\xd1\n\x16$4\xe1%\xf1\x17\x18\x19\x1a&\'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x92\x93\x94\x95\x96\x97\x98\x99\x9a\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xff\xda\x00\x0c\x03\x01\x00\x02\x11\x03\x11\x00?\x00\xf9\xfe\x8a(\xa0\x0f\xff\xd9' # pylint: disable=line-too-long
57.842105
1,913
0.710874
783
4,396
3.933589
0.393359
0.033117
0.032143
0.035065
0.239935
0.19513
0.19513
0.19513
0.192208
0.174675
0
0.183128
0.11556
4,396
76
1,913
57.842105
0.609054
0.16788
0
0
0
0.088889
0.464286
0.418407
0
0
0
0
0.022222
1
0.022222
false
0
0.2
0
0.244444
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
570f8c89009660597c0d0140b5e7eff543115cdc
5,129
py
Python
footprints/ui/ui_user_form.py
enwawerueli/footprints
d9b2a0064b21495edfd0563cb521b0675ee4363d
[ "MIT" ]
1
2018-10-11T19:23:08.000Z
2018-10-11T19:23:08.000Z
footprints/ui/ui_user_form.py
enwawerueli/footprints
d9b2a0064b21495edfd0563cb521b0675ee4363d
[ "MIT" ]
null
null
null
footprints/ui/ui_user_form.py
enwawerueli/footprints
d9b2a0064b21495edfd0563cb521b0675ee4363d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'forms/user_form.ui', # licensing of 'forms/user_form.ui' applies. # # Created: Fri Feb 22 00:22:10 2019 # by: pyside2-uic running on PySide2 5.11.2 # # WARNING! All changes made in this file will be lost! from PySide2 import QtCore, QtGui, QtWidgets class Ui_UserForm(object): def setupUi(self, UserForm): UserForm.setObjectName("UserForm") UserForm.resize(629, 361) self.verticalLayout = QtWidgets.QVBoxLayout(UserForm) self.verticalLayout.setObjectName("verticalLayout") self.groupBox = QtWidgets.QGroupBox(UserForm) self.groupBox.setObjectName("groupBox") self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.groupBox) self.verticalLayout_2.setObjectName("verticalLayout_2") spacerItem = QtWidgets.QSpacerItem(20, 48, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_2.addItem(spacerItem) self.avatar_lb = QtWidgets.QLabel(self.groupBox) self.avatar_lb.setAlignment(QtCore.Qt.AlignCenter) self.avatar_lb.setObjectName("avatar_lb") self.verticalLayout_2.addWidget(self.avatar_lb) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem1) self.gridLayout = QtWidgets.QGridLayout() self.gridLayout.setObjectName("gridLayout") self.label = QtWidgets.QLabel(self.groupBox) self.label.setObjectName("label") self.gridLayout.addWidget(self.label, 0, 0, 1, 1) self.username_le = QtWidgets.QLineEdit(self.groupBox) self.username_le.setObjectName("username_le") self.gridLayout.addWidget(self.username_le, 0, 1, 1, 1) self.label_2 = QtWidgets.QLabel(self.groupBox) self.label_2.setObjectName("label_2") self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1) self.password_le = QtWidgets.QLineEdit(self.groupBox) self.password_le.setEchoMode(QtWidgets.QLineEdit.Password) self.password_le.setObjectName("password_le") self.gridLayout.addWidget(self.password_le, 1, 1, 1, 1) self.label_3 = QtWidgets.QLabel(self.groupBox) self.label_3.setObjectName("label_3") self.gridLayout.addWidget(self.label_3, 2, 0, 1, 1) self.password_2_le = QtWidgets.QLineEdit(self.groupBox) self.password_2_le.setEchoMode(QtWidgets.QLineEdit.Password) self.password_2_le.setObjectName("password_2_le") self.gridLayout.addWidget(self.password_2_le, 2, 1, 1, 1) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.create_user_bp = QtWidgets.QPushButton(self.groupBox) self.create_user_bp.setStyleSheet("back ground-color: #00FF7F;") self.create_user_bp.setObjectName("create_user_bp") self.horizontalLayout.addWidget(self.create_user_bp) spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem2) self.gridLayout.addLayout(self.horizontalLayout, 3, 1, 1, 1) self.horizontalLayout_2.addLayout(self.gridLayout) spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem3) self.verticalLayout_2.addLayout(self.horizontalLayout_2) spacerItem4 = QtWidgets.QSpacerItem(20, 47, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_2.addItem(spacerItem4) self.verticalLayout.addWidget(self.groupBox) self.label.setBuddy(self.username_le) self.label_2.setBuddy(self.password_le) self.label_3.setBuddy(self.password_2_le) self.retranslateUi(UserForm) QtCore.QObject.connect(self.create_user_bp, QtCore.SIGNAL("clicked()"), UserForm.accept) QtCore.QMetaObject.connectSlotsByName(UserForm) UserForm.setTabOrder(self.username_le, self.password_le) UserForm.setTabOrder(self.password_le, self.password_2_le) def retranslateUi(self, UserForm): UserForm.setWindowTitle(QtWidgets.QApplication.translate("UserForm", "Dialog", None, -1)) self.groupBox.setTitle(QtWidgets.QApplication.translate("UserForm", "Create a user account", None, -1)) self.avatar_lb.setText(QtWidgets.QApplication.translate("UserForm", "Avatar", None, -1)) self.label.setText(QtWidgets.QApplication.translate("UserForm", "&Username :", None, -1)) self.label_2.setText(QtWidgets.QApplication.translate("UserForm", "&Password :", None, -1)) self.label_3.setText(QtWidgets.QApplication.translate("UserForm", "&Retype Password :", None, -1)) self.create_user_bp.setText(QtWidgets.QApplication.translate("UserForm", "Create", None, -1))
56.988889
115
0.724118
584
5,129
6.22774
0.205479
0.037119
0.043992
0.073137
0.390157
0.244157
0.184218
0.131977
0.131977
0.131977
0
0.029131
0.163385
5,129
89
116
57.629213
0.818457
0.053032
0
0
1
0
0.070353
0
0
0
0
0
0
1
0.026667
false
0.186667
0.013333
0
0.053333
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
93957210cdadc49da75feeebf17e3dac10a6d212
133
py
Python
test.py
gregbad/WavePy
f1bda43a4b928b955ac02ac0516a303df5507d7f
[ "Apache-2.0" ]
1
2017-12-28T10:56:09.000Z
2017-12-28T10:56:09.000Z
test.py
gregbad/WavePy
f1bda43a4b928b955ac02ac0516a303df5507d7f
[ "Apache-2.0" ]
9
2016-05-18T16:04:38.000Z
2022-02-07T04:14:48.000Z
test.py
jpbos/WavePy
36671b8546fe55ff89ea67e292b0d895f5c86d06
[ "Apache-2.0" ]
5
2018-04-23T19:47:51.000Z
2020-10-23T00:43:13.000Z
# -*- coding: utf-8 -*- """ Created on Sun Sep 11 14:45:43 2016 @author: Jeff """ import wavepy X = wavepy.wavepy(); X.Validate(5)
12.090909
35
0.616541
22
133
3.727273
0.863636
0.170732
0
0
0
0
0
0
0
0
0
0.12844
0.180451
133
11
36
12.090909
0.623853
0.548872
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
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
939e770bea7aceb0a9a7ad539ebbb8235367e24f
362
py
Python
python/py-study/testdict.py
seekindark/helloworld
00fe439fdbd98add53f3bec7eac2b1ba1dc817a7
[ "BSD-2-Clause" ]
null
null
null
python/py-study/testdict.py
seekindark/helloworld
00fe439fdbd98add53f3bec7eac2b1ba1dc817a7
[ "BSD-2-Clause" ]
2
2019-06-24T00:56:52.000Z
2019-06-24T01:28:29.000Z
python/py-study/testdict.py
seekindark/helloworld
00fe439fdbd98add53f3bec7eac2b1ba1dc817a7
[ "BSD-2-Clause" ]
null
null
null
# {} d = dict() # {'a': 1, 'test': 'Monday', 'abc': 3} d1 = dict(a=1, test='Monday', abc=3) print(d) print(d1) # {'one': 1, 'two': 2, 'three': 3} 可迭代对象方式来构造字典 d3 = dict([('one', 1), ('two', 2), ('three', 3)]) print(d3) # {'one': 1, 'two': 2, 'three': 3, 4: 4} 映射函数方式来构造字典 d4 = dict(zip(['one', 'two', 'three', 4], [1, 2, 3, 4, 5555])) print(d4)
24.133333
63
0.475138
60
362
2.866667
0.35
0.069767
0.122093
0.139535
0.476744
0.476744
0.232558
0
0
0
0
0.10453
0.207182
362
14
64
25.857143
0.494774
0.378453
0
0
0
0
0.135922
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
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
0
0
0
1
0
2
939fb09921832a8f0b4ced15f8947fbefcc4274a
5,625
py
Python
integrations/test_trec_covid_stored_runs.py
naydoummar/pyserini
8a70bc15d73ad84b7e79598baf03ef987efdc87f
[ "Apache-2.0" ]
1
2021-08-19T07:31:45.000Z
2021-08-19T07:31:45.000Z
integrations/test_trec_covid_stored_runs.py
naydoummar/pyserini
8a70bc15d73ad84b7e79598baf03ef987efdc87f
[ "Apache-2.0" ]
null
null
null
integrations/test_trec_covid_stored_runs.py
naydoummar/pyserini
8a70bc15d73ad84b7e79598baf03ef987efdc87f
[ "Apache-2.0" ]
null
null
null
# # Pyserini: Python interface to the Anserini IR toolkit built on Lucene # # 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 os import re import shutil import unittest from random import randint from pyserini.util import download_url class TestSearchIntegration(unittest.TestCase): def setUp(self): self.round3_runs = { 'https://www.dropbox.com/s/g80cqdxud1l06wq/anserini.covid-r3.abstract.qq.bm25.txt?dl=1': 'd08d85c87e30d6c4abf54799806d282f', 'https://www.dropbox.com/s/sjcnxq7h0a3j3xz/anserini.covid-r3.abstract.qdel.bm25.txt?dl=1': 'd552dff90995cd860a5727637f0be4d1', 'https://www.dropbox.com/s/4bjx35sgosu0jz0/anserini.covid-r3.full-text.qq.bm25.txt?dl=1': '6c9f4c09d842b887262ca84d61c61a1f', 'https://www.dropbox.com/s/mjt7y1ywae784d0/anserini.covid-r3.full-text.qdel.bm25.txt?dl=1': 'c5f9db7733c72eea78ece2ade44d3d35', 'https://www.dropbox.com/s/qwn7jd8vg2chjik/anserini.covid-r3.paragraph.qq.bm25.txt?dl=1': '872673b3e12c661748d8899f24d3ba48', 'https://www.dropbox.com/s/2928i60fj2i09bt/anserini.covid-r3.paragraph.qdel.bm25.txt?dl=1': 'c1b966e4c3f387b6810211f339b35852', 'https://www.dropbox.com/s/6vk5iohqf81iy8b/anserini.covid-r3.fusion1.txt?dl=1': '61cbd73c6e60ba44f18ce967b5b0e5b3', 'https://www.dropbox.com/s/n09595t1eqymkks/anserini.covid-r3.fusion2.txt?dl=1': 'd7eabf3dab840104c88de925e918fdab', 'https://www.dropbox.com/s/ypoe9tgwef17rak/anserini.final-r3.fusion1.txt?dl=1': 'c1caf63a9c3b02f0b12e233112fc79a6', 'https://www.dropbox.com/s/uvfrssp6nw2v2jl/anserini.final-r3.fusion2.txt?dl=1': '12679197846ed77306ecb2ca7895b011', 'https://www.dropbox.com/s/2wrg7ceaca3n7ac/anserini.final-r3.rf.txt?dl=1': '7192a08c5275b59d5ef18395917ff694', 'https://www.dropbox.com/s/ilqgky1tti0zvez/anserini.final-r3.fusion1.post-processed.txt?dl=1': 'f7c69c9bff381a847af86e5a8daf7526', 'https://www.dropbox.com/s/ue3z6xxxca9krkb/anserini.final-r3.fusion2.post-processed.txt?dl=1': '84c5fd2c7de0a0282266033ac4f27c22', 'https://www.dropbox.com/s/95vk831wp1ldnpm/anserini.final-r3.rf.post-processed.txt?dl=1': '3e79099639a9426cb53afe7066239011' } self.round4_runs = { 'https://www.dropbox.com/s/mf79huhxfy96g6i/anserini.covid-r4.abstract.qq.bm25.txt?dl=1': '56ac5a0410e235243ca6e9f0f00eefa1', 'https://www.dropbox.com/s/4zau6ejrkvgn9m7/anserini.covid-r4.abstract.qdel.bm25.txt?dl=1': '115d6d2e308b47ffacbc642175095c74', 'https://www.dropbox.com/s/bpdopie6gqffv0w/anserini.covid-r4.full-text.qq.bm25.txt?dl=1': 'af0d10a5344f4007e6781e8d2959eb54', 'https://www.dropbox.com/s/rh0uy71ogbpas0v/anserini.covid-r4.full-text.qdel.bm25.txt?dl=1': '594d469b8f45cf808092a3d8e870eaf5', 'https://www.dropbox.com/s/ifkjm8ff8g2aoh1/anserini.covid-r4.paragraph.qq.bm25.txt?dl=1': '6f468b7b60aaa05fc215d237b5475aec', 'https://www.dropbox.com/s/keuogpx1dzinsgy/anserini.covid-r4.paragraph.qdel.bm25.txt?dl=1': 'b7b39629c12573ee0bfed8687dacc743', 'https://www.dropbox.com/s/zjc0069do0a4gu3/anserini.covid-r4.fusion1.txt?dl=1': '8ae9d1fca05bd1d9bfe7b24d1bdbe270', 'https://www.dropbox.com/s/qekc9vr3oom777n/anserini.covid-r4.fusion2.txt?dl=1': 'e1894209c815c96c6ddd4cacb578261a', 'https://www.dropbox.com/s/2jx27rh3lknps9q/anserini.covid-r4.abstract.qdel.bm25%2Brm3Rf.txt?dl=1': '9d954f31e2f07e11ff559bcb14ef16af', 'https://www.dropbox.com/s/g3giixyusk4tzro/anserini.final-r4.fusion1.txt?dl=1': 'a8ab52e12c151012adbfc8e37d666760', 'https://www.dropbox.com/s/z4wbqj9gfos8wln/anserini.final-r4.fusion2.txt?dl=1': '1500104c928f463f38e76b58b91d4c07', 'https://www.dropbox.com/s/28w83b07yzndlbg/anserini.final-r4.rf.txt?dl=1': '41d746eb86a99d2f33068ebc195072cd' } def check_runs(self, runs): tmp = f'tmp{randint(0, 10000)}' # In the rare event there's a collision if os.path.exists(tmp): shutil.rmtree(tmp) os.mkdir(tmp) for url in runs: print(f'Verifying stored run at {url}...') filename = url.split('/')[-1] filename = re.sub('\\?dl=1$', '', filename) # Remove the Dropbox 'force download' parameter download_url(url, tmp, md5=runs[url], force=True) self.assertTrue(os.path.exists(os.path.join(tmp, filename))) print('') shutil.rmtree(tmp) def test_round3_runs(self): self.check_runs(self.round3_runs) def test_round4_runs(self): self.check_runs(self.round4_runs) if __name__ == '__main__': unittest.main()
49.342105
110
0.659911
636
5,625
5.803459
0.303459
0.021945
0.105662
0.126795
0.295584
0.10783
0.022758
0
0
0
0
0.169297
0.211378
5,625
113
111
49.778761
0.662759
0.119289
0
0.024096
0
0.313253
0.619125
0.168558
0
0
0
0
0.012048
1
0.048193
false
0
0.072289
0
0.13253
0.024096
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
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
93b27b3670fb7c4b2fb321c433b23b2137cb55a9
312
py
Python
exercicios/ex020.py
Siqueira-Vinicius/Python
bd1f7e2bcdfd5481724d32db387f51636bb4ad60
[ "MIT" ]
null
null
null
exercicios/ex020.py
Siqueira-Vinicius/Python
bd1f7e2bcdfd5481724d32db387f51636bb4ad60
[ "MIT" ]
null
null
null
exercicios/ex020.py
Siqueira-Vinicius/Python
bd1f7e2bcdfd5481724d32db387f51636bb4ad60
[ "MIT" ]
null
null
null
import random print('Orden de apresentação') n1 = str(input('Digite o nome do aluno:')) n2 = str(input('Digite o nome do aluno:')) n3 = str(input('Digite o nome do aluno:')) n4 = str(input('Digite o nome do aluno:')) l = [n1, n2, n3, n4] random.shuffle(l) print('A ordem de apresentação é {}' .format(l))
26
42
0.653846
54
312
3.777778
0.425926
0.156863
0.27451
0.294118
0.509804
0.509804
0.509804
0
0
0
0
0.031008
0.173077
312
11
43
28.363636
0.75969
0
0
0
0
0
0.453376
0
0
0
0
0
0
1
0
false
0
0.1
0
0.1
0.2
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
93c7a4008bc3d0496361f6700c5097813152a717
424
py
Python
src/input.py
Thundzz/python-tictactoe
b64d8295e69c95367559683d8ee01112165826f2
[ "MIT" ]
null
null
null
src/input.py
Thundzz/python-tictactoe
b64d8295e69c95367559683d8ee01112165826f2
[ "MIT" ]
null
null
null
src/input.py
Thundzz/python-tictactoe
b64d8295e69c95367559683d8ee01112165826f2
[ "MIT" ]
null
null
null
import curses class Input: def __init__(self, stdscr, timeout): self.stdscr = stdscr self.timeout = timeout def initialize(self): self.stdscr.nodelay(1) self.stdscr.timeout(self.timeout) def poll_events(self): keys = [] for i in range(50): key = self.stdscr.getch() if key != -1: keys.append(key) return keys
18.434783
41
0.540094
49
424
4.571429
0.510204
0.223214
0.151786
0.1875
0
0
0
0
0
0
0
0.014706
0.358491
424
22
42
19.272727
0.808824
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.066667
0
0.4
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
93c892ca9750a13202d340d334f41e306c514cdc
1,973
py
Python
clickhouse_sqlalchemy/sql/ddl.py
Fozar/clickhouse-sqlalchemy
88fd630856655cc470430b365dce7e85516abf62
[ "MIT" ]
null
null
null
clickhouse_sqlalchemy/sql/ddl.py
Fozar/clickhouse-sqlalchemy
88fd630856655cc470430b365dce7e85516abf62
[ "MIT" ]
null
null
null
clickhouse_sqlalchemy/sql/ddl.py
Fozar/clickhouse-sqlalchemy
88fd630856655cc470430b365dce7e85516abf62
[ "MIT" ]
null
null
null
from sqlalchemy.sql.ddl import ( SchemaDropper as SchemaDropperBase, DropTable as DropTableBase, SchemaGenerator as SchemaGeneratorBase, _CreateDropBase ) from sqlalchemy.sql.expression import UnaryExpression from sqlalchemy.sql.operators import custom_op class DropTable(DropTableBase): def __init__(self, element, bind=None, if_exists=False): self.on_cluster = element.dialect_options['clickhouse']['cluster'] super(DropTable, self).__init__(element, bind=bind, if_exists=if_exists) class SchemaDropper(SchemaDropperBase): def __init__(self, dialect, connection, if_exists=False, **kwargs): self.if_exists = if_exists super(SchemaDropper, self).__init__(dialect, connection, **kwargs) def visit_table(self, table, **kwargs): self.connection.execute(DropTable(table, if_exists=self.if_exists)) class CreateMaterializedView(_CreateDropBase): """Represent a CREATE MATERIALIZED VIEW statement.""" __visit_name__ = "create_materialized_view" def __init__(self, element, if_not_exists=False): self.if_not_exists = if_not_exists super(CreateMaterializedView, self).__init__(element) class SchemaGenerator(SchemaGeneratorBase): def __init__(self, dialect, connection, if_not_exists=False, **kwargs): self.if_not_exists = if_not_exists super(SchemaGenerator, self).__init__(dialect, connection, **kwargs) def visit_materialized_view(self, table, **kwargs): self.connection.execute( CreateMaterializedView(table, if_not_exists=self.if_not_exists) ) def ttl_delete(expr): return UnaryExpression(expr, modifier=custom_op('DELETE')) def ttl_to_disk(expr, disk): assert isinstance(disk, str), 'Disk must be str' return expr.op('TO DISK')(disk) def ttl_to_volume(expr, volume): assert isinstance(volume, str), 'Volume must be str' return expr.op('TO VOLUME')(volume)
34.017241
76
0.722757
230
1,973
5.865217
0.265217
0.047443
0.065234
0.033358
0.265382
0.23573
0.13788
0.04596
0
0
0
0
0.177395
1,973
57
77
34.614035
0.831177
0.023822
0
0.052632
0
0
0.050521
0.0125
0
0
0
0
0.052632
1
0.236842
false
0
0.078947
0.026316
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
1
0
0
0
0
1
0
0
2
93d21360f4bd8b82d7b05b4b7a3233af5dc7693d
1,092
py
Python
amocrm_asterisk_ng/scenario/impl/classic/functions/impl/GetCallDirectionFunctionImpl.py
iqtek/amocrn_asterisk_ng
429a8d0823b951c855a49c1d44ab0e05263c54dc
[ "MIT" ]
null
null
null
amocrm_asterisk_ng/scenario/impl/classic/functions/impl/GetCallDirectionFunctionImpl.py
iqtek/amocrn_asterisk_ng
429a8d0823b951c855a49c1d44ab0e05263c54dc
[ "MIT" ]
null
null
null
amocrm_asterisk_ng/scenario/impl/classic/functions/impl/GetCallDirectionFunctionImpl.py
iqtek/amocrn_asterisk_ng
429a8d0823b951c855a49c1d44ab0e05263c54dc
[ "MIT" ]
null
null
null
from typing import Literal from ..core import IGetCallDirectionFunction from ..core import IsInternalNumberFunction __all__ = [ "GetCallDirectionFunctionImpl", ] class GetCallDirectionFunctionImpl(IGetCallDirectionFunction): __slots__ = ( "__is_internal_number_function", ) def __init__( self, is_internal_number_function: IsInternalNumberFunction, ) -> None: self.__is_internal_number_function = is_internal_number_function async def __call__( self, caller_phone_number: str, called_phone_number: str, ) -> Literal["inbound", "outbound"]: if await self.__is_internal_number_function(caller_phone_number) and \ not await self.__is_internal_number_function(called_phone_number): return "outbound" if not await self.__is_internal_number_function(caller_phone_number) and \ await self.__is_internal_number_function(called_phone_number): return "inbound" raise Exception("Unable to determine the direction of the call.")
28
82
0.705128
111
1,092
6.36036
0.36036
0.113314
0.181303
0.271955
0.396601
0.31728
0.31728
0.308782
0.308782
0.308782
0
0
0.229853
1,092
38
83
28.736842
0.839477
0
0
0.074074
0
0
0.121795
0.052198
0
0
0
0
0
1
0.037037
false
0
0.111111
0
0.296296
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
93dc059900247302b76bdb3584a8dfb81d0675af
390
py
Python
xmind2testcase2021/__about__.py
lovpuss/xmind2testcase2021
1d01e6ebd4889373aba94e32a0948347f87aef06
[ "MIT" ]
null
null
null
xmind2testcase2021/__about__.py
lovpuss/xmind2testcase2021
1d01e6ebd4889373aba94e32a0948347f87aef06
[ "MIT" ]
null
null
null
xmind2testcase2021/__about__.py
lovpuss/xmind2testcase2021
1d01e6ebd4889373aba94e32a0948347f87aef06
[ "MIT" ]
null
null
null
__title__ = 'xmind2testcase2021' __description__ = 'xmind2testcase2021基于Python实现,提供了一个高效测试用例设计的解决方案!' __keywords__ = 'xmind2testcase2021, testcase, test, testing, xmind, 思维导图, XMind思维导图', __url__ = 'https://pypi.org/project/xmind2testcase2021/1.0.3/' __author__ = 'Devin' __author_email__ = 'lovpuss@163.com' __version__ = '1.0.3' __license__ = 'MIT' __cake__ = u'\u2728 \U0001f370 \u2728'
39
85
0.774359
40
390
6.625
0.825
0.015094
0.022642
0
0
0
0
0
0
0
0
0.123944
0.089744
390
9
86
43.333333
0.622535
0
0
0
0
0
0.602564
0.123077
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
93ebc214acea16d181a55af944802778a38efd38
1,078
py
Python
company_interface.py
mapj17/bth_requirements
0966a3c3815b43ebecefd278bf4379e50bb21c8a
[ "MIT" ]
null
null
null
company_interface.py
mapj17/bth_requirements
0966a3c3815b43ebecefd278bf4379e50bb21c8a
[ "MIT" ]
null
null
null
company_interface.py
mapj17/bth_requirements
0966a3c3815b43ebecefd278bf4379e50bb21c8a
[ "MIT" ]
null
null
null
from dataclasses import dataclass @dataclass class SWRelease: compatible_hws: list sw_version: int price_per_unit: int def is_compatible_with(self, hw_version): return hw_version in self.compatible_hws @dataclass class BillInfo: info: SWRelease num_updated_vehicles: int class CompanyInterface: def __init__(self, available_releases: list, existing_bills: list): self.available_releases = available_releases self.existing_bills = existing_bills def get_latest_release(self): return self.available_releases[-1] def get_latest_release_for_hw(self, hw_version): for release in self.available_releases[::-1]: if release.is_compatible_with(hw_version): return release else: raise Exception("No available release for that hw") def publish_billables(self, bill_info): self.existing_bills.append(bill_info) def get_current_debt(self): return sum([x.num_updated_vehicles * x.info.price_per_unit for x in self.existing_bills])
25.666667
97
0.710575
139
1,078
5.194245
0.374101
0.117729
0.116343
0.052632
0
0
0
0
0
0
0
0.002384
0.221707
1,078
41
98
26.292683
0.858164
0
0
0.071429
0
0
0.02974
0
0
0
0
0
0
1
0.214286
false
0
0.035714
0.107143
0.678571
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
93feee21f9bb3619476c8ea9adcf3c4c25c4e316
2,374
py
Python
models/search_result.py
offhook/offhook-coordinator
ad72dd6b11da76d614c25de6066675cd9b1c0791
[ "MIT" ]
null
null
null
models/search_result.py
offhook/offhook-coordinator
ad72dd6b11da76d614c25de6066675cd9b1c0791
[ "MIT" ]
3
2019-12-15T08:08:51.000Z
2019-12-23T09:15:57.000Z
models/search_result.py
offhook/offhook-coordinator
ad72dd6b11da76d614c25de6066675cd9b1c0791
[ "MIT" ]
1
2020-01-14T08:12:00.000Z
2020-01-14T08:12:00.000Z
# coding: utf-8 from __future__ import absolute_import from .base_model_ import Model from . import util class SearchResult(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self, name=None, full_name=None): # noqa: E501 """SearchResult - a model defined in Swagger :param name: The name of this SearchResult. # noqa: E501 :type name: str :param full_name: The full_name of this SearchResult. # noqa: E501 :type full_name: str """ self.swagger_types = { 'name': str, 'full_name': str } self.attribute_map = { 'name': 'name', 'full_name': 'fullName' } self._name = name self._full_name = full_name @classmethod def from_dict(cls, dikt): """Returns the dict as a model :param dikt: A dict. :type: dict :return: The SearchResult of this SearchResult. # noqa: E501 :rtype: SearchResult """ return util.deserialize_model(dikt, cls) @property def name(self): """Gets the name of this SearchResult. :return: The name of this SearchResult. :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this SearchResult. :param name: The name of this SearchResult. :type name: str """ if name is None: raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property def full_name(self): """Gets the full_name of this SearchResult. A fully-describing name of the package # noqa: E501 :return: The full_name of this SearchResult. :rtype: str """ return self._full_name @full_name.setter def full_name(self, full_name): """Sets the full_name of this SearchResult. A fully-describing name of the package # noqa: E501 :param full_name: The full_name of this SearchResult. :type full_name: str """ if full_name is None: raise ValueError("Invalid value for `full_name`, must not be `None`") # noqa: E501 self._full_name = full_name
25.526882
95
0.587195
295
2,374
4.576271
0.237288
0.136296
0.146667
0.162963
0.502222
0.399259
0.394074
0.325926
0.164444
0.102222
0
0.015605
0.32519
2,374
92
96
25.804348
0.827091
0.428391
0
0.176471
1
0
0.117912
0
0
0
0
0
0
1
0.176471
false
0
0.088235
0
0.382353
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
9e084dab55ef0da47bf80906ff5d8a46a9c756f7
959
py
Python
Software_University/python_basics/conditional_statements_advanced/lecture/trade_commissions.py
Ivanazzz/SoftUni-W3resource-Python
892321a290e22a91ff2ac2fef5316179a93f2f17
[ "MIT" ]
1
2022-01-26T07:38:11.000Z
2022-01-26T07:38:11.000Z
Software_University/python_basics/conditional_statements_advanced/lecture/trade_commissions.py
Ivanazzz/SoftUni-W3resource-Python
892321a290e22a91ff2ac2fef5316179a93f2f17
[ "MIT" ]
null
null
null
Software_University/python_basics/conditional_statements_advanced/lecture/trade_commissions.py
Ivanazzz/SoftUni-W3resource-Python
892321a290e22a91ff2ac2fef5316179a93f2f17
[ "MIT" ]
null
null
null
city = input("Enter the name of the city: ") sales = float(input("Enter the percentage of sales: ")) commission = 0 if 0 <= sales <= 500: if city == "Sofia": commission = 0.05 elif city == "Varna": commission == 0.045 elif city == "Plovdiv": commission == 0.055 elif 500 < sales <= 1000: if city == "Sofia": commission = 0.07 elif city == "Varna": commission == 0.075 elif city == "Plovdiv": commission == 0.08 elif 1000 < sales <= 10000: if city == "Sofia": commission = 0.08 elif city == "Varna": commission == 0.1 elif city == "Plovdiv": commission == 0.12 elif sales > 10000: if city == "Sofia": commission = 0.12 elif city == "Varna": commission == 0.13 elif city == "Plovdiv": commission == 0.145 if commission == 0: print("error") else: total_sum = sales * commission print(f"{total_sum:.2f}")
24.589744
55
0.54536
120
959
4.341667
0.3
0.295585
0.084453
0.161228
0.591171
0.122841
0.122841
0
0
0
0
0.101056
0.308655
959
38
56
25.236842
0.684766
0
0
0.333333
0
0
0.153285
0
0
0
0
0
0
1
0
false
0
0
0
0
0.055556
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
9e26b71805906ab042991ac60f7408eeaa18b525
426
py
Python
example.py
raphaelboulch/PVAPins
1e2d83c07ab616c932bc93a9704b32f01b6745a1
[ "MIT" ]
null
null
null
example.py
raphaelboulch/PVAPins
1e2d83c07ab616c932bc93a9704b32f01b6745a1
[ "MIT" ]
null
null
null
example.py
raphaelboulch/PVAPins
1e2d83c07ab616c932bc93a9704b32f01b6745a1
[ "MIT" ]
null
null
null
import pvapins client = pvapins.PVAPins("INSERT YOUR KEY HERE") # Example: Get your account balance print(client.get_balance()) # Example: Get your account history print(client.get_history()) # Example: Get a phone number print(client.get_number("App", "Country")) # Example: Get a country's rates print(client.get_rates("Country")) # Example: Get the content of an SMS print(client.get_sms("Number", "App", "Country"))
22.421053
49
0.739437
63
426
4.920635
0.396825
0.16129
0.225806
0.135484
0
0
0
0
0
0
0
0
0.126761
426
18
50
23.666667
0.833333
0.377934
0
0
0
0
0.204633
0
0
0
0
0
0
1
0
false
0
0.142857
0
0.142857
0.714286
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
2
f51e7b58276b07028fa7bccdc06fe2f769c19023
1,098
py
Python
codershq/challenge/migrations/0002_auto_20210812_0923.py
Buhannad/CodersHQ
27b643cfab2094aa1ad1b069085c4e2d165345e9
[ "MIT" ]
45
2021-02-24T11:10:29.000Z
2022-03-25T07:14:46.000Z
codershq/challenge/migrations/0002_auto_20210812_0923.py
Buhannad/CodersHQ
27b643cfab2094aa1ad1b069085c4e2d165345e9
[ "MIT" ]
96
2021-03-01T16:36:37.000Z
2022-03-26T17:32:26.000Z
codershq/challenge/migrations/0002_auto_20210812_0923.py
Buhannad/CodersHQ
27b643cfab2094aa1ad1b069085c4e2d165345e9
[ "MIT" ]
29
2021-08-08T18:24:50.000Z
2022-03-29T12:17:06.000Z
# Generated by Django 3.0.11 on 2021-08-12 05:23 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('challenge', '0001_initial'), ] operations = [ migrations.AlterField( model_name='challenge', name='cloud_provider', field=models.TextField(blank=True, max_length=100, null=True, verbose_name='Cloud Provider'), ), migrations.AlterField( model_name='challenge', name='cloud_provider_token', field=models.TextField(blank=True, max_length=500, null=True, verbose_name='Cloud Provider token'), ), migrations.AlterField( model_name='challenge', name='cloud_provider_url', field=models.URLField(blank=True, null=True, verbose_name='Cloud Provider URL'), ), migrations.AlterField( model_name='challenge', name='slack_group', field=models.TextField(blank=True, max_length=100, null=True, verbose_name='Slack group'), ), ]
32.294118
111
0.611111
116
1,098
5.62931
0.37931
0.082695
0.156202
0.177642
0.676876
0.676876
0.49464
0.436447
0.183767
0.183767
0
0.036295
0.272313
1,098
33
112
33.272727
0.780976
0.041894
0
0.444444
1
0
0.174286
0
0
0
0
0
0
1
0
false
0
0.037037
0
0.148148
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
f52b5aa45b7e07a21fab828b1933aa23af1e7134
410
py
Python
functional-problems/oddEvenLevelDiff.py
vikas-t/DS-Algo
ea654d1cad5374c824c52da9d3815a9546eb43fa
[ "Apache-2.0" ]
null
null
null
functional-problems/oddEvenLevelDiff.py
vikas-t/DS-Algo
ea654d1cad5374c824c52da9d3815a9546eb43fa
[ "Apache-2.0" ]
null
null
null
functional-problems/oddEvenLevelDiff.py
vikas-t/DS-Algo
ea654d1cad5374c824c52da9d3815a9546eb43fa
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # https://practice.geeksforgeeks.org/problems/odd-even-level-difference/1 def getLevelDiff(root): h = {0: 0, 1: 0} level = 0 populateDiff(root, level, h) return h[0]-h[1] def populateDiff(root, level, h): if root == None: return l = level%2 h[l] += root.data populateDiff(root.left, level+1, h) populateDiff(root.right, level+1, h)
22.777778
73
0.604878
60
410
4.133333
0.45
0.258065
0.169355
0.177419
0
0
0
0
0
0
0
0.038585
0.241463
410
18
74
22.777778
0.758842
0.217073
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0
0
0.333333
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
f54534eccd611f88ac28c78ed640ccd9fb192ea9
51,230
py
Python
pysnmp-with-texts/Vsm-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/Vsm-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/Vsm-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 Vsm-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Vsm-MIB # Produced by pysmi-0.3.4 at Wed May 1 15:35: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) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint") dv2, = mibBuilder.importSymbols("DV2-MIB", "dv2") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") iso, NotificationType, Unsigned32, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, ModuleIdentity, Gauge32, TimeTicks, ObjectIdentity, Bits, IpAddress, Counter64, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "NotificationType", "Unsigned32", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "ModuleIdentity", "Gauge32", "TimeTicks", "ObjectIdentity", "Bits", "IpAddress", "Counter64", "Counter32") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") dv2Vsm = MibIdentifier((1, 3, 6, 1, 4, 1, 251, 1, 1, 47)) class VciInteger(Integer32): subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 65535) class VpiInteger(Integer32): subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 255) class VsmBundle(Integer32): subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 127) vsmCardCfgTable = MibTable((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 1), ) if mibBuilder.loadTexts: vsmCardCfgTable.setStatus('mandatory') if mibBuilder.loadTexts: vsmCardCfgTable.setDescription('The VSM card configuration table.') vsmCardCfgTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 1, 1), ).setIndexNames((0, "Vsm-MIB", "vsmCardCfgIndex")) if mibBuilder.loadTexts: vsmCardCfgTableEntry.setStatus('mandatory') vsmCardCfgIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 0))).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmCardCfgIndex.setStatus('mandatory') if mibBuilder.loadTexts: vsmCardCfgIndex.setDescription('Index for VSM Card Cfg Table') vsmCardCfgBndlTslotStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmCardCfgBndlTslotStatus.setStatus('mandatory') if mibBuilder.loadTexts: vsmCardCfgBndlTslotStatus.setDescription('Enables the collection of Bundle and Timeslot status') vsmLinkTable = MibTable((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 2), ) if mibBuilder.loadTexts: vsmLinkTable.setStatus('mandatory') if mibBuilder.loadTexts: vsmLinkTable.setDescription('Table for VSM Link configuration') vsmLinkEntry = MibTableRow((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 2, 1), ).setIndexNames((0, "Vsm-MIB", "vsmLinkLink")) if mibBuilder.loadTexts: vsmLinkEntry.setStatus('mandatory') vsmLinkLink = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 3))).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmLinkLink.setStatus('mandatory') if mibBuilder.loadTexts: vsmLinkLink.setDescription('Link Number for Table Entry') vsmLinkEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("disabled", 2), ("enabled", 1))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmLinkEnable.setStatus('mandatory') if mibBuilder.loadTexts: vsmLinkEnable.setDescription("Enable/Disable Link <DETAIL_DESCRIPTION> The user has the ability to enable or disable each of the LIM's links individually.") vsmLinkEnableStat = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("disabled", 2), ("enabled", 1), ("wait-for-valid-lim", 3), ("link-not-used", 4), ("error", 5), ("wait-signaling-lim", 6), ("wait-lim-framing", 7), ("wait-frame-bit", 8))).clone('disabled')).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmLinkEnableStat.setStatus('mandatory') if mibBuilder.loadTexts: vsmLinkEnableStat.setDescription('Link Enable Status <DETAIL_DESCRIPTION> The current status of link depends on a valid lim type, the availability of a link on the LIM and LIM Configuration.') vsmLinkSigType = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("cas", 2), ("none", 1))).clone('cas')).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmLinkSigType.setStatus('mandatory') if mibBuilder.loadTexts: vsmLinkSigType.setDescription("Enable/Disable Signalling <DETAIL_DESCRIPTION> The user has the ability to enable or disable signalling for each of the LIM's links individually.") vsmTsCfgTable = MibTable((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 3), ) if mibBuilder.loadTexts: vsmTsCfgTable.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsCfgTable.setDescription('The timeslot configuration table.') vsmTsCfgTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 3, 1), ).setIndexNames((0, "Vsm-MIB", "vsmTsCfgLinkNo"), (0, "Vsm-MIB", "vsmTsCfgTsNo")) if mibBuilder.loadTexts: vsmTsCfgTableEntry.setStatus('mandatory') vsmTsCfgLinkNo = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 3))).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmTsCfgLinkNo.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsCfgLinkNo.setDescription('The link number.') vsmTsCfgTsNo = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 3, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 31))).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmTsCfgTsNo.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsCfgTsNo.setDescription('The timeslot number of the link.') vsmTsCfgBundleNo = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 3, 1, 3), VsmBundle().clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmTsCfgBundleNo.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsCfgBundleNo.setDescription('The Bundle mapped to this timeslot.') vsmTsCfgAALTyp = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 3, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("aal2", 2), ("aal1", 1))).clone('aal2')).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmTsCfgAALTyp.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsCfgAALTyp.setDescription('AAL type used for timeslot. This must match the AAL type used by the bundle to which this timeslot is assigned.') vsmTsCfgChanID = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 3, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(8, 255)).clone(8)).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmTsCfgChanID.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsCfgChanID.setDescription('The Channel ID (CID) this TS is mapped to. The CID must be unique across AAL2 VCs of an end-to-end connection. AAL2 only. ') vsmTsCfgCmprssionTyp = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 3, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("adpcmG726-32k", 2), ("none", 1))).clone('adpcmG726-32k')).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmTsCfgCmprssionTyp.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsCfgCmprssionTyp.setDescription('The voice compression algorithm being used for the timeslot. AAL2 only.') vsmTsCfgFaxMdmHndlng = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 3, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("auto-disable", 2), ("always-compress", 1))).clone('auto-disable')).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmTsCfgFaxMdmHndlng.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsCfgFaxMdmHndlng.setDescription('The option to handle Fax/Modem signal. AAL2 only. pass-through: make no change when tone is detected, if compressing then keep compressing.bypass: If compressing and tone detected, attempt to switch to uncompressed') vsmTsCfgEchoCancel = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 3, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(3, 1, 2))).clone(namedValues=NamedValues(("auto-disable", 3), ("enable", 1), ("disable", 2))).clone('auto-disable')).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmTsCfgEchoCancel.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsCfgEchoCancel.setDescription('Indicate whether echo cancellation is enabled.') vsmTsCfgSilenceRmvl = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 3, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(3, 1, 2))).clone(namedValues=NamedValues(("auto-disable", 3), ("enable", 1), ("disable", 2))).clone('auto-disable')).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmTsCfgSilenceRmvl.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsCfgSilenceRmvl.setDescription('Allows for the configuration of silence removal. Auto will disable silence removal when a FAX/modem tone is detected. AAL2 only.') vsmTsCfgIdleDetect = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 3, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2))).clone('enable')).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmTsCfgIdleDetect.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsCfgIdleDetect.setDescription('Indicate whether idle channel detection is enabled. If disabled this timeslot will always send cells, even when on hook. AAL2 only.') vsmTsCfgRmtLaw = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 3, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(3, 1, 2))).clone(namedValues=NamedValues(("auto", 3), ("u-law", 1), ("a-law", 2))).clone('auto')).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmTsCfgRmtLaw.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsCfgRmtLaw.setDescription("Indicates the remote VSM's companding type. u-law for T1, a-law for E1. Auto means use the same type as the local link.") vsmTsCfgSignalTyp = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 3, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(6, 2, 3, 4, 5, 7, 8, 1))).clone(namedValues=NamedValues(("e-and-m", 6), ("gs-fxo-fxs", 2), ("gs-fxs-fxo", 3), ("ls-fxo-fxs", 4), ("ls-fxs-fxo", 5), ("ssr2", 7), ("plar", 8), ("none", 1))).clone('e-and-m')).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmTsCfgSignalTyp.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsCfgSignalTyp.setDescription('This object specifies the signal type of the timeslot. None is used to turn off signaling to allow for data transport.') vsmTsCfgSigCndTypNB = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 3, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 5, 6, 7))).clone(namedValues=NamedValues(("onhook-A0B0", 1), ("onhook-A0B1", 2), ("offhook-A01B01", 3), ("failure-A1B1", 5), ("failure-A10B1", 6), ("failure-A1B1C1D1", 7))).clone('onhook-A0B0')).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmTsCfgSigCndTypNB.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsCfgSigCndTypNB.setDescription('The object specifies the type of signaling conditioning to narrowband.') vsmTsCfgSigCndTypATM = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 3, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 5, 6, 7))).clone(namedValues=NamedValues(("onhook-A0B0", 1), ("onhook-A0B1", 2), ("offhook-A01B01", 3), ("failure-A1B1", 5), ("failure-A10B1", 6), ("failure-A1B1C1D1", 7))).clone('onhook-A0B0')).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmTsCfgSigCndTypATM.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsCfgSigCndTypATM.setDescription('The object specifies the type of signaling conditioning to ATM.') vsmTsCfgDataCndTypNB = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 3, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 3, 4, 5, 6, 7, 8, 9, 10, 1))).clone(namedValues=NamedValues(("muLaw-0V-7F", 2), ("muLaw-0V-FF", 3), ("aLaw-0V-D5", 4), ("aLaw-0V-54", 5), ("dacs-trbl-E4", 6), ("ctrl-mode-FE", 7), ("cir-oos-36", 8), ("mux-oos-1A", 9), ("user-data-FF", 10), ("none", 1))).clone('muLaw-0V-7F')).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmTsCfgDataCndTypNB.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsCfgDataCndTypNB.setDescription('The object specifies the type of data conditioning to narrowband.') vsmTsCfgDataCndTypATM = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 3, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 3, 4, 5, 6, 7, 8, 9, 10, 1))).clone(namedValues=NamedValues(("muLaw-0V-7F", 2), ("muLaw-0V-FF", 3), ("aLaw-0V-D5", 4), ("aLaw-0V-54", 5), ("dacs-trbl-E4", 6), ("ctrl-mode-FE", 7), ("cir-oos-36", 8), ("mux-oos-1A", 9), ("user-data-FF", 10), ("none", 1))).clone('muLaw-0V-7F')).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmTsCfgDataCndTypATM.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsCfgDataCndTypATM.setDescription('The object specifies the type of data conditioning to ATM.') vsmTsCfgMulticast = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 3, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("disabled", 2), ("enabled", 1))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmTsCfgMulticast.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsCfgMulticast.setDescription('Multicast state: disabled = no multicast') vsmTsCfgOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 3, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17))).clone(namedValues=NamedValues(("down", 2), ("up", 1), ("configured", 3), ("inv-cfg", 4), ("aal-mismatch", 5), ("no-more-DSPs", 6), ("inv-CID", 7), ("inv-Lk-no", 9), ("inv-Sil-Det", 10), ("inv-CmpTyp", 11), ("unknown-Lim", 12), ("inv-MCast", 13), ("inv-maxtslot", 14), ("aal1-max-TS", 15), ("inv-MCast-BN", 16), ("non-CAS-link", 17))).clone('down')).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsCfgOperStatus.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsCfgOperStatus.setDescription('The operating status of the timeslot.') vsmTsCfgAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 3, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1, 3))).clone(namedValues=NamedValues(("down", 2), ("up", 1), ("reconfig", 3))).clone('down')).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmTsCfgAdminStatus.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsCfgAdminStatus.setDescription('The administrative status of the timeslot.') vsmTsCfgValidity = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 3, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("valid", 1), ("invalid", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmTsCfgValidity.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsCfgValidity.setDescription('Set to invalid(2) to delete this row.') vsmBundleCfgTable = MibTable((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 4), ) if mibBuilder.loadTexts: vsmBundleCfgTable.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleCfgTable.setDescription('The configuration table for a Bundle. <DETAIL_DESCRIPTION> A VSM Bundle specifies the service requirements of a virtual channel connection, including AAL type, connection type (pvc,svc), bandwidth and QoS.') vsmBundleCfgTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 4, 1), ).setIndexNames((0, "Vsm-MIB", "vsmBundleCfgNo")) if mibBuilder.loadTexts: vsmBundleCfgTableEntry.setStatus('mandatory') vsmBundleCfgNo = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 4, 1, 1), VsmBundle()).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmBundleCfgNo.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleCfgNo.setDescription('The Bundle number.') vsmBundleCfgVcVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 4, 1, 2), VpiInteger().clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmBundleCfgVcVpi.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleCfgVcVpi.setDescription('The VPI of the VCC.') vsmBundleCfgVcVci = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 4, 1, 3), VciInteger().clone(1)).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmBundleCfgVcVci.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleCfgVcVci.setDescription('The VCI of the VCC. This is the same as the Bundle no. for VSM.') vsmBundleCfgVcAALTyp = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 4, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("aal2", 2), ("aal1", 1))).clone('aal2')).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmBundleCfgVcAALTyp.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleCfgVcAALTyp.setDescription('The AAL type used for the Bundle. This must match the AAL type used by the timeslot that is assigned to this bundle.') vsmBundleCfgMaxTslot = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 4, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 120)).clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmBundleCfgMaxTslot.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleCfgMaxTslot.setDescription('Specify the maximum number of timeslots that will be configured for the bundle. AAL2 only') vsmBundleCfgVcCDV = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 4, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 128)).clone(8)).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmBundleCfgVcCDV.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleCfgVcCDV.setDescription('ATM cell delay variation between VSMs (in 125 microsecond intervals) <DETAIL_DESCRIPTION> ATM cell delay variation between VSMs (in 125 microsecond intervals). The maximum programmable value for cell delay variation is 16 milliseconds. Therefore, the greatest number which may be entered in this field is 128 (128 * 125 microsecond units). The default value is 8 (1 millisecond).') vsmBundleCfgTimerCU = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 4, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 20)).clone(4)).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmBundleCfgTimerCU.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleCfgTimerCU.setDescription('Maximum amount of time (msec) to hold ATM cell before padding and sending. 0 results in an infinite wait. AAL2 only.') vsmBundleCfgCESPartialFill = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 4, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 47)).clone(47)).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmBundleCfgCESPartialFill.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleCfgCESPartialFill.setDescription('Specify the no. of user octets per cell for partial cell fill. AAL1 only.') vsmBundleCfgVcTyp = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 4, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("pvc", 1), ("spvc", 2), ("svc", 3))).clone('pvc')).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmBundleCfgVcTyp.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleCfgVcTyp.setDescription('The option to setup VCC.') vsmBundleCfgTrapCfg = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 4, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no-trap", 1), ("state-change", 2))).clone('no-trap')).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmBundleCfgTrapCfg.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleCfgTrapCfg.setDescription('State change results in traps sent to the management station.') vsmBundleCfgOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 4, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1, 3, 4, 5, 7, 9, 10, 11))).clone(namedValues=NamedValues(("down", 2), ("up", 1), ("configured", 3), ("inv-cfg", 4), ("aal-mismatch", 5), ("inv-VPI", 7), ("bndl-novc", 9), ("inv-maxtslot", 10), ("inv-VPI-15", 11))).clone('down')).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmBundleCfgOperStatus.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleCfgOperStatus.setDescription('The operating status of the bundle.') vsmBundleCfgAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 4, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1, 3))).clone(namedValues=NamedValues(("down", 2), ("up", 1), ("reconfig", 3))).clone('down')).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmBundleCfgAdminStatus.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleCfgAdminStatus.setDescription('The administration status of the bundle.') vsmBundleCfgValidity = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 4, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("valid", 1), ("invalid", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmBundleCfgValidity.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleCfgValidity.setDescription('Set to invalid(2) to delete this row.') vsmCardStatTable = MibTable((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 5), ) if mibBuilder.loadTexts: vsmCardStatTable.setStatus('mandatory') if mibBuilder.loadTexts: vsmCardStatTable.setDescription('The VSM card status table.') vsmCardStatTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 5, 1), ).setIndexNames((0, "Vsm-MIB", "vsmCardStatIndex")) if mibBuilder.loadTexts: vsmCardStatTableEntry.setStatus('mandatory') vsmCardStatIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 0))).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmCardStatIndex.setStatus('mandatory') if mibBuilder.loadTexts: vsmCardStatIndex.setDescription('Index for VSM Card Status Table') vsmCardStatBdType = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 5, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 40))).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmCardStatBdType.setStatus('mandatory') if mibBuilder.loadTexts: vsmCardStatBdType.setDescription('VSM Hardware type') vsmCardStatHWSWCompatibility = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 5, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 40))).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmCardStatHWSWCompatibility.setStatus('mandatory') if mibBuilder.loadTexts: vsmCardStatHWSWCompatibility.setDescription('Hardware Software Compatibility between bin, Basecard & DOC') vsmCardStatBinPres = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 5, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("bin-not-present", 1), ("present", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmCardStatBinPres.setStatus('mandatory') if mibBuilder.loadTexts: vsmCardStatBinPres.setDescription('Indicates presence of vsm.bin file') vsmCardStatBinRev = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 5, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 8))).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmCardStatBinRev.setStatus('mandatory') if mibBuilder.loadTexts: vsmCardStatBinRev.setDescription('The vsm.bin revision number') vsmCardStatBdRev = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 5, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 20))).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmCardStatBdRev.setStatus('mandatory') if mibBuilder.loadTexts: vsmCardStatBdRev.setDescription('The Card Hardware Feature Revision') vsmCardStatDoc1Type = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 5, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("unknown-doc-type", 1), ("type-48-channel", 2), ("type-60-channel", 3), ("doc-not-present", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmCardStatDoc1Type.setStatus('mandatory') if mibBuilder.loadTexts: vsmCardStatDoc1Type.setDescription('DOC 1 type supports 48 or 60 channels') vsmCardStatDoc1TypeRev = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 5, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmCardStatDoc1TypeRev.setStatus('mandatory') if mibBuilder.loadTexts: vsmCardStatDoc1TypeRev.setDescription('DOC 1 Hardware Revision') vsmCardStatDoc2Type = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 5, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("unknown-doc-type", 1), ("type-48-channel", 2), ("type-60-channel", 3), ("doc-not-present", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmCardStatDoc2Type.setStatus('mandatory') if mibBuilder.loadTexts: vsmCardStatDoc2Type.setDescription('DOC 2 type supports 48 or 60 channels') vsmCardStatDoc2TypeRev = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 5, 1, 10), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmCardStatDoc2TypeRev.setStatus('mandatory') if mibBuilder.loadTexts: vsmCardStatDoc2TypeRev.setDescription('DOC 2 Hardware Revision') vsmCardStatLimType = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 5, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("invalid-or-no-lim", 1), ("ds1-dual-signaling-lim", 2), ("ds1-quad-signaling-lim", 3), ("e1-dual-signaling-lim", 4), ("e1-quad-signaling-lim", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmCardStatLimType.setStatus('mandatory') if mibBuilder.loadTexts: vsmCardStatLimType.setDescription('LIM detected for the VSM card.') vsmTsStatTable = MibTable((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6), ) if mibBuilder.loadTexts: vsmTsStatTable.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatTable.setDescription('The VSM Timeslot status table.') vsmTsStatTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1), ).setIndexNames((0, "Vsm-MIB", "vsmTsStatLinkNo"), (0, "Vsm-MIB", "vsmTsStatTSNo")) if mibBuilder.loadTexts: vsmTsStatTableEntry.setStatus('mandatory') vsmTsStatLinkNo = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 3))).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatLinkNo.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatLinkNo.setDescription('The Link Number') vsmTsStatTSNo = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 31))).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatTSNo.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatTSNo.setDescription('The timeslot number of the link.') vsmTsStatBundleNo = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 3), VsmBundle()).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatBundleNo.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatBundleNo.setDescription('The Bundle number.') vsmTsStatXmitBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatXmitBytes.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatXmitBytes.setDescription('Number of bytes which have been transmitted <DETAIL_DESCRIPTION> Only applies to AAL2 operating mode. This object provides the user with a count of the number of bytes which have been transmitted to the service interface.') vsmTsStatRecvBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatRecvBytes.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatRecvBytes.setDescription('Number of packets which have been reassembled <DETAIL_DESCRIPTION> Only applies to AAL2 operating mode. This object provides the user with a count of the number of AAL2 packets which have been reassembled or played out to the service interface. It excludes packets that were discarded for any reason, including packets that were not used due to being declared misinserted or discarded while the reassembler was waiting to achieve synchronization') vsmTsStatUnderflows = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatUnderflows.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatUnderflows.setDescription('Number of underflow indications <DETAIL_DESCRIPTION> Only applies to AAL2 operating mode. This object provides the user with a count of the number of underflow indications reported by the DSP to the Maker device (in 2 ms intervals).') vsmTsStatLostPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatLostPackets.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatLostPackets.setDescription('Number of lost packets <DETAIL_DESCRIPTION> Only applies to AAL2 operating mode. This object provides the user with a count of the number of AAL2 packets which have been detected as lost in the network prior to the destination CES IWF layer processing. The cause of a lost packet is an invalid sequence number.') vsmTsStatAALType = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("aal2", 2), ("aal1", 1))).clone('aal2')).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatAALType.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatAALType.setDescription('AAL type used for timeslot.') vsmTsStatVCID = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatVCID.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatVCID.setDescription('The number of the CID on which this BC is transmitting') vsmTsStatCID = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatCID.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatCID.setDescription('The number of the CID assigned to this BC') vsmTsStatActive = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("yes", 1), ("no", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatActive.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatActive.setDescription('State of Time Slot (Bearer Channel): yes = active; no = not active <DETAIL_DESCRIPTION> Provides the user with the activity mode of each Time Slot individually. A Time Slot is considered active if it is being processed into ATM cells. Examples of active Time Slots: 1) an off-hook voice channel 2) any data channel Example of inactive Time Slot: 1) an on-hook voice channel ') vsmTsStatDataLnk = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("dsp", 1), ("bypass", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatDataLnk.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatDataLnk.setDescription('Indicates whether bearer channel is using DSP or Bypass') vsmTsStatBlocked = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("no", 2), ("yes", 1))).clone('no')).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatBlocked.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatBlocked.setDescription('Indicates whether bearer channel is in blocked mode') vsmTsStatIdleIdle = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("no", 2), ("yes", 1))).clone('no')).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatIdleIdle.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatIdleIdle.setDescription('Indicates whether bearer channel is on-hook or off-hook') vsmTsStatHold = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("no", 2), ("yes", 1))).clone('no')).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatHold.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatHold.setDescription('Indicates whether bearer channel is in hold mode') vsmTsStatRemoteCompressed = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("no", 2), ("yes", 1))).clone('no')).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatRemoteCompressed.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatRemoteCompressed.setDescription('Indicates use of compression algorithm on remote channel <DETAIL_DESCRIPTION> A yes indicates that a compression algorithm is being used on the remote channel data. No indicates that no compression algorithm is being used on remote channel.') vsmTsStatRemoteSilent = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("no", 2), ("yes", 1))).clone('no')).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatRemoteSilent.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatRemoteSilent.setDescription('Indicates whether remote channel is in silent mode or non silent mode <DETAIL_DESCRIPTION> ') vsmTsStatCompressed = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("no", 2), ("yes", 1))).clone('no')).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatCompressed.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatCompressed.setDescription('Indicates use of compression algorithm on local channel <DETAIL_DESCRIPTION> A yes indicates that a compression algorithm is being used on the local channel data. No indicates that no compression algorithm is being used on the local channel.') vsmTsStatSilent = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("no", 2), ("yes", 1))).clone('no')).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatSilent.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatSilent.setDescription('Time Slot Silence Status <DETAIL_DESCRIPTION> Indicates whether local channel is in silent mode (yes) or non silent mode (no)') vsmTsStatConditioning = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("no", 2), ("yes", 1))).clone('no')).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatConditioning.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatConditioning.setDescription('Conditioning status: yes = conditioning; no = not conditioning <DETAIL_DESCRIPTION> Data conditioning is initiated upon the detection of a variety of error situations including, but not limited to, LOS, LOF and AIS.') vsmTsStatRemoteConditioning = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 21), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("no", 2), ("yes", 1))).clone('no')).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatRemoteConditioning.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatRemoteConditioning.setDescription('Conditioning status: yes = conditioning; no = not conditioning <DETAIL_DESCRIPTION> Data conditioning is initiated upon the detection of a variety of error situations including, but not limited to, LOS, LOF and AIS.This indicates the remote side is conditioning.') vsmTsStatRIWF = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("no", 2), ("yes", 1))).clone('no')).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatRIWF.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatRIWF.setDescription('Remote interworking function alarm active <DETAIL_DESCRIPTION> ') vsmTsStatLossofRefresh = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 23), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("no", 2), ("yes", 1))).clone('no')).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatLossofRefresh.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatLossofRefresh.setDescription("CAS Refresh status: yes = loss of refresh; no = no alarm <DETAIL_DESCRIPTION> This only applies when signalling is configured for the timeslot. When no signalling is configured this defaults to 'no'. When signalling is configured and it is detected that there is no response to the refresh packet, this bit is set to 'yes'. This will result in ATM signalling and data conditioning.") vsmTsStatCasValuesPDH = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 24), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16))).clone(namedValues=NamedValues(("a0-b0-c0-d0", 1), ("a0-b0-c0-d1", 2), ("a0-b0-c1-d0", 3), ("a0-b0-c1-d1", 4), ("a0-b1-c0-d0", 5), ("a0-b1-c0-d1", 6), ("a0-b1-c1-d0", 7), ("a0-b1-c1-d1", 8), ("a1-b0-c0-d0", 9), ("a1-b0-c0-d1", 10), ("a1-b0-c1-d0", 11), ("a1-b0-c1-d1", 12), ("a1-b1-c0-d0", 13), ("a1-b1-c0-d1", 14), ("a1-b1-c1-d0", 15), ("a1-b1-c1-d1", 16)))).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatCasValuesPDH.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatCasValuesPDH.setDescription('Value of A B C D bits being sent from VSM physical interface (PDH side) <DETAIL_DESCRIPTION> Provides a snapshot of the current state of the A B C D signalling bits on the PDH side of the network') vsmTsStatCasValuesATM = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16))).clone(namedValues=NamedValues(("a0-b0-c0-d0", 1), ("a0-b0-c0-d1", 2), ("a0-b0-c1-d0", 3), ("a0-b0-c1-d1", 4), ("a0-b1-c0-d0", 5), ("a0-b1-c0-d1", 6), ("a0-b1-c1-d0", 7), ("a0-b1-c1-d1", 8), ("a1-b0-c0-d0", 9), ("a1-b0-c0-d1", 10), ("a1-b0-c1-d0", 11), ("a1-b0-c1-d1", 12), ("a1-b1-c0-d0", 13), ("a1-b1-c0-d1", 14), ("a1-b1-c1-d0", 15), ("a1-b1-c1-d1", 16)))).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmTsStatCasValuesATM.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatCasValuesATM.setDescription('Value of A B C D bits being sent from the ATM network <DETAIL_DESCRIPTION> Provides a snapshot of the current state of the A B C D signalling bits on the ATM side of the network') vsmTsStatReset = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 6, 1, 26), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("no", 2), ("yes", 1))).clone('no')).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmTsStatReset.setStatus('mandatory') if mibBuilder.loadTexts: vsmTsStatReset.setDescription('Set to yes(1) to reset all counters in the Time Slot status table.') vsmBundleStatTable = MibTable((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 7), ) if mibBuilder.loadTexts: vsmBundleStatTable.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleStatTable.setDescription('The VSM Bundle status table.') vsmBundleStatTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 7, 1), ).setIndexNames((0, "Vsm-MIB", "vsmBundleStatBundleNo")) if mibBuilder.loadTexts: vsmBundleStatTableEntry.setStatus('mandatory') vsmBundleStatBundleNo = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 7, 1, 1), VsmBundle()).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmBundleStatBundleNo.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleStatBundleNo.setDescription('The Bundle number.') vsmBundleStatXmitCells = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 7, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmBundleStatXmitCells.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleStatXmitCells.setDescription('The count of the number of AAL2 cells transmitted') vsmBundleStatRecvCells = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 7, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmBundleStatRecvCells.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleStatRecvCells.setDescription('The count of cells that have been played out to the PDH link.') vsmBundleStatPvcActive = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 7, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("not-active", 2), ("active", 1))).clone('not-active')).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmBundleStatPvcActive.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleStatPvcActive.setDescription('Is the PVC on this Bundle active.') vsmBundleStatAALType = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 7, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("aal2", 2), ("aal1", 1))).clone('aal2')).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmBundleStatAALType.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleStatAALType.setDescription('The AAL type used for the Bundle.') vsmBundleStatBufUndrflws = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 7, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmBundleStatBufUndrflws.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleStatBufUndrflws.setDescription('The number of buffer underflows (AAL1 only).') vsmBundleStatBufOverflows = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 7, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmBundleStatBufOverflows.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleStatBufOverflows.setDescription('The number of buffer overflows (AAL1 only).') vsmBundleStatPtrReframes = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 7, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmBundleStatPtrReframes.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleStatPtrReframes.setDescription('The count of the number of events in which SDT pointer is not where it is expected (AAL1 only). <DETAIL_DESCRIPTION> The count of the number of events in which SDT pointer is not where it is expected (AAL1 only). This counter is 0 for unstructured CES mode') vsmBundleStatLostCells = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 7, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmBundleStatLostCells.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleStatLostCells.setDescription('The number of AAL1 cells detected as lost prior to the destination') vsmBundleStatHdrErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 7, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmBundleStatHdrErrors.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleStatHdrErrors.setDescription('The count of all AAL1 and AAL2 header errors <DETAIL_DESCRIPTION> The Header Error count represents a sum of start pointer, sequence number and parity errors.') vsmBundleStatBadCID = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 7, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmBundleStatBadCID.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleStatBadCID.setDescription('The count of the number of AAL2 cells having a bad CID') vsmBundleStatAAL2LostCells = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 7, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmBundleStatAAL2LostCells.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleStatAAL2LostCells.setDescription('The count of the number of lost AAL2 cells <DETAIL_DESCRIPTION> When operating in AAL2 mode, a non-zero count of lost cells is an indication that invalid sequence numbers exist') vsmBundleStatReset = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 7, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("no", 2), ("yes", 1))).clone('no')).setMaxAccess("readwrite") if mibBuilder.loadTexts: vsmBundleStatReset.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleStatReset.setDescription('Set to yes(1) to reset all counters in the Bundle status table.') vsmBundleStatConditioning = MibTableColumn((1, 3, 6, 1, 4, 1, 251, 1, 1, 47, 7, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("no", 2), ("yes", 1))).clone('no')).setMaxAccess("readonly") if mibBuilder.loadTexts: vsmBundleStatConditioning.setStatus('mandatory') if mibBuilder.loadTexts: vsmBundleStatConditioning.setDescription('Conditioning status: yes = conditioning; no = not conditioning <DETAIL_DESCRIPTION> Data conditioning is initiated upon the detection of any or all of a variety of errors including: no received cell flow, header errors, buffer underflow, buffer overflow, pointer reframes or lost cells.') mibBuilder.exportSymbols("Vsm-MIB", vsmTsStatUnderflows=vsmTsStatUnderflows, vsmTsStatLossofRefresh=vsmTsStatLossofRefresh, vsmCardStatBdType=vsmCardStatBdType, vsmTsCfgOperStatus=vsmTsCfgOperStatus, vsmCardStatDoc2Type=vsmCardStatDoc2Type, vsmTsCfgDataCndTypNB=vsmTsCfgDataCndTypNB, vsmCardStatHWSWCompatibility=vsmCardStatHWSWCompatibility, vsmCardStatTable=vsmCardStatTable, vsmBundleCfgNo=vsmBundleCfgNo, vsmBundleStatRecvCells=vsmBundleStatRecvCells, VsmBundle=VsmBundle, vsmBundleStatPvcActive=vsmBundleStatPvcActive, vsmTsStatAALType=vsmTsStatAALType, vsmTsStatConditioning=vsmTsStatConditioning, vsmTsStatActive=vsmTsStatActive, vsmBundleCfgTableEntry=vsmBundleCfgTableEntry, vsmLinkSigType=vsmLinkSigType, vsmBundleStatAAL2LostCells=vsmBundleStatAAL2LostCells, vsmCardStatDoc1Type=vsmCardStatDoc1Type, vsmTsStatTableEntry=vsmTsStatTableEntry, vsmBundleStatTable=vsmBundleStatTable, vsmTsCfgIdleDetect=vsmTsCfgIdleDetect, vsmBundleStatHdrErrors=vsmBundleStatHdrErrors, vsmTsStatCasValuesPDH=vsmTsStatCasValuesPDH, vsmTsCfgSilenceRmvl=vsmTsCfgSilenceRmvl, vsmTsCfgTsNo=vsmTsCfgTsNo, vsmBundleCfgMaxTslot=vsmBundleCfgMaxTslot, vsmBundleStatConditioning=vsmBundleStatConditioning, vsmTsStatCID=vsmTsStatCID, vsmTsStatDataLnk=vsmTsStatDataLnk, vsmTsStatBundleNo=vsmTsStatBundleNo, vsmTsCfgSigCndTypNB=vsmTsCfgSigCndTypNB, vsmCardCfgTable=vsmCardCfgTable, vsmBundleCfgVcCDV=vsmBundleCfgVcCDV, vsmTsStatLostPackets=vsmTsStatLostPackets, vsmTsStatIdleIdle=vsmTsStatIdleIdle, vsmCardCfgTableEntry=vsmCardCfgTableEntry, vsmTsCfgAALTyp=vsmTsCfgAALTyp, vsmLinkEnable=vsmLinkEnable, vsmTsStatRIWF=vsmTsStatRIWF, vsmLinkEnableStat=vsmLinkEnableStat, vsmTsStatXmitBytes=vsmTsStatXmitBytes, vsmTsStatRecvBytes=vsmTsStatRecvBytes, vsmLinkTable=vsmLinkTable, vsmBundleStatBadCID=vsmBundleStatBadCID, vsmBundleCfgAdminStatus=vsmBundleCfgAdminStatus, vsmCardCfgBndlTslotStatus=vsmCardCfgBndlTslotStatus, vsmBundleCfgVcVci=vsmBundleCfgVcVci, vsmBundleCfgTimerCU=vsmBundleCfgTimerCU, vsmBundleCfgVcTyp=vsmBundleCfgVcTyp, vsmCardStatBdRev=vsmCardStatBdRev, vsmBundleStatBundleNo=vsmBundleStatBundleNo, vsmBundleCfgVcVpi=vsmBundleCfgVcVpi, vsmBundleStatPtrReframes=vsmBundleStatPtrReframes, vsmBundleCfgOperStatus=vsmBundleCfgOperStatus, vsmTsCfgValidity=vsmTsCfgValidity, vsmCardCfgIndex=vsmCardCfgIndex, vsmTsCfgTableEntry=vsmTsCfgTableEntry, vsmTsStatTSNo=vsmTsStatTSNo, vsmBundleCfgValidity=vsmBundleCfgValidity, vsmCardStatLimType=vsmCardStatLimType, vsmTsStatReset=vsmTsStatReset, vsmTsCfgSignalTyp=vsmTsCfgSignalTyp, vsmBundleStatBufUndrflws=vsmBundleStatBufUndrflws, dv2Vsm=dv2Vsm, vsmTsCfgEchoCancel=vsmTsCfgEchoCancel, vsmTsCfgCmprssionTyp=vsmTsCfgCmprssionTyp, vsmCardStatIndex=vsmCardStatIndex, vsmTsStatBlocked=vsmTsStatBlocked, vsmTsCfgRmtLaw=vsmTsCfgRmtLaw, vsmBundleStatAALType=vsmBundleStatAALType, vsmTsCfgFaxMdmHndlng=vsmTsCfgFaxMdmHndlng, vsmCardStatTableEntry=vsmCardStatTableEntry, VpiInteger=VpiInteger, vsmBundleStatTableEntry=vsmBundleStatTableEntry, vsmTsCfgTable=vsmTsCfgTable, vsmBundleCfgVcAALTyp=vsmBundleCfgVcAALTyp, vsmTsCfgBundleNo=vsmTsCfgBundleNo, vsmTsCfgDataCndTypATM=vsmTsCfgDataCndTypATM, vsmBundleCfgCESPartialFill=vsmBundleCfgCESPartialFill, vsmTsStatVCID=vsmTsStatVCID, vsmBundleCfgTable=vsmBundleCfgTable, vsmBundleStatXmitCells=vsmBundleStatXmitCells, vsmLinkLink=vsmLinkLink, vsmTsStatRemoteCompressed=vsmTsStatRemoteCompressed, vsmCardStatDoc2TypeRev=vsmCardStatDoc2TypeRev, vsmCardStatDoc1TypeRev=vsmCardStatDoc1TypeRev, vsmTsCfgLinkNo=vsmTsCfgLinkNo, vsmTsCfgSigCndTypATM=vsmTsCfgSigCndTypATM, vsmBundleStatLostCells=vsmBundleStatLostCells, vsmBundleStatReset=vsmBundleStatReset, vsmBundleStatBufOverflows=vsmBundleStatBufOverflows, vsmTsCfgAdminStatus=vsmTsCfgAdminStatus, vsmTsStatTable=vsmTsStatTable, vsmTsStatHold=vsmTsStatHold, vsmTsStatRemoteSilent=vsmTsStatRemoteSilent, vsmBundleCfgTrapCfg=vsmBundleCfgTrapCfg, vsmCardStatBinRev=vsmCardStatBinRev, vsmTsStatCompressed=vsmTsStatCompressed, vsmLinkEntry=vsmLinkEntry, VciInteger=VciInteger, vsmTsCfgChanID=vsmTsCfgChanID, vsmTsStatSilent=vsmTsStatSilent, vsmTsStatCasValuesATM=vsmTsStatCasValuesATM, vsmTsCfgMulticast=vsmTsCfgMulticast, vsmTsStatRemoteConditioning=vsmTsStatRemoteConditioning, vsmCardStatBinPres=vsmCardStatBinPres, vsmTsStatLinkNo=vsmTsStatLinkNo)
154.773414
4,255
0.768515
6,338
51,230
6.20811
0.0994
0.061301
0.107276
0.010674
0.565151
0.426284
0.392101
0.368694
0.359417
0.347727
0
0.059884
0.087956
51,230
330
4,256
155.242424
0.782232
0.006012
0
0
0
0.096875
0.266337
0.002966
0
0
0
0
0
1
0
false
0.009375
0.021875
0
0.040625
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
f577ec1a080d65b015b3d7baa6804a29ea216433
436
py
Python
apps/csdn/serializers.py
wfyhehe/CsdnBackEnd
51e5c58b02c9a0e553d224e45699b22d55829726
[ "MIT" ]
1
2018-04-21T14:46:37.000Z
2018-04-21T14:46:37.000Z
apps/csdn/serializers.py
wfyhehe/CsdnBackEnd
51e5c58b02c9a0e553d224e45699b22d55829726
[ "MIT" ]
null
null
null
apps/csdn/serializers.py
wfyhehe/CsdnBackEnd
51e5c58b02c9a0e553d224e45699b22d55829726
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from rest_framework import serializers from csdn.models import CsdnArticle, CsdnAuthor __author__ = 'wfy' __date__ = '2017/10/14 18:50' class ArticleSerializer(serializers.ModelSerializer): class Meta: model = CsdnArticle fields = '__all__' class AuthorSerializer(serializers.ModelSerializer): class Meta: model = CsdnAuthor fields = '__all__'
20.761905
53
0.697248
46
436
6.23913
0.695652
0.181185
0.216028
0.243902
0.278746
0
0
0
0
0
0
0.037464
0.204128
436
20
54
21.8
0.789625
0.09633
0
0.333333
0
0
0.084184
0
0
0
0
0
0
1
0
false
0
0.166667
0
0.5
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
f5807709901cc69dedb736047805928e3720016f
696
py
Python
contrib/MpcAgent/src/python_building_test.py
ChargePoint/volttron-applications
8d99c01a93f7c1ea98d4e4b0cfcefe85fe26320b
[ "BSD-3-Clause" ]
null
null
null
contrib/MpcAgent/src/python_building_test.py
ChargePoint/volttron-applications
8d99c01a93f7c1ea98d4e4b0cfcefe85fe26320b
[ "BSD-3-Clause" ]
4
2021-03-19T23:36:34.000Z
2021-12-13T19:45:54.000Z
contrib/MpcAgent/src/python_building_test.py
ChargePoint/volttron-applications
8d99c01a93f7c1ea98d4e4b0cfcefe85fe26320b
[ "BSD-3-Clause" ]
1
2019-10-21T12:56:59.000Z
2019-10-21T12:56:59.000Z
# import python_building # import CBC_Gui # import time # import signal # import sys # import random # # b = python_building.Building() # gui = CBC_Gui.CBC_Gui(b) # # def signal_handler(signal, frame): # print 'You pressed Ctrl+C!' # cont=0 # gui.exit() # sys.exit(0) # # cont=1 # signal.signal(signal.SIGINT,signal_handler) # # while cont: # time.sleep(1) # b.advance(1) # for zone in 0,3: # t0 = b.get_indoor_temp(zone); # tout = b.get_outdoor_temp() # high_lim = b.get_high_temp_limit(zone) # low_lim = b.get_low_temp_limit(zone) # b.set_hvac_mode(zone,random.randint(-2,2)) # b.set_deadbands(zone,5.0,2.0) # b.set_fan_mode(zone,1) # print zone,t0,tout,high_lim,low_lim
21.75
46
0.685345
120
696
3.758333
0.4
0.035477
0.039911
0
0
0
0
0
0
0
0
0.027257
0.156609
696
31
47
22.451613
0.741056
0.909483
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
f58f2d0f5c2e3dd14396c9850b7b1d809c8eed6f
578
py
Python
applications/forms.py
sisekelohub/sisekelo
7e1b0de6abf07e65ed746d0d929c3de37fb421c3
[ "MIT" ]
1
2022-02-20T16:03:04.000Z
2022-02-20T16:03:04.000Z
applications/forms.py
sisekelohub/sisekelo
7e1b0de6abf07e65ed746d0d929c3de37fb421c3
[ "MIT" ]
null
null
null
applications/forms.py
sisekelohub/sisekelo
7e1b0de6abf07e65ed746d0d929c3de37fb421c3
[ "MIT" ]
null
null
null
from django import forms from .models import Application class ApplicationForm(forms.ModelForm): class Meta: model = Application # fields = ('course', 'name', 'mid_name', 'surname', 'birth_date', 'equity', 'disability', 'yes_specify', 'street_address', 'street_address2', 'city', 'zip_code', 'email', 'phone_number', 'whatsapp', 'work_phone', 'south_african_citizen', 'non_citizen_docs', 'highest_qualification', 'nk_name', 'nk_surname', 'nk_cellphone', 'nk_email', 'nk_home_tel', 'name_of_employer', 'comments', 'agreement' ) fields = '__all__'
48.166667
405
0.697232
67
578
5.641791
0.731343
0
0
0
0
0
0
0
0
0
0
0.002012
0.140138
578
11
406
52.545455
0.758551
0.683391
0
0
0
0
0.038674
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
f5a58d09ad23aef293b87086098902d8c1b685ed
400
py
Python
posts/api/serializer.py
CodeEnvironment/django-rest-framework-deploy-heroku
c6ffb20961c193b0f4dc1289de904b5d6750f335
[ "MIT" ]
3
2021-04-05T14:02:44.000Z
2022-01-25T07:50:20.000Z
posts/api/serializer.py
CodeEnvironment/django-rest-framework-deploy-aws
d9cf1d016e22b9b5697c769bd094776d25a3f90b
[ "MIT" ]
null
null
null
posts/api/serializer.py
CodeEnvironment/django-rest-framework-deploy-aws
d9cf1d016e22b9b5697c769bd094776d25a3f90b
[ "MIT" ]
1
2022-01-23T15:09:59.000Z
2022-01-23T15:09:59.000Z
from rest_framework import serializers from posts.models import Posts, PostsRates class PostsSerializer(serializers.ModelSerializer): class Meta: model = Posts fields = ["id", "post_title", "post_body", "rates"] depth = 1 class PostsRatesSerializer(serializers.ModelSerializer): class Meta: model = PostsRates fields = ["id", "likes", "dislikes"]
23.529412
59
0.675
40
400
6.675
0.6
0.194757
0.23221
0.262172
0.299625
0
0
0
0
0
0
0.003226
0.225
400
16
60
25
0.858065
0
0
0.181818
0
0
0.1025
0
0
0
0
0
0
1
0
false
0
0.181818
0
0.545455
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
f5a6420d83c8682c57e1d94cc0b3793b975a072f
331
py
Python
curriculo/models/turmas.py
ricmedeiroos/AC9-atualizado
e7ff317830c6429629498a0a5cc63a9d62320c0f
[ "Apache-2.0" ]
null
null
null
curriculo/models/turmas.py
ricmedeiroos/AC9-atualizado
e7ff317830c6429629498a0a5cc63a9d62320c0f
[ "Apache-2.0" ]
null
null
null
curriculo/models/turmas.py
ricmedeiroos/AC9-atualizado
e7ff317830c6429629498a0a5cc63a9d62320c0f
[ "Apache-2.0" ]
null
null
null
from django.db import models class Turma(models.Model): ano = models.IntegerField() semestre = models.IntegerField() nome = models.CharField(max_length=1) def __str__(self): return "{}-{}-{}".format(self.ano, self.semestre, self.nome) class Meta: unique_together = ("ano", "semestre", "nome")
27.583333
68
0.646526
39
331
5.333333
0.615385
0.173077
0
0
0
0
0
0
0
0
0
0.003774
0.199396
331
12
69
27.583333
0.781132
0
0
0
0
0
0.069277
0
0
0
0
0
0
1
0.111111
false
0
0.111111
0.111111
0.888889
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
191cc4cca5cd149ab1a5330f9df55b839bd17f70
220
py
Python
setup.py
mohamedabolfadl/dubbizle_scraper
ec7020e7b7b1c7c36ab1879d656ce0aa7ac8fb0f
[ "MIT" ]
null
null
null
setup.py
mohamedabolfadl/dubbizle_scraper
ec7020e7b7b1c7c36ab1879d656ce0aa7ac8fb0f
[ "MIT" ]
null
null
null
setup.py
mohamedabolfadl/dubbizle_scraper
ec7020e7b7b1c7c36ab1879d656ce0aa7ac8fb0f
[ "MIT" ]
null
null
null
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Default project setup based on cookiecutter', author='MI', license='MIT', )
20
62
0.672727
27
220
5.407407
0.777778
0.164384
0
0
0
0
0
0
0
0
0
0.016949
0.195455
220
10
63
22
0.80791
0
0
0
0
0
0.254545
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
191df2ce900176728c06973ccb2c5604808abe51
407
py
Python
client/evaluation.py
petnica-rac-seminari/stunning-calculator-2021
a438e96fa1fc5c152f2cc954653d813e163fc22c
[ "MIT" ]
1
2021-11-05T18:51:13.000Z
2021-11-05T18:51:13.000Z
client/evaluation.py
petnica-rac-seminari/stunning-calculator-2021
a438e96fa1fc5c152f2cc954653d813e163fc22c
[ "MIT" ]
null
null
null
client/evaluation.py
petnica-rac-seminari/stunning-calculator-2021
a438e96fa1fc5c152f2cc954653d813e163fc22c
[ "MIT" ]
null
null
null
import requests import numpy from flask import Flask, request, jsonify def evaluate_old(expression : str) -> float: try: string = eval(expression) return str(string) #value = requests.post('http://10.51.0.78:5000/evaluate', json = { # 'expression' : expression # }) #return value except: raise Exception("lele1")
25.4375
83
0.565111
42
407
5.452381
0.714286
0.139738
0
0
0
0
0
0
0
0
0
0.043796
0.326781
407
15
84
27.133333
0.791971
0.297297
0
0
0
0
0.017731
0
0
0
0
0
0
1
0.111111
false
0
0.333333
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
0
0
0
1
0
1
0
0
2
191ec0303311e8ee7eff3a6158594131032e5db3
78
py
Python
coin_finder/items.py
PLajus/AI_1Lab
3f1b3a8d6258aaa32ad1bf0f1078e2027379e782
[ "MIT" ]
null
null
null
coin_finder/items.py
PLajus/AI_1Lab
3f1b3a8d6258aaa32ad1bf0f1078e2027379e782
[ "MIT" ]
null
null
null
coin_finder/items.py
PLajus/AI_1Lab
3f1b3a8d6258aaa32ad1bf0f1078e2027379e782
[ "MIT" ]
null
null
null
from enum import IntEnum class Item(IntEnum): WALL = -3 COIN = -1
15.6
25
0.602564
11
78
4.272727
0.909091
0
0
0
0
0
0
0
0
0
0
0.037037
0.307692
78
5
26
15.6
0.833333
0
0
0
0
0
0
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
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
193cee4fc1523077f59aac0d999daf3af8119071
1,447
py
Python
git/git_clone.py
letitgone/python-in-action
5cd2912afdf439f575f97c5bba9bcd001bd9a6e5
[ "MIT" ]
1
2020-12-26T14:32:49.000Z
2020-12-26T14:32:49.000Z
git/git_clone.py
letitgone/python-in-action
5cd2912afdf439f575f97c5bba9bcd001bd9a6e5
[ "MIT" ]
null
null
null
git/git_clone.py
letitgone/python-in-action
5cd2912afdf439f575f97c5bba9bcd001bd9a6e5
[ "MIT" ]
null
null
null
# @Author ZhangGJ # @Date 2021/03/29 07:04 import os def wake_git_clone(file_path): file_name_list = os.listdir(file_path) if '.DS_Store' in file_name_list: file_name_list.remove('.DS_Store') for file_name in file_name_list: git_url = 'git clone -b dev http://username:code@localhost/ifm/' + file_name + '.git;' print(git_url) def iot_git_clone(file_path): file_name_list = os.listdir(file_path) if '.DS_Store' in file_name_list: file_name_list.remove('.DS_Store') for file_name in file_name_list: git_url = 'git clone -b dev http://username:code@localhost/iot-cloud/' + file_name + '.git;' print(git_url) if __name__ == '__main__': hifm_file_path = '/Users/zhanggj/Downloads/idea-projects/hifm' iot_file_path = '/Users/zhanggj/Downloads/idea-projects/iot' wake_starter_file_path = '/Users/zhanggj/Downloads/idea-projects/wake-starter' iot_starter_file_path = '/Users/zhanggj/Downloads/idea-projects/iot-starter' wake_git_clone(hifm_file_path) print("==========================================================") iot_git_clone(iot_file_path) print("==========================================================") wake_git_clone(wake_starter_file_path) print("==========================================================") iot_git_clone(iot_starter_file_path) print("==========================================================")
39.108108
100
0.590878
184
1,447
4.255435
0.233696
0.122605
0.122605
0.07152
0.771392
0.771392
0.715198
0.59387
0.411239
0.411239
0
0.009709
0.145819
1,447
36
101
40.194444
0.623786
0.026261
0
0.5
0
0
0.41394
0.297297
0
0
0
0
0
1
0.071429
false
0
0.035714
0
0.107143
0.214286
0
0
0
null
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
1944da3c249fffe7a53cd4f98d0ba29a5a6e6cd7
521
py
Python
{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/apps/profiles/models.py
powerdefy/cookiecutter-django-rest
8841d7c959e588f34f260405af167206eaf47376
[ "MIT" ]
null
null
null
{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/apps/profiles/models.py
powerdefy/cookiecutter-django-rest
8841d7c959e588f34f260405af167206eaf47376
[ "MIT" ]
null
null
null
{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/apps/profiles/models.py
powerdefy/cookiecutter-django-rest
8841d7c959e588f34f260405af167206eaf47376
[ "MIT" ]
null
null
null
from django.contrib.auth.models import User from django.db import models from model_controller.models import AbstractModelController from .choices import Role class Profile(AbstractModelController): role = models.IntegerField(choices=Role.choices, default=Role.GENERAL) user = models.OneToOneField(User, on_delete=models.CASCADE, related_name='profile', null=True) first_name = models.CharField(max_length=255, blank=True, null=True) last_name = models.CharField(max_length=255, blank=True, null=True)
40.076923
98
0.796545
69
521
5.913043
0.478261
0.058824
0.093137
0.107843
0.235294
0.235294
0.235294
0.235294
0.235294
0.235294
0
0.012931
0.109405
521
12
99
43.416667
0.866379
0
0
0
0
0
0.013436
0
0
0
0
0
0
1
0
false
0
0.444444
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
1952f9f20a7c1a9dfce0cf5745b32d5dad645bea
606
py
Python
photos/forms.py
nziokaivy/instagram
1c559619ba9dd49cc1690363c4f145d9cdf7b5a1
[ "MIT" ]
null
null
null
photos/forms.py
nziokaivy/instagram
1c559619ba9dd49cc1690363c4f145d9cdf7b5a1
[ "MIT" ]
null
null
null
photos/forms.py
nziokaivy/instagram
1c559619ba9dd49cc1690363c4f145d9cdf7b5a1
[ "MIT" ]
null
null
null
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from .models import Profile, Comments, Image from django import forms class UserCreateForm(UserCreationForm): email = forms.EmailField(required=True) class Meta: model = User fields = ("username", "email", "password1", "password2") class CommentForm(forms.ModelForm): class Meta: model = Comments fields = ('comment',) class ImageForm(forms.ModelForm): class Meta: model = Image exclude=['likes','poster']
22.444444
64
0.684818
66
606
6.287879
0.469697
0.096386
0.101205
0.101205
0.13494
0
0
0
0
0
0
0.004219
0.217822
606
27
65
22.444444
0.871308
0
0
0.277778
0
0
0.080725
0
0
0
0
0
0
1
0
false
0.055556
0.277778
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
2
195429b4b16b03245301c6d32bdab16064c180ce
1,711
py
Python
train.py
superizer/generative-unconditional
3b83629684058b91aefd58a1763c9b37e3f1eec1
[ "MIT" ]
null
null
null
train.py
superizer/generative-unconditional
3b83629684058b91aefd58a1763c9b37e3f1eec1
[ "MIT" ]
null
null
null
train.py
superizer/generative-unconditional
3b83629684058b91aefd58a1763c9b37e3f1eec1
[ "MIT" ]
null
null
null
import os import torch import torch.nn as nn from dataset import Dataset from architectures.architecture_dcgan import DCGAN_D, DCGAN_G from architectures.architecture_resnet import ResNetGan_D, ResNetGan_G from architectures.architecture_wavegan import Wave_D, Wave_G from trainers.trainer_sgan import Trainer_SGAN from trainers.trainer_wgan import Trainer_WGAN from trainers.trainer_wgan_gp import Trainer_WGAN_GP from trainers.trainer_lsgan import Trainer_LSGAN from trainers.trainer_rasgan import Trainer_RASGAN from trainers.trainer_ralsgan import Trainer_RALSGAN from trainers.trainer_rahingegan import Trainer_RAHINGEGAN from trainers.trainer_hingegan import Trainer_HINGEGAN from utils import save, load dir_name = 'data/celeba' basic_types = None # basic_types = 'Audio' lr_D, lr_G, bs = 0.0002, 0.0002, 128 sz, nc, nz, ngf, ndf = 64, 3, 100, 64, 64 use_sigmoid, spectral_norm, attention_layer = False, True, 256 data = Dataset(dir_name, basic_types) device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu') netD = DCGAN_D(sz, nc, ndf, use_sigmoid).to(device) netG = DCGAN_G(sz, nz, nc, ngf).to(device) # netD = Wave_D(sample_num, use_sigmoid).to(device) # netG = Wave_G(nz, sample_num).to(device) # netD = ResNetGan_D(sz, nc, ndf, use_sigmoid, attention_layer).to(device) # netG = ResNetGan_G(sz, nz, nc, ngf, spectral_norm, attention_layer).to(device) trn_dl = data.get_loader(sz, bs) # trn_dl = data.get_loader(None, bs, audio_sample_num = sample_num) trainer = Trainer_RAHINGEGAN(netD, netG, device, trn_dl, lr_D = lr_D, lr_G = lr_G, loss_interval = 150, image_interval = 300) trainer.train(5) save('saved/cur_state.state', netD, netG, trainer.optimizerD, trainer.optimizerG)
38.886364
125
0.792519
276
1,711
4.666667
0.315217
0.074534
0.118012
0.046584
0.097826
0.02795
0
0
0
0
0
0.022398
0.1128
1,711
43
126
39.790698
0.826087
0.19287
0
0
0
0
0.02984
0.015284
0
0
0
0
0
1
0
false
0
0.551724
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
195638a70c70445827546d0301e284020c970659
723
py
Python
tests/test_indexer.py
ephreal/rollbot
8e345f97a30e2788daf1ef7f6615e0b489eda57c
[ "MIT" ]
2
2021-03-27T21:43:19.000Z
2022-01-22T17:54:15.000Z
tests/test_indexer.py
ephreal/rollbot
8e345f97a30e2788daf1ef7f6615e0b489eda57c
[ "MIT" ]
null
null
null
tests/test_indexer.py
ephreal/rollbot
8e345f97a30e2788daf1ef7f6615e0b489eda57c
[ "MIT" ]
1
2019-03-15T16:52:19.000Z
2019-03-15T16:52:19.000Z
# -*- coding: utf-8 -*- """ This software is licensed under the License (MIT) located at https://github.com/ephreal/rollbot/Licence Please see the license for any restrictions or rights granted to you by the License. """ from classes.indexer import Indexer import os import unittest class TestIndexer(unittest.TestCase): def setUp(self): self.index = "tests" self.indexer = Indexer(index_path=self.index) def tearDown(self): os.remove(f"{self.index}/{self.indexer.index_name}") def test_update_index(self): """ Tests that the update_index creates an index file. """ self.indexer.update_index() self.assertTrue(os.path.exists(self.index))
22.59375
75
0.676349
97
723
4.979381
0.587629
0.074534
0.062112
0
0
0
0
0
0
0
0
0.001754
0.211618
723
31
76
23.322581
0.845614
0.363762
0
0
0
0
0.100233
0.088578
0
0
0
0
0.083333
1
0.25
false
0
0.25
0
0.583333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
1958c69c36b688b22481f623e16526ef050699d6
748
py
Python
2021learning/operadoreslogicos.py
rulgamer03/Python-Projects
89a2418fadce0fd4674d3f7d3fa682a9aaa4b14d
[ "Apache-2.0" ]
1
2021-06-18T16:29:46.000Z
2021-06-18T16:29:46.000Z
2021learning/operadoreslogicos.py
rulgamer03/Python-Projects
89a2418fadce0fd4674d3f7d3fa682a9aaa4b14d
[ "Apache-2.0" ]
null
null
null
2021learning/operadoreslogicos.py
rulgamer03/Python-Projects
89a2418fadce0fd4674d3f7d3fa682a9aaa4b14d
[ "Apache-2.0" ]
null
null
null
""" True and True -> True otro caso -> False Con or minimo un True da true Negacion not(True) -> False not (False) -> True 1. Not 2. And 3. Or """ a = 10 b = 15 c = 20 resultado = ((a > b) and (b < c)) print(resultado) resultado = ((a > b) or (b < c)) print(resultado) print(not resultado)
41.555556
43
0.239305
52
748
3.442308
0.442308
0.111732
0.122905
0.178771
0
0
0
0
0
0
0
0.039648
0.696524
748
17
44
44
0.748899
0.359626
0
0.25
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.375
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
1
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
19753a67630701ea009c97141de77bd877b36ab7
2,459
py
Python
test/flask/template_filter_test.py
geoneric/service_base
a8e1324c4d6e8b063a0d353bcd03bb8e57edd888
[ "MIT" ]
1
2017-06-22T13:43:14.000Z
2017-06-22T13:43:14.000Z
test/flask/template_filter_test.py
geoneric/service_base
a8e1324c4d6e8b063a0d353bcd03bb8e57edd888
[ "MIT" ]
1
2017-01-23T13:12:01.000Z
2017-01-23T17:03:22.000Z
test/flask/template_filter_test.py
geoneric/service_base
a8e1324c4d6e8b063a0d353bcd03bb8e57edd888
[ "MIT" ]
1
2017-06-22T13:43:19.000Z
2017-06-22T13:43:19.000Z
from datetime import datetime from starling import time_point from test.test_case import TestCase from starling.flask.template_filter import * class TemplateFilterTest(TestCase): def test_format_pathname(self): self.assertRaises(ValueError, format_pathname, "bla", 0) self.assertRaises(ValueError, format_pathname, "bla", 1) self.assertRaises(ValueError, format_pathname, "bla", 2) self.assertRaises(ValueError, format_pathname, "bla", 3) self.assertDoesNotRaise(format_pathname, "bla", 4) self.assertEqual(format_pathname("blah", 10), "blah") self.assertEqual(format_pathname("/tmp/blah", 10), "/tmp/blah") self.assertEqual(format_pathname("/tmp/blaah", 10), "/tmp/blaah") self.assertEqual(format_pathname("/tmp/blaaah", 10), ".../blaaah") def test_format_time_point(self): # Aware time point. now_string = time_point.utc_now().isoformat() self.assertDoesNotRaise(format_time_point, now_string) string = format_time_point(now_string) self.assertDoesNotRaise(datetime.strptime, string, "%Y-%m-%dT%H:%M:%S") # Unaware time point. now_string = datetime.utcnow().isoformat() self.assertDoesNotRaise(format_time_point, now_string) string = format_time_point(now_string) self.assertDoesNotRaise(datetime.strptime, string, "%Y-%m-%dT%H:%M:%S") # Use case, asumes whe're in UTC+1. now_string = "2017-02-02T10:28:17.090295+00:00" self.assertDoesNotRaise(format_time_point, now_string) string = format_time_point(now_string) self.assertEqual(string, "2017-02-02T11:28:17") def test_format_uuid(self): uuid = "6b0bfe46-6c07-43b4-892d-79dd66af401a" self.assertRaises(ValueError, format_uuid, uuid, 0) self.assertRaises(ValueError, format_uuid, uuid, 1) self.assertRaises(ValueError, format_uuid, uuid, 2) self.assertRaises(ValueError, format_uuid, uuid, 3) self.assertDoesNotRaise(format_uuid, uuid, 4) self.assertEqual(format_uuid(uuid, 4), "6...") self.assertEqual(format_uuid(uuid, 5), "6b...") self.assertEqual(format_uuid(uuid, 10), "6b0bfe4...") self.assertEqual(format_uuid(uuid), format_uuid(uuid, 10)) self.assertEqual(format_uuid(uuid, len(uuid)), uuid) self.assertEqual(format_uuid(uuid, len(uuid) + 1), uuid)
34.152778
74
0.672224
299
2,459
5.347826
0.234114
0.081301
0.105066
0.1601
0.614134
0.517824
0.265166
0.220138
0.220138
0.220138
0
0.04527
0.200488
2,459
71
75
34.633803
0.768057
0.028874
0
0.232558
0
0
0.093121
0.028523
0
0
0
0
0.604651
1
0.069767
false
0
0.093023
0
0.186047
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
1
0
0
0
0
0
0
0
0
0
2
197acc6d0972073defc2b3419e5a6f5dfc11fb0c
443
py
Python
extensions/classtypes/ENVIRONMENT_SENSOR/sensor_results.py
holitics/phenome-extensions
230d1494d0f0d7a1d747cb8af9413df46d8d0e25
[ "Apache-2.0" ]
1
2019-11-22T18:15:39.000Z
2019-11-22T18:15:39.000Z
extensions/classtypes/ENVIRONMENT_SENSOR/sensor_results.py
holitics/phenome-extensions
230d1494d0f0d7a1d747cb8af9413df46d8d0e25
[ "Apache-2.0" ]
1
2020-02-29T03:13:39.000Z
2020-02-29T03:19:29.000Z
extensions/classtypes/ENVIRONMENT_SENSOR/sensor_results.py
holitics/phenome-extensions
230d1494d0f0d7a1d747cb8af9413df46d8d0e25
[ "Apache-2.0" ]
null
null
null
# sensor_results.py, Copyright (c) 2019, Phenome Project - Nicholas Saparoff <nick.saparoff@gmail.com> from phenome_core.core.base.base_results import BaseResults, ObjectState class SensorState(ObjectState): def __init__(self): super(SensorState, self).__init__() self.temp_error = 0 class SensorBaseResults(BaseResults): def __init__(self): super(SensorBaseResults, self).__init__('ENVIRONMENT_SENSOR')
26.058824
102
0.742664
50
443
6.16
0.6
0.077922
0.071429
0.103896
0
0
0
0
0
0
0
0.013405
0.158014
443
16
103
27.6875
0.812332
0.225734
0
0.25
0
0
0.052786
0
0
0
0
0
0
1
0.25
false
0
0.125
0
0.625
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
198a1695bf306415935b0db3784b643212bef212
401
py
Python
tests/test_0430-global_index-for-tuples-of-DataFrames.py
eic/uproot4
deb8d88c2643521f372bf5005c51af8926016c7e
[ "BSD-3-Clause" ]
133
2020-05-08T21:34:11.000Z
2022-03-07T18:12:58.000Z
tests/test_0430-global_index-for-tuples-of-DataFrames.py
eic/uproot4
deb8d88c2643521f372bf5005c51af8926016c7e
[ "BSD-3-Clause" ]
269
2020-05-13T02:42:24.000Z
2022-03-24T20:24:16.000Z
tests/test_0430-global_index-for-tuples-of-DataFrames.py
eic/uproot4
deb8d88c2643521f372bf5005c51af8926016c7e
[ "BSD-3-Clause" ]
45
2020-05-15T17:48:04.000Z
2022-03-18T19:23:07.000Z
# BSD 3-Clause License; see https://github.com/scikit-hep/uproot4/blob/main/LICENSE import numpy as np import pytest import skhep_testdata import uproot pytest.importorskip("pandas") def test(): for arrays in uproot.iterate( [skhep_testdata.data_path("uproot-HZZ-uncompressed.root") + ":events"] * 2, ["Muon_Px", "Jet_Px", "MET_px"], library="pd", ): pass
21.105263
83
0.663342
54
401
4.814815
0.796296
0.1
0
0
0
0
0
0
0
0
0
0.009317
0.197007
401
18
84
22.277778
0.798137
0.201995
0
0
0
0
0.194969
0.08805
0
0
0
0
0
1
0.083333
false
0.083333
0.416667
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
0
1
1
0
0
0
0
2
1992d7fcd726aa04e239099059b67ff4abb236cb
319
py
Python
lib/googlecloudsdk/compute/subcommands/disks/__init__.py
IsaacHuang/google-cloud-sdk
52afa5d1a75dff08f4f5380c5cccc015bf796ca5
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/compute/subcommands/disks/__init__.py
IsaacHuang/google-cloud-sdk
52afa5d1a75dff08f4f5380c5cccc015bf796ca5
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/compute/subcommands/disks/__init__.py
IsaacHuang/google-cloud-sdk
52afa5d1a75dff08f4f5380c5cccc015bf796ca5
[ "Apache-2.0" ]
2
2020-07-25T05:03:06.000Z
2020-11-04T04:55:57.000Z
# Copyright 2014 Google Inc. All Rights Reserved. """Commands for reading and manipulating disks.""" from googlecloudsdk.calliope import base class Disks(base.Group): """Read and manipulate Google Compute Engine disks.""" Disks.detailed_help = { 'brief': 'Read and manipulate Google Compute Engine disks', }
22.785714
63
0.742947
40
319
5.9
0.675
0.059322
0.144068
0.194915
0.347458
0.347458
0.347458
0
0
0
0
0.01487
0.15674
319
13
64
24.538462
0.862454
0.445141
0
0
0
0
0.313253
0
0
0
0
0
0
1
0
true
0
0.2
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
1
0
0
0
0
0
0
2
19b0061248691ad7714f40b901b3bfd126ec3b8c
108
py
Python
notes/__init__.py
Izumi-DiscordBot/cray-cogs
ef4c3bb40dc32b458a64c789bbf7971aa2389578
[ "MIT" ]
null
null
null
notes/__init__.py
Izumi-DiscordBot/cray-cogs
ef4c3bb40dc32b458a64c789bbf7971aa2389578
[ "MIT" ]
2
2021-11-19T09:17:10.000Z
2021-11-19T09:17:52.000Z
notes/__init__.py
Izumi-DiscordBot/cray-cogs
ef4c3bb40dc32b458a64c789bbf7971aa2389578
[ "MIT" ]
null
null
null
from .notes import Notes async def setup(bot): cog = await Notes.initialize(bot) bot.add_cog(cog)
15.428571
37
0.694444
17
108
4.352941
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.203704
108
6
38
18
0.860465
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
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
5fdf06aad8bf89c6883fe16e4d559da9659ed12e
572
py
Python
create_derivatives/migrations/0002_auto_20210726_1806.py
RockefellerArchiveCenter/pictor
244b1a2016664974f38885d0ab2e6ac472306a85
[ "MIT" ]
null
null
null
create_derivatives/migrations/0002_auto_20210726_1806.py
RockefellerArchiveCenter/pictor
244b1a2016664974f38885d0ab2e6ac472306a85
[ "MIT" ]
88
2021-07-21T15:14:40.000Z
2022-03-10T20:11:40.000Z
create_derivatives/migrations/0002_auto_20210726_1806.py
RockefellerArchiveCenter/pictor
244b1a2016664974f38885d0ab2e6ac472306a85
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-07-26 18:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('create_derivatives', '0001_initial'), ] operations = [ migrations.AddField( model_name='bag', name='as_data', field=models.JSONField(blank=True, null=True), ), migrations.AddField( model_name='bag', name='dimes_identifier', field=models.CharField(blank=True, max_length=255, null=True), ), ]
23.833333
74
0.582168
61
572
5.344262
0.688525
0.110429
0.141104
0.165644
0.208589
0.208589
0
0
0
0
0
0.054863
0.298951
572
23
75
24.869565
0.758105
0.078671
0
0.352941
1
0
0.112381
0
0
0
0
0
0
1
0
false
0
0.058824
0
0.235294
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
5fe1416c035ac5839d0c86649a212a44fce3475d
2,714
py
Python
src/pqca/vector.py
hmillerbakewell/partitioned-quantum-cellular-automata
ca5e853249e573fd193c84f6f92124e2871d7f38
[ "MIT" ]
2
2021-11-03T16:17:05.000Z
2021-12-16T04:48:41.000Z
src/pqca/vector.py
iccmr-quantum/pqca
c6ec5c0cd64b3a88b5642fa9e5e18d05fc41714c
[ "MIT" ]
null
null
null
src/pqca/vector.py
iccmr-quantum/pqca
c6ec5c0cd64b3a88b5642fa9e5e18d05fc41714c
[ "MIT" ]
null
null
null
"""Simple, n-dimensional, extendable vector of ints.""" from __future__ import annotations from typing import Callable, List class Vector: """Wrap a list of int entries with helper functions. For internal use only. """ entries: List[int] def __init__(self, entries: List[int] = None) -> Vector: """Convert a list of ints into coordinates.""" self.entries = entries if entries is not None else [] def extend(self, next_entry: int) -> Vector: """Append the given entry to the end of the list of entries.""" return Vector(list(self.entries) + [next_entry]) def action(self, other: Vector, action: Callable[[int, int], int]) -> Vector: """Apply the action each successive pair of elements in the two vectors.""" return Vector([action(a, b) for (a, b) in zip(self.entries, other.entries)]) def __add__(self, other: Vector) -> Vector: """Add two vectors.""" return self.action(other, lambda x, y: x+y) def __sub__(self, other: Vector) -> Vector: """Subtract two vectors.""" return self.action(other, lambda x, y: x-y) def __eq__(self, other: Vector) -> bool: """Compare vectors component-wise.""" return self.entries == other.entries def __getitem__(self, item) -> int: """Access to entries.""" return self.entries[item] def __str__(self) -> str: """Human-readable string representation.""" return f"Vector{self.entries}" def __repr__(self) -> str: """Unambiguous string representation.""" return str(self) """ The MIT License (MIT) Copyright (c) 2021 Hector Miller-Bakewell Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """
36.186667
84
0.69381
380
2,714
4.865789
0.434211
0.047593
0.03245
0.024878
0.075717
0.047593
0.047593
0.047593
0.047593
0.047593
0
0.00187
0.211864
2,714
74
85
36.675676
0.862553
0.167649
0
0
0
0
0.018282
0
0
0
0
0
0
1
0.409091
false
0
0.090909
0
0.954545
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
5fe2fbac11a75b591b209c5cb2e11036635db90a
3,456
py
Python
redis_i_action/flask-c1/models.py
enixdark/im-r-e-d-i-s
5e91e3b2c7e4cbc9f14067a832b87c336c0811e7
[ "MIT" ]
null
null
null
redis_i_action/flask-c1/models.py
enixdark/im-r-e-d-i-s
5e91e3b2c7e4cbc9f14067a832b87c336c0811e7
[ "MIT" ]
null
null
null
redis_i_action/flask-c1/models.py
enixdark/im-r-e-d-i-s
5e91e3b2c7e4cbc9f14067a832b87c336c0811e7
[ "MIT" ]
null
null
null
from app import db from sqlalchemy.dialects.postgresql import JSON # from flask.ext.security import Security, SQLAlchemyUserDatastore,\ # UserMixin, RoleMixin, login_required from werkzeug.security import generate_password_hash,check_password_hash from datetime import date,datetime class Serialize(object): __public__ = None def tran_serialize(self, exclude=(), extra=()): data = {} keys = self._sa_instance_state.attrs.items() # import ipdb; ipdb.set_trace() public = self.__public__ + extra if self.__public__ else extra for k, field in keys: if public and k not in public: continue if k in exclude: continue value = self._serialize(field.value) if value or value==0: data[k] = value return data @classmethod def _serialize(cls, value, follow_fk=False): if type(value) in (datetime, date): ret = value.isoformat() elif hasattr(value, '__iter__'): ret = [] for v in value: ret.append(cls._serialize(v)) elif Serialize in value.__class__.__bases__: ret = value.get_public() else: ret = value return ret class User(db.Model,Serialize): __tablename__ = 'users' __public__ = ('id','name','email','password','active','confirmed_at') id = db.Column(db.Integer,primary_key=True) name = db.Column(db.String(255)) email = db.Column(db.String(255),unique=True) password = db.Column(db.String(255)) active = db.Column(db.Boolean()) confirmed_at = db.Column(db.DateTime()) def __init__(self,name,password,email,active,confirmed_at=datetime.now()): self.name = name self.email = email self.set_password(password) self.active = active self.confirmed_at = confirmed_at def set_password(self, password): self.password = generate_password_hash(password) def check_password(self, password): return check_password_hash(self.password, password) def __repr__(self): return '<id {}'.format(self.id) def isadmin(self): return self.admin def is_authenticated(self): return True def is_active(self): return True def is_anonymous(self): return False def get_id(self): return unicode(self.id) class Article(db.Model,Serialize): __tablename__ = 'articles' __public__ = ('id','title','link','poster','time','scores','votes') id = db.Column(db.Integer,primary_key=True) title = db.Column(db.String()) link = db.Column(db.String()) poster = db.Column(db.Integer,db.ForeignKey('users.id')) time = db.Column(db.Float) scores = db.Column(db.Float) votes = db.Column(db.Integer) image = db.Column(db.String(255)) def __init__(self,title,link,poster,time,scores,votes,image): self.title = title self.link = link self.poster = poster self.time = time self.scores = scores self.votes = votes self.image = image def __repr__(self): return '<id {}'.format(self.id) class Vote(db.Model,Serialize): __public__ = ('id','article','user','likes') id = db.Column(db.Integer,primary_key=True) article = db.Column(db.Integer,db.ForeignKey('articles.id')) user = db.Column(db.Integer,db.ForeignKey('users.id')) likes = db.Column(db.Boolean) def __init__(self,article,user,likes): self.article = article self.user = user self.likes = likes def __repr__(self): return '<user-{}'.format(self.user) # user_datastore = SQLAlchemyUserDatastore(db, User)
29.793103
75
0.680556
465
3,456
4.836559
0.245161
0.064028
0.080036
0.052912
0.193864
0.143175
0.103602
0.103602
0
0
0
0.004635
0.188368
3,456
115
76
30.052174
0.797148
0.055266
0
0.106383
0
0
0.047546
0
0
0
0
0
0
1
0.159574
false
0.095745
0.042553
0.095745
0.617021
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
5fe4c7dccb81aa552c32ad65b6d4512e1ef66dfa
249
py
Python
Easy Challenges/Challenge 0027 Easy/solutions/solution.py
FreddieV4/DailyProgrammerChallenges
f231fc4728b55ec9ac72d66e5d7ecc6b9377b9cc
[ "MIT" ]
331
2016-03-04T02:13:43.000Z
2017-10-18T09:07:53.000Z
Easy Challenges/Challenge 0027 Easy/solutions/solution.py
freddiev4/dailyprogrammerchallenges
f231fc4728b55ec9ac72d66e5d7ecc6b9377b9cc
[ "MIT" ]
64
2016-03-15T23:46:42.000Z
2017-10-19T18:25:30.000Z
Easy Challenges/Challenge 0027 Easy/solutions/solution.py
FreddieV4/DailyProgrammerChallenges
f231fc4728b55ec9ac72d66e5d7ecc6b9377b9cc
[ "MIT" ]
116
2016-03-11T19:59:12.000Z
2017-10-19T18:23:37.000Z
#Solution by https://github.com/Ouss4 from math import ceil year = int(input("Enter year: ")) print("Centry : {}".format(ceil(year/100))) print("Leap Year: {}".format("Yes" if (year % 400 == 0 or (year % 4 == 0 and year % 100 != 0)) else "No"))
27.666667
107
0.614458
40
249
3.825
0.7
0.104575
0
0
0
0
0
0
0
0
0
0.067633
0.168675
249
8
108
31.125
0.671498
0.144578
0
0
0
0
0.193396
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0.5
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
2
5fe865994e79230de24959548fa343c5068ebb35
939
py
Python
tofawiki/cache/file_cache.py
Nintendofan885/tofawiki
b13b9076e40c84bdc9bded04d1cf8b09cc9283e5
[ "MIT" ]
null
null
null
tofawiki/cache/file_cache.py
Nintendofan885/tofawiki
b13b9076e40c84bdc9bded04d1cf8b09cc9283e5
[ "MIT" ]
1
2020-08-29T14:37:49.000Z
2020-08-29T14:37:49.000Z
tofawiki/cache/file_cache.py
Nintendofan885/tofawiki
b13b9076e40c84bdc9bded04d1cf8b09cc9283e5
[ "MIT" ]
4
2017-01-01T09:32:42.000Z
2020-10-22T09:50:07.000Z
import json import logging from .cache import Cache class FileCache(Cache): def __init__(self, path='/srv/tofawiki/cache/cache.json'): self.values = {} self.path = path def get_value(self, key): if key not in self.values: res = self.get_value_from_file(key) if res is not None: logger = logging.getLogger(__name__) logger.debug('Got a key from cache') self.values[key] = res return self.values.get(key) def get_value_from_file(self, key): return json.load(open(self.path)).get(key) def write_new_cache(self, key, res): # TODO: Flush them altogether not one at a time. cache = json.load(open(self.path)) cache[key] = res json.dump(cache, open(self.path, 'w'), ensure_ascii=False) def blow_cache(self): with open(self.path, 'w') as f: f.write('{}')
27.617647
66
0.587859
131
939
4.068702
0.389313
0.090056
0.090056
0.060038
0.075047
0
0
0
0
0
0
0
0.294995
939
33
67
28.454545
0.805136
0.048988
0
0
0
0
0.060606
0.03367
0
0
0
0.030303
0
1
0.208333
false
0
0.125
0.041667
0.458333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
0
0
0
0
2
5fedc30b2a5c5ef8f1d89b2202b926642e71bc27
1,374
py
Python
day24/monad.py
wonyk/AOC2021
d2e461799c2d9ae02dc88bf96d4f200a6715c9a9
[ "MIT" ]
null
null
null
day24/monad.py
wonyk/AOC2021
d2e461799c2d9ae02dc88bf96d4f200a6715c9a9
[ "MIT" ]
null
null
null
day24/monad.py
wonyk/AOC2021
d2e461799c2d9ae02dc88bf96d4f200a6715c9a9
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 f = open("input.txt", "r").read().splitlines() REGISTERS_MAP = {"w": 0, "x": 1, "y": 2, "z": 3} def checker(number): num_str = str(number) if "0" in num_str: return False if len(num_str) != 14: return False # Registers are in form [w,x,y,z] counter = 0 registers = [0] * 4 for line in f: instr_arr = line.split() instr = instr_arr[0] first = instr_arr[1] if "inp" in instr: registers[REGISTERS_MAP[first]] = int(num_str[counter]) counter += 1 continue second = instr_arr[2] if second in REGISTERS_MAP: second_val = registers[REGISTERS_MAP[second]] else: second_val = int(second) if "add" in instr: registers[REGISTERS_MAP[first]] += second_val elif "mul" in instr: registers[REGISTERS_MAP[first]] *= second_val elif "div" in instr: registers[REGISTERS_MAP[first]] //= second_val elif "mod" in instr: registers[REGISTERS_MAP[first]] %= second_val else: registers[REGISTERS_MAP[first]] = ( 1 if registers[REGISTERS_MAP[first]] == second_val else 0 ) # check valid of z == 0 if registers[REGISTERS_MAP["z"]] == 0: return True return False
28.040816
73
0.549491
176
1,374
4.142045
0.323864
0.18107
0.259259
0.249657
0.351166
0.351166
0.305898
0.246914
0.1893
0
0
0.020675
0.33115
1,374
48
74
28.625
0.772579
0.054585
0
0.131579
0
0
0.02392
0
0
0
0
0
0
1
0.026316
false
0
0
0
0.131579
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
5fee07d0a63f018260e7ea5d2750690a94176ac4
130
py
Python
channels_presence/signals.py
jabguru/django-channels-presence
29e76e370c542ae5056fa5af3266721aca1136f9
[ "MIT" ]
37
2017-08-25T15:33:42.000Z
2020-10-29T10:18:07.000Z
channels_presence/signals.py
jabguru/django-channels-presence
29e76e370c542ae5056fa5af3266721aca1136f9
[ "MIT" ]
12
2017-09-10T08:37:00.000Z
2020-03-30T14:53:19.000Z
channels_presence/signals.py
jabguru/django-channels-presence
29e76e370c542ae5056fa5af3266721aca1136f9
[ "MIT" ]
12
2017-12-22T12:25:36.000Z
2020-08-06T13:56:46.000Z
from django import dispatch presence_changed = dispatch.Signal( providing_args=["room", "added", "removed", "bulk_change"] )
21.666667
62
0.730769
15
130
6.133333
0.933333
0
0
0
0
0
0
0
0
0
0
0
0.130769
130
5
63
26
0.814159
0
0
0
0
0
0.207692
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
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
5ff97e805872a7bffb9a2c54ee4edd60bbec5271
316
py
Python
count_average_salaries.py
rtmlsh/Future-salary
2d8de49be939c1752e2fb3e6a5a46a9bf42f7ad9
[ "MIT" ]
null
null
null
count_average_salaries.py
rtmlsh/Future-salary
2d8de49be939c1752e2fb3e6a5a46a9bf42f7ad9
[ "MIT" ]
null
null
null
count_average_salaries.py
rtmlsh/Future-salary
2d8de49be939c1752e2fb3e6a5a46a9bf42f7ad9
[ "MIT" ]
null
null
null
import numpy def predict_salary(payment_from, payment_to): if not payment_from and not payment_to: return None elif payment_from and payment_to: return numpy.mean([payment_from, payment_to]) elif payment_from: return payment_from * 1.2 else: return payment_to * 0.8
24.307692
53
0.686709
46
316
4.456522
0.434783
0.321951
0.17561
0.195122
0
0
0
0
0
0
0
0.017021
0.256329
316
12
54
26.333333
0.855319
0
0
0
0
0
0
0
0
0
0
0
0
1
0.1
false
0
0.1
0
0.6
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
27056abf5425176323fb0e68c268e838e4cd89e4
1,597
py
Python
anchore_engine/auth/anchore_service.py
roachmd/anchore-engine
521d6796778139a95f51542670714205c2735a81
[ "Apache-2.0" ]
null
null
null
anchore_engine/auth/anchore_service.py
roachmd/anchore-engine
521d6796778139a95f51542670714205c2735a81
[ "Apache-2.0" ]
null
null
null
anchore_engine/auth/anchore_service.py
roachmd/anchore-engine
521d6796778139a95f51542670714205c2735a81
[ "Apache-2.0" ]
null
null
null
from zope.interface import implements from twisted.cred import checkers, credentials, error as credError from twisted.internet import defer from zope.interface import implements from anchore_engine.db import db_users from anchore_engine.db import session_scope class AnchorePasswordChecker: implements(checkers.ICredentialsChecker) credentialInterfaces = (credentials.IUsernamePassword,) def requestAvatarId(self, credentials): return(self.requestAvatarId_db(credentials)) def requestAvatarId_db(self, credentials): try: username = credentials.username with session_scope() as dbsession: user_record = db_users.get(username, session=dbsession) if not user_record: return defer.fail(credError.UnauthorizedLogin("Invalid user")) elif not user_record['active']: return defer.fail(credError.UnauthorizedLogin("Inactive user")) else: #from passlib.hash import pbkdf2_sha256 #hashpw = user_record['password'] #if pbkdf2_sha256.verify(credentials.password, hashpw): if user_record['password'] == credentials.password: return(defer.succeed(username)) return defer.fail(credError.UnauthorizedLogin("Bad password")) except Exception as err: return defer.fail(credError.UnauthorizedLogin("Auth check exception - " + str(err))) return defer.fail(credError.UnauthorizedLogin("Unknown auth failure")) def initialize(): return(True)
36.295455
96
0.681277
161
1,597
6.664596
0.397516
0.06151
0.069897
0.111836
0.308481
0.150979
0
0
0
0
0
0.006584
0.239199
1,597
43
97
37.139535
0.876543
0.077646
0
0.068966
0
0
0.063989
0
0
0
0
0
0
1
0.103448
false
0.137931
0.206897
0.068966
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
1
0
0
1
0
0
2
2706c173395a6b55ce8220c29684c813fbfe8107
478
py
Python
harvey/crazy_hacks.py
vrde/harvey
9a381fd71c543f7e15d07dca72c4324fcc8ce20f
[ "MIT" ]
1
2016-02-13T04:51:23.000Z
2016-02-13T04:51:23.000Z
harvey/crazy_hacks.py
vrde/harvey
9a381fd71c543f7e15d07dca72c4324fcc8ce20f
[ "MIT" ]
null
null
null
harvey/crazy_hacks.py
vrde/harvey
9a381fd71c543f7e15d07dca72c4324fcc8ce20f
[ "MIT" ]
null
null
null
"""This module loads the monkeypatch from gevent and applies it. Nothing fancy, but it's useful and more readable to put this in a separate module and give and explicit name to it. """ # Re-add sslwrap to Python 2.7.9 # import socket # __getaddrinfo = socket.getaddrinfo # # # kudos to http://stackoverflow.com/a/13214222/597097 # def getaddrinfo(*args): # return [(socket.AF_INET, socket.SOCK_STREAM, 6, '', (args[0], args[1]))] # # socket.getaddrinfo = getaddrinfo
25.157895
78
0.715481
72
478
4.694444
0.708333
0.150888
0
0
0
0
0
0
0
0
0
0.050125
0.165272
478
18
79
26.555556
0.796992
0.937238
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
27074a4f10ebbc616c356de244a2e9dbc6f33fb5
275
py
Python
cryptomonsters/cryptomonsters/custom_storages.py
kryptokardz/cryptocards
7a3de928184703e545eaa6b179044303fa6fda0f
[ "MIT" ]
1
2017-12-08T18:11:21.000Z
2017-12-08T18:11:21.000Z
cryptomonsters/cryptomonsters/custom_storages.py
kryptokardz/cryptocards
7a3de928184703e545eaa6b179044303fa6fda0f
[ "MIT" ]
24
2017-12-16T00:12:49.000Z
2022-03-11T23:14:06.000Z
cryptomonsters/cryptomonsters/custom_storages.py
kryptokardz/cryptocards
7a3de928184703e545eaa6b179044303fa6fda0f
[ "MIT" ]
1
2018-12-01T07:50:49.000Z
2018-12-01T07:50:49.000Z
"""Custom storage classes for static and media files.""" from django.conf import settings from storages.backends.s3boto import S3BotoStorage class StaticStorage(S3BotoStorage): """Custom storage class for static files.""" location = settings.STATICFILES_LOCATION
25
56
0.778182
32
275
6.65625
0.65625
0.122066
0
0
0
0
0
0
0
0
0
0.012712
0.141818
275
10
57
27.5
0.889831
0.323636
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
270fd5595d329581154a353f1fd362ac50d0db0a
63
py
Python
version.py
freininghaus/simple_env_config
79c25665a370a7594ba48ce48e1f58b407ca05fa
[ "MIT" ]
3
2020-09-22T07:56:07.000Z
2020-11-03T08:53:28.000Z
version.py
freininghaus/simple_env_config
79c25665a370a7594ba48ce48e1f58b407ca05fa
[ "MIT" ]
null
null
null
version.py
freininghaus/simple_env_config
79c25665a370a7594ba48ce48e1f58b407ca05fa
[ "MIT" ]
null
null
null
VERSION = "0.2" if __name__ == '__main__': print(VERSION)
12.6
26
0.619048
8
63
3.875
0.875
0
0
0
0
0
0
0
0
0
0
0.04
0.206349
63
4
27
15.75
0.58
0
0
0
0
0
0.174603
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
27155e306721940f0242f9d45d6e5c07e8eb6a94
205
py
Python
web/python/flask_api_mysql_pagination/movies_api/app.py
CALlanoR/virtual_environments
90214851d6c3760e1a4afb48017bb7f91593e29e
[ "Apache-2.0" ]
null
null
null
web/python/flask_api_mysql_pagination/movies_api/app.py
CALlanoR/virtual_environments
90214851d6c3760e1a4afb48017bb7f91593e29e
[ "Apache-2.0" ]
1
2022-03-02T14:54:47.000Z
2022-03-02T14:54:47.000Z
java/java-gateway-users-movies/python_movies_service_api/app.py
CALlanoR/virtual_environments
90214851d6c3760e1a4afb48017bb7f91593e29e
[ "Apache-2.0" ]
1
2017-03-16T14:58:03.000Z
2017-03-16T14:58:03.000Z
from flask import Flask from flask_cors import CORS, cross_origin from flask_jwt_extended import ( JWTManager, jwt_required, create_access_token, get_jwt_identity ) app = Flask(__name__) CORS(app)
22.777778
50
0.8
30
205
5.033333
0.566667
0.178808
0
0
0
0
0
0
0
0
0
0
0.146341
205
9
51
22.777778
0.862857
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.375
0
0.375
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
272395fb6b3688d8d661ead7618e15730d4192bf
1,174
py
Python
lib/pylint/test/input/func_toolonglines.py
willemneal/Docky
d3504e1671b4a6557468234c263950bfab461ce4
[ "MIT" ]
3
2018-11-25T01:09:55.000Z
2021-08-24T01:56:36.000Z
lib/pylint/test/input/func_toolonglines.py
willemneal/Docky
d3504e1671b4a6557468234c263950bfab461ce4
[ "MIT" ]
1
2019-01-17T14:26:22.000Z
2019-01-17T22:56:26.000Z
lib/pylint/test/input/func_toolonglines.py
willemneal/Docky
d3504e1671b4a6557468234c263950bfab461ce4
[ "MIT" ]
3
2018-11-09T03:38:09.000Z
2020-02-24T06:26:10.000Z
##################################################################################################### """ that one is too long tooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo loooooong""" __revision__ = '' # The next line is exactly 80 characters long. A = '--------------------------------------------------------------------------' # The next line is longer than 80 characters, because the file is encoded # in ASCII. THIS_IS_A_VERY_LONG_VARIABLE_NAME = 'Существительное Частица' # With warnings. # Do not trigger the line-too-long warning if the only token that makes the # line longer than 80 characters is a trailing pylint disable. var = 'This line has a disable pragma and whitespace trailing beyond 80 chars. ' # pylint:disable=invalid-name badname = 'This line is already longer than 100 characters even without the pragma. Trust me. Please.' # pylint:disable=invalid-name # http://example.com/this/is/a/very/long/url?but=splitting&urls=is&a=pain&so=they&can=be&long def function(): """This is a docstring. That contains a very, very long line that exceeds the 100 characters limit by a good margin. So good? """ pass
41.928571
133
0.640545
151
1,174
4.913907
0.523179
0.020216
0.028302
0.03504
0.040431
0
0
0
0
0
0
0.013889
0.141397
1,174
27
134
43.481481
0.722222
0.551107
0
0
0
0
0.652393
0.186398
0
0
0
0
0
1
0.142857
false
0.142857
0
0
0.142857
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
273d81b4467ddc2c632d7e3f5f27d0261cf22a73
529
py
Python
dedomeno/houses/migrations/0105_property_address.py
ginopalazzo/dedomeno
e43df365849102016c8819b2082d2cde9109360f
[ "MIT" ]
38
2018-03-19T12:52:17.000Z
2022-02-17T14:45:57.000Z
dedomeno/houses/migrations/0105_property_address.py
ginopalazzo/dedomeno
e43df365849102016c8819b2082d2cde9109360f
[ "MIT" ]
7
2020-02-11T23:01:40.000Z
2020-08-06T13:30:58.000Z
dedomeno/houses/migrations/0105_property_address.py
ginopalazzo/dedomeno
e43df365849102016c8819b2082d2cde9109360f
[ "MIT" ]
12
2019-02-23T22:10:34.000Z
2022-03-24T12:01:38.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-03-18 19:52 from __future__ import unicode_literals import django.contrib.postgres.fields.jsonb from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('houses', '0104_property_property_type'), ] operations = [ migrations.AddField( model_name='property', name='address', field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True), ), ]
24.045455
88
0.652174
60
529
5.6
0.716667
0.077381
0.125
0.160714
0.190476
0
0
0
0
0
0
0.051597
0.230624
529
21
89
25.190476
0.773956
0.128544
0
0
1
0
0.104803
0.058952
0
0
0
0
0
1
0
false
0
0.214286
0
0.428571
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
2745eb18b768960166e043eb037be9ed01c2cc87
1,995
py
Python
ufora/FORA/python/PurePython/SlicingTestCases.py
ufora/ufora
04db96ab049b8499d6d6526445f4f9857f1b6c7e
[ "Apache-2.0", "CC0-1.0", "MIT", "BSL-1.0", "BSD-3-Clause" ]
571
2015-11-05T20:07:07.000Z
2022-01-24T22:31:09.000Z
ufora/FORA/python/PurePython/SlicingTestCases.py
timgates42/ufora
04db96ab049b8499d6d6526445f4f9857f1b6c7e
[ "Apache-2.0", "CC0-1.0", "MIT", "BSL-1.0", "BSD-3-Clause" ]
218
2015-11-05T20:37:55.000Z
2021-05-30T03:53:50.000Z
ufora/FORA/python/PurePython/SlicingTestCases.py
timgates42/ufora
04db96ab049b8499d6d6526445f4f9857f1b6c7e
[ "Apache-2.0", "CC0-1.0", "MIT", "BSL-1.0", "BSD-3-Clause" ]
40
2015-11-07T21:42:19.000Z
2021-05-23T03:48:19.000Z
# Copyright 2015 Ufora Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. class SlicingTestCases(object): """Test cases for pyfora slicing""" def test_custom_slicing_1(self): class ListWrapper_1: def __init__(self, m): self.m = m def __getitem__(self, maybeSlice): if isinstance(maybeSlice, slice): return self.m[maybeSlice] return -100000 def f(): l = ListWrapper_1(range(10)) return (l[1:4], l[:3], l[:], l[::], l[3:], l[4::2], l[4]) self.equivalentEvaluationTest(f) def test_custom_slicing_2(self): class ListWrapper_2: def __init__(self, m): self.m = m def __getitem__(self, maybeSlice): if isinstance(maybeSlice, slice): return self.m[maybeSlice] if isinstance(maybeSlice, tuple): return [self.m[bla] for bla in maybeSlice] return -100000 def f(): l = ListWrapper_2(range(10)) return l[:, 1:4, 3:9] self.equivalentEvaluationTest(f) def test_returning_slice_1(self): def f1(): return slice self.equivalentEvaluationTest(f1) def test_inserting_slice_1(self): def f(): s = slice(1,2,3) x = range(10) return x[s] self.equivalentEvaluationTest(f)
31.171875
76
0.581955
246
1,995
4.589431
0.402439
0.031001
0.058459
0.085031
0.310009
0.246236
0.217892
0.159433
0.159433
0.159433
0
0.037092
0.324311
1,995
63
77
31.666667
0.800445
0.299749
0
0.486486
0
0
0
0
0
0
0
0
0
1
0.324324
false
0
0
0.027027
0.648649
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
274671e5f96116978ea4b57f5f3b42fd66a0186b
268
py
Python
tests/test_dfa.py
ffhan/lingua
1f7bea099dac93696d5d2ebb8d76926efe5ceda4
[ "MIT" ]
null
null
null
tests/test_dfa.py
ffhan/lingua
1f7bea099dac93696d5d2ebb8d76926efe5ceda4
[ "MIT" ]
null
null
null
tests/test_dfa.py
ffhan/lingua
1f7bea099dac93696d5d2ebb8d76926efe5ceda4
[ "MIT" ]
null
null
null
import unittest from misc.command_testers import CommandTester class TestDeterministicFA(unittest.TestCase): def setUp(self): self.executor = CommandTester('.ul', '.iz', '..') def test_all(self): self.executor.execute_test('dfa_min', True)
22.333333
57
0.697761
31
268
5.903226
0.709677
0.087432
0.174863
0
0
0
0
0
0
0
0
0
0.175373
268
11
58
24.363636
0.828054
0
0
0
0
0
0.05597
0
0
0
0
0
0
1
0.285714
false
0
0.285714
0
0.714286
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
27495529682724fa2a5185e838e2fc4645071d42
41,960
py
Python
pysnmp-with-texts/PDN-PPP-LCP-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/PDN-PPP-LCP-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/PDN-PPP-LCP-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 PDN-PPP-LCP-EXT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/PDN-PPP-LCP-EXT-MIB # Produced by pysmi-0.3.4 at Wed May 1 14:39:28 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, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsIntersection") ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex") pdn_interfaces, = mibBuilder.importSymbols("PDN-HEADER-MIB", "pdn-interfaces") SwitchState, PdnPPPState = mibBuilder.importSymbols("PDN-TC", "SwitchState", "PdnPPPState") pppLinkConfigEntry, pppLinkStatusEntry = mibBuilder.importSymbols("PPP-LCP-MIB", "pppLinkConfigEntry", "pppLinkStatusEntry") ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup") Gauge32, Bits, Integer32, IpAddress, Unsigned32, Counter32, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, NotificationType, MibIdentifier, TimeTicks, iso, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "Bits", "Integer32", "IpAddress", "Unsigned32", "Counter32", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "NotificationType", "MibIdentifier", "TimeTicks", "iso", "Counter64") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") pdnPppLcpExtMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28)) pdnPppLcpExtMIB.setRevisions(('2004-09-10 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: pdnPppLcpExtMIB.setRevisionsDescriptions(('Initial release.',)) if mibBuilder.loadTexts: pdnPppLcpExtMIB.setLastUpdated('200409100000Z') if mibBuilder.loadTexts: pdnPppLcpExtMIB.setOrganization('Paradyne Networks MIB Working Group Other information about group editing the MIB') if mibBuilder.loadTexts: pdnPppLcpExtMIB.setContactInfo('Paradyne Networks, Inc. 8545 126th Avenue North Largo, FL 33733 www.paradyne.com General Comments to: mibwg_team@paradyne.com Editor Clay Sikes') if mibBuilder.loadTexts: pdnPppLcpExtMIB.setDescription("The MIB module provides enterprise-specific extensions to the PPP-LCP-MIB for managing the Link Control Protocol (LCP) and Line Quality Monitoring on subnetwork interfaces that use the family of Point-to-Point protocols. The following documents should be referenced with respect to this MIB module: [RFC 1471] Kastenholz, F., `The Definitions of Managed Objects for the Link Control Protocol of the Point-to-Point Protocol, PPP-LCP-MIB', June 1993. [RFC 1661] Simpson, W., `The Point-to-Point Protocol', July 1994.") pdnPppLcpExtNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 0)) pdnPppLcpExtObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1)) pdnPppLcpExtAFNs = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 2)) pdnPppLcpExtConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 3)) pdnPppLinkStatusExtTable = MibTable((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1), ) if mibBuilder.loadTexts: pdnPppLinkStatusExtTable.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusExtTable.setDescription("Extensions to the PPP LCP Link Status Table, pppLinkStatusTable. Counters in this group contain `total' counts which are marked from the time the system was last re-initialized.") pdnPppLinkStatusExtEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1), ) pppLinkStatusEntry.registerAugmentions(("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusExtEntry")) pdnPppLinkStatusExtEntry.setIndexNames(*pppLinkStatusEntry.getIndexNames()) if mibBuilder.loadTexts: pdnPppLinkStatusExtEntry.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusExtEntry.setDescription('An entry in the PPP LCP Link Status Table.') pdnPppLinkStatusCurrState = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 1), PdnPPPState()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusCurrState.setReference("RFC 1661, Section 4.2, `State Transition Table'.") if mibBuilder.loadTexts: pdnPppLinkStatusCurrState.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusCurrState.setDescription('The current state of the LCP State Machine.') pdnPppLinkStatusEstablishFailedReason = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusEstablishFailedReason.setReference("RFC 1661, Section 4.2, `State Transition Table'.") if mibBuilder.loadTexts: pdnPppLinkStatusEstablishFailedReason.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusEstablishFailedReason.setDescription('Indicates why the PPP link failed to establish a connection to the Network-Layer Protocol phase. If the link was successfully established, a zero-length string will be returned. Otherwise, a string will be returned indicating why the LCP could not establish the phase.') pdnPppLinkStatusLocalToRemoteMagicNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 3), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusLocalToRemoteMagicNumber.setReference("RFC 1661, Section 6.4, `Magic-Number'.") if mibBuilder.loadTexts: pdnPppLinkStatusLocalToRemoteMagicNumber.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusLocalToRemoteMagicNumber.setDescription('The Magic-Number negotiated for packets in the local to remote direction.') pdnPppLinkStatusRemoteToLocalMagicNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 4), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusRemoteToLocalMagicNumber.setReference("RFC 1661, Section 6.4, `Magic-Number'.") if mibBuilder.loadTexts: pdnPppLinkStatusRemoteToLocalMagicNumber.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusRemoteToLocalMagicNumber.setDescription('The Magic-Number negotiated for packets in the remote to local direction.') pdnPppLinkStatusTotalSentConfigRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentConfigRequests.setReference("RFC 1661, Section 5.1, `Configure-Request'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentConfigRequests.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentConfigRequests.setDescription('The number of Configure-Requests packets sent on this link.') pdnPppLinkStatusTotalReceivedConfigRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedConfigRequests.setReference("RFC 1661, Section 5.1, `Configure-Request'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedConfigRequests.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedConfigRequests.setDescription('The number of Configure-Requests packets received on this link.') pdnPppLinkStatusTotalSentConfigAcks = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentConfigAcks.setReference("RFC 1661, Section 5.2, `Configure-Ack'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentConfigAcks.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentConfigAcks.setDescription('The number of Configure-Ack packets sent on this link.') pdnPppLinkStatusTotalReceivedConfigAcks = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedConfigAcks.setReference("RFC 1661, Section 5.2, `Configure-Ack'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedConfigAcks.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedConfigAcks.setDescription('The number of Configure-Ack packets received on this link.') pdnPppLinkStatusTotalSentConfigNaks = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentConfigNaks.setReference("RFC 1661, Section 5.3, `Configure-Nak'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentConfigNaks.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentConfigNaks.setDescription('The number of Configure-Nak packets sent on this link.') pdnPppLinkStatusTotalReceivedConfigNaks = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedConfigNaks.setReference("RFC 1661, Section 5.3, `Configure-Nak'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedConfigNaks.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedConfigNaks.setDescription('The number of Configure-Nak packets received on this link.') pdnPppLinkStatusTotalSentConfigRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentConfigRejects.setReference("RFC 1661, Section 5.4, `Configure-Reject'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentConfigRejects.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentConfigRejects.setDescription('The number of Configure-Reject packets sent on this link.') pdnPppLinkStatusTotalReceivedConfigRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedConfigRejects.setReference("RFC 1661, Section 5.4, `Configure-Reject'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedConfigRejects.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedConfigRejects.setDescription('The number of Configure-Reject packets received on this link.') pdnPppLinkStatusTotalSentTerminateRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentTerminateRequests.setReference("RFC 1661, Section 5.5, `Terminate-Request and Terminate-Ack'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentTerminateRequests.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentTerminateRequests.setDescription('The number of Terminate-Request packets sent on this link.') pdnPppLinkStatusTotalReceivedTerminateRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedTerminateRequests.setReference("RFC 1661, Section 5.5, `Terminate-Request and Terminate-Ack'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedTerminateRequests.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedTerminateRequests.setDescription('The number of Terminate-Request packets received on this link.') pdnPppLinkStatusTotalSentTerminateAcks = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentTerminateAcks.setReference("RFC 1661, Section 5.5, `Terminate-Request and Terminate-Ack'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentTerminateAcks.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentTerminateAcks.setDescription('The number of Terminate-Ack packets sent on this link.') pdnPppLinkStatusTotalReceivedTerminateAcks = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedTerminateAcks.setReference("RFC 1661, Section 5.5, `Terminate-Request and Terminate-Ack'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedTerminateAcks.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedTerminateAcks.setDescription('The number of Terminate-Ack packets received on this link.') pdnPppLinkStatusTotalSentCodeRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentCodeRejects.setReference("RFC 1661, Section 5.6, `Code-Reject'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentCodeRejects.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentCodeRejects.setDescription('The number of Code-Reject packets sent on this link.') pdnPppLinkStatusTotalReceivedCodeRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedCodeRejects.setReference("RFC 1661, Section 5.6, `Code-Reject'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedCodeRejects.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedCodeRejects.setDescription('The number of Code-Reject packets received on this link.') pdnPppLinkStatusTotalSentProtocolRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentProtocolRejects.setReference("RFC 1661, Section 5.7, `Protocol-Reject'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentProtocolRejects.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentProtocolRejects.setDescription('The number of Protocol-Reject packets sent on this link.') pdnPppLinkStatusTotalReceivedProtocolRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedProtocolRejects.setReference("RFC 1661, Section 5.7, `Protocol-Reject'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedProtocolRejects.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedProtocolRejects.setDescription('The number of Protocol-Reject packets received on this link.') pdnPppLinkStatusTotalSentEchoRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentEchoRequests.setReference("RFC 1661, Section 5.8, `Echo-Request and Echo-Reply'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentEchoRequests.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentEchoRequests.setDescription('The number of Echo-Request packets sent on this link.') pdnPppLinkStatusTotalReceivedEchoRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedEchoRequests.setReference("RFC 1661, Section 5.8, `Echo-Request and Echo-Reply'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedEchoRequests.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedEchoRequests.setDescription('The number of Echo-Request packets received on this link.') pdnPppLinkStatusTotalSentEchoReplies = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentEchoReplies.setReference("RFC 1661, Section 5.8, `Echo-Request and Echo-Reply'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentEchoReplies.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentEchoReplies.setDescription('The number of Echo-Reply packets sent on this link.') pdnPppLinkStatusTotalReceivedEchoReplies = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedEchoReplies.setReference("RFC 1661, Section 5.8, `Echo-Request and Echo-Reply'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedEchoReplies.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedEchoReplies.setDescription('The number of Echo-Reply packets received on this link.') pdnPppLinkStatusTotalSentDiscardRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentDiscardRequests.setReference("RFC 1661, Section 5.8, `Discard-Request'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentDiscardRequests.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentDiscardRequests.setDescription('The number of Discard-Request packets sent on this link.') pdnPppLinkStatusTotalReceivedDiscardRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedDiscardRequests.setReference("RFC 1661, Section 5.8, `Discard-Request'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedDiscardRequests.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedDiscardRequests.setDescription('The number of Discard-Request packets received on this link.') pdnPppLinkStatusTotalSentKeepAlives = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 27), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentKeepAlives.setReference("RFC 1661, Section 5.8, `Echo-Request and Echo-Reply'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentKeepAlives.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalSentKeepAlives.setDescription("The number of automatically generated Echo-Request packets sent on this link as a `Keep Alive' mechanism.") pdnPppLinkStatusTotalReceivedKeepAlives = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 28), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedKeepAlives.setReference("RFC 1661, Section 5.8, `Echo-Request and Echo-Reply'.") if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedKeepAlives.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalReceivedKeepAlives.setDescription("The number of Echo-Request packets received on this link as a `Keep Alive' mechanism.") pdnPppLinkStatusTotalEchoRequestsTimeOuts = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 29), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalEchoRequestsTimeOuts.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalEchoRequestsTimeOuts.setDescription('The number of Echo-Request packets that have been sent, but no Echo-Reply packet was received.') pdnPppLinkStatusTotalEchoRequestsBadData = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 30), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalEchoRequestsBadData.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalEchoRequestsBadData.setDescription('The number of Echo-Request packets that have been received, but the data field in the packet received did not match the data in the packet sent.') pdnPppLinkStatusTotalEchoRequestsPassed = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 31), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalEchoRequestsPassed.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalEchoRequestsPassed.setDescription('The number of Echo-Request packets that have been received and the data field in the packet received matched the data in the packet sent.') pdnPppLinkStatusTotalKeepAlivesLost = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 32), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalKeepAlivesLost.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalKeepAlivesLost.setDescription("The number of Echo-Request packets that have been sent as a `Keep Alive' mechanism which have not been replied and are considered 'lost'.") pdnPppLinkStatusTotalTerminates = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 1, 1, 33), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkStatusTotalTerminates.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkStatusTotalTerminates.setDescription('The number of times the link was terminated where user traffic could not be sent.') pdnPppLinkConfigExtTable = MibTable((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 2), ) if mibBuilder.loadTexts: pdnPppLinkConfigExtTable.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkConfigExtTable.setDescription('Extensions to the PPP LCP Link Configuration Table, pppLinkconfigTable.') pdnPppLinkConfigExtEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 2, 1), ) pppLinkConfigEntry.registerAugmentions(("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkConfigExtEntry")) pdnPppLinkConfigExtEntry.setIndexNames(*pppLinkConfigEntry.getIndexNames()) if mibBuilder.loadTexts: pdnPppLinkConfigExtEntry.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkConfigExtEntry.setDescription('An entry in the PPP LCP Link Configuration Table.') pdnPppLinkConfigPFC = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 2, 1, 1), SwitchState()).setMaxAccess("readwrite") if mibBuilder.loadTexts: pdnPppLinkConfigPFC.setReference("RFC 1661, Section 6.5, `Protocol-Field-Compression'.") if mibBuilder.loadTexts: pdnPppLinkConfigPFC.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkConfigPFC.setDescription('Configures whether or not Protocol-Field-Compression is desired. When set to enabled(1), the local entity will attempt to negotiate the compression of the Protocol Field. When set to disabled(2), the local entity will not negotiate compression of the Protocol Field. The result of the negotiation is indicated in the pppLinkStatusLocalToRemoteProtocolCompression and the pppLinkStatusRemoteToLocalProtocolCompression objects.') pdnPppLinkConfigACFC = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 2, 1, 2), SwitchState()).setMaxAccess("readwrite") if mibBuilder.loadTexts: pdnPppLinkConfigACFC.setReference("RFC 1661, Section 6.6, `Address-and-Control-Field-Compression'.") if mibBuilder.loadTexts: pdnPppLinkConfigACFC.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkConfigACFC.setDescription('Configures whether or not Data Link Layer Address and Control fields compression is desired. When set to enabled(1), the local entity will attempt to negotiate the compression of the fields. When set to disabled(2), the local entity will not negotiate compression of the fields. The result of the negotiation is indicated in the pppLinkStatusLocalToRemoteACCompression and the pppLinkStatusRemoteToLocalACCompression objects.') pdnPppLinkConfigKeepAliveQuietTime = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 2, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 3600))).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: pdnPppLinkConfigKeepAliveQuietTime.setReference("RFC 1661, Section 5.8, `Echo-Request and Echo-Reply'.") if mibBuilder.loadTexts: pdnPppLinkConfigKeepAliveQuietTime.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkConfigKeepAliveQuietTime.setDescription("If no PPP packets are received for this amount of time, the local PPP entity will send an Echo-Request as a `Keep Alive' mechanism to make sure the link is still active. A value of 0 indicates that the `Keep Alive' mechanism is disabled. The largest `quit time` as supported by the syntax is an hour.") pdnPppLinkConfigKeepAliveTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 2, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 300))).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: pdnPppLinkConfigKeepAliveTimeout.setReference("RFC 1661, Section 5.8, `Echo-Request and Echo-Reply'.") if mibBuilder.loadTexts: pdnPppLinkConfigKeepAliveTimeout.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkConfigKeepAliveTimeout.setDescription("The maximum amount of time to wait for an Echo-Reply in response to an Echo-Request sent as a `Keep Alive' mechanism. When this time has exceeded, the link will be terminated and will attempt to reestablish a connection with its remote peer. The maximum amount of time to wait as supported by the syntax is 5 minutes.") pdnPppLinkTestTable = MibTable((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 3), ) if mibBuilder.loadTexts: pdnPppLinkTestTable.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkTestTable.setDescription('A table to support the testing of a PPP link.') pdnPppLinkTestEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 3, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: pdnPppLinkTestEntry.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkTestEntry.setDescription('An entry in the PPP LCP Link Test Table.') pdnPppLinkTestSendEchoTest = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 3, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("noOp", 1), ("runTest", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pdnPppLinkTestSendEchoTest.setReference("RFC 1661, Section 5.8, `Echo-Request and Echo-Reply'.") if mibBuilder.loadTexts: pdnPppLinkTestSendEchoTest.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkTestSendEchoTest.setDescription('Controls the initiation of a PPP Echo-Request to the remote PPP entity. The agent fills in the data to be echoed. The value read from this object is noOp(1). If an Echo Test is in progress and this object is set to noOp(1),the test will be aborted and the result object below will be set to none(1).') pdnPppLinkTestEchoTestTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 3, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 300))).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: pdnPppLinkTestEchoTestTimeout.setReference("RFC 1661, Section 5.8, `Echo-Request and Echo-Reply'.") if mibBuilder.loadTexts: pdnPppLinkTestEchoTestTimeout.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkTestEchoTestTimeout.setDescription("The maximum amount of time to wait for an Echo-Reply in response to an Echo-Request. If an Echo-Reply is not seen in the amount of time specified, the test will be considered `timed-out'. The maximum amount of time to wait as supported by the syntax is 5 minutes.") pdnPppLinkTestSendDiscardTest = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 3, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("noOp", 1), ("sendDiscard", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pdnPppLinkTestSendDiscardTest.setReference("RFC 1661, Section 5.9, `Discard-Request'.") if mibBuilder.loadTexts: pdnPppLinkTestSendDiscardTest.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkTestSendDiscardTest.setDescription('Controls the initiation of a PPP Discard-Request to the remote PPP entity. The value read from this object is noOp(1).') pdnPppLinkTestLastEchoTestResults = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 1, 3, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("none", 1), ("inProgress", 2), ("success", 3), ("timedOut", 4), ("compareFailed", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnPppLinkTestLastEchoTestResults.setReference("RFC 1661, Section 5.8, `Echo-Request and Echo-Reply'.") if mibBuilder.loadTexts: pdnPppLinkTestLastEchoTestResults.setStatus('current') if mibBuilder.loadTexts: pdnPppLinkTestLastEchoTestResults.setDescription('Displays the results of the last Echo Test. A value of none(1) will be returned if no Echo Tests have been performed. If an Echo Test is currently being performed and neither a Echo Reply was received nor the Echo Timeout Period has been satisfied, inProgress(2) will be read. If the last Echo Test received a Echo Reply and the echo data received matched that which was sent, a success(3) will be returned. If an Echo Test was initiated and no Echo Reply was received within the Echo Timeout Period, a timedOut(4) will be read. If the Echo Reply was returned, but the data received did not match the data that was sent, a compareFailed(5) will be read.') pdnPppLcpExtCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 3, 1)) pdnPppLcpExtGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 3, 2)) pdnPppLcpExtCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 3, 1, 1)).setObjects(("PDN-PPP-LCP-EXT-MIB", "pdnPppLcpExtStateMachineGroup"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLcpExtEstablishFailedGroup"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLcpExtMagicNumberGroup"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLcpExtPacketCountersGroup"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLcpExtKeepAliveCountersGroup"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLcpExtPFCGroup"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLcpExtACFCGroup"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLcpExtKeepAliveConfGroup"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLcpExtEchoTestGroup"), ("PDN-PPP-LCP-EXT-MIB", "pdnPpppLcpExtDiscardTestGroup"), ("PDN-PPP-LCP-EXT-MIB", "pdnPpppLcpExtLinkStateCounterGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): pdnPppLcpExtCompliance = pdnPppLcpExtCompliance.setStatus('current') if mibBuilder.loadTexts: pdnPppLcpExtCompliance.setDescription('The compliance statement for network elements implementing PPP Link Control Protocol.') pdnPppLcpExtObjGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 3, 2, 1)) pdnPppLcpExtAfnGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 3, 2, 2)) pdnPppLcpExtNtfyGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 3, 2, 3)) pdnPppLcpExtStateMachineGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 3, 2, 1, 1)).setObjects(("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusCurrState")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): pdnPppLcpExtStateMachineGroup = pdnPppLcpExtStateMachineGroup.setStatus('current') if mibBuilder.loadTexts: pdnPppLcpExtStateMachineGroup.setDescription("Displays LCP State Machine's state.") pdnPppLcpExtEstablishFailedGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 3, 2, 1, 2)).setObjects(("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusEstablishFailedReason")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): pdnPppLcpExtEstablishFailedGroup = pdnPppLcpExtEstablishFailedGroup.setStatus('current') if mibBuilder.loadTexts: pdnPppLcpExtEstablishFailedGroup.setDescription('Displays the reason the last link establishment failed.') pdnPppLcpExtMagicNumberGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 3, 2, 1, 3)).setObjects(("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusLocalToRemoteMagicNumber"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusRemoteToLocalMagicNumber")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): pdnPppLcpExtMagicNumberGroup = pdnPppLcpExtMagicNumberGroup.setStatus('current') if mibBuilder.loadTexts: pdnPppLcpExtMagicNumberGroup.setDescription('Displays the Magic Number negotiated.') pdnPppLcpExtPacketCountersGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 3, 2, 1, 4)).setObjects(("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalSentConfigRequests"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalReceivedConfigRequests"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalSentConfigAcks"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalReceivedConfigAcks"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalSentConfigNaks"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalReceivedConfigNaks"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalSentConfigRejects"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalReceivedConfigRejects"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalSentTerminateRequests"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalReceivedTerminateRequests"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalSentTerminateAcks"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalReceivedTerminateAcks"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalSentCodeRejects"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalReceivedCodeRejects"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalSentProtocolRejects"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalReceivedProtocolRejects"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalSentEchoRequests"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalReceivedEchoRequests"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalSentEchoReplies"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalReceivedEchoReplies"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalSentDiscardRequests"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalReceivedDiscardRequests")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): pdnPppLcpExtPacketCountersGroup = pdnPppLcpExtPacketCountersGroup.setStatus('current') if mibBuilder.loadTexts: pdnPppLcpExtPacketCountersGroup.setDescription('Counters for various PPP LCP packets.') pdnPppLcpExtKeepAliveCountersGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 3, 2, 1, 5)).setObjects(("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalSentKeepAlives"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalReceivedKeepAlives"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalKeepAlivesLost")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): pdnPppLcpExtKeepAliveCountersGroup = pdnPppLcpExtKeepAliveCountersGroup.setStatus('current') if mibBuilder.loadTexts: pdnPppLcpExtKeepAliveCountersGroup.setDescription("Counters relative to `Keep Alive'.") pdnPppLcpExtPFCGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 3, 2, 1, 6)).setObjects(("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkConfigPFC")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): pdnPppLcpExtPFCGroup = pdnPppLcpExtPFCGroup.setStatus('current') if mibBuilder.loadTexts: pdnPppLcpExtPFCGroup.setDescription('Configuration for Protocol-Field Compression.') pdnPppLcpExtACFCGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 3, 2, 1, 7)).setObjects(("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkConfigACFC")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): pdnPppLcpExtACFCGroup = pdnPppLcpExtACFCGroup.setStatus('current') if mibBuilder.loadTexts: pdnPppLcpExtACFCGroup.setDescription('Configuration for Data Link Layer Address and Control field compression.') pdnPppLcpExtKeepAliveConfGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 3, 2, 1, 8)).setObjects(("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkConfigKeepAliveQuietTime"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkConfigKeepAliveTimeout")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): pdnPppLcpExtKeepAliveConfGroup = pdnPppLcpExtKeepAliveConfGroup.setStatus('current') if mibBuilder.loadTexts: pdnPppLcpExtKeepAliveConfGroup.setDescription("Configuration of parameters relative to `Keep Alive'.") pdnPppLcpExtEchoTestGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 3, 2, 1, 9)).setObjects(("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkTestSendEchoTest"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkTestEchoTestTimeout"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkTestLastEchoTestResults"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalEchoRequestsTimeOuts"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalEchoRequestsBadData"), ("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalEchoRequestsPassed")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): pdnPppLcpExtEchoTestGroup = pdnPppLcpExtEchoTestGroup.setStatus('current') if mibBuilder.loadTexts: pdnPppLcpExtEchoTestGroup.setDescription('Support configuration, initiation, and results of an Echo Test.') pdnPpppLcpExtDiscardTestGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 3, 2, 1, 10)).setObjects(("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkTestSendDiscardTest")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): pdnPpppLcpExtDiscardTestGroup = pdnPpppLcpExtDiscardTestGroup.setStatus('current') if mibBuilder.loadTexts: pdnPpppLcpExtDiscardTestGroup.setDescription('Supports the initiation of a Discard Test.') pdnPpppLcpExtLinkStateCounterGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 28, 3, 2, 1, 11)).setObjects(("PDN-PPP-LCP-EXT-MIB", "pdnPppLinkStatusTotalTerminates")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): pdnPpppLcpExtLinkStateCounterGroup = pdnPpppLcpExtLinkStateCounterGroup.setStatus('current') if mibBuilder.loadTexts: pdnPpppLcpExtLinkStateCounterGroup.setDescription('Counters relative to the link state.') mibBuilder.exportSymbols("PDN-PPP-LCP-EXT-MIB", pdnPppLcpExtConformance=pdnPppLcpExtConformance, pdnPppLcpExtObjects=pdnPppLcpExtObjects, pdnPppLcpExtAfnGroups=pdnPppLcpExtAfnGroups, pdnPppLcpExtNotifications=pdnPppLcpExtNotifications, pdnPppLinkStatusTotalSentTerminateAcks=pdnPppLinkStatusTotalSentTerminateAcks, pdnPppLinkStatusExtEntry=pdnPppLinkStatusExtEntry, pdnPppLcpExtCompliance=pdnPppLcpExtCompliance, pdnPppLcpExtMagicNumberGroup=pdnPppLcpExtMagicNumberGroup, PYSNMP_MODULE_ID=pdnPppLcpExtMIB, pdnPppLcpExtCompliances=pdnPppLcpExtCompliances, pdnPppLinkStatusTotalReceivedConfigAcks=pdnPppLinkStatusTotalReceivedConfigAcks, pdnPppLinkStatusTotalSentEchoReplies=pdnPppLinkStatusTotalSentEchoReplies, pdnPppLinkConfigKeepAliveQuietTime=pdnPppLinkConfigKeepAliveQuietTime, pdnPppLinkStatusTotalReceivedKeepAlives=pdnPppLinkStatusTotalReceivedKeepAlives, pdnPppLinkStatusTotalSentCodeRejects=pdnPppLinkStatusTotalSentCodeRejects, pdnPppLcpExtObjGroups=pdnPppLcpExtObjGroups, pdnPppLcpExtKeepAliveCountersGroup=pdnPppLcpExtKeepAliveCountersGroup, pdnPppLcpExtStateMachineGroup=pdnPppLcpExtStateMachineGroup, pdnPppLinkStatusCurrState=pdnPppLinkStatusCurrState, pdnPppLinkStatusTotalReceivedConfigRejects=pdnPppLinkStatusTotalReceivedConfigRejects, pdnPppLinkStatusTotalSentProtocolRejects=pdnPppLinkStatusTotalSentProtocolRejects, pdnPppLinkStatusLocalToRemoteMagicNumber=pdnPppLinkStatusLocalToRemoteMagicNumber, pdnPppLinkStatusTotalSentConfigRejects=pdnPppLinkStatusTotalSentConfigRejects, pdnPppLinkTestEchoTestTimeout=pdnPppLinkTestEchoTestTimeout, pdnPppLinkTestSendDiscardTest=pdnPppLinkTestSendDiscardTest, pdnPppLinkStatusTotalReceivedDiscardRequests=pdnPppLinkStatusTotalReceivedDiscardRequests, pdnPppLinkTestLastEchoTestResults=pdnPppLinkTestLastEchoTestResults, pdnPppLcpExtAFNs=pdnPppLcpExtAFNs, pdnPppLinkStatusTotalEchoRequestsTimeOuts=pdnPppLinkStatusTotalEchoRequestsTimeOuts, pdnPppLcpExtEstablishFailedGroup=pdnPppLcpExtEstablishFailedGroup, pdnPppLinkStatusTotalEchoRequestsPassed=pdnPppLinkStatusTotalEchoRequestsPassed, pdnPppLinkConfigPFC=pdnPppLinkConfigPFC, pdnPppLcpExtEchoTestGroup=pdnPppLcpExtEchoTestGroup, pdnPppLcpExtPFCGroup=pdnPppLcpExtPFCGroup, pdnPppLinkTestTable=pdnPppLinkTestTable, pdnPppLinkTestEntry=pdnPppLinkTestEntry, pdnPppLinkStatusTotalReceivedConfigRequests=pdnPppLinkStatusTotalReceivedConfigRequests, pdnPppLcpExtPacketCountersGroup=pdnPppLcpExtPacketCountersGroup, pdnPppLinkStatusExtTable=pdnPppLinkStatusExtTable, pdnPppLinkStatusTotalSentConfigRequests=pdnPppLinkStatusTotalSentConfigRequests, pdnPppLinkStatusTotalReceivedTerminateAcks=pdnPppLinkStatusTotalReceivedTerminateAcks, pdnPppLinkStatusTotalReceivedEchoRequests=pdnPppLinkStatusTotalReceivedEchoRequests, pdnPppLcpExtMIB=pdnPppLcpExtMIB, pdnPppLinkStatusTotalEchoRequestsBadData=pdnPppLinkStatusTotalEchoRequestsBadData, pdnPppLinkTestSendEchoTest=pdnPppLinkTestSendEchoTest, pdnPppLinkStatusRemoteToLocalMagicNumber=pdnPppLinkStatusRemoteToLocalMagicNumber, pdnPppLcpExtKeepAliveConfGroup=pdnPppLcpExtKeepAliveConfGroup, pdnPppLcpExtACFCGroup=pdnPppLcpExtACFCGroup, pdnPppLinkStatusTotalSentConfigNaks=pdnPppLinkStatusTotalSentConfigNaks, pdnPppLinkStatusTotalReceivedProtocolRejects=pdnPppLinkStatusTotalReceivedProtocolRejects, pdnPpppLcpExtDiscardTestGroup=pdnPpppLcpExtDiscardTestGroup, pdnPppLinkStatusTotalSentConfigAcks=pdnPppLinkStatusTotalSentConfigAcks, pdnPppLinkStatusTotalSentDiscardRequests=pdnPppLinkStatusTotalSentDiscardRequests, pdnPppLinkStatusEstablishFailedReason=pdnPppLinkStatusEstablishFailedReason, pdnPppLinkStatusTotalSentEchoRequests=pdnPppLinkStatusTotalSentEchoRequests, pdnPppLinkStatusTotalReceivedEchoReplies=pdnPppLinkStatusTotalReceivedEchoReplies, pdnPppLinkStatusTotalSentKeepAlives=pdnPppLinkStatusTotalSentKeepAlives, pdnPppLinkStatusTotalKeepAlivesLost=pdnPppLinkStatusTotalKeepAlivesLost, pdnPppLinkConfigKeepAliveTimeout=pdnPppLinkConfigKeepAliveTimeout, pdnPppLcpExtNtfyGroups=pdnPppLcpExtNtfyGroups, pdnPppLinkStatusTotalReceivedConfigNaks=pdnPppLinkStatusTotalReceivedConfigNaks, pdnPppLinkStatusTotalTerminates=pdnPppLinkStatusTotalTerminates, pdnPppLinkConfigExtTable=pdnPppLinkConfigExtTable, pdnPppLinkStatusTotalReceivedTerminateRequests=pdnPppLinkStatusTotalReceivedTerminateRequests, pdnPppLinkConfigExtEntry=pdnPppLinkConfigExtEntry, pdnPppLinkStatusTotalSentTerminateRequests=pdnPppLinkStatusTotalSentTerminateRequests, pdnPppLinkConfigACFC=pdnPppLinkConfigACFC, pdnPpppLcpExtLinkStateCounterGroup=pdnPpppLcpExtLinkStateCounterGroup, pdnPppLcpExtGroups=pdnPppLcpExtGroups, pdnPppLinkStatusTotalReceivedCodeRejects=pdnPppLinkStatusTotalReceivedCodeRejects)
157.153558
4,632
0.803027
4,567
41,960
7.377053
0.103131
0.052358
0.091627
0.008192
0.436674
0.326497
0.25066
0.209611
0.203318
0.195779
0
0.051427
0.083365
41,960
266
4,633
157.744361
0.824528
0.007912
0
0.050584
0
0.066148
0.317788
0.051227
0
0
0
0
0
1
0
false
0.019455
0.038911
0
0.038911
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