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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3ab1513ec3fd535533ea099090f2e669f39b5c0a | 11,541 | py | Python | verba/apps/github/api.py | nhsuk/verba | c0354ae2012a046e7f7cc7482e293737de9d28bc | [
"MIT"
] | null | null | null | verba/apps/github/api.py | nhsuk/verba | c0354ae2012a046e7f7cc7482e293737de9d28bc | [
"MIT"
] | 2 | 2016-08-11T09:30:41.000Z | 2016-08-11T15:04:08.000Z | verba/apps/github/api.py | nhsuk/verba | c0354ae2012a046e7f7cc7482e293737de9d28bc | [
"MIT"
] | 1 | 2021-04-11T07:41:27.000Z | 2021-04-11T07:41:27.000Z | import json
import requests
import base64
import logging
from django.utils.dateparse import parse_datetime
from verba_settings import config
from .exceptions import InvalidResponseException, NotFoundException
logger = logging.getLogger('github.api')
class Request(object):
base_url = None
default_json = True
def __init__(self, token):
self.token = token
self.url = None
self.in_json = self.default_json
def _build_url(self, url_part):
return '{}/{}'.format(self.base_url, url_part)
def set_url(self, url_or_part):
if not url_or_part.startswith(self.base_url):
self.url = self._build_url(url_or_part)
else:
self.url = url_or_part
return self
def set_in_json(self, in_json):
self.in_json = in_json
return self
def _build_data(self, data):
if self.in_json:
return json.dumps(data)
return data
def _build_accept(self):
if self.in_json:
return 'application/json'
return 'text/plain'
def _build_response(self, response):
if self.in_json:
return response.json()
return response.content
def get(self, params={}):
return self._make('get', params=params)
def put(self, data={}):
return self._make('put', data=self._build_data(data))
def patch(self, data={}):
return self._make('patch', data=self._build_data(data))
def post(self, data={}):
return self._make('post', data=self._build_data(data))
def _make(self, verb, **kwargs):
kwargs['headers'] = {
'Authorization': 'token {}'.format(self.token),
'Accept': self._build_accept()
}
verb_func = getattr(requests, verb)
logger.debug('{} with URL: {}'.format(verb, self.url))
response = verb_func(self.url, **kwargs)
if not response.ok:
if response.status_code == 404:
raise NotFoundException.from_response(response)
raise InvalidResponseException.from_response(response)
return self._build_response(response)
class HTTPRequest(Request):
base_url = config.GITHUB_HTTP_HOST
default_json = False
class APIRequest(Request):
base_url = config.GITHUB_API_HOST
class RepoRequest(APIRequest):
"""
Like Request but used for actions on a repo.
"""
def _build_url(self, url_part):
return '{}/repos/{}/{}'.format(config.GITHUB_API_HOST, config.REPO, url_part)
def abs_path(path):
if path.startswith('/'):
return path
return '/{}'.format(path)
class Comment(object):
def __init__(self, token, data):
self.token = token
self._data = data
@property
def body(self):
return self._data['body']
@property
def created_at(self):
return parse_datetime(self._data['created_at'])
@property
def created_by(self):
return self._data['user']['login']
class File(object):
def __init__(self, token, path, branch_name):
self.token = token
self.path = path
self.branch_name = branch_name
@property
def _data(self):
if not hasattr(self, '_cached_data'):
url = 'contents/{}'.format(self.path)
params = {
'path': self.path,
'ref': self.branch_name
}
self._cached_data = RepoRequest(self.token).set_url(url).get(params=params)
return self._cached_data
@property
def name(self):
return self._data['name']
@property
def content(self):
return base64.b64decode(self._data['content']).decode("utf-8")
@classmethod
def create_or_update(cls, token, path, branch_name, content, message, update_sha=None):
encoded_content = base64.b64encode(content.encode('utf-8')).decode("utf-8")
url = 'contents/{}'.format(path)
params = {
'path': path,
'message': message,
'content': encoded_content,
'branch': branch_name
}
if update_sha:
params['sha'] = update_sha
data = RepoRequest(token).set_url(url).put(data=params)
return (data, encoded_content)
def change_content(self, new_content, message):
content_data, _ = self.create_or_update(
self.token, self.path, self.branch_name, new_content, message,
update_sha=self._data['sha']
)
setattr(self, '_cached_data', content_data)
@classmethod
def create(cls, token, path, branch_name, content, message):
response_data, encoded_content = cls.create_or_update(
token, path, branch_name, content, message
)
# constructing file / content
git_file = cls(token=token, path=path, branch_name=branch_name)
content_data = response_data['content']
content_data['content'] = encoded_content # the api don't return this field when creating/updating
setattr(git_file, '_cached_data', content_data)
return git_file
class Branch(object):
def __init__(self, token, name):
self.token = token
self.name = name
def create_new_file(self, path, message, content):
return File.create(
self.token, path,
branch_name=self.name,
content=content, message=message
)
def get_git_tree(self, path, recursive=False):
sha = '{}:{}'.format(self.name, path)
url = 'git/trees/{}?recursive={}'.format(
sha, '1' if recursive else '0'
)
return RepoRequest(self.token).set_url(url).get()
def get_dir_files(self, path):
tree_data = self.get_git_tree(path, recursive=True)
return [
File(self.token, '{}{}'.format(path, tree_el['path']), self.name)
for tree_el in tree_data['tree']
]
def get_file(self, path):
# it does not check if the file exists => it's being optimistic to avoid
# performance penalties.
# It not ideal, change
return File(self.token, path, self.name)
@classmethod
def create(cls, token, new_branch, from_branch):
from_branch_data = RepoRequest(token).set_url('branches/{}'.format(from_branch)).get()
from_branch_sha = from_branch_data['commit']['sha']
new_branch_ref = 'refs/heads/{}'.format(new_branch)
data = {
'ref': new_branch_ref,
'sha': from_branch_sha
}
RepoRequest(token).set_url('git/refs').post(data)
return cls(token, new_branch)
class PullRequest(object):
def __init__(self, token, data):
self.token = token
self._data = data
@property
def branch(self):
return Branch(self.token, self.head_ref)
@property
def issue_nr(self):
return self._data['number']
@property
def issue(self):
if not hasattr(self, '_issue'):
issue_data = RepoRequest(self.token).set_url(self._data['issue_url']).get()
self._issue = Issue(self.token, issue_data)
return self._issue
@property
def title(self):
return self._data['title']
@property
def description(self):
return self._data['body']
@property
def created_at(self):
return parse_datetime(self._data['created_at'])
def edit(self, title, description):
data = {
'title': title,
'body': description
}
RepoRequest(self.token).set_url(self._data['url']).patch(data)
self._data['title'] = title
self._data['body'] = description
def close(self):
data = {
'state': 'closed'
}
RepoRequest(self.token).set_url(self._data['url']).patch(data)
@property
def head_ref(self):
return self._data['head']['ref']
@property
def labels(self):
return self.issue.labels
@labels.setter
def labels(self, labels):
self.issue.labels = labels
@property
def assignees(self):
return self.issue.assignees
@assignees.setter
def assignees(self, assignees):
self.issue.assignees = assignees
def add_comment(self, comment):
self.issue.add_comment(comment)
@property
def comments(self):
return self.issue.comments
@property
def tot_comments(self):
return self._data['comments']
@property
def diff(self):
content = HTTPRequest(self.token).set_url(self._data['diff_url']).get()
return content.decode("utf-8")
@classmethod
def create(cls, token, title, body, base, head):
data = {
'title': title,
'body': body,
'head': head,
'base': base
}
pull_data = RepoRequest(token).set_url('pulls').post(data)
return cls(token, pull_data)
@classmethod
def all(cls, token):
pulls = []
for pull_data in RepoRequest(token).set_url('pulls').get():
pulls.append(PullRequest(token, pull_data))
return pulls
@classmethod
def get(cls, token, number):
pull_data = RepoRequest(token).set_url('pulls/{}'.format(number)).get()
return cls(token, pull_data)
class Issue(object):
def __init__(self, token, data):
self.token = token
self._data = data
@property
def labels(self):
return [label['name'] for label in self._data['labels']]
@labels.setter
def labels(self, labels):
data = {
'labels': labels
}
pull_data = RepoRequest(self.token).set_url(self._data['url']).patch(data)
self._data = pull_data
@property
def assignees(self):
return [label['login'] for label in self._data['assignees']]
@assignees.setter
def assignees(self, assignees):
data = {
'assignees': assignees
}
pull_data = RepoRequest(self.token).set_url(self._data['url']).patch(data)
self._data = pull_data
def add_comment(self, comment):
data = {
'body': comment
}
RepoRequest(self.token).set_url(self._data['comments_url']).post(data)
@property
def comments(self):
comments_data = RepoRequest(self.token).set_url(self._data['comments_url']).get()
return [
Comment(self.token, data)
for data in comments_data
]
class Repo(object):
def __init__(self, token):
self.token = token
def get_pulls(self):
return PullRequest.all(self.token)
def get_pull(self, number):
return PullRequest.get(self.token, number=number)
def create_pull(self, title, body, base, head):
return PullRequest.create(self.token, title, body, base, head)
def create_branch(self, new_branch, from_branch):
return Branch.create(self.token, new_branch, from_branch)
class User(object):
def __init__(self, token, data):
self.token = token
self._data = data
@property
def username(self):
return self._data['login']
@property
def name(self):
return self._data['name']
@property
def email(self):
return self._data['email']
@property
def avatar_url(self):
return self._data['avatar_url']
@classmethod
def get_logged_in(cls, token):
user_data = APIRequest(token).set_url('user').get()
return cls(token, user_data)
| 26.839535 | 107 | 0.605667 | 1,383 | 11,541 | 4.848156 | 0.130152 | 0.046532 | 0.02789 | 0.032215 | 0.362565 | 0.244295 | 0.216555 | 0.131842 | 0.125578 | 0.112155 | 0 | 0.002269 | 0.2745 | 11,541 | 429 | 108 | 26.902098 | 0.798519 | 0.021055 | 0 | 0.322981 | 0 | 0 | 0.054176 | 0.002217 | 0 | 0 | 0 | 0 | 0 | 1 | 0.217391 | false | 0 | 0.021739 | 0.102484 | 0.465839 | 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 |
3abd3f91e2586cf8da40fe2d8c16616920166120 | 1,460 | py | Python | sources/controller/main_window/button_main_window.py | Groomsha/lan-map | 1c30819470f43f8521e98eb75c70da23939f8f06 | [
"Apache-2.0"
] | null | null | null | sources/controller/main_window/button_main_window.py | Groomsha/lan-map | 1c30819470f43f8521e98eb75c70da23939f8f06 | [
"Apache-2.0"
] | null | null | null | sources/controller/main_window/button_main_window.py | Groomsha/lan-map | 1c30819470f43f8521e98eb75c70da23939f8f06 | [
"Apache-2.0"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.
#
"""
Project Name: 'lan-map'
Version: 0.1
Description: Network map creation application
Ihor Cheberiak (c) 2021
https://www.linkedin.com/in/ihor-cheberiak/
"""
class ButtonMainWindow:
def __init__(self, main_gui) -> None:
self.main_window = main_gui
def button_new_device(self) -> None:
self.main_window.gui_new_device_controller.show()
def button_edit_device(self) -> None:
self.main_window.gui_main_windows.pushButton_3.setDisabled(True)
def button_delete_device(self) -> None:
self.main_window.gui_main_windows.pushButton_4.setDisabled(True)
def button_network_map(self) -> None:
self.main_window.gui_main_windows.pushButton_5.setDisabled(True)
| 31.73913 | 66 | 0.774658 | 218 | 1,460 | 5.045872 | 0.509174 | 0.054545 | 0.054545 | 0.081818 | 0.164545 | 0.164545 | 0.164545 | 0.136364 | 0.136364 | 0.094545 | 0 | 0.010375 | 0.141781 | 1,460 | 45 | 67 | 32.444444 | 0.867518 | 0.620548 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.454545 | false | 0 | 0 | 0 | 0.545455 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
3ac554f4cac24d4da36e3e1c642e8f93e5c1cc2e | 391 | py | Python | data/config.py | Iwillsky/ProteinFoldingCloud | 80acc6dd3ce8ac98e074e12c5962cf89ff13816d | [
"MIT"
] | 1 | 2022-02-07T16:49:56.000Z | 2022-02-07T16:49:56.000Z | data/config.py | Iwillsky/ProteinFoldingCloud | 80acc6dd3ce8ac98e074e12c5962cf89ff13816d | [
"MIT"
] | null | null | null | data/config.py | Iwillsky/ProteinFoldingCloud | 80acc6dd3ce8ac98e074e12c5962cf89ff13816d | [
"MIT"
] | null | null | null | import os
settings = {
'host': os.environ.get('ACCOUNT_HOST', 'https://hacktest.documents.azure.com:443/'),
'master_key': os.environ.get('ACCOUNT_KEY', '7iE999aQxxo6Y3HtZJv46OQzJBlY6E5B3EKVsjzuYsyiwjSAZZWaQxfOgGSXco7bHWlM8tJrxTywBR1uu0X4GQ=='),
'database_id': os.environ.get('COSMOS_DATABASE', 'hackjoblist'),
'container_id': os.environ.get('COSMOS_CONTAINER', 'joblist'),
} | 48.875 | 140 | 0.746803 | 39 | 391 | 7.307692 | 0.564103 | 0.126316 | 0.168421 | 0.133333 | 0.140351 | 0 | 0 | 0 | 0 | 0 | 0 | 0.053221 | 0.086957 | 391 | 8 | 141 | 48.875 | 0.745098 | 0 | 0 | 0 | 0 | 0 | 0.607143 | 0.22449 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.142857 | 0 | 0.142857 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
3ad1ae396a459e4ee9c212221ec38d44dc4ffc95 | 990 | py | Python | 0306_more_guest.py | arunkumarang/python | 1960e285dfe2ef54d2e3ab37584bfef8b24ecca9 | [
"Apache-2.0"
] | null | null | null | 0306_more_guest.py | arunkumarang/python | 1960e285dfe2ef54d2e3ab37584bfef8b24ecca9 | [
"Apache-2.0"
] | null | null | null | 0306_more_guest.py | arunkumarang/python | 1960e285dfe2ef54d2e3ab37584bfef8b24ecca9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import sys
def main():
guest_lists = ['senthil', 'raj', 'ameen']
print("Hi Everyone! I found a bigger dinner table. I would like to invite more people for Dinner.")
guest_lists.insert(0, 'naveen')
guest_lists.insert(2, 'prabhu')
guest_lists.append('ragu')
print("")
print("Hi " + guest_lists[0].title() + ", We coridally invite you to my House Warming Party.")
print("Hi " + guest_lists[1].title() + ", We coridally invite you to my House Warming Party.")
print("Hi " + guest_lists[2].title() + ", We coridally invite you to my House Warming Party.")
print("Hi " + guest_lists[3].title() + ", We coridally invite you to my House Warming Party.")
print("Hi " + guest_lists[4].title() + ", We coridally invite you to my House Warming Party.")
print("Hi " + guest_lists[5].title() + ", We coridally invite you to my House Warming Party.")
if __name__ == '__main__':
main()
sys.exit(0)
| 39.6 | 104 | 0.630303 | 142 | 990 | 4.267606 | 0.352113 | 0.165017 | 0.118812 | 0.168317 | 0.59571 | 0.59571 | 0.59571 | 0.59571 | 0.59571 | 0.59571 | 0 | 0.011673 | 0.221212 | 990 | 24 | 105 | 41.25 | 0.774319 | 0.016162 | 0 | 0 | 0 | 0 | 0.483667 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.058824 | false | 0 | 0.058824 | 0 | 0.117647 | 0.470588 | 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 | 0 | 1 | 0 | 2 |
3ad4e49f3fb445d401e90879815a1d1fd82bcf37 | 1,182 | py | Python | harris_county_bookings/settings_example.py | open-austin/harris-county-bookings | 0fb8591288be4b81378a3a9b5cd427ac37b789ed | [
"Unlicense"
] | 4 | 2018-05-09T00:59:14.000Z | 2021-11-18T04:47:37.000Z | harris_county_bookings/settings_example.py | open-austin/harris-county-bookings | 0fb8591288be4b81378a3a9b5cd427ac37b789ed | [
"Unlicense"
] | 17 | 2016-07-28T01:11:09.000Z | 2018-08-06T05:05:37.000Z | harris_county_bookings/settings_example.py | open-austin/harris-county-bookings | 0fb8591288be4b81378a3a9b5cd427ac37b789ed | [
"Unlicense"
] | 6 | 2016-07-27T23:44:09.000Z | 2021-11-18T04:47:28.000Z | """
These settings are only needed if you are planning to push to S3, GitHub or data.world.
If you only are only saving to local files, then these are not needed.
"""
S3_BUCKETS = {
# 'bucket': name of the bucket
# 'key': syntax: a_folder/another_folder
#
# For the 'scrub' bucket, one sub-folder named 'data' is created
# For the 'raw' bucket, two sub-folders are created: 'original-files' & 'raw-data'
'scrub': {'bucket': 'THE_PUBLIC_BUCKET_TO_SAVE_TO', 'key': 'THE_DIRECTORY_TO_SAVE_TO'},
'raw': {'bucket': 'THE_PRIVATE_BUCKET_TO_SAVE_TO', 'key': 'THE_DIRECTORY_TO_SAVE_TO'}
}
GITHUB_API_TOKEN = 'YOUR_GITHUB_TOKEN_HERE'
GITHUB_REPOS = {
# 'name': syntax: repo_owner/repo_name
'scrub': {'name': 'THE_PUBLIC_REPO_YOU_WANT_TO_PUSH_TO', 'branch': 'THE_BRANCH_YOU_WANT_TO_PUSH_TO'},
'raw': {'name': 'THE_PRIVATE_REPO_YOU_WANT_TO_PUSH_TO', 'branch': 'THE_BRANCH_YOU_WANT_TO_PUSH_TO'}
}
DATAWORLD_API_TOKEN = 'YOUR_DATAWORLD_TOKEN_HERE'
DATAWORLD_DATASETS = {
'scrub': {'owner': 'DATASET_OWNER', 'name': 'THE_PUBLIC_DATASET_YOU_WANT_TO_PUSH_TO'},
'raw': {'owner': 'DATASET_OWNER', 'name': 'THE_PRIVATE_DATASET_YOU_WANT_TO_PUSH_TO'}
}
| 42.214286 | 105 | 0.719966 | 182 | 1,182 | 4.252747 | 0.313187 | 0.054264 | 0.072351 | 0.100775 | 0.348837 | 0.286822 | 0.222222 | 0.222222 | 0.222222 | 0.222222 | 0 | 0.001974 | 0.142978 | 1,182 | 27 | 106 | 43.777778 | 0.762093 | 0.345178 | 0 | 0 | 0 | 0 | 0.612352 | 0.473062 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
3ad8bcbb6feea1785464288aceb9639383828b73 | 156 | py | Python | model/section.py | yiyangyi/cc98-tornado | 45313f2313e5b5a4636469b4b82a02a8e62fc1f1 | [
"MIT"
] | null | null | null | model/section.py | yiyangyi/cc98-tornado | 45313f2313e5b5a4636469b4b82a02a8e62fc1f1 | [
"MIT"
] | null | null | null | model/section.py | yiyangyi/cc98-tornado | 45313f2313e5b5a4636469b4b82a02a8e62fc1f1 | [
"MIT"
] | null | null | null | class SectionModel(Query):
def __init__(self, db):
self.db = db
self.table_name = "section"
super(SectionModel, self).__init__() | 31.2 | 44 | 0.621795 | 18 | 156 | 4.888889 | 0.611111 | 0.136364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25641 | 156 | 5 | 44 | 31.2 | 0.758621 | 0 | 0 | 0 | 0 | 0 | 0.044586 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
3aedc4bff8cbf1ecaa2885d21e7d52ed9675dbef | 413 | py | Python | src/backend/app/drivers/sqlalchemy/models/role.py | douglasdaly/web-app-skeleton | af7580822b18e714d7c0b54f6fdcd11bf57f16e0 | [
"MIT"
] | 1 | 2021-07-20T14:20:10.000Z | 2021-07-20T14:20:10.000Z | src/backend/app/drivers/sqlalchemy/models/role.py | douglasdaly/web-app-skeleton | af7580822b18e714d7c0b54f6fdcd11bf57f16e0 | [
"MIT"
] | 4 | 2021-03-31T20:03:55.000Z | 2022-02-27T09:19:29.000Z | src/backend/app/drivers/sqlalchemy/models/role.py | douglasdaly/web-app-skeleton | af7580822b18e714d7c0b54f6fdcd11bf57f16e0 | [
"MIT"
] | 1 | 2021-05-02T09:27:16.000Z | 2021-05-02T09:27:16.000Z | # -*- coding: utf-8 -*-
"""
Role storage schema for SQLAlchemy.
"""
import typing as tp
import sqlalchemy as sa
from app.crud.models.role import RoleBase
from app.drivers.sqlalchemy.models.base import Base
class Role(RoleBase, Base):
"""
Storage table for Role objects in SQLAlchemy.
"""
name = sa.Column(sa.String, unique=True, index=True)
description = sa.Column(sa.Text, nullable=True)
| 21.736842 | 56 | 0.702179 | 58 | 413 | 5 | 0.568966 | 0.048276 | 0.068966 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002941 | 0.176755 | 413 | 18 | 57 | 22.944444 | 0.85 | 0.251816 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.571429 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
aaf8fc9701ea057c797fbc617c997b61c0a8d730 | 94,626 | py | Python | pysnmp/CISCO-STP-EXTENSIONS-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/CISCO-STP-EXTENSIONS-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/CISCO-STP-EXTENSIONS-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module CISCO-STP-EXTENSIONS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-STP-EXTENSIONS-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:56: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)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection")
dot1dStpPortEntry, = mibBuilder.importSymbols("BRIDGE-MIB", "dot1dStpPortEntry")
ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt")
VlanIndex, vlanTrunkPortEntry, vtpVlanEditEntry, vtpVlanEntry = mibBuilder.importSymbols("CISCO-VTP-MIB", "VlanIndex", "vlanTrunkPortEntry", "vtpVlanEditEntry", "vtpVlanEntry")
ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup")
MibIdentifier, Counter64, Unsigned32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, ModuleIdentity, TimeTicks, Gauge32, IpAddress, Integer32, Bits, Counter32, iso, ObjectIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "Counter64", "Unsigned32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "ModuleIdentity", "TimeTicks", "Gauge32", "IpAddress", "Integer32", "Bits", "Counter32", "iso", "ObjectIdentity")
DisplayString, TimeStamp, RowStatus, TruthValue, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TimeStamp", "RowStatus", "TruthValue", "TextualConvention")
ciscoStpExtensionsMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 82))
ciscoStpExtensionsMIB.setRevisions(('2013-03-07 00:00', '2005-12-20 00:00', '2005-04-12 00:00', '2004-07-21 00:00', '2004-04-08 00:00', '2004-01-14 00:00', '2003-10-23 00:00', '2002-07-11 00:00', '2001-12-06 00:00', '2001-09-14 00:00', '2001-06-20 00:00', '2001-04-12 00:00', '2000-05-23 00:00', '2000-03-21 00:00', '1997-11-10 12:00', '1997-08-19 12:00',))
if mibBuilder.loadTexts: ciscoStpExtensionsMIB.setLastUpdated('201303070000Z')
if mibBuilder.loadTexts: ciscoStpExtensionsMIB.setOrganization('Cisco Systems, Inc.')
stpxObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 82, 1))
stpxUplinkFastObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 1))
stpxVlanObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 2))
stpxInconsistencyObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 3))
stpxBackboneFastObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 4))
stpxRootGuardObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 5))
stpxSpanningTreeObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 6))
stpxMISTPObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 7))
stpxLoopGuardObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 8))
stpxFastStartObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 9))
stpxBpduSkewingObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 10))
stpxMSTObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11))
stpxRSTPObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 12))
stpxRPVSTObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 13))
stpxSMSTObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14))
stpxNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 82, 2))
class StpxMSTConfigurationDigest(TextualConvention, OctetString):
status = 'current'
displayHint = '1x'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(16, 16)
fixedLength = 16
stpxUplinkFastEnabled = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 1, 1), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxUplinkFastEnabled.setStatus('current')
stpxUplinkFastTransitions = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 1, 2), Counter32()).setUnits('transitions').setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxUplinkFastTransitions.setStatus('current')
stpxUplinkStationLearningGenRate = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 32000))).setUnits('frames').setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxUplinkStationLearningGenRate.setStatus('current')
stpxUplinkStationLearningFrames = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 1, 4), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxUplinkStationLearningFrames.setStatus('current')
stpxUplinkFastOperEnabled = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 1, 5), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxUplinkFastOperEnabled.setStatus('current')
stpxPreferredVlansTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 2, 1), )
if mibBuilder.loadTexts: stpxPreferredVlansTable.setStatus('current')
stpxPreferredVlansEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 2, 1, 1), )
vlanTrunkPortEntry.registerAugmentions(("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredVlansEntry"))
stpxPreferredVlansEntry.setIndexNames(*vlanTrunkPortEntry.getIndexNames())
if mibBuilder.loadTexts: stpxPreferredVlansEntry.setStatus('current')
stpxPreferredVlansMap = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 2, 1, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(128, 128)).setFixedLength(128)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxPreferredVlansMap.setStatus('current')
stpxPreferredVlansMap2k = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 2, 1, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxPreferredVlansMap2k.setStatus('current')
stpxPreferredVlansMap3k = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 2, 1, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxPreferredVlansMap3k.setStatus('current')
stpxPreferredVlansMap4k = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 2, 1, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxPreferredVlansMap4k.setStatus('current')
stpxPVSTVlanTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 2, 2), )
if mibBuilder.loadTexts: stpxPVSTVlanTable.setStatus('current')
stpxPVSTVlanEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 2, 2, 1), ).setIndexNames((0, "CISCO-STP-EXTENSIONS-MIB", "stpxPVSTVlanIndex"))
if mibBuilder.loadTexts: stpxPVSTVlanEntry.setStatus('current')
stpxPVSTVlanIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 2, 2, 1, 1), VlanIndex())
if mibBuilder.loadTexts: stpxPVSTVlanIndex.setStatus('current')
stpxPVSTVlanEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 2, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2), ("notApplicable", 3))).clone('enabled')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxPVSTVlanEnable.setStatus('current')
stpxInconsistencyTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 3, 1), )
if mibBuilder.loadTexts: stpxInconsistencyTable.setStatus('current')
stpxInconsistencyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 3, 1, 1), ).setIndexNames((0, "CISCO-STP-EXTENSIONS-MIB", "stpxVlanIndex"), (0, "CISCO-STP-EXTENSIONS-MIB", "stpxPortIndex"))
if mibBuilder.loadTexts: stpxInconsistencyEntry.setStatus('current')
stpxVlanIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 3, 1, 1, 1), VlanIndex())
if mibBuilder.loadTexts: stpxVlanIndex.setStatus('current')
stpxPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 3, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)))
if mibBuilder.loadTexts: stpxPortIndex.setStatus('current')
stpxInconsistentState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 3, 1, 1, 3), Bits().clone(namedValues=NamedValues(("typeInconsistent", 0), ("pvidInconsistent", 1)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxInconsistentState.setStatus('current')
stpxBackboneFastEnabled = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 4, 1), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxBackboneFastEnabled.setStatus('current')
stpxBackboneFastInInferiorBPDUs = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 4, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxBackboneFastInInferiorBPDUs.setStatus('current')
stpxBackboneFastInRLQRequestPDUs = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 4, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxBackboneFastInRLQRequestPDUs.setStatus('current')
stpxBackboneFastInRLQResponsePDUs = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 4, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxBackboneFastInRLQResponsePDUs.setStatus('current')
stpxBackboneFastOutRLQRequestPDUs = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 4, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxBackboneFastOutRLQRequestPDUs.setStatus('current')
stpxBackboneFastOutRLQResponsePDUs = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 4, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxBackboneFastOutRLQResponsePDUs.setStatus('current')
stpxBackboneFastOperEnabled = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 4, 7), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxBackboneFastOperEnabled.setStatus('current')
stpxRootGuardConfigTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 5, 1), )
if mibBuilder.loadTexts: stpxRootGuardConfigTable.setStatus('current')
stpxRootGuardConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 5, 1, 1), ).setIndexNames((0, "CISCO-STP-EXTENSIONS-MIB", "stpxRootGuardConfigPortIndex"))
if mibBuilder.loadTexts: stpxRootGuardConfigEntry.setStatus('current')
stpxRootGuardConfigPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 5, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)))
if mibBuilder.loadTexts: stpxRootGuardConfigPortIndex.setStatus('current')
stpxRootGuardConfigEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 5, 1, 1, 2), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxRootGuardConfigEnabled.setStatus('current')
stpxRootInconsistencyTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 5, 2), )
if mibBuilder.loadTexts: stpxRootInconsistencyTable.setStatus('current')
stpxRootInconsistencyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 5, 2, 1), ).setIndexNames((0, "CISCO-STP-EXTENSIONS-MIB", "stpxRootInconsistencyIndex"), (0, "CISCO-STP-EXTENSIONS-MIB", "stpxRootInconsistencyPortIndex"))
if mibBuilder.loadTexts: stpxRootInconsistencyEntry.setStatus('current')
stpxRootInconsistencyIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 5, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: stpxRootInconsistencyIndex.setStatus('current')
stpxRootInconsistencyPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 5, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)))
if mibBuilder.loadTexts: stpxRootInconsistencyPortIndex.setStatus('current')
stpxRootInconsistencyState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 5, 2, 1, 3), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxRootInconsistencyState.setStatus('current')
stpxSpanningTreeType = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 6, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("pvstPlus", 1), ("mistp", 2), ("mistpPvstPlus", 3), ("mst", 4), ("rapidPvstPlus", 5))).clone('pvstPlus')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxSpanningTreeType.setStatus('current')
stpxSpanningTreePathCostMode = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 6, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("short", 1), ("long", 2))).clone('short')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxSpanningTreePathCostMode.setStatus('current')
stpxLongStpPortPathCostTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 6, 3), )
if mibBuilder.loadTexts: stpxLongStpPortPathCostTable.setStatus('current')
stpxLongStpPortPathCostEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 6, 3, 1), )
dot1dStpPortEntry.registerAugmentions(("CISCO-STP-EXTENSIONS-MIB", "stpxLongStpPortPathCostEntry"))
stpxLongStpPortPathCostEntry.setIndexNames(*dot1dStpPortEntry.getIndexNames())
if mibBuilder.loadTexts: stpxLongStpPortPathCostEntry.setStatus('current')
stpxLongStpPortPathCost = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 6, 3, 1, 1), Unsigned32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxLongStpPortPathCost.setStatus('current')
stpxExtendedSysIDAdminEnabled = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 6, 4), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxExtendedSysIDAdminEnabled.setStatus('current')
stpxExtendedSysIDOperEnabled = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 6, 5), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxExtendedSysIDOperEnabled.setStatus('current')
stpxNotificationEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 6, 6), Bits().clone(namedValues=NamedValues(("newRoot", 0), ("topologyChange", 1), ("inconsistency", 2), ("rootInconsistency", 3), ("loopInconsistency", 4)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxNotificationEnable.setStatus('current')
stpxSpanningTreePathCostOperMode = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 6, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("short", 1), ("long", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxSpanningTreePathCostOperMode.setStatus('current')
stpxMISTPInstanceNumber = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 7, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 256))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxMISTPInstanceNumber.setStatus('current')
stpxMISTPInstanceTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 7, 2), )
if mibBuilder.loadTexts: stpxMISTPInstanceTable.setStatus('current')
stpxMISTPInstanceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 7, 2, 1), ).setIndexNames((0, "CISCO-STP-EXTENSIONS-MIB", "stpxMISTPInstanceIndex"))
if mibBuilder.loadTexts: stpxMISTPInstanceEntry.setStatus('current')
stpxMISTPInstanceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 7, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 256)))
if mibBuilder.loadTexts: stpxMISTPInstanceIndex.setStatus('current')
stpxMISTPInstanceEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 7, 2, 1, 2), TruthValue().clone('true')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxMISTPInstanceEnable.setStatus('current')
stpxMISTPInstanceVlansMapped = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 7, 2, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxMISTPInstanceVlansMapped.setStatus('current')
stpxMISTPInstanceVlansMapped2k = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 7, 2, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxMISTPInstanceVlansMapped2k.setStatus('current')
stpxMISTPInstanceVlansMapped3k = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 7, 2, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxMISTPInstanceVlansMapped3k.setStatus('current')
stpxMISTPInstanceVlansMapped4k = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 7, 2, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxMISTPInstanceVlansMapped4k.setStatus('current')
stpxVlanMISTPInstMapTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 7, 3), )
if mibBuilder.loadTexts: stpxVlanMISTPInstMapTable.setStatus('current')
stpxVlanMISTPInstMapEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 7, 3, 1), )
vtpVlanEntry.registerAugmentions(("CISCO-STP-EXTENSIONS-MIB", "stpxVlanMISTPInstMapEntry"))
stpxVlanMISTPInstMapEntry.setIndexNames(*vtpVlanEntry.getIndexNames())
if mibBuilder.loadTexts: stpxVlanMISTPInstMapEntry.setStatus('current')
stpxVlanMISTPInstMapInstIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 7, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 256))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxVlanMISTPInstMapInstIndex.setStatus('current')
stpxVlanMISTPInstMapEditTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 7, 4), )
if mibBuilder.loadTexts: stpxVlanMISTPInstMapEditTable.setStatus('current')
stpxVlanMISTPInstMapEditEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 7, 4, 1), )
vtpVlanEditEntry.registerAugmentions(("CISCO-STP-EXTENSIONS-MIB", "stpxVlanMISTPInstMapEditEntry"))
stpxVlanMISTPInstMapEditEntry.setIndexNames(*vtpVlanEditEntry.getIndexNames())
if mibBuilder.loadTexts: stpxVlanMISTPInstMapEditEntry.setStatus('current')
stpxVlanMISTPInstMapEditInstIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 7, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 256))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: stpxVlanMISTPInstMapEditInstIndex.setStatus('current')
stpxPreferredMISTPInstancesTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 7, 5), )
if mibBuilder.loadTexts: stpxPreferredMISTPInstancesTable.setStatus('current')
stpxPreferredMISTPInstancesEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 7, 5, 1), )
vlanTrunkPortEntry.registerAugmentions(("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredMISTPInstancesEntry"))
stpxPreferredMISTPInstancesEntry.setIndexNames(*vlanTrunkPortEntry.getIndexNames())
if mibBuilder.loadTexts: stpxPreferredMISTPInstancesEntry.setStatus('current')
stpxPreferredMISTPInstancesMap = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 7, 5, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxPreferredMISTPInstancesMap.setStatus('current')
stpxLoopGuardConfigTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 8, 1), )
if mibBuilder.loadTexts: stpxLoopGuardConfigTable.setStatus('current')
stpxLoopGuardConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 8, 1, 1), ).setIndexNames((0, "CISCO-STP-EXTENSIONS-MIB", "stpxLoopGuardConfigPortIndex"))
if mibBuilder.loadTexts: stpxLoopGuardConfigEntry.setStatus('current')
stpxLoopGuardConfigPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 8, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)))
if mibBuilder.loadTexts: stpxLoopGuardConfigPortIndex.setStatus('current')
stpxLoopGuardConfigEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 8, 1, 1, 2), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxLoopGuardConfigEnabled.setStatus('deprecated')
stpxLoopGuardConfigMode = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 8, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2), ("default", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxLoopGuardConfigMode.setStatus('current')
stpxLoopInconsistencyTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 8, 2), )
if mibBuilder.loadTexts: stpxLoopInconsistencyTable.setStatus('current')
stpxLoopInconsistencyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 8, 2, 1), ).setIndexNames((0, "CISCO-STP-EXTENSIONS-MIB", "stpxLoopInconsistencyIndex"), (0, "CISCO-STP-EXTENSIONS-MIB", "stpxLoopInconsistencyPortIndex"))
if mibBuilder.loadTexts: stpxLoopInconsistencyEntry.setStatus('current')
stpxLoopInconsistencyIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 8, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: stpxLoopInconsistencyIndex.setStatus('current')
stpxLoopInconsistencyPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 8, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)))
if mibBuilder.loadTexts: stpxLoopInconsistencyPortIndex.setStatus('current')
stpxLoopInconsistencyState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 8, 2, 1, 3), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxLoopInconsistencyState.setStatus('current')
stpxLoopGuardGlobalDefaultMode = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 8, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxLoopGuardGlobalDefaultMode.setStatus('current')
stpxFastStartBpduGuardEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 9, 1), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxFastStartBpduGuardEnable.setStatus('current')
stpxFastStartBpduFilterEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 9, 2), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxFastStartBpduFilterEnable.setStatus('current')
stpxFastStartPortTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 9, 3), )
if mibBuilder.loadTexts: stpxFastStartPortTable.setStatus('current')
stpxFastStartPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 9, 3, 1), ).setIndexNames((0, "CISCO-STP-EXTENSIONS-MIB", "stpxFastStartPortIndex"))
if mibBuilder.loadTexts: stpxFastStartPortEntry.setStatus('current')
stpxFastStartPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 9, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)))
if mibBuilder.loadTexts: stpxFastStartPortIndex.setStatus('current')
stpxFastStartPortEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 9, 3, 1, 2), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxFastStartPortEnable.setStatus('deprecated')
stpxFastStartPortMode = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 9, 3, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2), ("enableForTrunk", 3), ("default", 4), ("network", 5)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxFastStartPortMode.setStatus('current')
stpxFastStartPortBpduGuardMode = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 9, 3, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2), ("default", 3))).clone('default')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxFastStartPortBpduGuardMode.setStatus('current')
stpxFastStartPortBpduFilterMode = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 9, 3, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2), ("default", 3))).clone('default')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxFastStartPortBpduFilterMode.setStatus('current')
stpxFastStartGlobalDefaultMode = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 9, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2))).clone('disable')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxFastStartGlobalDefaultMode.setStatus('current')
stpxFastStartOperModeTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 9, 5), )
if mibBuilder.loadTexts: stpxFastStartOperModeTable.setStatus('current')
stpxFastStartOperModeEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 9, 5, 1), ).setIndexNames((0, "CISCO-STP-EXTENSIONS-MIB", "stpxFastStartOperModeInstIndex"), (0, "CISCO-STP-EXTENSIONS-MIB", "stpxFastStartOperModePortIndex"))
if mibBuilder.loadTexts: stpxFastStartOperModeEntry.setStatus('current')
stpxFastStartOperModeInstIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 9, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: stpxFastStartOperModeInstIndex.setStatus('current')
stpxFastStartOperModePortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 9, 5, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)))
if mibBuilder.loadTexts: stpxFastStartOperModePortIndex.setStatus('current')
stpxFastStartOperMode = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 9, 5, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxFastStartOperMode.setStatus('current')
stpxBpduSkewingDetectionEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 10, 1), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxBpduSkewingDetectionEnable.setStatus('current')
stpxBpduSkewingTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 10, 2), )
if mibBuilder.loadTexts: stpxBpduSkewingTable.setStatus('current')
stpxBpduSkewingEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 10, 2, 1), ).setIndexNames((0, "CISCO-STP-EXTENSIONS-MIB", "stpxBpduSkewingInstanceIndex"), (0, "CISCO-STP-EXTENSIONS-MIB", "stpxBpduSkewingPortIndex"))
if mibBuilder.loadTexts: stpxBpduSkewingEntry.setStatus('current')
stpxBpduSkewingInstanceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 10, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: stpxBpduSkewingInstanceIndex.setStatus('current')
stpxBpduSkewingPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 10, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)))
if mibBuilder.loadTexts: stpxBpduSkewingPortIndex.setStatus('current')
stpxBpduSkewingLastSkewDuration = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 10, 2, 1, 3), Unsigned32()).setUnits('milliseconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxBpduSkewingLastSkewDuration.setStatus('current')
stpxBpduSkewingWorstSkewDuration = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 10, 2, 1, 4), Unsigned32()).setUnits('milliseconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxBpduSkewingWorstSkewDuration.setStatus('current')
stpxBpduSkewingWorstSkewTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 10, 2, 1, 5), TimeStamp()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxBpduSkewingWorstSkewTime.setStatus('current')
stpxMSTMaxInstanceNumber = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 256))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxMSTMaxInstanceNumber.setStatus('deprecated')
stpxMSTRegionName = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxMSTRegionName.setStatus('current')
stpxMSTRegionRevision = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxMSTRegionRevision.setStatus('deprecated')
stpxMSTInstanceTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 4), )
if mibBuilder.loadTexts: stpxMSTInstanceTable.setStatus('deprecated')
stpxMSTInstanceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 4, 1), ).setIndexNames((0, "CISCO-STP-EXTENSIONS-MIB", "stpxMSTInstanceIndex"))
if mibBuilder.loadTexts: stpxMSTInstanceEntry.setStatus('deprecated')
stpxMSTInstanceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 256)))
if mibBuilder.loadTexts: stpxMSTInstanceIndex.setStatus('deprecated')
stpxMSTInstanceVlansMapped = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 4, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxMSTInstanceVlansMapped.setStatus('deprecated')
stpxMSTInstanceVlansMapped2k = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 4, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxMSTInstanceVlansMapped2k.setStatus('deprecated')
stpxMSTInstanceVlansMapped3k = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 4, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxMSTInstanceVlansMapped3k.setStatus('deprecated')
stpxMSTInstanceVlansMapped4k = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 4, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxMSTInstanceVlansMapped4k.setStatus('deprecated')
stpxMSTInstanceRemainingHopCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 4, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 40))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxMSTInstanceRemainingHopCount.setStatus('deprecated')
stpxMSTRegionEditBufferStatus = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("released", 1), ("acquiredBySnmp", 2), ("acquiredByNonSnmp", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxMSTRegionEditBufferStatus.setStatus('current')
stpxMSTRegionEditBufferOperation = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("acquire", 2), ("releaseWithForce", 3), ("commit", 4), ("rollBack", 5)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxMSTRegionEditBufferOperation.setStatus('current')
stpxMSTRegionEditName = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxMSTRegionEditName.setStatus('current')
stpxMSTRegionEditRevision = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxMSTRegionEditRevision.setStatus('deprecated')
stpxMSTInstanceEditTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 9), )
if mibBuilder.loadTexts: stpxMSTInstanceEditTable.setStatus('deprecated')
stpxMSTInstanceEditEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 9, 1), ).setIndexNames((0, "CISCO-STP-EXTENSIONS-MIB", "stpxMSTInstanceEditIndex"))
if mibBuilder.loadTexts: stpxMSTInstanceEditEntry.setStatus('deprecated')
stpxMSTInstanceEditIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 9, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 256)))
if mibBuilder.loadTexts: stpxMSTInstanceEditIndex.setStatus('deprecated')
stpxMSTInstanceEditVlansMap = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 9, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxMSTInstanceEditVlansMap.setStatus('deprecated')
stpxMSTInstanceEditVlansMap2k = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 9, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxMSTInstanceEditVlansMap2k.setStatus('deprecated')
stpxMSTInstanceEditVlansMap3k = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 9, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxMSTInstanceEditVlansMap3k.setStatus('deprecated')
stpxMSTInstanceEditVlansMap4k = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 9, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxMSTInstanceEditVlansMap4k.setStatus('deprecated')
stpxPreferredMSTInstancesTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 10), )
if mibBuilder.loadTexts: stpxPreferredMSTInstancesTable.setStatus('deprecated')
stpxPreferredMSTInstancesEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 10, 1), )
vlanTrunkPortEntry.registerAugmentions(("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredMSTInstancesEntry"))
stpxPreferredMSTInstancesEntry.setIndexNames(*vlanTrunkPortEntry.getIndexNames())
if mibBuilder.loadTexts: stpxPreferredMSTInstancesEntry.setStatus('deprecated')
stpxPreferredMSTInstancesMap = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 10, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxPreferredMSTInstancesMap.setStatus('deprecated')
stpxMSTPortTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 11), )
if mibBuilder.loadTexts: stpxMSTPortTable.setStatus('deprecated')
stpxMSTPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 11, 1), ).setIndexNames((0, "CISCO-STP-EXTENSIONS-MIB", "stpxMSTPortIndex"))
if mibBuilder.loadTexts: stpxMSTPortEntry.setStatus('deprecated')
stpxMSTPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 11, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)))
if mibBuilder.loadTexts: stpxMSTPortIndex.setStatus('deprecated')
stpxMSTPortAdminLinkType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 11, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("pointToPoint", 1), ("shared", 2), ("auto", 3))).clone('auto')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxMSTPortAdminLinkType.setStatus('deprecated')
stpxMSTPortOperLinkType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 11, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("pointToPoint", 1), ("shared", 2), ("other", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxMSTPortOperLinkType.setStatus('deprecated')
stpxMSTPortProtocolMigration = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 11, 1, 4), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxMSTPortProtocolMigration.setStatus('deprecated')
stpxMSTPortStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 11, 1, 5), Bits().clone(namedValues=NamedValues(("edge", 0), ("boundary", 1), ("pvst", 2), ("stp", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxMSTPortStatus.setStatus('deprecated')
stpxMSTPortRoleTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 12), )
if mibBuilder.loadTexts: stpxMSTPortRoleTable.setStatus('deprecated')
stpxMSTPortRoleEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 12, 1), ).setIndexNames((0, "CISCO-STP-EXTENSIONS-MIB", "stpxMSTPortRoleInstanceIndex"), (0, "CISCO-STP-EXTENSIONS-MIB", "stpxMSTPortRolePortIndex"))
if mibBuilder.loadTexts: stpxMSTPortRoleEntry.setStatus('deprecated')
stpxMSTPortRoleInstanceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 12, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 256)))
if mibBuilder.loadTexts: stpxMSTPortRoleInstanceIndex.setStatus('deprecated')
stpxMSTPortRolePortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 12, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)))
if mibBuilder.loadTexts: stpxMSTPortRolePortIndex.setStatus('deprecated')
stpxMSTPortRoleValue = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 12, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("disabled", 1), ("root", 2), ("designated", 3), ("alternate", 4), ("backUp", 5), ("boundary", 6), ("master", 7)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxMSTPortRoleValue.setStatus('deprecated')
stpxMSTMaxHopCount = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 11, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 40)).clone(20)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxMSTMaxHopCount.setStatus('deprecated')
stpxRSTPPortTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 12, 1), )
if mibBuilder.loadTexts: stpxRSTPPortTable.setStatus('current')
stpxRSTPPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 12, 1, 1), ).setIndexNames((0, "CISCO-STP-EXTENSIONS-MIB", "stpxRSTPPortIndex"))
if mibBuilder.loadTexts: stpxRSTPPortEntry.setStatus('current')
stpxRSTPPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 12, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)))
if mibBuilder.loadTexts: stpxRSTPPortIndex.setStatus('current')
stpxRSTPPortAdminLinkType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 12, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("pointToPoint", 1), ("shared", 2), ("auto", 3))).clone('auto')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxRSTPPortAdminLinkType.setStatus('current')
stpxRSTPPortOperLinkType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 12, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("pointToPoint", 1), ("shared", 2), ("other", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxRSTPPortOperLinkType.setStatus('current')
stpxRSTPPortProtocolMigration = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 12, 1, 1, 4), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxRSTPPortProtocolMigration.setStatus('current')
stpxRSTPPortRoleTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 12, 2), )
if mibBuilder.loadTexts: stpxRSTPPortRoleTable.setStatus('current')
stpxRSTPPortRoleEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 12, 2, 1), ).setIndexNames((0, "CISCO-STP-EXTENSIONS-MIB", "stpxRSTPPortRoleInstanceIndex"), (0, "CISCO-STP-EXTENSIONS-MIB", "stpxRSTPPortRolePortIndex"))
if mibBuilder.loadTexts: stpxRSTPPortRoleEntry.setStatus('current')
stpxRSTPPortRoleInstanceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 12, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095)))
if mibBuilder.loadTexts: stpxRSTPPortRoleInstanceIndex.setStatus('current')
stpxRSTPPortRolePortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 12, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)))
if mibBuilder.loadTexts: stpxRSTPPortRolePortIndex.setStatus('current')
stpxRSTPPortRoleValue = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 12, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("disabled", 1), ("root", 2), ("designated", 3), ("alternate", 4), ("backUp", 5), ("boundary", 6), ("master", 7)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxRSTPPortRoleValue.setStatus('current')
stpxRSTPTransmitHoldCount = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 12, 3), Unsigned32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxRSTPTransmitHoldCount.setStatus('current')
stpxRPVSTPortTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 13, 1), )
if mibBuilder.loadTexts: stpxRPVSTPortTable.setStatus('current')
stpxRPVSTPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 13, 1, 1), ).setIndexNames((0, "CISCO-STP-EXTENSIONS-MIB", "stpxRPVSTPortVlanIndex"), (0, "CISCO-STP-EXTENSIONS-MIB", "stpxRPVSTPortIndex"))
if mibBuilder.loadTexts: stpxRPVSTPortEntry.setStatus('current')
stpxRPVSTPortVlanIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 13, 1, 1, 1), VlanIndex())
if mibBuilder.loadTexts: stpxRPVSTPortVlanIndex.setStatus('current')
stpxRPVSTPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 13, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)))
if mibBuilder.loadTexts: stpxRPVSTPortIndex.setStatus('current')
stpxRPVSTPortStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 13, 1, 1, 3), Bits().clone(namedValues=NamedValues(("edge", 0), ("unused1", 1), ("unused2", 2), ("stp", 3), ("dispute", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxRPVSTPortStatus.setStatus('current')
stpxSMSTMaxInstances = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 1), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxSMSTMaxInstances.setStatus('current')
stpxSMSTMaxInstanceID = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxSMSTMaxInstanceID.setStatus('current')
stpxSMSTRegionRevision = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxSMSTRegionRevision.setStatus('current')
stpxSMSTRegionEditRevision = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 4), Unsigned32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxSMSTRegionEditRevision.setStatus('current')
stpxSMSTInstanceTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 5), )
if mibBuilder.loadTexts: stpxSMSTInstanceTable.setStatus('current')
stpxSMSTInstanceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 5, 1), ).setIndexNames((0, "CISCO-STP-EXTENSIONS-MIB", "stpxSMSTInstanceIndex"))
if mibBuilder.loadTexts: stpxSMSTInstanceEntry.setStatus('current')
stpxSMSTInstanceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 5, 1, 1), Unsigned32())
if mibBuilder.loadTexts: stpxSMSTInstanceIndex.setStatus('current')
stpxSMSTInstanceVlansMapped1k2k = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 5, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 256))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxSMSTInstanceVlansMapped1k2k.setStatus('current')
stpxSMSTInstanceVlansMapped3k4k = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 5, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 256))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxSMSTInstanceVlansMapped3k4k.setStatus('current')
stpxSMSTInstanceRemainingHopCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 5, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxSMSTInstanceRemainingHopCount.setStatus('current')
stpxSMSTInstanceCISTRegionalRoot = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 5, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(8, 8)).setFixedLength(8)).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxSMSTInstanceCISTRegionalRoot.setStatus('current')
stpxSMSTInstanceCISTIntRootCost = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 5, 1, 6), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxSMSTInstanceCISTIntRootCost.setStatus('current')
stpxSMSTInstanceEditTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 6), )
if mibBuilder.loadTexts: stpxSMSTInstanceEditTable.setStatus('current')
stpxSMSTInstanceEditEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 6, 1), ).setIndexNames((0, "CISCO-STP-EXTENSIONS-MIB", "stpxSMSTInstanceEditIndex"))
if mibBuilder.loadTexts: stpxSMSTInstanceEditEntry.setStatus('current')
stpxSMSTInstanceEditIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 6, 1, 1), Unsigned32())
if mibBuilder.loadTexts: stpxSMSTInstanceEditIndex.setStatus('current')
stpxSMSTInstanceEditVlansMap1k2k = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 6, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 256))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: stpxSMSTInstanceEditVlansMap1k2k.setStatus('current')
stpxSMSTInstanceEditVlansMap3k4k = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 6, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 256))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: stpxSMSTInstanceEditVlansMap3k4k.setStatus('current')
stpxSMSTInstanceEditRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 6, 1, 4), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: stpxSMSTInstanceEditRowStatus.setStatus('current')
stpxSMSTPortTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 7), )
if mibBuilder.loadTexts: stpxSMSTPortTable.setStatus('current')
stpxSMSTPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 7, 1), ).setIndexNames((0, "CISCO-STP-EXTENSIONS-MIB", "stpxSMSTPortIndex"))
if mibBuilder.loadTexts: stpxSMSTPortEntry.setStatus('current')
stpxSMSTPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 7, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)))
if mibBuilder.loadTexts: stpxSMSTPortIndex.setStatus('current')
stpxSMSTPortStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 7, 1, 2), Bits().clone(namedValues=NamedValues(("edge", 0), ("boundary", 1), ("pvst", 2), ("stp", 3), ("dispute", 4), ("rstp", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxSMSTPortStatus.setStatus('current')
stpxSMSTPortAdminHelloTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 7, 1, 3), Unsigned32()).setUnits('hundredth of seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxSMSTPortAdminHelloTime.setStatus('current')
stpxSMSTPortConfigedHelloTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 7, 1, 4), Unsigned32()).setUnits('hundredth of seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxSMSTPortConfigedHelloTime.setStatus('current')
stpxSMSTPortOperHelloTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 7, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 2147483647))).setUnits('hundredth of seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxSMSTPortOperHelloTime.setStatus('current')
stpxSMSTPortAdminMSTMode = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 7, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("preStandard", 1), ("auto", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxSMSTPortAdminMSTMode.setStatus('current')
stpxSMSTPortOperMSTMode = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 7, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unknown", 1), ("preStandard", 2), ("standard", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxSMSTPortOperMSTMode.setStatus('current')
stpxSMSTMaxHopCount = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 8), Unsigned32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stpxSMSTMaxHopCount.setStatus('current')
stpxSMSTConfigDigest = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 9), StpxMSTConfigurationDigest()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxSMSTConfigDigest.setStatus('current')
stpxSMSTConfigPreStandardDigest = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 82, 1, 14, 10), StpxMSTConfigurationDigest()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stpxSMSTConfigPreStandardDigest.setStatus('current')
stpxNotificationsPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 82, 2, 0))
stpxInconsistencyUpdate = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 82, 2, 0, 1)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxInconsistentState"))
if mibBuilder.loadTexts: stpxInconsistencyUpdate.setStatus('current')
stpxRootInconsistencyUpdate = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 82, 2, 0, 2)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxRootInconsistencyState"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSpanningTreeType"))
if mibBuilder.loadTexts: stpxRootInconsistencyUpdate.setStatus('current')
stpxLoopInconsistencyUpdate = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 82, 2, 0, 3)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxLoopInconsistencyState"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSpanningTreeType"))
if mibBuilder.loadTexts: stpxLoopInconsistencyUpdate.setStatus('current')
stpxMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 82, 3))
stpxMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 1))
stpxMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2))
stpxMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 1, 1)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredVlansGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxNotificationsGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxMIBCompliance = stpxMIBCompliance.setStatus('deprecated')
stpxMIBCompliance2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 1, 2)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredVlansGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxMIBCompliance2 = stpxMIBCompliance2.setStatus('deprecated')
stpxMIBCompliance3 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 1, 3)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredVlansGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRootGuardGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRootInconsistencyNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpx4kVlanGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSpanningTreeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxMIBCompliance3 = stpxMIBCompliance3.setStatus('deprecated')
stpxMIBCompliance4 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 1, 4)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredVlansGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRootGuardGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRootInconsistencyNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpx4kVlanGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSpanningTreeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLongPathCostModeGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxMIBCompliance4 = stpxMIBCompliance4.setStatus('deprecated')
stpxMIBCompliance5 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 1, 5)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredVlansGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRootGuardGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRootInconsistencyNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpx4kVlanGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSpanningTreeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLongPathCostModeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPVSTVlanGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLoopGuardGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLoopInconsistencyNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxMIBCompliance5 = stpxMIBCompliance5.setStatus('deprecated')
stpxMIBCompliance6 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 1, 6)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSstpGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredVlansGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRootGuardGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRootInconsistencyNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpx4kVlanGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSpanningTreeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLongPathCostModeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPVSTVlanGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLoopInconsistencyNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBpduSkewingGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLoopGuardGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredMSTInstancesGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxMIBCompliance6 = stpxMIBCompliance6.setStatus('deprecated')
stpxMIBCompliance7 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 1, 7)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSstpGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredVlansGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRootGuardGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRootInconsistencyNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpx4kVlanGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSpanningTreeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLongPathCostModeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPVSTVlanGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLoopInconsistencyNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBpduSkewingGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLoopGuardGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredMSTInstancesGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartGroup3"), ("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRSTPGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRPVSTGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxMIBCompliance7 = stpxMIBCompliance7.setStatus('deprecated')
stpxMIBCompliance8 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 1, 8)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSstpGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredVlansGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRootGuardGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRootInconsistencyNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpx4kVlanGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSpanningTreeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLongPathCostModeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPVSTVlanGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLoopInconsistencyNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBpduSkewingGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLoopGuardGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredMSTInstancesGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartGroup3"), ("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRSTPGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRPVSTGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxExtendedSysIDGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxNotificationEnableGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartOperModeGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxMIBCompliance8 = stpxMIBCompliance8.setStatus('deprecated')
stpxMIBCompliance9 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 1, 9)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSstpGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredVlansGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRootGuardGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRootInconsistencyNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpx4kVlanGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSpanningTreeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLongPathCostModeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPVSTVlanGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLoopInconsistencyNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBpduSkewingGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLoopGuardGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartGroup3"), ("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRSTPGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRPVSTGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxExtendedSysIDGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxNotificationEnableGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartOperModeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTGroup3"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTInstanceGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTInstanceEditGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTPortStatusGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTPortHelloTimeGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxMIBCompliance9 = stpxMIBCompliance9.setStatus('deprecated')
stpxMIBCompliance10 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 1, 10)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSstpGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredVlansGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRootGuardGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRootInconsistencyNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpx4kVlanGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSpanningTreeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLongPathCostModeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPVSTVlanGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLoopInconsistencyNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBpduSkewingGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLoopGuardGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartGroup3"), ("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRSTPGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRPVSTGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxExtendedSysIDGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxNotificationEnableGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartOperModeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTGroup3"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTInstanceGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTInstanceEditGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTPortStatusGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTPortHelloTimeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTInstanceCISTGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxMIBCompliance10 = stpxMIBCompliance10.setStatus('deprecated')
stpxMIBCompliance11 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 1, 11)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSstpGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredVlansGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRootGuardGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRootInconsistencyNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpx4kVlanGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSpanningTreeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLongPathCostModeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPVSTVlanGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLoopInconsistencyNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBpduSkewingGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLoopGuardGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartGroup3"), ("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRSTPGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRPVSTGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxExtendedSysIDGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxNotificationEnableGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartOperModeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTGroup3"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTInstanceGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTInstanceEditGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTPortStatusGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTPortHelloTimeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTInstanceCISTGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPathCostOperModeGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxMIBCompliance11 = stpxMIBCompliance11.setStatus('deprecated')
stpxMIBCompliance12 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 1, 12)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSstpGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredVlansGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRootGuardGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRootInconsistencyNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpx4kVlanGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSpanningTreeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLongPathCostModeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPVSTVlanGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLoopInconsistencyNotificationsGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBpduSkewingGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLoopGuardGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartGroup3"), ("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneGroup2"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRSTPGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRSTPTransmitHoldCountGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRPVSTGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxExtendedSysIDGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxNotificationEnableGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartOperModeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTGroup4"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTMaxHopCountGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTInstanceGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTInstanceEditGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTPortStatusGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTPortHelloTimeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTInstanceCISTGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPathCostOperModeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTPortMSTModeGroup"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTConfigDigestGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxMIBCompliance12 = stpxMIBCompliance12.setStatus('current')
stpxUplinkGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 1)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkFastEnabled"), ("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkFastTransitions"), ("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkStationLearningGenRate"), ("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkStationLearningFrames"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxUplinkGroup = stpxUplinkGroup.setStatus('current')
stpxPreferredVlansGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 2)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredVlansMap"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxPreferredVlansGroup = stpxPreferredVlansGroup.setStatus('current')
stpxSstpGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 3)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxInconsistentState"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxSstpGroup = stpxSstpGroup.setStatus('current')
stpxNotificationsGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 4)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxInconsistencyUpdate"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxNotificationsGroup = stpxNotificationsGroup.setStatus('current')
stpxBackboneGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 5)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneFastEnabled"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneFastInInferiorBPDUs"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneFastInRLQRequestPDUs"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneFastInRLQResponsePDUs"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneFastOutRLQRequestPDUs"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneFastOutRLQResponsePDUs"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxBackboneGroup = stpxBackboneGroup.setStatus('current')
stpxRootGuardGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 6)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxRootGuardConfigEnabled"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRootInconsistencyState"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxRootGuardGroup = stpxRootGuardGroup.setStatus('current')
stpxRootInconsistencyNotificationsGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 7)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxRootInconsistencyUpdate"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxRootInconsistencyNotificationsGroup = stpxRootInconsistencyNotificationsGroup.setStatus('current')
stpx4kVlanGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 8)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredVlansMap2k"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredVlansMap3k"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredVlansMap4k"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpx4kVlanGroup = stpx4kVlanGroup.setStatus('current')
stpxSpanningTreeGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 9)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxSpanningTreeType"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxSpanningTreeGroup = stpxSpanningTreeGroup.setStatus('current')
stpxMISTPGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 10)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPInstanceNumber"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPInstanceEnable"), ("CISCO-STP-EXTENSIONS-MIB", "stpxVlanMISTPInstMapInstIndex"), ("CISCO-STP-EXTENSIONS-MIB", "stpxVlanMISTPInstMapEditInstIndex"), ("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredMISTPInstancesMap"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxMISTPGroup = stpxMISTPGroup.setStatus('current')
stpxLongPathCostModeGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 11)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxSpanningTreePathCostMode"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLongStpPortPathCost"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxLongPathCostModeGroup = stpxLongPathCostModeGroup.setStatus('current')
stpxPVSTVlanGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 12)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxPVSTVlanEnable"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxPVSTVlanGroup = stpxPVSTVlanGroup.setStatus('current')
stpxMISTPGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 13)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPInstanceVlansMapped"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPInstanceVlansMapped2k"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPInstanceVlansMapped3k"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMISTPInstanceVlansMapped4k"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxMISTPGroup2 = stpxMISTPGroup2.setStatus('current')
stpxLoopGuardGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 14)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxLoopGuardConfigEnabled"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLoopInconsistencyState"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxLoopGuardGroup = stpxLoopGuardGroup.setStatus('deprecated')
stpxLoopInconsistencyNotificationsGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 15)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxLoopInconsistencyUpdate"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxLoopInconsistencyNotificationsGroup = stpxLoopInconsistencyNotificationsGroup.setStatus('current')
stpxFastStartGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 16)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartBpduGuardEnable"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartBpduFilterEnable"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartPortEnable"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxFastStartGroup = stpxFastStartGroup.setStatus('deprecated')
stpxBpduSkewingGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 17)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxBpduSkewingDetectionEnable"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBpduSkewingLastSkewDuration"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBpduSkewingWorstSkewDuration"), ("CISCO-STP-EXTENSIONS-MIB", "stpxBpduSkewingWorstSkewTime"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxBpduSkewingGroup = stpxBpduSkewingGroup.setStatus('current')
stpxFastStartGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 18)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartBpduGuardEnable"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartBpduFilterEnable"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartPortMode"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartGlobalDefaultMode"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxFastStartGroup2 = stpxFastStartGroup2.setStatus('current')
stpxLoopGuardGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 19)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxLoopInconsistencyState"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLoopGuardConfigMode"), ("CISCO-STP-EXTENSIONS-MIB", "stpxLoopGuardGlobalDefaultMode"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxLoopGuardGroup2 = stpxLoopGuardGroup2.setStatus('current')
stpxMSTGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 20)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxMSTMaxInstanceNumber"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTRegionName"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTRegionRevision"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTInstanceVlansMapped"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTInstanceVlansMapped2k"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTInstanceVlansMapped3k"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTInstanceVlansMapped4k"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTInstanceRemainingHopCount"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTRegionEditBufferStatus"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTRegionEditBufferOperation"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTRegionEditName"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTRegionEditRevision"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTInstanceEditVlansMap"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTInstanceEditVlansMap2k"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTInstanceEditVlansMap3k"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTInstanceEditVlansMap4k"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTPortAdminLinkType"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTPortOperLinkType"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTPortProtocolMigration"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTPortStatus"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTPortRoleValue"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTMaxHopCount"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxMSTGroup = stpxMSTGroup.setStatus('deprecated')
stpxPreferredMSTInstancesGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 21)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxPreferredMSTInstancesMap"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxPreferredMSTInstancesGroup = stpxPreferredMSTInstancesGroup.setStatus('deprecated')
stpxFastStartGroup3 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 22)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartPortBpduGuardMode"), ("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartPortBpduFilterMode"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxFastStartGroup3 = stpxFastStartGroup3.setStatus('current')
stpxUplinkGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 23)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxUplinkFastOperEnabled"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxUplinkGroup2 = stpxUplinkGroup2.setStatus('current')
stpxBackboneGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 24)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxBackboneFastOperEnabled"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxBackboneGroup2 = stpxBackboneGroup2.setStatus('current')
stpxMSTGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 25)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxMSTMaxInstanceNumber"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTRegionName"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTRegionRevision"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTInstanceVlansMapped"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTInstanceVlansMapped2k"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTInstanceVlansMapped3k"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTInstanceVlansMapped4k"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTInstanceRemainingHopCount"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTRegionEditBufferStatus"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTRegionEditBufferOperation"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTRegionEditName"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTRegionEditRevision"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTInstanceEditVlansMap"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTInstanceEditVlansMap2k"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTInstanceEditVlansMap3k"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTInstanceEditVlansMap4k"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTPortStatus"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTMaxHopCount"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxMSTGroup2 = stpxMSTGroup2.setStatus('deprecated')
stpxRSTPGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 26)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxRSTPPortAdminLinkType"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRSTPPortOperLinkType"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRSTPPortProtocolMigration"), ("CISCO-STP-EXTENSIONS-MIB", "stpxRSTPPortRoleValue"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxRSTPGroup = stpxRSTPGroup.setStatus('current')
stpxRPVSTGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 27)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxRPVSTPortStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxRPVSTGroup = stpxRPVSTGroup.setStatus('current')
stpxExtendedSysIDGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 28)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxExtendedSysIDAdminEnabled"), ("CISCO-STP-EXTENSIONS-MIB", "stpxExtendedSysIDOperEnabled"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxExtendedSysIDGroup = stpxExtendedSysIDGroup.setStatus('current')
stpxNotificationEnableGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 29)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxNotificationEnable"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxNotificationEnableGroup = stpxNotificationEnableGroup.setStatus('current')
stpxFastStartOperModeGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 30)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxFastStartOperMode"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxFastStartOperModeGroup = stpxFastStartOperModeGroup.setStatus('current')
stpxMSTGroup3 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 31)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxMSTRegionName"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTRegionEditBufferStatus"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTRegionEditBufferOperation"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTRegionEditName"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTMaxHopCount"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxMSTGroup3 = stpxMSTGroup3.setStatus('deprecated')
stpxSMSTGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 32)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTMaxInstances"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTMaxInstanceID"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTRegionRevision"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTRegionEditRevision"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxSMSTGroup = stpxSMSTGroup.setStatus('current')
stpxSMSTInstanceGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 33)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTInstanceVlansMapped1k2k"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTInstanceVlansMapped3k4k"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTInstanceRemainingHopCount"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxSMSTInstanceGroup = stpxSMSTInstanceGroup.setStatus('current')
stpxSMSTInstanceEditGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 34)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTInstanceEditVlansMap1k2k"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTInstanceEditVlansMap3k4k"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTInstanceEditRowStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxSMSTInstanceEditGroup = stpxSMSTInstanceEditGroup.setStatus('current')
stpxSMSTPortStatusGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 35)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTPortStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxSMSTPortStatusGroup = stpxSMSTPortStatusGroup.setStatus('current')
stpxSMSTPortHelloTimeGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 36)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTPortAdminHelloTime"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTPortConfigedHelloTime"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTPortOperHelloTime"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxSMSTPortHelloTimeGroup = stpxSMSTPortHelloTimeGroup.setStatus('current')
stpxSMSTInstanceCISTGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 37)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTInstanceCISTRegionalRoot"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTInstanceCISTIntRootCost"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxSMSTInstanceCISTGroup = stpxSMSTInstanceCISTGroup.setStatus('current')
stpxPathCostOperModeGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 38)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxSpanningTreePathCostOperMode"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxPathCostOperModeGroup = stpxPathCostOperModeGroup.setStatus('current')
stpxRSTPTransmitHoldCountGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 39)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxRSTPTransmitHoldCount"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxRSTPTransmitHoldCountGroup = stpxRSTPTransmitHoldCountGroup.setStatus('current')
stpxSMSTPortMSTModeGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 40)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTPortAdminMSTMode"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTPortOperMSTMode"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxSMSTPortMSTModeGroup = stpxSMSTPortMSTModeGroup.setStatus('current')
stpxSMSTMaxHopCountGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 41)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTMaxHopCount"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxSMSTMaxHopCountGroup = stpxSMSTMaxHopCountGroup.setStatus('current')
stpxSMSTConfigDigestGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 42)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTConfigDigest"), ("CISCO-STP-EXTENSIONS-MIB", "stpxSMSTConfigPreStandardDigest"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxSMSTConfigDigestGroup = stpxSMSTConfigDigestGroup.setStatus('current')
stpxMSTGroup4 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 82, 3, 2, 43)).setObjects(("CISCO-STP-EXTENSIONS-MIB", "stpxMSTRegionName"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTRegionEditBufferStatus"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTRegionEditBufferOperation"), ("CISCO-STP-EXTENSIONS-MIB", "stpxMSTRegionEditName"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
stpxMSTGroup4 = stpxMSTGroup4.setStatus('current')
mibBuilder.exportSymbols("CISCO-STP-EXTENSIONS-MIB", stpxMIBCompliance2=stpxMIBCompliance2, stpxBackboneFastInRLQRequestPDUs=stpxBackboneFastInRLQRequestPDUs, stpxFastStartOperModeInstIndex=stpxFastStartOperModeInstIndex, stpxPathCostOperModeGroup=stpxPathCostOperModeGroup, stpxRootGuardConfigEntry=stpxRootGuardConfigEntry, stpxSMSTInstanceEditVlansMap3k4k=stpxSMSTInstanceEditVlansMap3k4k, stpxSMSTConfigDigest=stpxSMSTConfigDigest, stpxFastStartGroup3=stpxFastStartGroup3, stpxVlanMISTPInstMapTable=stpxVlanMISTPInstMapTable, stpxFastStartPortMode=stpxFastStartPortMode, stpxRSTPPortIndex=stpxRSTPPortIndex, stpxSpanningTreeGroup=stpxSpanningTreeGroup, stpxSMSTInstanceEditTable=stpxSMSTInstanceEditTable, PYSNMP_MODULE_ID=ciscoStpExtensionsMIB, stpxPreferredVlansMap4k=stpxPreferredVlansMap4k, stpxUplinkFastTransitions=stpxUplinkFastTransitions, stpxRSTPPortRolePortIndex=stpxRSTPPortRolePortIndex, stpxSMSTInstanceCISTGroup=stpxSMSTInstanceCISTGroup, stpxRSTPPortEntry=stpxRSTPPortEntry, stpxFastStartGroup=stpxFastStartGroup, stpxFastStartOperMode=stpxFastStartOperMode, stpxMIBCompliance8=stpxMIBCompliance8, stpxBackboneFastInInferiorBPDUs=stpxBackboneFastInInferiorBPDUs, stpxBpduSkewingWorstSkewTime=stpxBpduSkewingWorstSkewTime, stpxSstpGroup=stpxSstpGroup, stpxPreferredMSTInstancesMap=stpxPreferredMSTInstancesMap, stpxSMSTPortAdminMSTMode=stpxSMSTPortAdminMSTMode, stpxRootInconsistencyUpdate=stpxRootInconsistencyUpdate, stpxPreferredVlansEntry=stpxPreferredVlansEntry, stpxBpduSkewingWorstSkewDuration=stpxBpduSkewingWorstSkewDuration, stpxRSTPPortProtocolMigration=stpxRSTPPortProtocolMigration, stpxPreferredVlansMap3k=stpxPreferredVlansMap3k, stpxMSTGroup4=stpxMSTGroup4, stpxMSTPortRoleTable=stpxMSTPortRoleTable, stpxLoopGuardConfigEnabled=stpxLoopGuardConfigEnabled, stpxFastStartPortIndex=stpxFastStartPortIndex, stpxVlanMISTPInstMapEditEntry=stpxVlanMISTPInstMapEditEntry, stpxRootInconsistencyPortIndex=stpxRootInconsistencyPortIndex, stpxMSTInstanceVlansMapped3k=stpxMSTInstanceVlansMapped3k, stpxFastStartGroup2=stpxFastStartGroup2, stpxUplinkFastEnabled=stpxUplinkFastEnabled, stpxRootInconsistencyIndex=stpxRootInconsistencyIndex, stpxMSTPortAdminLinkType=stpxMSTPortAdminLinkType, stpxMSTPortRoleInstanceIndex=stpxMSTPortRoleInstanceIndex, stpxSMSTMaxHopCountGroup=stpxSMSTMaxHopCountGroup, stpxRootGuardObjects=stpxRootGuardObjects, stpxLoopGuardGlobalDefaultMode=stpxLoopGuardGlobalDefaultMode, stpxMSTInstanceEditVlansMap2k=stpxMSTInstanceEditVlansMap2k, stpxObjects=stpxObjects, stpxSMSTPortConfigedHelloTime=stpxSMSTPortConfigedHelloTime, stpxMSTInstanceTable=stpxMSTInstanceTable, stpxMSTRegionEditBufferOperation=stpxMSTRegionEditBufferOperation, stpxMSTPortProtocolMigration=stpxMSTPortProtocolMigration, stpxMSTRegionEditRevision=stpxMSTRegionEditRevision, stpxSMSTObjects=stpxSMSTObjects, stpxMISTPInstanceVlansMapped3k=stpxMISTPInstanceVlansMapped3k, stpxRootGuardGroup=stpxRootGuardGroup, stpxMIBCompliances=stpxMIBCompliances, stpxUplinkStationLearningGenRate=stpxUplinkStationLearningGenRate, stpxSMSTInstanceRemainingHopCount=stpxSMSTInstanceRemainingHopCount, stpxBackboneFastEnabled=stpxBackboneFastEnabled, stpxMSTInstanceEditEntry=stpxMSTInstanceEditEntry, stpxSMSTPortOperHelloTime=stpxSMSTPortOperHelloTime, stpxMSTGroup2=stpxMSTGroup2, stpxVlanMISTPInstMapInstIndex=stpxVlanMISTPInstMapInstIndex, stpxSMSTPortIndex=stpxSMSTPortIndex, stpxFastStartObjects=stpxFastStartObjects, stpxRPVSTPortEntry=stpxRPVSTPortEntry, stpxInconsistencyObjects=stpxInconsistencyObjects, stpxUplinkStationLearningFrames=stpxUplinkStationLearningFrames, stpxNotificationEnableGroup=stpxNotificationEnableGroup, stpxBackboneFastOperEnabled=stpxBackboneFastOperEnabled, stpxLongStpPortPathCostEntry=stpxLongStpPortPathCostEntry, stpxMISTPInstanceEntry=stpxMISTPInstanceEntry, stpxMSTPortRoleValue=stpxMSTPortRoleValue, stpxMISTPGroup=stpxMISTPGroup, stpxRootGuardConfigTable=stpxRootGuardConfigTable, stpxMISTPInstanceVlansMapped=stpxMISTPInstanceVlansMapped, stpxMSTInstanceEntry=stpxMSTInstanceEntry, stpxMSTInstanceVlansMapped=stpxMSTInstanceVlansMapped, stpxSMSTInstanceVlansMapped1k2k=stpxSMSTInstanceVlansMapped1k2k, stpxPortIndex=stpxPortIndex, stpxRootGuardConfigPortIndex=stpxRootGuardConfigPortIndex, stpxLoopGuardConfigMode=stpxLoopGuardConfigMode, stpxSMSTInstanceCISTRegionalRoot=stpxSMSTInstanceCISTRegionalRoot, stpxSMSTPortEntry=stpxSMSTPortEntry, stpxSMSTPortStatus=stpxSMSTPortStatus, stpxSMSTMaxHopCount=stpxSMSTMaxHopCount, stpxLoopInconsistencyNotificationsGroup=stpxLoopInconsistencyNotificationsGroup, stpxLoopInconsistencyPortIndex=stpxLoopInconsistencyPortIndex, stpxSMSTPortOperMSTMode=stpxSMSTPortOperMSTMode, stpxLoopGuardConfigTable=stpxLoopGuardConfigTable, stpxLoopGuardGroup2=stpxLoopGuardGroup2, stpxSMSTConfigPreStandardDigest=stpxSMSTConfigPreStandardDigest, stpxFastStartPortTable=stpxFastStartPortTable, stpxRSTPTransmitHoldCount=stpxRSTPTransmitHoldCount, stpxMIBCompliance5=stpxMIBCompliance5, stpxMSTInstanceVlansMapped2k=stpxMSTInstanceVlansMapped2k, stpxUplinkFastOperEnabled=stpxUplinkFastOperEnabled, stpxSMSTInstanceEditIndex=stpxSMSTInstanceEditIndex, stpxBackboneFastOutRLQRequestPDUs=stpxBackboneFastOutRLQRequestPDUs, stpxBackboneFastOutRLQResponsePDUs=stpxBackboneFastOutRLQResponsePDUs, stpxMSTRegionEditName=stpxMSTRegionEditName, stpxMISTPInstanceVlansMapped2k=stpxMISTPInstanceVlansMapped2k, stpxMSTInstanceEditVlansMap3k=stpxMSTInstanceEditVlansMap3k, stpxSMSTInstanceCISTIntRootCost=stpxSMSTInstanceCISTIntRootCost, stpxFastStartBpduFilterEnable=stpxFastStartBpduFilterEnable, stpxFastStartPortEntry=stpxFastStartPortEntry, stpxLoopInconsistencyUpdate=stpxLoopInconsistencyUpdate, stpxRootInconsistencyNotificationsGroup=stpxRootInconsistencyNotificationsGroup, stpxMSTGroup=stpxMSTGroup, stpxMISTPInstanceIndex=stpxMISTPInstanceIndex, stpxMSTPortOperLinkType=stpxMSTPortOperLinkType, stpxPreferredVlansGroup=stpxPreferredVlansGroup, stpxSMSTInstanceEditVlansMap1k2k=stpxSMSTInstanceEditVlansMap1k2k, stpxVlanMISTPInstMapEditInstIndex=stpxVlanMISTPInstMapEditInstIndex, stpxFastStartPortEnable=stpxFastStartPortEnable, stpxPreferredVlansMap=stpxPreferredVlansMap, stpxLoopInconsistencyIndex=stpxLoopInconsistencyIndex, stpxRSTPPortRoleEntry=stpxRSTPPortRoleEntry, stpxNotificationsGroup=stpxNotificationsGroup, stpxExtendedSysIDOperEnabled=stpxExtendedSysIDOperEnabled, stpxMIBCompliance4=stpxMIBCompliance4, stpxMSTRegionEditBufferStatus=stpxMSTRegionEditBufferStatus, stpxMSTPortIndex=stpxMSTPortIndex, stpxMSTPortRoleEntry=stpxMSTPortRoleEntry, stpxPVSTVlanTable=stpxPVSTVlanTable, stpxSMSTPortStatusGroup=stpxSMSTPortStatusGroup, stpxBpduSkewingTable=stpxBpduSkewingTable, stpxRPVSTPortTable=stpxRPVSTPortTable, stpxPreferredVlansMap2k=stpxPreferredVlansMap2k, stpxMSTInstanceRemainingHopCount=stpxMSTInstanceRemainingHopCount, stpxBpduSkewingInstanceIndex=stpxBpduSkewingInstanceIndex, stpxVlanMISTPInstMapEditTable=stpxVlanMISTPInstMapEditTable, stpxMSTPortStatus=stpxMSTPortStatus, stpxPVSTVlanEntry=stpxPVSTVlanEntry, stpxFastStartOperModePortIndex=stpxFastStartOperModePortIndex, stpxMSTInstanceEditTable=stpxMSTInstanceEditTable, stpxFastStartBpduGuardEnable=stpxFastStartBpduGuardEnable, stpxSMSTPortTable=stpxSMSTPortTable, stpxSMSTPortHelloTimeGroup=stpxSMSTPortHelloTimeGroup, stpxPVSTVlanGroup=stpxPVSTVlanGroup, stpx4kVlanGroup=stpx4kVlanGroup, stpxSpanningTreeType=stpxSpanningTreeType, stpxMSTPortTable=stpxMSTPortTable, stpxMSTMaxInstanceNumber=stpxMSTMaxInstanceNumber, stpxPreferredMSTInstancesEntry=stpxPreferredMSTInstancesEntry, stpxMISTPObjects=stpxMISTPObjects, stpxMISTPInstanceVlansMapped4k=stpxMISTPInstanceVlansMapped4k, stpxNotifications=stpxNotifications, stpxMISTPInstanceNumber=stpxMISTPInstanceNumber, stpxMSTInstanceIndex=stpxMSTInstanceIndex, stpxSMSTInstanceGroup=stpxSMSTInstanceGroup, stpxSMSTInstanceEditEntry=stpxSMSTInstanceEditEntry, ciscoStpExtensionsMIB=ciscoStpExtensionsMIB, stpxLoopGuardObjects=stpxLoopGuardObjects, stpxRPVSTPortStatus=stpxRPVSTPortStatus, stpxMIBCompliance3=stpxMIBCompliance3, stpxLongPathCostModeGroup=stpxLongPathCostModeGroup, stpxMISTPGroup2=stpxMISTPGroup2, stpxLoopInconsistencyTable=stpxLoopInconsistencyTable, stpxSMSTInstanceEditGroup=stpxSMSTInstanceEditGroup, stpxMSTInstanceVlansMapped4k=stpxMSTInstanceVlansMapped4k, stpxSMSTInstanceTable=stpxSMSTInstanceTable, stpxRootInconsistencyTable=stpxRootInconsistencyTable, stpxPVSTVlanIndex=stpxPVSTVlanIndex, stpxMISTPInstanceTable=stpxMISTPInstanceTable, stpxMSTInstanceEditVlansMap4k=stpxMSTInstanceEditVlansMap4k, stpxRSTPPortTable=stpxRSTPPortTable, stpxBpduSkewingPortIndex=stpxBpduSkewingPortIndex, stpxRSTPGroup=stpxRSTPGroup, stpxMIBCompliance11=stpxMIBCompliance11, stpxRSTPPortRoleInstanceIndex=stpxRSTPPortRoleInstanceIndex, stpxSpanningTreeObjects=stpxSpanningTreeObjects, stpxSMSTMaxInstances=stpxSMSTMaxInstances, stpxSMSTConfigDigestGroup=stpxSMSTConfigDigestGroup, stpxSMSTRegionEditRevision=stpxSMSTRegionEditRevision, stpxRSTPPortOperLinkType=stpxRSTPPortOperLinkType, stpxRPVSTObjects=stpxRPVSTObjects, stpxPreferredMSTInstancesTable=stpxPreferredMSTInstancesTable, stpxUplinkFastObjects=stpxUplinkFastObjects, stpxRPVSTGroup=stpxRPVSTGroup, stpxSMSTInstanceVlansMapped3k4k=stpxSMSTInstanceVlansMapped3k4k, stpxMIBConformance=stpxMIBConformance, stpxMIBCompliance=stpxMIBCompliance, stpxFastStartOperModeEntry=stpxFastStartOperModeEntry, stpxRSTPPortRoleTable=stpxRSTPPortRoleTable, stpxRSTPPortAdminLinkType=stpxRSTPPortAdminLinkType, stpxMIBCompliance9=stpxMIBCompliance9, stpxLoopGuardConfigPortIndex=stpxLoopGuardConfigPortIndex, stpxSMSTInstanceEditRowStatus=stpxSMSTInstanceEditRowStatus, stpxFastStartOperModeGroup=stpxFastStartOperModeGroup, stpxLoopGuardGroup=stpxLoopGuardGroup, stpxExtendedSysIDAdminEnabled=stpxExtendedSysIDAdminEnabled, stpxLoopGuardConfigEntry=stpxLoopGuardConfigEntry, stpxUplinkGroup2=stpxUplinkGroup2, stpxNotificationsPrefix=stpxNotificationsPrefix, stpxLongStpPortPathCost=stpxLongStpPortPathCost, stpxRootInconsistencyState=stpxRootInconsistencyState, stpxRootGuardConfigEnabled=stpxRootGuardConfigEnabled, stpxMIBCompliance6=stpxMIBCompliance6, stpxMIBCompliance10=stpxMIBCompliance10, stpxMIBCompliance12=stpxMIBCompliance12, stpxSMSTPortMSTModeGroup=stpxSMSTPortMSTModeGroup, stpxRSTPObjects=stpxRSTPObjects, stpxMSTPortRolePortIndex=stpxMSTPortRolePortIndex, stpxSpanningTreePathCostMode=stpxSpanningTreePathCostMode, stpxVlanIndex=stpxVlanIndex, stpxBpduSkewingObjects=stpxBpduSkewingObjects, stpxNotificationEnable=stpxNotificationEnable, stpxFastStartPortBpduFilterMode=stpxFastStartPortBpduFilterMode, stpxBpduSkewingDetectionEnable=stpxBpduSkewingDetectionEnable, stpxBackboneFastInRLQResponsePDUs=stpxBackboneFastInRLQResponsePDUs, stpxBackboneGroup2=stpxBackboneGroup2, stpxMSTPortEntry=stpxMSTPortEntry, stpxBackboneGroup=stpxBackboneGroup, stpxMSTInstanceEditVlansMap=stpxMSTInstanceEditVlansMap, stpxMSTInstanceEditIndex=stpxMSTInstanceEditIndex, stpxInconsistencyEntry=stpxInconsistencyEntry, stpxInconsistencyUpdate=stpxInconsistencyUpdate, stpxRPVSTPortIndex=stpxRPVSTPortIndex, stpxBackboneFastObjects=stpxBackboneFastObjects, stpxPreferredMISTPInstancesTable=stpxPreferredMISTPInstancesTable, stpxMSTRegionRevision=stpxMSTRegionRevision, stpxFastStartPortBpduGuardMode=stpxFastStartPortBpduGuardMode, stpxPreferredMISTPInstancesEntry=stpxPreferredMISTPInstancesEntry, stpxSMSTInstanceIndex=stpxSMSTInstanceIndex, stpxInconsistentState=stpxInconsistentState, stpxLongStpPortPathCostTable=stpxLongStpPortPathCostTable, stpxFastStartGlobalDefaultMode=stpxFastStartGlobalDefaultMode, stpxBpduSkewingEntry=stpxBpduSkewingEntry, stpxSMSTPortAdminHelloTime=stpxSMSTPortAdminHelloTime, stpxSMSTGroup=stpxSMSTGroup, stpxVlanObjects=stpxVlanObjects, stpxMISTPInstanceEnable=stpxMISTPInstanceEnable, stpxMIBCompliance7=stpxMIBCompliance7, stpxLoopInconsistencyEntry=stpxLoopInconsistencyEntry, stpxRPVSTPortVlanIndex=stpxRPVSTPortVlanIndex, stpxMSTGroup3=stpxMSTGroup3, StpxMSTConfigurationDigest=StpxMSTConfigurationDigest, stpxBpduSkewingLastSkewDuration=stpxBpduSkewingLastSkewDuration, stpxMSTRegionName=stpxMSTRegionName, stpxPreferredMISTPInstancesMap=stpxPreferredMISTPInstancesMap, stpxMSTObjects=stpxMSTObjects, stpxPreferredMSTInstancesGroup=stpxPreferredMSTInstancesGroup, stpxInconsistencyTable=stpxInconsistencyTable, stpxMSTMaxHopCount=stpxMSTMaxHopCount, stpxExtendedSysIDGroup=stpxExtendedSysIDGroup, stpxRootInconsistencyEntry=stpxRootInconsistencyEntry, stpxRSTPPortRoleValue=stpxRSTPPortRoleValue, stpxRSTPTransmitHoldCountGroup=stpxRSTPTransmitHoldCountGroup, stpxLoopInconsistencyState=stpxLoopInconsistencyState, stpxFastStartOperModeTable=stpxFastStartOperModeTable, stpxPVSTVlanEnable=stpxPVSTVlanEnable)
mibBuilder.exportSymbols("CISCO-STP-EXTENSIONS-MIB", stpxSMSTRegionRevision=stpxSMSTRegionRevision, stpxBpduSkewingGroup=stpxBpduSkewingGroup, stpxPreferredVlansTable=stpxPreferredVlansTable, stpxMIBGroups=stpxMIBGroups, stpxSpanningTreePathCostOperMode=stpxSpanningTreePathCostOperMode, stpxVlanMISTPInstMapEntry=stpxVlanMISTPInstMapEntry, stpxUplinkGroup=stpxUplinkGroup, stpxSMSTMaxInstanceID=stpxSMSTMaxInstanceID, stpxSMSTInstanceEntry=stpxSMSTInstanceEntry)
| 155.634868 | 12,705 | 0.766417 | 9,887 | 94,626 | 7.334985 | 0.050976 | 0.046552 | 0.104742 | 0.122199 | 0.493747 | 0.457343 | 0.424139 | 0.405731 | 0.393845 | 0.383048 | 0 | 0.060074 | 0.074683 | 94,626 | 607 | 12,706 | 155.891269 | 0.768179 | 0.003614 | 0 | 0.093697 | 0 | 0 | 0.259093 | 0.178711 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.015332 | 0 | 0.02385 | 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 |
c9039b4764c11673eaf4c73b170db2a774fedfa4 | 785 | py | Python | setup.py | rusek/bgjobs | 3d397dbbdd38a865c7c0645c50fade56df30d972 | [
"MIT"
] | null | null | null | setup.py | rusek/bgjobs | 3d397dbbdd38a865c7c0645c50fade56df30d972 | [
"MIT"
] | null | null | null | setup.py | rusek/bgjobs | 3d397dbbdd38a865c7c0645c50fade56df30d972 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='bgjobs',
version='0.1',
author='Krzysztof Rusek',
author_email='savix5@gmail.com',
description='Run and monitor background jobs',
url='https://github.com/rusek/bgjobs',
license='The MIT License (MIT)',
keywords='background jobs, background tasks',
packages=find_packages(),
classifiers=[
'Development Status :: 1 - Planning',
'Intended Audience :: Developers',
'Operating System :: POSIX',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Libraries',
],
)
| 30.192308 | 53 | 0.625478 | 81 | 785 | 6.024691 | 0.666667 | 0.155738 | 0.204918 | 0.159836 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.01495 | 0.233121 | 785 | 25 | 54 | 31.4 | 0.795681 | 0.025478 | 0 | 0 | 0 | 0 | 0.558901 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.045455 | 0 | 0.045455 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
c9043a4a4e51c7ec01d9b64f4c015ee5ae6a2a5d | 1,262 | gyp | Python | camerartc/camerartc.gyp | Teaonly/yacamera | 13a41d18175e50318911dd470c76a811601dfa22 | [
"MIT"
] | 20 | 2015-06-08T08:25:22.000Z | 2020-06-14T09:17:50.000Z | camerartc/camerartc.gyp | Teaonly/yacamera | 13a41d18175e50318911dd470c76a811601dfa22 | [
"MIT"
] | null | null | null | camerartc/camerartc.gyp | Teaonly/yacamera | 13a41d18175e50318911dd470c76a811601dfa22 | [
"MIT"
] | 8 | 2015-06-09T03:28:56.000Z | 2019-07-16T08:24:24.000Z | #
# Building script for ipcamera application
#
{
'includes': ['build/common.gypi'],
'targets' : [
{
'target_name': 'camerartc',
'type': 'executable',
'include_dirs': [
'../third_party/webrtc/modules/interface',
],
'dependencies': [
'libjingle.gyp:libjingle_peerconnection',
'<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
],
'sources': [
'camerartc/main.cpp',
'camerartc/peer.h',
'camerartc/peer.cpp',
'camerartc/camerartc.h',
'camerartc/camerartc.cpp',
'camerartc/rtcstream.h',
'camerartc/rtcstream.cpp',
'camerartc/attendee.h',
'camerartc/attendee.cpp',
'camerartc/mediabuffer.h',
'camerartc/mediabuffer.cpp',
'camerartc/raptor/numberdb.h',
'camerartc/raptor/numberdb.cpp',
'camerartc/raptor/rprandom.h',
'camerartc/raptor/rprandom.cpp',
'camerartc/raptor/raptor.h',
'camerartc/raptor/aaptor.cpp',
'camerartc/g72x/g726_32.c',
'camerartc/g72x/g711.c',
'camerartc/g72x/g72x.c',
],
},
],
}
| 30.047619 | 63 | 0.515848 | 105 | 1,262 | 6.142857 | 0.428571 | 0.167442 | 0.083721 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.01907 | 0.335182 | 1,262 | 41 | 64 | 30.780488 | 0.749702 | 0.031696 | 0 | 0.105263 | 0 | 0 | 0.560855 | 0.421875 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
c921307aaf30f45d8980152bb95840877735923f | 132 | py | Python | src/t4me/__init__.py | knirajiitb/t4me_AMMCR | f8b6696493a4f1d964404814105ced241967adbb | [
"BSD-3-Clause"
] | 6 | 2018-12-15T06:04:07.000Z | 2021-06-26T05:16:15.000Z | src/t4me/__init__.py | knirajiitb/t4me_AMMCR | f8b6696493a4f1d964404814105ced241967adbb | [
"BSD-3-Clause"
] | 3 | 2019-02-19T08:06:04.000Z | 2021-03-25T16:58:33.000Z | src/t4me/__init__.py | knirajiitb/t4me_AMMCR | f8b6696493a4f1d964404814105ced241967adbb | [
"BSD-3-Clause"
] | 4 | 2020-11-16T23:48:32.000Z | 2021-09-03T10:47:02.000Z | """T4ME - Transport 4 MatErials - a code to calculate the electronic transport coefficients of materials."""
__version__ = '2.0.0'
| 33 | 108 | 0.742424 | 18 | 132 | 5.222222 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.044643 | 0.151515 | 132 | 3 | 109 | 44 | 0.794643 | 0.772727 | 0 | 0 | 0 | 0 | 0.208333 | 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 |
c92d0df92743101c01b5c2aca66c90216b1d5b37 | 1,373 | py | Python | app/tests/test_get_data.py | rafayahmed123/covid19-api | d348cae21713b147446d3b5f0ee473376014d6a2 | [
"MIT"
] | null | null | null | app/tests/test_get_data.py | rafayahmed123/covid19-api | d348cae21713b147446d3b5f0ee473376014d6a2 | [
"MIT"
] | null | null | null | app/tests/test_get_data.py | rafayahmed123/covid19-api | d348cae21713b147446d3b5f0ee473376014d6a2 | [
"MIT"
] | null | null | null | """
FILE: test_get_data.py
DESCRIPTION: Test reading raw files from GitHub
AUTHOR: Nuttaphat Arunoprayoch
DATE: 11-April-2020
"""
# Import libraries
import pandas as pd
from ..utils import getData
getdataRep = getInstance.get_data()
# Test - Get Lookup table
def test_get_data_lookup_table() -> None:
result = getdataRep.get_data_lookup_table()
assert len(result) > 0
assert isinstance(result, dict) is True
# Test - Get data from daily reports
def test_get_data_daily_reports() -> None:
result = getdataRep.get_data_daily_reports()
assert len(result) > 0
assert isinstance(result, pd.DataFrame) is True
# Test - Get data from time series
def test_get_data_time_series() -> None:
result = getdataRep.get_data_time_series()
assert len(result) > 0
assert isinstance(result, dict) is True
# Test - Get data from time series (US)
def test_get_US_time_series() -> None:
result = getdataRep.get_US_time_series()
assert len(result) > 0
assert isinstance(result, dict) is True
# Test - Get Data (API v1)
def test_get_data() -> None:
result = getdataRep.get_data()
assert len(result) > 0
assert isinstance(result, dict) is True
# Test - Get Data (API v1)
def test_get_data(time_series = True) -> None:
result = getdataRep.get_data()
assert len(result) > 0
assert isinstance(result, dict) is True
| 25.425926 | 52 | 0.716679 | 200 | 1,373 | 4.73 | 0.235 | 0.125793 | 0.127907 | 0.145877 | 0.667019 | 0.605708 | 0.510571 | 0.470402 | 0.427061 | 0.427061 | 0 | 0.012567 | 0.188638 | 1,373 | 53 | 53 | 25.90566 | 0.836625 | 0.232338 | 0 | 0.481481 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.444444 | 1 | 0.222222 | false | 0 | 0.074074 | 0 | 0.296296 | 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 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
c9433438989a6bb69a269daa08ad0b9234b16d36 | 1,303 | py | Python | tests/providers/amazon/aws/operators/test_emr_system.py | ChaseKnowlden/airflow | 6b71eac1997a7c0db3b8e3aed6b4e65d01871440 | [
"Apache-2.0"
] | 15,947 | 2019-01-05T13:51:02.000Z | 2022-03-31T23:33:16.000Z | tests/providers/amazon/aws/operators/test_emr_system.py | ChaseKnowlden/airflow | 6b71eac1997a7c0db3b8e3aed6b4e65d01871440 | [
"Apache-2.0"
] | 14,603 | 2019-01-05T09:43:19.000Z | 2022-03-31T23:11:59.000Z | tests/providers/amazon/aws/operators/test_emr_system.py | ChaseKnowlden/airflow | 6b71eac1997a7c0db3b8e3aed6b4e65d01871440 | [
"Apache-2.0"
] | 8,429 | 2019-01-05T19:45:47.000Z | 2022-03-31T22:13:01.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from tests.test_utils.amazon_system_helpers import AWS_DAG_FOLDER, AmazonSystemTest
class EmrSystemTest(AmazonSystemTest):
"""
System tests for AWS EMR operators
"""
@classmethod
def setup_class(cls):
cls.create_emr_default_roles()
def test_run_example_dag_emr_automatic_steps(self):
self.run_dag('emr_job_flow_automatic_steps_dag', AWS_DAG_FOLDER)
def test_run_example_dag_emr_manual_steps(self):
self.run_dag('emr_job_flow_manual_steps_dag', AWS_DAG_FOLDER)
| 37.228571 | 83 | 0.769762 | 193 | 1,303 | 5.005181 | 0.533679 | 0.062112 | 0.037267 | 0.033126 | 0.149068 | 0.10766 | 0.060041 | 0.060041 | 0 | 0 | 0 | 0.00369 | 0.168074 | 1,303 | 34 | 84 | 38.323529 | 0.887454 | 0.604758 | 0 | 0 | 0 | 0 | 0.126033 | 0.126033 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.111111 | 0 | 0.555556 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
c945186b50383d5d0bb16019c5f8268a9b56294a | 474 | py | Python | fabfile.py | maracuja/maracuja.github.io | cb9d875549fe9b47ba231e9014be19030ee421d7 | [
"MIT"
] | null | null | null | fabfile.py | maracuja/maracuja.github.io | cb9d875549fe9b47ba231e9014be19030ee421d7 | [
"MIT"
] | null | null | null | fabfile.py | maracuja/maracuja.github.io | cb9d875549fe9b47ba231e9014be19030ee421d7 | [
"MIT"
] | null | null | null | from fabric.api import *
def live():
""" Set the target to production. """
env.hosts = ['kurosaki@ichigo']
env.remote_app_dir = '/home/kurosaki/htdocs/setr.co.uk/'
env.build_dir = '_site/'
def push():
"""
Pushes the code to nominated server.
restart included.
doesn't touch the db
"""
require('hosts', provided_by=[live, ])
put('%s*' % (env.build_dir,), env.remote_app_dir)
def start():
local('jekyll serve')
| 21.545455 | 60 | 0.599156 | 63 | 474 | 4.380952 | 0.714286 | 0.065217 | 0.086957 | 0.108696 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.240506 | 474 | 21 | 61 | 22.571429 | 0.766667 | 0.223629 | 0 | 0 | 0 | 0 | 0.227692 | 0.101538 | 0 | 0 | 0 | 0 | 0 | 1 | 0.3 | true | 0 | 0.1 | 0 | 0.4 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
c9546084ea191cbc5d52bb9ccb6efc44e7c47ba5 | 7,050 | py | Python | src/safe.py | vincent-lg/cocomud | a2c174f15b024d834266e0bef3d0404732d34a47 | [
"BSD-3-Clause"
] | 3 | 2016-10-13T01:39:20.000Z | 2017-08-01T15:58:12.000Z | src/safe.py | vincent-lg/cocomud | a2c174f15b024d834266e0bef3d0404732d34a47 | [
"BSD-3-Clause"
] | 11 | 2018-11-27T16:13:11.000Z | 2019-12-29T11:34:54.000Z | src/safe.py | vlegoff/cocomud | a2c174f15b024d834266e0bef3d0404732d34a47 | [
"BSD-3-Clause"
] | 2 | 2017-08-02T19:36:57.000Z | 2017-10-21T04:13:34.000Z | # Copyright (c) 2016-2020, LE GOFF Vincent
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of ytranslate nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""This file contains the 'safe' system of CocoMUD, ways to crypt/encrypt.
This feature requires:
pbkdf2
pyaes
The module contains a class named 'Safe', that should be insantiated
in order to manipulate the encrypting
/decrypting mechanism. This class requires a passphrase in
argument. You can insantiate it as follows:
>>> from safe import Safe
>>> safe = Safe(file=".passphrase")
>>> # (If the file doesn't exist, it will be created with an auto-generated
>>> # passphrase.)
>>> # Alternatively you can specify the passphrase directly
>>> safe = Safe(passphrase="Dsm18fvdjP9sz801,9DJA.1356gndYJz987v")
>>> # Store encrypted data
>>> safe.store("login", "kredh")
>>> safe.store("password", "YoudWishIToldYou")
>>> # Retrieve the data (can be later)
>>> login = safe.retrieve("login")
>>> password = safe.retrieve("password")
Note that datas that is not a string (like a bool or float) will be
saved as unprotected data. If you want to save it encrypted, you can
convert it to string.
"""
import base64
import os
import pickle
import pyaes
from pbkdf2 import PBKDF2
class Safe:
"""A safe object, to encrypt/decrypt information.
The Safe class requires a passphrase to be created. This is a
string of characters that adds to the security of encryption.
Obviously, it needs to remain similar to decrypt information that
has been encrypted. Other optional parameters are also possible:
secret: the path of the file in which to store crypted data.
"""
def __init__(self, passphrase=None, file=None, secret="data.crypt",
load=True):
self.salt_seed = 'mkhgts465wef4fwtdd'
self.passphrase = passphrase
self.secret = secret
self.passphrase_size = 64
self.key_size = 32
self.block_size = 16
self.iv_size = 16
self.salt_size = 8
self.data = {}
if file and os.path.exists(file):
with open(file, "r") as pass_file:
self.passphrase = pass_file.read()
if not self.passphrase:
self.passphrase = base64.b64encode(os.urandom(
self.passphrase_size))
if file:
with open(file, "wb") as pass_file:
pass_file.write(self.passphrase)
# Load the secret file
if load:
self.load()
def get_salt_from_key(self, key):
return PBKDF2(key, self.salt_seed).read(self.salt_size)
def encrypt(self, plaintext, salt):
"""Pad plaintext, then encrypt it.
The encryption occurs with a new, randomly initialised cipher.
This method will not preserve trailing whitespace in plaintext!.
"""
# Initialise Cipher Randomly
init_vector = os.urandom(self.iv_size)
# Prepare cipher key
key = PBKDF2(self.passphrase, salt).read(self.key_size)
cipher = pyaes.AESModeOfOperationCBC(key, iv=init_vector)
bs = self.block_size
if isinstance(plaintext, str):
plaintext = plaintext.encode("utf-8")
return init_vector + cipher.encrypt(plaintext + \
b" " * (bs - (len(plaintext) % bs)))
def decrypt(self, ciphertext, salt):
"""Reconstruct the cipher object and decrypt.
This method will not preserve trailing whitespace in the
retrieved value.
"""
# Prepare cipher key
key = PBKDF2(self.passphrase, salt).read(self.key_size)
# Extract IV
init_vector = ciphertext[:self.iv_size]
ciphertext = ciphertext[self.iv_size:]
cipher = pyaes.AESModeOfOperationCBC(key, iv=init_vector)
decrypted = cipher.decrypt(ciphertext).rstrip(b" ")
return decrypted.decode("utf-8")
def load(self):
"""Load the data from the 'secret' file if exists."""
if os.path.exists(self.secret):
with open(self.secret, "rb") as file:
upic = pickle.Unpickler(file, encoding="utf-8")
self.data = upic.load()
if not isinstance(self.data, dict):
raise ValueError("the data contained in the file " \
"'{}' is not a dictionary".format(self.secret))
def retrieve(self, key, *default):
"""Retrieve and decrypt the specified key.
If the key isn't present in the dictionary, either
return default if specified, or raise a KeyError.
If the value at this location isn't a string, return it as is.
"""
if key not in self.data:
if default:
return default[0]
raise KeyError(key)
value = self.data[key]
if isinstance(value, (bytes, str)):
salt = self.get_salt_from_key(key)
return self.decrypt(value, salt)
return value
def store(self, key, value):
"""Store the key in the file.
If the key already exists, replaces it.
If the value is not a string, it will be stored
WITHOUT encryption.
"""
if isinstance(value, str):
salt = self.get_salt_from_key(key)
crypted = self.encrypt(value, salt)
self.data[key] = crypted
else:
self.data[key] = value
# Write the new data in the file
self.save()
def save(self):
"""Save the data in the secret file."""
with open(self.secret, "wb") as file:
pic = pickle.Pickler(file)
pic.dump(self.data)
| 34.390244 | 80 | 0.653617 | 927 | 7,050 | 4.932039 | 0.323625 | 0.030621 | 0.008749 | 0.009186 | 0.118985 | 0.108486 | 0.108486 | 0.108486 | 0.055118 | 0.055118 | 0 | 0.009819 | 0.263262 | 7,050 | 204 | 81 | 34.558824 | 0.870235 | 0.228369 | 0 | 0.078947 | 0 | 0 | 0.033957 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.157895 | 0.065789 | null | null | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
c966131819107d695081328315c6c8a2669cfec1 | 81,555 | py | Python | py_ctp/ctp_enum.py | xzstar/Rainbird2 | 8d4efb796e45e741603e728251f5bb916031b053 | [
"Apache-2.0"
] | 4 | 2018-12-12T02:52:44.000Z | 2020-01-21T04:56:45.000Z | py_ctp/ctp_enum.py | xzstar/Rainbird2 | 8d4efb796e45e741603e728251f5bb916031b053 | [
"Apache-2.0"
] | 1 | 2019-06-06T05:17:56.000Z | 2019-06-06T05:17:56.000Z | py_ctp/ctp_enum.py | xzstar/Rainbird2 | 8d4efb796e45e741603e728251f5bb916031b053 | [
"Apache-2.0"
] | 12 | 2019-04-22T12:34:23.000Z | 2022-03-26T16:56:29.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from enum import Enum
class THOST_TE_RESUME_TYPE(Enum):
TERT_RESTART = 0
TERT_RESUME = 1
TERT_QUICK = 2
class TThostFtdcExchangePropertyType(Enum):
"""交易所属性类型"""
THOST_FTDC_EXP_Normal = 48
"""正常"""
THOST_FTDC_EXP_GenOrderByTrade = 49
"""根据成交生成报单"""
class TThostFtdcIdCardTypeType(Enum):
"""证件类型类型"""
THOST_FTDC_ICT_EID = 48
"""组织机构代码"""
THOST_FTDC_ICT_IDCard = 49
"""中国公民身份证"""
THOST_FTDC_ICT_OfficerIDCard = 50
"""军官证"""
THOST_FTDC_ICT_PoliceIDCard = 51
"""警官证"""
THOST_FTDC_ICT_SoldierIDCard = 52
"""士兵证"""
THOST_FTDC_ICT_HouseholdRegister = 53
"""户口簿"""
THOST_FTDC_ICT_Passport = 54
"""护照"""
THOST_FTDC_ICT_TaiwanCompatriotIDCard = 55
"""台胞证"""
THOST_FTDC_ICT_HomeComingCard = 56
"""回乡证"""
THOST_FTDC_ICT_LicenseNo = 57
"""营业执照号"""
THOST_FTDC_ICT_TaxNo = 65
"""税务登记号/当地纳税ID"""
THOST_FTDC_ICT_HMMainlandTravelPermit = 66
"""港澳居民来往内地通行证"""
THOST_FTDC_ICT_TwMainlandTravelPermit = 67
"""台湾居民来往大陆通行证"""
THOST_FTDC_ICT_DrivingLicense = 68
"""驾照"""
THOST_FTDC_ICT_SocialID = 70
"""当地社保ID"""
THOST_FTDC_ICT_LocalID = 71
"""当地身份证"""
THOST_FTDC_ICT_BusinessRegistration = 72
"""商业登记证"""
THOST_FTDC_ICT_HKMCIDCard = 73
"""港澳永久性居民身份证"""
THOST_FTDC_ICT_AccountsPermits = 74
"""人行开户许可证"""
THOST_FTDC_ICT_FrgPrmtRdCard = 75
"""外国人永久居留证"""
THOST_FTDC_ICT_CptMngPrdLetter = 76
"""资管产品备案函"""
THOST_FTDC_ICT_OtherCard = 120
"""其他证件"""
class TThostFtdcInvestorRangeType(Enum):
"""投资者范围类型"""
THOST_FTDC_IR_All = 49
"""所有"""
THOST_FTDC_IR_Group = 50
"""投资者组"""
THOST_FTDC_IR_Single = 51
"""单一投资者"""
class TThostFtdcDepartmentRangeType(Enum):
"""投资者范围类型"""
THOST_FTDC_DR_All = 49
"""所有"""
THOST_FTDC_DR_Group = 50
"""组织架构"""
THOST_FTDC_DR_Single = 51
"""单一投资者"""
class TThostFtdcDataSyncStatusType(Enum):
"""数据同步状态类型"""
THOST_FTDC_DS_Asynchronous = 49
"""未同步"""
THOST_FTDC_DS_Synchronizing = 50
"""同步中"""
THOST_FTDC_DS_Synchronized = 51
"""已同步"""
class TThostFtdcBrokerDataSyncStatusType(Enum):
"""经纪公司数据同步状态类型"""
THOST_FTDC_BDS_Synchronized = 49
"""已同步"""
THOST_FTDC_BDS_Synchronizing = 50
"""同步中"""
class TThostFtdcExchangeConnectStatusType(Enum):
"""交易所连接状态类型"""
THOST_FTDC_ECS_NoConnection = 49
"""没有任何连接"""
THOST_FTDC_ECS_QryInstrumentSent = 50
"""已经发出合约查询请求"""
THOST_FTDC_ECS_GotInformation = 57
"""已经获取信息"""
class TThostFtdcTraderConnectStatusType(Enum):
"""交易所交易员连接状态类型"""
THOST_FTDC_TCS_NotConnected = 49
"""没有任何连接"""
THOST_FTDC_TCS_Connected = 50
"""已经连接"""
THOST_FTDC_TCS_QryInstrumentSent = 51
"""已经发出合约查询请求"""
THOST_FTDC_TCS_SubPrivateFlow = 52
"""订阅私有流"""
class TThostFtdcFunctionCodeType(Enum):
"""功能代码类型"""
THOST_FTDC_FC_DataAsync = 49
"""数据异步化"""
THOST_FTDC_FC_ForceUserLogout = 50
"""强制用户登出"""
THOST_FTDC_FC_UserPasswordUpdate = 51
"""变更管理用户口令"""
THOST_FTDC_FC_BrokerPasswordUpdate = 52
"""变更经纪公司口令"""
THOST_FTDC_FC_InvestorPasswordUpdate = 53
"""变更投资者口令"""
THOST_FTDC_FC_OrderInsert = 54
"""报单插入"""
THOST_FTDC_FC_OrderAction = 55
"""报单操作"""
THOST_FTDC_FC_SyncSystemData = 56
"""同步系统数据"""
THOST_FTDC_FC_SyncBrokerData = 57
"""同步经纪公司数据"""
THOST_FTDC_FC_BachSyncBrokerData = 65
"""批量同步经纪公司数据"""
THOST_FTDC_FC_SuperQuery = 66
"""超级查询"""
THOST_FTDC_FC_ParkedOrderInsert = 67
"""预埋报单插入"""
THOST_FTDC_FC_ParkedOrderAction = 68
"""预埋报单操作"""
THOST_FTDC_FC_SyncOTP = 69
"""同步动态令牌"""
THOST_FTDC_FC_DeleteOrder = 70
"""删除未知单"""
class TThostFtdcBrokerFunctionCodeType(Enum):
"""经纪公司功能代码类型"""
THOST_FTDC_BFC_ForceUserLogout = 49
"""强制用户登出"""
THOST_FTDC_BFC_UserPasswordUpdate = 50
"""变更用户口令"""
THOST_FTDC_BFC_SyncBrokerData = 51
"""同步经纪公司数据"""
THOST_FTDC_BFC_BachSyncBrokerData = 52
"""批量同步经纪公司数据"""
THOST_FTDC_BFC_OrderInsert = 53
"""报单插入"""
THOST_FTDC_BFC_OrderAction = 54
"""报单操作"""
THOST_FTDC_BFC_AllQuery = 55
"""全部查询"""
THOST_FTDC_BFC_log = 97
"""系统功能:登入/登出/修改密码等"""
THOST_FTDC_BFC_BaseQry = 98
"""基本查询:查询基础数据,如合约,交易所等常量"""
THOST_FTDC_BFC_TradeQry = 99
"""交易查询:如查成交,委托"""
THOST_FTDC_BFC_Trade = 100
"""交易功能:报单,撤单"""
THOST_FTDC_BFC_Virement = 101
"""银期转账"""
THOST_FTDC_BFC_Risk = 102
"""风险监控"""
THOST_FTDC_BFC_Session = 103
"""查询/管理:查询会话,踢人等"""
THOST_FTDC_BFC_RiskNoticeCtl = 104
"""风控通知控制"""
THOST_FTDC_BFC_RiskNotice = 105
"""风控通知发送"""
THOST_FTDC_BFC_BrokerDeposit = 106
"""察看经纪公司资金权限"""
THOST_FTDC_BFC_QueryFund = 107
"""资金查询"""
THOST_FTDC_BFC_QueryOrder = 108
"""报单查询"""
THOST_FTDC_BFC_QueryTrade = 109
"""成交查询"""
THOST_FTDC_BFC_QueryPosition = 110
"""持仓查询"""
THOST_FTDC_BFC_QueryMarketData = 111
"""行情查询"""
THOST_FTDC_BFC_QueryUserEvent = 112
"""用户事件查询"""
THOST_FTDC_BFC_QueryRiskNotify = 113
"""风险通知查询"""
THOST_FTDC_BFC_QueryFundChange = 114
"""出入金查询"""
THOST_FTDC_BFC_QueryInvestor = 115
"""投资者信息查询"""
THOST_FTDC_BFC_QueryTradingCode = 116
"""交易编码查询"""
THOST_FTDC_BFC_ForceClose = 117
"""强平"""
THOST_FTDC_BFC_PressTest = 118
"""压力测试"""
THOST_FTDC_BFC_RemainCalc = 119
"""权益反算"""
THOST_FTDC_BFC_NetPositionInd = 120
"""净持仓保证金指标"""
THOST_FTDC_BFC_RiskPredict = 121
"""风险预算"""
THOST_FTDC_BFC_DataExport = 122
"""数据导出"""
THOST_FTDC_BFC_RiskTargetSetup = 65
"""风控指标设置"""
THOST_FTDC_BFC_MarketDataWarn = 66
"""行情预警"""
THOST_FTDC_BFC_QryBizNotice = 67
"""业务通知查询"""
THOST_FTDC_BFC_CfgBizNotice = 68
"""业务通知模板设置"""
THOST_FTDC_BFC_SyncOTP = 69
"""同步动态令牌"""
THOST_FTDC_BFC_SendBizNotice = 70
"""发送业务通知"""
THOST_FTDC_BFC_CfgRiskLevelStd = 71
"""风险级别标准设置"""
THOST_FTDC_BFC_TbCommand = 72
"""交易终端应急功能"""
THOST_FTDC_BFC_DeleteOrder = 74
"""删除未知单"""
THOST_FTDC_BFC_ParkedOrderInsert = 75
"""预埋报单插入"""
THOST_FTDC_BFC_ParkedOrderAction = 76
"""预埋报单操作"""
THOST_FTDC_BFC_ExecOrderNoCheck = 77
"""资金不够仍允许行权"""
THOST_FTDC_BFC_Designate = 78
"""指定"""
THOST_FTDC_BFC_StockDisposal = 79
"""证券处置"""
THOST_FTDC_BFC_BrokerDepositWarn = 81
"""席位资金预警"""
THOST_FTDC_BFC_CoverWarn = 83
"""备兑不足预警"""
THOST_FTDC_BFC_PreExecOrder = 84
"""行权试算"""
THOST_FTDC_BFC_ExecOrderRisk = 80
"""行权交收风险"""
THOST_FTDC_BFC_PosiLimitWarn = 85
"""持仓限额预警"""
THOST_FTDC_BFC_QryPosiLimit = 86
"""持仓限额查询"""
THOST_FTDC_BFC_FBSign = 87
"""银期签到签退"""
THOST_FTDC_BFC_FBAccount = 88
"""银期签约解约"""
class TThostFtdcOrderActionStatusType(Enum):
"""报单操作状态类型"""
THOST_FTDC_OAS_Submitted = 97
"""已经提交"""
THOST_FTDC_OAS_Accepted = 98
"""已经接受"""
THOST_FTDC_OAS_Rejected = 99
"""已经被拒绝"""
class TThostFtdcOrderStatusType(Enum):
"""报单状态类型"""
THOST_FTDC_OST_AllTraded = 48
"""全部成交"""
THOST_FTDC_OST_PartTradedQueueing = 49
"""部分成交还在队列中"""
THOST_FTDC_OST_PartTradedNotQueueing = 50
"""部分成交不在队列中"""
THOST_FTDC_OST_NoTradeQueueing = 51
"""未成交还在队列中"""
THOST_FTDC_OST_NoTradeNotQueueing = 52
"""未成交不在队列中"""
THOST_FTDC_OST_Canceled = 53
"""撤单"""
THOST_FTDC_OST_Unknown = 97
"""未知"""
THOST_FTDC_OST_NotTouched = 98
"""尚未触发"""
THOST_FTDC_OST_Touched = 99
"""已触发"""
class TThostFtdcOrderSubmitStatusType(Enum):
"""报单提交状态类型"""
THOST_FTDC_OSS_InsertSubmitted = 48
"""已经提交"""
THOST_FTDC_OSS_CancelSubmitted = 49
"""撤单已经提交"""
THOST_FTDC_OSS_ModifySubmitted = 50
"""修改已经提交"""
THOST_FTDC_OSS_Accepted = 51
"""已经接受"""
THOST_FTDC_OSS_InsertRejected = 52
"""报单已经被拒绝"""
THOST_FTDC_OSS_CancelRejected = 53
"""撤单已经被拒绝"""
THOST_FTDC_OSS_ModifyRejected = 54
"""改单已经被拒绝"""
class TThostFtdcPositionDateType(Enum):
"""持仓日期类型"""
THOST_FTDC_PSD_Today = 49
"""今日持仓"""
THOST_FTDC_PSD_History = 50
"""历史持仓"""
class TThostFtdcPositionDateTypeType(Enum):
"""持仓日期类型类型"""
THOST_FTDC_PDT_UseHistory = 49
"""使用历史持仓"""
THOST_FTDC_PDT_NoUseHistory = 50
"""不使用历史持仓"""
class TThostFtdcTradingRoleType(Enum):
"""交易角色类型"""
THOST_FTDC_ER_Broker = 49
"""代理"""
THOST_FTDC_ER_Host = 50
"""自营"""
THOST_FTDC_ER_Maker = 51
"""做市商"""
class TThostFtdcProductClassType(Enum):
"""产品类型类型"""
THOST_FTDC_PC_Futures = 49
"""期货"""
THOST_FTDC_PC_Options = 50
"""期货期权"""
THOST_FTDC_PC_Combination = 51
"""组合"""
THOST_FTDC_PC_Spot = 52
"""即期"""
THOST_FTDC_PC_EFP = 53
"""期转现"""
THOST_FTDC_PC_SpotOption = 54
"""现货期权"""
class TThostFtdcInstLifePhaseType(Enum):
"""合约生命周期状态类型"""
THOST_FTDC_IP_NotStart = 48
"""未上市"""
THOST_FTDC_IP_Started = 49
"""上市"""
THOST_FTDC_IP_Pause = 50
"""停牌"""
THOST_FTDC_IP_Expired = 51
"""到期"""
class TThostFtdcDirectionType(Enum):
"""买卖方向类型"""
THOST_FTDC_D_Buy = 48
"""买"""
THOST_FTDC_D_Sell = 49
"""卖"""
class TThostFtdcPositionTypeType(Enum):
"""持仓类型类型"""
THOST_FTDC_PT_Net = 49
"""净持仓"""
THOST_FTDC_PT_Gross = 50
"""综合持仓"""
class TThostFtdcPosiDirectionType(Enum):
"""持仓多空方向类型"""
THOST_FTDC_PD_Net = 49
"""净"""
THOST_FTDC_PD_Long = 50
"""多头"""
THOST_FTDC_PD_Short = 51
"""空头"""
class TThostFtdcSysSettlementStatusType(Enum):
"""系统结算状态类型"""
THOST_FTDC_SS_NonActive = 49
"""不活跃"""
THOST_FTDC_SS_Startup = 50
"""启动"""
THOST_FTDC_SS_Operating = 51
"""操作"""
THOST_FTDC_SS_Settlement = 52
"""结算"""
THOST_FTDC_SS_SettlementFinished = 53
"""结算完成"""
class TThostFtdcRatioAttrType(Enum):
"""费率属性类型"""
THOST_FTDC_RA_Trade = 48
"""交易费率"""
THOST_FTDC_RA_Settlement = 49
"""结算费率"""
class TThostFtdcHedgeFlagType(Enum):
"""投机套保标志类型"""
THOST_FTDC_HF_Speculation = 49
"""投机"""
THOST_FTDC_HF_Arbitrage = 50
"""套利"""
THOST_FTDC_HF_Hedge = 51
"""套保"""
THOST_FTDC_HF_MarketMaker = 53
"""做市商"""
THOST_FTDC_HF_SpecHedge = 54
"""第一腿投机第二腿套保 大商所专用"""
THOST_FTDC_HF_HedgeSpec = 55
"""第一腿套保第二腿投机 大商所专用"""
class TThostFtdcBillHedgeFlagType(Enum):
"""投机套保标志类型"""
THOST_FTDC_BHF_Speculation = 49
"""投机"""
THOST_FTDC_BHF_Arbitrage = 50
"""套利"""
THOST_FTDC_BHF_Hedge = 51
"""套保"""
class TThostFtdcClientIDTypeType(Enum):
"""交易编码类型类型"""
THOST_FTDC_CIDT_Speculation = 49
"""投机"""
THOST_FTDC_CIDT_Arbitrage = 50
"""套利"""
THOST_FTDC_CIDT_Hedge = 51
"""套保"""
THOST_FTDC_CIDT_MarketMaker = 53
"""做市商"""
class TThostFtdcOrderPriceTypeType(Enum):
"""报单价格条件类型"""
THOST_FTDC_OPT_AnyPrice = 49
"""任意价"""
THOST_FTDC_OPT_LimitPrice = 50
"""限价"""
THOST_FTDC_OPT_BestPrice = 51
"""最优价"""
THOST_FTDC_OPT_LastPrice = 52
"""最新价"""
THOST_FTDC_OPT_LastPricePlusOneTicks = 53
"""最新价浮动上浮1个ticks"""
THOST_FTDC_OPT_LastPricePlusTwoTicks = 54
"""最新价浮动上浮2个ticks"""
THOST_FTDC_OPT_LastPricePlusThreeTicks = 55
"""最新价浮动上浮3个ticks"""
THOST_FTDC_OPT_AskPrice1 = 56
"""卖一价"""
THOST_FTDC_OPT_AskPrice1PlusOneTicks = 57
"""卖一价浮动上浮1个ticks"""
THOST_FTDC_OPT_AskPrice1PlusTwoTicks = 65
"""卖一价浮动上浮2个ticks"""
THOST_FTDC_OPT_AskPrice1PlusThreeTicks = 66
"""卖一价浮动上浮3个ticks"""
THOST_FTDC_OPT_BidPrice1 = 67
"""买一价"""
THOST_FTDC_OPT_BidPrice1PlusOneTicks = 68
"""买一价浮动上浮1个ticks"""
THOST_FTDC_OPT_BidPrice1PlusTwoTicks = 69
"""买一价浮动上浮2个ticks"""
THOST_FTDC_OPT_BidPrice1PlusThreeTicks = 70
"""买一价浮动上浮3个ticks"""
THOST_FTDC_OPT_FiveLevelPrice = 71
"""五档价"""
class TThostFtdcOffsetFlagType(Enum):
"""开平标志类型"""
THOST_FTDC_OF_Open = 48
"""开仓"""
THOST_FTDC_OF_Close = 49
"""平仓"""
THOST_FTDC_OF_ForceClose = 50
"""强平"""
THOST_FTDC_OF_CloseToday = 51
"""平今"""
THOST_FTDC_OF_CloseYesterday = 52
"""平昨"""
THOST_FTDC_OF_ForceOff = 53
"""强减"""
THOST_FTDC_OF_LocalForceClose = 54
"""本地强平"""
class TThostFtdcForceCloseReasonType(Enum):
"""强平原因类型"""
THOST_FTDC_FCC_NotForceClose = 48
"""非强平"""
THOST_FTDC_FCC_LackDeposit = 49
"""资金不足"""
THOST_FTDC_FCC_ClientOverPositionLimit = 50
"""客户超仓"""
THOST_FTDC_FCC_MemberOverPositionLimit = 51
"""会员超仓"""
THOST_FTDC_FCC_NotMultiple = 52
"""持仓非整数倍"""
THOST_FTDC_FCC_Violation = 53
"""违规"""
THOST_FTDC_FCC_Other = 54
"""其它"""
THOST_FTDC_FCC_PersonDeliv = 55
"""自然人临近交割"""
class TThostFtdcOrderTypeType(Enum):
"""报单类型类型"""
THOST_FTDC_ORDT_Normal = 48
"""正常"""
THOST_FTDC_ORDT_DeriveFromQuote = 49
"""报价衍生"""
THOST_FTDC_ORDT_DeriveFromCombination = 50
"""组合衍生"""
THOST_FTDC_ORDT_Combination = 51
"""组合报单"""
THOST_FTDC_ORDT_ConditionalOrder = 52
"""条件单"""
THOST_FTDC_ORDT_Swap = 53
"""互换单"""
THOST_FTDC_ORDT_DeriveFromBlockTrade = 54
"""大宗交易成交衍生"""
THOST_FTDC_ORDT_DeriveFromEFPTrade = 55
"""期转现成交衍生"""
class TThostFtdcTimeConditionType(Enum):
"""有效期类型类型"""
THOST_FTDC_TC_IOC = 49
"""立即完成,否则撤销"""
THOST_FTDC_TC_GFS = 50
"""本节有效"""
THOST_FTDC_TC_GFD = 51
"""当日有效"""
THOST_FTDC_TC_GTD = 52
"""指定日期前有效"""
THOST_FTDC_TC_GTC = 53
"""撤销前有效"""
THOST_FTDC_TC_GFA = 54
"""集合竞价有效"""
class TThostFtdcVolumeConditionType(Enum):
"""成交量类型类型"""
THOST_FTDC_VC_AV = 49
"""任何数量"""
THOST_FTDC_VC_MV = 50
"""最小数量"""
THOST_FTDC_VC_CV = 51
"""全部数量"""
class TThostFtdcContingentConditionType(Enum):
"""触发条件类型"""
THOST_FTDC_CC_Immediately = 49
"""立即"""
THOST_FTDC_CC_Touch = 50
"""止损"""
THOST_FTDC_CC_TouchProfit = 51
"""止赢"""
THOST_FTDC_CC_ParkedOrder = 52
"""预埋单"""
THOST_FTDC_CC_LastPriceGreaterThanStopPrice = 53
"""最新价大于条件价"""
THOST_FTDC_CC_LastPriceGreaterEqualStopPrice = 54
"""最新价大于等于条件价"""
THOST_FTDC_CC_LastPriceLesserThanStopPrice = 55
"""最新价小于条件价"""
THOST_FTDC_CC_LastPriceLesserEqualStopPrice = 56
"""最新价小于等于条件价"""
THOST_FTDC_CC_AskPriceGreaterThanStopPrice = 57
"""卖一价大于条件价"""
THOST_FTDC_CC_AskPriceGreaterEqualStopPrice = 65
"""卖一价大于等于条件价"""
THOST_FTDC_CC_AskPriceLesserThanStopPrice = 66
"""卖一价小于条件价"""
THOST_FTDC_CC_AskPriceLesserEqualStopPrice = 67
"""卖一价小于等于条件价"""
THOST_FTDC_CC_BidPriceGreaterThanStopPrice = 68
"""买一价大于条件价"""
THOST_FTDC_CC_BidPriceGreaterEqualStopPrice = 69
"""买一价大于等于条件价"""
THOST_FTDC_CC_BidPriceLesserThanStopPrice = 70
"""买一价小于条件价"""
THOST_FTDC_CC_BidPriceLesserEqualStopPrice = 72
"""买一价小于等于条件价"""
class TThostFtdcActionFlagType(Enum):
"""操作标志类型"""
THOST_FTDC_AF_Delete = 48
"""删除"""
THOST_FTDC_AF_Modify = 51
"""修改"""
class TThostFtdcTradingRightType(Enum):
"""交易权限类型"""
THOST_FTDC_TR_Allow = 48
"""可以交易"""
THOST_FTDC_TR_CloseOnly = 49
"""只能平仓"""
THOST_FTDC_TR_Forbidden = 50
"""不能交易"""
class TThostFtdcOrderSourceType(Enum):
"""报单来源类型"""
THOST_FTDC_OSRC_Participant = 48
"""来自参与者"""
THOST_FTDC_OSRC_Administrator = 49
"""来自管理员"""
class TThostFtdcTradeTypeType(Enum):
"""成交类型类型"""
THOST_FTDC_TRDT_SplitCombinatio = 110
"""组合持仓拆分为单一持仓,初始化不应包含该类型的持仓"""
THOST_FTDC_TRDT_Common = 48
"""普通成交"""
THOST_FTDC_TRDT_OptionsExecution = 49
"""期权执行"""
THOST_FTDC_TRDT_OTC = 50
"""OTC成交"""
THOST_FTDC_TRDT_EFPDerived = 51
"""期转现衍生成交"""
THOST_FTDC_TRDT_CombinationDerived = 52
"""组合衍生成交"""
THOST_FTDC_TRDT_BlockTrade = 53
"""大宗交易成交"""
class TThostFtdcPriceSourceType(Enum):
"""成交价来源类型"""
THOST_FTDC_PSRC_LastPrice = 48
"""前成交价"""
THOST_FTDC_PSRC_Buy = 49
"""买委托价"""
THOST_FTDC_PSRC_Sell = 50
"""卖委托价"""
THOST_FTDC_PSRC_OTC = 51
"""场外成交价"""
class TThostFtdcInstrumentStatusType(Enum):
"""合约交易状态类型"""
THOST_FTDC_IS_BeforeTrading = 48
"""开盘前"""
THOST_FTDC_IS_NoTrading = 49
"""非交易"""
THOST_FTDC_IS_Continous = 50
"""连续交易"""
THOST_FTDC_IS_AuctionOrdering = 51
"""集合竞价报单"""
THOST_FTDC_IS_AuctionBalance = 52
"""集合竞价价格平衡"""
THOST_FTDC_IS_AuctionMatch = 53
"""集合竞价撮合"""
THOST_FTDC_IS_Closed = 54
"""收盘"""
class TThostFtdcInstStatusEnterReasonType(Enum):
"""品种进入交易状态原因类型"""
THOST_FTDC_IER_Automatic = 49
"""自动切换"""
THOST_FTDC_IER_Manual = 50
"""手动切换"""
THOST_FTDC_IER_Fuse = 51
"""熔断"""
class TThostFtdcBatchStatusType(Enum):
"""处理状态类型"""
THOST_FTDC_BS_NoUpload = 49
"""未上传"""
THOST_FTDC_BS_Uploaded = 50
"""已上传"""
THOST_FTDC_BS_Failed = 51
"""审核失败"""
class TThostFtdcReturnStyleType(Enum):
"""按品种返还方式类型"""
THOST_FTDC_RS_All = 49
"""按所有品种"""
THOST_FTDC_RS_ByProduct = 50
"""按品种"""
class TThostFtdcReturnPatternType(Enum):
"""返还模式类型"""
THOST_FTDC_RP_ByVolume = 49
"""按成交手数"""
THOST_FTDC_RP_ByFeeOnHand = 50
"""按留存手续费"""
class TThostFtdcReturnLevelType(Enum):
"""返还级别类型"""
THOST_FTDC_RL_Level1 = 49
"""级别1"""
THOST_FTDC_RL_Level2 = 50
"""级别2"""
THOST_FTDC_RL_Level3 = 51
"""级别3"""
THOST_FTDC_RL_Level4 = 52
"""级别4"""
THOST_FTDC_RL_Level5 = 53
"""级别5"""
THOST_FTDC_RL_Level6 = 54
"""级别6"""
THOST_FTDC_RL_Level7 = 55
"""级别7"""
THOST_FTDC_RL_Level8 = 56
"""级别8"""
THOST_FTDC_RL_Level9 = 57
"""级别9"""
class TThostFtdcReturnStandardType(Enum):
"""返还标准类型"""
THOST_FTDC_RSD_ByPeriod = 49
"""分阶段返还"""
THOST_FTDC_RSD_ByStandard = 50
"""按某一标准"""
class TThostFtdcMortgageTypeType(Enum):
"""质押类型类型"""
THOST_FTDC_MT_Out = 48
"""质出"""
THOST_FTDC_MT_In = 49
"""质入"""
class TThostFtdcInvestorSettlementParamIDType(Enum):
"""投资者结算参数代码类型"""
THOST_FTDC_ISPI_MortgageRatio = 52
"""质押比例"""
THOST_FTDC_ISPI_MarginWay = 53
"""保证金算法"""
THOST_FTDC_ISPI_BillDeposit = 57
"""结算单结存是否包含质押"""
class TThostFtdcExchangeSettlementParamIDType(Enum):
"""交易所结算参数代码类型"""
THOST_FTDC_ESPI_MortgageRatio = 49
"""质押比例"""
THOST_FTDC_ESPI_OtherFundItem = 50
"""分项资金导入项"""
THOST_FTDC_ESPI_OtherFundImport = 51
"""分项资金入交易所出入金"""
THOST_FTDC_ESPI_CFFEXMinPrepa = 54
"""中金所开户最低可用金额"""
THOST_FTDC_ESPI_CZCESettlementType = 55
"""郑商所结算方式"""
THOST_FTDC_ESPI_ExchDelivFeeMode = 57
"""交易所交割手续费收取方式"""
THOST_FTDC_ESPI_DelivFeeMode = 48
"""投资者交割手续费收取方式"""
THOST_FTDC_ESPI_CZCEComMarginType = 65
"""郑商所组合持仓保证金收取方式"""
THOST_FTDC_ESPI_DceComMarginType = 66
"""大商所套利保证金是否优惠"""
THOST_FTDC_ESPI_OptOutDisCountRate = 97
"""虚值期权保证金优惠比率"""
THOST_FTDC_ESPI_OptMiniGuarantee = 98
"""最低保障系数"""
class TThostFtdcSystemParamIDType(Enum):
"""系统参数代码类型"""
THOST_FTDC_SPI_InvestorIDMinLength = 49
"""投资者代码最小长度"""
THOST_FTDC_SPI_AccountIDMinLength = 50
"""投资者帐号代码最小长度"""
THOST_FTDC_SPI_UserRightLogon = 51
"""投资者开户默认登录权限"""
THOST_FTDC_SPI_SettlementBillTrade = 52
"""投资者交易结算单成交汇总方式"""
THOST_FTDC_SPI_TradingCode = 53
"""统一开户更新交易编码方式"""
THOST_FTDC_SPI_CheckFund = 54
"""结算是否判断存在未复核的出入金和分项资金"""
THOST_FTDC_SPI_CommModelRight = 55
"""是否启用手续费模板数据权限"""
THOST_FTDC_SPI_MarginModelRight = 57
"""是否启用保证金率模板数据权限"""
THOST_FTDC_SPI_IsStandardActive = 56
"""是否规范用户才能激活"""
THOST_FTDC_SPI_UploadSettlementFile = 85
"""上传的交易所结算文件路径"""
THOST_FTDC_SPI_DownloadCSRCFile = 68
"""上报保证金监控中心文件路径"""
THOST_FTDC_SPI_SettlementBillFile = 83
"""生成的结算单文件路径"""
THOST_FTDC_SPI_CSRCOthersFile = 67
"""证监会文件标识"""
THOST_FTDC_SPI_InvestorPhoto = 80
"""投资者照片路径"""
THOST_FTDC_SPI_CSRCData = 82
"""全结经纪公司上传文件路径"""
THOST_FTDC_SPI_InvestorPwdModel = 73
"""开户密码录入方式"""
THOST_FTDC_SPI_CFFEXInvestorSettleFile = 70
"""投资者中金所结算文件下载路径"""
THOST_FTDC_SPI_InvestorIDType = 97
"""投资者代码编码方式"""
THOST_FTDC_SPI_FreezeMaxReMain = 114
"""休眠户最高权益"""
THOST_FTDC_SPI_IsSync = 65
"""手续费相关操作实时上场开关"""
THOST_FTDC_SPI_RelieveOpenLimit = 79
"""解除开仓权限限制"""
THOST_FTDC_SPI_IsStandardFreeze = 88
"""是否规范用户才能休眠"""
THOST_FTDC_SPI_CZCENormalProductHedge = 66
"""郑商所是否开放所有品种套保交易"""
class TThostFtdcTradeParamIDType(Enum):
"""交易系统参数代码类型"""
THOST_FTDC_TPID_EncryptionStandard = 69
"""系统加密算法"""
THOST_FTDC_TPID_RiskMode = 82
"""系统风险算法"""
THOST_FTDC_TPID_RiskModeGlobal = 71
"""系统风险算法是否全局 0-否 1-是"""
THOST_FTDC_TPID_modeEncode = 80
"""密码加密算法"""
THOST_FTDC_TPID_tickMode = 84
"""价格小数位数参数"""
THOST_FTDC_TPID_SingleUserSessionMaxNum = 83
"""用户最大会话数"""
THOST_FTDC_TPID_LoginFailMaxNum = 76
"""最大连续登录失败数"""
THOST_FTDC_TPID_IsAuthForce = 65
"""是否强制认证"""
THOST_FTDC_TPID_IsPosiFreeze = 70
"""是否冻结证券持仓"""
THOST_FTDC_TPID_IsPosiLimit = 77
"""是否限仓"""
THOST_FTDC_TPID_ForQuoteTimeInterval = 81
"""郑商所询价时间间隔"""
THOST_FTDC_TPID_IsFuturePosiLimit = 66
"""是否期货限仓"""
THOST_FTDC_TPID_IsFutureOrderFreq = 67
"""是否期货下单频率限制"""
THOST_FTDC_TPID_IsExecOrderProfit = 72
"""行权冻结是否计算盈利"""
THOST_FTDC_TPID_IsCheckBankAcc = 73
"""银期开户是否验证开户银行卡号是否是预留银行账户"""
THOST_FTDC_TPID_PasswordDeadLine = 74
"""弱密码最后修改日期"""
THOST_FTDC_TPID_IsStrongPassword = 75
"""强密码校验"""
THOST_FTDC_TPID_BalanceMorgage = 97
"""自有资金质押比"""
THOST_FTDC_TPID_MinPwdLen = 79
"""最小密码长度"""
THOST_FTDC_TPID_LoginFailMaxNumForIP = 85
"""IP当日最大登陆失败次数"""
THOST_FTDC_TPID_PasswordPeriod = 86
"""密码有效期"""
class TThostFtdcFileIDType(Enum):
"""文件标识类型"""
THOST_FTDC_FI_SettlementFund = 70
"""资金数据"""
THOST_FTDC_FI_Trade = 84
"""成交数据"""
THOST_FTDC_FI_InvestorPosition = 80
"""投资者持仓数据"""
THOST_FTDC_FI_SubEntryFund = 79
"""投资者分项资金数据"""
THOST_FTDC_FI_CZCECombinationPos = 67
"""组合持仓数据"""
THOST_FTDC_FI_CSRCData = 82
"""上报保证金监控中心数据"""
THOST_FTDC_FI_CZCEClose = 76
"""郑商所平仓了结数据"""
THOST_FTDC_FI_CZCENoClose = 78
"""郑商所非平仓了结数据"""
THOST_FTDC_FI_PositionDtl = 68
"""持仓明细数据"""
THOST_FTDC_FI_OptionStrike = 83
"""期权执行文件"""
THOST_FTDC_FI_SettlementPriceComparison = 77
"""结算价比对文件"""
THOST_FTDC_FI_NonTradePosChange = 66
"""上期所非持仓变动明细"""
class TThostFtdcFileTypeType(Enum):
"""文件上传类型类型"""
THOST_FTDC_FUT_Settlement = 48
"""结算"""
THOST_FTDC_FUT_Check = 49
"""核对"""
class TThostFtdcFileFormatType(Enum):
"""文件格式类型"""
THOST_FTDC_FFT_Txt = 48
"""文本文件(.txt)"""
THOST_FTDC_FFT_Zip = 49
"""压缩文件(.zip)"""
THOST_FTDC_FFT_DBF = 50
"""DBF文件(.dbf)"""
class TThostFtdcFileUploadStatusType(Enum):
"""文件状态类型"""
THOST_FTDC_FUS_SucceedUpload = 49
"""上传成功"""
THOST_FTDC_FUS_FailedUpload = 50
"""上传失败"""
THOST_FTDC_FUS_SucceedLoad = 51
"""导入成功"""
THOST_FTDC_FUS_PartSucceedLoad = 52
"""导入部分成功"""
THOST_FTDC_FUS_FailedLoad = 53
"""导入失败"""
class TThostFtdcTransferDirectionType(Enum):
"""移仓方向类型"""
THOST_FTDC_TD_Out = 48
"""移出"""
THOST_FTDC_TD_In = 49
"""移入"""
class TThostFtdcSpecialCreateRuleType(Enum):
"""特殊的创建规则类型"""
THOST_FTDC_SC_NoSpecialRule = 48
"""没有特殊创建规则"""
THOST_FTDC_SC_NoSpringFestival = 49
"""不包含春节"""
class TThostFtdcBasisPriceTypeType(Enum):
"""挂牌基准价类型类型"""
THOST_FTDC_IPT_LastSettlement = 49
"""上一合约结算价"""
THOST_FTDC_IPT_LaseClose = 50
"""上一合约收盘价"""
class TThostFtdcProductLifePhaseType(Enum):
"""产品生命周期状态类型"""
THOST_FTDC_PLP_Active = 49
"""活跃"""
THOST_FTDC_PLP_NonActive = 50
"""不活跃"""
THOST_FTDC_PLP_Canceled = 51
"""注销"""
class TThostFtdcDeliveryModeType(Enum):
"""交割方式类型"""
THOST_FTDC_DM_CashDeliv = 49
"""现金交割"""
THOST_FTDC_DM_CommodityDeliv = 50
"""实物交割"""
class TThostFtdcFundIOTypeType(Enum):
"""出入金类型类型"""
THOST_FTDC_FIOT_FundIO = 49
"""出入金"""
THOST_FTDC_FIOT_Transfer = 50
"""银期转帐"""
THOST_FTDC_FIOT_SwapCurrency = 51
"""银期换汇"""
class TThostFtdcFundTypeType(Enum):
"""资金类型类型"""
THOST_FTDC_FT_Deposite = 49
"""银行存款"""
THOST_FTDC_FT_ItemFund = 50
"""分项资金"""
THOST_FTDC_FT_Company = 51
"""公司调整"""
THOST_FTDC_FT_InnerTransfer = 52
"""资金内转"""
class TThostFtdcFundDirectionType(Enum):
"""出入金方向类型"""
THOST_FTDC_FD_In = 49
"""入金"""
THOST_FTDC_FD_Out = 50
"""出金"""
class TThostFtdcFundStatusType(Enum):
"""资金状态类型"""
THOST_FTDC_FS_Record = 49
"""已录入"""
THOST_FTDC_FS_Check = 50
"""已复核"""
THOST_FTDC_FS_Charge = 51
"""已冲销"""
class TThostFtdcPublishStatusType(Enum):
"""发布状态类型"""
THOST_FTDC_PS_None = 49
"""未发布"""
THOST_FTDC_PS_Publishing = 50
"""正在发布"""
THOST_FTDC_PS_Published = 51
"""已发布"""
class TThostFtdcSystemStatusType(Enum):
"""系统状态类型"""
THOST_FTDC_ES_NonActive = 49
"""不活跃"""
THOST_FTDC_ES_Startup = 50
"""启动"""
THOST_FTDC_ES_Initialize = 51
"""交易开始初始化"""
THOST_FTDC_ES_Initialized = 52
"""交易完成初始化"""
THOST_FTDC_ES_Close = 53
"""收市开始"""
THOST_FTDC_ES_Closed = 54
"""收市完成"""
THOST_FTDC_ES_Settlement = 55
"""结算"""
class TThostFtdcSettlementStatusType(Enum):
"""结算状态类型"""
THOST_FTDC_STS_Initialize = 48
"""初始"""
THOST_FTDC_STS_Settlementing = 49
"""结算中"""
THOST_FTDC_STS_Settlemented = 50
"""已结算"""
THOST_FTDC_STS_Finished = 51
"""结算完成"""
class TThostFtdcInvestorTypeType(Enum):
"""投资者类型类型"""
THOST_FTDC_CT_Person = 48
"""自然人"""
THOST_FTDC_CT_Company = 49
"""法人"""
THOST_FTDC_CT_Fund = 50
"""投资基金"""
THOST_FTDC_CT_SpecialOrgan = 51
"""特殊法人"""
THOST_FTDC_CT_Asset = 52
"""资管户"""
class TThostFtdcBrokerTypeType(Enum):
"""经纪公司类型类型"""
THOST_FTDC_BT_Trade = 48
"""交易会员"""
THOST_FTDC_BT_TradeSettle = 49
"""交易结算会员"""
class TThostFtdcRiskLevelType(Enum):
"""风险等级类型"""
THOST_FTDC_FAS_Low = 49
"""低风险客户"""
THOST_FTDC_FAS_Normal = 50
"""普通客户"""
THOST_FTDC_FAS_Focus = 51
"""关注客户"""
THOST_FTDC_FAS_Risk = 52
"""风险客户"""
class TThostFtdcFeeAcceptStyleType(Enum):
"""手续费收取方式类型"""
THOST_FTDC_FAS_ByTrade = 49
"""按交易收取"""
THOST_FTDC_FAS_ByDeliv = 50
"""按交割收取"""
THOST_FTDC_FAS_None = 51
"""不收"""
THOST_FTDC_FAS_FixFee = 52
"""按指定手续费收取"""
class TThostFtdcPasswordTypeType(Enum):
"""密码类型类型"""
THOST_FTDC_PWDT_Trade = 49
"""交易密码"""
THOST_FTDC_PWDT_Account = 50
"""资金密码"""
class TThostFtdcAlgorithmType(Enum):
"""盈亏算法类型"""
THOST_FTDC_AG_All = 49
"""浮盈浮亏都计算"""
THOST_FTDC_AG_OnlyLost = 50
"""浮盈不计,浮亏计"""
THOST_FTDC_AG_OnlyGain = 51
"""浮盈计,浮亏不计"""
THOST_FTDC_AG_None = 52
"""浮盈浮亏都不计算"""
class TThostFtdcIncludeCloseProfitType(Enum):
"""是否包含平仓盈利类型"""
THOST_FTDC_ICP_Include = 48
"""包含平仓盈利"""
THOST_FTDC_ICP_NotInclude = 50
"""不包含平仓盈利"""
class TThostFtdcAllWithoutTradeType(Enum):
"""是否受可提比例限制类型"""
THOST_FTDC_AWT_Enable = 48
"""无仓无成交不受可提比例限制"""
THOST_FTDC_AWT_Disable = 50
"""受可提比例限制"""
THOST_FTDC_AWT_NoHoldEnable = 51
"""无仓不受可提比例限制"""
class TThostFtdcFuturePwdFlagType(Enum):
"""资金密码核对标志类型"""
THOST_FTDC_FPWD_UnCheck = 48
"""不核对"""
THOST_FTDC_FPWD_Check = 49
"""核对"""
class TThostFtdcTransferTypeType(Enum):
"""银期转账类型类型"""
THOST_FTDC_TT_BankToFuture = 48
"""银行转期货"""
THOST_FTDC_TT_FutureToBank = 49
"""期货转银行"""
class TThostFtdcTransferValidFlagType(Enum):
"""转账有效标志类型"""
THOST_FTDC_TVF_Invalid = 48
"""无效或失败"""
THOST_FTDC_TVF_Valid = 49
"""有效"""
THOST_FTDC_TVF_Reverse = 50
"""冲正"""
class TThostFtdcReasonType(Enum):
"""事由类型"""
THOST_FTDC_RN_CD = 48
"""错单"""
THOST_FTDC_RN_ZT = 49
"""资金在途"""
THOST_FTDC_RN_QT = 50
"""其它"""
class TThostFtdcSexType(Enum):
"""性别类型"""
THOST_FTDC_SEX_None = 48
"""未知"""
THOST_FTDC_SEX_Man = 49
"""男"""
THOST_FTDC_SEX_Woman = 50
"""女"""
class TThostFtdcUserTypeType(Enum):
"""用户类型类型"""
THOST_FTDC_UT_Investor = 48
"""投资者"""
THOST_FTDC_UT_Operator = 49
"""操作员"""
THOST_FTDC_UT_SuperUser = 50
"""管理员"""
class TThostFtdcRateTypeType(Enum):
"""费率类型类型"""
THOST_FTDC_RATETYPE_MarginRate = 50
"""保证金率"""
class TThostFtdcNoteTypeType(Enum):
"""通知类型类型"""
THOST_FTDC_NOTETYPE_TradeSettleBill = 49
"""交易结算单"""
THOST_FTDC_NOTETYPE_TradeSettleMonth = 50
"""交易结算月报"""
THOST_FTDC_NOTETYPE_CallMarginNotes = 51
"""追加保证金通知书"""
THOST_FTDC_NOTETYPE_ForceCloseNotes = 52
"""强行平仓通知书"""
THOST_FTDC_NOTETYPE_TradeNotes = 53
"""成交通知书"""
THOST_FTDC_NOTETYPE_DelivNotes = 54
"""交割通知书"""
class TThostFtdcSettlementStyleType(Enum):
"""结算单方式类型"""
THOST_FTDC_SBS_Day = 49
"""逐日盯市"""
THOST_FTDC_SBS_Volume = 50
"""逐笔对冲"""
class TThostFtdcSettlementBillTypeType(Enum):
"""结算单类型类型"""
THOST_FTDC_ST_Day = 48
"""日报"""
THOST_FTDC_ST_Month = 49
"""月报"""
class TThostFtdcUserRightTypeType(Enum):
"""客户权限类型类型"""
THOST_FTDC_URT_Logon = 49
"""登录"""
THOST_FTDC_URT_Transfer = 50
"""银期转帐"""
THOST_FTDC_URT_EMail = 51
"""邮寄结算单"""
THOST_FTDC_URT_Fax = 52
"""传真结算单"""
THOST_FTDC_URT_ConditionOrder = 53
"""条件单"""
class TThostFtdcMarginPriceTypeType(Enum):
"""保证金价格类型类型"""
THOST_FTDC_MPT_PreSettlementPrice = 49
"""昨结算价"""
THOST_FTDC_MPT_SettlementPrice = 50
"""最新价"""
THOST_FTDC_MPT_AveragePrice = 51
"""成交均价"""
THOST_FTDC_MPT_OpenPrice = 52
"""开仓价"""
class TThostFtdcBillGenStatusType(Enum):
"""结算单生成状态类型"""
THOST_FTDC_BGS_None = 48
"""未生成"""
THOST_FTDC_BGS_NoGenerated = 49
"""生成中"""
THOST_FTDC_BGS_Generated = 50
"""已生成"""
class TThostFtdcAlgoTypeType(Enum):
"""算法类型类型"""
THOST_FTDC_AT_HandlePositionAlgo = 49
"""持仓处理算法"""
THOST_FTDC_AT_FindMarginRateAlgo = 50
"""寻找保证金率算法"""
class TThostFtdcHandlePositionAlgoIDType(Enum):
"""持仓处理算法编号类型"""
THOST_FTDC_HPA_Base = 49
"""基本"""
THOST_FTDC_HPA_DCE = 50
"""大连商品交易所"""
THOST_FTDC_HPA_CZCE = 51
"""郑州商品交易所"""
class TThostFtdcFindMarginRateAlgoIDType(Enum):
"""寻找保证金率算法编号类型"""
THOST_FTDC_FMRA_Base = 49
"""基本"""
THOST_FTDC_FMRA_DCE = 50
"""大连商品交易所"""
THOST_FTDC_FMRA_CZCE = 51
"""郑州商品交易所"""
class TThostFtdcHandleTradingAccountAlgoIDType(Enum):
"""资金处理算法编号类型"""
THOST_FTDC_HTAA_Base = 49
"""基本"""
THOST_FTDC_HTAA_DCE = 50
"""大连商品交易所"""
THOST_FTDC_HTAA_CZCE = 51
"""郑州商品交易所"""
class TThostFtdcPersonTypeType(Enum):
"""联系人类型类型"""
THOST_FTDC_PST_Order = 49
"""指定下单人"""
THOST_FTDC_PST_Open = 50
"""开户授权人"""
THOST_FTDC_PST_Fund = 51
"""资金调拨人"""
THOST_FTDC_PST_Settlement = 52
"""结算单确认人"""
THOST_FTDC_PST_Company = 53
"""法人"""
THOST_FTDC_PST_Corporation = 54
"""法人代表"""
THOST_FTDC_PST_LinkMan = 55
"""投资者联系人"""
THOST_FTDC_PST_Ledger = 56
"""分户管理资产负责人"""
THOST_FTDC_PST_Trustee = 57
"""托(保)管人"""
THOST_FTDC_PST_TrusteeCorporation = 65
"""托(保)管机构法人代表"""
THOST_FTDC_PST_TrusteeOpen = 66
"""托(保)管机构开户授权人"""
THOST_FTDC_PST_TrusteeContact = 67
"""托(保)管机构联系人"""
THOST_FTDC_PST_ForeignerRefer = 68
"""境外自然人参考证件"""
THOST_FTDC_PST_CorporationRefer = 69
"""法人代表参考证件"""
class TThostFtdcQueryInvestorRangeType(Enum):
"""查询范围类型"""
THOST_FTDC_QIR_All = 49
"""所有"""
THOST_FTDC_QIR_Group = 50
"""查询分类"""
THOST_FTDC_QIR_Single = 51
"""单一投资者"""
class TThostFtdcInvestorRiskStatusType(Enum):
"""投资者风险状态类型"""
THOST_FTDC_IRS_Normal = 49
"""正常"""
THOST_FTDC_IRS_Warn = 50
"""警告"""
THOST_FTDC_IRS_Call = 51
"""追保"""
THOST_FTDC_IRS_Force = 52
"""强平"""
THOST_FTDC_IRS_Exception = 53
"""异常"""
class TThostFtdcUserEventTypeType(Enum):
"""用户事件类型类型"""
THOST_FTDC_UET_Login = 49
"""登录"""
THOST_FTDC_UET_Logout = 50
"""登出"""
THOST_FTDC_UET_Trading = 51
"""交易成功"""
THOST_FTDC_UET_TradingError = 52
"""交易失败"""
THOST_FTDC_UET_UpdatePassword = 53
"""修改密码"""
THOST_FTDC_UET_Authenticate = 54
"""客户端认证"""
THOST_FTDC_UET_Other = 57
"""其他"""
class TThostFtdcCloseStyleType(Enum):
"""平仓方式类型"""
THOST_FTDC_ICS_Close = 48
"""先开先平"""
THOST_FTDC_ICS_CloseToday = 49
"""先平今再平昨"""
class TThostFtdcStatModeType(Enum):
"""统计方式类型"""
THOST_FTDC_SM_Non = 48
"""----"""
THOST_FTDC_SM_Instrument = 49
"""按合约统计"""
THOST_FTDC_SM_Product = 50
"""按产品统计"""
THOST_FTDC_SM_Investor = 51
"""按投资者统计"""
class TThostFtdcParkedOrderStatusType(Enum):
"""预埋单状态类型"""
THOST_FTDC_PAOS_NotSend = 49
"""未发送"""
THOST_FTDC_PAOS_Send = 50
"""已发送"""
THOST_FTDC_PAOS_Deleted = 51
"""已删除"""
class TThostFtdcVirDealStatusType(Enum):
"""处理状态类型"""
THOST_FTDC_VDS_Dealing = 49
"""正在处理"""
THOST_FTDC_VDS_DeaclSucceed = 50
"""处理成功"""
class TThostFtdcOrgSystemIDType(Enum):
"""原有系统代码类型"""
THOST_FTDC_ORGS_Standard = 48
"""综合交易平台"""
THOST_FTDC_ORGS_ESunny = 49
"""易盛系统"""
THOST_FTDC_ORGS_KingStarV6 = 50
"""金仕达V6系统"""
class TThostFtdcVirTradeStatusType(Enum):
"""交易状态类型"""
THOST_FTDC_VTS_NaturalDeal = 48
"""正常处理中"""
THOST_FTDC_VTS_SucceedEnd = 49
"""成功结束"""
THOST_FTDC_VTS_FailedEND = 50
"""失败结束"""
THOST_FTDC_VTS_Exception = 51
"""异常中"""
THOST_FTDC_VTS_ManualDeal = 52
"""已人工异常处理"""
THOST_FTDC_VTS_MesException = 53
"""通讯异常 ,请人工处理"""
THOST_FTDC_VTS_SysException = 54
"""系统出错,请人工处理"""
class TThostFtdcVirBankAccTypeType(Enum):
"""银行帐户类型类型"""
THOST_FTDC_VBAT_BankBook = 49
"""存折"""
THOST_FTDC_VBAT_BankCard = 50
"""储蓄卡"""
THOST_FTDC_VBAT_CreditCard = 51
"""信用卡"""
class TThostFtdcVirementStatusType(Enum):
"""银行帐户类型类型"""
THOST_FTDC_VMS_Natural = 48
"""正常"""
THOST_FTDC_VMS_Canceled = 57
"""销户"""
class TThostFtdcVirementAvailAbilityType(Enum):
"""有效标志类型"""
THOST_FTDC_VAA_NoAvailAbility = 48
"""未确认"""
THOST_FTDC_VAA_AvailAbility = 49
"""有效"""
THOST_FTDC_VAA_Repeal = 50
"""冲正"""
class TThostFtdcVirementTradeCodeType(Enum):
"""交易代码类型"""
THOST_FTDC_VTC_BankBankToFuture = 49
"""银行发起银行资金转期货"""
THOST_FTDC_VTC_BankFutureToBank = 50
"""银行发起期货资金转银行"""
THOST_FTDC_VTC_FutureBankToFuture = 49
"""期货发起银行资金转期货"""
THOST_FTDC_VTC_FutureFutureToBank = 50
"""期货发起期货资金转银行"""
class TThostFtdcAMLGenStatusType(Enum):
"""Aml生成方式类型"""
THOST_FTDC_GEN_Program = 48
"""程序生成"""
THOST_FTDC_GEN_HandWork = 49
"""人工生成"""
class TThostFtdcCFMMCKeyKindType(Enum):
"""动态密钥类别(保证金监管)类型"""
THOST_FTDC_CFMMCKK_REQUEST = 82
"""主动请求更新"""
THOST_FTDC_CFMMCKK_AUTO = 65
"""CFMMC自动更新"""
THOST_FTDC_CFMMCKK_MANUAL = 77
"""CFMMC手动更新"""
class TThostFtdcCertificationTypeType(Enum):
"""证件类型类型"""
THOST_FTDC_CFT_IDCard = 48
"""身份证"""
THOST_FTDC_CFT_Passport = 49
"""护照"""
THOST_FTDC_CFT_OfficerIDCard = 50
"""军官证"""
THOST_FTDC_CFT_SoldierIDCard = 51
"""士兵证"""
THOST_FTDC_CFT_HomeComingCard = 52
"""回乡证"""
THOST_FTDC_CFT_HouseholdRegister = 53
"""户口簿"""
THOST_FTDC_CFT_LicenseNo = 54
"""营业执照号"""
THOST_FTDC_CFT_InstitutionCodeCard = 55
"""组织机构代码证"""
THOST_FTDC_CFT_TempLicenseNo = 56
"""临时营业执照号"""
THOST_FTDC_CFT_NoEnterpriseLicenseNo = 57
"""民办非企业登记证书"""
THOST_FTDC_CFT_OtherCard = 120
"""其他证件"""
THOST_FTDC_CFT_SuperDepAgree = 97
"""主管部门批文"""
class TThostFtdcFileBusinessCodeType(Enum):
"""文件业务功能类型"""
THOST_FTDC_FBC_Others = 48
"""其他"""
THOST_FTDC_FBC_TransferDetails = 49
"""转账交易明细对账"""
THOST_FTDC_FBC_CustAccStatus = 50
"""客户账户状态对账"""
THOST_FTDC_FBC_AccountTradeDetails = 51
"""账户类交易明细对账"""
THOST_FTDC_FBC_FutureAccountChangeInfoDetails = 52
"""期货账户信息变更明细对账"""
THOST_FTDC_FBC_CustMoneyDetail = 53
"""客户资金台账余额明细对账"""
THOST_FTDC_FBC_CustCancelAccountInfo = 54
"""客户销户结息明细对账"""
THOST_FTDC_FBC_CustMoneyResult = 55
"""客户资金余额对账结果"""
THOST_FTDC_FBC_OthersExceptionResult = 56
"""其它对账异常结果文件"""
THOST_FTDC_FBC_CustInterestNetMoneyDetails = 57
"""客户结息净额明细"""
THOST_FTDC_FBC_CustMoneySendAndReceiveDetails = 97
"""客户资金交收明细"""
THOST_FTDC_FBC_CorporationMoneyTotal = 98
"""法人存管银行资金交收汇总"""
THOST_FTDC_FBC_MainbodyMoneyTotal = 99
"""主体间资金交收汇总"""
THOST_FTDC_FBC_MainPartMonitorData = 100
"""总分平衡监管数据"""
THOST_FTDC_FBC_PreparationMoney = 101
"""存管银行备付金余额"""
THOST_FTDC_FBC_BankMoneyMonitorData = 102
"""协办存管银行资金监管数据"""
class TThostFtdcCashExchangeCodeType(Enum):
"""汇钞标志类型"""
THOST_FTDC_CEC_Exchange = 49
"""汇"""
THOST_FTDC_CEC_Cash = 50
"""钞"""
class TThostFtdcYesNoIndicatorType(Enum):
"""是或否标识类型"""
THOST_FTDC_YNI_Yes = 48
"""是"""
THOST_FTDC_YNI_No = 49
"""否"""
class TThostFtdcBanlanceTypeType(Enum):
"""余额类型类型"""
THOST_FTDC_BLT_CurrentMoney = 48
"""当前余额"""
THOST_FTDC_BLT_UsableMoney = 49
"""可用余额"""
THOST_FTDC_BLT_FetchableMoney = 50
"""可取余额"""
THOST_FTDC_BLT_FreezeMoney = 51
"""冻结余额"""
class TThostFtdcGenderType(Enum):
"""性别类型"""
THOST_FTDC_GD_Unknown = 48
"""未知状态"""
THOST_FTDC_GD_Male = 49
"""男"""
THOST_FTDC_GD_Female = 50
"""女"""
class TThostFtdcFeePayFlagType(Enum):
"""费用支付标志类型"""
THOST_FTDC_FPF_BEN = 48
"""由受益方支付费用"""
THOST_FTDC_FPF_OUR = 49
"""由发送方支付费用"""
THOST_FTDC_FPF_SHA = 50
"""由发送方支付发起的费用,受益方支付接受的费用"""
class TThostFtdcPassWordKeyTypeType(Enum):
"""密钥类型类型"""
THOST_FTDC_PWKT_ExchangeKey = 48
"""交换密钥"""
THOST_FTDC_PWKT_PassWordKey = 49
"""密码密钥"""
THOST_FTDC_PWKT_MACKey = 50
"""MAC密钥"""
THOST_FTDC_PWKT_MessageKey = 51
"""报文密钥"""
class TThostFtdcFBTPassWordTypeType(Enum):
"""密码类型类型"""
THOST_FTDC_PWT_Query = 48
"""查询"""
THOST_FTDC_PWT_Fetch = 49
"""取款"""
THOST_FTDC_PWT_Transfer = 50
"""转帐"""
THOST_FTDC_PWT_Trade = 51
"""交易"""
class TThostFtdcFBTEncryModeType(Enum):
"""加密方式类型"""
THOST_FTDC_EM_NoEncry = 48
"""不加密"""
THOST_FTDC_EM_DES = 49
"""DES"""
THOST_FTDC_EM_3DES = 50
"""3DES"""
class TThostFtdcBankRepealFlagType(Enum):
"""银行冲正标志类型"""
THOST_FTDC_BRF_BankNotNeedRepeal = 48
"""银行无需自动冲正"""
THOST_FTDC_BRF_BankWaitingRepeal = 49
"""银行待自动冲正"""
THOST_FTDC_BRF_BankBeenRepealed = 50
"""银行已自动冲正"""
class TThostFtdcBrokerRepealFlagType(Enum):
"""期商冲正标志类型"""
THOST_FTDC_BRORF_BrokerNotNeedRepeal = 48
"""期商无需自动冲正"""
THOST_FTDC_BRORF_BrokerWaitingRepeal = 49
"""期商待自动冲正"""
THOST_FTDC_BRORF_BrokerBeenRepealed = 50
"""期商已自动冲正"""
class TThostFtdcInstitutionTypeType(Enum):
"""机构类别类型"""
THOST_FTDC_TS_Bank = 48
"""银行"""
THOST_FTDC_TS_Future = 49
"""期商"""
THOST_FTDC_TS_Store = 50
"""券商"""
class TThostFtdcLastFragmentType(Enum):
"""最后分片标志类型"""
THOST_FTDC_LF_Yes = 48
"""是最后分片"""
THOST_FTDC_LF_No = 49
"""不是最后分片"""
class TThostFtdcBankAccStatusType(Enum):
"""银行账户状态类型"""
THOST_FTDC_BAS_Normal = 48
"""正常"""
THOST_FTDC_BAS_Freeze = 49
"""冻结"""
THOST_FTDC_BAS_ReportLoss = 50
"""挂失"""
class TThostFtdcMoneyAccountStatusType(Enum):
"""资金账户状态类型"""
THOST_FTDC_MAS_Normal = 48
"""正常"""
THOST_FTDC_MAS_Cancel = 49
"""销户"""
class TThostFtdcManageStatusType(Enum):
"""存管状态类型"""
THOST_FTDC_MSS_Point = 48
"""指定存管"""
THOST_FTDC_MSS_PrePoint = 49
"""预指定"""
THOST_FTDC_MSS_CancelPoint = 50
"""撤销指定"""
class TThostFtdcSystemTypeType(Enum):
"""应用系统类型类型"""
THOST_FTDC_SYT_FutureBankTransfer = 48
"""银期转帐"""
THOST_FTDC_SYT_StockBankTransfer = 49
"""银证转帐"""
THOST_FTDC_SYT_TheThirdPartStore = 50
"""第三方存管"""
class TThostFtdcTxnEndFlagType(Enum):
"""银期转帐划转结果标志类型"""
THOST_FTDC_TEF_NormalProcessing = 48
"""正常处理中"""
THOST_FTDC_TEF_Success = 49
"""成功结束"""
THOST_FTDC_TEF_Failed = 50
"""失败结束"""
THOST_FTDC_TEF_Abnormal = 51
"""异常中"""
THOST_FTDC_TEF_ManualProcessedForException = 52
"""已人工异常处理"""
THOST_FTDC_TEF_CommuFailedNeedManualProcess = 53
"""通讯异常 ,请人工处理"""
THOST_FTDC_TEF_SysErrorNeedManualProcess = 54
"""系统出错,请人工处理"""
class TThostFtdcProcessStatusType(Enum):
"""银期转帐服务处理状态类型"""
THOST_FTDC_PSS_NotProcess = 48
"""未处理"""
THOST_FTDC_PSS_StartProcess = 49
"""开始处理"""
THOST_FTDC_PSS_Finished = 50
"""处理完成"""
class TThostFtdcCustTypeType(Enum):
"""客户类型类型"""
THOST_FTDC_CUSTT_Person = 48
"""自然人"""
THOST_FTDC_CUSTT_Institution = 49
"""机构户"""
class TThostFtdcFBTTransferDirectionType(Enum):
"""银期转帐方向类型"""
THOST_FTDC_FBTTD_FromBankToFuture = 49
"""入金,银行转期货"""
THOST_FTDC_FBTTD_FromFutureToBank = 50
"""出金,期货转银行"""
class TThostFtdcOpenOrDestroyType(Enum):
"""开销户类别类型"""
THOST_FTDC_OOD_Open = 49
"""开户"""
THOST_FTDC_OOD_Destroy = 48
"""销户"""
class TThostFtdcAvailabilityFlagType(Enum):
"""有效标志类型"""
THOST_FTDC_AVAF_Invalid = 48
"""未确认"""
THOST_FTDC_AVAF_Valid = 49
"""有效"""
THOST_FTDC_AVAF_Repeal = 50
"""冲正"""
class TThostFtdcOrganTypeType(Enum):
"""机构类型类型"""
THOST_FTDC_OT_Bank = 49
"""银行代理"""
THOST_FTDC_OT_Future = 50
"""交易前置"""
THOST_FTDC_OT_PlateForm = 57
"""银期转帐平台管理"""
class TThostFtdcOrganLevelType(Enum):
"""机构级别类型"""
THOST_FTDC_OL_HeadQuarters = 49
"""银行总行或期商总部"""
THOST_FTDC_OL_Branch = 50
"""银行分中心或期货公司营业部"""
class TThostFtdcProtocalIDType(Enum):
"""协议类型类型"""
THOST_FTDC_PID_FutureProtocal = 48
"""期商协议"""
THOST_FTDC_PID_ICBCProtocal = 49
"""工行协议"""
THOST_FTDC_PID_ABCProtocal = 50
"""农行协议"""
THOST_FTDC_PID_CBCProtocal = 51
"""中国银行协议"""
THOST_FTDC_PID_CCBProtocal = 52
"""建行协议"""
THOST_FTDC_PID_BOCOMProtocal = 53
"""交行协议"""
THOST_FTDC_PID_FBTPlateFormProtocal = 88
"""银期转帐平台协议"""
class TThostFtdcConnectModeType(Enum):
"""套接字连接方式类型"""
THOST_FTDC_CM_ShortConnect = 48
"""短连接"""
THOST_FTDC_CM_LongConnect = 49
"""长连接"""
class TThostFtdcSyncModeType(Enum):
"""套接字通信方式类型"""
THOST_FTDC_SRM_ASync = 48
"""异步"""
THOST_FTDC_SRM_Sync = 49
"""同步"""
class TThostFtdcBankAccTypeType(Enum):
"""银行帐号类型类型"""
THOST_FTDC_BAT_BankBook = 49
"""银行存折"""
THOST_FTDC_BAT_SavingCard = 50
"""储蓄卡"""
THOST_FTDC_BAT_CreditCard = 51
"""信用卡"""
class TThostFtdcFutureAccTypeType(Enum):
"""期货公司帐号类型类型"""
THOST_FTDC_FAT_BankBook = 49
"""银行存折"""
THOST_FTDC_FAT_SavingCard = 50
"""储蓄卡"""
THOST_FTDC_FAT_CreditCard = 51
"""信用卡"""
class TThostFtdcOrganStatusType(Enum):
"""接入机构状态类型"""
THOST_FTDC_OS_Ready = 48
"""启用"""
THOST_FTDC_OS_CheckIn = 49
"""签到"""
THOST_FTDC_OS_CheckOut = 50
"""签退"""
THOST_FTDC_OS_CheckFileArrived = 51
"""对帐文件到达"""
THOST_FTDC_OS_CheckDetail = 52
"""对帐"""
THOST_FTDC_OS_DayEndClean = 53
"""日终清理"""
THOST_FTDC_OS_Invalid = 57
"""注销"""
class TThostFtdcCCBFeeModeType(Enum):
"""建行收费模式类型"""
THOST_FTDC_CCBFM_ByAmount = 49
"""按金额扣收"""
THOST_FTDC_CCBFM_ByMonth = 50
"""按月扣收"""
class TThostFtdcCommApiTypeType(Enum):
"""通讯API类型类型"""
THOST_FTDC_CAPIT_Client = 49
"""客户端"""
THOST_FTDC_CAPIT_Server = 50
"""服务端"""
THOST_FTDC_CAPIT_UserApi = 51
"""交易系统的UserApi"""
class TThostFtdcLinkStatusType(Enum):
"""连接状态类型"""
THOST_FTDC_LS_Connected = 49
"""已经连接"""
THOST_FTDC_LS_Disconnected = 50
"""没有连接"""
class TThostFtdcPwdFlagType(Enum):
"""密码核对标志类型"""
THOST_FTDC_BPWDF_NoCheck = 48
"""不核对"""
THOST_FTDC_BPWDF_BlankCheck = 49
"""明文核对"""
THOST_FTDC_BPWDF_EncryptCheck = 50
"""密文核对"""
class TThostFtdcSecuAccTypeType(Enum):
"""期货帐号类型类型"""
THOST_FTDC_SAT_AccountID = 49
"""资金帐号"""
THOST_FTDC_SAT_CardID = 50
"""资金卡号"""
THOST_FTDC_SAT_SHStockholderID = 51
"""上海股东帐号"""
THOST_FTDC_SAT_SZStockholderID = 52
"""深圳股东帐号"""
class TThostFtdcTransferStatusType(Enum):
"""转账交易状态类型"""
THOST_FTDC_TRFS_Normal = 48
"""正常"""
THOST_FTDC_TRFS_Repealed = 49
"""被冲正"""
class TThostFtdcSponsorTypeType(Enum):
"""发起方类型"""
THOST_FTDC_SPTYPE_Broker = 48
"""期商"""
THOST_FTDC_SPTYPE_Bank = 49
"""银行"""
class TThostFtdcReqRspTypeType(Enum):
"""请求响应类别类型"""
THOST_FTDC_REQRSP_Request = 48
"""请求"""
THOST_FTDC_REQRSP_Response = 49
"""响应"""
class TThostFtdcFBTUserEventTypeType(Enum):
"""银期转帐用户事件类型类型"""
THOST_FTDC_FBTUET_SignIn = 48
"""签到"""
THOST_FTDC_FBTUET_FromBankToFuture = 49
"""银行转期货"""
THOST_FTDC_FBTUET_FromFutureToBank = 50
"""期货转银行"""
THOST_FTDC_FBTUET_OpenAccount = 51
"""开户"""
THOST_FTDC_FBTUET_CancelAccount = 52
"""销户"""
THOST_FTDC_FBTUET_ChangeAccount = 53
"""变更银行账户"""
THOST_FTDC_FBTUET_RepealFromBankToFuture = 54
"""冲正银行转期货"""
THOST_FTDC_FBTUET_RepealFromFutureToBank = 55
"""冲正期货转银行"""
THOST_FTDC_FBTUET_QueryBankAccount = 56
"""查询银行账户"""
THOST_FTDC_FBTUET_QueryFutureAccount = 57
"""查询期货账户"""
THOST_FTDC_FBTUET_SignOut = 65
"""签退"""
THOST_FTDC_FBTUET_SyncKey = 66
"""密钥同步"""
THOST_FTDC_FBTUET_ReserveOpenAccount = 67
"""预约开户"""
THOST_FTDC_FBTUET_CancelReserveOpenAccount = 68
"""撤销预约开户"""
THOST_FTDC_FBTUET_ReserveOpenAccountConfirm = 69
"""预约开户确认"""
THOST_FTDC_FBTUET_Other = 90
"""其他"""
class TThostFtdcDBOperationType(Enum):
"""记录操作类型类型"""
THOST_FTDC_DBOP_Insert = 48
"""插入"""
THOST_FTDC_DBOP_Update = 49
"""更新"""
THOST_FTDC_DBOP_Delete = 50
"""删除"""
class TThostFtdcSyncFlagType(Enum):
"""同步标记类型"""
THOST_FTDC_SYNF_Yes = 48
"""已同步"""
THOST_FTDC_SYNF_No = 49
"""未同步"""
class TThostFtdcSyncTypeType(Enum):
"""同步类型类型"""
THOST_FTDC_SYNT_OneOffSync = 48
"""一次同步"""
THOST_FTDC_SYNT_TimerSync = 49
"""定时同步"""
THOST_FTDC_SYNT_TimerFullSync = 50
"""定时完全同步"""
class TThostFtdcExDirectionType(Enum):
"""换汇方向类型"""
THOST_FTDC_FBEDIR_Settlement = 48
"""结汇"""
THOST_FTDC_FBEDIR_Sale = 49
"""售汇"""
class TThostFtdcFBEResultFlagType(Enum):
"""换汇成功标志类型"""
THOST_FTDC_FBERES_Success = 48
"""成功"""
THOST_FTDC_FBERES_InsufficientBalance = 49
"""账户余额不足"""
THOST_FTDC_FBERES_UnknownTrading = 56
"""交易结果未知"""
THOST_FTDC_FBERES_Fail = 120
"""失败"""
class TThostFtdcFBEExchStatusType(Enum):
"""换汇交易状态类型"""
THOST_FTDC_FBEES_Normal = 48
"""正常"""
THOST_FTDC_FBEES_ReExchange = 49
"""交易重发"""
class TThostFtdcFBEFileFlagType(Enum):
"""换汇文件标志类型"""
THOST_FTDC_FBEFG_DataPackage = 48
"""数据包"""
THOST_FTDC_FBEFG_File = 49
"""文件"""
class TThostFtdcFBEAlreadyTradeType(Enum):
"""换汇已交易标志类型"""
THOST_FTDC_FBEAT_NotTrade = 48
"""未交易"""
THOST_FTDC_FBEAT_Trade = 49
"""已交易"""
class TThostFtdcFBEUserEventTypeType(Enum):
"""银期换汇用户事件类型类型"""
THOST_FTDC_FBEUET_SignIn = 48
"""签到"""
THOST_FTDC_FBEUET_Exchange = 49
"""换汇"""
THOST_FTDC_FBEUET_ReExchange = 50
"""换汇重发"""
THOST_FTDC_FBEUET_QueryBankAccount = 51
"""银行账户查询"""
THOST_FTDC_FBEUET_QueryExchDetial = 52
"""换汇明细查询"""
THOST_FTDC_FBEUET_QueryExchSummary = 53
"""换汇汇总查询"""
THOST_FTDC_FBEUET_QueryExchRate = 54
"""换汇汇率查询"""
THOST_FTDC_FBEUET_CheckBankAccount = 55
"""对账文件通知"""
THOST_FTDC_FBEUET_SignOut = 56
"""签退"""
THOST_FTDC_FBEUET_Other = 90
"""其他"""
class TThostFtdcFBEReqFlagType(Enum):
"""换汇发送标志类型"""
THOST_FTDC_FBERF_UnProcessed = 48
"""未处理"""
THOST_FTDC_FBERF_WaitSend = 49
"""等待发送"""
THOST_FTDC_FBERF_SendSuccess = 50
"""发送成功"""
THOST_FTDC_FBERF_SendFailed = 51
"""发送失败"""
THOST_FTDC_FBERF_WaitReSend = 52
"""等待重发"""
class TThostFtdcNotifyClassType(Enum):
"""风险通知类型类型"""
THOST_FTDC_NC_NOERROR = 48
"""正常"""
THOST_FTDC_NC_Warn = 49
"""警示"""
THOST_FTDC_NC_Call = 50
"""追保"""
THOST_FTDC_NC_Force = 51
"""强平"""
THOST_FTDC_NC_CHUANCANG = 52
"""穿仓"""
THOST_FTDC_NC_Exception = 53
"""异常"""
class TThostFtdcForceCloseTypeType(Enum):
"""强平单类型类型"""
THOST_FTDC_FCT_Manual = 48
"""手工强平"""
THOST_FTDC_FCT_Single = 49
"""单一投资者辅助强平"""
THOST_FTDC_FCT_Group = 50
"""批量投资者辅助强平"""
class TThostFtdcRiskNotifyMethodType(Enum):
"""风险通知途径类型"""
THOST_FTDC_RNM_System = 48
"""系统通知"""
THOST_FTDC_RNM_SMS = 49
"""短信通知"""
THOST_FTDC_RNM_EMail = 50
"""邮件通知"""
THOST_FTDC_RNM_Manual = 51
"""人工通知"""
class TThostFtdcRiskNotifyStatusType(Enum):
"""风险通知状态类型"""
THOST_FTDC_RNS_NotGen = 48
"""未生成"""
THOST_FTDC_RNS_Generated = 49
"""已生成未发送"""
THOST_FTDC_RNS_SendError = 50
"""发送失败"""
THOST_FTDC_RNS_SendOk = 51
"""已发送未接收"""
THOST_FTDC_RNS_Received = 52
"""已接收未确认"""
THOST_FTDC_RNS_Confirmed = 53
"""已确认"""
class TThostFtdcRiskUserEventType(Enum):
"""风控用户操作事件类型"""
THOST_FTDC_RUE_ExportData = 48
"""导出数据"""
class TThostFtdcConditionalOrderSortTypeType(Enum):
"""条件单索引条件类型"""
THOST_FTDC_COST_LastPriceAsc = 48
"""使用最新价升序"""
THOST_FTDC_COST_LastPriceDesc = 49
"""使用最新价降序"""
THOST_FTDC_COST_AskPriceAsc = 50
"""使用卖价升序"""
THOST_FTDC_COST_AskPriceDesc = 51
"""使用卖价降序"""
THOST_FTDC_COST_BidPriceAsc = 52
"""使用买价升序"""
THOST_FTDC_COST_BidPriceDesc = 53
"""使用买价降序"""
class TThostFtdcSendTypeType(Enum):
"""报送状态类型"""
THOST_FTDC_UOAST_NoSend = 48
"""未发送"""
THOST_FTDC_UOAST_Sended = 49
"""已发送"""
THOST_FTDC_UOAST_Generated = 50
"""已生成"""
THOST_FTDC_UOAST_SendFail = 51
"""报送失败"""
THOST_FTDC_UOAST_Success = 52
"""接收成功"""
THOST_FTDC_UOAST_Fail = 53
"""接收失败"""
THOST_FTDC_UOAST_Cancel = 54
"""取消报送"""
class TThostFtdcClientIDStatusType(Enum):
"""交易编码状态类型"""
THOST_FTDC_UOACS_NoApply = 49
"""未申请"""
THOST_FTDC_UOACS_Submited = 50
"""已提交申请"""
THOST_FTDC_UOACS_Sended = 51
"""已发送申请"""
THOST_FTDC_UOACS_Success = 52
"""完成"""
THOST_FTDC_UOACS_Refuse = 53
"""拒绝"""
THOST_FTDC_UOACS_Cancel = 54
"""已撤销编码"""
class TThostFtdcQuestionTypeType(Enum):
"""特有信息类型类型"""
THOST_FTDC_QT_Radio = 49
"""单选"""
THOST_FTDC_QT_Option = 50
"""多选"""
THOST_FTDC_QT_Blank = 51
"""填空"""
class TThostFtdcBusinessTypeType(Enum):
"""业务类型类型"""
THOST_FTDC_BT_Request = 49
"""请求"""
THOST_FTDC_BT_Response = 50
"""应答"""
THOST_FTDC_BT_Notice = 51
"""通知"""
class TThostFtdcCfmmcReturnCodeType(Enum):
"""监控中心返回码类型"""
THOST_FTDC_CRC_Success = 48
"""成功"""
THOST_FTDC_CRC_Working = 49
"""该客户已经有流程在处理中"""
THOST_FTDC_CRC_InfoFail = 50
"""监控中客户资料检查失败"""
THOST_FTDC_CRC_IDCardFail = 51
"""监控中实名制检查失败"""
THOST_FTDC_CRC_OtherFail = 52
"""其他错误"""
class TThostFtdcClientTypeType(Enum):
"""客户类型类型"""
THOST_FTDC_CfMMCCT_All = 48
"""所有"""
THOST_FTDC_CfMMCCT_Person = 49
"""个人"""
THOST_FTDC_CfMMCCT_Company = 50
"""单位"""
THOST_FTDC_CfMMCCT_Other = 51
"""其他"""
THOST_FTDC_CfMMCCT_SpecialOrgan = 52
"""特殊法人"""
THOST_FTDC_CfMMCCT_Asset = 53
"""资管户"""
class TThostFtdcExchangeIDTypeType(Enum):
"""交易所编号类型"""
THOST_FTDC_EIDT_SHFE = 83
"""上海期货交易所"""
THOST_FTDC_EIDT_CZCE = 90
"""郑州商品交易所"""
THOST_FTDC_EIDT_DCE = 68
"""大连商品交易所"""
THOST_FTDC_EIDT_CFFEX = 74
"""中国金融期货交易所"""
THOST_FTDC_EIDT_INE = 78
"""上海国际能源交易中心股份有限公司"""
class TThostFtdcExClientIDTypeType(Enum):
"""交易编码类型类型"""
THOST_FTDC_ECIDT_Hedge = 49
"""套保"""
THOST_FTDC_ECIDT_Arbitrage = 50
"""套利"""
THOST_FTDC_ECIDT_Speculation = 51
"""投机"""
class TThostFtdcUpdateFlagType(Enum):
"""更新状态类型"""
THOST_FTDC_UF_NoUpdate = 48
"""未更新"""
THOST_FTDC_UF_Success = 49
"""更新全部信息成功"""
THOST_FTDC_UF_Fail = 50
"""更新全部信息失败"""
THOST_FTDC_UF_TCSuccess = 51
"""更新交易编码成功"""
THOST_FTDC_UF_TCFail = 52
"""更新交易编码失败"""
THOST_FTDC_UF_Cancel = 53
"""已丢弃"""
class TThostFtdcApplyOperateIDType(Enum):
"""申请动作类型"""
THOST_FTDC_AOID_OpenInvestor = 49
"""开户"""
THOST_FTDC_AOID_ModifyIDCard = 50
"""修改身份信息"""
THOST_FTDC_AOID_ModifyNoIDCard = 51
"""修改一般信息"""
THOST_FTDC_AOID_ApplyTradingCode = 52
"""申请交易编码"""
THOST_FTDC_AOID_CancelTradingCode = 53
"""撤销交易编码"""
THOST_FTDC_AOID_CancelInvestor = 54
"""销户"""
THOST_FTDC_AOID_FreezeAccount = 56
"""账户休眠"""
THOST_FTDC_AOID_ActiveFreezeAccount = 57
"""激活休眠账户"""
class TThostFtdcApplyStatusIDType(Enum):
"""申请状态类型"""
THOST_FTDC_ASID_NoComplete = 49
"""未补全"""
THOST_FTDC_ASID_Submited = 50
"""已提交"""
THOST_FTDC_ASID_Checked = 51
"""已审核"""
THOST_FTDC_ASID_Refused = 52
"""已拒绝"""
THOST_FTDC_ASID_Deleted = 53
"""已删除"""
class TThostFtdcSendMethodType(Enum):
"""发送方式类型"""
THOST_FTDC_UOASM_ByAPI = 49
"""文件发送"""
THOST_FTDC_UOASM_ByFile = 50
"""电子发送"""
class TThostFtdcEventModeType(Enum):
"""操作方法类型"""
THOST_FTDC_EvM_ADD = 49
"""增加"""
THOST_FTDC_EvM_UPDATE = 50
"""修改"""
THOST_FTDC_EvM_DELETE = 51
"""删除"""
THOST_FTDC_EvM_CHECK = 52
"""复核"""
THOST_FTDC_EvM_COPY = 53
"""复制"""
THOST_FTDC_EvM_CANCEL = 54
"""注销"""
THOST_FTDC_EvM_Reverse = 55
"""冲销"""
class TThostFtdcUOAAutoSendType(Enum):
"""统一开户申请自动发送类型"""
THOST_FTDC_UOAA_ASR = 49
"""自动发送并接收"""
THOST_FTDC_UOAA_ASNR = 50
"""自动发送,不自动接收"""
THOST_FTDC_UOAA_NSAR = 51
"""不自动发送,自动接收"""
THOST_FTDC_UOAA_NSR = 52
"""不自动发送,也不自动接收"""
class TThostFtdcFlowIDType(Enum):
"""流程ID类型"""
THOST_FTDC_EvM_InvestorGroupFlow = 49
"""投资者对应投资者组设置"""
THOST_FTDC_EvM_InvestorRate = 50
"""投资者手续费率设置"""
THOST_FTDC_EvM_InvestorCommRateModel = 51
"""投资者手续费率模板关系设置"""
class TThostFtdcCheckLevelType(Enum):
"""复核级别类型"""
THOST_FTDC_CL_Zero = 48
"""零级复核"""
THOST_FTDC_CL_One = 49
"""一级复核"""
THOST_FTDC_CL_Two = 50
"""二级复核"""
class TThostFtdcCheckStatusType(Enum):
"""复核级别类型"""
THOST_FTDC_CHS_Init = 48
"""未复核"""
THOST_FTDC_CHS_Checking = 49
"""复核中"""
THOST_FTDC_CHS_Checked = 50
"""已复核"""
THOST_FTDC_CHS_Refuse = 51
"""拒绝"""
THOST_FTDC_CHS_Cancel = 52
"""作废"""
class TThostFtdcUsedStatusType(Enum):
"""生效状态类型"""
THOST_FTDC_CHU_Unused = 48
"""未生效"""
THOST_FTDC_CHU_Used = 49
"""已生效"""
THOST_FTDC_CHU_Fail = 50
"""生效失败"""
class TThostFtdcBankAcountOriginType(Enum):
"""账户来源类型"""
THOST_FTDC_BAO_ByAccProperty = 48
"""手工录入"""
THOST_FTDC_BAO_ByFBTransfer = 49
"""银期转账"""
class TThostFtdcMonthBillTradeSumType(Enum):
"""结算单月报成交汇总方式类型"""
THOST_FTDC_MBTS_ByInstrument = 48
"""同日同合约"""
THOST_FTDC_MBTS_ByDayInsPrc = 49
"""同日同合约同价格"""
THOST_FTDC_MBTS_ByDayIns = 50
"""同合约"""
class TThostFtdcFBTTradeCodeEnumType(Enum):
"""银期交易代码枚举类型"""
THOST_FTDC_FTC_BankLaunchBankToBroker = 49
"""银行发起银行转期货"""
THOST_FTDC_FTC_BrokerLaunchBankToBroker = 49
"""期货发起银行转期货"""
THOST_FTDC_FTC_BankLaunchBrokerToBank = 50
"""银行发起期货转银行"""
THOST_FTDC_FTC_BrokerLaunchBrokerToBank = 50
"""期货发起期货转银行"""
class TThostFtdcOTPTypeType(Enum):
"""动态令牌类型类型"""
THOST_FTDC_OTP_NONE = 48
"""无动态令牌"""
THOST_FTDC_OTP_TOTP = 49
"""时间令牌"""
class TThostFtdcOTPStatusType(Enum):
"""动态令牌状态类型"""
THOST_FTDC_OTPS_Unused = 48
"""未使用"""
THOST_FTDC_OTPS_Used = 49
"""已使用"""
THOST_FTDC_OTPS_Disuse = 50
"""注销"""
class TThostFtdcBrokerUserTypeType(Enum):
"""经济公司用户类型类型"""
THOST_FTDC_BUT_Investor = 49
"""投资者"""
THOST_FTDC_BUT_BrokerUser = 50
"""操作员"""
class TThostFtdcFutureTypeType(Enum):
"""期货类型类型"""
THOST_FTDC_FUTT_Commodity = 49
"""商品期货"""
THOST_FTDC_FUTT_Financial = 50
"""金融期货"""
class TThostFtdcFundEventTypeType(Enum):
"""资金管理操作类型类型"""
THOST_FTDC_FET_Restriction = 48
"""转账限额"""
THOST_FTDC_FET_TodayRestriction = 49
"""当日转账限额"""
THOST_FTDC_FET_Transfer = 50
"""期商流水"""
THOST_FTDC_FET_Credit = 51
"""资金冻结"""
THOST_FTDC_FET_InvestorWithdrawAlm = 52
"""投资者可提资金比例"""
THOST_FTDC_FET_BankRestriction = 53
"""单个银行帐户转账限额"""
THOST_FTDC_FET_Accountregister = 54
"""银期签约账户"""
THOST_FTDC_FET_ExchangeFundIO = 55
"""交易所出入金"""
THOST_FTDC_FET_InvestorFundIO = 56
"""投资者出入金"""
class TThostFtdcAccountSourceTypeType(Enum):
"""资金账户来源类型"""
THOST_FTDC_AST_FBTransfer = 48
"""银期同步"""
THOST_FTDC_AST_ManualEntry = 49
"""手工录入"""
class TThostFtdcCodeSourceTypeType(Enum):
"""交易编码来源类型"""
THOST_FTDC_CST_UnifyAccount = 48
"""统一开户(已规范)"""
THOST_FTDC_CST_ManualEntry = 49
"""手工录入(未规范)"""
class TThostFtdcUserRangeType(Enum):
"""操作员范围类型"""
THOST_FTDC_UR_All = 48
"""所有"""
THOST_FTDC_UR_Single = 49
"""单一操作员"""
class TThostFtdcByGroupType(Enum):
"""交易统计表按客户统计方式类型"""
THOST_FTDC_BG_Investor = 50
"""按投资者统计"""
THOST_FTDC_BG_Group = 49
"""按类统计"""
class TThostFtdcTradeSumStatModeType(Enum):
"""交易统计表按范围统计方式类型"""
THOST_FTDC_TSSM_Instrument = 49
"""按合约统计"""
THOST_FTDC_TSSM_Product = 50
"""按产品统计"""
THOST_FTDC_TSSM_Exchange = 51
"""按交易所统计"""
class TThostFtdcExprSetModeType(Enum):
"""日期表达式设置类型类型"""
THOST_FTDC_ESM_Relative = 49
"""相对已有规则设置"""
THOST_FTDC_ESM_Typical = 50
"""典型设置"""
class TThostFtdcRateInvestorRangeType(Enum):
"""投资者范围类型"""
THOST_FTDC_RIR_All = 49
"""公司标准"""
THOST_FTDC_RIR_Model = 50
"""模板"""
THOST_FTDC_RIR_Single = 51
"""单一投资者"""
class TThostFtdcSyncDataStatusType(Enum):
"""主次用系统数据同步状态类型"""
THOST_FTDC_SDS_Initialize = 48
"""未同步"""
THOST_FTDC_SDS_Settlementing = 49
"""同步中"""
THOST_FTDC_SDS_Settlemented = 50
"""已同步"""
class TThostFtdcTradeSourceType(Enum):
"""成交来源类型"""
THOST_FTDC_TSRC_NORMAL = 48
"""来自交易所普通回报"""
THOST_FTDC_TSRC_QUERY = 49
"""来自查询"""
class TThostFtdcFlexStatModeType(Enum):
"""产品合约统计方式类型"""
THOST_FTDC_FSM_Product = 49
"""产品统计"""
THOST_FTDC_FSM_Exchange = 50
"""交易所统计"""
THOST_FTDC_FSM_All = 51
"""统计所有"""
class TThostFtdcByInvestorRangeType(Enum):
"""投资者范围统计方式类型"""
THOST_FTDC_BIR_Property = 49
"""属性统计"""
THOST_FTDC_BIR_All = 50
"""统计所有"""
class TThostFtdcPropertyInvestorRangeType(Enum):
"""投资者范围类型"""
THOST_FTDC_PIR_All = 49
"""所有"""
THOST_FTDC_PIR_Property = 50
"""投资者属性"""
THOST_FTDC_PIR_Single = 51
"""单一投资者"""
class TThostFtdcFileStatusType(Enum):
"""文件状态类型"""
THOST_FTDC_FIS_NoCreate = 48
"""未生成"""
THOST_FTDC_FIS_Created = 49
"""已生成"""
THOST_FTDC_FIS_Failed = 50
"""生成失败"""
class TThostFtdcFileGenStyleType(Enum):
"""文件生成方式类型"""
THOST_FTDC_FGS_FileTransmit = 48
"""下发"""
THOST_FTDC_FGS_FileGen = 49
"""生成"""
class TThostFtdcSysOperModeType(Enum):
"""系统日志操作方法类型"""
THOST_FTDC_SoM_Add = 49
"""增加"""
THOST_FTDC_SoM_Update = 50
"""修改"""
THOST_FTDC_SoM_Delete = 51
"""删除"""
THOST_FTDC_SoM_Copy = 52
"""复制"""
THOST_FTDC_SoM_AcTive = 53
"""激活"""
THOST_FTDC_SoM_CanCel = 54
"""注销"""
THOST_FTDC_SoM_ReSet = 55
"""重置"""
class TThostFtdcSysOperTypeType(Enum):
"""系统日志操作类型类型"""
THOST_FTDC_SoT_UpdatePassword = 48
"""修改操作员密码"""
THOST_FTDC_SoT_UserDepartment = 49
"""操作员组织架构关系"""
THOST_FTDC_SoT_RoleManager = 50
"""角色管理"""
THOST_FTDC_SoT_RoleFunction = 51
"""角色功能设置"""
THOST_FTDC_SoT_BaseParam = 52
"""基础参数设置"""
THOST_FTDC_SoT_SetUserID = 53
"""设置操作员"""
THOST_FTDC_SoT_SetUserRole = 54
"""用户角色设置"""
THOST_FTDC_SoT_UserIpRestriction = 55
"""用户IP限制"""
THOST_FTDC_SoT_DepartmentManager = 56
"""组织架构管理"""
THOST_FTDC_SoT_DepartmentCopy = 57
"""组织架构向查询分类复制"""
THOST_FTDC_SoT_Tradingcode = 65
"""交易编码管理"""
THOST_FTDC_SoT_InvestorStatus = 66
"""投资者状态维护"""
THOST_FTDC_SoT_InvestorAuthority = 67
"""投资者权限管理"""
THOST_FTDC_SoT_PropertySet = 68
"""属性设置"""
THOST_FTDC_SoT_ReSetInvestorPasswd = 69
"""重置投资者密码"""
THOST_FTDC_SoT_InvestorPersonalityInfo = 70
"""投资者个性信息维护"""
class TThostFtdcCSRCDataQueyTypeType(Enum):
"""上报数据查询类型类型"""
THOST_FTDC_CSRCQ_Current = 48
"""查询当前交易日报送的数据"""
THOST_FTDC_CSRCQ_History = 49
"""查询历史报送的代理经纪公司的数据"""
class TThostFtdcFreezeStatusType(Enum):
"""休眠状态类型"""
THOST_FTDC_FRS_Normal = 49
"""活跃"""
THOST_FTDC_FRS_Freeze = 48
"""休眠"""
class TThostFtdcStandardStatusType(Enum):
"""规范状态类型"""
THOST_FTDC_STST_Standard = 48
"""已规范"""
THOST_FTDC_STST_NonStandard = 49
"""未规范"""
class TThostFtdcRightParamTypeType(Enum):
"""配置类型类型"""
THOST_FTDC_RPT_Freeze = 49
"""休眠户"""
THOST_FTDC_RPT_FreezeActive = 50
"""激活休眠户"""
THOST_FTDC_RPT_OpenLimit = 51
"""开仓权限限制"""
THOST_FTDC_RPT_RelieveOpenLimit = 52
"""解除开仓权限限制"""
class TThostFtdcDataStatusType(Enum):
"""反洗钱审核表数据状态类型"""
THOST_FTDC_AMLDS_Normal = 48
"""正常"""
THOST_FTDC_AMLDS_Deleted = 49
"""已删除"""
class TThostFtdcAMLCheckStatusType(Enum):
"""审核状态类型"""
THOST_FTDC_AMLCHS_Init = 48
"""未复核"""
THOST_FTDC_AMLCHS_Checking = 49
"""复核中"""
THOST_FTDC_AMLCHS_Checked = 50
"""已复核"""
THOST_FTDC_AMLCHS_RefuseReport = 51
"""拒绝上报"""
class TThostFtdcAmlDateTypeType(Enum):
"""日期类型类型"""
THOST_FTDC_AMLDT_DrawDay = 48
"""检查日期"""
THOST_FTDC_AMLDT_TouchDay = 49
"""发生日期"""
class TThostFtdcAmlCheckLevelType(Enum):
"""审核级别类型"""
THOST_FTDC_AMLCL_CheckLevel0 = 48
"""零级审核"""
THOST_FTDC_AMLCL_CheckLevel1 = 49
"""一级审核"""
THOST_FTDC_AMLCL_CheckLevel2 = 50
"""二级审核"""
THOST_FTDC_AMLCL_CheckLevel3 = 51
"""三级审核"""
class TThostFtdcExportFileTypeType(Enum):
"""导出文件类型类型"""
THOST_FTDC_EFT_CSV = 48
"""CSV"""
THOST_FTDC_EFT_EXCEL = 49
"""Excel"""
THOST_FTDC_EFT_DBF = 50
"""DBF"""
class TThostFtdcSettleManagerTypeType(Enum):
"""结算配置类型类型"""
THOST_FTDC_SMT_Before = 49
"""结算前准备"""
THOST_FTDC_SMT_Settlement = 50
"""结算"""
THOST_FTDC_SMT_After = 51
"""结算后核对"""
THOST_FTDC_SMT_Settlemented = 52
"""结算后处理"""
class TThostFtdcSettleManagerLevelType(Enum):
"""结算配置等级类型"""
THOST_FTDC_SML_Must = 49
"""必要"""
THOST_FTDC_SML_Alarm = 50
"""警告"""
THOST_FTDC_SML_Prompt = 51
"""提示"""
THOST_FTDC_SML_Ignore = 52
"""不检查"""
class TThostFtdcSettleManagerGroupType(Enum):
"""模块分组类型"""
THOST_FTDC_SMG_Exhcange = 49
"""交易所核对"""
THOST_FTDC_SMG_ASP = 50
"""内部核对"""
THOST_FTDC_SMG_CSRC = 51
"""上报数据核对"""
class TThostFtdcLimitUseTypeType(Enum):
"""保值额度使用类型类型"""
THOST_FTDC_LUT_Repeatable = 49
"""可重复使用"""
THOST_FTDC_LUT_Unrepeatable = 50
"""不可重复使用"""
class TThostFtdcDataResourceType(Enum):
"""数据来源类型"""
THOST_FTDC_DAR_Settle = 49
"""本系统"""
THOST_FTDC_DAR_Exchange = 50
"""交易所"""
THOST_FTDC_DAR_CSRC = 51
"""报送数据"""
class TThostFtdcMarginTypeType(Enum):
"""保证金类型类型"""
THOST_FTDC_MGT_ExchMarginRate = 48
"""交易所保证金率"""
THOST_FTDC_MGT_InstrMarginRate = 49
"""投资者保证金率"""
THOST_FTDC_MGT_InstrMarginRateTrade = 50
"""投资者交易保证金率"""
class TThostFtdcActiveTypeType(Enum):
"""生效类型类型"""
THOST_FTDC_ACT_Intraday = 49
"""仅当日生效"""
THOST_FTDC_ACT_Long = 50
"""长期生效"""
class TThostFtdcMarginRateTypeType(Enum):
"""冲突保证金率类型类型"""
THOST_FTDC_MRT_Exchange = 49
"""交易所保证金率"""
THOST_FTDC_MRT_Investor = 50
"""投资者保证金率"""
THOST_FTDC_MRT_InvestorTrade = 51
"""投资者交易保证金率"""
class TThostFtdcBackUpStatusType(Enum):
"""备份数据状态类型"""
THOST_FTDC_BUS_UnBak = 48
"""未生成备份数据"""
THOST_FTDC_BUS_BakUp = 49
"""备份数据生成中"""
THOST_FTDC_BUS_BakUped = 50
"""已生成备份数据"""
THOST_FTDC_BUS_BakFail = 51
"""备份数据失败"""
class TThostFtdcInitSettlementType(Enum):
"""结算初始化状态类型"""
THOST_FTDC_SIS_UnInitialize = 48
"""结算初始化未开始"""
THOST_FTDC_SIS_Initialize = 49
"""结算初始化中"""
THOST_FTDC_SIS_Initialized = 50
"""结算初始化完成"""
class TThostFtdcReportStatusType(Enum):
"""报表数据生成状态类型"""
THOST_FTDC_SRS_NoCreate = 48
"""未生成报表数据"""
THOST_FTDC_SRS_Create = 49
"""报表数据生成中"""
THOST_FTDC_SRS_Created = 50
"""已生成报表数据"""
THOST_FTDC_SRS_CreateFail = 51
"""生成报表数据失败"""
class TThostFtdcSaveStatusType(Enum):
"""数据归档状态类型"""
THOST_FTDC_SSS_UnSaveData = 48
"""归档未完成"""
THOST_FTDC_SSS_SaveDatad = 49
"""归档完成"""
class TThostFtdcSettArchiveStatusType(Enum):
"""结算确认数据归档状态类型"""
THOST_FTDC_SAS_UnArchived = 48
"""未归档数据"""
THOST_FTDC_SAS_Archiving = 49
"""数据归档中"""
THOST_FTDC_SAS_Archived = 50
"""已归档数据"""
THOST_FTDC_SAS_ArchiveFail = 51
"""归档数据失败"""
class TThostFtdcCTPTypeType(Enum):
"""CTP交易系统类型类型"""
THOST_FTDC_CTPT_Unkown = 48
"""未知类型"""
THOST_FTDC_CTPT_MainCenter = 49
"""主中心"""
THOST_FTDC_CTPT_BackUp = 50
"""备中心"""
class TThostFtdcCloseDealTypeType(Enum):
"""平仓处理类型类型"""
THOST_FTDC_CDT_Normal = 48
"""正常"""
THOST_FTDC_CDT_SpecFirst = 49
"""投机平仓优先"""
class TThostFtdcMortgageFundUseRangeType(Enum):
"""货币质押资金可用范围类型"""
THOST_FTDC_MFUR_None = 48
"""不能使用"""
THOST_FTDC_MFUR_Margin = 49
"""用于保证金"""
THOST_FTDC_MFUR_All = 50
"""用于手续费、盈亏、保证金"""
THOST_FTDC_MFUR_CNY3 = 51
"""人民币方案3"""
class TThostFtdcSpecProductTypeType(Enum):
"""特殊产品类型类型"""
THOST_FTDC_SPT_CzceHedge = 49
"""郑商所套保产品"""
THOST_FTDC_SPT_IneForeignCurrency = 50
"""货币质押产品"""
THOST_FTDC_SPT_DceOpenClose = 51
"""大连短线开平仓产品"""
class TThostFtdcFundMortgageTypeType(Enum):
"""货币质押类型类型"""
THOST_FTDC_FMT_Mortgage = 49
"""质押"""
THOST_FTDC_FMT_Redemption = 50
"""解质"""
class TThostFtdcAccountSettlementParamIDType(Enum):
"""投资者账户结算参数代码类型"""
THOST_FTDC_ASPI_BaseMargin = 49
"""基础保证金"""
THOST_FTDC_ASPI_LowestInterest = 50
"""最低权益标准"""
class TThostFtdcFundMortDirectionType(Enum):
"""货币质押方向类型"""
THOST_FTDC_FMD_In = 49
"""货币质入"""
THOST_FTDC_FMD_Out = 50
"""货币质出"""
class TThostFtdcBusinessClassType(Enum):
"""换汇类别类型"""
THOST_FTDC_BT_Profit = 48
"""盈利"""
THOST_FTDC_BT_Loss = 49
"""亏损"""
THOST_FTDC_BT_Other = 90
"""其他"""
class TThostFtdcSwapSourceTypeType(Enum):
"""换汇数据来源类型"""
THOST_FTDC_SST_Manual = 48
"""手工"""
THOST_FTDC_SST_Automatic = 49
"""自动生成"""
class TThostFtdcCurrExDirectionType(Enum):
"""换汇类型类型"""
THOST_FTDC_CED_Settlement = 48
"""结汇"""
THOST_FTDC_CED_Sale = 49
"""售汇"""
class TThostFtdcCurrencySwapStatusType(Enum):
"""申请状态类型"""
THOST_FTDC_CSS_Entry = 49
"""已录入"""
THOST_FTDC_CSS_Approve = 50
"""已审核"""
THOST_FTDC_CSS_Refuse = 51
"""已拒绝"""
THOST_FTDC_CSS_Revoke = 52
"""已撤销"""
THOST_FTDC_CSS_Send = 53
"""已发送"""
THOST_FTDC_CSS_Success = 54
"""换汇成功"""
THOST_FTDC_CSS_Failure = 55
"""换汇失败"""
class TThostFtdcReqFlagType(Enum):
"""换汇发送标志类型"""
THOST_FTDC_REQF_NoSend = 48
"""未发送"""
THOST_FTDC_REQF_SendSuccess = 49
"""发送成功"""
THOST_FTDC_REQF_SendFailed = 50
"""发送失败"""
THOST_FTDC_REQF_WaitReSend = 51
"""等待重发"""
class TThostFtdcResFlagType(Enum):
"""换汇返回成功标志类型"""
THOST_FTDC_RESF_Success = 48
"""成功"""
THOST_FTDC_RESF_InsuffiCient = 49
"""账户余额不足"""
THOST_FTDC_RESF_UnKnown = 56
"""交易结果未知"""
class TThostFtdcExStatusType(Enum):
"""修改状态类型"""
THOST_FTDC_EXS_Before = 48
"""修改前"""
THOST_FTDC_EXS_After = 49
"""修改后"""
class TThostFtdcClientRegionType(Enum):
"""开户客户地域类型"""
THOST_FTDC_CR_Domestic = 49
"""国内客户"""
THOST_FTDC_CR_GMT = 50
"""港澳台客户"""
THOST_FTDC_CR_Foreign = 51
"""国外客户"""
class TThostFtdcHasBoardType(Enum):
"""是否有董事会类型"""
THOST_FTDC_HB_No = 48
"""没有"""
THOST_FTDC_HB_Yes = 49
"""有"""
class TThostFtdcStartModeType(Enum):
"""启动模式类型"""
THOST_FTDC_SM_Normal = 49
"""正常"""
THOST_FTDC_SM_Emerge = 50
"""应急"""
THOST_FTDC_SM_Restore = 51
"""恢复"""
class TThostFtdcTemplateTypeType(Enum):
"""模型类型类型"""
THOST_FTDC_TPT_Full = 49
"""全量"""
THOST_FTDC_TPT_Increment = 50
"""增量"""
THOST_FTDC_TPT_BackUp = 51
"""备份"""
class TThostFtdcLoginModeType(Enum):
"""登录模式类型"""
THOST_FTDC_LM_Trade = 48
"""交易"""
THOST_FTDC_LM_Transfer = 49
"""转账"""
class TThostFtdcPromptTypeType(Enum):
"""日历提示类型类型"""
THOST_FTDC_CPT_Instrument = 49
"""合约上下市"""
THOST_FTDC_CPT_Margin = 50
"""保证金分段生效"""
class TThostFtdcHasTrusteeType(Enum):
"""是否有托管人类型"""
THOST_FTDC_HT_Yes = 49
"""有"""
THOST_FTDC_HT_No = 48
"""没有"""
class TThostFtdcAmTypeType(Enum):
"""机构类型类型"""
THOST_FTDC_AMT_Bank = 49
"""银行"""
THOST_FTDC_AMT_Securities = 50
"""证券公司"""
THOST_FTDC_AMT_Fund = 51
"""基金公司"""
THOST_FTDC_AMT_Insurance = 52
"""保险公司"""
THOST_FTDC_AMT_Trust = 53
"""信托公司"""
THOST_FTDC_AMT_Other = 57
"""其他"""
class TThostFtdcCSRCFundIOTypeType(Enum):
"""出入金类型类型"""
THOST_FTDC_CFIOT_FundIO = 48
"""出入金"""
THOST_FTDC_CFIOT_SwapCurrency = 49
"""银期换汇"""
class TThostFtdcCusAccountTypeType(Enum):
"""结算账户类型类型"""
THOST_FTDC_CAT_Futures = 49
"""期货结算账户"""
THOST_FTDC_CAT_AssetmgrFuture = 50
"""纯期货资管业务下的资管结算账户"""
THOST_FTDC_CAT_AssetmgrTrustee = 51
"""综合类资管业务下的期货资管托管账户"""
THOST_FTDC_CAT_AssetmgrTransfer = 52
"""综合类资管业务下的资金中转账户"""
class TThostFtdcLanguageTypeType(Enum):
"""通知语言类型类型"""
THOST_FTDC_LT_Chinese = 49
"""中文"""
THOST_FTDC_LT_English = 50
"""英文"""
class TThostFtdcAssetmgrClientTypeType(Enum):
"""资产管理客户类型类型"""
THOST_FTDC_AMCT_Person = 49
"""个人资管客户"""
THOST_FTDC_AMCT_Organ = 50
"""单位资管客户"""
THOST_FTDC_AMCT_SpecialOrgan = 52
"""特殊单位资管客户"""
class TThostFtdcAssetmgrTypeType(Enum):
"""投资类型类型"""
THOST_FTDC_ASST_Futures = 51
"""期货类"""
THOST_FTDC_ASST_SpecialOrgan = 52
"""综合类"""
class TThostFtdcCheckInstrTypeType(Enum):
"""合约比较类型类型"""
THOST_FTDC_CIT_HasExch = 48
"""合约交易所不存在"""
THOST_FTDC_CIT_HasATP = 49
"""合约本系统不存在"""
THOST_FTDC_CIT_HasDiff = 50
"""合约比较不一致"""
class TThostFtdcDeliveryTypeType(Enum):
"""交割类型类型"""
THOST_FTDC_DT_HandDeliv = 49
"""手工交割"""
THOST_FTDC_DT_PersonDeliv = 50
"""到期交割"""
class TThostFtdcMaxMarginSideAlgorithmType(Enum):
"""大额单边保证金算法类型"""
THOST_FTDC_MMSA_NO = 48
"""不使用大额单边保证金算法"""
THOST_FTDC_MMSA_YES = 49
"""使用大额单边保证金算法"""
class TThostFtdcDAClientTypeType(Enum):
"""资产管理客户类型类型"""
THOST_FTDC_CACT_Person = 48
"""自然人"""
THOST_FTDC_CACT_Company = 49
"""法人"""
THOST_FTDC_CACT_Other = 50
"""其他"""
class TThostFtdcUOAAssetmgrTypeType(Enum):
"""投资类型类型"""
THOST_FTDC_UOAAT_Futures = 49
"""期货类"""
THOST_FTDC_UOAAT_SpecialOrgan = 50
"""综合类"""
class TThostFtdcDirectionEnType(Enum):
"""买卖方向类型"""
THOST_FTDC_DEN_Buy = 48
"""Buy"""
THOST_FTDC_DEN_Sell = 49
"""Sell"""
class TThostFtdcOffsetFlagEnType(Enum):
"""开平标志类型"""
THOST_FTDC_OFEN_Open = 48
"""Position Opening"""
THOST_FTDC_OFEN_Close = 49
"""Position Close"""
THOST_FTDC_OFEN_ForceClose = 50
"""Forced Liquidation"""
THOST_FTDC_OFEN_CloseToday = 51
"""Close Today"""
THOST_FTDC_OFEN_CloseYesterday = 52
"""Close Prev."""
THOST_FTDC_OFEN_ForceOff = 53
"""Forced Reduction"""
THOST_FTDC_OFEN_LocalForceClose = 54
"""Local Forced Liquidation"""
class TThostFtdcHedgeFlagEnType(Enum):
"""投机套保标志类型"""
THOST_FTDC_HFEN_Speculation = 49
"""Speculation"""
THOST_FTDC_HFEN_Arbitrage = 50
"""Arbitrage"""
THOST_FTDC_HFEN_Hedge = 51
"""Hedge"""
class TThostFtdcFundIOTypeEnType(Enum):
"""出入金类型类型"""
THOST_FTDC_FIOTEN_FundIO = 49
"""Deposit/Withdrawal"""
THOST_FTDC_FIOTEN_Transfer = 50
"""Bank-Futures Transfer"""
THOST_FTDC_FIOTEN_SwapCurrency = 51
"""Bank-Futures FX Exchange"""
class TThostFtdcFundTypeEnType(Enum):
"""资金类型类型"""
THOST_FTDC_FTEN_Deposite = 49
"""Bank Deposit"""
THOST_FTDC_FTEN_ItemFund = 50
"""Payment/Fee"""
THOST_FTDC_FTEN_Company = 51
"""Brokerage Adj"""
THOST_FTDC_FTEN_InnerTransfer = 52
"""Internal Transfer"""
class TThostFtdcFundDirectionEnType(Enum):
"""出入金方向类型"""
THOST_FTDC_FDEN_In = 49
"""Deposit"""
THOST_FTDC_FDEN_Out = 50
"""Withdrawal"""
class TThostFtdcFundMortDirectionEnType(Enum):
"""货币质押方向类型"""
THOST_FTDC_FMDEN_In = 49
"""Pledge"""
THOST_FTDC_FMDEN_Out = 50
"""Redemption"""
class TThostFtdcOptionsTypeType(Enum):
"""期权类型类型"""
THOST_FTDC_CP_CallOptions = 49
"""看涨"""
THOST_FTDC_CP_PutOptions = 50
"""看跌"""
class TThostFtdcStrikeModeType(Enum):
"""执行方式类型"""
THOST_FTDC_STM_Continental = 48
"""欧式"""
THOST_FTDC_STM_American = 49
"""美式"""
THOST_FTDC_STM_Bermuda = 50
"""百慕大"""
class TThostFtdcStrikeTypeType(Enum):
"""执行类型类型"""
THOST_FTDC_STT_Hedge = 48
"""自身对冲"""
THOST_FTDC_STT_Match = 49
"""匹配执行"""
class TThostFtdcApplyTypeType(Enum):
"""中金所期权放弃执行申请类型类型"""
THOST_FTDC_APPT_NotStrikeNum = 52
"""不执行数量"""
class TThostFtdcGiveUpDataSourceType(Enum):
"""放弃执行申请数据来源类型"""
THOST_FTDC_GUDS_Gen = 48
"""系统生成"""
THOST_FTDC_GUDS_Hand = 49
"""手工添加"""
class TThostFtdcExecResultType(Enum):
"""执行结果类型"""
THOST_FTDC_OER_NoExec = 110
"""没有执行"""
THOST_FTDC_OER_Canceled = 99
"""已经取消"""
THOST_FTDC_OER_OK = 48
"""执行成功"""
THOST_FTDC_OER_NoPosition = 49
"""期权持仓不够"""
THOST_FTDC_OER_NoDeposit = 50
"""资金不够"""
THOST_FTDC_OER_NoParticipant = 51
"""会员不存在"""
THOST_FTDC_OER_NoClient = 52
"""客户不存在"""
THOST_FTDC_OER_NoInstrument = 54
"""合约不存在"""
THOST_FTDC_OER_NoRight = 55
"""没有执行权限"""
THOST_FTDC_OER_InvalidVolume = 56
"""不合理的数量"""
THOST_FTDC_OER_NoEnoughHistoryTrade = 57
"""没有足够的历史成交"""
THOST_FTDC_OER_Unknown = 97
"""未知"""
class TThostFtdcCombinationTypeType(Enum):
"""组合类型类型"""
THOST_FTDC_COMBT_Future = 48
"""期货组合"""
THOST_FTDC_COMBT_BUL = 49
"""垂直价差BUL"""
THOST_FTDC_COMBT_BER = 50
"""垂直价差BER"""
THOST_FTDC_COMBT_STD = 51
"""跨式组合"""
THOST_FTDC_COMBT_STG = 52
"""宽跨式组合"""
THOST_FTDC_COMBT_PRT = 53
"""备兑组合"""
THOST_FTDC_COMBT_CLD = 54
"""时间价差组合"""
class TThostFtdcDceCombinationTypeType(Enum):
"""组合类型类型"""
THOST_FTDC_DCECOMBT_SPL = 48
"""期货对锁组合"""
THOST_FTDC_DCECOMBT_OPL = 49
"""期权对锁组合"""
THOST_FTDC_DCECOMBT_SP = 50
"""期货跨期组合"""
THOST_FTDC_DCECOMBT_SPC = 51
"""期货跨品种组合"""
THOST_FTDC_DCECOMBT_BLS = 52
"""买入期权垂直价差组合"""
THOST_FTDC_DCECOMBT_BES = 53
"""卖出期权垂直价差组合"""
THOST_FTDC_DCECOMBT_CAS = 54
"""期权日历价差组合"""
THOST_FTDC_DCECOMBT_STD = 55
"""期权跨式组合"""
THOST_FTDC_DCECOMBT_STG = 56
"""期权宽跨式组合"""
THOST_FTDC_DCECOMBT_BFO = 57
"""买入期货期权组合"""
THOST_FTDC_DCECOMBT_SFO = 97
"""卖出期货期权组合"""
class TThostFtdcOptionRoyaltyPriceTypeType(Enum):
"""期权权利金价格类型类型"""
THOST_FTDC_ORPT_PreSettlementPrice = 49
"""昨结算价"""
THOST_FTDC_ORPT_OpenPrice = 52
"""开仓价"""
THOST_FTDC_ORPT_MaxPreSettlementPrice = 53
"""最新价与昨结算价较大值"""
class TThostFtdcBalanceAlgorithmType(Enum):
"""权益算法类型"""
THOST_FTDC_BLAG_Default = 49
"""不计算期权市值盈亏"""
THOST_FTDC_BLAG_IncludeOptValLost = 50
"""计算期权市值亏损"""
class TThostFtdcActionTypeType(Enum):
"""执行类型类型"""
THOST_FTDC_ACTP_Exec = 49
"""执行"""
THOST_FTDC_ACTP_Abandon = 50
"""放弃"""
class TThostFtdcForQuoteStatusType(Enum):
"""询价状态类型"""
THOST_FTDC_FQST_Submitted = 97
"""已经提交"""
THOST_FTDC_FQST_Accepted = 98
"""已经接受"""
THOST_FTDC_FQST_Rejected = 99
"""已经被拒绝"""
class TThostFtdcValueMethodType(Enum):
"""取值方式类型"""
THOST_FTDC_VM_Absolute = 48
"""按绝对值"""
THOST_FTDC_VM_Ratio = 49
"""按比率"""
class TThostFtdcExecOrderPositionFlagType(Enum):
"""期权行权后是否保留期货头寸的标记类型"""
THOST_FTDC_EOPF_Reserve = 48
"""保留"""
THOST_FTDC_EOPF_UnReserve = 49
"""不保留"""
class TThostFtdcExecOrderCloseFlagType(Enum):
"""期权行权后生成的头寸是否自动平仓类型"""
THOST_FTDC_EOCF_AutoClose = 48
"""自动平仓"""
THOST_FTDC_EOCF_NotToClose = 49
"""免于自动平仓"""
class TThostFtdcProductTypeType(Enum):
"""产品类型类型"""
THOST_FTDC_PTE_Futures = 49
"""期货"""
THOST_FTDC_PTE_Options = 50
"""期权"""
class TThostFtdcCZCEUploadFileNameType(Enum):
"""郑商所结算文件名类型"""
THOST_FTDC_CUFN_CUFN_O = 79
"""^\d{8}_zz_\d{4}"""
THOST_FTDC_CUFN_CUFN_T = 84
"""^\d{8}成交表"""
THOST_FTDC_CUFN_CUFN_P = 80
"""^\d{8}单腿持仓表new"""
THOST_FTDC_CUFN_CUFN_N = 78
"""^\d{8}非平仓了结表"""
THOST_FTDC_CUFN_CUFN_L = 76
"""^\d{8}平仓表"""
THOST_FTDC_CUFN_CUFN_F = 70
"""^\d{8}资金表"""
THOST_FTDC_CUFN_CUFN_C = 67
"""^\d{8}组合持仓表"""
THOST_FTDC_CUFN_CUFN_M = 77
"""^\d{8}保证金参数表"""
class TThostFtdcDCEUploadFileNameType(Enum):
"""大商所结算文件名类型"""
THOST_FTDC_DUFN_DUFN_O = 79
"""^\d{8}_dl_\d{3}"""
THOST_FTDC_DUFN_DUFN_T = 84
"""^\d{8}_成交表"""
THOST_FTDC_DUFN_DUFN_P = 80
"""^\d{8}_持仓表"""
THOST_FTDC_DUFN_DUFN_F = 70
"""^\d{8}_资金结算表"""
THOST_FTDC_DUFN_DUFN_C = 67
"""^\d{8}_优惠组合持仓明细表"""
THOST_FTDC_DUFN_DUFN_D = 68
"""^\d{8}_持仓明细表"""
THOST_FTDC_DUFN_DUFN_M = 77
"""^\d{8}_保证金参数表"""
THOST_FTDC_DUFN_DUFN_S = 83
"""^\d{8}_期权执行表"""
class TThostFtdcSHFEUploadFileNameType(Enum):
"""上期所结算文件名类型"""
THOST_FTDC_SUFN_SUFN_O = 79
"""^\d{4}_\d{8}_\d{8}_DailyFundChg"""
THOST_FTDC_SUFN_SUFN_T = 84
"""^\d{4}_\d{8}_\d{8}_Trade"""
THOST_FTDC_SUFN_SUFN_P = 80
"""^\d{4}_\d{8}_\d{8}_SettlementDetail"""
THOST_FTDC_SUFN_SUFN_F = 70
"""^\d{4}_\d{8}_\d{8}_Capital"""
class TThostFtdcCFFEXUploadFileNameType(Enum):
"""中金所结算文件名类型"""
THOST_FTDC_CFUFN_SUFN_T = 84
"""^\d{4}_SG\d{1}_\d{8}_\d{1}_Trade"""
THOST_FTDC_CFUFN_SUFN_P = 80
"""^\d{4}_SG\d{1}_\d{8}_\d{1}_SettlementDetail"""
THOST_FTDC_CFUFN_SUFN_F = 70
"""^\d{4}_SG\d{1}_\d{8}_\d{1}_Capital"""
THOST_FTDC_CFUFN_SUFN_S = 83
"""^\d{4}_SG\d{1}_\d{8}_\d{1}_OptionExec"""
class TThostFtdcCombDirectionType(Enum):
"""组合指令方向类型"""
THOST_FTDC_CMDR_Comb = 48
"""申请组合"""
THOST_FTDC_CMDR_UnComb = 49
"""申请拆分"""
class TThostFtdcStrikeOffsetTypeType(Enum):
"""行权偏移类型类型"""
THOST_FTDC_STOV_RealValue = 49
"""实值额"""
THOST_FTDC_STOV_ProfitValue = 50
"""盈利额"""
THOST_FTDC_STOV_RealRatio = 51
"""实值比例"""
THOST_FTDC_STOV_ProfitRatio = 52
"""盈利比例"""
class TThostFtdcReserveOpenAccStasType(Enum):
"""预约开户状态类型"""
THOST_FTDC_ROAST_Processing = 48
"""等待处理中"""
THOST_FTDC_ROAST_Cancelled = 49
"""已撤销"""
THOST_FTDC_ROAST_Opened = 50
"""已开户"""
THOST_FTDC_ROAST_Invalid = 51
"""无效请求"""
class TThostFtdcNewsUrgencyType(Enum):
"""紧急程度类型"""
class TThostFtdcWeakPasswordSourceType(Enum):
"""弱密码来源类型"""
THOST_FTDC_WPSR_Lib = 49
"""弱密码库"""
THOST_FTDC_WPSR_Manual = 50
"""手工录入"""
class TThostFtdcOptSelfCloseFlagType(Enum):
"""期权行权的头寸是否自对冲类型"""
THOST_FTDC_OSCF_CloseSelfOptionPosition = 49
"""自对冲期权仓位"""
THOST_FTDC_OSCF_ReserveOptionPosition = 50
"""保留期权仓位"""
THOST_FTDC_OSCF_SellCloseSelfFuturePosition = 51
"""自对冲卖方履约后的期货仓位"""
THOST_FTDC_OSCF_ReserveFuturePosition = 52
"""保留卖方履约后的期货仓位"""
class TThostFtdcBizTypeType(Enum):
"""业务类型类型"""
THOST_FTDC_BZTP_Future = 49
"""期货"""
THOST_FTDC_BZTP_Stock = 50
"""证券"""
class TThostFtdcAppTypeType(Enum):
"""用户App类型类型"""
THOST_FTDC_APP_TYPE_Investor = 49
"""直连的投资者"""
THOST_FTDC_APP_TYPE_InvestorRelay = 50
"""为每个投资者都创建连接的中继"""
THOST_FTDC_APP_TYPE_OperatorRelay = 51
"""所有投资者共享一个操作员连接的中继"""
THOST_FTDC_APP_TYPE_UnKnown = 52
"""未知"""
class TThostFtdcResponseValueType(Enum):
"""应答类型类型"""
THOST_FTDC_RV_Right = 48
"""检查成功"""
THOST_FTDC_RV_Refuse = 49
"""检查失败"""
class TThostFtdcOTCTradeTypeType(Enum):
"""OTC成交类型类型"""
THOST_FTDC_OTC_TRDT_Block = 48
"""大宗交易"""
THOST_FTDC_OTC_TRDT_EFP = 49
"""期转现"""
class TThostFtdcMatchTypeType(Enum):
"""期现风险匹配方式类型"""
THOST_FTDC_OTC_MT_DV01 = 49
"""基点价值"""
THOST_FTDC_OTC_MT_ParValue = 50
"""面值"""
| 22.337716 | 54 | 0.645662 | 8,752 | 81,555 | 5.588551 | 0.323469 | 0.225041 | 0.013494 | 0.002658 | 0.042404 | 0.002004 | 0.001513 | 0.000818 | 0.000818 | 0 | 0 | 0.040174 | 0.213463 | 81,555 | 3,650 | 55 | 22.343836 | 0.722321 | 0.032726 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.01114 | 0.001311 | 0 | 1.000655 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
c9717c69feb473ac6addbfd086ec05db90d9ff5c | 758 | py | Python | account/urls.py | mateuszwwwrobel/Expense_Tracker_Django | e84bda82433427608e026faa00a634c46a433179 | [
"MIT"
] | null | null | null | account/urls.py | mateuszwwwrobel/Expense_Tracker_Django | e84bda82433427608e026faa00a634c46a433179 | [
"MIT"
] | null | null | null | account/urls.py | mateuszwwwrobel/Expense_Tracker_Django | e84bda82433427608e026faa00a634c46a433179 | [
"MIT"
] | null | null | null | from django.urls import path
from account import views as account_views
urlpatterns = [
path('begin/', account_views.BeginView.as_view(), name='begin'),
path('signup/', account_views.SignUpView.as_view(), name='signup'),
path('login/', account_views.LoginView.as_view(), name='login'),
path('logout/', account_views.LogoutView.as_view(), name='logout'),
path('password-reset/', account_views.ResetPasswordView.as_view(), name='password-reset'),
path('password-reset-sent/', account_views.password_reset_sent, name='password-reset-sent'),
path('account-activation-send/', account_views.account_activation_sent, name='account-activation-sent'),
path('activate/<uidb64>/<token>/', account_views.activate, name='activate'),
]
| 44.588235 | 108 | 0.729551 | 95 | 758 | 5.631579 | 0.294737 | 0.201869 | 0.093458 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002924 | 0.097625 | 758 | 16 | 109 | 47.375 | 0.77924 | 0 | 0 | 0 | 0 | 0 | 0.259894 | 0.096306 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.166667 | 0.166667 | 0 | 0.166667 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
c9750562edcc7bc60779610f0c228ee6b0e7086c | 182 | py | Python | result.py | Hom-Wang/python_clang_struct_conv | 649945d8f8c2687b716d0d666f4f9d84fa066fd9 | [
"MIT"
] | 1 | 2021-08-07T00:58:42.000Z | 2021-08-07T00:58:42.000Z | result.py | Hom-Wang/python_clang_struct_conv | 649945d8f8c2687b716d0d666f4f9d84fa066fd9 | [
"MIT"
] | null | null | null | result.py | Hom-Wang/python_clang_struct_conv | 649945d8f8c2687b716d0d666f4f9d84fa066fd9 | [
"MIT"
] | 1 | 2021-11-22T03:57:24.000Z | 2021-11-22T03:57:24.000Z | from ctypes import *
class result(Structure):
_fields_ = [
("type", c_uint),
("nbyte", c_uint),
("param", c_ubyte*2),
("data", c_ubyte*8),
]
| 18.2 | 29 | 0.494505 | 21 | 182 | 4 | 0.761905 | 0.119048 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.01626 | 0.324176 | 182 | 9 | 30 | 20.222222 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0.098901 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.125 | 0 | 0.375 | 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 |
a3170556846b8fbd63bb392684a14e98601319ad | 196 | py | Python | docs/examples/required_note.py | JonathanGrant/marbles | e517ed9b24e79bdf972b52207addd253113b41ed | [
"MIT"
] | 109 | 2018-05-20T05:14:13.000Z | 2022-02-08T03:54:56.000Z | docs/examples/required_note.py | JonathanGrant/marbles | e517ed9b24e79bdf972b52207addd253113b41ed | [
"MIT"
] | 65 | 2018-05-20T01:36:45.000Z | 2021-10-15T10:55:34.000Z | docs/examples/required_note.py | JonathanGrant/marbles | e517ed9b24e79bdf972b52207addd253113b41ed | [
"MIT"
] | 16 | 2018-05-26T04:08:27.000Z | 2021-05-01T10:53:16.000Z | import marbles.core
class ComplexTestCase(marbles.core.AnnotatedTestCase):
def test_for_edge_case(self):
self.assertTrue(False)
if __name__ == '__main__':
marbles.core.main()
| 16.333333 | 54 | 0.72449 | 23 | 196 | 5.695652 | 0.73913 | 0.251908 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.168367 | 196 | 11 | 55 | 17.818182 | 0.803681 | 0 | 0 | 0 | 0 | 0 | 0.040816 | 0 | 0 | 0 | 0 | 0 | 0.166667 | 1 | 0.166667 | false | 0 | 0.166667 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
a319265ae4c4d1163a9aa9c373a81ef8a42afee8 | 528 | py | Python | phd_satellite_trajectory/wrappers/normalize_observation_space.py | zampanteymedio/phd-satellite-trajectory-public | d8c1d2154a413f8c010bfb944cedbd4676e3f842 | [
"Apache-2.0"
] | 2 | 2021-02-14T20:17:38.000Z | 2021-03-08T10:02:09.000Z | phd_satellite_trajectory/wrappers/normalize_observation_space.py | zampanteymedio/phd-satellite-trajectory-public | d8c1d2154a413f8c010bfb944cedbd4676e3f842 | [
"Apache-2.0"
] | null | null | null | phd_satellite_trajectory/wrappers/normalize_observation_space.py | zampanteymedio/phd-satellite-trajectory-public | d8c1d2154a413f8c010bfb944cedbd4676e3f842 | [
"Apache-2.0"
] | null | null | null | from gym.spaces import Box
from gym.wrappers import TransformObservation
class NormalizeObservationSpace(TransformObservation):
def __init__(self, env, f):
super(NormalizeObservationSpace, self).__init__(env, f)
if isinstance(self.observation_space, Box):
self.observation_space = Box(
low=self.f(self.observation_space.low),
high=self.f(self.observation_space.high),
shape=self.observation_space.shape,
dtype=self.observation_space.dtype)
| 37.714286 | 63 | 0.693182 | 58 | 528 | 6.068966 | 0.396552 | 0.255682 | 0.340909 | 0.130682 | 0.142045 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.217803 | 528 | 13 | 64 | 40.615385 | 0.8523 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.090909 | false | 0 | 0.181818 | 0 | 0.363636 | 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 |
a352996b4a6e3b0789a7c184f6b0b78bb03f60c2 | 5,444 | py | Python | Mathematics_for_Machine_Learning/Linear Algebra/readonly/bearNecessities.py | PerpetualSmile/-Coursera | 485bed0f2e9026e1d66db12c158890e305c4db3d | [
"MIT"
] | 1 | 2020-12-26T12:06:37.000Z | 2020-12-26T12:06:37.000Z | Mathematics_for_Machine_Learning/Linear Algebra/readonly/bearNecessities.py | PerpetualSmile/Coursera | 485bed0f2e9026e1d66db12c158890e305c4db3d | [
"MIT"
] | null | null | null | Mathematics_for_Machine_Learning/Linear Algebra/readonly/bearNecessities.py | PerpetualSmile/Coursera | 485bed0f2e9026e1d66db12c158890e305c4db3d | [
"MIT"
] | null | null | null | import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
import numpy.linalg as la
bear_black = (0.141,0.11,0.11)
bear_white = (0.89,0.856,0.856)
magenta = (0xfc/255, 0x75/255, 0xdb/255) # Brighter magenta
orange = (218/255, 171/255, 115/255)
green = (175/255, 219/255, 133/255)
white = (240/255, 245/255, 250/255)
blue1 = (70/255, 101/255, 137/255)
blue2 = (122/255, 174/255, 215/255)
def gsBasis(A) :
B = np.array(A, dtype=np.float_)
B[:, 0] = B[:, 0] / la.norm(B[:, 0])
B[:, 1] = B[:, 1] - B[:, 1] @ B[:, 0] * B[:, 0]
if la.norm(B[:, 1]) > 1e-14 :
B[:, 1] = B[:, 1] / la.norm(B[:, 1])
else :
B[:, 1] = np.zeros_like(B[:,1])
return B
def draw_mirror(bearVectors) :
fig,ax = plt.subplots(figsize=(12, 12), dpi= 80)
ax.set_xlim([-3.50,3.50])
ax.set_ylim([-3.50,3.50])
ax.set_aspect(1)
ax.set_axis_bgcolor(blue1)
gs=gsBasis(bearVectors)
ax.plot([gs[0,0]*-5,gs[0,0]*5],[gs[1,0]*-5,gs[1,0]*5], lw=2, color=green, zorder=4)
ax.fill([
-5*gs[0,0],-5*gs[0,0]-5*gs[0,1], 5*gs[0,0]-5*gs[0,1],5*gs[0,0]
],[
-5*gs[1,0],-5*gs[1,0]-5*gs[1,1], 5*gs[1,0]-5*gs[1,1],5*gs[1,0]
], color=blue2, zorder=0)
ax.arrow(0,0,bearVectors[0,0],bearVectors[1,0], lw=3, color=orange, zorder=5, head_width=0.1)
ax.arrow(0,0,bearVectors[0,1],bearVectors[1,1], lw=3, color=orange, zorder=5, head_width=0.1)
ax.arrow(0,0,gs[0,0],gs[1,0], lw=3, color=magenta, zorder=6, head_width=0.1)
ax.arrow(0,0,gs[0,1],gs[1,1], lw=3, color=magenta, zorder=6, head_width=0.1)
return ax
bear_black_fur = np.array(
[[ 2.0030351 , 2.229253 , 2.1639012 , 2.0809546 , 1.9728726 ,
1.8974666 , 1.8924396 , 2.0030351 , np.nan, 2.7017972 ,
2.8500957 , 2.9707453 , 3.0159889 , 2.94561 , 2.8299874 ,
2.7017972 , np.nan, 2.1639012 , 2.2317666 , 2.3147132 ,
2.299632 , 2.2493613 , 2.1890365 , 2.1211711 , 2.1337387 ,
2.1639012 , np.nan, 2.4982011 , 2.5610936 , 2.6213642 ,
2.633986 , 2.5536071 , 2.5057417 , 2.4982011 , np.nan,
2.2468478 , 2.3247673 , 2.4429034 , 2.4303357 , 2.3448755 ,
2.2820372 , 2.2468478 , np.nan, 2.1966706 , 2.2722074 ,
2.4055076 , 2.481933 , 2.449941 , 2.4001756 , 2.3237501 ,
2.222442 , 2.1984479 , 2.1966706 , np.nan, 1.847196 ,
1.7818441 , 1.7290599 , 1.6310321 , 1.4575984 , 1.3369488 ,
1.2791375 , 1.3671112 , 1.8044659 , 1.9577914 , 2.2367936 ,
2.5962289 , 2.7520679 , 2.9028799 , 3.4005595 , 3.3150993 ,
3.0511783 , 2.9531506 , 2.8676905 , 2.7746897 , 2.4052003 ,
2.2795237 , 2.1639012 , 1.847196 , np.nan, 2.0491517 ,
2.5112591 , 2.3175294 , 2.1326865 , 2.0491517 ],
[-1.3186252 , -1.0902537 , -0.99238015, -0.96477475, -0.99488975,
-1.1153494 , -1.2408283 , -1.3186252 , np.nan, -1.1881273 ,
-1.0852346 , -1.1454645 , -1.3286636 , -1.4666904 , -1.4641808 ,
-1.1881273 , np.nan, -1.5545256 , -1.5219011 , -1.4014413 ,
-1.3512497 , -1.3412115 , -1.3989317 , -1.4917862 , -1.5419777 ,
-1.5545256 , np.nan, -1.4265371 , -1.3964222 , -1.4968054 ,
-1.6097363 , -1.64738 , -1.5545256 , -1.4265371 , np.nan,
-1.6423608 , -1.6699662 , -1.677495 , -1.7176483 , -1.7477632 ,
-1.7176483 , -1.6423608 , np.nan, -1.7223509 , -1.7622781 ,
-1.7764744 , -1.7613908 , -1.8767359 , -1.9805465 , -1.9991791 ,
-1.9672374 , -1.913114 , -1.7223509 , np.nan, -1.5043341 ,
-1.5444873 , -1.486767 , -1.1504836 , -1.0626484 , -1.11284 ,
-1.2558858 , -1.7452537 , -2.3902152 , -2.4378972 , -2.3575907 ,
-2.1467861 , -2.2446597 , -2.5527822 , -2.5527822 , -2.1919586 ,
-1.7828973 , -1.6850238 , -1.677495 , -1.8431272 , -2.028836 ,
-2.0363647 , -1.9485295 , -1.5043341 , np.nan, -2.5527822 ,
-2.5527822 , -2.4570104 , -2.4463632 , -2.5527822 ]])
bear_white_fur = np.array(
[[ 2.229253 , 2.4680387, 2.7017972, 2.8299874, 2.8676905,
2.7746897, 2.4052003, 2.2795237, 2.1639012, 1.847196 ,
2.0030351, 2.229253 , np.nan, 1.8044659, 1.8974666,
2.0491517, 2.1326865, 2.3175294, 2.5112591, 2.9028799,
2.7520679, 2.5962289, 2.2367936, 1.9577914, 1.8044659],
[-1.0902537, -1.0601388, -1.1881273, -1.4641809, -1.677495 ,
-1.8431272, -2.028836 , -2.0363647, -1.9485295, -1.5043341,
-1.3186252, -1.0902537, np.nan, -2.3902152, -2.5527822,
-2.5527822, -2.4463632, -2.4570104, -2.5527822, -2.5527822,
-2.2446597, -2.1467861, -2.3575907, -2.4378972, -2.3902152]])
bear_face = np.array(
[[ 2.2419927, 2.2526567, 2.3015334, 2.3477442, 2.441943 ,
np.nan, 2.5258499, 2.5113971, 2.5327621, 2.5632387,
2.5780058, 2.5726645, 2.5475292, 2.5258499, np.nan,
2.2858075, 2.2704121, 2.2402497, 2.2283105, 2.2484187,
2.273554 , 2.2858075],
[-1.7605035, -1.9432811, -1.9707865, -1.9654629, -1.781798 ,
np.nan, -1.4688862, -1.4942957, -1.5099806, -1.5112354,
-1.4877081, -1.466063 , -1.4588479, -1.4688862, np.nan,
-1.4346933, -1.4506918, -1.4463002, -1.418381 , -1.4055194,
-1.4083427, -1.4346933]])
| 51.847619 | 97 | 0.549229 | 869 | 5,444 | 3.418872 | 0.302647 | 0.033659 | 0.013463 | 0.010098 | 0.190845 | 0.162908 | 0.144396 | 0.144059 | 0.144059 | 0.141367 | 0 | 0.533514 | 0.254592 | 5,444 | 104 | 98 | 52.346154 | 0.19862 | 0.002939 | 0 | 0 | 0 | 0 | 0.000553 | 0 | 0 | 0 | 0.002212 | 0 | 0 | 1 | 0.020619 | false | 0 | 0.041237 | 0 | 0.082474 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
a36aaf1247350393af8931185378670c243c5fe2 | 547 | py | Python | PE-Python/P085/P085.py | Tiny-Snow/Project-Euler-Problem-Solutions | 71f25a0ee487bad9130daf653e9eb0397c042f6f | [
"Apache-2.0"
] | 1 | 2021-03-17T08:53:53.000Z | 2021-03-17T08:53:53.000Z | PE-Python/P085/P085.py | Tiny-Snow/Project-Euler-Problem-Solutions | 71f25a0ee487bad9130daf653e9eb0397c042f6f | [
"Apache-2.0"
] | null | null | null | PE-Python/P085/P085.py | Tiny-Snow/Project-Euler-Problem-Solutions | 71f25a0ee487bad9130daf653e9eb0397c042f6f | [
"Apache-2.0"
] | null | null | null | # -*- coding:UTF-8 -*-
# Author:Tiny Snow
# Date: Tue, 30 Mar 2021, 17:09
# Project Euler # 085 Counting rectangles
#=============================================================Solution
def get_rectangles(m, n):
return m * (m + 1) * n * (n + 1) // 4
diff = 10000
area = 0
for m in range(1, int(2 * (2 ** 0.5) * 10 * 3) + 1):
for n in range(m, int(2 * (2 ** 0.5) * 10 * 3) + 1):
if abs(get_rectangles(m, n) - 2 * (10 ** 6)) < diff:
area = m * n
diff = abs(get_rectangles(m, n) - 2 * (10 ** 6))
print(area) | 32.176471 | 70 | 0.453382 | 86 | 547 | 2.848837 | 0.488372 | 0.032653 | 0.171429 | 0.183673 | 0.269388 | 0.269388 | 0.269388 | 0.269388 | 0 | 0 | 0 | 0.118812 | 0.261426 | 547 | 17 | 71 | 32.176471 | 0.487624 | 0.319927 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.1 | false | 0 | 0 | 0.1 | 0.2 | 0.1 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
a36c601e88bcbc82de4fdac974b1fe9f6861728a | 9,501 | py | Python | server/server_pb2_grpc.py | MruV-RP/mruv-pb-python | 2a640f7667d23f39e50ccc9ba73c98138c6839b5 | [
"MIT"
] | null | null | null | server/server_pb2_grpc.py | MruV-RP/mruv-pb-python | 2a640f7667d23f39e50ccc9ba73c98138c6839b5 | [
"MIT"
] | 1 | 2020-11-25T09:52:48.000Z | 2020-11-25T09:52:48.000Z | server/server_pb2_grpc.py | MruV-RP/mruv-pb-python | 2a640f7667d23f39e50ccc9ba73c98138c6839b5 | [
"MIT"
] | null | null | null | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from server import server_model_pb2 as server_dot_server__model__pb2
from server import server_pb2 as server_dot_server__pb2
class MruVServerServiceStub(object):
"""The MruV server service provides procedures for managing game platform server actions.
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.RegisterServer = channel.unary_unary(
'/mruv.server.MruVServerService/RegisterServer',
request_serializer=server_dot_server__model__pb2.ServerInfo.SerializeToString,
response_deserializer=server_dot_server__model__pb2.ServerID.FromString,
)
self.GetRegisteredServers = channel.unary_unary(
'/mruv.server.MruVServerService/GetRegisteredServers',
request_serializer=server_dot_server__pb2.GetRegisteredServersRequest.SerializeToString,
response_deserializer=server_dot_server__pb2.GetRegisteredServersResponse.FromString,
)
self.GetServerInfo = channel.unary_unary(
'/mruv.server.MruVServerService/GetServerInfo',
request_serializer=server_dot_server__model__pb2.ServerID.SerializeToString,
response_deserializer=server_dot_server__model__pb2.ServerInfo.FromString,
)
self.UpdateServerStatus = channel.unary_unary(
'/mruv.server.MruVServerService/UpdateServerStatus',
request_serializer=server_dot_server__pb2.UpdateServerStatusRequest.SerializeToString,
response_deserializer=server_dot_server__pb2.UpdateServerStatusResponse.FromString,
)
self.ServerEventsStream = channel.unary_stream(
'/mruv.server.MruVServerService/ServerEventsStream',
request_serializer=server_dot_server__pb2.ServerEventsStreamRequest.SerializeToString,
response_deserializer=server_dot_server__pb2.ServerEvent.FromString,
)
class MruVServerServiceServicer(object):
"""The MruV server service provides procedures for managing game platform server actions.
"""
def RegisterServer(self, request, context):
"""Register instance of server for further managing.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetRegisteredServers(self, request, context):
"""Get all registered servers.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetServerInfo(self, request, context):
"""Get game server status.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpdateServerStatus(self, request, context):
"""Update game server status.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ServerEventsStream(self, request, context):
"""Stream of server events. Events are streamed back in real-time for chosen server.
TODO: Change name to: SubscribeServerEvents
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_MruVServerServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'RegisterServer': grpc.unary_unary_rpc_method_handler(
servicer.RegisterServer,
request_deserializer=server_dot_server__model__pb2.ServerInfo.FromString,
response_serializer=server_dot_server__model__pb2.ServerID.SerializeToString,
),
'GetRegisteredServers': grpc.unary_unary_rpc_method_handler(
servicer.GetRegisteredServers,
request_deserializer=server_dot_server__pb2.GetRegisteredServersRequest.FromString,
response_serializer=server_dot_server__pb2.GetRegisteredServersResponse.SerializeToString,
),
'GetServerInfo': grpc.unary_unary_rpc_method_handler(
servicer.GetServerInfo,
request_deserializer=server_dot_server__model__pb2.ServerID.FromString,
response_serializer=server_dot_server__model__pb2.ServerInfo.SerializeToString,
),
'UpdateServerStatus': grpc.unary_unary_rpc_method_handler(
servicer.UpdateServerStatus,
request_deserializer=server_dot_server__pb2.UpdateServerStatusRequest.FromString,
response_serializer=server_dot_server__pb2.UpdateServerStatusResponse.SerializeToString,
),
'ServerEventsStream': grpc.unary_stream_rpc_method_handler(
servicer.ServerEventsStream,
request_deserializer=server_dot_server__pb2.ServerEventsStreamRequest.FromString,
response_serializer=server_dot_server__pb2.ServerEvent.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'mruv.server.MruVServerService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class MruVServerService(object):
"""The MruV server service provides procedures for managing game platform server actions.
"""
@staticmethod
def RegisterServer(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/mruv.server.MruVServerService/RegisterServer',
server_dot_server__model__pb2.ServerInfo.SerializeToString,
server_dot_server__model__pb2.ServerID.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetRegisteredServers(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/mruv.server.MruVServerService/GetRegisteredServers',
server_dot_server__pb2.GetRegisteredServersRequest.SerializeToString,
server_dot_server__pb2.GetRegisteredServersResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetServerInfo(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/mruv.server.MruVServerService/GetServerInfo',
server_dot_server__model__pb2.ServerID.SerializeToString,
server_dot_server__model__pb2.ServerInfo.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def UpdateServerStatus(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/mruv.server.MruVServerService/UpdateServerStatus',
server_dot_server__pb2.UpdateServerStatusRequest.SerializeToString,
server_dot_server__pb2.UpdateServerStatusResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def ServerEventsStream(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_stream(request, target, '/mruv.server.MruVServerService/ServerEventsStream',
server_dot_server__pb2.ServerEventsStreamRequest.SerializeToString,
server_dot_server__pb2.ServerEvent.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
| 45.45933 | 116 | 0.679718 | 842 | 9,501 | 7.342043 | 0.149644 | 0.046587 | 0.077645 | 0.055322 | 0.747654 | 0.71045 | 0.570527 | 0.466192 | 0.3879 | 0.3879 | 0 | 0.004781 | 0.251447 | 9,501 | 208 | 117 | 45.677885 | 0.864454 | 0.083886 | 0 | 0.490798 | 1 | 0 | 0.095006 | 0.058653 | 0 | 0 | 0 | 0.004808 | 0 | 1 | 0.07362 | false | 0 | 0.018405 | 0.030675 | 0.141104 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 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 |
a37dd201e0d1596b27dfecaed0acc6886461e3e2 | 334 | py | Python | Kattis/erase.py | ruidazeng/online-judge | 6bdf8bbf1af885637dab474d0ccb58aff22a0933 | [
"MIT"
] | null | null | null | Kattis/erase.py | ruidazeng/online-judge | 6bdf8bbf1af885637dab474d0ccb58aff22a0933 | [
"MIT"
] | null | null | null | Kattis/erase.py | ruidazeng/online-judge | 6bdf8bbf1af885637dab474d0ccb58aff22a0933 | [
"MIT"
] | 1 | 2020-06-22T21:07:24.000Z | 2020-06-22T21:07:24.000Z | N = int(input())
before = input()
after = input()
if N % 2 == 0:
print("Deletion succeeded" if before == after else "Deletion failed")
else:
find = True
for i in range(len(before)):
if before[i] == after[i]:
find = False
break
print("Deletion succeeded" if find else "Deletion failed") | 25.692308 | 73 | 0.583832 | 45 | 334 | 4.333333 | 0.488889 | 0.133333 | 0.225641 | 0.246154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008368 | 0.284431 | 334 | 13 | 74 | 25.692308 | 0.807531 | 0 | 0 | 0 | 0 | 0 | 0.197015 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.166667 | 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 |
a388a4c389e16ea72e99e1ad56ce64904e8d1e0e | 1,007 | py | Python | camp/Core/_UnstructuredGridClass.py | blakezim/CAMP | a42a407dc62151ab8a7eb4be3aee1318b984502c | [
"MIT"
] | 4 | 2021-03-02T05:18:06.000Z | 2021-11-29T16:06:39.000Z | camp/Core/_UnstructuredGridClass.py | blakezim/CAMP | a42a407dc62151ab8a7eb4be3aee1318b984502c | [
"MIT"
] | null | null | null | camp/Core/_UnstructuredGridClass.py | blakezim/CAMP | a42a407dc62151ab8a7eb4be3aee1318b984502c | [
"MIT"
] | 1 | 2021-03-26T20:38:11.000Z | 2021-03-26T20:38:11.000Z | import torch
class UnstructuredGrid:
def __init__(self, vertices, indices, per_vert_values=None, per_index_values=None,
device='cpu', dtype=torch.float32):
self.vertices = vertices
self.indices = indices
self.per_vert_value = per_vert_values
self.per_index_value = per_index_values
self.device = device
self.dtype = dtype
def calc_normals(self, **kwargs):
return None
def calc_centers(self, **kwargs):
return None
def copy(self):
return self.__copy__()
def to_(self, device):
for attr, val in self.__dict__.items():
if type(val).__name__ == 'Tensor':
self.__setattr__(attr, val.to(device))
else:
pass
self.device = device
def __copy__(self):
new_obj = type(self)(self.vertices, self.indices, self.per_vert_value, self.per_index_value)
new_obj.__dict__.update(self.__dict__)
return new_obj
| 27.972222 | 101 | 0.61569 | 123 | 1,007 | 4.601626 | 0.341463 | 0.04947 | 0.045936 | 0.063604 | 0.162544 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002797 | 0.28997 | 1,007 | 35 | 102 | 28.771429 | 0.788811 | 0 | 0 | 0.148148 | 0 | 0 | 0.008937 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | false | 0.037037 | 0.037037 | 0.111111 | 0.444444 | 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 |
a38f315dfc378d7af6e63ae5467ab5b474438185 | 830 | py | Python | deciphon_api/api/api.py | EBI-Metagenomics/deciphon-api | d2435d84aaf4cc0ffe24b6ac7a01d8cb527b3ff2 | [
"MIT"
] | null | null | null | deciphon_api/api/api.py | EBI-Metagenomics/deciphon-api | d2435d84aaf4cc0ffe24b6ac7a01d8cb527b3ff2 | [
"MIT"
] | null | null | null | deciphon_api/api/api.py | EBI-Metagenomics/deciphon-api | d2435d84aaf4cc0ffe24b6ac7a01d8cb527b3ff2 | [
"MIT"
] | null | null | null | from fastapi import APIRouter, Request
from starlette.status import HTTP_200_OK
from deciphon_api.api import dbs, hmms, jobs, prods, scans, sched, seqs
from deciphon_api.core.responses import PrettyJSONResponse
router = APIRouter()
router.include_router(dbs.router)
router.include_router(hmms.router)
router.include_router(jobs.router)
router.include_router(prods.router)
router.include_router(scans.router)
router.include_router(sched.router)
router.include_router(seqs.router)
@router.get(
"/",
summary="list of all endpoints",
response_class=PrettyJSONResponse,
status_code=HTTP_200_OK,
name="root:list-of-endpoints",
)
def root(request: Request):
routes = sorted(request.app.routes, key=lambda x: x.name)
urls = {route.name: route.path for route in routes}
return PrettyJSONResponse(urls)
| 28.62069 | 71 | 0.777108 | 114 | 830 | 5.526316 | 0.421053 | 0.144444 | 0.211111 | 0.238095 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008208 | 0.119277 | 830 | 28 | 72 | 29.642857 | 0.853625 | 0 | 0 | 0 | 0 | 0 | 0.053012 | 0.026506 | 0 | 0 | 0 | 0 | 0 | 1 | 0.043478 | false | 0 | 0.173913 | 0 | 0.26087 | 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 |
a391a26073dbc0740f14e1f06e3f288ab2daa392 | 68 | py | Python | PyFSM/pyfsm/utils/__init__.py | wafec/wafec-py-fsm | 444b7b797411daa3186cf812535a660404951d00 | [
"MIT"
] | null | null | null | PyFSM/pyfsm/utils/__init__.py | wafec/wafec-py-fsm | 444b7b797411daa3186cf812535a660404951d00 | [
"MIT"
] | null | null | null | PyFSM/pyfsm/utils/__init__.py | wafec/wafec-py-fsm | 444b7b797411daa3186cf812535a660404951d00 | [
"MIT"
] | null | null | null | from .list_utils import ListUtils
__all__ = [
'ListUtils'
] | 13.6 | 34 | 0.661765 | 7 | 68 | 5.714286 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | 68 | 5 | 35 | 13.6 | 0.784314 | 0 | 0 | 0 | 0 | 0 | 0.138462 | 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 |
a3a1003e07fedaeafced6798c19b49556228be59 | 1,104 | py | Python | unobase/api/constants.py | unomena/unobase | 175e768afa1608f9f34d1e5a053763ad27db0f7e | [
"BSD-3-Clause"
] | null | null | null | unobase/api/constants.py | unomena/unobase | 175e768afa1608f9f34d1e5a053763ad27db0f7e | [
"BSD-3-Clause"
] | null | null | null | unobase/api/constants.py | unomena/unobase | 175e768afa1608f9f34d1e5a053763ad27db0f7e | [
"BSD-3-Clause"
] | null | null | null | '''
Created on 15 Jan 2013
@author: euan
'''
from django.conf import settings
REQUEST_STATUS_CREATED = 0
REQUEST_STATUS_SUCCESS = 1
REQUEST_STATUS_ERROR = 2
REQUEST_STATUS_RETRY = 3
REQUEST_STATUS_ABORT = 4
REQUEST_STATUS_CHOICES = ((REQUEST_STATUS_CREATED,'Created'),
(REQUEST_STATUS_SUCCESS,'Success'),
(REQUEST_STATUS_ERROR,'Error'),
(REQUEST_STATUS_RETRY,'Retry'),
(REQUEST_STATUS_ABORT,'Abort'),
)
REQUEST_ACTION_CREATE = 0
REQUEST_ACTION_SEND = 1
REQUEST_ACTION_CHOICES = ((REQUEST_STATUS_CREATED,'Created'),
(REQUEST_STATUS_RETRY,'Retry'),
)
REQUEST_ACTION_STATUS_CREATED = 0
REQUEST_ACTION_STATUS_RETRY = 1
REQUEST_ACTION_STATUS_COMPLETED = 2
REQUEST_ACTION_STATUS_CHOICES = ((REQUEST_ACTION_STATUS_CREATED,'Created'),
(REQUEST_ACTION_STATUS_RETRY,'Retry'),
(REQUEST_ACTION_STATUS_COMPLETED,'Completed'),
) | 29.837838 | 79 | 0.602355 | 108 | 1,104 | 5.666667 | 0.259259 | 0.276144 | 0.21732 | 0.132353 | 0.30719 | 0.25817 | 0.153595 | 0 | 0 | 0 | 0 | 0.021248 | 0.317935 | 1,104 | 37 | 80 | 29.837838 | 0.791501 | 0.033514 | 0 | 0.083333 | 0 | 0 | 0.058491 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.041667 | 0 | 0.041667 | 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 |
6e555c0b62aaf97f6a3ac85057f9937c3fe02c23 | 24,663 | py | Python | ffmpeg/filters/afilters.py | busterbeam/ffmpeg-generator | 7351e43e62d2dcdfa5d5460386c8af398fd31aee | [
"MIT"
] | 23 | 2021-05-04T05:43:00.000Z | 2022-03-16T15:38:56.000Z | ffmpeg/filters/afilters.py | cxfans/ffmpeg-generator | ce3baf1bb4f355627790add8f7fc11e2841c526a | [
"MIT"
] | 8 | 2021-05-07T19:09:33.000Z | 2021-11-22T02:59:48.000Z | ffmpeg/filters/afilters.py | cxfans/ffmpeg-generator | ce3baf1bb4f355627790add8f7fc11e2841c526a | [
"MIT"
] | 6 | 2021-05-04T05:43:04.000Z | 2021-11-03T15:49:24.000Z | '''
Date: 2021.02-28 22:29:00
LastEditors: Rustle Karl
LastEditTime: 2021.04.25 13:31:49
'''
from ..nodes import FilterableStream, Stream, filterable
from .avfilters import filter
__all__ = []
"""Audio Filters
https://ffmpeg.org/ffmpeg-filters.html#Audio-Filters
"""
@filterable()
def acompressor(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#acompressor"""
return filter(stream, acompressor.__name__, *args, **kwargs)
@filterable()
def acontrast(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#acontrast"""
return filter(stream, acontrast.__name__, *args, **kwargs)
@filterable()
def acopy(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#acopy"""
return filter(stream, acopy.__name__, *args, **kwargs)
@filterable()
def acrossfade(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#acrossfade"""
return filter(stream, acrossfade.__name__, *args, **kwargs)
@filterable()
def acrossover(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#acrossover"""
return filter(stream, acrossover.__name__, *args, **kwargs)
@filterable()
def acrusher(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#acrusher"""
return filter(stream, acrusher.__name__, *args, **kwargs)
@filterable()
def acue(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#acue"""
return filter(stream, acue.__name__, *args, **kwargs)
@filterable()
def adeclick(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#adeclick"""
return filter(stream, adeclick.__name__, *args, **kwargs)
@filterable()
def adeclip(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#adeclip"""
return filter(stream, adeclip.__name__, *args, **kwargs)
@filterable()
def adelay(stream: Stream, delays: str = None) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#adelay"""
return filter(stream, adelay.__name__, delays=delays)
@filterable()
def adenorm(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#adenorm"""
return filter(stream, adenorm.__name__, *args, **kwargs)
@filterable()
def aintegral(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#aintegral"""
return filter(stream, aintegral.__name__, *args, **kwargs)
@filterable()
def aecho(stream: Stream, in_gain: int = None, out_gain: int = None,
delays: str = None, decays: str = None) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#aecho"""
return filter(stream, aecho.__name__, in_gain=in_gain, out_gain=out_gain, delays=delays, decays=decays)
@filterable()
def aemphasis(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#aemphasis"""
return filter(stream, aemphasis.__name__, *args, **kwargs)
@filterable()
def aeval(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#aeval"""
return filter(stream, aeval.__name__, *args, **kwargs)
@filterable()
def aexciter(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#aexciter"""
return filter(stream, aexciter.__name__, *args, **kwargs)
@filterable()
def afade(stream: Stream, fadein: bool = False, fadeout: bool = False,
start_sample: int = None, nb_samples: int = None, start_time: int = None,
duration: int = None, curve: str = None) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#afade"""
afade_type = "in" if (fadein and not fadeout) else "out"
return filter(stream, afade.__name__, t=afade_type, ss=start_sample, ns=nb_samples, st=start_time, d=duration,
curve=curve)
@filterable()
def afftdn(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#afftdn"""
return filter(stream, afftdn.__name__, *args, **kwargs)
@filterable()
def afftfilt(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#afftfilt"""
return filter(stream, afftfilt.__name__, *args, **kwargs)
@filterable()
def afir(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#afir"""
return filter(stream, afir.__name__, *args, **kwargs)
@filterable()
def aformat(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#aformat"""
return filter(stream, aformat.__name__, *args, **kwargs)
@filterable()
def afreqshift(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#afreqshift"""
return filter(stream, afreqshift.__name__, *args, **kwargs)
@filterable()
def agate(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#agate"""
return filter(stream, agate.__name__, *args, **kwargs)
@filterable()
def aiir(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#aiir"""
return filter(stream, aiir.__name__, *args, **kwargs)
@filterable()
def alimiter(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#alimiter"""
return filter(stream, alimiter.__name__, *args, **kwargs)
@filterable()
def allpass(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#allpass"""
return filter(stream, allpass.__name__, *args, **kwargs)
@filterable()
def aloop(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#aloop"""
return filter(stream, aloop.__name__, *args, **kwargs)
@filterable()
def amerge(stream: Stream, inputs: int = None) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#amerge"""
return filter(stream, amerge.__name__, inputs=inputs)
@filterable()
def amix(stream: Stream, inputs: int = None, duration: str = None,
dropout_transition: int = None) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#amix"""
return filter(stream, amix.__name__, inputs=inputs, duration=duration, dropout_transition=dropout_transition)
@filterable()
def amultiply(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#amultiply"""
return filter(stream, amultiply.__name__, *args, **kwargs)
@filterable()
def anequalizer(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#anequalizer"""
return filter(stream, anequalizer.__name__, *args, **kwargs)
@filterable()
def anlmdn(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#anlmdn"""
return filter(stream, anlmdn.__name__, *args, **kwargs)
@filterable()
def anlms(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#anlms"""
return filter(stream, anlms.__name__, *args, **kwargs)
@filterable()
def anull(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#anull"""
return filter(stream, anull.__name__, *args, **kwargs)
@filterable()
def apad(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#apad"""
return filter(stream, apad.__name__, *args, **kwargs)
@filterable()
def aphaser(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#aphaser"""
return filter(stream, aphaser.__name__, *args, **kwargs)
@filterable()
def aphaseshift(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#aphaseshift"""
return filter(stream, aphaseshift.__name__, *args, **kwargs)
@filterable()
def apulsator(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#apulsator"""
return filter(stream, apulsator.__name__, *args, **kwargs)
@filterable()
def aresample(stream: Stream, inputs: int = None, duration: str = None,
dropout_transition: int = None) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#aresample"""
return filter(stream, aresample.__name__, inputs=inputs, duration=duration, dropout_transition=dropout_transition)
@filterable()
def areverse(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#areverse"""
return filter(stream, areverse.__name__, *args, **kwargs)
@filterable()
def arnndn(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#arnndn"""
return filter(stream, arnndn.__name__, *args, **kwargs)
@filterable()
def asetnsamples(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#asetnsamples"""
return filter(stream, asetnsamples.__name__, *args, **kwargs)
@filterable()
def asetrate(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#asetrate"""
return filter(stream, asetrate.__name__, *args, **kwargs)
@filterable()
def ashowinfo(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#ashowinfo"""
return filter(stream, ashowinfo.__name__, *args, **kwargs)
@filterable()
def asoftclip(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#asoftclip"""
return filter(stream, asoftclip.__name__, *args, **kwargs)
@filterable()
def asr(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#asr"""
return filter(stream, asr.__name__, *args, **kwargs)
@filterable()
def astats(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#astats"""
return filter(stream, astats.__name__, *args, **kwargs)
@filterable()
def asubboost(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#asubboost"""
return filter(stream, asubboost.__name__, *args, **kwargs)
@filterable()
def asubcut(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#asubcut"""
return filter(stream, asubcut.__name__, *args, **kwargs)
@filterable()
def asupercut(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#asupercut"""
return filter(stream, asupercut.__name__, *args, **kwargs)
@filterable()
def asuperpass(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#asuperpass"""
return filter(stream, asuperpass.__name__, *args, **kwargs)
@filterable()
def asuperstop(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#asuperstop"""
return filter(stream, asuperstop.__name__, *args, **kwargs)
@filterable()
def atempo(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#atempo"""
return filter(stream, atempo.__name__, *args, **kwargs)
@filterable()
def atrim(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#atrim"""
return filter(stream, atrim.__name__, *args, **kwargs)
@filterable()
def axcorrelate(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#axcorrelate"""
return filter(stream, axcorrelate.__name__, *args, **kwargs)
@filterable()
def bandpass(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#bandpass"""
return filter(stream, bandpass.__name__, *args, **kwargs)
@filterable()
def bandreject(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#bandreject"""
return filter(stream, bandreject.__name__, *args, **kwargs)
@filterable()
def lowshelf(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#lowshelf"""
return filter(stream, lowshelf.__name__, *args, **kwargs)
@filterable()
def biquad(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#biquad"""
return filter(stream, biquad.__name__, *args, **kwargs)
@filterable()
def bs2b(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#bs2b"""
return filter(stream, bs2b.__name__, *args, **kwargs)
@filterable()
def channelmap(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#channelmap"""
return filter(stream, channelmap.__name__, *args, **kwargs)
@filterable()
def channelsplit(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#channelsplit"""
return filter(stream, channelsplit.__name__, *args, **kwargs)
@filterable()
def chorus(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#chorus"""
return filter(stream, chorus.__name__, *args, **kwargs)
@filterable()
def compand(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#compand"""
return filter(stream, compand.__name__, *args, **kwargs)
@filterable()
def compensationdelay(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#compensationdelay"""
return filter(stream, compensationdelay.__name__, *args, **kwargs)
@filterable()
def crossfeed(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#crossfeed"""
return filter(stream, crossfeed.__name__, *args, **kwargs)
@filterable()
def crystalizer(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#crystalizer"""
return filter(stream, crystalizer.__name__, *args, **kwargs)
@filterable()
def dcshift(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#dcshift"""
return filter(stream, dcshift.__name__, *args, **kwargs)
@filterable()
def deesser(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#deesser"""
return filter(stream, deesser.__name__, *args, **kwargs)
@filterable()
def drmeter(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#drmeter"""
return filter(stream, drmeter.__name__, *args, **kwargs)
@filterable()
def dynaudnorm(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#dynaudnorm"""
return filter(stream, dynaudnorm.__name__, *args, **kwargs)
@filterable()
def earwax(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#earwax"""
return filter(stream, earwax.__name__, *args, **kwargs)
@filterable()
def equalizer(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#equalizer"""
return filter(stream, equalizer.__name__, *args, **kwargs)
@filterable()
def extrastereo(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#extrastereo"""
return filter(stream, extrastereo.__name__, *args, **kwargs)
@filterable()
def firequalizer(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#firequalizer"""
return filter(stream, firequalizer.__name__, *args, **kwargs)
@filterable()
def flanger(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#flanger"""
return filter(stream, flanger.__name__, *args, **kwargs)
@filterable()
def haas(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#haas"""
return filter(stream, haas.__name__, *args, **kwargs)
@filterable()
def hdcd(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#hdcd"""
return filter(stream, hdcd.__name__, *args, **kwargs)
@filterable()
def headphone(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#headphone"""
return filter(stream, headphone.__name__, *args, **kwargs)
@filterable()
def highpass(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#highpass"""
return filter(stream, highpass.__name__, *args, **kwargs)
@filterable()
def join(*streams: Stream, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#join"""
return filter(streams, join.__name__, min_inputs=2, **kwargs)
@filterable()
def ladspa(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#ladspa"""
return filter(stream, ladspa.__name__, *args, **kwargs)
@filterable()
def loudnorm(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#loudnorm"""
return filter(stream, loudnorm.__name__, *args, **kwargs)
@filterable()
def lowpass(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#lowpass"""
return filter(stream, lowpass.__name__, *args, **kwargs)
@filterable()
def lv2(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#lv2"""
return filter(stream, lv2.__name__, *args, **kwargs)
@filterable()
def mcompand(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#mcompand"""
return filter(stream, mcompand.__name__, *args, **kwargs)
@filterable()
def pan(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#pan"""
return filter(stream, pan.__name__, *args, **kwargs)
@filterable()
def replaygain(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#replaygain"""
return filter(stream, replaygain.__name__, *args, **kwargs)
@filterable()
def resample(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#resample"""
return filter(stream, resample.__name__, *args, **kwargs)
@filterable()
def rubberband(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#rubberband"""
return filter(stream, rubberband.__name__, *args, **kwargs)
@filterable()
def sidechaincompress(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#sidechaincompress"""
return filter(stream, sidechaincompress.__name__, *args, **kwargs)
@filterable()
def sidechaingate(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#sidechaingate"""
return filter(stream, sidechaingate.__name__, *args, **kwargs)
@filterable()
def silencedetect(stream: Stream, noise: float, duration: float = None) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#silencedetect"""
return filter(stream, silencedetect.__name__, n=f"{noise}dB", d=duration)
@filterable()
def silenceremove(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#silenceremove"""
return filter(stream, silenceremove.__name__, *args, **kwargs)
@filterable()
def sofalizer(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#sofalizer"""
return filter(stream, sofalizer.__name__, *args, **kwargs)
@filterable()
def speechnorm(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#speechnorm"""
return filter(stream, speechnorm.__name__, *args, **kwargs)
@filterable()
def stereotools(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#stereotools"""
return filter(stream, stereotools.__name__, *args, **kwargs)
@filterable()
def stereowiden(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#stereowiden"""
return filter(stream, stereowiden.__name__, *args, **kwargs)
@filterable()
def superequalizer(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#superequalizer"""
return filter(stream, superequalizer.__name__, *args, **kwargs)
@filterable()
def surround(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#surround"""
return filter(stream, surround.__name__, *args, **kwargs)
@filterable()
def highshelf(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#highshelf"""
return filter(stream, highshelf.__name__, *args, **kwargs)
@filterable()
def tremolo(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#tremolo"""
return filter(stream, tremolo.__name__, *args, **kwargs)
@filterable()
def vibrato(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#vibrato"""
return filter(stream, vibrato.__name__, *args, **kwargs)
@filterable()
def volume(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#volume"""
return filter(stream, volume.__name__, *args, **kwargs)
@filterable()
def volumedetect(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#volumedetect"""
return filter(stream, volumedetect.__name__, *args, **kwargs)
"""Audio Sources
https://ffmpeg.org/ffmpeg-filters.html#Audio-Sources
"""
@filterable()
def abuffer(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#abuffer"""
return filter(stream, abuffer.__name__, *args, **kwargs)
@filterable()
def aevalsrc(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#aevalsrc"""
return filter(stream, aevalsrc.__name__, *args, **kwargs)
@filterable()
def afirsrc(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#afirsrc"""
return filter(stream, afirsrc.__name__, *args, **kwargs)
@filterable()
def anullsrc(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#anullsrc"""
return filter(stream, anullsrc.__name__, *args, **kwargs)
@filterable()
def flite(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#flite"""
return filter(stream, flite.__name__, *args, **kwargs)
@filterable()
def anoisesrc(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#anoisesrc"""
return filter(stream, anoisesrc.__name__, *args, **kwargs)
@filterable()
def hilbert(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#hilbert"""
return filter(stream, hilbert.__name__, *args, **kwargs)
@filterable()
def sinc(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#sinc"""
return filter(stream, sinc.__name__, *args, **kwargs)
@filterable()
def sine(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#sine"""
return filter(stream, sine.__name__, *args, **kwargs)
"""Audio Sinks
https://ffmpeg.org/ffmpeg-filters.html#Audio-Sinks
"""
@filterable()
def abuffersink(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#abuffersink"""
return filter(stream, abuffersink.__name__, *args, **kwargs)
@filterable()
def anullsink(stream: Stream, *args, **kwargs) -> FilterableStream:
"""https://ffmpeg.org/ffmpeg-filters.html#anullsink"""
return filter(stream, anullsink.__name__, *args, **kwargs)
| 33.784932 | 118 | 0.70032 | 2,716 | 24,663 | 6.179308 | 0.071429 | 0.128702 | 0.099267 | 0.14181 | 0.662158 | 0.492165 | 0.492165 | 0.48573 | 0.479533 | 0.466663 | 0 | 0.001615 | 0.121113 | 24,663 | 729 | 119 | 33.831276 | 0.772652 | 0.228804 | 0 | 0.329609 | 0 | 0 | 0.000769 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.324022 | false | 0.027933 | 0.005587 | 0 | 0.653631 | 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 |
6e57fe0634a0cec7cca399bba292e130ce0be123 | 566 | py | Python | micro_shop/staff/views.py | SlavaSkvortsov/micro-shop | fd8ac23550da9be277a9234464fdab1213356f3d | [
"MIT"
] | 1 | 2021-06-17T15:11:03.000Z | 2021-06-17T15:11:03.000Z | micro_shop/staff/views.py | SlavaSkvortsov/micro-shop | fd8ac23550da9be277a9234464fdab1213356f3d | [
"MIT"
] | 7 | 2020-06-30T11:25:28.000Z | 2021-06-09T18:51:55.000Z | micro_shop/staff/views.py | SlavaSkvortsov/micro-shop | fd8ac23550da9be277a9234464fdab1213356f3d | [
"MIT"
] | 5 | 2020-10-02T20:01:43.000Z | 2021-06-21T08:57:29.000Z | from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.messages.views import SuccessMessageMixin
from django.views.generic import UpdateView
from staff.models import UserProfile
class UserProfileUpdate(LoginRequiredMixin, SuccessMessageMixin, UpdateView):
model = UserProfile
success_message = 'Данные обновлены'
raise_exception = True
fields = [
'phone_number', 'telegram_user_link', 'messenger',
'brand', 'currency', 'market', 'instagram', 'vk',
'facebook', 'twitter', 'telegram', 'whatsapp'
]
| 33.294118 | 77 | 0.734982 | 55 | 566 | 7.472727 | 0.727273 | 0.072993 | 0.082725 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.164311 | 566 | 16 | 78 | 35.375 | 0.868922 | 0 | 0 | 0 | 0 | 0 | 0.204947 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.307692 | 0 | 0.692308 | 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 |
6e5ad86597d3effeb590c10f2b4ab57be6067003 | 2,428 | py | Python | gcs_operations/permissions_issuer.py | openskies-sh/aerobridge | 130cb4b23bae0b902d96c56aa316fd5c1cb68296 | [
"Apache-2.0"
] | 5 | 2020-11-26T17:34:39.000Z | 2022-01-29T17:14:22.000Z | gcs_operations/permissions_issuer.py | openskies-sh/aerobridge | 130cb4b23bae0b902d96c56aa316fd5c1cb68296 | [
"Apache-2.0"
] | 13 | 2021-05-21T10:46:15.000Z | 2021-08-09T17:07:46.000Z | gcs_operations/permissions_issuer.py | openskies-sh/aerobridge | 130cb4b23bae0b902d96c56aa316fd5c1cb68296 | [
"Apache-2.0"
] | 11 | 2020-12-02T15:49:47.000Z | 2021-11-23T19:48:39.000Z | from gcs_operations.models import FlightOperation, FlightPermission
import json
import arrow
from pki_framework import encrpytion_util
from Crypto.Hash import SHA256
from Crypto.PublicKey import RSA
from Crypto.Signature import PKCS1_v1_5
from django.conf import settings
from pki_framework.models import AerobridgeCredential
import base64
def issue_permission(flight_operation_id):
flight_operation = FlightOperation.objects.get(id = flight_operation_id)
# get the raw log
flight_plan = flight_operation.flight_plan
flight_permission = FlightPermission(operation = flight_operation, json = {})
flight_permission.save()
return {"permission": flight_permission}
# flight_operation = flight_log.operation
# flight_plan = flight_operation.flight_plan
# raw_log = flight_log.raw_log
# raw_log_json = json.loads(raw_log)
# minified_raw_log = json.dumps(raw_log_json , separators=(',', ':'))
# # sign the log and create a hash from the private key
# # IF log chaining is required
# #hs = hashlib.sha256(minified_raw_log.encode('utf-8')).hexdigest()
# # add signature to JSON
# drone = flight_log.operation.drone
# credential_obj = AerobridgeCredential.objects.get(aircraft=drone, token_type = 1,association = 3, is_active = True)
# secret_key = settings.CRYPTOGRAPHY_SALT.encode('utf-8')
# f = encrpytion_util.EncrpytionHelper(secret_key=secret_key)
# drone_private_key_raw = f.decrypt(credential_obj.token).decode('utf-8')
# try:
# key = RSA.importKey(drone_private_key_raw)
# hasher = SHA256.new(minified_raw_log.encode('utf-8').strip())
# signer = PKCS1_v1_5.new(key)
# signature = signer.sign(hasher)
# except Exception as e:
# signed_flight_log.delete()
# else:
# sign = base64.b64encode(signature).decode()
# raw_log_json['signature'] = sign
# signed_flight_log.signed_log = raw_log_json
# signed_flight_log.save()
# flight_operation.is_editable = False
# flight_operation.save()
# flight_log.is_editable = False
# flight_log.save()
# flight_plan.is_editable = False
# flight_plan.save()
# status = 1
# return {"status":status, "signed_flight_log":signed_flight_log}
# else:
# status = 2
# return {"status":status, "signed_flight_log":signed_flight_log}
| 39.803279 | 121 | 0.698929 | 303 | 2,428 | 5.323432 | 0.326733 | 0.066956 | 0.065096 | 0.039058 | 0.132672 | 0.132672 | 0.059516 | 0.059516 | 0.059516 | 0 | 0 | 0.014995 | 0.20346 | 2,428 | 60 | 122 | 40.466667 | 0.819028 | 0.682867 | 0 | 0 | 0 | 0 | 0.013755 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.0625 | false | 0 | 0.625 | 0 | 0.75 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
6e643bd6ec7b834cc3ffc511e2bda3e1eb27936b | 865 | py | Python | crowd_anki/anki/adapters/anki_deck.py | ll-in-anki/CrowdAnki | b25eace61c2ddbc4dad078b83093b291581c0d87 | [
"MIT"
] | 391 | 2016-08-31T21:55:07.000Z | 2022-03-30T16:30:12.000Z | crowd_anki/anki/adapters/anki_deck.py | ll-in-anki/CrowdAnki | b25eace61c2ddbc4dad078b83093b291581c0d87 | [
"MIT"
] | 150 | 2016-09-01T00:35:35.000Z | 2022-03-30T23:26:48.000Z | crowd_anki/anki/adapters/anki_deck.py | ll-in-anki/CrowdAnki | b25eace61c2ddbc4dad078b83093b291581c0d87 | [
"MIT"
] | 51 | 2016-09-04T17:02:39.000Z | 2022-02-04T11:49:10.000Z | from cached_property import cached_property
from dataclasses import dataclass
from typing import Callable
@dataclass
class AnkiDeck:
_data: dict
deck_name_separator = '::'
@property
def data(self):
return self._data
@property
def is_dynamic(self):
return bool(self.data['dyn'])
@property
def name(self):
return self.data['name']
class LazyDeck(AnkiDeck):
def __init__(self, deck_initializer: Callable[[], dict]):
self.deck_initializer = deck_initializer
@cached_property
def data(self):
return self.deck_initializer()
class NamedLazyDeck(LazyDeck):
def __init__(self, name: str, name_initializer: Callable[[str], dict]):
super().__init__(lambda: name_initializer(name))
self._name = name
@property
def name(self):
return self._name
| 20.116279 | 75 | 0.668208 | 100 | 865 | 5.5 | 0.29 | 0.1 | 0.101818 | 0.069091 | 0.210909 | 0.210909 | 0 | 0 | 0 | 0 | 0 | 0 | 0.233526 | 865 | 42 | 76 | 20.595238 | 0.829563 | 0 | 0 | 0.275862 | 0 | 0 | 0.010405 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.241379 | false | 0 | 0.103448 | 0.172414 | 0.689655 | 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 |
6e81c0dff689c7dd23e47b88c8acc7e0cc1cf740 | 885 | py | Python | sc2agents/learning/deep/keras/network.py | jawoszek/sc2-intelligent-agents | 4eff0fe525bdc766c6ee36af7fe7ed890e86353e | [
"Apache-2.0"
] | null | null | null | sc2agents/learning/deep/keras/network.py | jawoszek/sc2-intelligent-agents | 4eff0fe525bdc766c6ee36af7fe7ed890e86353e | [
"Apache-2.0"
] | null | null | null | sc2agents/learning/deep/keras/network.py | jawoszek/sc2-intelligent-agents | 4eff0fe525bdc766c6ee36af7fe7ed890e86353e | [
"Apache-2.0"
] | null | null | null | from keras.utils import to_categorical
from numpy import array
import sc2agents.learning.deep.keras.parsers as parsers
def train(model, input_data, output_data, epochs):
x_train = array(input_data)
y_train = to_categorical(array(output_data).T[0], num_classes=2)
model.fit(x_train, y_train, epochs=epochs, batch_size=256)
def predict(model, input_data, hit_condition):
results = model.predict(array(input_data), batch_size=256)
return [
hit_condition(results, index)
for index in range(0, len(results))
]
def build_order_prediction(model, build_order, confidence=0.9):
data = parsers.read_input_from_text(build_order.storage_format())
def confidence_check(results, index):
return results[index][1] > confidence \
and results[index][0] < 1 - confidence
return predict(model, data, confidence_check)[0]
| 30.517241 | 69 | 0.722034 | 125 | 885 | 4.896 | 0.424 | 0.058824 | 0.045752 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.021918 | 0.175141 | 885 | 28 | 70 | 31.607143 | 0.816438 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.210526 | false | 0 | 0.157895 | 0.052632 | 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 |
6e8229ddd4deceb52130dfea853f3d4016ccf290 | 4,282 | py | Python | genRandInputs.py | deehzee/affine-charform | e03d43972e28e2a364bd54b6bd7b95e77bf2e9d2 | [
"MIT"
] | 2 | 2019-04-13T03:50:22.000Z | 2021-03-02T12:34:47.000Z | genRandInputs.py | deehzee/affine-charform | e03d43972e28e2a364bd54b6bd7b95e77bf2e9d2 | [
"MIT"
] | null | null | null | genRandInputs.py | deehzee/affine-charform | e03d43972e28e2a364bd54b6bd7b95e77bf2e9d2 | [
"MIT"
] | null | null | null | # genRandInput.py - Generate ranodom input
def random_inputs(N = 5, maxvarn = 4, maxs = 3):
# N = size of each sample size for each kind
# maxvarn = maximum variation for n
# maxs = maximum value for s_i
# X = type (A, B, C, D, E or F)
# n = subscript
# r = superscript
# S = specialization
# in $X_n^{(r)}$
# k = number of nodes (GCM A is (k x k) matrix)
import random
sfrom = range(maxs + 1)
#
# Aff-1: r=1
#
r = 1
# Type $A_n^{(1)}$
X = "A"
nfrom = range(1, maxvarn + 1)
for _ in range(N):
n = random.choice(nfrom)
k = n + 1
S = [random.choice(sfrom) for i in range(k)]
print(X, n, r, S)
# Type $B_n^{(1)}$
X = "B"
nfrom = range(3, maxvarn + 3)
for _ in range(N):
n = random.choice(nfrom)
k = n + 1
S = [random.choice(sfrom) for i in range(k)]
print(X, n, r, S)
# Type $C_n^{(1)}$
X = "C"
nfrom = range(2, maxvarn + 2)
for _ in range(N):
n = random.choice(nfrom)
k = n + 1
S = [random.choice(sfrom) for i in range(k)]
print(X, n, r, S)
# Type $D_n^{(1)}$
X = "D"
nfrom = range(4, maxvarn + 4)
for _ in range(N):
n = random.choice(nfrom)
k = n + 1
S = [random.choice(sfrom) for i in range(k)]
print(X, n, r, S)
# Type $E_n^{(1)}$
X = "E"
nfrom = [6, 7, 8]
for _ in range(N):
n = random.choice(nfrom)
k = n + 1
S = [random.choice(sfrom) for i in range(k)]
print(X, n, r, S)
# Type $F_n^{(1)}$
X, n = "F", 4
k = n + 1
for _ in range(N):
S = [random.choice(sfrom) for i in range(k)]
print(X, n, r, S)
# Type $G_n^{(1)}$
X, n = "G", 2
k = n + 1
for _ in range(N):
S = [random.choice(sfrom) for i in range(k)]
print(X, n, r, S)
#
# Aff-2
#
r = 2
# Type $A_n^{(2)}:
X = "A"
## n is even
nfrom = range(2, 2 + 2*maxvarn, 2)
for _ in range(N):
n = random.choice(nfrom)
k = n/2 + 1
S = [random.choice(sfrom) for i in range(k)]
print(X, n, r, S)
## n is odd
nfrom = range(5, 5 + 2*maxvarn, 2)
for _ in range(N):
n = random.choice(nfrom)
k = (n + 1)/2 + 1
S = [random.choice(sfrom) for i in range(k)]
print(X, n, r, S)
# Type $D_n^{(2)}
X = "D"
nfrom = range(3, 3 + maxvarn)
for _ in range(N):
n = random.choice(nfrom)
k = n
S = [random.choice(sfrom) for i in range(k)]
print(X, n, r, S)
# Type $E_n^{(2)}$
X, n = "E", 6
k = n - 1
for _ in range(N):
S = [random.choice(sfrom) for i in range(k)]
print(X, n, r, S)
#
# Aff-3
#
r = 3
# Type $D_n^{(3)}
X, n = "D", 4
k = n - 1
for _ in range(N):
S = [random.choice(sfrom) for i in range(k)]
print(X, n, r, S)
# End of random_inputs(...)
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser(
description='Generate random inputs.'
)
parser.add_argument(
'-N',
metavar='NRAND',
help='the number of inputs per test cases (default 5)',
action='store',
#dest='N',
type=int,
default=5,
)
parser.add_argument(
'-n', '--varn',
metavar='VARN',
help="the variability range for the parameter 'n' \
(default 4)",
action='store',
type=int,
default=4,
)
parser.add_argument(
'-s', '--maxs',
metavar='MAXS',
help="the max value for each 's_i's (default 3)",
action='store',
type=int,
default=3,
)
parser.add_argument(
'-m', '--message',
metavar='HDR_MSG',
help='the header message at the top',
action='store',
type=str,
default=None,
)
args = parser.parse_args();
# print args
if args.message:
print '# {}'.format(args.message)
random_inputs(args.N, args.varn, args.maxs)
| 24.05618 | 67 | 0.456796 | 622 | 4,282 | 3.075563 | 0.157556 | 0.08782 | 0.020387 | 0.069002 | 0.474647 | 0.447987 | 0.447987 | 0.447987 | 0.447987 | 0.447987 | 0 | 0.025621 | 0.389304 | 4,282 | 177 | 68 | 24.19209 | 0.705927 | 0.130546 | 0 | 0.552846 | 1 | 0 | 0.063229 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.01626 | null | null | 0.105691 | 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 |
6e9117aaa8aae74ff224322e4a6d8b31a361afd5 | 265 | py | Python | FusionIIIT/applications/eis/api/urls.py | 29rj/Fusion | bc2941a67532e183adeb0bc4042df0b182b9e3aa | [
"bzip2-1.0.6"
] | 29 | 2019-02-20T15:35:33.000Z | 2022-03-22T11:10:57.000Z | FusionIIIT/applications/eis/api/urls.py | 29rj/Fusion | bc2941a67532e183adeb0bc4042df0b182b9e3aa | [
"bzip2-1.0.6"
] | 409 | 2019-01-17T19:30:51.000Z | 2022-03-31T16:28:45.000Z | FusionIIIT/applications/eis/api/urls.py | 29rj/Fusion | bc2941a67532e183adeb0bc4042df0b182b9e3aa | [
"bzip2-1.0.6"
] | 456 | 2019-01-12T11:01:13.000Z | 2022-03-30T17:06:52.000Z | from django.conf.urls import url
from . import views
urlpatterns = [
# generic profile endpoint
url(r'^profile/(?P<username>\w+)/', views.profile, name='profile-api'),
# current user profile
url(r'^profile/', views.profile, name='profile-api'),
]
| 24.090909 | 75 | 0.667925 | 35 | 265 | 5.057143 | 0.542857 | 0.045198 | 0.124294 | 0.259887 | 0.293785 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.166038 | 265 | 10 | 76 | 26.5 | 0.800905 | 0.169811 | 0 | 0 | 0 | 0 | 0.267281 | 0.124424 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
6ea3a14c98a56d04f8560bf90001b1dffc5e13bf | 418 | py | Python | bin/reverseComplement.py | PapenfussLab/Mungo | 02c5b0e48ecd28596cb9481b282753859f47fed6 | [
"Artistic-2.0"
] | 1 | 2015-09-16T07:53:18.000Z | 2015-09-16T07:53:18.000Z | bin/reverseComplement.py | PapenfussLab/Mungo | 02c5b0e48ecd28596cb9481b282753859f47fed6 | [
"Artistic-2.0"
] | null | null | null | bin/reverseComplement.py | PapenfussLab/Mungo | 02c5b0e48ecd28596cb9481b282753859f47fed6 | [
"Artistic-2.0"
] | 3 | 2016-01-02T16:34:59.000Z | 2021-07-21T04:21:55.000Z | #!/usr/bin/env python
"""
reverse_comp.py <filename>
Prints the reverse complement of a DNA string (in fasta format).
"""
import sys
from mungo import fasta
from mungo import sequence
if len(sys.argv)!=2 or '-h' in sys.argv or '--help' in sys.argv:
sys.exit(__doc__)
for h,s in fasta.FastaFile(sys.argv[1]):
rc = sequence.reverseComplement(s.upper())
print '>%s' % h
print fasta.pretty(rc)
| 18.173913 | 64 | 0.672249 | 68 | 418 | 4.058824 | 0.602941 | 0.101449 | 0.108696 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.0059 | 0.188995 | 418 | 22 | 65 | 19 | 0.80826 | 0.047847 | 0 | 0 | 0 | 0 | 0.037037 | 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 |
6eb89a603e03e6eaa71c1f1aeef397936c4b0b21 | 2,338 | py | Python | base-part1/rest_api/api/serializers.py | AETT-UA/ws_deployment | 4c058f9023137ad75fddfc76ffb0c774635cde9d | [
"Apache-2.0"
] | 4 | 2021-04-21T18:07:51.000Z | 2021-05-11T16:57:06.000Z | base-part2/rest_api/api/serializers.py | AETT-UA/ws_deployment | 4c058f9023137ad75fddfc76ffb0c774635cde9d | [
"Apache-2.0"
] | null | null | null | base-part2/rest_api/api/serializers.py | AETT-UA/ws_deployment | 4c058f9023137ad75fddfc76ffb0c774635cde9d | [
"Apache-2.0"
] | 3 | 2021-05-05T15:50:14.000Z | 2022-01-31T18:37:36.000Z | from rest_framework import serializers
from api.models import Attendance, CourseUnit, Department, Student
class LoginSerializer(serializers.Serializer):
email = serializers.EmailField()
password = serializers.CharField()
class UserSerializer(serializers.Serializer):
email = serializers.EmailField()
password = serializers.CharField()
first_name = serializers.CharField()
last_name = serializers.CharField()
def __init__(self, *args, **kwargs):
self.ignore_fields = kwargs.pop('ignore_fields', [])
super().__init__(*args, **kwargs)
def to_representation(self, instance):
rep = super(UserSerializer, self).to_representation(instance)
for field in self.ignore_fields:
rep.pop(field, None)
return rep
class CourseUnitSimpleSerializer(serializers.Serializer):
course_unit = serializers.IntegerField()
summary = serializers.CharField(required=False)
class AttendanceSerializer(serializers.Serializer):
timestamp = serializers.DateTimeField()
course_unit_name = serializers.CharField()
creator_name = serializers.CharField()
is_active = serializers.BooleanField()
class AttendanceSimpleSerializer(serializers.ModelSerializer):
class Meta:
model = Attendance
fields = ('id', 'register_timestamp', 'summary')
class AttendanceStatusSerializer(serializers.Serializer):
status = serializers.BooleanField()
class DepartmentSerializer(serializers.ModelSerializer):
class Meta:
model = Department
fields = '__all__'
class CourseUnitSerializer(serializers.ModelSerializer):
class Meta:
model = CourseUnit
fields = '__all__'
class StudentNmecSerializer(serializers.Serializer):
nmecs = serializers.ListField(child=serializers.IntegerField())
class StudentSerializer(serializers.Serializer):
nmec = serializers.IntegerField()
name = serializers.CharField()
timestamp = serializers.DateTimeField(required=False, read_only=True)
class PasswordEditSerializer(serializers.Serializer):
current_password = serializers.CharField()
new_password = serializers.CharField()
def change_serializer_to_non_required(serializer):
for field_name in serializer.fields:
serializer.fields[field_name].required = False
return serializer
| 28.864198 | 73 | 0.742943 | 215 | 2,338 | 7.897674 | 0.367442 | 0.117786 | 0.070671 | 0.061837 | 0.159011 | 0.088339 | 0.088339 | 0.088339 | 0 | 0 | 0 | 0 | 0.167665 | 2,338 | 80 | 74 | 29.225 | 0.872559 | 0 | 0 | 0.169811 | 0 | 0 | 0.023097 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.056604 | false | 0.09434 | 0.037736 | 0 | 0.754717 | 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 |
6ebcbccb7c67dc754160498a2dbb8b77e91a93fd | 2,124 | py | Python | tests/test_definitionlist.py | al3xandru/html2md | fe9c49c7a263f4236a057763d9ad68d237e8cf15 | [
"RSA-MD"
] | 8 | 2015-02-14T04:30:16.000Z | 2019-07-10T05:06:49.000Z | tests/test_definitionlist.py | al3xandru/html2md | fe9c49c7a263f4236a057763d9ad68d237e8cf15 | [
"RSA-MD"
] | 2 | 2015-02-20T12:16:54.000Z | 2017-09-21T10:02:53.000Z | tests/test_definitionlist.py | al3xandru/html2md | fe9c49c7a263f4236a057763d9ad68d237e8cf15 | [
"RSA-MD"
] | 4 | 2016-02-06T04:28:16.000Z | 2021-04-22T00:12:39.000Z | import unittest
from context import html2md
from assertions import assertEq
class DefinitioListTests(unittest.TestCase):
def test_basic(self):
in_html = u'''
<dl>
<dt>Apple</dt>
<dd>Pomaceous fruit of plants of the genus Malus in
the family Rosaceae.</dd>
<dt>Orange</dt>
<dd>The fruit of an evergreen tree of the genus Citrus.</dd>
</dl>'''
out_md = u'''
Apple
: Pomaceous fruit of plants of the genus Malus in
the family Rosaceae.
Orange
: The fruit of an evergreen tree of the genus Citrus.
'''.strip()
assertEq(out_md, html2md.html2md(in_html, def_list=True))
def test_multi_dd(self):
in_html = u'''
<dl>
<dt>Apple</dt>
<dd>Pomaceous fruit of plants of the genus Malus in
the family Rosaceae.</dd>
<dd>An American computer company.</dd>
<dt>Orange</dt>
<dd>The fruit of an evergreen tree of the genus Citrus.</dd>
</dl>'''
out_md = u'''
Apple
: Pomaceous fruit of plants of the genus Malus in
the family Rosaceae.
: An American computer company.
Orange
: The fruit of an evergreen tree of the genus Citrus.'''
assertEq(out_md, html2md.html2md(in_html, def_list=True))
def test_multi_dt(self):
in_html = u'''
<dl>
<dt>Term 1</dt>
<dt>Term 2</dt>
<dd>Definition a</dd>
<dt>Term 3</dt>
<dd>Definition b</dd>
</dl>'''
out_md = u'''
Term 1
Term 2
: Definition a
Term 3
: Definition b
'''.strip()
assertEq(out_md, html2md.html2md(in_html, def_list=True))
def not_supported_test_paragraph_dd(self):
in_html = u'''
<dl>
<dt>Apple</dt>
<dd><p>Pomaceous fruit of plants of the genus Malus in
the family Rosaceae.</p></dd>
<dt>Orange</dt>
<dd><p>The fruit of an evergreen tree of the genus Citrus.</p></dd>
</dl>'''
out_md = u'''
Apple
: Pomaceous fruit of plants of the genus Malus in
the family Rosaceae.
Orange
: The fruit of an evergreen tree of the genus Citrus.
'''
assertEq(out_md, html2md.html2md(in_html, def_list=True))
def suite():
return unittest.TestLoader().loadTestsFromTestCase(DefinitioListTests)
if __name__ == '__main__':
unittest.main() | 21.029703 | 74 | 0.669962 | 333 | 2,124 | 4.162162 | 0.186186 | 0.060606 | 0.08658 | 0.095238 | 0.72583 | 0.708514 | 0.697691 | 0.697691 | 0.697691 | 0.697691 | 0 | 0.00886 | 0.202919 | 2,124 | 101 | 75 | 21.029703 | 0.809805 | 0 | 0 | 0.623377 | 0 | 0 | 0.587294 | 0 | 0 | 0 | 0 | 0 | 0.064935 | 1 | 0.064935 | false | 0 | 0.038961 | 0.012987 | 0.12987 | 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 |
6ebf414112bc12be933b98dfb33858e211cd4a3f | 2,205 | py | Python | pytorchrl/agent/env/env_wrappers.py | PyTorchRL/pytorchrl | 055843ab58a06ba1f77da73082be6f23cf453ddd | [
"MIT"
] | 20 | 2021-01-12T16:31:34.000Z | 2022-03-18T00:31:29.000Z | pytorchrl/agent/env/env_wrappers.py | PyTorchRL/pytorchrl | 055843ab58a06ba1f77da73082be6f23cf453ddd | [
"MIT"
] | 4 | 2021-01-19T09:29:58.000Z | 2021-09-29T12:21:08.000Z | pytorchrl/agent/env/env_wrappers.py | PyTorchRL/pytorchrl | 055843ab58a06ba1f77da73082be6f23cf453ddd | [
"MIT"
] | 2 | 2021-01-12T16:07:37.000Z | 2021-02-01T21:09:14.000Z | import gym
from gym.spaces.box import Box
class TransposeImagesIfRequired(gym.ObservationWrapper):
"""
When environment observations are images, this wrapper transposes
the axis. It is useful when the images have shape (W,H,C), as they can be
transposed "on the fly" to (C,W,H) for PyTorch convolutions to be applied.
Parameters
----------
env : gym.Env
Original Gym environment, previous to applying the wrapper.
op : list
New axis ordering.
"""
def __init__(self, env=None, op=[2, 0, 1]):
"""Transpose observation space for images"""
super(TransposeImagesIfRequired, self).__init__(env)
self.op = op
if isinstance(self.observation_space, gym.spaces.Box) and \
len(self.observation_space.shape) == 3:
obs_shape = self.observation_space.shape
self.observation_space = Box(
self.observation_space.low[0, 0, 0],
self.observation_space.high[0, 0, 0],
[obs_shape[self.op[0]], obs_shape[self.op[1]], obs_shape[self.op[2]]],
dtype=self.observation_space.dtype)
elif isinstance(self.observation_space, gym.spaces.Dict):
for k in self.observation_space.spaces:
if isinstance(self.observation_space[k], gym.spaces.Box) and \
len(self.observation_space[k].shape) == 3:
obs_shape = self.observation_space[k].shape
self.observation_space[k] = Box(
self.observation_space[k].low[0, 0, 0],
self.observation_space[k].high[0, 0, 0],
[obs_shape[self.op[0]], obs_shape[self.op[1]], obs_shape[self.op[2]]],
dtype=self.observation_space.dtype)
def observation(self, ob):
"""Transpose observation"""
if isinstance(ob, dict):
for k in ob:
if len(ob[k].shape) == 3:
ob[k] = ob[k].transpose(self.op[0], self.op[1], self.op[2])
else:
if len(ob.shape) == 3:
ob = ob.transpose(self.op[0], self.op[1], self.op[2])
return ob | 39.375 | 94 | 0.570975 | 283 | 2,205 | 4.335689 | 0.261484 | 0.221679 | 0.260799 | 0.06846 | 0.449063 | 0.398533 | 0.342298 | 0.244499 | 0.182559 | 0.182559 | 0 | 0.020288 | 0.307029 | 2,205 | 56 | 95 | 39.375 | 0.782723 | 0.185488 | 0 | 0.121212 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.060606 | false | 0 | 0.060606 | 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 |
6ecb04355bb189b8aed688f26403776f38e23b06 | 2,637 | py | Python | src/lamuda/date/common_date.py | hanadumal/lamud | 092e036c4c1a0420b6f5c16148252288f42f3271 | [
"MIT"
] | null | null | null | src/lamuda/date/common_date.py | hanadumal/lamud | 092e036c4c1a0420b6f5c16148252288f42f3271 | [
"MIT"
] | null | null | null | src/lamuda/date/common_date.py | hanadumal/lamud | 092e036c4c1a0420b6f5c16148252288f42f3271 | [
"MIT"
] | null | null | null | from datetime import date
from datetime import datetime
from datetime import timedelta
from datetime import timezone
class CommonDate(object):
DEFAULT_ZONE = timezone(offset=timedelta(hours=8))
@staticmethod
def today(tz=DEFAULT_ZONE):
return date.today()
@staticmethod
def today_time(tz=DEFAULT_ZONE):
return datetime.now().replace(hour=0, minute=0, second=0, microsecond=0)
@staticmethod
def yday(tz=DEFAULT_ZONE):
return date.today() - timedelta(days=1)
@staticmethod
def yday_time(tz=DEFAULT_ZONE):
yday_tmp = datetime.now() - timedelta(days=1)
return yday_tmp.replace(hour=0, minute=0, second=0, microsecond=0)
@staticmethod
def today_ymd(tz=DEFAULT_ZONE):
return CommonDate.today().strftime('%Y%m%d')
@staticmethod
def today_iso(tz=DEFAULT_ZONE):
return CommonDate.today().strftime('%Y-%m-%d')
@staticmethod
def yday_ymd(tz=DEFAULT_ZONE):
return CommonDate.yday().strftime('%Y%m%d')
@staticmethod
def yday_iso(tz=DEFAULT_ZONE):
return CommonDate.yday().strftime('%Y-%m-%d')
@staticmethod
def today_ts(tz=DEFAULT_ZONE):
"""Today's 0:0:0 timestamp
:return integer
"""
return int(CommonDate.today().strftime('%s'))
@staticmethod
def yday_ts(tz=DEFAULT_ZONE):
"""Yesterday's 0:0:0 timestamp
:return integer
"""
return int(CommonDate.yday().strftime('%s'))
@staticmethod
def now_ts(tz=DEFAULT_ZONE):
"""Now's timestamp
:return integer
"""
return int(datetime.timestamp(datetime.now()))
@staticmethod
def last_hour_start_ts(tz=DEFAULT_ZONE):
"""Last hour start timestamp
:return integer
"""
t = datetime.now().replace(minute=0, second=0, microsecond=0) - timedelta(hours=1)
return int(datetime.timestamp(t))
@staticmethod
def last_hour_end_ts(tz=DEFAULT_ZONE):
"""Last hour end timestamp
:return integer
"""
t = datetime.now().replace(minute=0, second=0, microsecond=0)
return int(datetime.timestamp(t))
@staticmethod
def now(tz=DEFAULT_ZONE):
return datetime.now()
@staticmethod
def now_iso(tz=DEFAULT_ZONE):
return CommonDate.now().strftime('%Y-%m-%d %H:%M:%S')
@staticmethod
def mts_2_iso(mts, tz=DEFAULT_ZONE):
return datetime.fromtimestamp(mts/1000).strftime('%Y-%m-%d %H:%M:%S')
@staticmethod
def ts_2_iso(ts, tz=DEFAULT_ZONE):
return datetime.fromtimestamp(ts).strftime('%Y-%m-%d %H:%M:%S')
| 27.757895 | 90 | 0.63595 | 338 | 2,637 | 4.843195 | 0.153846 | 0.120953 | 0.135003 | 0.127673 | 0.646915 | 0.627978 | 0.453268 | 0.382407 | 0.382407 | 0.346976 | 0 | 0.014771 | 0.229807 | 2,637 | 94 | 91 | 28.053191 | 0.791236 | 0.074706 | 0 | 0.316667 | 0 | 0 | 0.035638 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.283333 | false | 0 | 0.066667 | 0.183333 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 |
6ecceb4a0eb5ee413f513b8996070a1dbea9d970 | 1,176 | py | Python | autotrade/account_manager.py | rezabmirzaei/tradebot | 2ee94de2ad3fd5d1474b5628bb8777fff1b0d412 | [
"Unlicense"
] | null | null | null | autotrade/account_manager.py | rezabmirzaei/tradebot | 2ee94de2ad3fd5d1474b5628bb8777fff1b0d412 | [
"Unlicense"
] | null | null | null | autotrade/account_manager.py | rezabmirzaei/tradebot | 2ee94de2ad3fd5d1474b5628bb8777fff1b0d412 | [
"Unlicense"
] | 1 | 2021-03-05T12:35:52.000Z | 2021-03-05T12:35:52.000Z | import logging
from typing import List
from autotrade.session_handler import SessionHandler
log = logging.getLogger('tradebot.log')
class AccountManager:
def __init__(self, config: dict, session_handler: SessionHandler) -> None:
self.session_handler: SessionHandler = session_handler
self.investment_pc = int(config['investment_pc'])
self.take_profit_pc = int(config['take_profit_pc'])
self.stop_loss_pc = int(config['stop_loss_pc'])
def account_details(self) -> dict:
api = self.session_handler.api()
return api.get_account()
def open_positions(self) -> List[dict]:
api = self.session_handler.api()
return api.list_positions()
def orders(self, status=None) -> List[dict]:
api = self.session_handler.api()
return api.list_orders() if not status else api.list_orders(status=status)
def is_eligible_for_trading(self) -> bool:
""" Assess wether or not the account is eligable for trading """
account = self.account_details()
# TODO NB! Further check on eligibility
return account.status == 'ACTIVE' and float(account.buying_power) > 1000
| 34.588235 | 82 | 0.690476 | 150 | 1,176 | 5.2 | 0.406667 | 0.125641 | 0.092308 | 0.069231 | 0.162821 | 0.162821 | 0.162821 | 0.162821 | 0.115385 | 0.115385 | 0 | 0.004292 | 0.207483 | 1,176 | 33 | 83 | 35.636364 | 0.832618 | 0.081633 | 0 | 0.136364 | 0 | 0 | 0.053122 | 0 | 0 | 0 | 0 | 0.030303 | 0 | 1 | 0.227273 | false | 0 | 0.136364 | 0 | 0.590909 | 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 |
42b30eb189150f31673ef4c6485a49c0aca1398f | 539 | py | Python | web/app/syzygy/view_history/__init__.py | aaronSchanck/SepTech | 323b7db183928b43576b0f13477fccdd192fd3fa | [
"Apache-2.0"
] | 1 | 2021-09-10T17:51:40.000Z | 2021-09-10T17:51:40.000Z | web/app/syzygy/view_history/__init__.py | ItsmeCurly/SepTech | 323b7db183928b43576b0f13477fccdd192fd3fa | [
"Apache-2.0"
] | 2 | 2021-04-30T15:57:12.000Z | 2021-05-01T17:55:51.000Z | web/app/syzygy/view_history/__init__.py | ItsmeCurly/SepTech | 323b7db183928b43576b0f13477fccdd192fd3fa | [
"Apache-2.0"
] | 1 | 2021-09-10T17:51:10.000Z | 2021-09-10T17:51:10.000Z | """/web/app/syzygy/view_history/__init__.py
Author: Adam Green (adam.green1@maine.edu),
Ashley Drexler (ashley.drexler@maine.edu)
[Description]
Classes:
[ClassesList]
Functions:
[FunctionsList]
"""
import logging
from .model import ViewHistory
from .schema import ViewHistorySchema
BASE_ROUTE = "view_history"
log = logging.getLogger(__name__)
def register_routes(api, app, root="api"):
from .controller import api as view_history_api
api.add_namespace(view_history_api, path=f"/{root}/{BASE_ROUTE}")
| 16.84375 | 69 | 0.734694 | 69 | 539 | 5.478261 | 0.623188 | 0.116402 | 0.074074 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002179 | 0.148423 | 539 | 31 | 70 | 17.387097 | 0.821351 | 0.393321 | 0 | 0 | 0 | 0 | 0.109718 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.5 | 0 | 0.625 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
42d788c8dbe7014e21512cdd163356bf808f3fdd | 137 | py | Python | src/test.py | davidkimolo/simple_image_editor | 891e4cdce70901df540c8c4a73497c85693b052c | [
"MIT"
] | null | null | null | src/test.py | davidkimolo/simple_image_editor | 891e4cdce70901df540c8c4a73497c85693b052c | [
"MIT"
] | null | null | null | src/test.py | davidkimolo/simple_image_editor | 891e4cdce70901df540c8c4a73497c85693b052c | [
"MIT"
] | null | null | null | from PIL import Image
my_image = Image.open("assets/images/splashscreen_background.png")
width, height = my_image.size
print(height)
| 17.125 | 66 | 0.781022 | 20 | 137 | 5.2 | 0.75 | 0.134615 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.116788 | 137 | 7 | 67 | 19.571429 | 0.859504 | 0 | 0 | 0 | 0 | 0 | 0.29927 | 0.29927 | 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 |
42debcffd806c115b3d4bd83ca13e1f13c433bbf | 1,311 | py | Python | pyspawn/_graph/table.py | Tsanton/pyspawn | e539e0170f65a96e2579f255888575f6710db561 | [
"Apache-2.0"
] | null | null | null | pyspawn/_graph/table.py | Tsanton/pyspawn | e539e0170f65a96e2579f255888575f6710db561 | [
"Apache-2.0"
] | null | null | null | pyspawn/_graph/table.py | Tsanton/pyspawn | e539e0170f65a96e2579f255888575f6710db561 | [
"Apache-2.0"
] | null | null | null | from typing import TYPE_CHECKING
if TYPE_CHECKING:
from pyspawn._graph.relationship import Relationship
from dataclasses import dataclass
from typing import Set
@dataclass(frozen=False)
class Table:
"""Table class"""
schema: str
table_name: str
def __post_init__(self):
self.relationships: Set[Relationship] = set()
def get_full_name(self, quote_identifier: str) -> str:
"""return the fully quoted schema and name representation of the table."""
if self.schema is None:
return f"{quote_identifier}{self.table_name}{quote_identifier}"
return f"{quote_identifier}{self.schema}{quote_identifier}.{quote_identifier}{self.table_name}{quote_identifier}"
def to_string(self):
"""String representation of schema.table_name for the table."""
return f"{self.schema}.{self.table_name}"
def __eq__(self, other):
"""Overrides the default equality implementation based on object identifiers."""
if isinstance(other, Table):
return self.schema == other.schema and self.table_name == other.table_name
return False
def __hash__(self) -> int:
"""Overrides the default hash implementation based on object identifiers."""
return hash(self.schema + "-" + self.table_name) | 31.97561 | 121 | 0.691076 | 163 | 1,311 | 5.349693 | 0.331288 | 0.082569 | 0.074541 | 0.050459 | 0.276376 | 0.098624 | 0.098624 | 0 | 0 | 0 | 0 | 0 | 0.208238 | 1,311 | 41 | 122 | 31.97561 | 0.840077 | 0.216629 | 0 | 0 | 0 | 0 | 0.187625 | 0.186627 | 0 | 0 | 0 | 0 | 0 | 1 | 0.217391 | false | 0 | 0.173913 | 0 | 0.782609 | 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 |
42eb886a799cd5a586de9a33ab7d7606a91d724c | 1,677 | py | Python | xcube_hub/models/cubegen_config_code_config_file_set.py | bcdev/xcube-hub | 8eab0fccd340aa487560a41ae7c59dedb0cb08a8 | [
"MIT"
] | 3 | 2021-03-08T09:47:23.000Z | 2021-09-13T04:53:42.000Z | xcube_hub/models/cubegen_config_code_config_file_set.py | bcdev/xcube-hub | 8eab0fccd340aa487560a41ae7c59dedb0cb08a8 | [
"MIT"
] | 9 | 2021-06-23T15:33:04.000Z | 2022-03-30T08:30:17.000Z | xcube_hub/models/cubegen_config_code_config_file_set.py | bcdev/xcube-hub | 8eab0fccd340aa487560a41ae7c59dedb0cb08a8 | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from xcube_hub.models.base_model_ import Model
from xcube_hub import util
class CubegenConfigCodeConfigFileSet(Model):
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Do not edit the class manually.
"""
def __init__(self, path=None): # noqa: E501
"""CubegenConfigCodeConfigFileSet - a model defined in OpenAPI
:param path: The path of this CubegenConfigCodeConfigFileSet. # noqa: E501
:type path: str
"""
self.openapi_types = {
'path': str
}
self.attribute_map = {
'path': 'path'
}
self._path = path
@classmethod
def from_dict(cls, dikt) -> 'CubegenConfigCodeConfigFileSet':
"""Returns the dict as a model
:param dikt: A dict.
:type: dict
:return: The CubegenConfigCodeConfig_file_set of this CubegenConfigCodeConfigFileSet. # noqa: E501
:rtype: CubegenConfigCodeConfigFileSet
"""
return util.deserialize_model(dikt, cls)
@property
def path(self):
"""Gets the path of this CubegenConfigCodeConfigFileSet.
:return: The path of this CubegenConfigCodeConfigFileSet.
:rtype: str
"""
return self._path
@path.setter
def path(self, path):
"""Sets the path of this CubegenConfigCodeConfigFileSet.
:param path: The path of this CubegenConfigCodeConfigFileSet.
:type path: str
"""
self._path = path
| 25.8 | 107 | 0.641026 | 178 | 1,677 | 5.91573 | 0.382022 | 0.034188 | 0.205128 | 0.061728 | 0.270655 | 0.098765 | 0.098765 | 0 | 0 | 0 | 0 | 0.013201 | 0.277281 | 1,677 | 64 | 108 | 26.203125 | 0.855611 | 0.467501 | 0 | 0.086957 | 0 | 0 | 0.056834 | 0.040595 | 0 | 0 | 0 | 0 | 0 | 1 | 0.173913 | false | 0 | 0.217391 | 0 | 0.521739 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
42f0fb077af0807cf18d0db0a4ebd341c49c0ef7 | 414 | py | Python | wrappers.py | raymundosaraiva/moviestar_bot | ea10a7dcfbf89172f66b45f2cee05fdc2596c3b7 | [
"MIT"
] | null | null | null | wrappers.py | raymundosaraiva/moviestar_bot | ea10a7dcfbf89172f66b45f2cee05fdc2596c3b7 | [
"MIT"
] | null | null | null | wrappers.py | raymundosaraiva/moviestar_bot | ea10a7dcfbf89172f66b45f2cee05fdc2596c3b7 | [
"MIT"
] | null | null | null | from telegram import ChatAction
from functools import wraps
def send_typing_action(func):
"""Sends typing action while processing func command."""
@wraps(func)
def command_func(update, context, *args, **kwargs):
context.bot.send_chat_action(chat_id=update.effective_message.chat_id, action=ChatAction.TYPING)
return func(update, context, *args, **kwargs)
return command_func
| 27.6 | 104 | 0.731884 | 53 | 414 | 5.54717 | 0.471698 | 0.081633 | 0.115646 | 0.142857 | 0.183673 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.171498 | 414 | 14 | 105 | 29.571429 | 0.857143 | 0.120773 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0 | 0.75 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
6e0a915556ef1b1ec2b6032d70ff048d336e1f15 | 8,573 | py | Python | farecalculator.py | bliksemlabs/Glassbox | 6e9ffe4208ec258fa6392e30cc2b8e0ccc605f17 | [
"MIT"
] | 1 | 2017-06-16T16:43:24.000Z | 2017-06-16T16:43:24.000Z | farecalculator.py | bliksemlabs/Glassbox | 6e9ffe4208ec258fa6392e30cc2b8e0ccc605f17 | [
"MIT"
] | null | null | null | farecalculator.py | bliksemlabs/Glassbox | 6e9ffe4208ec258fa6392e30cc2b8e0ccc605f17 | [
"MIT"
] | null | null | null | """
The MIT License (MIT)
Copyright (c) 2014 Thomas Koch
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.
"""
import sqlite3
import sys
import math
db = sqlite3.connect('data.db')
#Transform a journey into faresections per operator.
def sections_to_faresections(journey):
fare_sections = []
from_station = None
to_station = None
last_operator = None
for section in journey:
if from_station is None:
from_station = section['fromStation']
to_station = section['toStation']
last_operator = section['operator']
elif last_operator != section['operator']:
fare_sections.append( {'fromStation' : from_station, 'toStation' : to_station, 'operator' : last_operator} )
from_station = section['fromStation']
to_station = section['toStation']
last_operator = section['operator']
else:
to_station = section['toStation']
fare_sections.append( {'fromStation' : from_station, 'toStation' : to_station, 'operator' : last_operator} )
return fare_sections
#Return distance,whether fare units used, 2nd class fareunits price, 1st class fareunits price, KM-price first, KM-price second,
# minimum fare in concession, entrance fee for concession, minimum distance and the name of the concession for the fare_section
def fare_for_section(fare_section,first_section=False):
c = db.cursor()
c.execute("""
SELECT d.distance,calc_method,
c.price_first,
c.price_second,
min_fare,
entrance_fee,
coalesce(min_distance,0),concession,unit_price_key
FROM distance d JOIN concession c USING (concession)
WHERE from_station = ? AND to_station = ? AND operator = ?; """,(fare_section['fromStation'],
fare_section['toStation'],
fare_section['operator']) )
res = c.fetchall()
if len(res) == 0:
return None #No fare found
c.close()
return res[0]
#Return the LAK discount factor for the distance given
def lak_factor(distance,operator):
if operator in ['VTN']:
if distance <= 40:
return 1
elif distance <= 80:
return 0.968
elif distance <= 100:
return 0.8470
elif distance <= 120:
return 0.7
elif distance <= 150:
return 0.48
elif distance <= 200:
return 0.4
elif distance <= 250:
return 0.15
elif distance > 250:
return 0
elif operator in ['CXX','ARR']:
if distance <= 40:
return 1
elif distance <= 80:
return 0.967
elif distance <= 100:
return 0.87
elif distance <= 120:
return 0.702
elif distance <= 150:
return 0.48
elif distance <= 200:
return 0.4
elif distance <= 250:
return 0.15
elif distance > 250:
return 0
else:
if distance <= 40:
return 1
elif distance <= 80:
return 0.97
elif distance <= 100:
return 0.87
elif distance <= 120:
return 0.7
elif distance <= 150:
return 0.48
elif distance <= 200:
return 0.4
elif distance <= 250:
return 0.15
elif distance > 250:
return 0
#Compute the total fare using KM price, using LAK distance stages
def compute_km_fare(km_price,distance,units_passed,operator):
fare = 0.0
for stage_ceiling in [40,80,100,120,150,200,250]:
if distance == 0:
break
capacity = stage_ceiling - units_passed
if capacity < 0:
continue
#print ' * '.join(str(x) for x in (lak_factor(stage_ceiling,operator,concession),km_price,min(capacity,distance)))
fare += lak_factor(stage_ceiling,operator)*km_price*min(capacity,distance)
distance -= min(capacity,distance)
units_passed += capacity
#Above 250 free
return fare
def round_op(price):
return int(round(price))
def fare_for_distance(distance,fareunits_passed,calc_method,km_price_first,km_price_second,min_distance,min_fare,entrance_rate,operator,unit_key):
if calc_method == 'TE':
c = db.cursor()
c.execute("SELECT price_1stfull,price_2ndfull FROM fareunit_price WHERE key = ? AND (distance = ? OR (? > 250 AND distance = 250))",(unit_key,distance,distance))
return c.fetchone()
elif calc_method == 'EASY_TRIP':
distance = max(min_distance,distance)
if km_price_first is None:
km_price_first = 1.7*km_price_second
price_first = entrance_rate + compute_km_fare(km_price_first,distance,fareunits_passed,operator)
price_second = entrance_rate + compute_km_fare(km_price_second,distance,fareunits_passed,operator)
return (price_first,price_second)
elif calc_method == 'MIN_FARE': #Used on Valleilijn First x kilometers account for price y, rest (distance-x)*km_price
price_first,price_second = 0,0
price_second += min_fare
price_first += int(min_fare*1.7)
distance = max(0,distance-min_distance)
price_second += compute_km_fare(km_price_second,distance,8,operator)
price_first += compute_km_fare(km_price_first,distance,8,operator)
return (price_first,price_second)
else:
raise Exception("Unknown calculation method %s" % (calc_method))
"""
Input a journey, a list of sections. A section is a dict, containing fromStation, toStation, operator.
Stationcodes have to be lowercase
"""
def calculate_fare(journey):
journey['faresections'] = sections_to_faresections(journey['sections'])
fareunits_passed = 0
price_second = 0
price_first = 0
for i,fare_section in enumerate(journey['faresections']):
fare = fare_for_section(fare_section)
if fare is None:
print fare_section #Debug print
distance,calc_method,kmprice_first,kmprice_second,min_fare,entrance_fee,min_distance,concession,unit_key = fare
full_fare = fare_for_distance(distance+fareunits_passed,0,calc_method,
kmprice_first,kmprice_second,min_distance,
min_fare,entrance_fee,fare_section['operator'],unit_key)
if full_fare is None:
raise Exception('FARE NOT FOUND')
full_first,full_second = full_fare
section_first,section_second = (round_op(price) for price in (full_first,full_second))
if i > 0:
passed_fare = fare_for_distance(fareunits_passed,0,calc_method,
kmprice_first,kmprice_second,min_distance,
min_fare,entrance_fee,fare_section['operator'],unit_key)
passed_first,passed_second = passed_fare
section_first,section_second = (round_op(price) for price in (max(0,full_first-passed_first),max(0,full_second-passed_second)))
fare_section['price_first'],fare_section['price_second'] = section_first,section_second
fareunits_passed += distance
price_first += fare_section['price_first']
price_second += fare_section['price_second']
fare_section['fare_distance'] = distance
journey['fare_distance'] = fareunits_passed
journey['price_second'] = price_second
journey['price_first'] = price_first
return journey
| 40.248826 | 169 | 0.650414 | 1,089 | 8,573 | 4.932048 | 0.214876 | 0.046919 | 0.013405 | 0.023459 | 0.353193 | 0.298641 | 0.253026 | 0.216533 | 0.216533 | 0.216533 | 0 | 0.029979 | 0.268517 | 8,573 | 212 | 170 | 40.438679 | 0.826503 | 0.076636 | 0 | 0.391304 | 0 | 0.006211 | 0.117268 | 0.014977 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.080745 | 0.018634 | null | null | 0.006211 | 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 |
6e13a96e632034fdebb7c762a6c1d8d4230e9842 | 372 | py | Python | searching/search_by_google.py | dimishpatriot/image_parser | 92594bd2b1b2070ecea4e53dba00c7b4bba6af62 | [
"MIT"
] | 2 | 2021-11-11T14:58:42.000Z | 2021-11-11T14:58:48.000Z | searching/search_by_google.py | dimishpatriot/image_parser | 92594bd2b1b2070ecea4e53dba00c7b4bba6af62 | [
"MIT"
] | 1 | 2021-03-31T19:59:55.000Z | 2021-03-31T19:59:55.000Z | searching/search_by_google.py | dimishpatriot/image_parser | 92594bd2b1b2070ecea4e53dba00c7b4bba6af62 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# search_by_google.py
# github.com/dimishpatriot/img_pars
from searching import search_main
class GoogleSearch(search_main.Search):
search_types = {}
size_types = {}
gamma_types = {}
orient_types = {}
type_types = {}
maximum_pics = 100
def __init__(self, path):
pass
def html_google(self):
pass
| 17.714286 | 39 | 0.637097 | 45 | 372 | 4.911111 | 0.711111 | 0.090498 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.014337 | 0.25 | 372 | 20 | 40 | 18.6 | 0.777778 | 0.201613 | 0 | 0.166667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0.166667 | 0.083333 | 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 | 1 | 0 | 0 | 1 | 0 | 0 | 2 |
6e23eb19ef5870daff45b080ad9bb6cad51eaa2b | 215 | py | Python | desafio046.py | romstk/pythonExercicios | a7a6ce7828ec28f5d8eadc0207214722cfc6fcd8 | [
"MIT"
] | null | null | null | desafio046.py | romstk/pythonExercicios | a7a6ce7828ec28f5d8eadc0207214722cfc6fcd8 | [
"MIT"
] | null | null | null | desafio046.py | romstk/pythonExercicios | a7a6ce7828ec28f5d8eadc0207214722cfc6fcd8 | [
"MIT"
] | null | null | null | from time import sleep
import emoji
print('AGUARDE A CONTAGEM PARA OS FOGOS')
for c in range(10, 0, -1):
print(c)
sleep(1)
print(emoji.emojize("Detonação dos fogos :sunny: ", use_aliases=True))
print('FIM') | 23.888889 | 70 | 0.702326 | 36 | 215 | 4.166667 | 0.75 | 0.08 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.027778 | 0.162791 | 215 | 9 | 71 | 23.888889 | 0.805556 | 0 | 0 | 0 | 0 | 0 | 0.291667 | 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 |
6e2954015f0965167926dd7139658ee07429bc63 | 6,723 | py | Python | nuage_neutron/plugins/nuage_ml2/nuage_ml2_wrapper.py | krissterckx/nuage-openstack-neutron | ff0ddd995328c502a0b903a2f2bc30ebbb3e9ddb | [
"Apache-2.0"
] | null | null | null | nuage_neutron/plugins/nuage_ml2/nuage_ml2_wrapper.py | krissterckx/nuage-openstack-neutron | ff0ddd995328c502a0b903a2f2bc30ebbb3e9ddb | [
"Apache-2.0"
] | null | null | null | nuage_neutron/plugins/nuage_ml2/nuage_ml2_wrapper.py | krissterckx/nuage-openstack-neutron | ff0ddd995328c502a0b903a2f2bc30ebbb3e9ddb | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Nokia
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from neutron.db.common_db_mixin import CommonDbMixin
from neutron.db import db_base_plugin_v2
from neutron.db import extraroute_db
from neutron.db import l3_gwmode_db
from neutron.plugins.ml2 import driver_api as api
from neutron_lib import constants as lib_constants
from neutron_lib.services import base as service_base
from nuage_neutron.plugins.common import base_plugin
from nuage_neutron.plugins.common import externalsg
from nuage_neutron.plugins.common import gateway
from nuage_neutron.plugins.common.time_tracker import TimeTracker
class NuageML2Wrapper(base_plugin.RootNuagePlugin,
api.MechanismDriver,
db_base_plugin_v2.NeutronDbPluginV2):
def __init__(self):
super(NuageML2Wrapper, self).__init__()
@TimeTracker.untracked
def get_port(self, context, id, fields=None):
super(NuageML2Wrapper, self).get_port(context, id, fields)
@TimeTracker.untracked
def get_ports(self, context, filters=None, fields=None,
sorts=None, limit=None, marker=None,
page_reverse=False):
return super(NuageML2Wrapper, self).get_ports(context, filters, fields,
sorts, limit, marker,
page_reverse)
@TimeTracker.untracked
def delete_port(self, context, id):
super(NuageML2Wrapper, self).delete_port(context, id)
@TimeTracker.untracked
def get_ports_count(self, context, filters=None):
return super(NuageML2Wrapper, self).get_ports_count(context, filters)
@TimeTracker.untracked
def update_network(self, context, id, network):
return super(NuageML2Wrapper, self).update_network(context, id,
network)
@TimeTracker.untracked
def delete_network(self, context, id):
super(NuageML2Wrapper, self).delete_network(context, id)
@TimeTracker.untracked
def create_subnet(self, context, subnet):
return super(NuageML2Wrapper, self).create_subnet(
context, subnet)
@TimeTracker.untracked
def create_port(self, context, port):
return super(NuageML2Wrapper, self).create_port(context, port)
@TimeTracker.untracked
def delete_subnet(self, context, id):
super(NuageML2Wrapper, self).delete_subnet(context, id)
@TimeTracker.untracked
def get_subnet(self, context, id, fields=None):
return super(NuageML2Wrapper, self).get_subnet(context, id, fields)
@TimeTracker.untracked
def get_subnets(self, context, filters=None, fields=None,
sorts=None, limit=None, marker=None,
page_reverse=False):
return super(NuageML2Wrapper, self).get_subnets(
context, filters, fields, sorts, limit, marker, page_reverse)
@TimeTracker.untracked
def update_subnet(self, context, id, subnet):
return super(NuageML2Wrapper, self).update_subnet(
context, id, subnet)
@TimeTracker.untracked
def _get_port(self, context, id):
return super(NuageML2Wrapper, self)._get_port(context, id)
class NuageApiWrapper(base_plugin.BaseNuagePlugin,
service_base.ServicePluginBase,
externalsg.NuageexternalsgMixin,
gateway.NuagegatewayMixin):
def __init__(self):
super(NuageApiWrapper, self).__init__()
class NuageL3Wrapper(base_plugin.BaseNuagePlugin,
service_base.ServicePluginBase,
CommonDbMixin,
extraroute_db.ExtraRoute_db_mixin,
l3_gwmode_db.L3_NAT_db_mixin):
def __init__(self):
super(NuageL3Wrapper, self).__init__()
@TimeTracker.untracked
def add_router_interface(self, context, router_id, interface_info):
return super(NuageL3Wrapper, self).add_router_interface(
context, router_id, interface_info)
@TimeTracker.untracked
def remove_router_interface(self, context, router_id, interface_info):
return super(NuageL3Wrapper, self).remove_router_interface(
context, router_id, interface_info)
@TimeTracker.untracked
def get_router(self, context, id, fields=None):
return super(NuageL3Wrapper, self).get_router(
context, id, fields)
@TimeTracker.untracked
def create_router(self, context, router):
return super(NuageL3Wrapper, self).create_router(
context, router)
@TimeTracker.untracked
def delete_router(self, context, id):
super(NuageL3Wrapper, self).delete_router(context, id)
@TimeTracker.untracked
def update_router(self, context, id, router):
return super(NuageL3Wrapper, self).update_router(
context, id, router)
@TimeTracker.untracked
def get_floatingip(self, context, id, fields=None):
return super(NuageL3Wrapper, self).get_floatingip(
context, id, fields)
@TimeTracker.untracked
def create_floatingip(self, context, floatingip,
initial_status=lib_constants.
FLOATINGIP_STATUS_ACTIVE):
return super(NuageL3Wrapper, self).create_floatingip(
context, floatingip, initial_status)
@TimeTracker.untracked
def delete_floatingip(self, context, id):
super(NuageL3Wrapper, self).delete_floatingip(context, id)
@TimeTracker.untracked
def disassociate_floatingips(self, context, port_id, do_notify=True):
return super(NuageL3Wrapper, self).disassociate_floatingips(
context, port_id, do_notify)
@TimeTracker.untracked
def notify_routers_updated(self, context, router_ids):
# attention : L3_NAT_db_mixin signature seems buggy i.e. incomplete
super(NuageL3Wrapper, self).notify_routers_updated(
context, router_ids)
@TimeTracker.untracked
def update_floatingip(self, context, id, floatingip):
return super(NuageL3Wrapper, self).update_floatingip(
context, id, floatingip)
| 37.769663 | 79 | 0.681392 | 740 | 6,723 | 5.994595 | 0.205405 | 0.056808 | 0.129621 | 0.060866 | 0.499549 | 0.377818 | 0.298918 | 0.188909 | 0.169522 | 0.169522 | 0 | 0.008808 | 0.240071 | 6,723 | 177 | 80 | 37.983051 | 0.859464 | 0.094601 | 0 | 0.301587 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | false | 0 | 0.087302 | 0.142857 | 0.47619 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 |
6e3029cba6029a34f5322a6bcd9f30471572e629 | 189 | py | Python | aapi/__init__.py | wpk-/aapi | d8cd47c16cefa599edba5a85f86551bf6747718c | [
"MIT"
] | null | null | null | aapi/__init__.py | wpk-/aapi | d8cd47c16cefa599edba5a85f86551bf6747718c | [
"MIT"
] | null | null | null | aapi/__init__.py | wpk-/aapi | d8cd47c16cefa599edba5a85f86551bf6747718c | [
"MIT"
] | null | null | null | """
aapi.
Een typed interface voor de data API van de Gemeente Amsterdam.
"""
__version__ = '0.2.2'
__author__ = 'Paul Koppen'
__credits__ = 'Gemeente Amsterdam'
from aapi.api import API
| 17.181818 | 63 | 0.730159 | 27 | 189 | 4.666667 | 0.740741 | 0.269841 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.018987 | 0.164021 | 189 | 10 | 64 | 18.9 | 0.778481 | 0.37037 | 0 | 0 | 0 | 0 | 0.306306 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
6e3ff40009b72ff44050f296d08804c97ade0590 | 4,233 | py | Python | src/py_dss_interface/models/Bus/BusF.py | davilamds/py_dss_interface | a447c97787aeac962381db88dd622ccb235eef4b | [
"MIT"
] | 8 | 2020-08-15T12:56:03.000Z | 2022-01-04T15:51:14.000Z | src/py_dss_interface/models/Bus/BusF.py | rodolfoplondero/py_dss_interface | cb6771b34ed322a5df7ef1cc194611e794f26441 | [
"MIT"
] | 24 | 2021-04-24T18:33:19.000Z | 2021-11-13T14:59:54.000Z | src/py_dss_interface/models/Bus/BusF.py | rodolfoplondero/py_dss_interface | cb6771b34ed322a5df7ef1cc194611e794f26441 | [
"MIT"
] | 7 | 2020-08-15T12:56:04.000Z | 2021-10-04T16:14:30.000Z | # -*- encoding: utf-8 -*-
"""
Created by eniocc at 11/10/2020
"""
import ctypes
from py_dss_interface.models.Base import Base
class BusF(Base):
"""
This interface can be used to read/write certain properties of the active DSS object.
The structure of the interface is as follows:
double BUSF(int32_t Parameter, double Argument)
This interface returns a floating point number (64 bits) according to the number sent in the variable
“parameter”. The parameter can be one of the following.
"""
def bus_kv_base(self) -> float:
"""Returns the base voltage at bus in kV."""
return self.dss_obj.BUSF(0, 0)
def bus_read_x(self) -> float:
"""Returns the X coordinate for the bus."""
return self.dss_obj.BUSF(1, 0)
def bus_write_x(self, param_coordinate) -> int:
"""Allows to write the X coordinate for the bus. Returns 0.
:param param_coordinate: The X coordinate, if it's None, X will be 0.0
"""
param_coordinate = Base.check_float_param(param_coordinate)
result = self.dss_obj.BUSF(2, ctypes.c_double(param_coordinate))
Base.check_assertion_result(result, "Write X coordinate failed!", "Something wrong when tried defined the X "
"coordinate!")
return result
def bus_read_y(self) -> float:
"""Returns the X coordinate for the bus."""
return self.dss_obj.BUSF(3, 0)
def bus_write_y(self, param_coordinate: float) -> int:
"""Allows to write the Y coordinate for the bus. Returns 0.
:param param_coordinate: The Y coordinate, if it's None, Y will be 0.0
"""
param_coordinate = Base.check_float_param(param_coordinate)
result = self.dss_obj.BUSF(4, ctypes.c_double(param_coordinate))
Base.check_assertion_result(result, "Write Y coordinate failed!", "Something wrong when tried defined the Y "
"coordinate!")
return result
def bus_distance(self) -> float:
"""Returns the distance from the energymeter (if non-zero)."""
return self.dss_obj.BUSF(5, 0)
def bus_lambda(self) -> float:
"""Returns the accumulated failure rate downstream from this bus, faults per year."""
return self.dss_obj.BUSF(6, 0)
def bus_interruptions_num(self) -> float:
"""Returns the number of interruptions this bus per year."""
return self.dss_obj.BUSF(7, 0)
def bus_interruptions_avg_duration(self) -> float:
"""Returns the average interruption duration in hours."""
return self.dss_obj.BUSF(8, 0)
def bus_interruptions_total_customers(self) -> float:
"""Returns the annual number of customer interruptions from this bus."""
return self.dss_obj.BUSF(9, 0)
def bus_outage_customer_accum_duration(self) -> float:
"""Returns the accumulated customer outage durations."""
return self.dss_obj.BUSF(10, 0)
def bus_line_total_miles(self) -> float:
"""Returns the total length of line downline from this bus, in miles. For recloser siting algorithm."""
return self.dss_obj.BUSF(11, 0)
def bus_read_latitude(self) -> float:
"""This parameter returns the GIS latitude assigned to the active bus (if any)."""
return self.dss_obj.BUSF(12, 0)
def bus_write_latitude(self, latitude_param: float) -> float:
"""This parameter sets the GIS latitude to the active bus using the value given at the argument.."""
latitude_param = Base.check_float_param(latitude_param)
return self.dss_obj.BUSF(13, ctypes.c_double(latitude_param))
def bus_read_longitude(self) -> float:
"""This parameter returns the GIS longitude assigned to the active bus (if any)."""
return self.dss_obj.BUSF(14, 0)
def bus_write_longitude(self, longitude_param: float) -> float:
"""This parameter sets the GIS longitude to the active bus using the value given at the argument.."""
longitude_param = Base.check_float_param(longitude_param)
return self.dss_obj.BUSF(15, ctypes.c_double(longitude_param))
| 43.193878 | 117 | 0.6558 | 590 | 4,233 | 4.555932 | 0.237288 | 0.035714 | 0.059524 | 0.083333 | 0.531622 | 0.393229 | 0.364583 | 0.318452 | 0.25372 | 0.25372 | 0 | 0.016682 | 0.249468 | 4,233 | 97 | 118 | 43.639175 | 0.829399 | 0.372549 | 0 | 0.133333 | 0 | 0 | 0.06235 | 0 | 0 | 0 | 0 | 0 | 0.044444 | 1 | 0.355556 | false | 0 | 0.044444 | 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 | 0 | 0 | 1 | 0 | 0 | 2 |
6e44102227003162a189dcc752d1e7caa86a2f9b | 1,357 | py | Python | sme/test/test_membrane.py | henryiii/spatial-model-editor | 2138d03ae4c7cc353b40324dfd1a3e763d7085d9 | [
"MIT"
] | 4 | 2019-07-18T15:05:09.000Z | 2020-03-14T09:50:07.000Z | sme/test/test_membrane.py | henryiii/spatial-model-editor | 2138d03ae4c7cc353b40324dfd1a3e763d7085d9 | [
"MIT"
] | 418 | 2020-10-08T07:42:27.000Z | 2022-03-08T12:10:52.000Z | sme/test/test_membrane.py | henryiii/spatial-model-editor | 2138d03ae4c7cc353b40324dfd1a3e763d7085d9 | [
"MIT"
] | 2 | 2021-09-02T11:20:38.000Z | 2021-10-13T14:05:32.000Z | import unittest
import sme
class TestMembrane(unittest.TestCase):
def test_membrane(self):
m = sme.open_example_model()
self.assertEqual(len(m.membranes), 2)
self.assertRaises(sme.InvalidArgument, lambda: m.membranes["X"])
mem = m.membranes["Outside <-> Cell"]
self.assertEqual(mem, m.membranes[0])
self.assertEqual(m.membranes[-1], m.membranes[1])
self.assertEqual(repr(mem), "<sme.Membrane named 'Outside <-> Cell'>")
self.assertEqual(str(mem)[0:43], "<sme.Membrane>\n - name: 'Outside <-> Cell'")
self.assertEqual(mem.name, "Outside <-> Cell")
mem.name = "new name"
self.assertEqual(mem.name, "new name")
self.assertEqual(len(mem.reactions), 2)
self.assertRaises(sme.InvalidArgument, lambda: mem.reactions["X"])
r = mem.reactions["A uptake from outside"]
self.assertEqual(r.name, "A uptake from outside")
# export model, open again, check membrane is preserved
m.export_sbml_file("tmp.xml")
m2 = sme.open_sbml_file("tmp.xml")
self.assertEqual(len(m2.membranes), 2)
mem2 = m2.membranes["new name"]
self.assertEqual(mem2.name, mem.name)
self.assertEqual(len(mem2.reactions), 2)
r2 = mem2.reactions["A uptake from outside"]
self.assertEqual(r2.name, r.name)
| 43.774194 | 88 | 0.635225 | 173 | 1,357 | 4.942197 | 0.294798 | 0.22807 | 0.084211 | 0.091228 | 0.329825 | 0.261988 | 0.098246 | 0 | 0 | 0 | 0 | 0.017891 | 0.217391 | 1,357 | 30 | 89 | 45.233333 | 0.787194 | 0.039057 | 0 | 0 | 0 | 0 | 0.167435 | 0 | 0 | 0 | 0 | 0 | 0.555556 | 1 | 0.037037 | false | 0 | 0.074074 | 0 | 0.148148 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
6e4ba257edcc744415488557ba2aeb6f15a3e57e | 1,803 | py | Python | ussd/airtime_api.py | dirkcuys/save4life | 0dbc8feb0292e24177b8fcb4bd274dfc27f8264e | [
"BSD-3-Clause"
] | null | null | null | ussd/airtime_api.py | dirkcuys/save4life | 0dbc8feb0292e24177b8fcb4bd274dfc27f8264e | [
"BSD-3-Clause"
] | null | null | null | ussd/airtime_api.py | dirkcuys/save4life | 0dbc8feb0292e24177b8fcb4bd274dfc27f8264e | [
"BSD-3-Clause"
] | null | null | null | from django.conf import settings
from zeep import Client
import time
import logging
logger = logging.getLogger(__name__)
class InsufficientBalance(Exception):
pass
class AirtimeApiError(Exception):
pass
def pinless_recharge(transaction):
amount = transaction.amount
msisdn = transaction.user.msisdn
api_ref = 'transaction-{0}'.format(transaction.pk) # Reference for external API
logger.info(u'pinless_recharge({0}, {1})'.format(msisdn, amount))
client = Client(settings.AIRTIME_WSDL_URL)
# authenticate client
auth_resp = client.service.authenticate_cashier(
terminalnumber=settings.AIRTIME_TERMINAL_NUMBER,
msisdn=settings.AIRTIME_MSISDN,
pin=settings.AIRTIME_PIN
)
# get auth token
# TODO accessing properties can throw an exception ...
token = auth_resp.token
balance_available = auth_resp.authenticate_cashierResult.Vendor.Balance.Available
# check balance - make sure we have enough money to pay voucher
if balance_available < amount:
raise InsufficientBalance('Account balance too low for airtime recharge')
recharge_resp = client.service.vend_airtime_pinless(
authtoken=token,
reference=api_ref,
sourcemsisdn=settings.AIRTIME_MSISDN,
msisdn=msisdn,
denomination=amount
)
if recharge_resp.vend_airtime_pinlessResult != True:
logger.info(u'pinless_recharge({0}, {1}) failed')
raise AirtimeApiError(u'Could not issue airtime: '.format(recharge_resp.error))
# reference used by transaction
ref = "{0}-{1}-{2}".format(msisdn, amount, int(time.time()))
transaction.reference_code = ref
transaction.save()
logger.info(u'pinless_recharge({0}, {1}) success. ref# {2}'.format(msisdn, amount, ref))
| 31.086207 | 92 | 0.711592 | 211 | 1,803 | 5.92891 | 0.436019 | 0.059952 | 0.026379 | 0.043165 | 0.067146 | 0.067146 | 0.067146 | 0 | 0 | 0 | 0 | 0.00756 | 0.193012 | 1,803 | 57 | 93 | 31.631579 | 0.852234 | 0.114254 | 0 | 0.052632 | 0 | 0 | 0.124607 | 0.039648 | 0 | 0 | 0 | 0.017544 | 0 | 1 | 0.026316 | false | 0.052632 | 0.105263 | 0 | 0.184211 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
6e54533bbe829a4155622461678156ed91fdf48f | 73,609 | py | Python | tests/test_resources/concept_ids/municipality.py | JobtechSwe/sokannonser-api | 84214c51429fcedffa9a5d7d93afd9fdc080dcbb | [
"Apache-2.0"
] | 14 | 2018-09-12T14:08:54.000Z | 2021-09-20T11:54:20.000Z | tests/test_resources/concept_ids/municipality.py | JobtechSwe/sokannonser-api | 84214c51429fcedffa9a5d7d93afd9fdc080dcbb | [
"Apache-2.0"
] | 43 | 2018-09-25T14:39:02.000Z | 2021-10-01T08:40:23.000Z | tests/test_resources/concept_ids/municipality.py | JobtechSwe/sokannonser-api | 84214c51429fcedffa9a5d7d93afd9fdc080dcbb | [
"Apache-2.0"
] | 8 | 2018-11-21T23:51:47.000Z | 2021-06-04T10:34:16.000Z | from tests.test_resources.helper import select_random_from_list
def get_muncipalities_with_hits():
with_hits = []
for m in municipalities:
if m['hits'] > 0:
with_hits.append(m)
return with_hits
def get_ten_random_municipalities_with_hits():
return select_random_from_list(full_list=get_muncipalities_with_hits(), how_many=10)
municipalities = [
{'id': 'XWKY_c49_5nv', 'name': 'Upplands Väsby', 'type': 'municipality', 'code': '0114', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 14,
'ad_ids': ['24641303', '24641232', '24636479', '24630746', '24627847', '24612651', '24608713', '24603235',
'24598186', '24580428']},
{'id': 'K4az_Bm6_hRV', 'name': 'Vallentuna', 'type': 'municipality', 'code': '0115', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 7,
'ad_ids': ['24649005', '24648696', '24641486', '24611368', '24590586', '24556609', '24519998']},
{'id': '8gKt_ZsV_PGj', 'name': 'Österåker', 'type': 'municipality', 'code': '0117', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 8,
'ad_ids': ['24640198', '24634294', '23699999', '24624738', '24577311', '24576867', '24532362', '24518247']},
{'id': '15nx_Vut_GrH', 'name': 'Värmdö', 'type': 'municipality', 'code': '0120', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 11,
'ad_ids': ['24632907', '24631461', '24620746', '24614472', '24610276', '24602803', '24590922', '24577016',
'24574442', '24509435']},
{'id': 'qm5H_jsD_fUF', 'name': 'Järfälla', 'type': 'municipality', 'code': '0123', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 16,
'ad_ids': ['24648843', '24647618', '24638674', '24637614', '24627854', '24626944', '24623198', '24622371',
'24619258', '24616216']},
{'id': 'magF_Gon_YL2', 'name': 'Ekerö', 'type': 'municipality', 'code': '0125', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 11,
'ad_ids': ['24647866', '24643150', '24638266', '24637006', '24626766', '24618010', '24617986', '24609385',
'24601615', '24541639']},
{'id': 'g1Gc_aXK_EKu', 'name': 'Huddinge', 'type': 'municipality', 'code': '0126', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 47,
'ad_ids': ['24649947', '24649919', '24649818', '24647357', '24641723', '24640701', '24639742', '24638132',
'24636901',
'24633282']},
{'id': 'CCVZ_JA7_d3y', 'name': 'Botkyrka', 'type': 'municipality', 'code': '0127', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 20,
'ad_ids': ['24649834', '24649058', '24645367', '24642952', '24637457', '24635479', '24634919', '24629461',
'24622699', '24615777']},
{'id': '4KBw_CPU_VQv', 'name': 'Salem', 'type': 'municipality', 'code': '0128', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 2, 'ad_ids': ['24635325', '24596057']},
{'id': 'Q7gp_9dT_k2F', 'name': 'Haninge', 'type': 'municipality', 'code': '0136', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 17,
'ad_ids': ['24650480', '24647950', '24630278', '24623592', '24616301', '24614366', '24606163', '24604574',
'24589305', '24586867']},
{'id': 'sTPc_k2B_SqV', 'name': 'Tyresö', 'type': 'municipality', 'code': '0138', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 7,
'ad_ids': ['24643255', '24624425', '24618754', '24614988', '24613766', '24598566', '24597634']},
{'id': 'w6yq_CGR_Fiv', 'name': 'Upplands-Bro', 'type': 'municipality', 'code': '0139', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 11,
'ad_ids': ['24649677', '24644808', '24643168', '24643140', '24641431', '24554813', '24628120', '24614768',
'24604245', '24603297']},
{'id': 'mBKv_q3B_SK8', 'name': 'Nykvarn', 'type': 'municipality', 'code': '0140', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 7,
'ad_ids': ['24649772', '24645739', '24644051', '24637850', '24630053', '24625534', '24589239']},
{'id': 'onpA_B5a_zfv', 'name': 'Täby', 'type': 'municipality', 'code': '0160', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 25,
'ad_ids': ['24640762', '24640430', '24640171', '24637534', '24625126', '24624931', '24613119', '24611999',
'24610353', '24609668']},
{'id': 'E4CV_a5E_ucX', 'name': 'Danderyd', 'type': 'municipality', 'code': '0162', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 18,
'ad_ids': ['24650650', '24650652', '24643754', '24639629', '24638561', '24638260', '24614446', '24611837',
'24609748', '24597392']},
{'id': 'Z5Cq_SgB_dsB', 'name': 'Sollentuna', 'type': 'municipality', 'code': '0163', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 8,
'ad_ids': ['24648025', '24646503', '24634127', '24627899', '24624197', '24612586', '24605084', '24604254']},
{'id': 'AvNB_uwa_6n6', 'name': 'Stockholm', 'type': 'municipality', 'code': '0180', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 775,
'ad_ids': ['24650983', '24650895', '24650889', '24650784', '24650759', '24650748', '24650728', '24650682',
'24650497', '24650349']},
{'id': 'g6hK_M1o_hiU', 'name': 'Södertälje', 'type': 'municipality', 'code': '0181', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 52,
'ad_ids': ['24650352', '24647317', '24646726', '24644816', '24644223', '24642658', '24642513', '24641912',
'24641018', '24640024']},
{'id': 'aYA7_PpG_BqP', 'name': 'Nacka', 'type': 'municipality', 'code': '0182', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 27,
'ad_ids': ['24649527', '24649274', '24645898', '24644478', '24581554', '24636080', '24634930', '24628301',
'24627163', '24621428']},
{'id': 'UTJZ_zHH_mJm', 'name': 'Sundbyberg', 'type': 'municipality', 'code': '0183', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 11,
'ad_ids': ['24643175', '24638423', '24637895', '24621759', '24611001', '24605909', '24602420', '24599279',
'24590884', '24552397']},
{'id': 'zHxw_uJZ_NJ8', 'name': 'Solna', 'type': 'municipality', 'code': '0184', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 61,
'ad_ids': ['24650876', '24649894', '24649491', '24648158', '24644646', '24643212', '24641524', '24640665',
'24639217', '24638221']},
{'id': 'FBbF_mda_TYD', 'name': 'Lidingö', 'type': 'municipality', 'code': '0186', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 13,
'ad_ids': ['24648043', '24648032', '24645326', '24631039', '24238908', '24611032', '24606240', '24604895',
'24603294', '24593721']},
{'id': '9aAJ_j6L_DST', 'name': 'Vaxholm', 'type': 'municipality', 'code': '0187', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 2, 'ad_ids': ['24618958', '24542055']},
{'id': 'btgf_fS7_sKG', 'name': 'Norrtälje', 'type': 'municipality', 'code': '0188', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 26,
'ad_ids': ['24647156', '24645902', '24645523', '24644525', '24638282', '24639147', '24636961', '24633665',
'24628281', '24626958']},
{'id': '8ryy_X54_xJj', 'name': 'Sigtuna', 'type': 'municipality', 'code': '0191', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 19,
'ad_ids': ['24649537', '24648645', '24645926', '24643945', '24636904', '24636803', '24634498', '24633655',
'24631760', '24628534']},
{'id': '37UU_T7x_oxG', 'name': 'Nynäshamn', 'type': 'municipality', 'code': '0192', 'region_code': '01',
'region_name': 'Stockholms län', 'hits': 12,
'ad_ids': ['24649508', '24649463', '24643147', '24642006', '24636125', '24620822', '24616700', '24600203',
'24575057', '24566977']},
{'id': 'Bbs5_JUs_Qh5', 'name': 'Håbo', 'type': 'municipality', 'code': '0305', 'region_code': '03',
'region_name': 'Uppsala län', 'hits': 5, 'ad_ids': ['24650354', '24645507', '24643909', '24562714', '24485221']},
{'id': 'cbyw_9aK_Cni', 'name': 'Älvkarleby', 'type': 'municipality', 'code': '0319', 'region_code': '03',
'region_name': 'Uppsala län', 'hits': 1, 'ad_ids': ['24623380']},
{'id': 'KALq_sG6_VrW', 'name': 'Knivsta', 'type': 'municipality', 'code': '0330', 'region_code': '03',
'region_name': 'Uppsala län', 'hits': 5, 'ad_ids': ['24634631', '24610544', '24593401', '24577340', '24499916']},
{'id': 'K8A2_JBa_e6e', 'name': 'Tierp', 'type': 'municipality', 'code': '0360', 'region_code': '03',
'region_name': 'Uppsala län', 'hits': 5, 'ad_ids': ['24646413', '24642957', '24632440', '24629420', '24593674']},
{'id': 'otaF_bQY_4ZD', 'name': 'Uppsala', 'type': 'municipality', 'code': '0380', 'region_code': '03',
'region_name': 'Uppsala län', 'hits': 116,
'ad_ids': ['24650128', '24649375', '24649111', '24648825', '24648007', '24641555', '24647083', '24642165',
'24645085', '24643472']},
{'id': 'HGwg_unG_TsG', 'name': 'Enköping', 'type': 'municipality', 'code': '0381', 'region_code': '03',
'region_name': 'Uppsala län', 'hits': 31,
'ad_ids': ['24649986', '24640955', '24636030', '24634261', '24634124', '24633958', '24633755', '24632200',
'24631332', '24630750']},
{'id': 'VE3L_3Ei_XbG', 'name': 'Östhammar', 'type': 'municipality', 'code': '0382', 'region_code': '03',
'region_name': 'Uppsala län', 'hits': 7,
'ad_ids': ['24636870', '24620508', '24610180', '24602559', '24545246', '24528574', '24456277']},
{'id': 'rut9_f5W_kTX', 'name': 'Vingåker', 'type': 'municipality', 'code': '0428', 'region_code': '04',
'region_name': 'Södermanlands län', 'hits': 3, 'ad_ids': ['24630384', '24611402', '24610522']},
{'id': 'os8Y_RUo_U3u', 'name': 'Gnesta', 'type': 'municipality', 'code': '0461', 'region_code': '04',
'region_name': 'Södermanlands län', 'hits': 7,
'ad_ids': ['24624678', '24614695', '24606086', '24539789', '24527883', '24452669', '24437897']},
{'id': 'KzvD_ePV_DKQ', 'name': 'Nyköping', 'type': 'municipality', 'code': '0480', 'region_code': '04',
'region_name': 'Södermanlands län', 'hits': 32,
'ad_ids': ['24648507', '24647220', '24646241', '24644029', '24643813', '24640685', '24638209', '24621102',
'24619295', '24618870']},
{'id': '72XK_mUU_CAH', 'name': 'Oxelösund', 'type': 'municipality', 'code': '0481', 'region_code': '04',
'region_name': 'Södermanlands län', 'hits': 6,
'ad_ids': ['24650534', '24638207', '24635193', '24627634', '24572186', '24470292']},
{'id': 'P8yp_WT9_Bks', 'name': 'Flen', 'type': 'municipality', 'code': '0482', 'region_code': '04',
'region_name': 'Södermanlands län', 'hits': 8,
'ad_ids': ['24642920', '24642061', '24617764', '24617668', '24584928', '24570283', '24457975', '24252077']},
{'id': 'snx9_qVD_Dr1', 'name': 'Katrineholm', 'type': 'municipality', 'code': '0483', 'region_code': '04',
'region_name': 'Södermanlands län', 'hits': 11,
'ad_ids': ['24641421', '24640118', '24638917', '24634274', '24632221', '24627764', '24624267', '24572047',
'24499697', '24462987']},
{'id': 'kMxr_NiX_YrU', 'name': 'Eskilstuna', 'type': 'municipality', 'code': '0484', 'region_code': '04',
'region_name': 'Södermanlands län', 'hits': 37,
'ad_ids': ['24649500', '24648293', '24642848', '24642008', '24635208', '24634840', '24634180', '24624433',
'24623481', '24622346']},
{'id': 'shnD_RiE_RKL', 'name': 'Strängnäs', 'type': 'municipality', 'code': '0486', 'region_code': '04',
'region_name': 'Södermanlands län', 'hits': 13,
'ad_ids': ['24645062', '24640755', '24633881', '24629018', '24628036', '24626818', '24620342', '24617315',
'24613763', '24606350']},
{'id': 'rjzu_nQn_mCK', 'name': 'Trosa', 'type': 'municipality', 'code': '0488', 'region_code': '04',
'region_name': 'Södermanlands län', 'hits': 6,
'ad_ids': ['24629673', '24617357', '24615644', '24601519', '24573221', '24568390']},
{'id': 'Fu8g_29u_3xF', 'name': 'Ödeshög', 'type': 'municipality', 'code': '0509', 'region_code': '05',
'region_name': 'Östergötlands län', 'hits': 4, 'ad_ids': ['24633236', '24604733', '24604699', '24536516']},
{'id': 'vRRz_nLT_vYv', 'name': 'Ydre', 'type': 'municipality', 'code': '0512', 'region_code': '05',
'region_name': 'Östergötlands län', 'hits': 1, 'ad_ids': ['24489383']},
{'id': 'U4XJ_hYF_FBA', 'name': 'Kinda', 'type': 'municipality', 'code': '0513', 'region_code': '05',
'region_name': 'Östergötlands län', 'hits': 4, 'ad_ids': ['24640366', '24620200', '24513240', '24434591']},
{'id': 'e5LB_m9V_TnT', 'name': 'Boxholm', 'type': 'municipality', 'code': '0560', 'region_code': '05',
'region_name': 'Östergötlands län', 'hits': 1, 'ad_ids': ['24614590']},
{'id': 'bFWo_FRJ_x2T', 'name': 'Åtvidaberg', 'type': 'municipality', 'code': '0561', 'region_code': '05',
'region_name': 'Östergötlands län', 'hits': 1, 'ad_ids': ['24614818']},
{'id': 'dMFe_J6W_iJv', 'name': 'Finspång', 'type': 'municipality', 'code': '0562', 'region_code': '05',
'region_name': 'Östergötlands län', 'hits': 7,
'ad_ids': ['24644134', '24625540', '24612693', '24611379', '24590409', '24583823', '24471628']},
{'id': 'Sb3D_iGB_aXu', 'name': 'Valdemarsvik', 'type': 'municipality', 'code': '0563', 'region_code': '05',
'region_name': 'Östergötlands län', 'hits': 3, 'ad_ids': ['24645130', '24645129', '24597478']},
{'id': 'bm2x_1mr_Qhx', 'name': 'Linköping', 'type': 'municipality', 'code': '0580', 'region_code': '05',
'region_name': 'Östergötlands län', 'hits': 110,
'ad_ids': ['24650847', '24650299', '24650286', '24650132', '24650066', '24649942', '24649791', '24649190',
'24648447', '24647737']},
{'id': 'SYty_Yho_JAF', 'name': 'Norrköping', 'type': 'municipality', 'code': '0581', 'region_code': '05',
'region_name': 'Östergötlands län', 'hits': 77,
'ad_ids': ['24645698', '24644342', '24642624', '24642581', '24642596', '24638971', '24637959', '24636774',
'24635847', '24635810']},
{'id': 'Pcv9_yYh_Uw8', 'name': 'Söderköping', 'type': 'municipality', 'code': '0582', 'region_code': '05',
'region_name': 'Östergötlands län', 'hits': 5,
'ad_ids': ['24643307', '24593500', '24592848', '24579758', '24540435']},
{'id': 'E1MC_1uG_phm', 'name': 'Motala', 'type': 'municipality', 'code': '0583', 'region_code': '05',
'region_name': 'Östergötlands län', 'hits': 13,
'ad_ids': ['24650644', '24647728', '24647601', '24644258', '24639992', '24635027', '24627968', '24625493',
'24611718', '24574665']},
{'id': 'VcCU_Y86_eKU', 'name': 'Vadstena', 'type': 'municipality', 'code': '0584', 'region_code': '05',
'region_name': 'Östergötlands län', 'hits': 6,
'ad_ids': ['24636656', '24631849', '24613868', '24605632', '24597399', '24579124']},
{'id': 'stqv_JGB_x8A', 'name': 'Mjölby', 'type': 'municipality', 'code': '0586', 'region_code': '05',
'region_name': 'Östergötlands län', 'hits': 17,
'ad_ids': ['24648019', '24644313', '24632147', '24628098', '24622278', '24616742', '24596459', '24615796',
'24613095', '24605455']},
{'id': 'yaHU_E7z_YnE', 'name': 'Lekeberg', 'type': 'municipality', 'code': '1814', 'region_code': '18',
'region_name': 'Örebro län', 'hits': 3, 'ad_ids': ['24618574', '24590700', '24573858']},
{'id': 'oYEQ_m8Q_unY', 'name': 'Laxå', 'type': 'municipality', 'code': '1860', 'region_code': '18',
'region_name': 'Örebro län', 'hits': 1, 'ad_ids': ['24613284']},
{'id': 'Ak9V_rby_yYS', 'name': 'Hallsberg', 'type': 'municipality', 'code': '1861', 'region_code': '18',
'region_name': 'Örebro län', 'hits': 5, 'ad_ids': ['24645029', '24641916', '24630258', '24625794', '23791205']},
{'id': 'pvzC_muj_rcq', 'name': 'Degerfors', 'type': 'municipality', 'code': '1862', 'region_code': '18',
'region_name': 'Örebro län', 'hits': 2, 'ad_ids': ['24640136', '24612483']},
{'id': 'sCbY_r36_xhs', 'name': 'Hällefors', 'type': 'municipality', 'code': '1863', 'region_code': '18',
'region_name': 'Örebro län', 'hits': 2, 'ad_ids': ['24597505', '24562629']},
{'id': 'eF2n_714_hSU', 'name': 'Ljusnarsberg', 'type': 'municipality', 'code': '1864', 'region_code': '18',
'region_name': 'Örebro län', 'hits': 1, 'ad_ids': ['24620853']},
{'id': 'kuMn_feU_hXx', 'name': 'Örebro', 'type': 'municipality', 'code': '1880', 'region_code': '18',
'region_name': 'Örebro län', 'hits': 83,
'ad_ids': ['24650582', '24650365', '24649289', '24649147', '24648442', '24648272', '24648247', '24647801',
'24646747', '24646234']},
{'id': 'viCA_36P_pQp', 'name': 'Kumla', 'type': 'municipality', 'code': '1881', 'region_code': '18',
'region_name': 'Örebro län', 'hits': 6,
'ad_ids': ['24628041', '24627103', '24620812', '24612404', '24591455', '24525516']},
{'id': 'dbF7_Ecz_CWF', 'name': 'Askersund', 'type': 'municipality', 'code': '1882', 'region_code': '18',
'region_name': 'Örebro län', 'hits': 1, 'ad_ids': ['24614139']},
{'id': 'wgJm_upX_z5W', 'name': 'Karlskoga', 'type': 'municipality', 'code': '1883', 'region_code': '18',
'region_name': 'Örebro län', 'hits': 14,
'ad_ids': ['24641108', '24640044', '24638125', '24627556', '24626010', '24619701', '24614690', '24596123',
'24574044', '24506835']},
{'id': 'WFXN_hsU_gmx', 'name': 'Nora', 'type': 'municipality', 'code': '1884', 'region_code': '18',
'region_name': 'Örebro län', 'hits': 2, 'ad_ids': ['24645958', '24641024']},
{'id': 'JQE9_189_Ska', 'name': 'Lindesberg', 'type': 'municipality', 'code': '1885', 'region_code': '18',
'region_name': 'Örebro län', 'hits': 9,
'ad_ids': ['24621412', '24640141', '24640009', '24631398', '24629694', '24619671', '24594052', '24563255',
'24559937']},
{'id': 'Nufj_vmt_VrH', 'name': 'Skinnskatteberg', 'type': 'municipality', 'code': '1904', 'region_code': '19',
'region_name': 'Västmanlands län', 'hits': 2, 'ad_ids': ['24616844', '24561824']},
{'id': 'jfD3_Hdg_UhT', 'name': 'Surahammar', 'type': 'municipality', 'code': '1907', 'region_code': '19',
'region_name': 'Västmanlands län', 'hits': 2, 'ad_ids': ['24569744', '24569099']},
{'id': 'sD2e_1Tr_4WZ', 'name': 'Heby', 'type': 'municipality', 'code': '0331', 'region_code': '03',
'region_name': 'Uppsala län', 'hits': 6,
'ad_ids': ['24639987', '24637102', '24636561', '24622419', '24609485', '24606439']},
{'id': 'Fac5_h7a_UoM', 'name': 'Kungsör', 'type': 'municipality', 'code': '1960', 'region_code': '19',
'region_name': 'Västmanlands län', 'hits': 1, 'ad_ids': ['24615040']},
{'id': 'oXYf_HmD_ddE', 'name': 'Hallstahammar', 'type': 'municipality', 'code': '1961', 'region_code': '19',
'region_name': 'Västmanlands län', 'hits': 3, 'ad_ids': ['24620856', '24620183', '24570400']},
{'id': 'jbVe_Cps_vtd', 'name': 'Norberg', 'type': 'municipality', 'code': '1962', 'region_code': '19',
'region_name': 'Västmanlands län', 'hits': 1, 'ad_ids': ['24615173']},
{'id': '8deT_FRF_2SP', 'name': 'Västerås', 'type': 'municipality', 'code': '1980', 'region_code': '19',
'region_name': 'Västmanlands län', 'hits': 53,
'ad_ids': ['24650320', '24648681', '24647561', '24647061', '24646018', '24645554', '24645115', '24643524',
'24643419', '24641832']},
{'id': 'dAen_yTK_tqz', 'name': 'Sala', 'type': 'municipality', 'code': '1981', 'region_code': '19',
'region_name': 'Västmanlands län', 'hits': 9,
'ad_ids': ['24647939', '24629771', '24628165', '24627608', '24625106', '24625081', '24618592', '24607178',
'24568713']},
{'id': '7D9G_yrX_AGJ', 'name': 'Fagersta', 'type': 'municipality', 'code': '1982', 'region_code': '19',
'region_name': 'Västmanlands län', 'hits': 6,
'ad_ids': ['24642864', '24636952', '24621583', '24611864', '24610150', '24596200']},
{'id': '4Taz_AuG_tSm', 'name': 'Köping', 'type': 'municipality', 'code': '1983', 'region_code': '19',
'region_name': 'Västmanlands län', 'hits': 5,
'ad_ids': ['24641084', '24633855', '24614521', '24579728', '24554788']},
{'id': 'Jkyb_5MQ_7pB', 'name': 'Arboga', 'type': 'municipality', 'code': '1984', 'region_code': '19',
'region_name': 'Västmanlands län', 'hits': 6,
'ad_ids': ['24634844', '24632224', '24630389', '24629338', '24628382', '24523724']},
{'id': '1gEC_kvM_TXK', 'name': 'Olofström', 'type': 'municipality', 'code': '1060', 'region_code': '10',
'region_name': 'Blekinge län', 'hits': 3, 'ad_ids': ['24650780', '24607103', '24588059']},
{'id': 'YSt4_bAa_ccs', 'name': 'Karlskrona', 'type': 'municipality', 'code': '1080', 'region_code': '10',
'region_name': 'Blekinge län', 'hits': 28,
'ad_ids': ['24651075', '24649518', '24649448', '24645432', '24645121', '24644839', '24628869', '24633251',
'24633023', '24630721']},
{'id': 'vH8x_gVz_z7R', 'name': 'Ronneby', 'type': 'municipality', 'code': '1081', 'region_code': '10',
'region_name': 'Blekinge län', 'hits': 10,
'ad_ids': ['24648307', '24648283', '24635765', '24621669', '24621710', '24620613', '24605177', '24605428',
'24603527', '24590026']},
{'id': 'HtGW_WgR_dpE', 'name': 'Karlshamn', 'type': 'municipality', 'code': '1082', 'region_code': '10',
'region_name': 'Blekinge län', 'hits': 15,
'ad_ids': ['24649847', '24649768', '24647740', '24632517', '24612809', '24607875', '24607874', '24602594',
'24600682', '24600425']},
{'id': 'EVPy_phD_8Vf', 'name': 'Sölvesborg', 'type': 'municipality', 'code': '1083', 'region_code': '10',
'region_name': 'Blekinge län', 'hits': 4, 'ad_ids': ['24644857', '24625704', '24620694', '24535492']},
{'id': '2r6J_g2w_qp5', 'name': 'Svalöv', 'type': 'municipality', 'code': '1214', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 1, 'ad_ids': ['24645986']},
{'id': 'vBrj_bov_KEX', 'name': 'Staffanstorp', 'type': 'municipality', 'code': '1230', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 8,
'ad_ids': ['24648873', '24623551', '24614129', '24598158', '24593510', '24562275', '24565177', '24514487']},
{'id': '64g5_Lio_aMU', 'name': 'Burlöv', 'type': 'municipality', 'code': '1231', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 9,
'ad_ids': ['24649934', '24624002', '24615590', '24596313', '24598750', '24592314', '24583797', '24565624',
'24440835']},
{'id': 'Tcog_5sH_b46', 'name': 'Vellinge', 'type': 'municipality', 'code': '1233', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 3, 'ad_ids': ['24637147', '24622105', '24546803']},
{'id': 'LTt7_CGG_RUf', 'name': 'Östra Göinge', 'type': 'municipality', 'code': '1256', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 4, 'ad_ids': ['24615444', '24610769', '24593919', '24589529']},
{'id': 'nBTS_Nge_dVH', 'name': 'Örkelljunga', 'type': 'municipality', 'code': '1257', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 1, 'ad_ids': ['24620885']},
{'id': 'waQp_FjW_qhF', 'name': 'Bjuv', 'type': 'municipality', 'code': '1260', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 2, 'ad_ids': ['24614178', '24590365']},
{'id': '5ohg_WJU_Ktn', 'name': 'Kävlinge', 'type': 'municipality', 'code': '1261', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 10,
'ad_ids': ['24645728', '24640743', '24637954', '24634361', '24631933', '24622076', '24615122', '24601405',
'24584558', '24570281']},
{'id': 'naG4_AUS_z2v', 'name': 'Lomma', 'type': 'municipality', 'code': '1262', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 10,
'ad_ids': ['24650188', '24649514', '24630578', '24607479', '24607474', '24593043', '24587683', '24555292',
'24549470', '24500680']},
{'id': 'n6r4_fjK_kRr', 'name': 'Svedala', 'type': 'municipality', 'code': '1263', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 4, 'ad_ids': ['24648311', '24624676', '24615959', '24590287']},
{'id': 'oezL_78x_r89', 'name': 'Skurup', 'type': 'municipality', 'code': '1264', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 4, 'ad_ids': ['24606877', '24596998', '24590239', '24555159']},
{'id': 'P3Cs_1ZP_9XB', 'name': 'Sjöbo', 'type': 'municipality', 'code': '1265', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 5, 'ad_ids': ['24636041', '24624217', '24572488', '24562106', '24415688']},
{'id': 'autr_KMa_cfp', 'name': 'Hörby', 'type': 'municipality', 'code': '1266', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 7,
'ad_ids': ['24647623', '24612427', '24598016', '24585770', '24576073', '24575956', '24388252']},
{'id': 'N29z_AqQ_Ppc', 'name': 'Höör', 'type': 'municipality', 'code': '1267', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 8,
'ad_ids': ['24645789', '24611931', '24590427', '24580373', '24533802', '24524712', '24505268', '24495006']},
{'id': 'UMev_wGs_9bg', 'name': 'Tomelilla', 'type': 'municipality', 'code': '1270', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 5, 'ad_ids': ['24629168', '24624712', '24621866', '24620688', '24616138']},
{'id': 'WMNK_PXa_Khm', 'name': 'Bromölla', 'type': 'municipality', 'code': '1272', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 8,
'ad_ids': ['24648756', '24645758', '24645101', '24624728', '24584175', '24582959', '24513573', '24513519']},
{'id': 'najS_Lvy_mDD', 'name': 'Osby', 'type': 'municipality', 'code': '1273', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 6,
'ad_ids': ['24622447', '24612064', '24590486', '24584265', '24570384', '24484317']},
{'id': 'BN7r_iPV_F9p', 'name': 'Perstorp', 'type': 'municipality', 'code': '1275', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 3, 'ad_ids': ['24644535', '24620267', '24590493']},
{'id': 'JARU_FAY_hTS', 'name': 'Klippan', 'type': 'municipality', 'code': '1276', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 11,
'ad_ids': ['24649729', '24645668', '24630230', '24630125', '24627948', '24613981', '24602922', '24592988',
'24587696', '24576122']},
{'id': 'tEv6_ktG_QQb', 'name': 'Åstorp', 'type': 'municipality', 'code': '1277', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 7,
'ad_ids': ['24646009', '24643953', '24611585', '24576459', '24572768', '24572674', '24488210']},
{'id': 'i8vK_odq_6ar', 'name': 'Båstad', 'type': 'municipality', 'code': '1278', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 6,
'ad_ids': ['24648777', '24642713', '24635648', '24546923', '24546926', '24437820']},
{'id': 'oYPt_yRA_Smm', 'name': 'Malmö', 'type': 'municipality', 'code': '1280', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 208,
'ad_ids': ['24650545', '24650520', '24650296', '24650097', '24650060', '24649950', '24648137', '24647586',
'24647704', '24647414']},
{'id': 'muSY_tsR_vDZ', 'name': 'Lund', 'type': 'municipality', 'code': '1281', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 94,
'ad_ids': ['24650438', '24650135', '24649589', '24648781', '24647011', '24647010', '24646930', '24646668',
'24645906', '24645894']},
{'id': 'Yt5s_Vf9_rds', 'name': 'Landskrona', 'type': 'municipality', 'code': '1282', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 13,
'ad_ids': ['24644146', '24644087', '24620576', '24620131', '24615771', '24573791', '24570452', '24567461',
'24540874', '24488640']},
{'id': 'qj3q_oXH_MGR', 'name': 'Helsingborg', 'type': 'municipality', 'code': '1283', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 75,
'ad_ids': ['24649269', '24648344', '24647195', '24645865', '24645699', '24644730', '24644155', '24643877',
'24643808', '24643688']},
{'id': '8QQ6_e95_a1d', 'name': 'Höganäs', 'type': 'municipality', 'code': '1284', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 5, 'ad_ids': ['24634533', '24625162', '24623134', '24620349', '24576341']},
{'id': 'gfCw_egj_1M4', 'name': 'Eslöv', 'type': 'municipality', 'code': '1285', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 7,
'ad_ids': ['24634664', '24629637', '24616790', '24608987', '24607603', '24603214', '24500582']},
{'id': 'hdYk_hnP_uju', 'name': 'Ystad', 'type': 'municipality', 'code': '1286', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 11,
'ad_ids': ['24644036', '24625823', '24601172', '24599304', '24583510', '24574648', '24572130', '24511562',
'24511260', '24473915']},
{'id': 'STvk_dra_M1X', 'name': 'Trelleborg', 'type': 'municipality', 'code': '1287', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 18,
'ad_ids': ['24649417', '24645920', '24645911', '24640015', '24632826', '24630587', '24614377', '24608596',
'24608211', '24604616']},
{'id': 'vrvW_sr8_1en', 'name': 'Kristianstad', 'type': 'municipality', 'code': '1290', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 36,
'ad_ids': ['24649118', '24646547', '24645051', '24642902', '24639033', '24636394', '24636028', '24633571',
'24631796', '24623098']},
{'id': 'dLxo_EpC_oPe', 'name': 'Simrishamn', 'type': 'municipality', 'code': '1291', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 5, 'ad_ids': ['24636522', '24601452', '24550006', '24554806', '24502004']},
{'id': 'pCuv_P5A_9oh', 'name': 'Ängelholm', 'type': 'municipality', 'code': '1292', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 29,
'ad_ids': ['24648062', '24646052', '24645263', '24644897', '24643870', '24643102', '24642941', '24641238',
'24641268', '24635578']},
{'id': 'bP5q_53x_aqJ', 'name': 'Hässleholm', 'type': 'municipality', 'code': '1293', 'region_code': '12',
'region_name': 'Skåne län', 'hits': 20,
'ad_ids': ['24645166', '24639356', '24625756', '24621467', '24614517', '24615762', '24610880', '24605726',
'24588549', '24597762']},
{'id': 'ocMw_Rz5_B1L', 'name': 'Kil', 'type': 'municipality', 'code': '1715', 'region_code': '17',
'region_name': 'Värmlands län', 'hits': 3, 'ad_ids': ['24649278', '24649261', '24492496']},
{'id': 'N5HQ_hfp_7Rm', 'name': 'Eda', 'type': 'municipality', 'code': '1730', 'region_code': '17',
'region_name': 'Värmlands län', 'hits': 8,
'ad_ids': ['24650359', '24649389', '24641459', '24638309', '24625958', '24625946', '24621089', '24601242']},
{'id': 'hQdb_zn9_Sok', 'name': 'Torsby', 'type': 'municipality', 'code': '1737', 'region_code': '17',
'region_name': 'Värmlands län', 'hits': 6,
'ad_ids': ['24649740', '24649672', '24641489', '24622563', '24547171', '24539768']},
{'id': 'mPt5_3QD_LTM', 'name': 'Storfors', 'type': 'municipality', 'code': '1760', 'region_code': '17',
'region_name': 'Värmlands län', 'hits': 2, 'ad_ids': ['24605489', '24586914']},
{'id': 'x5qW_BXr_aut', 'name': 'Hammarö', 'type': 'municipality', 'code': '1761', 'region_code': '17',
'region_name': 'Värmlands län', 'hits': 2, 'ad_ids': ['24612858', '24606451']},
{'id': 'x73h_7rW_mXN', 'name': 'Munkfors', 'type': 'municipality', 'code': '1762', 'region_code': '17',
'region_name': 'Värmlands län', 'hits': 1, 'ad_ids': ['24546455']},
{'id': 'xnEt_JN3_GkA', 'name': 'Forshaga', 'type': 'municipality', 'code': '1763', 'region_code': '17',
'region_name': 'Värmlands län', 'hits': 2, 'ad_ids': ['24612399', '24602480']},
{'id': 'PSNt_P95_x6q', 'name': 'Grums', 'type': 'municipality', 'code': '1764', 'region_code': '17',
'region_name': 'Värmlands län', 'hits': 2, 'ad_ids': ['24539560', '24566552']},
{'id': 'ymBu_aFc_QJA', 'name': 'Årjäng', 'type': 'municipality', 'code': '1765', 'region_code': '17',
'region_name': 'Värmlands län', 'hits': 1, 'ad_ids': ['24621703']},
{'id': 'oqNH_cnJ_Tdi', 'name': 'Sunne', 'type': 'municipality', 'code': '1766', 'region_code': '17',
'region_name': 'Värmlands län', 'hits': 4, 'ad_ids': ['24642867', '24622363', '24601636', '24590484']},
{'id': 'hRDj_PoV_sFU', 'name': 'Karlstad', 'type': 'municipality', 'code': '1780', 'region_code': '17',
'region_name': 'Värmlands län', 'hits': 49,
'ad_ids': ['24650860', '24645012', '24642294', '24641834', '24641215', '24641140', '24639997', '24637408',
'24635991', '24635497']},
{'id': 'SVQS_uwJ_m2B', 'name': 'Kristinehamn', 'type': 'municipality', 'code': '1781', 'region_code': '17',
'region_name': 'Värmlands län', 'hits': 5, 'ad_ids': ['24649351', '24646057', '24617982', '24610610', '24535779']},
{'id': 'UXir_vKD_FuW', 'name': 'Filipstad', 'type': 'municipality', 'code': '1782', 'region_code': '17',
'region_name': 'Värmlands län', 'hits': 0, 'ad_ids': []},
{'id': 'qk9a_g5U_sAH', 'name': 'Hagfors', 'type': 'municipality', 'code': '1783', 'region_code': '17',
'region_name': 'Värmlands län', 'hits': 3, 'ad_ids': ['24632958', '24614330', '24504796']},
{'id': 'yGue_F32_wev', 'name': 'Arvika', 'type': 'municipality', 'code': '1784', 'region_code': '17',
'region_name': 'Värmlands län', 'hits': 5, 'ad_ids': ['24626919', '24595432', '24594812', '24591333', '24532373']},
{'id': 'wmxQ_Guc_dsy', 'name': 'Säffle', 'type': 'municipality', 'code': '1785', 'region_code': '17',
'region_name': 'Värmlands län', 'hits': 5, 'ad_ids': ['24649317', '24612041', '24574208', '24558595', '24381921']},
{'id': '4eS9_HX1_M7V', 'name': 'Vansbro', 'type': 'municipality', 'code': '2021', 'region_code': '20',
'region_name': 'Dalarnas län', 'hits': 2, 'ad_ids': ['24602964', '24464433']},
{'id': 'FPCd_poj_3tq', 'name': 'Malung-Sälen', 'type': 'municipality', 'code': '2023', 'region_code': '20',
'region_name': 'Dalarnas län', 'hits': 5, 'ad_ids': ['24649158', '24617319', '24608124', '24606239', '24544803']},
{'id': 'Nn7p_W3Z_y68', 'name': 'Gagnef', 'type': 'municipality', 'code': '2026', 'region_code': '20',
'region_name': 'Dalarnas län', 'hits': 1, 'ad_ids': ['24649209']},
{'id': '7Zsu_ant_gcn', 'name': 'Leksand', 'type': 'municipality', 'code': '2029', 'region_code': '20',
'region_name': 'Dalarnas län', 'hits': 3, 'ad_ids': ['24640824', '24626128', '24571716']},
{'id': 'Jy3D_2ux_dg8', 'name': 'Rättvik', 'type': 'municipality', 'code': '2031', 'region_code': '20',
'region_name': 'Dalarnas län', 'hits': 4, 'ad_ids': ['24647031', '24647028', '24621580', '24595880']},
{'id': 'CRyF_5Jg_4ht', 'name': 'Orsa', 'type': 'municipality', 'code': '2034', 'region_code': '20',
'region_name': 'Dalarnas län', 'hits': 6,
'ad_ids': ['24629334', '24608617', '24566875', '24561183', '24523938', '24488375']},
{'id': 'cZtt_qGo_oBr', 'name': 'Älvdalen', 'type': 'municipality', 'code': '2039', 'region_code': '20',
'region_name': 'Dalarnas län', 'hits': 4, 'ad_ids': ['24626713', '24621302', '24576229', '24576225']},
{'id': '5zZX_8FH_Sbq', 'name': 'Smedjebacken', 'type': 'municipality', 'code': '2061', 'region_code': '20',
'region_name': 'Dalarnas län', 'hits': 3, 'ad_ids': ['24645686', '24645204', '24593349']},
{'id': 'UGcC_kYx_fTs', 'name': 'Mora', 'type': 'municipality', 'code': '2062', 'region_code': '20',
'region_name': 'Dalarnas län', 'hits': 12,
'ad_ids': ['24648097', '24624498', '24623037', '24623017', '24593694', '24587438', '24585960', '24572253',
'24548037', '24539727']},
{'id': 'N1wJ_Cuu_7Cs', 'name': 'Falun', 'type': 'municipality', 'code': '2080', 'region_code': '20',
'region_name': 'Dalarnas län', 'hits': 33,
'ad_ids': ['24649195', '24646230', '24642403', '24640180', '24639093', '24637700', '24633983', '24628486',
'24622858', '24621668']},
{'id': 'cpya_jJg_pGp', 'name': 'Borlänge', 'type': 'municipality', 'code': '2081', 'region_code': '20',
'region_name': 'Dalarnas län', 'hits': 22,
'ad_ids': ['24648735', '24645716', '24643955', '24640978', '24638705', '24634803', '24627930', '24624426',
'24620908', '24615413']},
{'id': 'c3Zx_jBf_CqF', 'name': 'Säter', 'type': 'municipality', 'code': '2082', 'region_code': '20',
'region_name': 'Dalarnas län', 'hits': 3, 'ad_ids': ['24646152', '24564510', '24638537']},
{'id': 'DE9u_V4K_Z1S', 'name': 'Hedemora', 'type': 'municipality', 'code': '2083', 'region_code': '20',
'region_name': 'Dalarnas län', 'hits': 5, 'ad_ids': ['24617875', '24596329', '24595146', '24577346', '24518006']},
{'id': 'Szbq_2fg_ydQ', 'name': 'Avesta', 'type': 'municipality', 'code': '2084', 'region_code': '20',
'region_name': 'Dalarnas län', 'hits': 4, 'ad_ids': ['24643237', '24616778', '24612778', '24596510']},
{'id': 'Ny2b_2bo_7EL', 'name': 'Ludvika', 'type': 'municipality', 'code': '2085', 'region_code': '20',
'region_name': 'Dalarnas län', 'hits': 15,
'ad_ids': ['24641952', '24640038', '24636562', '24636403', '24636399', '24636392', '24627279', '24618666',
'24608534', '24607134']},
{'id': 'GEvW_wKy_A9H', 'name': 'Ockelbo', 'type': 'municipality', 'code': '2101', 'region_code': '21',
'region_name': 'Gävleborgs län', 'hits': 3, 'ad_ids': ['24647677', '24644885', '24636701']},
{'id': 'yuNd_3bg_ttc', 'name': 'Hofors', 'type': 'municipality', 'code': '2104', 'region_code': '21',
'region_name': 'Gävleborgs län', 'hits': 2, 'ad_ids': ['24643718', '24638172']},
{'id': 'JPSe_mUQ_NDs', 'name': 'Ovanåker', 'type': 'municipality', 'code': '2121', 'region_code': '21',
'region_name': 'Gävleborgs län', 'hits': 3, 'ad_ids': ['24648796', '24626141', '24588647']},
{'id': 'fFeF_RCz_Tm5', 'name': 'Nordanstig', 'type': 'municipality', 'code': '2132', 'region_code': '21',
'region_name': 'Gävleborgs län', 'hits': 0, 'ad_ids': []},
{'id': '63iQ_V6F_REB', 'name': 'Ljusdal', 'type': 'municipality', 'code': '2161', 'region_code': '21',
'region_name': 'Gävleborgs län', 'hits': 3, 'ad_ids': ['24624560', '24621604', '24604812']},
{'id': 'qk8Y_2b6_82D', 'name': 'Gävle', 'type': 'municipality', 'code': '2180', 'region_code': '21',
'region_name': 'Gävleborgs län', 'hits': 61,
'ad_ids': ['24648286', '24647457', '24645453', '24643119', '24641947', '24641752', '24641744', '24639606',
'24639443', '24638181']},
{'id': 'BbdN_xLB_k6s', 'name': 'Sandviken', 'type': 'municipality', 'code': '2181', 'region_code': '21',
'region_name': 'Gävleborgs län', 'hits': 11,
'ad_ids': ['24640410', '24639185', '24630586', '24610267', '24602729', '24587145', '24586302', '24578542',
'24576851', '24558652']},
{'id': 'JauG_nz5_7mu', 'name': 'Söderhamn', 'type': 'municipality', 'code': '2182', 'region_code': '21',
'region_name': 'Gävleborgs län', 'hits': 6,
'ad_ids': ['24640054', '24616079', '24614547', '24595502', '24503253', '24488845']},
{'id': 'KxjG_ig5_exF', 'name': 'Bollnäs', 'type': 'municipality', 'code': '2183', 'region_code': '21',
'region_name': 'Gävleborgs län', 'hits': 12,
'ad_ids': ['24647491', '24623857', '24623859', '24632941', '24631240', '24613810', '24612003', '24590238',
'24590045', '24548369']},
{'id': 'Utks_mwF_axY', 'name': 'Hudiksvall', 'type': 'municipality', 'code': '2184', 'region_code': '21',
'region_name': 'Gävleborgs län', 'hits': 26,
'ad_ids': ['24650607', '24650499', '24649045', '24648589', '24641095', '24641643', '24641698', '24647095',
'24646916', '24645190']},
{'id': 'swVa_cyS_EMN', 'name': 'Ånge', 'type': 'municipality', 'code': '2260', 'region_code': '22',
'region_name': 'Västernorrlands län', 'hits': 4, 'ad_ids': ['24639288', '24628389', '24610700', '24460553']},
{'id': 'oJ8D_rq6_kjt', 'name': 'Timrå', 'type': 'municipality', 'code': '2262', 'region_code': '22',
'region_name': 'Västernorrlands län', 'hits': 5,
'ad_ids': ['24649312', '24628388', '24620973', '24579351', '24504810']},
{'id': 'uYRx_AdM_r4A', 'name': 'Härnösand', 'type': 'municipality', 'code': '2280', 'region_code': '22',
'region_name': 'Västernorrlands län', 'hits': 14,
'ad_ids': ['24649670', '24634810', '24626434', '24626359', '24610521', '24604584', '24599753', '24595015',
'24588000', '24568790']},
{'id': 'dJbx_FWY_tK6', 'name': 'Sundsvall', 'type': 'municipality', 'code': '2281', 'region_code': '22',
'region_name': 'Västernorrlands län', 'hits': 58,
'ad_ids': ['24650752', '24650176', '24650130', '24650080', '24649995', '24649952', '24648358', '24646387',
'24645570', '24645032']},
{'id': 'yR8g_7Jz_HBZ', 'name': 'Kramfors', 'type': 'municipality', 'code': '2282', 'region_code': '22',
'region_name': 'Västernorrlands län', 'hits': 8,
'ad_ids': ['24649705', '24633992', '24633462', '24627834', '24587306', '24582328', '24574236', '24550420']},
{'id': 'v5y4_YPe_TMZ', 'name': 'Sollefteå', 'type': 'municipality', 'code': '2283', 'region_code': '22',
'region_name': 'Västernorrlands län', 'hits': 9,
'ad_ids': ['24649400', '24649380', '24642982', '24642980', '24634683', '24605190', '24588189', '24540108',
'24455320']},
{'id': 'zBmE_n6s_MnQ', 'name': 'Örnsköldsvik', 'type': 'municipality', 'code': '2284', 'region_code': '22',
'region_name': 'Västernorrlands län', 'hits': 23,
'ad_ids': ['24650185', '24649663', '24648830', '24648370', '24646067', '24643411', '24641851', '24634399',
'24632450', '24624920']},
{'id': 'Voto_egJ_FZP', 'name': 'Ragunda', 'type': 'municipality', 'code': '2303', 'region_code': '23',
'region_name': 'Jämtlands län', 'hits': 0, 'ad_ids': []},
{'id': 'eNSc_Nj1_CDP', 'name': 'Bräcke', 'type': 'municipality', 'code': '2305', 'region_code': '23',
'region_name': 'Jämtlands län', 'hits': 1, 'ad_ids': ['24615354']},
{'id': 'yurW_aLE_4ga', 'name': 'Krokom', 'type': 'municipality', 'code': '2309', 'region_code': '23',
'region_name': 'Jämtlands län', 'hits': 0, 'ad_ids': []},
{'id': 'ppjq_Eci_Wz9', 'name': 'Strömsund', 'type': 'municipality', 'code': '2313', 'region_code': '23',
'region_name': 'Jämtlands län', 'hits': 6,
'ad_ids': ['24646613', '24635521', '24634425', '24611237', '24608422', '24566029']},
{'id': 'D7ax_CXP_6r1', 'name': 'Åre', 'type': 'municipality', 'code': '2321', 'region_code': '23',
'region_name': 'Jämtlands län', 'hits': 2, 'ad_ids': ['24587180', '24572426']},
{'id': 'gRNJ_hVW_Gpg', 'name': 'Berg', 'type': 'municipality', 'code': '2326', 'region_code': '23',
'region_name': 'Jämtlands län', 'hits': 1, 'ad_ids': ['24626189']},
{'id': 'j35Q_VKL_NiM', 'name': 'Härjedalen', 'type': 'municipality', 'code': '2361', 'region_code': '23',
'region_name': 'Jämtlands län', 'hits': 8,
'ad_ids': ['24650648', '24649337', '24648475', '24626268', '24615961', '24600435', '24565037', '24560583']},
{'id': 'Vt7P_856_WZS', 'name': 'Östersund', 'type': 'municipality', 'code': '2380', 'region_code': '23',
'region_name': 'Jämtlands län', 'hits': 36,
'ad_ids': ['24650954', '24650862', '24648805', '24647118', '24640165', '24637613', '24634928', '24634409',
'24633737', '24631136']},
{'id': 'wMab_4Zs_wpM', 'name': 'Nordmaling', 'type': 'municipality', 'code': '2401', 'region_code': '24',
'region_name': 'Västerbottens län', 'hits': 2, 'ad_ids': ['24588012', '24494081']},
{'id': 'vQkf_tw2_CmR', 'name': 'Bjurholm', 'type': 'municipality', 'code': '2403', 'region_code': '24',
'region_name': 'Västerbottens län', 'hits': 0, 'ad_ids': []},
{'id': 'izT6_zWu_tta', 'name': 'Vindeln', 'type': 'municipality', 'code': '2404', 'region_code': '24',
'region_name': 'Västerbottens län', 'hits': 4, 'ad_ids': ['24610047', '24595064', '24585738', '24581311']},
{'id': 'p8Mv_377_bxp', 'name': 'Robertsfors', 'type': 'municipality', 'code': '2409', 'region_code': '24',
'region_name': 'Västerbottens län', 'hits': 1, 'ad_ids': ['24643631']},
{'id': 'XmpG_vPQ_K7T', 'name': 'Norsjö', 'type': 'municipality', 'code': '2417', 'region_code': '24',
'region_name': 'Västerbottens län', 'hits': 1, 'ad_ids': ['24577456']},
{'id': '7sHJ_YCE_5Zv', 'name': 'Malå', 'type': 'municipality', 'code': '2418', 'region_code': '24',
'region_name': 'Västerbottens län', 'hits': 1, 'ad_ids': ['24641503']},
{'id': 'gQgT_BAk_fMu', 'name': 'Storuman', 'type': 'municipality', 'code': '2421', 'region_code': '24',
'region_name': 'Västerbottens län', 'hits': 3, 'ad_ids': ['24648927', '24612310', '24551322']},
{'id': 'VM7L_yJK_Doo', 'name': 'Sorsele', 'type': 'municipality', 'code': '2422', 'region_code': '24',
'region_name': 'Västerbottens län', 'hits': 1, 'ad_ids': ['24644670']},
{'id': 'tSkf_Tbn_rHk', 'name': 'Dorotea', 'type': 'municipality', 'code': '2425', 'region_code': '24',
'region_name': 'Västerbottens län', 'hits': 2, 'ad_ids': ['24648188', '24551059']},
{'id': 'utQc_6xq_Dfm', 'name': 'Vännäs', 'type': 'municipality', 'code': '2460', 'region_code': '24',
'region_name': 'Västerbottens län', 'hits': 1, 'ad_ids': ['24477260']},
{'id': 'tUnW_mFo_Hvi', 'name': 'Vilhelmina', 'type': 'municipality', 'code': '2462', 'region_code': '24',
'region_name': 'Västerbottens län', 'hits': 3, 'ad_ids': ['24650955', '24646598', '24389476']},
{'id': 'xLdL_tMA_JJv', 'name': 'Åsele', 'type': 'municipality', 'code': '2463', 'region_code': '24',
'region_name': 'Västerbottens län', 'hits': 2, 'ad_ids': ['24635862', '24596209']},
{'id': 'QiGt_BLu_amP', 'name': 'Umeå', 'type': 'municipality', 'code': '2480', 'region_code': '24',
'region_name': 'Västerbottens län', 'hits': 61,
'ad_ids': ['24651085', '24650971', '24649245', '24649034', '24648882', '24647955', '24647299', '24646501',
'24643021', '24642426']},
{'id': '7rpN_naz_3Uz', 'name': 'Lycksele', 'type': 'municipality', 'code': '2481', 'region_code': '24',
'region_name': 'Västerbottens län', 'hits': 5,
'ad_ids': ['24650360', '24636787', '24624131', '24584326', '24461658']},
{'id': 'kicB_LgH_2Dk', 'name': 'Skellefteå', 'type': 'municipality', 'code': '2482', 'region_code': '24',
'region_name': 'Västerbottens län', 'hits': 26,
'ad_ids': ['24650579', '24650245', '24647140', '24646439', '24644842', '24644817', '24641617', '24639673',
'24633366', '24629478']},
{'id': 'A5WX_XVo_Zt6', 'name': 'Arvidsjaur', 'type': 'municipality', 'code': '2505', 'region_code': '25',
'region_name': 'Norrbottens län', 'hits': 0, 'ad_ids': []},
{'id': 'vkQW_GB6_MNk', 'name': 'Arjeplog', 'type': 'municipality', 'code': '2506', 'region_code': '25',
'region_name': 'Norrbottens län', 'hits': 4, 'ad_ids': ['24650467', '24594796', '24505073', '24488974']},
{'id': 'mp6j_2b6_1bz', 'name': 'Jokkmokk', 'type': 'municipality', 'code': '2510', 'region_code': '25',
'region_name': 'Norrbottens län', 'hits': 2, 'ad_ids': ['24636604', '24629767']},
{'id': 'n5Sq_xxo_QWL', 'name': 'Överkalix', 'type': 'municipality', 'code': '2513', 'region_code': '25',
'region_name': 'Norrbottens län', 'hits': 2, 'ad_ids': ['24626297', '24562294']},
{'id': 'cUyN_C9V_HLU', 'name': 'Kalix', 'type': 'municipality', 'code': '2514', 'region_code': '25',
'region_name': 'Norrbottens län', 'hits': 7,
'ad_ids': ['24650117', '24647684', '24617672', '24610596', '24598334', '24578326', '24549825']},
{'id': 'ehMP_onv_Chk', 'name': 'Övertorneå', 'type': 'municipality', 'code': '2518', 'region_code': '25',
'region_name': 'Norrbottens län', 'hits': 2, 'ad_ids': ['24615259', '24602364']},
{'id': 'dHMF_72G_4NM', 'name': 'Pajala', 'type': 'municipality', 'code': '2521', 'region_code': '25',
'region_name': 'Norrbottens län', 'hits': 5,
'ad_ids': ['24613530', '24579678', '24421022', '24421085', '24421026']},
{'id': '6R2u_zkb_uoS', 'name': 'Gällivare', 'type': 'municipality', 'code': '2523', 'region_code': '25',
'region_name': 'Norrbottens län', 'hits': 12,
'ad_ids': ['24650616', '24647793', '24646122', '24646015', '24645490', '24639665', '24631189', '24626915',
'24620850', '24613056']},
{'id': '14WF_zh1_W3y', 'name': 'Älvsbyn', 'type': 'municipality', 'code': '2560', 'region_code': '25',
'region_name': 'Norrbottens län', 'hits': 1, 'ad_ids': ['24648879']},
{'id': 'CXbY_gui_14v', 'name': 'Luleå', 'type': 'municipality', 'code': '2580', 'region_code': '25',
'region_name': 'Norrbottens län', 'hits': 54,
'ad_ids': ['24650277', '24649382', '24646536', '24646256', '24645408', '24645272', '24644929', '24642846',
'24640988', '24637961']},
{'id': 'umej_bP2_PpK', 'name': 'Piteå', 'type': 'municipality', 'code': '2581', 'region_code': '25',
'region_name': 'Norrbottens län', 'hits': 21,
'ad_ids': ['24647791', '24646569', '24646410', '24642289', '24640981', '24629378', '24627010', '24615196',
'24614741', '24613745']},
{'id': 'y4NQ_tnB_eVd', 'name': 'Boden', 'type': 'municipality', 'code': '2582', 'region_code': '25',
'region_name': 'Norrbottens län', 'hits': 6,
'ad_ids': ['24641061', '24625531', '24621825', '24593711', '24591832', '24547017']},
{'id': 'tfRE_hXa_eq7', 'name': 'Haparanda', 'type': 'municipality', 'code': '2583', 'region_code': '25',
'region_name': 'Norrbottens län', 'hits': 3, 'ad_ids': ['24649761', '24641448', '24585171']},
{'id': 'biN6_UiL_Qob', 'name': 'Kiruna', 'type': 'municipality', 'code': '2584', 'region_code': '25',
'region_name': 'Norrbottens län', 'hits': 18,
'ad_ids': ['24649230', '24637663', '24620869', '24616612', '24609586', '24609582', '24607586', '24605447',
'24604398', '24594403']},
{'id': 'y9HE_XD7_WaD', 'name': 'Aneby', 'type': 'municipality', 'code': '0604', 'region_code': '06',
'region_name': 'Jönköpings län', 'hits': 2, 'ad_ids': ['24623297', '24579234']},
{'id': '91VR_Hxi_GN4', 'name': 'Gnosjö', 'type': 'municipality', 'code': '0617', 'region_code': '06',
'region_name': 'Jönköpings län', 'hits': 5,
'ad_ids': ['24628681', '24604131', '24590061', '24566659', '24558133']},
{'id': 'smXg_BXp_jTW', 'name': 'Mullsjö', 'type': 'municipality', 'code': '0642', 'region_code': '06',
'region_name': 'Jönköpings län', 'hits': 5,
'ad_ids': ['24643973', '24607032', '24606628', '24577681', '24537205']},
{'id': '9zQB_3vU_BQA', 'name': 'Habo', 'type': 'municipality', 'code': '0643', 'region_code': '06',
'region_name': 'Jönköpings län', 'hits': 1, 'ad_ids': ['24579245']},
{'id': 'cNQx_Yqi_83Q', 'name': 'Gislaved', 'type': 'municipality', 'code': '0662', 'region_code': '06',
'region_name': 'Jönköpings län', 'hits': 9,
'ad_ids': ['24613432', '24626013', '24612979', '24609415', '24604594', '24601733', '24599387', '24593831',
'24586269']},
{'id': 'zFup_umX_LVv', 'name': 'Vaggeryd', 'type': 'municipality', 'code': '0665', 'region_code': '06',
'region_name': 'Jönköpings län', 'hits': 5,
'ad_ids': ['24647651', '24633078', '24629708', '24550532', '24583814']},
{'id': 'KURg_KJF_Lwc', 'name': 'Jönköping', 'type': 'municipality', 'code': '0680', 'region_code': '06',
'region_name': 'Jönköpings län', 'hits': 85,
'ad_ids': ['24651032', '24650982', '24650248', '24648832', '24647954', '24647864', '24644298', '24647107',
'24644341', '24644259']},
{'id': 'KfXT_ySA_do2', 'name': 'Nässjö', 'type': 'municipality', 'code': '0682', 'region_code': '06',
'region_name': 'Jönköpings län', 'hits': 10,
'ad_ids': ['24644891', '24639953', '24633087', '24629181', '24621427', '24613566', '24610827', '24589332',
'24575224', '24528277']},
{'id': '6bS8_fzf_xpW', 'name': 'Värnamo', 'type': 'municipality', 'code': '0683', 'region_code': '06',
'region_name': 'Jönköpings län', 'hits': 26,
'ad_ids': ['24641062', '24634862', '24632296', '24631196', '24627728', '24623817', '24622843', '24620357',
'24620014', '24614169']},
{'id': 'L1cX_MjM_y8W', 'name': 'Sävsjö', 'type': 'municipality', 'code': '0684', 'region_code': '06',
'region_name': 'Jönköpings län', 'hits': 7,
'ad_ids': ['24640990', '24631381', '24612486', '24597187', '24581570', '24534133', '24468408']},
{'id': 'xJqx_SLC_415', 'name': 'Vetlanda', 'type': 'municipality', 'code': '0685', 'region_code': '06',
'region_name': 'Jönköpings län', 'hits': 16,
'ad_ids': ['24643277', '24641529', '24640373', '24637057', '24628455', '24627538', '24627537', '24621685',
'24613356', '24609736']},
{'id': 'VacK_WF6_XVg', 'name': 'Eksjö', 'type': 'municipality', 'code': '0686', 'region_code': '06',
'region_name': 'Jönköpings län', 'hits': 14,
'ad_ids': ['24637053', '24632911', '24615733', '24617245', '24609055', '24599160', '24597461', '24594324',
'24586118', '24585765']},
{'id': 'Namm_SpC_RPG', 'name': 'Tranås', 'type': 'municipality', 'code': '0687', 'region_code': '06',
'region_name': 'Jönköpings län', 'hits': 10,
'ad_ids': ['24642284', '24641464', '24626417', '24623265', '24619248', '24618419', '24590114', '24499769',
'24476521', '24433907']},
{'id': '78cu_S5T_Pgp', 'name': 'Uppvidinge', 'type': 'municipality', 'code': '0760', 'region_code': '07',
'region_name': 'Kronobergs län', 'hits': 3, 'ad_ids': ['24639253', '24617976', '24414696']},
{'id': 'nXZy_1Jd_D8X', 'name': 'Lessebo', 'type': 'municipality', 'code': '0761', 'region_code': '07',
'region_name': 'Kronobergs län', 'hits': 1, 'ad_ids': ['24538499']},
{'id': 'qz8Q_kDz_N2Y', 'name': 'Tingsryd', 'type': 'municipality', 'code': '0763', 'region_code': '07',
'region_name': 'Kronobergs län', 'hits': 4, 'ad_ids': ['24641348', '24624969', '24511207', '24491412']},
{'id': 'MMph_wmN_esc', 'name': 'Alvesta', 'type': 'municipality', 'code': '0764', 'region_code': '07',
'region_name': 'Kronobergs län', 'hits': 5,
'ad_ids': ['24650556', '24621112', '24617389', '24576031', '24476169']},
{'id': 'EK6X_wZq_CQ8', 'name': 'Älmhult', 'type': 'municipality', 'code': '0765', 'region_code': '07',
'region_name': 'Kronobergs län', 'hits': 11,
'ad_ids': ['24649769', '24649654', '24641236', '24641229', '24638136', '24632509', '24631497', '24625110',
'24617479', '24614602']},
{'id': 'ZhVf_yL5_Q5g', 'name': 'Markaryd', 'type': 'municipality', 'code': '0767', 'region_code': '07',
'region_name': 'Kronobergs län', 'hits': 10,
'ad_ids': ['24629043', '24643980', '24643878', '24639757', '24637755', '24627553', '24618793', '24583008',
'24553167', '24470454']},
{'id': 'mmot_H3A_auW', 'name': 'Växjö', 'type': 'municipality', 'code': '0780', 'region_code': '07',
'region_name': 'Kronobergs län', 'hits': 68,
'ad_ids': ['24649803', '24649739', '24649728', '24647829', '24647003', '24644326', '24644173', '24643867',
'24643342', '24641504']},
{'id': 'GzKo_S48_QCm', 'name': 'Ljungby', 'type': 'municipality', 'code': '0781', 'region_code': '07',
'region_name': 'Kronobergs län', 'hits': 11,
'ad_ids': ['24648839', '24648771', '24645854', '24643124', '24637014', '24636725', '24635767', '24633273',
'24624230', '24622854']},
{'id': 'WPDh_pMr_RLZ', 'name': 'Högsby', 'type': 'municipality', 'code': '0821', 'region_code': '08',
'region_name': 'Kalmar län', 'hits': 2, 'ad_ids': ['24640369', '24636070']},
{'id': 'wYFb_q7w_Nnh', 'name': 'Torsås', 'type': 'municipality', 'code': '0834', 'region_code': '08',
'region_name': 'Kalmar län', 'hits': 4, 'ad_ids': ['24620345', '24621317', '24604125', '24566576']},
{'id': 'Muim_EAi_EFp', 'name': 'Mörbylånga', 'type': 'municipality', 'code': '0840', 'region_code': '08',
'region_name': 'Kalmar län', 'hits': 9,
'ad_ids': ['24638175', '24629762', '24627653', '24611449', '24607639', '24594093', '24572030', '24546217',
'24488349']},
{'id': 'AEQD_1RT_vM9', 'name': 'Hultsfred', 'type': 'municipality', 'code': '0860', 'region_code': '08',
'region_name': 'Kalmar län', 'hits': 9,
'ad_ids': ['24648249', '24644661', '24636959', '24627269', '24627176', '24620579', '24588831', '24527019',
'24510303']},
{'id': '8eEp_iz4_cNN', 'name': 'Mönsterås', 'type': 'municipality', 'code': '0861', 'region_code': '08',
'region_name': 'Kalmar län', 'hits': 5, 'ad_ids': ['24648226', '24625464', '24618320', '24583746', '24573755']},
{'id': '1koj_6Bg_8K6', 'name': 'Emmaboda', 'type': 'municipality', 'code': '0862', 'region_code': '08',
'region_name': 'Kalmar län', 'hits': 2, 'ad_ids': ['24635771', '24615839']},
{'id': 'Pnmg_SgP_uHQ', 'name': 'Kalmar', 'type': 'municipality', 'code': '0880', 'region_code': '08',
'region_name': 'Kalmar län', 'hits': 52,
'ad_ids': ['24649776', '24649356', '24648115', '24647817', '24647756', '24643992', '24643651', '24641992',
'24641371', '24613487']},
{'id': 'xk68_bJa_6Fh', 'name': 'Nybro', 'type': 'municipality', 'code': '0881', 'region_code': '08',
'region_name': 'Kalmar län', 'hits': 6,
'ad_ids': ['24649149', '24638088', '24631517', '24625340', '24621795', '24612228']},
{'id': 'tUP8_hRE_NcF', 'name': 'Oskarshamn', 'type': 'municipality', 'code': '0882', 'region_code': '08',
'region_name': 'Kalmar län', 'hits': 14,
'ad_ids': ['24648664', '24648628', '24646920', '24645350', '24640633', '24635629', '24630203', '24628734',
'24624215', '24617181']},
{'id': 't7H4_S2P_3Fw', 'name': 'Västervik', 'type': 'municipality', 'code': '0883', 'region_code': '08',
'region_name': 'Kalmar län', 'hits': 18,
'ad_ids': ['24647144', '24641319', '24634992', '24632176', '24628636', '24618501', '24617706', '24614479',
'24608624', '24603700']},
{'id': 'a7hJ_zwv_2FR', 'name': 'Vimmerby', 'type': 'municipality', 'code': '0884', 'region_code': '08',
'region_name': 'Kalmar län', 'hits': 15,
'ad_ids': ['24642646', '24642469', '24634998', '24632703', '24628660', '24619779', '24619775', '24614093',
'24593900', '24590275']},
{'id': 'LY9i_qNL_kXf', 'name': 'Borgholm', 'type': 'municipality', 'code': '0885', 'region_code': '08',
'region_name': 'Kalmar län', 'hits': 4, 'ad_ids': ['24631885', '24600006', '24575680', '24496816']},
{'id': 'Ft9P_E8F_VLJ', 'name': 'Gotland', 'type': 'municipality', 'code': '0980', 'region_code': '09',
'region_name': 'Gotlands län', 'hits': 32,
'ad_ids': ['24649062', '24646081', '24645577', '24643883', '24641060', '24637605', '24637052', '24636730',
'24631180', '24631256']},
{'id': '3XMe_nGt_RcU', 'name': 'Hylte', 'type': 'municipality', 'code': '1315', 'region_code': '13',
'region_name': 'Hallands län', 'hits': 7,
'ad_ids': ['24647998', '24646997', '24645469', '24640710', '24633518', '24629087', '24575788']},
{'id': 'kUQB_KdK_kAh', 'name': 'Halmstad', 'type': 'municipality', 'code': '1380', 'region_code': '13',
'region_name': 'Hallands län', 'hits': 48,
'ad_ids': ['24650491', '24649086', '24648647', '24647496', '24646397', '24646379', '24645317', '24644390',
'24643943', '24643937']},
{'id': 'c1iL_rqh_Zja', 'name': 'Laholm', 'type': 'municipality', 'code': '1381', 'region_code': '13',
'region_name': 'Hallands län', 'hits': 7,
'ad_ids': ['24637743', '24624670', '24624583', '24615475', '24614113', '24588536', '24552904']},
{'id': 'qaJg_wMR_C8T', 'name': 'Falkenberg', 'type': 'municipality', 'code': '1382', 'region_code': '13',
'region_name': 'Hallands län', 'hits': 26,
'ad_ids': ['24650289', '24646671', '24644450', '24644424', '24638795', '24638078', '24635865', '24635663',
'24630122', '24612894']},
{'id': 'AkUx_yAq_kGr', 'name': 'Varberg', 'type': 'municipality', 'code': '1383', 'region_code': '13',
'region_name': 'Hallands län', 'hits': 34,
'ad_ids': ['24650646', '24648999', '24648048', '24647269', '24647256', '24646756', '24646453', '24646370',
'24646335', '24646315']},
{'id': '3JKV_KSK_x6z', 'name': 'Kungsbacka', 'type': 'municipality', 'code': '1384', 'region_code': '13',
'region_name': 'Hallands län', 'hits': 16,
'ad_ids': ['24650147', '24650006', '24640093', '24638112', '24635197', '24632626', '24630508', '24624655',
'24622514', '24607841']},
{'id': 'dzWW_R3G_6Eh', 'name': 'Härryda', 'type': 'municipality', 'code': '1401', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 7,
'ad_ids': ['24631009', '24621857', '24606754', '24587980', '24587111', '24568233', '24531121']},
{'id': 'CCiR_sXa_BVW', 'name': 'Partille', 'type': 'municipality', 'code': '1402', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 9,
'ad_ids': ['24644886', '24643254', '24642579', '24642082', '24623735', '24612128', '24611787', '24502309',
'24468685']},
{'id': 'Zjiv_rhk_oJK', 'name': 'Öckerö', 'type': 'municipality', 'code': '1407', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 2, 'ad_ids': ['24616589', '24601739']},
{'id': 'wHrG_FBH_hoD', 'name': 'Stenungsund', 'type': 'municipality', 'code': '1415', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 5,
'ad_ids': ['24635632', '24628237', '24612130', '24606880', '24587131']},
{'id': 'TbL3_HmF_gnx', 'name': 'Tjörn', 'type': 'municipality', 'code': '1419', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 2, 'ad_ids': ['24594903', '24590040']},
{'id': 'tmAp_ykH_N6k', 'name': 'Orust', 'type': 'municipality', 'code': '1421', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 5,
'ad_ids': ['24642072', '24596275', '24586295', '24541260', '24519447']},
{'id': 'aKkp_sEX_cVM', 'name': 'Sotenäs', 'type': 'municipality', 'code': '1427', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 6,
'ad_ids': ['24612938', '24564119', '24535667', '24520889', '24500709', '24485653']},
{'id': '96Dh_3sQ_RFb', 'name': 'Munkedal', 'type': 'municipality', 'code': '1430', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 3, 'ad_ids': ['24641856', '24624344', '24595408']},
{'id': 'qffn_qY4_DLk', 'name': 'Tanum', 'type': 'municipality', 'code': '1435', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 8,
'ad_ids': ['24627761', '24623563', '24623580', '24621916', '24610846', '24608306', '24607156', '24600587']},
{'id': 'NMc9_oEm_yxy', 'name': 'Dals-Ed', 'type': 'municipality', 'code': '1438', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 0, 'ad_ids': []},
{'id': 'kCHb_icw_W5E', 'name': 'Färgelanda', 'type': 'municipality', 'code': '1439', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 2, 'ad_ids': ['24639807', '24556773']},
{'id': '17Ug_Btv_mBr', 'name': 'Ale', 'type': 'municipality', 'code': '1440', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 3, 'ad_ids': ['24636146', '24628807', '24616322']},
{'id': 'yHV7_2Y6_zQx', 'name': 'Lerum', 'type': 'municipality', 'code': '1441', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 4, 'ad_ids': ['24650394', '24620026', '24603503', '24588967']},
{'id': 'NfFx_5jj_ogg', 'name': 'Vårgårda', 'type': 'municipality', 'code': '1442', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 5,
'ad_ids': ['24648984', '24648901', '24613448', '24595489', '24497926']},
{'id': 'ypAQ_vTD_KLU', 'name': 'Bollebygd', 'type': 'municipality', 'code': '1443', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 1, 'ad_ids': ['24576508']},
{'id': 'ZNZy_Hh5_gSW', 'name': 'Grästorp', 'type': 'municipality', 'code': '1444', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 0, 'ad_ids': []},
{'id': 'ZzEA_2Fg_Pt2', 'name': 'Essunga', 'type': 'municipality', 'code': '1445', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 2, 'ad_ids': ['24626743', '24523562']},
{'id': 'e413_94L_hdh', 'name': 'Karlsborg', 'type': 'municipality', 'code': '1446', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 0, 'ad_ids': []},
{'id': 'roiB_uVV_4Cj', 'name': 'Gullspång', 'type': 'municipality', 'code': '1447', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 1, 'ad_ids': ['24643272']},
{'id': 'SEje_LdC_9qN', 'name': 'Tranemo', 'type': 'municipality', 'code': '1452', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 6,
'ad_ids': ['24645375', '24615877', '24608246', '24595425', '24595398', '24589648']},
{'id': 'hejM_Jct_XJk', 'name': 'Bengtsfors', 'type': 'municipality', 'code': '1460', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 5,
'ad_ids': ['24628976', '24627769', '24606787', '24606679', '24606575']},
{'id': 'tt1B_7rH_vhG', 'name': 'Mellerud', 'type': 'municipality', 'code': '1461', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 4, 'ad_ids': ['24644889', '24638627', '24615086', '24614249']},
{'id': 'YQcE_SNB_Tv3', 'name': 'Lilla Edet', 'type': 'municipality', 'code': '1462', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 4, 'ad_ids': ['24642553', '24632874', '24622421', '24610751']},
{'id': '7HAb_9or_eFM', 'name': 'Mark', 'type': 'municipality', 'code': '1463', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 14,
'ad_ids': ['24648862', '24646848', '24646268', '24641228', '24630473', '24636557', '24636719', '24634116',
'24622756', '24605393']},
{'id': 'rZWC_pXf_ySZ', 'name': 'Svenljunga', 'type': 'municipality', 'code': '1465', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 6,
'ad_ids': ['24643128', '24623466', '24623505', '24615913', '24601846', '24557637']},
{'id': 'J116_VFs_cg6', 'name': 'Herrljunga', 'type': 'municipality', 'code': '1466', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 6,
'ad_ids': ['24641573', '24636142', '24617273', '24602256', '24589027', '24344092']},
{'id': 'fbHM_yhA_BqS', 'name': 'Vara', 'type': 'municipality', 'code': '1470', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 9,
'ad_ids': ['24629592', '24623071', '24600787', '24581780', '24573835', '24573476', '24564712', '24560074',
'24550766']},
{'id': 'txzq_PQY_FGi', 'name': 'Götene', 'type': 'municipality', 'code': '1471', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 4, 'ad_ids': ['24640957', '24645273', '24482625', '24435186']},
{'id': 'aLFZ_NHw_atB', 'name': 'Tibro', 'type': 'municipality', 'code': '1472', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 8,
'ad_ids': ['24645712', '24644627', '24629456', '24602786', '24606277', '24573354', '24571196', '24529612']},
{'id': 'a15F_gAH_pn6', 'name': 'Töreboda', 'type': 'municipality', 'code': '1473', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 4, 'ad_ids': ['24627789', '24606276', '24602447', '24522711']},
{'id': 'PVZL_BQT_XtL', 'name': 'Göteborg', 'type': 'municipality', 'code': '1480', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 366,
'ad_ids': ['24681247', '24676773', '24650996', '24650965', '24650945', '24650584', '24650192', '24649925',
'24649915', '24649703']},
{'id': 'mc45_ki9_Bv3', 'name': 'Mölndal', 'type': 'municipality', 'code': '1481', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 34,
'ad_ids': ['24650280', '24647664', '24645598', '24645052', '24644887', '24642987', '24642642', '24641578',
'24635304', '24632723']},
{'id': 'ZkZf_HbK_Mcr', 'name': 'Kungälv', 'type': 'municipality', 'code': '1482', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 10,
'ad_ids': ['24649688', '24636513', '24631373', '24599794', '24597606', '24594445', '24587159', '24487095',
'24361598', '24329253']},
{'id': 'z2cX_rjC_zFo', 'name': 'Lysekil', 'type': 'municipality', 'code': '1484', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 5,
'ad_ids': ['24635267', '24618391', '24605089', '24566449', '24554224']},
{'id': 'xQc2_SzA_rHK', 'name': 'Uddevalla', 'type': 'municipality', 'code': '1485', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 19,
'ad_ids': ['24649569', '24648333', '24641531', '24640747', '24639878', '24635023', '24633830', '24627768',
'24624785', '24619542']},
{'id': 'PAxT_FLT_3Kq', 'name': 'Strömstad', 'type': 'municipality', 'code': '1486', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 3, 'ad_ids': ['24645683', '24640280', '24612600']},
{'id': 'THif_q6H_MjG', 'name': 'Vänersborg', 'type': 'municipality', 'code': '1487', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 12,
'ad_ids': ['24643619', '24641986', '24626856', '24624150', '24615861', '24615817', '24615329', '24592505',
'24598715', '24598400']},
{'id': 'CSy8_41F_YvX', 'name': 'Trollhättan', 'type': 'municipality', 'code': '1488', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 21,
'ad_ids': ['24646037', '24639347', '24627262', '24624949', '24615219', '24615218', '24609960', '24607976',
'24606466', '24604829']},
{'id': 'UQ75_1eU_jaC', 'name': 'Alingsås', 'type': 'municipality', 'code': '1489', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 19,
'ad_ids': ['24641757', '24632495', '24631417', '24629793', '24626567', '24624598', '24618097', '24615747',
'24607775', '24607729']},
{'id': 'TpRZ_bFL_jhL', 'name': 'Borås', 'type': 'municipality', 'code': '1490', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 74,
'ad_ids': ['24674944', '24649696', '24649621', '24647020', '24641526', '24645912', '24644338', '24643016',
'24641652', '24641101']},
{'id': 'an4a_8t2_Zpd', 'name': 'Ulricehamn', 'type': 'municipality', 'code': '1491', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 5,
'ad_ids': ['24650721', '24645207', '24643748', '24639136', '24570351']},
{'id': 'M1UC_Cnf_r7g', 'name': 'Åmål', 'type': 'municipality', 'code': '1492', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 5,
'ad_ids': ['24633826', '24629622', '24627722', '24593424', '24541403']},
{'id': 'Lzpu_thX_Wpa', 'name': 'Mariestad', 'type': 'municipality', 'code': '1493', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 3, 'ad_ids': ['24646647', '24607084', '24606384']},
{'id': 'FN1Y_asc_D8y', 'name': 'Lidköping', 'type': 'municipality', 'code': '1494', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 9,
'ad_ids': ['24641522', '24624546', '24624090', '24606663', '24606030', '24586133', '24585588', '24516242',
'24417820']},
{'id': 'k1SK_gxg_dW4', 'name': 'Skara', 'type': 'municipality', 'code': '1495', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 13,
'ad_ids': ['24644221', '24639811', '24639532', '24631244', '24616809', '24614229', '24606824', '24600741',
'24595277', '24552003']},
{'id': 'fqAy_4ji_Lz2', 'name': 'Skövde', 'type': 'municipality', 'code': '1496', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 31,
'ad_ids': ['24649472', '24645228', '24642392', '24642391', '24638912', '24636831', '24636136', '24635424',
'24633671', '24628305']},
{'id': 'YbFS_34r_K2v', 'name': 'Hjo', 'type': 'municipality', 'code': '1497', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 5,
'ad_ids': ['24624908', '24585725', '24583812', '24573430', '24483113']},
{'id': 'Zsf5_vpP_Bs4', 'name': 'Tidaholm', 'type': 'municipality', 'code': '1498', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 2, 'ad_ids': ['24617483', '24600800']},
{'id': 'ZySF_gif_zE4', 'name': 'Falköping', 'type': 'municipality', 'code': '1499', 'region_code': '14',
'region_name': 'Västra Götalands län', 'hits': 8,
'ad_ids': ['24650374', '24640803', '24636373', '24635597', '24630448', '24628992', '24620333', '24617776']},
]
| 63.292347 | 120 | 0.580255 | 7,949 | 73,609 | 5.187948 | 0.416405 | 0.112515 | 0.140644 | 0.021388 | 0.315575 | 0.297898 | 0.297122 | 0.297122 | 0.17515 | 0.16448 | 0 | 0.268468 | 0.16267 | 73,609 | 1,162 | 121 | 63.346816 | 0.400617 | 0 | 0 | 0.070439 | 0 | 0 | 0.575786 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.002309 | false | 0 | 0.001155 | 0.001155 | 0.005774 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
6e547ba286ff8160e4b8d707f667afce26757473 | 192 | py | Python | include/syms.py | Newer-Team/NewerSMBU | 3f91885234852b5763f5c8815ea14816f3baffff | [
"MIT"
] | 7 | 2021-05-22T21:59:42.000Z | 2022-01-03T16:33:03.000Z | include/syms.py | Newer-Team/NewerSMBU | 3f91885234852b5763f5c8815ea14816f3baffff | [
"MIT"
] | null | null | null | include/syms.py | Newer-Team/NewerSMBU | 3f91885234852b5763f5c8815ea14816f3baffff | [
"MIT"
] | 2 | 2021-05-24T03:38:18.000Z | 2021-08-12T01:25:36.000Z |
names = []
addr = 0x148 + 0x4E4
while addr <= 0x148 + 0x7FC:
names.append('\t' + Name(Dword(addr)) + ' = ')
addr += 8
with open('names.txt', 'w') as f:
f.write('\n'.join(names))
| 19.2 | 50 | 0.541667 | 28 | 192 | 3.714286 | 0.714286 | 0.173077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.094595 | 0.229167 | 192 | 9 | 51 | 21.333333 | 0.608108 | 0 | 0 | 0 | 0 | 0 | 0.089005 | 0 | 0 | 0 | 0.104712 | 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 |
28125d005b1e52a3bd748fa5c25984c9f46123e0 | 372 | py | Python | setup.py | simonblouin/montreal-py-wd | d1240ca32e0e339209a2418386c0a727c807d7ef | [
"MIT"
] | 3 | 2017-12-15T18:48:56.000Z | 2017-12-15T19:08:15.000Z | setup.py | simonblouin/montreal-py-wd | d1240ca32e0e339209a2418386c0a727c807d7ef | [
"MIT"
] | 1 | 2017-12-15T19:03:46.000Z | 2017-12-15T19:03:46.000Z | setup.py | simonblouin/montreal-py-wd | d1240ca32e0e339209a2418386c0a727c807d7ef | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(name='NaBlaUtils',
version='0.1',
description="Utilitaires Python pour l'analyse et la visualisation de données relatives aux étoiles naines blanches",
url='https://github.com/simonblouin/NaBlaMTL-utilitaires',
package_data={'': ['lines.csv', 'MWDD_table.json']},
packages=find_packages())
| 37.2 | 123 | 0.717742 | 45 | 372 | 5.844444 | 0.888889 | 0.091255 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006369 | 0.155914 | 372 | 9 | 124 | 41.333333 | 0.83121 | 0 | 0 | 0 | 0 | 0 | 0.512129 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.142857 | 0 | 0.142857 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
281907314aa62398b5ac9a1eb0434b58b92aeb4a | 130 | py | Python | deployer/__init__.py | LSmith-Zenoscave/deployer | 0c3e3bd12a54affdca5751da678617511c98afbd | [
"BSD-3-Clause"
] | 3 | 2022-02-23T02:32:39.000Z | 2022-03-16T17:42:13.000Z | deployer/__init__.py | LSmith-Zenoscave/deployer | 0c3e3bd12a54affdca5751da678617511c98afbd | [
"BSD-3-Clause"
] | 190 | 2020-03-06T16:39:00.000Z | 2022-03-28T02:02:20.000Z | deployer/__init__.py | LSmith-Zenoscave/deployer | 0c3e3bd12a54affdca5751da678617511c98afbd | [
"BSD-3-Clause"
] | null | null | null | """Top-level package for deployer-fsm."""
__author__ = """Luke Smith"""
__email__ = 'lsmith@zenoscave.com'
__version__ = '0.1.5'
| 21.666667 | 41 | 0.684615 | 17 | 130 | 4.529412 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.026087 | 0.115385 | 130 | 5 | 42 | 26 | 0.643478 | 0.269231 | 0 | 0 | 0 | 0 | 0.393258 | 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 |
28195397cc0f59570344feb41e69dd85fdaea18d | 4,800 | py | Python | mibs/pycopia/mibs/SNMP_PROXY_MIB.py | kdart/pycopia | 1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d | [
"Apache-2.0"
] | 89 | 2015-03-26T11:25:20.000Z | 2022-01-12T06:25:14.000Z | mibs/pycopia/mibs/SNMP_PROXY_MIB.py | kdart/pycopia | 1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d | [
"Apache-2.0"
] | 1 | 2015-07-05T03:27:43.000Z | 2015-07-11T06:21:20.000Z | mibs/pycopia/mibs/SNMP_PROXY_MIB.py | kdart/pycopia | 1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d | [
"Apache-2.0"
] | 30 | 2015-04-30T01:35:54.000Z | 2022-01-12T06:19:49.000Z | # python
# This file is generated by a program (mib2py). Any edits will be lost.
from pycopia.aid import Enum
import pycopia.SMI.Basetypes
Range = pycopia.SMI.Basetypes.Range
Ranges = pycopia.SMI.Basetypes.Ranges
from pycopia.SMI.Objects import ColumnObject, MacroObject, NotificationObject, RowObject, ScalarObject, NodeObject, ModuleObject, GroupObject
# imports
from SNMPv2_SMI import MODULE_IDENTITY, OBJECT_TYPE, snmpModules
from SNMPv2_CONF import MODULE_COMPLIANCE, OBJECT_GROUP
from SNMPv2_TC import RowStatus, StorageType
from SNMP_TARGET_MIB import SnmpTagValue, snmpTargetBasicGroup, snmpTargetResponseGroup
from SNMP_FRAMEWORK_MIB import SnmpEngineID, SnmpAdminString
class SNMP_PROXY_MIB(ModuleObject):
path = '/usr/share/mibs/ietf/SNMP-PROXY-MIB'
name = 'SNMP-PROXY-MIB'
language = 2
description = 'This MIB module defines MIB objects which provide\nmechanisms to remotely configure the parameters\nused by a proxy forwarding application.\n\nCopyright (C) The Internet Society (2002). This\nversion of this MIB module is part of RFC 3413;\nsee the RFC itself for full legal notices.'
# nodes
class snmpProxyMIB(NodeObject):
status = 1
OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 6, 3, 14])
name = 'snmpProxyMIB'
class snmpProxyObjects(NodeObject):
OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 6, 3, 14, 1])
name = 'snmpProxyObjects'
class snmpProxyConformance(NodeObject):
OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 6, 3, 14, 3])
name = 'snmpProxyConformance'
class snmpProxyCompliances(NodeObject):
OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 6, 3, 14, 3, 1])
name = 'snmpProxyCompliances'
class snmpProxyGroups(NodeObject):
OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 6, 3, 14, 3, 2])
name = 'snmpProxyGroups'
# macros
# types
# scalars
# columns
class snmpProxyName(ColumnObject):
access = 2
status = 1
OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 6, 3, 14, 1, 2, 1, 1])
syntaxobject = SnmpAdminString
class snmpProxyType(ColumnObject):
status = 1
access = 5
OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 6, 3, 14, 1, 2, 1, 2])
syntaxobject = pycopia.SMI.Basetypes.Enumeration
enumerations = [Enum(1, 'read'), Enum(2, 'write'), Enum(3, 'trap'), Enum(4, 'inform')]
class snmpProxyContextEngineID(ColumnObject):
access = 5
status = 1
OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 6, 3, 14, 1, 2, 1, 3])
syntaxobject = SnmpEngineID
class snmpProxyContextName(ColumnObject):
access = 5
status = 1
OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 6, 3, 14, 1, 2, 1, 4])
syntaxobject = SnmpAdminString
class snmpProxyTargetParamsIn(ColumnObject):
access = 5
status = 1
OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 6, 3, 14, 1, 2, 1, 5])
syntaxobject = SnmpAdminString
class snmpProxySingleTargetOut(ColumnObject):
access = 5
status = 1
OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 6, 3, 14, 1, 2, 1, 6])
syntaxobject = SnmpAdminString
class snmpProxyMultipleTargetOut(ColumnObject):
access = 5
status = 1
OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 6, 3, 14, 1, 2, 1, 7])
syntaxobject = SnmpTagValue
class snmpProxyStorageType(ColumnObject):
access = 5
status = 1
OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 6, 3, 14, 1, 2, 1, 8])
syntaxobject = pycopia.SMI.Basetypes.StorageType
class snmpProxyRowStatus(ColumnObject):
access = 5
status = 1
OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 6, 3, 14, 1, 2, 1, 9])
syntaxobject = pycopia.SMI.Basetypes.RowStatus
# rows
class snmpProxyEntry(RowObject):
status = 1
index = pycopia.SMI.Objects.IndexObjects([snmpProxyName], True)
create = 1
OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 6, 3, 14, 1, 2, 1])
access = 2
rowstatus = snmpProxyRowStatus
columns = {'snmpProxyName': snmpProxyName, 'snmpProxyType': snmpProxyType, 'snmpProxyContextEngineID': snmpProxyContextEngineID, 'snmpProxyContextName': snmpProxyContextName, 'snmpProxyTargetParamsIn': snmpProxyTargetParamsIn, 'snmpProxySingleTargetOut': snmpProxySingleTargetOut, 'snmpProxyMultipleTargetOut': snmpProxyMultipleTargetOut, 'snmpProxyStorageType': snmpProxyStorageType, 'snmpProxyRowStatus': snmpProxyRowStatus}
# notifications (traps)
# groups
class snmpProxyGroup(GroupObject):
access = 2
status = 1
OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 6, 3, 14, 3, 2, 3])
group = [snmpProxyType, snmpProxyContextEngineID, snmpProxyContextName, snmpProxyTargetParamsIn, snmpProxySingleTargetOut, snmpProxyMultipleTargetOut, snmpProxyStorageType, snmpProxyRowStatus]
# capabilities
# special additions
# Add to master OIDMAP.
from pycopia import SMI
SMI.update_oidmap(__name__)
| 34.042553 | 427 | 0.752083 | 598 | 4,800 | 6.006689 | 0.250836 | 0.066815 | 0.11637 | 0.097996 | 0.287027 | 0.287027 | 0.287027 | 0.287027 | 0.287027 | 0.287027 | 0 | 0.052189 | 0.13375 | 4,800 | 140 | 428 | 34.285714 | 0.811688 | 0.044375 | 0 | 0.293478 | 1 | 0.01087 | 0.134514 | 0.034339 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.097826 | 0 | 0.967391 | 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 |
2832dce055b231bd88c0301f0256587ca9797d55 | 4,153 | py | Python | python/integrations/hamcrest.py | google/checkers_classic | 6081fa629033634651b8815061085d76c2616917 | [
"Apache-2.0"
] | 6 | 2016-01-04T22:44:16.000Z | 2021-04-20T20:38:12.000Z | python/integrations/hamcrest.py | google/checkers_classic | 6081fa629033634651b8815061085d76c2616917 | [
"Apache-2.0"
] | null | null | null | python/integrations/hamcrest.py | google/checkers_classic | 6081fa629033634651b8815061085d76c2616917 | [
"Apache-2.0"
] | 8 | 2015-12-06T20:40:15.000Z | 2021-10-12T02:59:20.000Z | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Module that wraps PyHamcrest with Checkers.
The main reason this module exists is because PyHamcrest has some cool support
for matchers, but they don't align with Google's coding guidelines. So if users
use PyHamcrest directly (which they are more than welcome to do), then create
custom matchers, they'll either need to follow PyHamcrest's style which will
result in lint messages everywhere, or they'd need to follow Google's style
which would result in weird-looking test code that's part Googley, part not.
"""
from __future__ import absolute_import
# pylint: disable=g-bad-import-order
# Basic Matchers
from hamcrest.core import assert_that
from hamcrest.core.base_matcher import BaseMatcher
from hamcrest.core.core import equal_to
from hamcrest.core.core import is_
from hamcrest.core.core.isinstanceof import instance_of
from hamcrest.core.helpers.hasmethod import hasmethod
from hamcrest.library.object.haslength import has_length
from hamcrest.library.object.hasstring import has_string
# Number based Matchers
from hamcrest.library.number.ordering_comparison import greater_than
from hamcrest.library.number.ordering_comparison import greater_than_or_equal_to
from hamcrest.library.number.ordering_comparison import less_than
from hamcrest.library.number.ordering_comparison import less_than_or_equal_to
# Text Matchers
from hamcrest.library.text.isequal_ignoring_case import equal_to_ignoring_case
from hamcrest.library.text.isequal_ignoring_whitespace import equal_to_ignoring_whitespace
from hamcrest.library.text.stringcontains import contains_string
from hamcrest.library.text.stringendswith import ends_with
from hamcrest.library.text.stringstartswith import starts_with
# Logical Matchers
from hamcrest.core.core.allof import all_of
from hamcrest.core.core.anyof import any_of
from hamcrest.core.core.isanything import anything
from hamcrest.core.core.isnot import is_not
# Sequence Matchers
from hamcrest.library.collection.isin import is_in
from hamcrest.library.collection.issequence_containing import has_item
from hamcrest.library.collection.issequence_containing import has_items
from hamcrest.library.collection.issequence_containinginanyorder import contains_inanyorder
from hamcrest.library.collection.issequence_containinginorder import contains
from hamcrest.library.collection.issequence_onlycontaining import only_contains
# Dictionary Matchers
from hamcrest.library.collection.isdict_containing import has_entry
from hamcrest.library.collection.isdict_containingkey import has_key
from hamcrest.library.collection.isdict_containingvalue import has_value
# Decorator Matchers (syntatic sugar)
from hamcrest.core.core.is_ import is_
# pylint: enable=g-bad-import-order
# pylint: disable=g-bad-name
hasmethod = hasmethod
BaseMatcher = BaseMatcher
AssertThat = assert_that
EqualTo = equal_to
Is = is_
InstanceOf = instance_of
HasLength = has_length
HasString = has_string
GreaterThan = greater_than
GreaterThanOrEqualTo = greater_than_or_equal_to
LessThan = less_than
LessThanOrEqualTo = less_than_or_equal_to
EqualToIgnoringCase = equal_to_ignoring_case
EqualToIgnoringWhitespace = equal_to_ignoring_whitespace
ContainsString = contains_string
EndsWith = ends_with
StartsWith = starts_with
AllOf = all_of
AnyOf = any_of
Anything = anything
IsNot = is_not
IsIn = is_in
HasItem = has_item
HasItems = has_items
ContainsInAnyOrder = contains_inanyorder
Contains = contains
OnlyContains = only_contains
HasEntry = has_entry
HasKey = has_key
HasValue = has_value
# pylint: enable=g-bad-name
| 35.801724 | 91 | 0.833855 | 584 | 4,153 | 5.765411 | 0.361301 | 0.110484 | 0.11286 | 0.077517 | 0.250668 | 0.126522 | 0.10395 | 0.10395 | 0.069498 | 0 | 0 | 0.002177 | 0.115098 | 4,153 | 115 | 92 | 36.113043 | 0.914014 | 0.328919 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.032258 | 1 | 0 | false | 0 | 0.516129 | 0 | 0.516129 | 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 |
284932e333f74b90ff691d5b09155335800b2530 | 249 | py | Python | 12_misc-semantic-code/hello_all.py | abdullahzameek/politics-of-code | 578c4fb59216ea6cf63d864d371e77b4d39ddc20 | [
"Unlicense"
] | 21 | 2018-01-05T00:14:36.000Z | 2022-03-29T15:26:52.000Z | 05_source/hello_all.py | periode/software-art-text | bc512345bb8e293f165077587b343407fba61d71 | [
"Unlicense"
] | null | null | null | 05_source/hello_all.py | periode/software-art-text | bc512345bb8e293f165077587b343407fba61d71 | [
"Unlicense"
] | 4 | 2019-05-18T21:44:58.000Z | 2019-12-04T06:51:29.000Z | #!/usr/bin/python
#alex mclean, 2013
import iptools, httplib
for ip in iptools.IpRangeList('0.0.0.0/0'):
try:
print "Greeting " + ip
cx = httplib.HTTPConnection("%s:80" % ip)
cx.request("POST", '/', "message=Hello+world!")
except:
pass
| 17.785714 | 49 | 0.650602 | 37 | 249 | 4.378378 | 0.756757 | 0.049383 | 0.055556 | 0.049383 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.052632 | 0.160643 | 249 | 13 | 50 | 19.153846 | 0.722488 | 0.13253 | 0 | 0 | 0 | 0 | 0.224299 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.125 | 0.125 | null | null | 0.125 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
28670d3f4a409af1f28760549be5dd847eb9ca00 | 1,061 | py | Python | examples/models1.py | weatherhead99/symdiff | ba21034fcffcc0fb84e1922549bb969f556c7741 | [
"Apache-2.0"
] | 8 | 2016-06-02T17:07:44.000Z | 2021-03-13T16:21:54.000Z | examples/models1.py | weatherhead99/symdiff | ba21034fcffcc0fb84e1922549bb969f556c7741 | [
"Apache-2.0"
] | 4 | 2018-03-04T20:32:01.000Z | 2020-01-15T15:42:41.000Z | examples/models1.py | devsim/symdiff | 1f25961214c25c5142279ec771db3c378637c950 | [
"Apache-2.0"
] | 7 | 2015-10-28T17:24:05.000Z | 2021-03-13T16:22:01.000Z | from symdiff import *
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
print(symdiff('declare_model(x)'))
print(symdiff('define_model(y, a*x)'))
print(symdiff('diff(y, x)'))
print(symdiff('clear_model(x)'))
print(ordered_list('y'))
print(symdiff('declare_model(x)'))
print(ordered_list('y'))
print(symdiff('define_model(x,y)'))
# catch cycles
try:
print(ordered_list('y'))
except SymdiffError as x:
print(x)
for i in model_list():
print(i + ' ' + symdiff('model_value(%s)' % i))
symdiff('clear_model(%s)' % i)
print("")
print(symdiff('declare_model(x)'))
print(symdiff('define_model(y,x^2)'))
print(symdiff('diff(y,x)'))
print(symdiff('clear_model(y)'))
print(symdiff('model_value(y__x)'))
print(symdiff('diff(model_value(y__x),z)'))
for i in model_list():
print(i + ' ' + symdiff('model_value(%s)' % i))
print("")
symdiff('clear_model(x)')
symdiff('clear_model(x__z)')
for i in model_list():
print(i + ' ' + symdiff('model_value(%s)' % i))
symdiff('clear_model(%s)' % i)
| 25.261905 | 51 | 0.66918 | 165 | 1,061 | 4.127273 | 0.254545 | 0.229075 | 0.114537 | 0.105727 | 0.638767 | 0.604993 | 0.594714 | 0.594714 | 0.499266 | 0.381791 | 0 | 0.003195 | 0.114986 | 1,061 | 41 | 52 | 25.878049 | 0.722045 | 0.104618 | 0 | 0.580645 | 0 | 0 | 0.322751 | 0.026455 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.032258 | 0 | 0.032258 | 0.677419 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 2 |
286f7a6f9777c0e3604948d3c7c76deea546bdbe | 1,144 | py | Python | docs/tutorial/python/sanic/users_if.py | mrpotes/go-raml | f151e1e143c47282b294fe70c5e56f113988ed10 | [
"BSD-2-Clause"
] | 142 | 2016-02-11T06:23:34.000Z | 2022-03-24T06:05:22.000Z | docs/tutorial/python/sanic/users_if.py | mrpotes/go-raml | f151e1e143c47282b294fe70c5e56f113988ed10 | [
"BSD-2-Clause"
] | 297 | 2016-02-04T06:23:13.000Z | 2020-08-20T13:23:22.000Z | docs/tutorial/python/sanic/users_if.py | mrpotes/go-raml | f151e1e143c47282b294fe70c5e56f113988ed10 | [
"BSD-2-Clause"
] | 49 | 2016-02-01T10:59:50.000Z | 2021-05-20T15:04:01.000Z | # DO NOT EDIT THIS FILE. This file will be overwritten when re-running go-raml.
from sanic import Blueprint
from sanic.views import HTTPMethodView
from sanic.response import text
from . import users_api
from .oauth2_itsyouonline import oauth2_itsyouonline
users_if = Blueprint('users_if')
class usersView(HTTPMethodView):
async def get(self, request):
if not await oauth2_itsyouonline([]).check_token(request):
return text('', 401)
return await users_api.users_get(request)
async def post(self, request):
if not await oauth2_itsyouonline(["user:memberof:goraml-admin"]).check_token(request):
return text('', 401)
return await users_api.users_post(request)
users_if.add_route(usersView.as_view(), '/users')
class users_byusernameView(HTTPMethodView):
async def get(self, request, username):
if not await oauth2_itsyouonline(["user:memberof:goraml"]).check_token(request):
return text('', 401)
return await users_api.users_byUsername_get(request, username)
users_if.add_route(users_byusernameView.as_view(), '/users/<username>')
| 25.422222 | 94 | 0.72028 | 148 | 1,144 | 5.391892 | 0.337838 | 0.112782 | 0.037594 | 0.06015 | 0.457393 | 0.457393 | 0.380952 | 0.318296 | 0.203008 | 0.203008 | 0 | 0.014925 | 0.18007 | 1,144 | 44 | 95 | 26 | 0.835821 | 0.067308 | 0 | 0.136364 | 1 | 0 | 0.0723 | 0.024413 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.227273 | 0 | 0.590909 | 0.090909 | 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 |
2877d06e24055e10815c2ec5fdf2dd072f4cb3fe | 685 | py | Python | stability_label_algorithm/modules/dataset_generator/dataset.py | DaphneO/stabilitylabelalgorithm | a163eaede3a4fa544ef8840079db64c0f8cd7015 | [
"MIT"
] | null | null | null | stability_label_algorithm/modules/dataset_generator/dataset.py | DaphneO/stabilitylabelalgorithm | a163eaede3a4fa544ef8840079db64c0f8cd7015 | [
"MIT"
] | null | null | null | stability_label_algorithm/modules/dataset_generator/dataset.py | DaphneO/stabilitylabelalgorithm | a163eaede3a4fa544ef8840079db64c0f8cd7015 | [
"MIT"
] | null | null | null | from typing import List
from stability_label_algorithm.modules.dataset_generator.dataset_item import DatasetItem
class Dataset:
def __init__(self, name: str, argumentation_system_name: str, dataset_items: List[DatasetItem]):
"""
A Dataset has a name, the name of its ArgumentationSystem and a list of DatasetItems.
:param name: Name of the Dataset.
:param argumentation_system_name: Name of the ArgumentationSystem on which the Dataset is based.
:param dataset_items: Items in the Dataset.
"""
self.name = name
self.argumentation_system_name = argumentation_system_name
self.dataset_items = dataset_items
| 38.055556 | 104 | 0.728467 | 87 | 685 | 5.505747 | 0.402299 | 0.158664 | 0.192067 | 0.05428 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.216058 | 685 | 17 | 105 | 40.294118 | 0.891993 | 0.381022 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.285714 | 0 | 0.571429 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
2885320113f7e24f2d68ca121540f5ec54198754 | 189 | py | Python | src/util.py | jnxyp/NetInspectionHelper | 5f37985db014099a9b0ee4b8e71d4e48a8b641f0 | [
"MIT"
] | 3 | 2020-06-22T15:12:48.000Z | 2020-06-29T20:06:11.000Z | src/util.py | jnxyp/NetInspectionHelper | 5f37985db014099a9b0ee4b8e71d4e48a8b641f0 | [
"MIT"
] | 6 | 2021-03-31T19:58:11.000Z | 2022-03-12T00:45:50.000Z | src/util.py | jnxyp/NetInspectionHelper | 5f37985db014099a9b0ee4b8e71d4e48a8b641f0 | [
"MIT"
] | null | null | null | from config import DEBUG
def read_file(path: str) -> list:
with open(path, encoding='utf8') as file:
return file.readlines()
def p(s: str):
if (DEBUG):
print(s)
| 15.75 | 45 | 0.603175 | 28 | 189 | 4.035714 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007194 | 0.26455 | 189 | 11 | 46 | 17.181818 | 0.805755 | 0 | 0 | 0 | 0 | 0 | 0.021164 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.285714 | false | 0 | 0.142857 | 0 | 0.571429 | 0.142857 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
288ab86f63deb185af9b80c75a5e90e6807f50ae | 5,005 | py | Python | data.py | cmlohr/py-quiz-game | 96e44118744d959c90f27e6cd0ffae7627cd3425 | [
"MIT"
] | null | null | null | data.py | cmlohr/py-quiz-game | 96e44118744d959c90f27e6cd0ffae7627cd3425 | [
"MIT"
] | null | null | null | data.py | cmlohr/py-quiz-game | 96e44118744d959c90f27e6cd0ffae7627cd3425 | [
"MIT"
] | null | null | null | q_data = [
{"question": "Japan was part of the Allied Powers during World War I.", "correct_answer": "True",
"incorrect_answers": ["False"]}, {"category": "History", "type": "boolean", "difficulty": "easy",
"question": "The Tiananmen Square protests of 1989 were held in Hong Kong.",
"correct_answer": "False", "incorrect_answers": ["True"]},
{"category": "History", "type": "boolean", "difficulty": "medium",
"question": "In World War II, Hawker Typhoons served in the Pacific theater.", "correct_answer": "False",
"incorrect_answers": ["True"]}, {"category": "History", "type": "boolean", "difficulty": "medium",
"question": "The M41 Walker Bulldog remains in service in some countries to this day.",
"correct_answer": "True", "incorrect_answers": ["False"]},
{"category": "History", "type": "boolean", "difficulty": "hard",
"question": "The Kingdom of Prussia briefly held land in Estonia.", "correct_answer": "False",
"incorrect_answers": ["True"]}, {"category": "History", "type": "boolean", "difficulty": "medium",
"question": "Assyrian king Sennacherib's destruction of Babylon in 689 BCE was viewed as a triumph by other Assyrian citizens.",
"correct_answer": "False", "incorrect_answers": ["True"]},
{"category": "History", "type": "boolean", "difficulty": "medium",
"question": "Brezhnev was the 5th leader of the USSR.", "correct_answer": "True",
"incorrect_answers": ["False"]}, {"category": "History", "type": "boolean", "difficulty": "hard",
"question": "The fourth funnel of the RMS Titanic was fake designed to make the ship look more powerful and symmetrical.",
"correct_answer": "True", "incorrect_answers": ["False"]},
{"category": "History", "type": "boolean", "difficulty": "medium",
"question": "Theodore Roosevelt Jr. was the only General involved in the initial assault on D-Day.",
"correct_answer": "True", "incorrect_answers": ["False"]},
{"category": "History", "type": "boolean", "difficulty": "easy",
"question": "The United States of America declared their independence from the British Empire on July 4th, 1776.",
"correct_answer": "True", "incorrect_answers": ["False"]},
{"category": "History", "type": "boolean", "difficulty": "medium",
"question": "Abraham Lincoln was the first U.S. President to be born outside the borders of the thirteen original states. ",
"correct_answer": "True", "incorrect_answers": ["False"]},
{"category": "History", "type": "boolean", "difficulty": "medium",
"question": "United States President Ronald Reagan was the first president to appoint a woman to the Supreme Court. ",
"correct_answer": "True", "incorrect_answers": ["False"]},
{"category": "History", "type": "boolean", "difficulty": "hard",
"question": "The Battle of Trafalgar took place on October 23rd, 1805", "correct_answer": "False",
"incorrect_answers": ["True"]}, {"category": "History", "type": "boolean", "difficulty": "medium",
"question": "Martin Luther King Jr. and Anne Frank were born the same year. ",
"correct_answer": "True", "incorrect_answers": ["False"]},
{"category": "History", "type": "boolean", "difficulty": "easy",
"question": "Adolf Hitler was tried at the Nuremberg trials.", "correct_answer": "False",
"incorrect_answers": ["True"]}, {"category": "History", "type": "boolean", "difficulty": "medium",
"question": "Adolf Hitler was accepted into the Vienna Academy of Fine Arts.",
"correct_answer": "False", "incorrect_answers": ["True"]},
{"category": "History", "type": "boolean", "difficulty": "hard",
"question": "During the Winter War, the amount of Soviet Union soliders that died or went missing was five times more than Finland's.",
"correct_answer": "True", "incorrect_answers": ["False"]},
{"category": "History", "type": "boolean", "difficulty": "easy",
"question": "The United States of America was the first country to launch a man into space.",
"correct_answer": "False", "incorrect_answers": ["True"]},
{"category": "History", "type": "boolean", "difficulty": "medium",
"question": "Sir Issac Newton served as a Member of Parliament, but the only recorded time he spoke was to complain about a draft in the chambers.",
"correct_answer": "True", "incorrect_answers": ["False"]},
{"category": "History", "type": "boolean", "difficulty": "hard",
"question": "The man that shot Alexander Hamilton was named Aaron Burr.", "correct_answer": "True",
"incorrect_answers": ["False"]}]
| 91 | 171 | 0.606993 | 539 | 5,005 | 5.560297 | 0.358071 | 0.086753 | 0.120454 | 0.164832 | 0.587588 | 0.587588 | 0.574908 | 0.570904 | 0.570904 | 0.570904 | 0 | 0.007 | 0.229371 | 5,005 | 54 | 172 | 92.685185 | 0.770029 | 0 | 0 | 0.555556 | 0 | 0.074074 | 0.664735 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
2891b45fa5c52ef0e7b5e1972a972e770407da5b | 409 | py | Python | transformer/__init__.py | DreamInvoker/attention-is-all-you-need-pytorch | b361752317089883464e1377c05faa51a829eed1 | [
"MIT"
] | null | null | null | transformer/__init__.py | DreamInvoker/attention-is-all-you-need-pytorch | b361752317089883464e1377c05faa51a829eed1 | [
"MIT"
] | null | null | null | transformer/__init__.py | DreamInvoker/attention-is-all-you-need-pytorch | b361752317089883464e1377c05faa51a829eed1 | [
"MIT"
] | null | null | null | import transformer.Beam
import transformer.Constants
import transformer.Layers
import transformer.Models
import transformer.Modules
import transformer.Optim
import transformer.SubLayers
import transformer.Translator
__all__ = [
transformer.Constants, transformer.Modules, transformer.Layers,
transformer.SubLayers, transformer.Models, transformer.Optim,
transformer.Translator, transformer.Beam]
| 29.214286 | 67 | 0.838631 | 41 | 409 | 8.268293 | 0.268293 | 0.40118 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.0978 | 409 | 13 | 68 | 31.461538 | 0.918699 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
2895dfb1d2ebd786ade44b4dda00d9c918c08fa9 | 443 | py | Python | tests/api_interface/test_runbooks/test_files/parallel_task.py | tuxtof/calm-dsl | 5af67435d8304b97e170a690068f2d5975e9bfe6 | [
"Apache-2.0"
] | 37 | 2019-12-23T15:23:20.000Z | 2022-03-15T11:12:11.000Z | tests/api_interface/test_runbooks/test_files/parallel_task.py | tuxtof/calm-dsl | 5af67435d8304b97e170a690068f2d5975e9bfe6 | [
"Apache-2.0"
] | 144 | 2020-03-09T11:22:09.000Z | 2022-03-28T21:34:09.000Z | tests/api_interface/test_runbooks/test_files/parallel_task.py | abhijeetkaurav1st/calm-dsl | 6487a896967b3fd667b9320e2ad3a397c9960497 | [
"Apache-2.0"
] | 46 | 2020-01-23T14:28:04.000Z | 2022-03-09T04:17:10.000Z | """
Calm DSL Sample Runbook for parallel task
"""
from calm.dsl.runbooks import runbook, parallel, branch
from calm.dsl.runbooks import RunbookTask as Task
@runbook
def ParallelTask():
"Runbook Service example"
with parallel() as p:
with branch(p):
Task.Delay(60, name="Delay1")
with branch(p):
Task.Delay(60, name="Delay2")
with branch(p):
Task.Delay(60, name="Delay3")
| 22.15 | 55 | 0.625282 | 57 | 443 | 4.859649 | 0.438596 | 0.075812 | 0.119134 | 0.162455 | 0.462094 | 0.281588 | 0.281588 | 0 | 0 | 0 | 0 | 0.027439 | 0.259594 | 443 | 19 | 56 | 23.315789 | 0.817073 | 0.146727 | 0 | 0.25 | 0 | 0 | 0.104326 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.083333 | true | 0 | 0.166667 | 0 | 0.25 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
289ac281de5cc15c291335f623dcb4dfdcc4c2b9 | 3,730 | py | Python | modules/templates.py | w-renk/p2e-monbuild | 1660b5a690e9d2c834599d811de19dbb410a63d6 | [
"MIT"
] | null | null | null | modules/templates.py | w-renk/p2e-monbuild | 1660b5a690e9d2c834599d811de19dbb410a63d6 | [
"MIT"
] | 2 | 2021-02-03T04:22:47.000Z | 2021-02-03T04:36:52.000Z | modules/templates.py | w-renk/p2e-monbuild | 1660b5a690e9d2c834599d811de19dbb410a63d6 | [
"MIT"
] | null | null | null | from .scripts import ClearScreen
from PyInquirer import prompt
def SelectTemplateGraft(statBlock):
ClearScreen()
print("You can optionally use a template graft to start the creation process. Template grafts grant specific bonuses and unique abilities. They also " +
"largely determine the creature types the monster will have. Listed minimum levels account for the graft applied to a level -1 " +
"creature except for when the grafts themselves require a minimum level, e.g., graveknight. See " +
"https://2e.aonprd.com/MonsterTemplates.aspx for additional information on the abilities that each of these grant.\n\n" +
"Ghost: incorporeal undead; has the Spirit and Undead traits; minimum level 1\n\n" +
"Ghoul: usually intelligent, flesh-eating undead formed from humanoids; often form societies; has the Undead trait; minimum level 0\n\n" +
"Ghast: stronger version of Ghouls; minimum level 1\n\n" +
"Graveknight: once humanoid undead warriors kept alive by cursed armor; has the Undead trait; minimum level 6\n\n" +
"Lich: powerful spellcasters that have intentionally become undead; has the Undead trait; recommended minimum level 13\n\n" +
"Ravener: skeletal undead dragons that feed on the souls of the living; has the Undead trait; recommended minimum level 15\n\n" +
"True Vampire: once humanoid undead that feed on the blood of living creatures; has the Undead trait; minimum level 6\n\n" +
"Vampire Spawn: undead turned by a True Vampire's bite; has the Undead trait; minimum level 0\n\n" +
"Vrykolakas: vampiric, plague-bearing undead risen from neglected corpses; has the Undead trait; minimum level 0\n\n" +
"Werecreature: shapeshifting, humanoid animal hybrids; has the Beast and Humanoid traits; minimum level 0\n\n" +
"Worm That Walks: eldritch spellcasters formed from an amalgamation of grave worms; has the Aberration and Swarm traits; recommended minimum level 5\n\n")
question = [
{
'type': 'list',
'name': 'template',
'message': 'Choose one of the following:',
'choices': ['Create a monster without a template graft',
'Ghost', 'Ghoul', 'Ghast', 'Graveknight', 'Lich', 'Ravener', 'True Vampire',
'Vampire Spawn', 'Vrykolakas', 'Werecreature', 'Worm That Walks']
}
]
# switch case to return proper tuple in form of ('template name', 'level constraint') e.g., ('True Vampire', 'minimum level 6')
ret = ('', '')
cases = {
'Ghost': lambda: ('Ghost', 'minimum level 1', ['Spirit', 'Undead']),
'Ghoul': lambda: ('Ghoul', 'minimum level 0', ['Undead']),
'Ghast': lambda: ('Ghast', 'minimum level 1', ['Undead']),
'Graveknight': lambda: ('Graveknight', 'minimum level 6', ['Undead']),
'Lich': lambda: ('Lich', 'Paizo recommended minimum level 13', ['Undead']),
'Ravener': lambda: ('Ravener', 'Paizo recommended minimum level 15', ['Undead']),
'True Vampire': lambda: ('True Vampire', 'minimum level 6', ['Undead']),
'Vampire Spawn': lambda: ('Vampire Spawn', 'minimum level 0', ['Undead']),
'Vrykolakas': lambda: ('Vrykolakas', 'minimum level 0', ['Undead']),
'Werecreature': lambda: ('Werecreature', 'minimum level 0', ['Beast', 'Humanoid']),
'Worm That Walks': lambda: ('Worm That Walks', 'Paizo recommended minimum level 5', ['Aberration', 'Swarm'])
}
statBlock.template, statBlock.levelConstraint, statBlock.types = cases.get(prompt(question)['template'], lambda: (None, '', []))()
return | 61.147541 | 166 | 0.646917 | 457 | 3,730 | 5.280088 | 0.367615 | 0.119354 | 0.0431 | 0.049316 | 0.138002 | 0.099461 | 0.099461 | 0.066308 | 0.066308 | 0 | 0 | 0.01014 | 0.233244 | 3,730 | 61 | 167 | 61.147541 | 0.833566 | 0.033512 | 0 | 0 | 0 | 0.266667 | 0.669534 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.022222 | false | 0 | 0.044444 | 0 | 0.088889 | 0.022222 | 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 |
955ad28239fde7863ac44405655a9a403aff97ca | 2,204 | py | Python | utils/eval_utils.py | alon-albalak/XOR-COVID | 319c33d30754e5c632e8e3307ff4f3774b9fca79 | [
"MIT"
] | 1 | 2022-03-20T04:23:06.000Z | 2022-03-20T04:23:06.000Z | utils/eval_utils.py | alon-albalak/XOR-COVID | 319c33d30754e5c632e8e3307ff4f3774b9fca79 | [
"MIT"
] | null | null | null | utils/eval_utils.py | alon-albalak/XOR-COVID | 319c33d30754e5c632e8e3307ff4f3774b9fca79 | [
"MIT"
] | null | null | null |
import sys
import re
import string
from collections import Counter
import pickle
def normalize_answer(s):
def remove_articles(text):
return re.sub(r'\b(a|an|the)\b', ' ', text)
def white_space_fix(text):
return ' '.join(text.split())
def remove_punc(text):
exclude = set(string.punctuation)
return ''.join(ch for ch in text if ch not in exclude)
def lower(text):
return text.lower()
return white_space_fix(remove_articles(remove_punc(lower(s))))
def f1_score(prediction, ground_truth):
prediction_tokens = normalize_answer(prediction).split()
ground_truth_tokens = normalize_answer(ground_truth).split()
common = Counter(prediction_tokens) & Counter(ground_truth_tokens)
num_same = sum(common.values())
if num_same == 0:
return 0
precision = 1.0 * num_same / len(prediction_tokens)
recall = 1.0 * num_same / len(ground_truth_tokens)
f1 = (2 * precision * recall) / (precision + recall)
return f1
def exact_match_score(prediction, ground_truth):
return (normalize_answer(prediction) == normalize_answer(ground_truth))
def metric_max_over_ground_truths(metric_fn, prediction, ground_truths):
scores_for_ground_truths = []
for ground_truth in ground_truths:
score = metric_fn(prediction, ground_truth)
scores_for_ground_truths.append(score)
return max(scores_for_ground_truths)
import unicodedata
def normalize(text):
"""Resolve different type of unicode encodings."""
return unicodedata.normalize('NFD', text)
def para_has_answer(answer, para, tokenizer):
# TODO: Fix for multilingual tokenization
assert isinstance(answer, list)
text = normalize(para)
tokens = tokenizer.tokenize(text)
text = tokens.words(uncased=True)
assert len(text) == len(tokens)
for single_answer in answer:
single_answer = normalize(single_answer)
single_answer = tokenizer.tokenize(single_answer)
single_answer = single_answer.words(uncased=True)
for i in range(0, len(text) - len(single_answer) + 1):
if single_answer == text[i: i + len(single_answer)]:
return True
return False
| 31.942029 | 75 | 0.700091 | 289 | 2,204 | 5.117647 | 0.304498 | 0.081136 | 0.048682 | 0.042596 | 0.016227 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006822 | 0.201906 | 2,204 | 68 | 76 | 32.411765 | 0.833997 | 0.038566 | 0 | 0 | 0 | 0 | 0.008996 | 0 | 0 | 0 | 0 | 0.014706 | 0.038462 | 1 | 0.192308 | false | 0 | 0.115385 | 0.076923 | 0.538462 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
9575bcddb1624e18b95ffde1bdad365d909fb591 | 1,090 | py | Python | src/_Image_Env/MetaData.py | krisHans3n/ifd_standardised_api_prod | d8684b63c5e89b0bdfa5d42142f6986e9f96357f | [
"MIT"
] | null | null | null | src/_Image_Env/MetaData.py | krisHans3n/ifd_standardised_api_prod | d8684b63c5e89b0bdfa5d42142f6986e9f96357f | [
"MIT"
] | null | null | null | src/_Image_Env/MetaData.py | krisHans3n/ifd_standardised_api_prod | d8684b63c5e89b0bdfa5d42142f6986e9f96357f | [
"MIT"
] | null | null | null | class MetaData:
'''
convert to dynamically adding attributes by passing in **kwargs and
setting each key value pair
attention will need to be given for when this class is used in other processes
to make sure they know the attributes that exists with each class
however, not necessary just now
'''
def __init__(self):
self.data_raw = None
self.file_type = None
self.metadata_type = None
self.origin_date = None
self.author = None
self.location = None
self.compression_alg = None
self.metadata_dict = None
self.metadata_dict_indexlst = None
def get_metadata_dict(self):
return self.metadata_dict
def get_file_type(self):
return self.file_type
def get_type_md(self):
return self.metadata_type
def get_origin_date(self):
return self.origin_date
def get_author(self):
return self.author
def get_compression_alg(self):
return self.compression_alg
def get_location_taken(self):
return self.location
| 25.348837 | 82 | 0.665138 | 147 | 1,090 | 4.727891 | 0.421769 | 0.092086 | 0.141007 | 0.057554 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.280734 | 1,090 | 42 | 83 | 25.952381 | 0.88648 | 0.249541 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.32 | false | 0 | 0 | 0.28 | 0.64 | 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 |
95803b48da5262cff9f246dcc6e5ba50079349a3 | 371 | py | Python | 13/13.py | teagles/teagles-pc | d245cd6e49cf60d893c6b19721bcef5a072d087f | [
"MIT"
] | null | null | null | 13/13.py | teagles/teagles-pc | d245cd6e49cf60d893c6b19721bcef5a072d087f | [
"MIT"
] | null | null | null | 13/13.py | teagles/teagles-pc | d245cd6e49cf60d893c6b19721bcef5a072d087f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# http://huge:file@www.pythonchallenge.com/pc/return/disproportional.html
import sys
import xmlrpclib
URL = 'http://www.pythonchallenge.com/pc/phonebook.php'
# 13/13.py Bert
def main(args=None):
if args is None:
args = sys.argv[1:]
s = xmlrpclib.ServerProxy(URL)
print s.phone(args[0])
if __name__ == '__main__':
main()
| 19.526316 | 73 | 0.679245 | 55 | 371 | 4.436364 | 0.672727 | 0.147541 | 0.172131 | 0.188525 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.019417 | 0.167116 | 371 | 18 | 74 | 20.611111 | 0.770227 | 0.285714 | 0 | 0 | 0 | 0 | 0.209924 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.2 | null | null | 0.1 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
959c2d734cf5521a7e6b6877fe2f46088f5cb6b7 | 563 | py | Python | justfunc/__init__.py | justland/just-func-python | 5b5c9def71ccbab998c1f164e1903e7bf42919a6 | [
"MIT"
] | 1 | 2021-03-09T18:53:36.000Z | 2021-03-09T18:53:36.000Z | justfunc/__init__.py | justland/just-func-python | 5b5c9def71ccbab998c1f164e1903e7bf42919a6 | [
"MIT"
] | null | null | null | justfunc/__init__.py | justland/just-func-python | 5b5c9def71ccbab998c1f164e1903e7bf42919a6 | [
"MIT"
] | null | null | null | import json
from justfunc.env import setup_env
from justfunc.evaluator import evaluate
from justfunc.reader import read
class JustFunc:
def __init__(self):
self.env = setup_env()
def run(self, src):
return evaluate(read(src), self.env)
def run_repl(self, prompt=">>> "):
while line := input(prompt):
try:
result = self.run(line)
print(json.dumps(result))
except RuntimeError as e:
print(e.args[0])
def main(self, _args):
self.run_repl()
| 22.52 | 44 | 0.584369 | 70 | 563 | 4.571429 | 0.471429 | 0.1125 | 0.05625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002577 | 0.310835 | 563 | 24 | 45 | 23.458333 | 0.822165 | 0 | 0 | 0 | 0 | 0 | 0.007105 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | false | 0 | 0.222222 | 0.055556 | 0.555556 | 0.111111 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
959f3cada4b21f1a6532c73af52a41ed4475daf9 | 1,182 | py | Python | robot-server/robot_server/robot/calibration/pipette_offset/constants.py | anuwrag/opentrons | 28c8d76a19e367c6bd38f5290faaa32abf378715 | [
"Apache-2.0"
] | 235 | 2017-10-27T20:37:27.000Z | 2022-03-30T14:09:49.000Z | robot-server/robot_server/robot/calibration/pipette_offset/constants.py | anuwrag/opentrons | 28c8d76a19e367c6bd38f5290faaa32abf378715 | [
"Apache-2.0"
] | 8,425 | 2017-10-26T15:25:43.000Z | 2022-03-31T23:54:26.000Z | robot-server/robot_server/robot/calibration/pipette_offset/constants.py | anuwrag/opentrons | 28c8d76a19e367c6bd38f5290faaa32abf378715 | [
"Apache-2.0"
] | 130 | 2017-11-09T21:02:37.000Z | 2022-03-15T18:01:24.000Z | from __future__ import annotations
from enum import Enum
from typing import TYPE_CHECKING
from robot_server.robot.calibration.constants import STATE_WILDCARD
if TYPE_CHECKING:
from typing_extensions import Final
class PipetteOffsetCalibrationState(str, Enum):
sessionStarted = "sessionStarted"
labwareLoaded = "labwareLoaded"
preparingPipette = "preparingPipette"
inspectingTip = "inspectingTip"
joggingToDeck = "joggingToDeck"
savingPointOne = "savingPointOne"
calibrationComplete = "calibrationComplete"
sessionExited = "sessionExited"
WILDCARD = STATE_WILDCARD
class PipetteOffsetWithTipLengthCalibrationState(str, Enum):
sessionStarted = "sessionStarted"
labwareLoaded = "labwareLoaded"
measuringNozzleOffset = "measuringNozzleOffset"
preparingPipette = "preparingPipette"
inspectingTip = "inspectingTip"
measuringTipOffset = "measuringTipOffset"
joggingToDeck = "joggingToDeck"
savingPointOne = "savingPointOne"
calibrationComplete = "calibrationComplete"
sessionExited = "sessionExited"
tipLengthComplete = "tipLengthComplete"
WILDCARD = STATE_WILDCARD
TIP_RACK_SLOT: Final = "8"
| 30.307692 | 67 | 0.774958 | 87 | 1,182 | 10.37931 | 0.413793 | 0.043189 | 0.035437 | 0.077519 | 0.396456 | 0.396456 | 0.261351 | 0.261351 | 0 | 0 | 0 | 0.001009 | 0.161591 | 1,182 | 38 | 68 | 31.105263 | 0.910192 | 0 | 0 | 0.6 | 0 | 0 | 0.242809 | 0.017767 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.166667 | 0 | 0.933333 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
95a2b7b36a7770ccb22f6528ec0c918ee2b72723 | 542 | py | Python | examples/verlet_chain/relax.py | Peque/pyqtgraph | 2bf4a0eb7b8ddba8eef0e84668a602a72404c050 | [
"MIT"
] | null | null | null | examples/verlet_chain/relax.py | Peque/pyqtgraph | 2bf4a0eb7b8ddba8eef0e84668a602a72404c050 | [
"MIT"
] | null | null | null | examples/verlet_chain/relax.py | Peque/pyqtgraph | 2bf4a0eb7b8ddba8eef0e84668a602a72404c050 | [
"MIT"
] | null | null | null | import ctypes
import os
so = os.path.join(os.path.dirname(__file__), 'maths.so')
lib = ctypes.CDLL(so)
lib.relax.argtypes = [
ctypes.c_void_p,
ctypes.c_void_p,
ctypes.c_void_p,
ctypes.c_void_p,
ctypes.c_void_p,
ctypes.c_void_p,
ctypes.c_void_p,
ctypes.c_int,
ctypes.c_int,
]
def relax(pos, links, mrel1, mrel2, lengths, push, pull, iters):
nlinks = links.shape[0]
lib.relax(pos.ctypes, links.ctypes, mrel1.ctypes, mrel2.ctypes, lengths.ctypes, push.ctypes, pull.ctypes, nlinks, iters)
| 22.583333 | 124 | 0.678967 | 87 | 542 | 4 | 0.333333 | 0.181034 | 0.221264 | 0.241379 | 0.261494 | 0.261494 | 0.261494 | 0.261494 | 0.261494 | 0.261494 | 0 | 0.011364 | 0.188192 | 542 | 23 | 125 | 23.565217 | 0.779545 | 0 | 0 | 0.5 | 0 | 0 | 0.014787 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.055556 | false | 0 | 0.111111 | 0 | 0.166667 | 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 |
95b7ea934e170b41492a8074ef0d54978725beca | 3,234 | py | Python | keystone/test/unit/test_normalizingfilter.py | admiyo/keystone | 9452cf04bc8b0a4dc66dc640615d5ace1ca715f2 | [
"Apache-2.0"
] | null | null | null | keystone/test/unit/test_normalizingfilter.py | admiyo/keystone | 9452cf04bc8b0a4dc66dc640615d5ace1ca715f2 | [
"Apache-2.0"
] | null | null | null | keystone/test/unit/test_normalizingfilter.py | admiyo/keystone | 9452cf04bc8b0a4dc66dc640615d5ace1ca715f2 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2010-2011 OpenStack, 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 unittest2 as unittest
from keystone.frontends.normalizer import NormalizingFilter
class MockWsgiApp(object):
def __init__(self):
pass
def __call__(self, env, start_response):
pass
def _start_response():
pass
class NormalizingFilterTest(unittest.TestCase):
def setUp(self):
self.filter = NormalizingFilter(MockWsgiApp(), {})
def test_trailing_slash(self):
env = {'PATH_INFO': '/v2.0/'}
self.filter(env, _start_response)
self.assertEqual('/', env['PATH_INFO'])
def test_remove_trailing_slash_from_empty_path(self):
"""Empty paths should still equate to a slash"""
env = {'PATH_INFO': '/'}
self.filter(env, _start_response)
self.assertEqual('/', env['PATH_INFO'])
def test_no_extension(self):
env = {'PATH_INFO': '/v2.0/someresource'}
self.filter(env, _start_response)
self.assertEqual('/someresource', env['PATH_INFO'])
self.assertEqual('application/json', env['HTTP_ACCEPT'])
def test_xml_extension(self):
env = {'PATH_INFO': '/v2.0/someresource.xml'}
self.filter(env, _start_response)
self.assertEqual('/someresource', env['PATH_INFO'])
self.assertEqual('application/xml', env['HTTP_ACCEPT'])
def test_atom_extension(self):
env = {'PATH_INFO': '/v2.0/someresource.atom'}
self.filter(env, _start_response)
self.assertEqual('/someresource', env['PATH_INFO'])
self.assertEqual('application/atom+xml', env['HTTP_ACCEPT'])
def test_json_extension(self):
env = {'PATH_INFO': '/v2.0/someresource.json'}
self.filter(env, _start_response)
self.assertEqual('/someresource', env['PATH_INFO'])
self.assertEqual('application/json', env['HTTP_ACCEPT'])
def test_version_header(self):
env = {'PATH_INFO': '/someresource',
'HTTP_ACCEPT':
'application/vnd.openstack.identity+xml;version=2.0'}
self.filter(env, _start_response)
self.assertEqual('/someresource', env['PATH_INFO'])
self.assertEqual('application/xml', env['HTTP_ACCEPT'])
self.assertEqual('2.0', env['KEYSTONE_API_VERSION'])
def test_extension_overrides_header(self):
env = {
'PATH_INFO': '/v2.0/someresource.json',
'HTTP_ACCEPT': 'application/xml'}
self.filter(env, _start_response)
self.assertEqual('/someresource', env['PATH_INFO'])
self.assertEqual('application/json', env['HTTP_ACCEPT'])
if __name__ == '__main__':
unittest.main()
| 34.042105 | 73 | 0.66543 | 393 | 3,234 | 5.267176 | 0.310433 | 0.054106 | 0.085024 | 0.069565 | 0.498068 | 0.485024 | 0.462319 | 0.462319 | 0.367633 | 0.367633 | 0 | 0.012422 | 0.203463 | 3,234 | 94 | 74 | 34.404255 | 0.791149 | 0.199753 | 0 | 0.421053 | 0 | 0 | 0.247274 | 0.054907 | 0 | 0 | 0 | 0 | 0.263158 | 1 | 0.210526 | false | 0.052632 | 0.035088 | 0 | 0.280702 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
95ba01af2dd88b323ad0133e622fb5c44e2460b0 | 282 | py | Python | Net640/apps/images/urls.py | 86Ilya/net640kb | 6724f3da3b678b637e0e776ee0d4953753ee2e05 | [
"MIT"
] | 1 | 2019-06-18T09:50:29.000Z | 2019-06-18T09:50:29.000Z | Net640/apps/images/urls.py | 86Ilya/net640kb | 6724f3da3b678b637e0e776ee0d4953753ee2e05 | [
"MIT"
] | 10 | 2019-12-24T07:05:29.000Z | 2022-02-10T07:42:44.000Z | Net640/apps/images/urls.py | 86Ilya/net640kb | 6724f3da3b678b637e0e776ee0d4953753ee2e05 | [
"MIT"
] | null | null | null | from django.urls import path, re_path
from Net640.apps.images import views
app_name = 'images'
urlpatterns = [
path(r'my_images/', views.user_images_view, name="my_images"),
# TODO move to rest api
path(r'action/', views.user_image_action, name="user_image_action"),
]
| 28.2 | 72 | 0.730496 | 44 | 282 | 4.454545 | 0.545455 | 0.05102 | 0.153061 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012448 | 0.14539 | 282 | 9 | 73 | 31.333333 | 0.80083 | 0.074468 | 0 | 0 | 0 | 0 | 0.189189 | 0 | 0 | 0 | 0 | 0.111111 | 0 | 1 | 0 | false | 0 | 0.285714 | 0 | 0.285714 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
95bf916c91e4f33552b1b6aaf5c5b7bfa117a363 | 1,237 | py | Python | symphony/cli/graphql_compiler/gql/utils_codegen.py | remo5000/magma | 1d1dd9a23800a8e07b1ce016776d93e12430ec15 | [
"BSD-3-Clause"
] | 1 | 2020-06-05T09:01:40.000Z | 2020-06-05T09:01:40.000Z | symphony/cli/graphql_compiler/gql/utils_codegen.py | remo5000/magma | 1d1dd9a23800a8e07b1ce016776d93e12430ec15 | [
"BSD-3-Clause"
] | 14 | 2019-11-15T12:01:18.000Z | 2019-12-12T14:37:42.000Z | symphony/cli/graphql_compiler/gql/utils_codegen.py | remo5000/magma | 1d1dd9a23800a8e07b1ce016776d93e12430ec15 | [
"BSD-3-Clause"
] | 3 | 2019-11-15T15:56:25.000Z | 2019-11-21T10:34:59.000Z | #!/usr/bin/env python3
import os
SPACES = ' ' * 4
class CodeChunk:
class Block:
def __init__(self, codegen: 'CodeChunk'):
self.gen = codegen
def __enter__(self):
self.gen.indent()
return self.gen
def __exit__(self, exc_type, exc_val, exc_tb):
self.gen.unindent()
def __init__(self):
self.lines = []
self.level = 0
def indent(self):
self.level += 1
def unindent(self):
if self.level > 0:
self.level -= 1
@property
def indent_string(self):
return self.level * SPACES
def write(self, value: str, *args, **kwargs):
if value != '':
value = self.indent_string + value
if args or kwargs:
value = value.format(*args, **kwargs)
self.lines.append(value)
def write_lines(self, lines):
for line in lines:
self.lines.append(self.indent_string + line)
def block(self):
return self.Block(self)
def write_block(self, block_header: str, *args, **kwargs):
self.write(block_header, *args, **kwargs)
return self.block()
def __str__(self):
return os.linesep.join(self.lines)
| 22.490909 | 62 | 0.561843 | 151 | 1,237 | 4.403974 | 0.304636 | 0.067669 | 0.033083 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007143 | 0.320938 | 1,237 | 54 | 63 | 22.907407 | 0.784524 | 0.016977 | 0 | 0 | 0 | 0 | 0.00823 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.315789 | false | 0 | 0.026316 | 0.078947 | 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 |
95cfdac0c2362f99c28a30a74ba903c5303c9fe2 | 4,154 | py | Python | password_test.py | John-Kimani/Password-Manager | 4bbb4b616c8d127793deaf3cd48e8ea5fe3097c3 | [
"MIT"
] | null | null | null | password_test.py | John-Kimani/Password-Manager | 4bbb4b616c8d127793deaf3cd48e8ea5fe3097c3 | [
"MIT"
] | null | null | null | password_test.py | John-Kimani/Password-Manager | 4bbb4b616c8d127793deaf3cd48e8ea5fe3097c3 | [
"MIT"
] | null | null | null | import unittest #unitest module
from password import Credential #imports Credential class for testing
from password import User #imports User class for testing
class TestUser(unittest.TestCase):
'''
Test class that helps define test cases for the credentials class behaviours
Args:
Testcase class taht helps create test cases for User
'''
# test to check if user object is instatiated properly
def setUp(self):
'''
Set up method to run before each test case.
'''
self.new_profile = User('Vernice','Hakuna Mipaka')
def test__init(self):
'''
Test case to test if User object is instantiated correctly
'''
self.assertEqual(self.new_profile.userName, 'Vernice')
self.assertEqual(self.new_profile.password, 'Hakuna Mipaka')
#end of class user test
#start of class credential test
class TestCredential(unittest.TestCase):
'''
Test class that helps define test cases for the credentials class behaviours
Args:
Testcase class that helps create test cases for Credential
'''
#test to check if credential object is instantiated properly
def setUp(self):
'''
Set up method to run before each test case.
'''
self.new_account = Credential('Pintrest', 'kimperria', 'Aura-Dev98') #sample login details for a new pintrest account
def test__init(self):
'''
Test case to test if credential object is instantiated correctly
'''
self.assertEqual(self.new_account.accountName, 'Pintrest')
self.assertEqual(self.new_account.accountUsername,'kimperria')
self.assertEqual(self.new_account.accountPassword,'Aura-Dev98')
# save account
def test_save_account(self):
'''
Test case to check account object is saved into the contact list
'''
self.new_account.save_account()
self.assertEqual(len(Credential.credentials_list),1)
def tearDown(self):
'''
cleans up each credential list after instance
'''
Credential.credentials_list = []
# save multiple accounts
def test_save_multiple_accounts(self):
'''
Test case to check if users can save multiple accounts
'''
self.new_account.save_account()
test_account = Credential('Pintrest', 'kimperria', 'Aura-Dev98')
test_account.save_account()
self.assertEqual(len(Credential.credentials_list),2)
#delete account
def test_delete_account(self):
'''
Test case to check if user can delete an account
'''
self.new_account.save_account()
test_account = Credential('Pintrest', 'kimperria', 'Aura-Dev98')
test_account.save_account()
self.new_account.delete_account() #deletes account object
self.assertEqual(len(Credential.credentials_list),1)
# search account by username
def test_find_account_by_username(self):
'''
Test case to check if we can find an account by username and display information
'''
self.new_account.save_account()
test_account = Credential('Pintrest', 'kimperria', 'Aura-Dev98')
test_account.save_account()
found_account = Credential.find_by_accountUsername('kimperria')
self.assertEqual(found_account.accountUsername,test_account.accountUsername)
# check if account exist
def test_account_exist(self):
'''
Test case to check if a user account already exist returns a boolean
'''
self.new_account.save_account()
test_account = Credential('Pintrest', 'kimperria', 'Aura-Dev98')
test_account.save_account()
account_exists = Credential.account_exist('kimperria')
self.assertTrue(account_exists)
# display available accounts
def test_display_all_accounts(self):
'''
Method that returns a list of all saved accounts
'''
self.assertEqual(Credential.display_accounts(),Credential.credentials_list)
#class condition
if __name__ == '__main__':
unittest.main() | 34.907563 | 126 | 0.665383 | 486 | 4,154 | 5.537037 | 0.218107 | 0.033816 | 0.052025 | 0.036418 | 0.50799 | 0.435154 | 0.375697 | 0.358974 | 0.32107 | 0.26087 | 0 | 0.00482 | 0.250843 | 4,154 | 119 | 127 | 34.907563 | 0.859897 | 0.329562 | 0 | 0.395833 | 0 | 0 | 0.09242 | 0 | 0 | 0 | 0 | 0 | 0.229167 | 1 | 0.229167 | false | 0.083333 | 0.0625 | 0 | 0.333333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
95d3dff28770504e9596f85e60168b427ecafade | 262 | py | Python | models.py | kaflesudip/TweetStats | 2cae1c0615c970cf56e69752924e943a5f40f7e5 | [
"Apache-2.0"
] | null | null | null | models.py | kaflesudip/TweetStats | 2cae1c0615c970cf56e69752924e943a5f40f7e5 | [
"Apache-2.0"
] | 12 | 2020-06-05T16:51:04.000Z | 2022-03-11T23:11:43.000Z | models.py | kaflesudip/TweetStats | 2cae1c0615c970cf56e69752924e943a5f40f7e5 | [
"Apache-2.0"
] | 1 | 2020-05-12T03:32:29.000Z | 2020-05-12T03:32:29.000Z | from mongoengine import DynamicDocument, fields, connect
connect('tweetpredict')
class Tweet(DynamicDocument):
tweet_id = fields.StringField()
tweets = fields.ListField()
total_fetched = fields.IntField()
error_occured = fields.BooleanField()
| 23.818182 | 56 | 0.751908 | 26 | 262 | 7.461538 | 0.730769 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.152672 | 262 | 10 | 57 | 26.2 | 0.873874 | 0 | 0 | 0 | 0 | 0 | 0.045802 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.142857 | 0 | 0.857143 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
95d65ed692549d6dee491bcefd10d86dd08cbec8 | 407 | py | Python | ECUInteraction/main.py | arturmrowca/IVNS | 8915142d16debe4af780a9eb6859e44dea2ca7e6 | [
"MIT"
] | 8 | 2016-03-02T11:47:16.000Z | 2021-11-05T07:49:25.000Z | ECUInteraction/main.py | arturmrowca/IVNS | 8915142d16debe4af780a9eb6859e44dea2ca7e6 | [
"MIT"
] | 1 | 2019-03-19T14:23:52.000Z | 2019-03-25T14:24:45.000Z | ECUInteraction/main.py | PhilippMundhenk/IVNS | b2e395611e9b5111aeda7ab128f3486354bbbf0d | [
"MIT"
] | 5 | 2016-02-11T10:12:27.000Z | 2020-10-09T02:27:41.000Z |
from PyQt4 import QtGui
from gui.main_window import MainWindow
import sys
from gui.direct_view_window import DirectViewWindow, DirectViewer
'''
Later configure from here in some code lines: GUI On GUI off, want to have view x and view y
maybe a api for gui ?
'''
q_app = QtGui.QApplication(sys.argv)
gui = MainWindow()
# a = NewSimulationWindow(gui)
gui.show()
# sys.exit(q_app.exec_()) | 21.421053 | 92 | 0.72973 | 63 | 407 | 4.619048 | 0.634921 | 0.04811 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.003021 | 0.186732 | 407 | 19 | 93 | 21.421053 | 0.876133 | 0.127764 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.571429 | 0 | 0.571429 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
95de66cae1fc85da8200c98fd2f99c7dce1abee0 | 1,462 | py | Python | clippy/command_return.py | gowithfloat/clippy | 0d537ff5fb8d2be79f33aa8451fc9facc75c372a | [
"MIT"
] | 2 | 2021-01-16T07:14:11.000Z | 2021-01-30T00:57:05.000Z | clippy/command_return.py | gowithfloat/clippy | 0d537ff5fb8d2be79f33aa8451fc9facc75c372a | [
"MIT"
] | 1 | 2020-02-11T19:29:52.000Z | 2020-02-17T16:03:55.000Z | clippy/command_return.py | gowithfloat/clippy | 0d537ff5fb8d2be79f33aa8451fc9facc75c372a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Defines the return value from a function, including its documentation and type annotation, if provided.
"""
from typing import Optional
from clippy.command_protocols import CommandProtocol
class CommandReturn(CommandProtocol):
"""The return value from a function and its associated properties."""
@property
def annotation(self) -> Optional[type]:
"""The type annotation associated with this return value, if provided."""
return self._annotation
def __init__(self, documentation: Optional[str] = None, annotation: Optional[type] = None):
"""
Creates a new object to hold function return value information.
:param documentation: The documentation associated with this return value. Optional.
:param annotation: The type annotation associated with this return value. Optional.
"""
super().__init__("return", documentation)
if annotation is not None:
if not isinstance(annotation, type):
raise TypeError("Parameter annotation must be a type, if provided.")
self._annotation = annotation
def __str__(self):
return self.__repr__()
def __repr__(self):
if self._annotation:
return f"{self.__class__.__name__}({self.documentation!r}, '{self.annotation.__name__}')"
return f"{self.__class__.__name__}({self.documentation!r}, no annotation)"
| 33.227273 | 103 | 0.681259 | 166 | 1,462 | 5.73494 | 0.373494 | 0.069328 | 0.056723 | 0.07563 | 0.280462 | 0.280462 | 0.176471 | 0.176471 | 0 | 0 | 0 | 0.000878 | 0.22093 | 1,462 | 43 | 104 | 34 | 0.834943 | 0.350205 | 0 | 0 | 0 | 0 | 0.221973 | 0.142377 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | false | 0 | 0.111111 | 0.055556 | 0.611111 | 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 |
95e87fff750d29d872602c9ffdd4a55e0cb69b97 | 283 | py | Python | config.py | FarmCodeGary/BlogCompile | c139f3c1a3a1ba032571a69774a228a3c023073f | [
"MIT"
] | null | null | null | config.py | FarmCodeGary/BlogCompile | c139f3c1a3a1ba032571a69774a228a3c023073f | [
"MIT"
] | null | null | null | config.py | FarmCodeGary/BlogCompile | c139f3c1a3a1ba032571a69774a228a3c023073f | [
"MIT"
] | null | null | null | # TODO: Make this a relative path
local_url = "/home/garrison/Code/blogengine/output"
remote_url = "http://www.example.com"
site_title = "My Vanilla Blog"
site_description = "The really cool blog in which I write about stuff"
copy_rst = False
disqus_shortname = "mydisqusshortname"
| 31.444444 | 70 | 0.770318 | 42 | 283 | 5.047619 | 0.928571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.130742 | 283 | 8 | 71 | 35.375 | 0.861789 | 0.109541 | 0 | 0 | 0 | 0 | 0.56 | 0.148 | 0 | 0 | 0 | 0.125 | 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 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
95f03412c276f2e57c8196e21e0e3e159b27cbe4 | 165 | py | Python | Fundamentals/Solo_Practice/translate.py | bnonni/Python | 9ebd18caa4e2d805028b557e8b77ea65a9ee1a3d | [
"Apache-2.0"
] | 4 | 2019-10-05T03:41:20.000Z | 2020-11-04T00:39:13.000Z | Fundamentals/Solo_Practice/translate.py | bnonni/Python | 9ebd18caa4e2d805028b557e8b77ea65a9ee1a3d | [
"Apache-2.0"
] | null | null | null | Fundamentals/Solo_Practice/translate.py | bnonni/Python | 9ebd18caa4e2d805028b557e8b77ea65a9ee1a3d | [
"Apache-2.0"
] | 2 | 2019-10-02T14:08:51.000Z | 2019-10-03T20:49:09.000Z | in_code = 'abcdefghijklmnopqrstuvwxyz'
out_code = '9128645!@#$%^&*()/.,;:~|[]'
code = str.maketrans(in_code, out_code)
print('this is encrypted!'.translate(code))
| 23.571429 | 43 | 0.678788 | 19 | 165 | 5.684211 | 0.631579 | 0.111111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.046667 | 0.090909 | 165 | 6 | 44 | 27.5 | 0.673333 | 0 | 0 | 0 | 0 | 0 | 0.424242 | 0.315152 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.25 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
95f0c3b8559a2cdb63c2f9a86aedfd713206f35e | 896 | py | Python | scrapper/new_scrap_data/page_classifier.py | ARQtty/grouple-recsys | ce20613ed4ad5fd977985e8021e63dbbfaee1175 | [
"MIT"
] | null | null | null | scrapper/new_scrap_data/page_classifier.py | ARQtty/grouple-recsys | ce20613ed4ad5fd977985e8021e63dbbfaee1175 | [
"MIT"
] | 4 | 2022-02-03T09:52:29.000Z | 2022-03-31T20:43:48.000Z | scrapper/new_scrap_data/page_classifier.py | ARQtty/grouple-recsys | ce20613ed4ad5fd977985e8021e63dbbfaee1175 | [
"MIT"
] | 3 | 2022-03-25T05:51:05.000Z | 2022-03-29T06:55:23.000Z | import re
from arqtty_scrapper.page_types import Page_types
class Classifier:
def __init__(self, page_str):
self.page = page_str
def _is_404(self):
marker1 = 'Ой, ой, страничка потерялась'
marker2 = 'Спокойно! Логи записаны. Все будет исправлено.'
return re.search(marker1, self.page) and re.search(marker2, self.page)
def _is_user_blocked(self):
marker1 = "Пользователь '[\w\W]*' заблокирован"
return re.search(marker1, self.page)
def _is_alive(self):
marker1 = 'Лента действий'
return re.search(marker1, self.page)
def get_type(self):
if self._is_404():
return Page_types.E_404
elif self._is_user_blocked():
return Page_types.USER_BANNED
elif self._is_alive():
return Page_types.CORRECT
else:
return Page_types.UNDEFINED
| 26.352941 | 78 | 0.636161 | 114 | 896 | 4.736842 | 0.403509 | 0.1 | 0.111111 | 0.116667 | 0.172222 | 0.172222 | 0.118519 | 0 | 0 | 0 | 0 | 0.026114 | 0.273438 | 896 | 33 | 79 | 27.151515 | 0.803379 | 0 | 0 | 0.083333 | 0 | 0 | 0.137277 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.208333 | false | 0 | 0.083333 | 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 |
95fea7ab4ec1a16dc4fa606d938f4182056a0d5c | 548 | py | Python | descarteslabs/common/http/authorization.py | carderne/descarteslabs-python | 757b480efb8d58474a3bf07f1dbd90652b46ed64 | [
"Apache-2.0"
] | null | null | null | descarteslabs/common/http/authorization.py | carderne/descarteslabs-python | 757b480efb8d58474a3bf07f1dbd90652b46ed64 | [
"Apache-2.0"
] | null | null | null | descarteslabs/common/http/authorization.py | carderne/descarteslabs-python | 757b480efb8d58474a3bf07f1dbd90652b46ed64 | [
"Apache-2.0"
] | null | null | null | import six
def add_bearer(token):
"""For use with Authorization headers, add "Bearer "."""
if token:
return (u"Bearer " if isinstance(token, six.text_type) else b"Bearer ") + token
else:
return token
def remove_bearer(token):
"""For use with Authorization headers, strip any "Bearer "."""
if isinstance(token, (six.text_type, six.binary_type)) and token.lower().startswith(
u"bearer " if isinstance(token, six.text_type) else b"bearer "
):
return token[7:]
else:
return token
| 27.4 | 88 | 0.640511 | 73 | 548 | 4.726027 | 0.369863 | 0.092754 | 0.156522 | 0.2 | 0.602899 | 0.602899 | 0.602899 | 0.266667 | 0.266667 | 0.266667 | 0 | 0.002398 | 0.239051 | 548 | 19 | 89 | 28.842105 | 0.82494 | 0.195255 | 0 | 0.307692 | 0 | 0 | 0.065116 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.153846 | false | 0 | 0.076923 | 0 | 0.538462 | 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 |
251c29c73488152e6511f74b6fef1cdbb40ed920 | 548 | py | Python | Module 3/Chapter 6/ch6_18.py | PacktPublishing/Natural-Language-Processing-Python-and-NLTK | bb7fd9a3071b4247d13accfbf0a48eefec76e925 | [
"MIT"
] | 50 | 2016-12-11T13:49:01.000Z | 2022-03-20T19:47:55.000Z | Module 3/Chapter 6/ch6_18.py | PacktPublishing/Natural-Language-Processing-Python-and-NLTK | bb7fd9a3071b4247d13accfbf0a48eefec76e925 | [
"MIT"
] | null | null | null | Module 3/Chapter 6/ch6_18.py | PacktPublishing/Natural-Language-Processing-Python-and-NLTK | bb7fd9a3071b4247d13accfbf0a48eefec76e925 | [
"MIT"
] | 40 | 2017-06-14T14:02:48.000Z | 2021-10-14T06:25:00.000Z | import nltk
from nltk.corpus import wordnet
from nltk.corpus import wordnet as wn
from nltk.corpus import wordnet_ic
brown_ic = wordnet_ic.ic('ic-brown.dat')
semcor_ic = wordnet_ic.ic('ic-semcor.dat')
from nltk.corpus import genesis
genesis_ic = wn.ic(genesis, False, 0.0)
lion = wn.synset('lion.n.01')
cat = wn.synset('cat.n.01')
print(lion.res_similarity(cat, brown_ic))
print(lion.res_similarity(cat, genesis_ic))
print(lion.jcn_similarity(cat, brown_ic))
print(lion.jcn_similarity(cat, genesis_ic))
print(lion.lin_similarity(cat, semcor_ic))
| 30.444444 | 43 | 0.777372 | 96 | 548 | 4.270833 | 0.25 | 0.109756 | 0.136585 | 0.195122 | 0.614634 | 0.307317 | 0 | 0 | 0 | 0 | 0 | 0.012024 | 0.089416 | 548 | 17 | 44 | 32.235294 | 0.809619 | 0 | 0 | 0 | 0 | 0 | 0.076923 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0.333333 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
2520d383228e1dada3ff7363e28dbffb33d0ac06 | 6,945 | py | Python | package/scripts/utils.py | xiaoxiaopan118/Ambari-Doris-Service | 3866e3dfb5604b4817657234ddb0d381c7feede5 | [
"Apache-2.0"
] | 5 | 2021-09-10T06:52:37.000Z | 2022-03-10T07:28:05.000Z | package/scripts/utils.py | xiaoxiaopan118/Ambari-Doris-Service | 3866e3dfb5604b4817657234ddb0d381c7feede5 | [
"Apache-2.0"
] | null | null | null | package/scripts/utils.py | xiaoxiaopan118/Ambari-Doris-Service | 3866e3dfb5604b4817657234ddb0d381c7feede5 | [
"Apache-2.0"
] | 3 | 2022-01-20T08:05:52.000Z | 2022-03-10T07:28:07.000Z | from resource_management import *
from resource_management.core.resources.system import Execute, Directory, File, Link
import os
import socket
import time
def install():
import params
if not is_service_installed(params):
# download doris tar.gz
cmd = format("mkdir -p {doris_install_dir}; cd {doris_install_dir}; wget {download_url} ")
Execute(cmd, user=params.default_user)
# install doris
cmd = format("cd {doris_install_dir}; tar -xf {doris_filename}.tar.gz")
Execute(cmd, user=params.default_user)
# remove doris installation file
cmd = format("cd {doris_install_dir}; rm -rf {doris_filename}.tar.gz")
Execute(cmd, user=params.default_user)
def is_service_installed(params):
"""
Judge if service installed
:param params: params.py
:return: installed
"""
install_dirs = params.doris_dir
installed = False
if os.path.isdir(install_dirs):
installed = True
Logger.info(format("Service already installed."))
return installed
def split_be_storage_path(params):
"""
split_be_storage_path
:return:
"""
split_path = params.doris_be_storage_root_path.split(';')
Logger.info("Doris BE storage path is {0}.".format(split_path))
if len(split_path) >= 1:
for tmp_path in split_path:
path = tmp_path.split('.')
if None != path:
Logger.info("Starting mkdir Doris BE storage path, The path is {0}.".format(path))
Directory(path,
create_parents = True,
owner=params.default_user,
group=params.default_group)
def change_root_passowrd(params):
"""
change root passowrd
# TODO the function is not appropriate
:return:
"""
doris_fe_hostname = params.doris_fe_hostname[0]
doris_root_password = params.doris_fe_root_password
doris_fe_query_port = params.doris_fe_query_port
doris_be_heartbeat_service_port = params.doris_be_heartbeat_service_port
cmd_no_password = format("mysql -uroot -h {doris_fe_hostname} -P {doris_fe_query_port} "
"-e \"SET PASSWORD FOR \'root\' = PASSWORD(\'{doris_root_password}\') \" ")
cmd_has_password = format("mysql -uroot -p{doris_root_password} -h {doris_fe_hostname} -P {doris_fe_query_port} "
"-e \"SET PASSWORD FOR \'root\' = PASSWORD(\'{doris_root_password}\') \" ")
try:
Logger.info("Add Doris Server password, commonds is {0}.".format(cmd_no_password))
Execute(cmd_no_password, user=params.default_user, logoutput=True, tries=10, try_sleep=3)
except:
Logger.info("Changed Doris Server password, commonds is {0}.".format(cmd_has_password))
Execute(cmd_has_password, user=params.default_user, logoutput=True, ignore_failures=True, tries=10, try_sleep=3)
def add_doris_backend(params):
"""
add_doris_backend
# TODO the function is not appropriate
:return:
"""
doris_fe_hostname = params.doris_fe_hostname[0]
doris_root_password = params.doris_fe_root_password
doris_fe_query_port = params.doris_fe_query_port
doris_be_heartbeat_service_port = params.doris_be_heartbeat_service_port
if None != params.doris_be_hostname:
for be_host in params.doris_be_hostname:
cmd = format("mysql -uroot -p{doris_root_password} -h {doris_fe_hostname} -P {doris_fe_query_port} "
"-e \"ALTER SYSTEM ADD BACKEND \'{be_host}:{doris_be_heartbeat_service_port}\' \"")
Logger.info("Starting Doris FE Server, commonds is {0}.".format(cmd))
Execute(cmd, user=params.default_user, logoutput=True, tries=5, try_sleep=5)
def add_frontend(fe_role, params):
"""
add_frontend
:return:
"""
# TODO the function is not appropriate
# Before add backend change root password, This is not appropriate.
change_root_passowrd(params)
# add doris fe
doris_fe_hostname = params.doris_fe_hostname[0]
doris_fe_observer_hostname = params.doris_fe_observer_hostname
doris_root_password = params.doris_fe_root_password
doris_fe_query_port = params.doris_fe_query_port
doris_fe_edit_log_port = params.doris_fe_edit_log_port
if (len(params.doris_fe_hostname) >= 1) and (fe_role == 'FOLLOWER'):
for fe_host in params.doris_fe_hostname:
if fe_host != doris_fe_hostname:
cmd = format("mysql -uroot -p{doris_root_password} -h {doris_fe_hostname} -P {doris_fe_query_port} "
"-e \"ALTER SYSTEM ADD {fe_role} \'{fe_host}:{doris_fe_edit_log_port}\' \"")
Logger.info("Adding Doris FE Follower Server, commonds is {0}.".format(cmd))
Execute(cmd, user=params.default_user, logoutput=True, tries=5, try_sleep=5)
if (len(params.doris_fe_observer_hostname) >= 1) and (fe_role == 'OBSERVER'):
for fe_observer in params.doris_fe_observer_hostname:
cmd = format("mysql -uroot -p{doris_root_password} -h {doris_fe_hostname} -P {doris_fe_query_port} "
"-e \"ALTER SYSTEM ADD {fe_role} \'{fe_observer}:{doris_fe_edit_log_port}\' \"")
Logger.info("Adding Doris FE Follower Server, commonds is {0}.".format(cmd))
Execute(cmd, user=params.default_user, logoutput=True, tries=5, try_sleep=5)
def fe_init_start(fe_role,params):
"""
the first start follower and observer fe
:return:
"""
cmd = None
doris_fe_hostname = params.doris_fe_hostname[0]
doris_fe_edit_log_port = params.doris_fe_edit_log_port
# stop it first begin start
# if os.path.exists(params.doris_fe_pid_file):
# self.stop()
# if doris_fe is follower and observer,add them
if (fe_role == 'FOLLOWER') or (fe_role == 'OBSERVER'):
cmd = format("cd {doris_fe_bin_path};"
"sh start_fe.sh --helper {doris_fe_hostname}:{doris_fe_edit_log_port} --daemon")
else:
cmd = format("cd {doris_fe_bin_path}; "
"sh start_fe.sh --daemon")
Logger.info("Starting Doris FE Server, commonds is {0}.".format(cmd))
Execute(cmd, user=params.default_user, logoutput=True)
def wait_fe_started(params):
"""
check if master fe is started.
waiting 36 * 5 sec
:param params:
:return:
"""
started = False
result = ''
interval = 5
times = 36
cmd = format("grep 'success on {doris_fe_query_port}' {doris_fe_sys_log_dir}/fe.log")
for go in range(times):
if started:
Logger.info("Doris FE Master Server started, {0}.".format(result.read()))
break
else:
time.sleep(interval)
Logger.info("Waiting Doris FE Master Server start, waiting time:{0}.".format( go * 5 ))
result = os.popen(cmd)
if (result.read() != ''):
started = True
| 39.913793 | 120 | 0.656731 | 935 | 6,945 | 4.587166 | 0.161497 | 0.089765 | 0.054558 | 0.044766 | 0.539753 | 0.498951 | 0.459781 | 0.43903 | 0.420844 | 0.420844 | 0 | 0.006772 | 0.234557 | 6,945 | 173 | 121 | 40.144509 | 0.800038 | 0.100648 | 0 | 0.308411 | 0 | 0 | 0.246629 | 0.08221 | 0 | 0 | 0 | 0.017341 | 0 | 1 | 0.074766 | false | 0.149533 | 0.056075 | 0 | 0.140187 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
2526b1b5faba17fda86ed66641ca885dd78c5a16 | 1,306 | py | Python | cvstudio/vo/dataset_vo.py | haruiz/PytorchCvStudio | ccf79dd0cc0d61f3fd01b1b5d96f7cda7b681eef | [
"MIT"
] | 32 | 2019-10-31T03:10:52.000Z | 2020-12-23T11:50:53.000Z | cvstudio/vo/dataset_vo.py | haruiz/CvStudio | ccf79dd0cc0d61f3fd01b1b5d96f7cda7b681eef | [
"MIT"
] | 19 | 2019-10-31T15:06:05.000Z | 2020-06-15T02:21:55.000Z | cvstudio/vo/dataset_vo.py | haruiz/PytorchCvStudio | ccf79dd0cc0d61f3fd01b1b5d96f7cda7b681eef | [
"MIT"
] | 8 | 2019-10-31T03:32:50.000Z | 2020-07-17T20:47:37.000Z | class DatasetVO:
def __init__(self):
self._id = None
self._name = ""
self._folder = ""
self._description = ""
self._data_type = ""
self._size = 0
self._count = 0
@property
def count(self):
return self._count
@count.setter
def count(self, value):
if self._size and self._size > 0:
self._count = value
else:
self._count = 0
@property
def size(self):
return self._size
@size.setter
def size(self, value):
self._size = value
@property
def folder(self):
return self._folder
@folder.setter
def folder(self, value):
self._folder = value
@property
def id(self):
return self._id
@id.setter
def id(self, value):
self._id = value
@property
def name(self):
return self._name
@name.setter
def name(self, value):
self._name = value
@property
def description(self):
return self._description
@description.setter
def description(self, value):
self._description = value
@property
def data_type(self):
return self._data_type
@data_type.setter
def data_type(self, value):
self._data_type = value
| 18.927536 | 41 | 0.561256 | 151 | 1,306 | 4.629139 | 0.145695 | 0.110157 | 0.1402 | 0.037196 | 0.098712 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004667 | 0.343798 | 1,306 | 68 | 42 | 19.205882 | 0.810968 | 0 | 0 | 0.166667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.277778 | false | 0 | 0 | 0.12963 | 0.425926 | 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 |
252a5c1d8bcfbd783e04bca7818cfd80198a0f37 | 1,345 | py | Python | Tkinter/Attributes.py | architnagpal001/Tkinter-Full-Course- | 60845b0a62c3181b491b4d7a44ed86bc31afd2d0 | [
"MIT"
] | null | null | null | Tkinter/Attributes.py | architnagpal001/Tkinter-Full-Course- | 60845b0a62c3181b491b4d7a44ed86bc31afd2d0 | [
"MIT"
] | null | null | null | Tkinter/Attributes.py | architnagpal001/Tkinter-Full-Course- | 60845b0a62c3181b491b4d7a44ed86bc31afd2d0 | [
"MIT"
] | null | null | null | from tkinter import *
root = Tk()
root.geometry("425x255")
root.title("Archit's GUI")
# Important label options
# text - adds the Text
# bd - background
# fg - foreground
# font - sets the font
# padx - x padding
# pady - y padding
# relef - border styling - SUNKEN, RAISED, GROOVE, RIDGE
title_label = Label(text= '''Abdul Rashid Salim Salman Khan
(pronounced [səlˈmaːn xaːn] (About this soundlisten); 27 December 1965)[4] is an Indian actor, producer, singer, painter[5] and television personality who works in Hindi films. In a film career spanning over thirty years, Khan has
received numerous awards, including two National Film Awards as a film producer, and two Filmfare Awards for acting.[6] He is cited in the media as one of the most commercially successful actors of Indian cinema.[7][8] Forbes
included him in their 2015 list of Top-Paid 100 Celebrity Entertainers in the world; Khan tied with Amitabh Bachchan for No.
71 on the list, both with earnings of $33.5 million.[9][10] According to the Forbes 2018 list of Top-Paid 100 Celebrity Entertainers in world, Khan was the highest-ranked Indian with 82nd rank with earnings of $37.7 million.[11][12]
He is also known as the host of the reality show, Bigg Boss since 2010''',bg = "red", fg="yellow")
title_label.pack()
root.mainloop() | 51.730769 | 234 | 0.730855 | 215 | 1,345 | 4.562791 | 0.683721 | 0.020387 | 0.018349 | 0.026504 | 0.079511 | 0.079511 | 0.079511 | 0.079511 | 0 | 0 | 0 | 0.04775 | 0.190335 | 1,345 | 26 | 235 | 51.730769 | 0.853076 | 0.143494 | 0 | 0 | 0 | 0.333333 | 0.852547 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.083333 | 0 | 0.083333 | 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 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
25450f18bc54937b9e8d7dafb617133e8a1f90a8 | 6,838 | py | Python | phigaro/const.py | bobeobibo/phigaro | 342a3454bb5324426b25feb4a4d1f640b58bf8f8 | [
"MIT"
] | 31 | 2019-03-06T14:33:37.000Z | 2022-03-08T07:16:07.000Z | phigaro/const.py | bobeobibo/phigaro | 342a3454bb5324426b25feb4a4d1f640b58bf8f8 | [
"MIT"
] | 27 | 2019-05-17T05:06:58.000Z | 2022-03-27T00:38:56.000Z | phigaro/const.py | bobeobibo/phigaro | 342a3454bb5324426b25feb4a4d1f640b58bf8f8 | [
"MIT"
] | 12 | 2017-08-23T12:48:38.000Z | 2021-06-24T00:57:22.000Z | DEFAULT_WINDOW_SIZE = 32
DEFAULT_THRESHOLD_MIN_BASIC = 45.39
DEFAULT_THRESHOLD_MAX_BASIC = 46.0
DEFAULT_THRESHOLD_MIN_ABS = 50.32
DEFAULT_THRESHOLD_MAX_ABS = 52.96
DEFAULT_THRESHOLD_MIN_WITHOUT_GC = 11.28
DEFAULT_THRESHOLD_MAX_WITHOUT_GC = 11.42
DEFAULT_MEAN_GC = 0.46354823199323626
DEFAULT_MAX_EVALUE = 0.00445
DEFAULT_PENALTY_BLACK = 2.2
DEFAULT_PENALTY_WHITE = 0.7
DEFAULT_BLACK_LIST = [
'VOG0496',
'VOG5264',
'VOG4730',
'VOG5818',
'VOG7281',
'VOG6063',
'VOG6030',
'VOG1710',
'VOG0996',
'VOG4524',
'VOG8021',
'VOG8536',
'VOG2368',
'VOG1850',
'VOG1031',
'VOG0985',
'VOG0274',
'VOG4344',
'VOG1844',
'VOG0088',
'VOG8607',
'VOG4615',
'VOG8992',
'VOG3235',
'VOG0092',
'VOG4155',
'VOG3532',
'VOG1045',
'VOG4149',
'VOG8062',
'VOG4562',
'VOG7442',
'VOG7446',
'VOG0419',
'VOG4319',
'VOG8429',
'VOG4409',
'VOG1422',
'VOG10018',
'VOG3101',
'VOG5441',
'VOG4469',
'VOG6988',
'VOG4678',
'VOG3722',
]
DEFAULT_WHITE_LIST = [
"VOG0568",
"VOG0569",
"VOG0565",
"VOG0566",
"VOG0567",
"VOG0562",
"VOG2703",
"VOG0968",
"VOG0700",
"VOG0701",
"VOG0703",
"VOG0704",
"VOG8223",
"VOG9502",
"VOG5046",
"VOG5260",
"VOG4643",
"VOG4645",
"VOG4647",
"VOG9348",
"VOG3606",
"VOG9762",
"VOG4736",
"VOG3424",
"VOG9962",
"VOG8568",
"VOG7616",
"VOG7615",
"VOG6418",
"VOG7437",
"VOG10916",
"VOG6520",
"VOG9667",
"VOG0825",
"VOG0824",
"VOG0827",
"VOG0559",
"VOG0557",
"VOG2779",
"VOG4545",
"VOG0953",
"VOG1159",
"VOG0602",
"VOG5254",
"VOG0044",
"VOG4652",
"VOG4659",
"VOG3309",
"VOG4438",
"VOG2545",
"VOG10850",
"VOG1942",
"VOG1319",
"VOG3891",
"VOG3890",
"VOG2388",
"VOG3892",
"VOG3894",
"VOG3897",
"VOG2166",
"VOG1837",
"VOG0541",
"VOG0947",
"VOG0945",
"VOG0723",
"VOG0720",
"VOG0727",
"VOG0724",
"VOG0725",
"VOG0837",
"VOG0835",
"VOG0832",
"VOG0833",
"VOG0830",
"VOG0831",
"VOG0838",
"VOG0839",
"VOG0618",
"VOG0614",
"VOG0615",
"VOG5060",
"VOG0583",
"VOG0051",
"VOG0054",
"VOG5660",
"VOG4829",
"VOG4828",
"VOG4820",
"VOG8497",
"VOG0588",
"VOG3622",
"VOG3396",
"VOG4757",
"VOG3401",
"VOG3406",
"VOG3409",
"VOG2119",
"VOG1956",
"VOG0536",
"VOG0534",
"VOG0539",
"VOG0283",
"VOG0843",
"VOG0842",
"VOG0847",
"VOG0848",
"VOG0198",
"VOG0195",
"VOG10933",
"VOG9374",
"VOG4630",
"VOG4632",
"VOG4633",
"VOG4634",
"VOG10054",
"VOG10059",
"VOG5621",
"VOG8445",
"VOG6866",
"VOG0524",
"VOG0526",
"VOG6440",
"VOG0840",
"VOG0298",
"VOG0299",
"VOG0292",
"VOG0296",
"VOG0850",
"VOG0855",
"VOG0186",
"VOG0181",
"VOG0189",
"VOG9547",
"VOG0275",
"VOG5357",
"VOG10608",
"VOG5734",
"VOG4609",
"VOG4606",
"VOG4600",
"VOG4602",
"VOG3379",
"VOG4171",
"VOG4994",
"VOG4999",
"VOG8520",
"VOG4771",
"VOG4772",
"VOG8855",
"VOG6876",
"VOG0519",
"VOG0518",
"VOG0514",
"VOG2644",
"VOG0641",
"VOG5994",
"VOG4618",
"VOG4619",
"VOG4612",
"VOG3699",
"VOG9474",
"VOG4986",
"VOG7882",
"VOG4763",
"VOG2341",
"VOG10969",
"VOG2124",
"VOG2125",
"VOG6600",
"VOG1900",
"VOG2015",
"VOG0650",
"VOG0651",
"VOG0655",
"VOG5023",
"VOG5027",
"VOG10898",
"VOG0254",
"VOG1309",
"VOG9583",
"VOG8509",
"VOG4573",
"VOG4572",
"VOG0952",
"VOG4888",
"VOG4799",
"VOG2337",
"VOG2336",
"VOG2339",
"VOG2338",
"VOG7693",
"VOG1912",
"VOG1915",
"VOG1047",
"VOG1049",
"VOG2790",
"VOG2793",
"VOG2086",
"VOG2795",
"VOG2794",
"VOG0790",
"VOG0796",
"VOG0799",
"VOG0221",
"VOG0227",
"VOG0226",
"VOG4364",
"VOG4361",
"VOG9227",
"VOG5942",
"VOG4563",
"VOG4564",
"VOG4565",
"VOG4566",
"VOG4567",
"VOG4568",
"VOG4890",
"VOG3327",
"VOG3328",
"VOG6138",
"VOG7440",
"VOG7686",
"VOG6001",
"VOG2788",
"VOG0800",
"VOG1320",
"VOG1329",
"VOG9609",
"VOG9857",
"VOG4555",
"VOG4557",
"VOG4556",
"VOG4550",
"VOG4553",
"VOG4552",
"VOG3798",
"VOG8306",
"VOG7238",
"VOG6545",
"VOG6495",
"VOG0939",
"VOG4559",
"VOG1887",
"VOG5029",
"VOG5092",
"VOG5096",
"VOG5095",
"VOG0753",
"VOG1333",
"VOG4544",
"VOG2791",
"VOG3498",
"VOG10343",
"VOG3304",
"VOG3652",
"VOG3651",
"VOG3477",
"VOG3478",
"VOG8337",
"VOG8336",
"VOG10230",
"VOG0251",
"VOG6153",
"VOG6154",
"VOG1433",
"VOG0327",
"VOG0322",
"VOG0321",
"VOG6203",
"VOG0528",
"VOG5084",
"VOG4672",
"VOG1348",
"VOG9470",
"VOG0696",
"VOG0697",
"VOG0695",
"VOG0692",
"VOG0691",
"VOG0698",
"VOG0107",
"VOG4684",
"VOG9305",
"VOG4593",
"VOG4596",
"VOG4599",
"VOG4598",
"VOG4845",
"VOG4841",
"VOG3480",
"VOG3648",
"VOG3649",
"VOG3644",
"VOG3313",
"VOG3461",
"VOG3462",
"VOG3468",
"VOG8923",
"VOG10227",
"VOG7569",
"VOG0356",
"VOG0355",
"VOG1350",
"VOG1352",
"VOG1353",
"VOG1356",
"VOG5155",
"VOG4693",
"VOG4690",
"VOG4691",
"VOG4694",
"VOG4699",
"VOG2165",
"VOG2163",
"VOG9315",
"VOG9317",
"VOG4589",
"VOG4586",
"VOG4581",
"VOG8134",
"VOG8354",
"VOG2215",
"VOG3298",
"VOG11077",
"VOG1637",
"VOG1638",
"VOG7483",
"VOG2186",
"VOG2188",
"VOG1183",
"VOG0582",
"VOG1298",
"VOG0584",
"VOG0585",
"VOG1563",
"VOG0901",
"VOG0764",
"VOG0765",
"VOG5443",
"VOG0010",
"VOG4002",
"VOG4005",
"VOG4862",
"VOG4865",
"VOG5996",
"VOG4716",
"VOG4713",
"VOG4711",
"VOG8340",
"VOG8904",
"VOG3287",
"VOG4605",
"VOG6163",
"VOG2154",
"VOG2153",
"VOG6181",
"VOG0801",
"VOG0577",
"VOG0574",
"VOG0573",
"VOG0572",
"VOG0571",
"VOG0977",
"VOG0976",
"VOG0152",
"VOG0397",
"VOG0204",
"VOG0021",
"VOG0025",
"VOG0026",
"VOG3616",
"VOG4705",
"VOG4701",
"VOG3434",
"VOG2792",
"VOG3721",
"VOG3549",
"VOG2142",
"VOG10904",
"VOG2149",
"VOG2096",
"VOG9438",
]
| 15.435666 | 40 | 0.490494 | 495 | 6,838 | 6.707071 | 0.925253 | 0.028916 | 0.017169 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.380738 | 0.318222 | 6,838 | 442 | 41 | 15.470588 | 0.331403 | 0 | 0 | 0 | 0 | 0 | 0.439164 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
2557ceee6ba59bf8583b38eb1e461a179e7f3a54 | 400 | py | Python | pynubank/__init__.py | danizord/pynubank | 66633a6abcc338ac026def2ce3011a401d6d9c2e | [
"MIT"
] | 744 | 2017-06-20T23:14:59.000Z | 2022-03-28T05:48:38.000Z | pynubank/__init__.py | danizord/pynubank | 66633a6abcc338ac026def2ce3011a401d6d9c2e | [
"MIT"
] | 283 | 2017-06-22T18:10:53.000Z | 2022-03-24T18:14:30.000Z | pynubank/__init__.py | danizord/pynubank | 66633a6abcc338ac026def2ce3011a401d6d9c2e | [
"MIT"
] | 165 | 2017-06-21T05:13:26.000Z | 2022-03-24T17:04:37.000Z | from .exception import NuRequestException, NuException
from .nubank import Nubank
from .utils.mock_http import MockHttpClient
from .utils.http import HttpClient
from .utils.discovery import DISCOVERY_URL
def is_alive(client: HttpClient = None) -> bool:
if client is None:
client = HttpClient()
response = client.raw_get(DISCOVERY_URL)
return response.status_code in [200, 201]
| 28.571429 | 54 | 0.765 | 52 | 400 | 5.769231 | 0.557692 | 0.09 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.017964 | 0.165 | 400 | 13 | 55 | 30.769231 | 0.88024 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.1 | false | 0 | 0.5 | 0 | 0.7 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
255dd941037ae34ec382e729f0a8368af18c2c73 | 308 | py | Python | platform/hwconf_data/zgm13/modules/EMU/EMU_behavior.py | lenloe1/v2.7 | 9ac9c4a7bb37987af382c80647f42d84db5f2e1d | [
"Zlib"
] | null | null | null | platform/hwconf_data/zgm13/modules/EMU/EMU_behavior.py | lenloe1/v2.7 | 9ac9c4a7bb37987af382c80647f42d84db5f2e1d | [
"Zlib"
] | 1 | 2020-08-25T02:36:22.000Z | 2020-08-25T02:36:22.000Z | platform/hwconf_data/zgm13/modules/EMU/EMU_behavior.py | lenloe1/v2.7 | 9ac9c4a7bb37987af382c80647f42d84db5f2e1d | [
"Zlib"
] | 1 | 2020-08-25T01:56:04.000Z | 2020-08-25T01:56:04.000Z | from . import ExporterModel
from . import EMU_model
from . import RuntimeModel
class EMU(ExporterModel.Module):
def __init__(self, name=None):
if not name:
name = self.__class__.__name__
super(EMU, self).__init__(name, visible=True, core=True)
self.model = EMU_model | 28 | 64 | 0.678571 | 39 | 308 | 4.897436 | 0.487179 | 0.157068 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.230519 | 308 | 11 | 65 | 28 | 0.805907 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
255fed88de4b207e1a852e07bf62cf46b720836c | 431 | py | Python | handlers/__init__.py | MelomanCool/telegram-stickers | 62ee6e5c89bf6793a6d64ec0865b6f79582b3974 | [
"MIT"
] | null | null | null | handlers/__init__.py | MelomanCool/telegram-stickers | 62ee6e5c89bf6793a6d64ec0865b6f79582b3974 | [
"MIT"
] | 7 | 2017-12-18T20:07:57.000Z | 2021-06-21T13:50:30.000Z | handlers/__init__.py | MelomanCool/telegram-stickers | 62ee6e5c89bf6793a6d64ec0865b6f79582b3974 | [
"MIT"
] | null | null | null | from ._help import help_
from ._conversation import conversation
from ._sticker import sticker_handler as sticker
from ._inline import inlinequery, chosen_inline_result
from ._add_tags import add_tags
from ._delete_tag import delete_tag
from ._delete import delete
from ._get_by_id import get_by_id
from ._my import my
from ._info import info
from ._admin_delete_tag import admin_delete_tag
from ._admin_delete import admin_delete
| 33.153846 | 54 | 0.851508 | 68 | 431 | 4.955882 | 0.308824 | 0.106825 | 0.089021 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.118329 | 431 | 12 | 55 | 35.916667 | 0.886842 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
2562a3f1ff690e914ab916dff7612653bc35e5c3 | 3,348 | py | Python | restfulpy/principal.py | Carrene/restfulpy | 21472af0415fffc23f8003b6074afc2de2e0b414 | [
"MIT"
] | 25 | 2017-06-19T10:01:36.000Z | 2019-08-03T10:35:41.000Z | restfulpy/principal.py | Carrene/restfulpy | 21472af0415fffc23f8003b6074afc2de2e0b414 | [
"MIT"
] | 209 | 2017-09-27T11:59:29.000Z | 2019-08-10T11:10:48.000Z | restfulpy/principal.py | Carrene/restfulpy | 21472af0415fffc23f8003b6074afc2de2e0b414 | [
"MIT"
] | 16 | 2017-11-22T15:44:31.000Z | 2019-04-14T12:29:34.000Z | from itsdangerous import TimedJSONWebSignatureSerializer, \
JSONWebSignatureSerializer
from nanohttp import settings, context, HTTPForbidden
class BaseJWTPrincipal:
def __init__(self, payload):
self.payload = payload
@classmethod
def create_serializer(cls, force=False, max_age=None):
config = cls.get_config()
if force:
return JSONWebSignatureSerializer(
config['secret'],
algorithm_name=config['algorithm']
)
else:
return TimedJSONWebSignatureSerializer(
config['secret'],
expires_in=max_age or config['max_age'],
algorithm_name=config['algorithm']
)
def dump(self, max_age=None):
return self.create_serializer(max_age=max_age).dumps(self.payload)
@classmethod
def load(cls, encoded, force=False):
if encoded.startswith('Bearer '):
encoded = encoded[7:]
payload = cls.create_serializer(force=force).loads(encoded)
return cls(payload)
@classmethod
def get_config(cls):
raise NotImplementedError()
class JWTPrincipal(BaseJWTPrincipal):
def is_in_roles(self, *roles):
if 'roles' in self.payload:
if set(self.payload['roles']).intersection(roles):
return True
return False
def assert_roles(self, *roles):
"""
.. versionadded:: 0.29
:param roles:
:return:
"""
if roles and not self.is_in_roles(*roles):
raise HTTPForbidden()
@property
def email(self):
return self.payload.get('email')
@property
def session_id(self):
return self.payload.get('sessionId')
@property
def id(self):
return self.payload.get('id')
@property
def roles(self):
return self.payload.get('roles', [])
@classmethod
def get_config(cls):
"""
Warning! Returned value is a dict, so it's mutable. If you modify this
value, default config of the whole project will be changed and it may
cause unpredictable problems.
"""
return settings.jwt
class JWTRefreshToken:
def __init__(self, payload):
self.payload = payload
@classmethod
def create_serializer(cls):
return TimedJSONWebSignatureSerializer(
settings.jwt.refresh_token.secret,
expires_in=settings.jwt.refresh_token.max_age,
algorithm_name=settings.jwt.refresh_token.algorithm
)
def dump(self):
return self.create_serializer().dumps(self.payload)
@classmethod
def load(cls, encoded):
payload = cls.create_serializer().loads(encoded)
return cls(payload)
@property
def id(self):
return self.payload.get('id')
class DummyIdentity(JWTPrincipal):
def __init__(self, *roles):
super().__init__({'roles': list(roles)})
class ImpersonateAs:
backup_identity = None
def __init__(self, principal):
self.principal = principal
def __enter__(self):
if hasattr(context, 'identity'):
self.backup_identity = context.identity
context.identity = self.principal
def __exit__(self, exc_type, exc_val, exc_tb):
context.identity = self.backup_identity
| 26.362205 | 78 | 0.623656 | 355 | 3,348 | 5.701408 | 0.295775 | 0.070652 | 0.041502 | 0.051877 | 0.272727 | 0.163043 | 0.150198 | 0.150198 | 0.106719 | 0.068182 | 0 | 0.001659 | 0.279869 | 3,348 | 126 | 79 | 26.571429 | 0.837827 | 0.064815 | 0 | 0.333333 | 0 | 0 | 0.029489 | 0 | 0 | 0 | 0 | 0 | 0.011494 | 1 | 0.241379 | false | 0 | 0.022989 | 0.091954 | 0.505747 | 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 |
256b6ae4e1548cae49133d683b250e369197ae34 | 326 | py | Python | products/management/commands/clear_products.py | kedmenec/commerce_api | a12c552d06a71f6e92124862664608252cee729c | [
"MIT"
] | null | null | null | products/management/commands/clear_products.py | kedmenec/commerce_api | a12c552d06a71f6e92124862664608252cee729c | [
"MIT"
] | null | null | null | products/management/commands/clear_products.py | kedmenec/commerce_api | a12c552d06a71f6e92124862664608252cee729c | [
"MIT"
] | null | null | null | from django.core.management.base import BaseCommand
from products.models import Product
class Command(BaseCommand):
help = 'Clear all entries from the Product table'
def _delete_all_products(self):
Product.objects.all().delete()
def handle(self, *args, **options):
self._delete_all_products() | 23.285714 | 53 | 0.720859 | 41 | 326 | 5.585366 | 0.609756 | 0.078603 | 0.148472 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.184049 | 326 | 14 | 54 | 23.285714 | 0.860902 | 0 | 0 | 0 | 0 | 0 | 0.122324 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0 | 0.75 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
256bee042468f91711be16d1cef6c1963ecdea8e | 2,422 | py | Python | robot_teleop_joy/nodes/robot_teleop_joy.py | open-robot/open-robot | f23c5f2990df04815ed258e15973474901bb2805 | [
"BSD-2-Clause"
] | 58 | 2016-07-11T04:11:15.000Z | 2022-02-16T00:46:43.000Z | robot_teleop_joy/nodes/robot_teleop_joy.py | open-robot/open-robot | f23c5f2990df04815ed258e15973474901bb2805 | [
"BSD-2-Clause"
] | null | null | null | robot_teleop_joy/nodes/robot_teleop_joy.py | open-robot/open-robot | f23c5f2990df04815ed258e15973474901bb2805 | [
"BSD-2-Clause"
] | 37 | 2016-07-11T04:11:25.000Z | 2021-03-04T06:54:11.000Z | #!/usr/bin/env python
import thread
import rospy
from sensor_msgs.msg import Joy
from geometry_msgs.msg import Twist
from geometry_msgs.msg import PoseWithCovarianceStamped
twist = Twist()
pub = rospy.Publisher("cmd_vel", Twist, queue_size=10)
joystick_ready = False
lock_v = False
def initial_pose_reset():
pose_pub = rospy.Publisher('/initialpose', PoseWithCovarianceStamped, queue_size=10)
pose = PoseWithCovarianceStamped()
pose.header.frame_id = "map"
pose.pose.pose.position.x=0
pose.pose.pose.position.y=0
pose.pose.pose.position.z=0
pose.pose.covariance=[0.25, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.25, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.06853891945200942]
pose.pose.pose.orientation.z=0.0267568523876
pose.pose.pose.orientation.w=0.999641971333
rospy.loginfo(pose)
pose_pub.publish(pose)
#rospy.spin()
def cmd_vel_puber():
global twist
global joystick_ready
rate = rospy.Rate(1)
while not rospy.is_shutdown():
if joystick_ready:
pub.publish(twist)
print "x: %s, y: %s, za: %s" %(twist.linear.x,
twist.linear.y,
twist.angular.z)
rate.sleep()
def joy_cb(joy_data):
global joystick_ready
global twist
print joy_data
global lock_v
# start with menu button
if joy_data.buttons[11] == 1:
joystick_ready = not joystick_ready
# reset to home with return button
if joy_data.buttons[10] == 1:
initial_pose_reset()
if not joystick_ready:
return
if joy_data.buttons[0] == 1:
lock_v = not lock_v
if lock_v :
print "speed locked"
y_axes = 0.0
x_axes = 0.2
else:
print "speed unlocked"
x_axes = joy_data.axes[1]*0.8
y_axes = joy_data.axes[0]*0.8
if joy_data.axes[6] != 1:
z = (joy_data.axes[6] -1 ) *2
else:
z = (1-joy_data.axes[7]) *2
twist.linear.x = x_axes
twist.linear.y = y_axes
twist.angular.z = z
pub.publish(twist)
def subscriber():
rospy.Subscriber("joy", Joy, joy_cb)
rospy.spin()
if __name__ == '__main__':
rospy.init_node("joystick", anonymous=True)
thread.start_new_thread(cmd_vel_puber,())
subscriber()
| 24.969072 | 223 | 0.607349 | 382 | 2,422 | 3.696335 | 0.246073 | 0.096317 | 0.135977 | 0.175637 | 0.166431 | 0.0517 | 0.0517 | 0.0517 | 0.0517 | 0.0517 | 0 | 0.084641 | 0.263419 | 2,422 | 96 | 224 | 25.229167 | 0.706839 | 0.036334 | 0 | 0.117647 | 0 | 0 | 0.037355 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.073529 | null | null | 0.058824 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
c251fb3a13e54396bedec99174f04ff0771a63fd | 187 | py | Python | augeo/settings/components/django-suit.py | plankter/augeo-cloud | e7ee40a6a94649b3e675e12ad3d1b1587b25e51c | [
"MIT"
] | 1 | 2016-05-07T06:15:33.000Z | 2016-05-07T06:15:33.000Z | augeo/settings/components/django-suit.py | plankter/augeo-cloud | e7ee40a6a94649b3e675e12ad3d1b1587b25e51c | [
"MIT"
] | null | null | null | augeo/settings/components/django-suit.py | plankter/augeo-cloud | e7ee40a6a94649b3e675e12ad3d1b1587b25e51c | [
"MIT"
] | null | null | null | # See: http://django-suit.readthedocs.org/en/develop/
SUIT_CONFIG = {
# header
'ADMIN_NAME': 'Augeo',
# 'HEADER_DATE_FORMAT': 'l, j. F Y',
# 'HEADER_TIME_FORMAT': 'H:i',
} | 26.714286 | 53 | 0.609626 | 26 | 187 | 4.153846 | 0.846154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.187166 | 187 | 7 | 54 | 26.714286 | 0.710526 | 0.652406 | 0 | 0 | 0 | 0 | 0.245902 | 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 |
c27f310d3b63ce919cf0f284267a7206e3be1914 | 3,909 | py | Python | ServiceMod.py | menikhilpandey/RepIgnite | bf3c7d554f3bf74bfe9c7f13c74da050c4101d05 | [
"Apache-2.0"
] | null | null | null | ServiceMod.py | menikhilpandey/RepIgnite | bf3c7d554f3bf74bfe9c7f13c74da050c4101d05 | [
"Apache-2.0"
] | null | null | null | ServiceMod.py | menikhilpandey/RepIgnite | bf3c7d554f3bf74bfe9c7f13c74da050c4101d05 | [
"Apache-2.0"
] | null | null | null | import easygui
# TODO: In next version use easygui.multenterbox instead of independent enterbox
class Service:
def __init__(self):
self.employerName = easygui.enterbox(msg="Enter Name of Employer", title="Service Visit Inputs")
self.employerAddr = easygui.enterbox(msg="Enter Address of Employer", title="Service Visit Inputs")
self.dateOfJoining = easygui.enterbox(msg="Enter Date of Joining (dd/mm/yyyy)", title="Service Visit Inputs")
self.dateOfCnfrmtn = easygui.enterbox(msg="Enter Date of Confirmation (dd/mm/yyyy)",
title="Service Visit Inputs")
self.phnNo = easygui.enterbox(msg="Enter Mobile Phone Number", title="Service Visit Inputs")
self.telNo = easygui.enterbox(msg="Enter Telephone Number", title="Service Visit Inputs")
self.desig = easygui.enterbox(msg="Enter Designation of Applicant", title="Service Visit Inputs")
self.nameVerif = easygui.boolbox(msg="Was Name of Applicant Verified on Visit?",
title="Service Visit Inputs")
self.addrVerif = easygui.boolbox(msg="Was Address of Applicant's Office Verified on Visit?",
title="Service Visit Inputs")
self.desigVerif = easygui.boolbox(msg="Was Designation of Applicant Verified on Visit?",
title="Service Visit Inputs")
self.dateofVisit = easygui.enterbox(msg="Enter Date of Visit (dd/mm/yyyy)", title="Service Visit Inputs")
self.timeofVisit = easygui.enterbox(msg="Enter Time of Visit", title="Service Visit Inputs")
self.personContacted = easygui.enterbox(msg="Enter Name of Person Contacted", title="Service Visit Inputs")
self.contactedDesig = easygui.enterbox(msg="Designation of Contacted Person", title="Service Visit Inputs")
self.mobileNo = easygui.enterbox(msg="Enter Mobile Number of Contacted Person", title="Service Visit Inputs")
self.yrsBusiness = easygui.enterbox(msg="Number of Years in Present Employment", title="Service Visit Inputs")
self.visitingCard = easygui.boolbox(msg="Was visiting Card of Contacted Person Obtained?",
title="Service Visit Inputs")
self.busiNature = easygui.enterbox(msg="Enter Nature of Business", title="Service Visit Inputs")
self.applJob = easygui.choicebox(msg="Select Type of Job of Applicant?", title="Service Visit Inputs",
choices=["Permanent", "Probation", "Contract Worker", "Temporary Worker",
"Others"])
self.applWorkingAs = easygui.choicebox(msg="Applicant is working in Organisation as:-",
title="Service Visit Inputs",
choices=["Typist", "Stenographer", "Supervisor", "Junior Management",
"Middle Management", "Senior Management", "Other Management"])
self.tranferable = easygui.boolbox(msg="Is Applicant's Job transferable or not?", title="Service Visit Inputs")
self.salaryVerifierName = easygui.enterbox(msg="Enter Name of Person who verified Salary Details of Applicant",
title="Service Visit Inputs")
self.salaryVerifierDesig = easygui.enterbox(msg="Enter Designation of Person who verified"
" Salary Details of Applicant", title="")
self.boolRecom = easygui.boolbox(msg="Select one of following", title="Service Visit Inputs",
choices=["Recommended", "Not Recommended"])
self.remarks = easygui.enterbox(msg="Enter Any Other Remarks", title="Service Visit Inputs")
| 83.170213 | 119 | 0.618061 | 410 | 3,909 | 5.882927 | 0.273171 | 0.119403 | 0.169154 | 0.228856 | 0.500415 | 0.39262 | 0.262438 | 0.181177 | 0.083748 | 0.043947 | 0 | 0 | 0.284216 | 3,909 | 46 | 120 | 84.978261 | 0.862044 | 0.019954 | 0 | 0.146341 | 0 | 0 | 0.401671 | 0 | 0 | 0 | 0 | 0.021739 | 0 | 1 | 0.02439 | false | 0 | 0.02439 | 0 | 0.073171 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
c28663f33bcd5a38a8d1d9a111f4ce0179a5205b | 1,918 | py | Python | tests/test_util.py | gszabi15/ncoreparser | cd7856a962ac82e31ae840ada77f6c25b2963919 | [
"Apache-2.0"
] | 10 | 2020-09-03T23:17:33.000Z | 2022-03-05T11:37:19.000Z | tests/test_util.py | gszabi15/ncoreparser | cd7856a962ac82e31ae840ada77f6c25b2963919 | [
"Apache-2.0"
] | 12 | 2020-10-29T14:57:13.000Z | 2022-03-17T00:44:09.000Z | tests/test_util.py | gszabi15/ncoreparser | cd7856a962ac82e31ae840ada77f6c25b2963919 | [
"Apache-2.0"
] | 1 | 2021-11-17T16:32:21.000Z | 2021-11-17T16:32:21.000Z | import pytest
from ncoreparser.util import Size
class TestSize:
@pytest.mark.parametrize("size1, size2", [("1024 MiB", "1 GiB"),
("10 MiB", "10 MiB"),
("2048 KiB", "2 MiB")])
def test_equal(self, size1, size2):
s1 = Size(size1)
s2 = Size(size2)
assert s1 == s2
@pytest.mark.parametrize("size1, size2", [("1023 MiB", "1 GiB"),
("10 MiB", "11 MiB"),
("2049 KiB", "2 MiB")])
def test_not_equal(self, size1, size2):
s1 = Size(size1)
s2 = Size(size2)
assert s1 != s2
@pytest.mark.parametrize("size1, size2", [("1025 MiB", "1 GiB"),
("11 MiB", "10 MiB"),
("2049 KiB", "2 MiB")])
def test_greater_than(self, size1, size2):
s1 = Size(size1)
s2 = Size(size2)
assert s1 > s2
@pytest.mark.parametrize("size1, size2", [("1025 MiB", "1 GiB"),
("10 MiB", "10 MiB"),
("2049 KiB", "2 MiB"),
("2048 KiB", "2 MiB")])
def test_greater_equal(self, size1, size2):
s1 = Size(size1)
s2 = Size(size2)
assert s1 >= s2
@pytest.mark.parametrize("size1, size2, expected", [("1024 MiB", "1 GiB", "2.00 GiB"),
("10 MiB", "11 MiB", "21.00 MiB"),
("2048 KiB", "2 MiB", "4.00 MiB")])
def test_add(self, size1, size2, expected):
s = Size(size1) + Size(size2)
assert str(s) == expected
s = Size(size1)
s += Size(size2)
assert str(s) == expected
| 39.958333 | 91 | 0.40146 | 197 | 1,918 | 3.86802 | 0.208122 | 0.131234 | 0.055118 | 0.170604 | 0.795276 | 0.700787 | 0.611549 | 0.452756 | 0.452756 | 0.452756 | 0 | 0.127762 | 0.457247 | 1,918 | 47 | 92 | 40.808511 | 0.604227 | 0 | 0 | 0.439024 | 0 | 0 | 0.15537 | 0 | 0 | 0 | 0 | 0 | 0.146341 | 1 | 0.121951 | false | 0 | 0.04878 | 0 | 0.195122 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.