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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bed7a7f211ac4ca2170057d5dae27d3248efc33a | 2,198 | py | Python | src/main/python/shabda/data/iterators/internal/data_iterator_base.py | dhiraa/sabdha | f428418962dcc76f49e0a451ffc0545fda9b6b59 | [
"Apache-2.0"
] | 4 | 2018-10-26T07:00:34.000Z | 2020-10-07T01:03:08.000Z | src/main/python/shabda/data/iterators/internal/data_iterator_base.py | dhiraa/sabdha | f428418962dcc76f49e0a451ffc0545fda9b6b59 | [
"Apache-2.0"
] | null | null | null | src/main/python/shabda/data/iterators/internal/data_iterator_base.py | dhiraa/sabdha | f428418962dcc76f49e0a451ffc0545fda9b6b59 | [
"Apache-2.0"
] | 1 | 2018-10-26T07:00:38.000Z | 2018-10-26T07:00:38.000Z | # Copyright 2018 The Shabda Authors. 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.
"""
Iterator that creates features for LSTM based models
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from shabda.hyperparams.hyperparams import HParams
class DataIteratorBase():
"""
"""
def __init__(self, hparams, dataset):
self._hparams = HParams(hparams, default_hparams=self.get_default_params())
self._dataset = dataset
@staticmethod
def get_default_params():
return {"key": "value"}
def _get_train_input_fn(self):
"""
Inheriting class must implement this
:return: callable
"""
raise NotImplementedError
def _get_val_input_fn(self):
"""
Inheriting class must implement this
:return: callable
"""
raise NotImplementedError
def _get_test_input_function(self):
"""
Inheriting class must implement this
:return: callable
"""
raise NotImplementedError
def get_train_input_fn(self):
"""
Returns an data set iterator function that can be used in estimator
:return:
"""
return self._get_train_input_fn()
def get_val_input_fn(self):
"""
Returns an data set iterator function that can be used in estimator
:return:
"""
return self._get_val_input_fn()
def get_test_input_function(self):
"""
Returns an data set iterator function that can be used in estimator
:return:
"""
return self._get_test_input_function()
| 28.179487 | 83 | 0.670155 | 270 | 2,198 | 5.240741 | 0.418519 | 0.029682 | 0.031095 | 0.031802 | 0.404947 | 0.404947 | 0.35689 | 0.35689 | 0.35689 | 0.35689 | 0 | 0.004905 | 0.257962 | 2,198 | 77 | 84 | 28.545455 | 0.862661 | 0.467698 | 0 | 0.130435 | 0 | 0 | 0.008403 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.347826 | false | 0 | 0.173913 | 0.043478 | 0.73913 | 0.043478 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
bed7c4898d58c738f63aa212ff888514735a6694 | 441 | py | Python | app/filters.py | dakhnovskaya/organization | 72fb6f0a2daf03e7f7ce4dfb2cb3c3eaf1c40851 | [
"Apache-2.0"
] | null | null | null | app/filters.py | dakhnovskaya/organization | 72fb6f0a2daf03e7f7ce4dfb2cb3c3eaf1c40851 | [
"Apache-2.0"
] | null | null | null | app/filters.py | dakhnovskaya/organization | 72fb6f0a2daf03e7f7ce4dfb2cb3c3eaf1c40851 | [
"Apache-2.0"
] | null | null | null | import django_filters
from app.models import Company
class CompanyFilter(django_filters.FilterSet):
min_cost = django_filters.NumberFilter(field_name='companyproduct__cost', lookup_expr='gte')
max_cost = django_filters.NumberFilter(field_name='companyproduct__cost', lookup_expr='lte')
class Meta:
model = Company
fields = ('districts', 'products__category', 'name', 'products__name', 'min_cost', 'max_cost')
| 33.923077 | 102 | 0.750567 | 52 | 441 | 5.980769 | 0.519231 | 0.167203 | 0.109325 | 0.186495 | 0.424437 | 0.424437 | 0.424437 | 0.424437 | 0.424437 | 0.424437 | 0 | 0 | 0.138322 | 441 | 12 | 103 | 36.75 | 0.818421 | 0 | 0 | 0 | 0 | 0 | 0.24263 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.75 | 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 |
bef071b99c5638f1355cc9be272ba0f93a6cb31f | 493 | py | Python | iot/models.py | kkishans/IOT_DJANGO | 12a19858f002a8c684e4dbb93868a8859d57615f | [
"MIT"
] | null | null | null | iot/models.py | kkishans/IOT_DJANGO | 12a19858f002a8c684e4dbb93868a8859d57615f | [
"MIT"
] | null | null | null | iot/models.py | kkishans/IOT_DJANGO | 12a19858f002a8c684e4dbb93868a8859d57615f | [
"MIT"
] | null | null | null | from django.db import models
from django import forms
# Create your models here.
class User(models.Model):
username = models.CharField(max_length=30)
password = models.TextField()
email = models.EmailField(unique=True)
objects = models.Manager()
def __str__(self):
return self.username
class Room(models.Model):
room = models.CharField(max_length=30)
email = models.ForeignKey(User,on_delete=models.CASCADE)
class Meta:
db_table = "room"
| 25.947368 | 60 | 0.699797 | 63 | 493 | 5.349206 | 0.571429 | 0.059347 | 0.106825 | 0.142433 | 0.154303 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010152 | 0.200811 | 493 | 18 | 61 | 27.388889 | 0.845178 | 0.048682 | 0 | 0 | 0 | 0 | 0.008565 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.071429 | false | 0.071429 | 0.142857 | 0.071429 | 0.928571 | 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 |
bef59fb3dbc590e868cbbe9ba87904ee2be92c5d | 528 | py | Python | dependencies/generate maps/pythongis/app/tk2/__init__.py | karimbahgat/AutoMap | eae52f16b7ce71cb2b4b7ae67cf6e4680ea2194f | [
"MIT"
] | 4 | 2015-12-05T14:31:55.000Z | 2018-02-09T05:54:36.000Z | dependencies/generate maps/pythongis/app/tk2/__init__.py | karimbahgat/AutoMap | eae52f16b7ce71cb2b4b7ae67cf6e4680ea2194f | [
"MIT"
] | 1 | 2022-01-13T02:52:09.000Z | 2022-01-13T02:52:09.000Z | dependencies/generate maps/pythongis/app/tk2/__init__.py | karimbahgat/AutoMap | eae52f16b7ce71cb2b4b7ae67cf6e4680ea2194f | [
"MIT"
] | 1 | 2018-10-24T01:08:11.000Z | 2018-10-24T01:08:11.000Z | """
Tk2
Tk2 is a convenience library for extending the functionality of Tkinter,
to make it easier and more flexible to create GUI applications.
"""
from .basics import *
from .scrollwidgets import *
from .texteditor import Text, MultiTextSearch
from .variables import *
# Later
from .multiwidgets import *
from .progbar import *
from .ribbon import *
#from orderedlist import *
#from calendar import *
from web import *
from . import filedialog
from . import messagebox
from . import colorchooser
from . import dispatch
| 20.307692 | 73 | 0.767045 | 68 | 528 | 5.955882 | 0.588235 | 0.197531 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004577 | 0.172348 | 528 | 25 | 74 | 21.12 | 0.922197 | 0.371212 | 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 |
beff85e9c6691647f15d3bfe260f151e7cc2041f | 3,275 | py | Python | ally/utils/option.py | rjfranssen/PyAlly | f24d4d449dd0578f52e75365ad0ba69a572d3237 | [
"MIT"
] | 53 | 2019-08-11T20:39:16.000Z | 2022-02-01T02:05:12.000Z | ally/utils/option.py | rjfranssen/PyAlly | f24d4d449dd0578f52e75365ad0ba69a572d3237 | [
"MIT"
] | 53 | 2019-12-11T06:39:59.000Z | 2022-02-13T05:06:44.000Z | ally/utils/option.py | rjfranssen/PyAlly | f24d4d449dd0578f52e75365ad0ba69a572d3237 | [
"MIT"
] | 31 | 2019-10-05T02:28:16.000Z | 2022-02-03T03:41:42.000Z | # MIT License
#
# Copyright (c) 2020 Brett Graves
#
# 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 datetime
import math
from .utils import *
############################################################################
def option_format(symbol="", exp_date="1970-01-01", strike=0, direction=""):
"""Returns the OCC standardized option name.
Args:
symbol: the underlying symbol, case insensitive
exp_date: date of expiration, in string-form.
strike: strike price of the option
direction: 'C' or 'call' or the like, for call, otherwise 'p' or 'Put' for put
Returns:
OCC string, like 'IBM201231C00301000'
.. code-block:: python
# Construct the option's OCC symbol
>>> ibm_call = ally.utils.option_format(
exp_date = '2020-12-31',
symbol = 'IBM', # case insensitive
direction = 'call',
strike = 301
)
>>> ibm_call
'IBM201231C00301000'
"""
if not (
check(symbol) and check(exp_date) and check(str(strike)) and check(direction)
):
return ""
# direction into C or P
direction = "C" if "C" in direction.upper() else "P"
# Pad strike with zeros
def format_strike(strike):
x = str(math.floor(float(strike) * 1000))
return "0" * (8 - len(x)) + x
# Assemble
return (
str(symbol).upper()
+ datetime.datetime.strptime(exp_date, "%Y-%m-%d").strftime("%y%m%d")
+ direction
+ format_strike(strike)
)
def option_strike(name):
"""Pull apart an OCC standardized option name and
retreive the strike price, in integer form"""
return int(name[-8:]) / 1000.0
def option_maturity(name):
"""Given OCC standardized option name,
return the date of maturity"""
return datetime.datetime.strptime(name[-15:-9], "%y%m%d").strftime("%Y-%m-%d")
def option_callput(name):
"""Given OCC standardized option name,
return whether its a call or a put"""
return "call" if name.upper()[-9] == "C" else "put"
def option_symbol(name):
"""Given OCC standardized option name, return option ticker"""
return name[:-15]
| 31.796117 | 90 | 0.635725 | 433 | 3,275 | 4.773672 | 0.397229 | 0.042574 | 0.050798 | 0.060474 | 0.071601 | 0.071601 | 0.071601 | 0 | 0 | 0 | 0 | 0.028317 | 0.245191 | 3,275 | 102 | 91 | 32.107843 | 0.807848 | 0.636336 | 0 | 0 | 0 | 0 | 0.051073 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.230769 | false | 0 | 0.115385 | 0 | 0.615385 | 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 |
8305a58a05e7a9623ae618b46a183f5331e34e3b | 3,207 | py | Python | provision/env/lib/python3.6/site-packages/ansible/plugins/become/dzdo.py | brightkan/tukole-frontend | 45e1d82a4ae5a65e88e7434f67d4d1a88f462e96 | [
"MIT"
] | 1 | 2020-03-29T18:41:01.000Z | 2020-03-29T18:41:01.000Z | ansible/ansible/plugins/become/dzdo.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 7 | 2020-09-07T17:27:56.000Z | 2022-03-02T06:25:46.000Z | ansible/ansible/plugins/become/dzdo.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 1 | 2020-10-30T12:48:24.000Z | 2020-10-30T12:48:24.000Z | # -*- coding: utf-8 -*-
# Copyright: (c) 2018, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = """
become: dzdo
short_description: Centrify's Direct Authorize
description:
- This become plugins allows your remote/login user to execute commands as another user via the dzdo utility.
author: ansible (@core)
version_added: "2.8"
options:
become_user:
description: User you 'become' to execute the task
ini:
- section: privilege_escalation
key: become_user
- section: dzdo_become_plugin
key: user
vars:
- name: ansible_become_user
- name: ansible_dzdo_user
env:
- name: ANSIBLE_BECOME_USER
- name: ANSIBLE_DZDO_USER
become_exe:
description: Sudo executable
default: dzdo
ini:
- section: privilege_escalation
key: become_exe
- section: dzdo_become_plugin
key: executable
vars:
- name: ansible_become_exe
- name: ansible_dzdo_exe
env:
- name: ANSIBLE_BECOME_EXE
- name: ANSIBLE_DZDO_EXE
become_flags:
description: Options to pass to dzdo
default: -H -S -n
ini:
- section: privilege_escalation
key: become_flags
- section: dzdo_become_plugin
key: flags
vars:
- name: ansible_become_flags
- name: ansible_dzdo_flags
env:
- name: ANSIBLE_BECOME_FLAGS
- name: ANSIBLE_DZDO_FLAGS
become_pass:
description: Options to pass to dzdo
required: False
vars:
- name: ansible_become_password
- name: ansible_become_pass
- name: ansible_dzdo_pass
env:
- name: ANSIBLE_BECOME_PASS
- name: ANSIBLE_DZDO_PASS
ini:
- section: dzdo_become_plugin
key: password
"""
from ansible.plugins.become import BecomeBase
class BecomeModule(BecomeBase):
name = 'dzdo'
# messages for detecting prompted password issues
fail = ('Sorry, try again.',)
def build_become_command(self, cmd, shell):
super(BecomeModule, self).build_become_command(cmd, shell)
if not cmd:
return cmd
becomecmd = self.get_option('become_exe') or self.name
flags = self.get_option('become_flags') or ''
if self.get_option('become_pass'):
self._prompt = '[dzdo via ansible, key=%s] password:' % self._id
flags = '%s -p "%s"' % (flags.replace('-n', ''), self._prompt)
user = self.get_option('become_user') or ''
if user:
user = '-u %s' % (user)
return ' '.join([becomecmd, flags, user, self._build_success_command(cmd, shell)])
| 32.72449 | 131 | 0.558154 | 339 | 3,207 | 5.038348 | 0.345133 | 0.109485 | 0.089578 | 0.053864 | 0.350117 | 0.289227 | 0.187354 | 0.187354 | 0 | 0 | 0 | 0.005376 | 0.362021 | 3,207 | 97 | 132 | 33.061856 | 0.829423 | 0.06174 | 0 | 0.256098 | 0 | 0.012195 | 0.731358 | 0.007656 | 0 | 0 | 0 | 0 | 0 | 1 | 0.012195 | false | 0.134146 | 0.02439 | 0 | 0.097561 | 0.012195 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
83080191fabbc152072cd0019bf81fd6f737d375 | 7,129 | py | Python | richardson_extrapolation.py | PrabalChowdhury/CSE330-NUMERICAL-METHODS | aabfea01f4ceaecfbb50d771ee990777d6e1122c | [
"MIT"
] | null | null | null | richardson_extrapolation.py | PrabalChowdhury/CSE330-NUMERICAL-METHODS | aabfea01f4ceaecfbb50d771ee990777d6e1122c | [
"MIT"
] | null | null | null | richardson_extrapolation.py | PrabalChowdhury/CSE330-NUMERICAL-METHODS | aabfea01f4ceaecfbb50d771ee990777d6e1122c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Richardson-Extrapolation.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1oNlSL2Vztk9Fc7tMBgPcL82WGaUuCY-A
Before you turn this problem in, make sure everything runs as expected. First, **restart the kernel** (in the menubar, select Kernel$\rightarrow$Restart) and then **run all cells** (in the menubar, select Cell$\rightarrow$Run All).
Make sure you fill in any place that says `YOUR CODE HERE` or "YOUR ANSWER HERE", as well as your name and collaborators below:
"""
NAME = "Prabal Chowdhury"
COLLABORATORS = ""
"""---
## CSE330 Lab: Richardson Extrapolation
---
## Instructions
Today's assignment is to:
1. Implement Richardson Extrapolation method using Python
## Richardson Extrapolation:
We used central difference method to calculate derivatives of functions last task. In this task we will use Richardson extrapolation to get a more accurate result.
Let,
$$ D_h = \frac{f(x_1+h) -f(x_1-h)}{2h}\tag{5.1}$$
General Taylor Series formula:
$$ f(x) = f(x_1) + f'(x_1)(x - x_1) + \frac{f''(x_1)}{2}(x - x_1)^2+... $$
Using Taylor's theorem to expand we get,
\begin{align}
f(x_1+h) &= f(x_1) + f^{\prime}(x_1)h + \frac{f^{\prime \prime}(x_1)}{2}h^2 + \frac{f^{\prime \prime \prime}(x_1)}{3!}h^3 + \frac{f^{(4)}(x_1)}{4!}h^4 + \frac{f^{(5)}(x_1)}{5!}h^5 + O(h^6)\tag{5.2} \\
f(x_1-h) &= f(x_1) - f^{\prime}(x_1)h + \frac{f^{\prime \prime}(x_1)}{2}h^2 - \frac{f^{\prime \prime \prime}(x_1)}{3!}h^3 + \frac{f^{(4)}(x_1)}{4!}h^4 - \frac{f^{(5)}(x_1)}{5!}h^5 + O(h^6)\tag{5.3}
\end{align}
Subtracting $5.3$ from $5.2$ we get,
$$ f(x_1+h) - f(x_1-h) = 2f^{\prime}(x_1)h + 2\frac{f^{\prime \prime \prime}(x_1)}{3!}h^3 + 2\frac{f^{(5)}(x_1)}{5!}h^5 + O(h^7)\tag{5.4}$$
So,
\begin{align}
D_h &= \frac{f(x_1+h) - f(x_1-h)}{2h} \\
&= \frac{1}{2h} \left( 2f^{\prime}(x_1)h + 2\frac{f^{\prime \prime \prime}(x_1)}{3!}h^3 + 2\frac{f^{(5)}(x_1)}{5!}h^5 + O(h^7) \right) \\
&= f^{\prime}(x_1) + \frac{f^{\prime \prime \prime}(x_1)}{6}h^2 + \frac{f^{(5)}(x_1)}{120}h^4 + O(h^6) \tag{5.5}
\end{align}
We get our derivative $f'(x)$ plus some error terms of order $>= 2$ Now, we want to bring our error order down to 4.
If we use $h, \text{and} \frac{h}{2}$ as step size in $5.5$, we get,
\begin{align}
D_h &= f^{\prime}(x_1) + f^{\prime \prime \prime}(x_1)\frac{h^2}{6} + f^{(5)}(x_1) \frac{h^4}{120} + O(h^6) \tag{5.6} \\
D_{h/2} &= f^{\prime}(x_1) + f^{\prime \prime \prime}(x_1)\frac{h^2}{2^2 . 6} + f^{(5)}(x_1) \frac{h^4}{2^4 . 120} + O(h^6) \tag{5.7}
\end{align}
Multiplying $5.7$ by $4$ and subtracting from $5.6$ we get,
\begin{align}
D_h - 4D_{h/2} &= -3f^{\prime}(x) + f^{(5)}(x_1) \frac{h^4}{160} + O(h^6)\\
\Longrightarrow D^{(1)}_h = \frac{4D_{h/2} - D_h}{3} &= f^{\prime}(x) - f^{(5)}(x_1) \frac{h^4}{480} + O(h^6) \tag{5.8}
\end{align}
Let's calculate the derivative using $5.8$
### 1. Let's import the necessary headers
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from numpy.polynomial import Polynomial
"""### 2. Let's create a function named `dh(f, h, x)`
function `dh(f, h, x)` takes three parameters as input: a function `f`, a value `h`, and a set of values `x`. It returns the derivatives of the function at each elements of array `x` using the Central Difference method. This calculates equation $(5.1)$.
"""
def dh(f, h, x):
'''
Input:
f: np.polynomial.Polynonimial type data.
h: floating point data.
x: np.array type data.
Output:
return np.array type data of slope at each point x.
'''
# --------------------------------------------
return (f(x+h) - f(x-h)) / (2*h)
# --------------------------------------------
"""### 3. Let's create another funtion `dh1(f, h, x)`.
`dh1(f, h, x)` takes the same type of values as `dh(f, h, x)` as input. It calculates the derivative using previously defined `dh(f, h, x)` function and using equation $5.8$ and returns the values.
"""
def dh1(f, h, x):
'''
Input:
f: np.polynomial.Polynonimial type data.
h: floating point data.
x: np.array type data.
Output:
return np.array type data of slope at each point x.
'''
# --------------------------------------------
# YOUR CODE HERE
return (4 * dh(f, h/2, x) - dh(f, h, x)) / 3
# --------------------------------------------
"""### 4. Now let's create the `error(f, hs, x_i)` function
The `error(f, hs, x_i)` function takes a function `f` as input. It also takes a list of different values of h as `hs` and a specific value as `x_i` as input. It calculates the derivatives as point `x_i` using both functions described in **B** and **C**, i.e. `dh` and `dh1`
"""
def error(f, hs, x_i): #Using the functions we wrote dh() my c_diff and dh1() which is my first order c diff, we find the error through appending their diffrences with Y_actual ny f(x)
'''
Input:
f : np.polynomial.Polynonimial type data.
hs : np.array type data. list of h.
x_i: floating point data. single value of x.
Output:
return two np.array type data of errors by two methods..
'''
f_prime = f.deriv(1) #first order derivitive f^1(x)
Y_actual = f_prime(x_i)
diff_error = []
diff2_error = []
for h in hs: #where h is my loop counter iterating through hs
# for each values of hs calculate the error using both methods
# and append those values into diff_error and diff2_error list.
# --------------------------------------------
# YOUR CODE HERE
e1 = Y_actual - dh(f, hs, x_i)
diff_error.append(e1)
e2 = Y_actual - dh1(f, hs, x_i)
diff2_error.append(e2)
# --------------------------------------------
print(pd.DataFrame({"h": hs, "Diff": diff_error, "Diff2": diff2_error}))
return diff_error, diff2_error
"""### 5. Finally let's run some tests
function to draw the actual function
"""
def draw_graph(f, ax, domain=[-10, 10], label=None):
data = f.linspace(domain=domain)
ax.plot(data[0], data[1], label='Function')
"""### Draw the polynomial and it's actual derivative function"""
fig, ax = plt.subplots()
ax.axhline(y=0, color='k')
p = Polynomial([2.0, 1.0, -6.0, -2.0, 2.5, 1.0])
p_prime = p.deriv(1)
draw_graph(p, ax, [-2.4, 1.5], 'Function')
draw_graph(p_prime, ax, [-2.4, 1.5], 'Derivative')
ax.legend()
"""### Draw the actual derivative and richardson derivative using `h=1` and `h=0.1` as step size."""
fig, ax = plt.subplots()
ax.axhline(y=0, color='k')
draw_graph(p_prime, ax, [-2.4, 1.5], 'actual')
h = 1
x = np.linspace(-2.4, 1.5, 50, endpoint=True)
y = dh1(p, h, x)
ax.plot(x, y, label='Richardson; h=1')
h = 0.1
x = np.linspace(-2.4, 1.5, 50, endpoint=True)
y = dh1(p, h, x)
ax.plot(x, y, label='Richardson; h=0.1')
ax.legend()
"""### Draw error-vs-h cuve"""
fig, ax = plt.subplots()
ax.axhline(y=0, color='k')
hs = np.array([1., 0.55, 0.3, .17, 0.1, 0.055, 0.03, 0.017, 0.01])
e1, e2 = error(p, hs, 2.0)
ax.plot(hs, e1, label='e1')
ax.plot(hs, e2, label='e2')
ax.legend()
| 36.747423 | 273 | 0.591668 | 1,296 | 7,129 | 3.189815 | 0.20216 | 0.020319 | 0.027092 | 0.026125 | 0.297533 | 0.269231 | 0.258829 | 0.238268 | 0.226899 | 0.203435 | 0 | 0.051366 | 0.183476 | 7,129 | 193 | 274 | 36.937824 | 0.658822 | 0.249544 | 0 | 0.254902 | 1 | 0 | 0.056265 | 0 | 0 | 0 | 0 | 0.015544 | 0 | 1 | 0.078431 | false | 0 | 0.078431 | 0 | 0.215686 | 0.019608 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
830ca47819b03f644d5fc932f9eb92819146316f | 1,425 | py | Python | nuplan/database/utils/boxes/box.py | MCZhi/nuplan-devkit | 3c4f5b8dcd517b27cfd258915ca5fe5c54e3cb0c | [
"Apache-2.0"
] | null | null | null | nuplan/database/utils/boxes/box.py | MCZhi/nuplan-devkit | 3c4f5b8dcd517b27cfd258915ca5fe5c54e3cb0c | [
"Apache-2.0"
] | null | null | null | nuplan/database/utils/boxes/box.py | MCZhi/nuplan-devkit | 3c4f5b8dcd517b27cfd258915ca5fe5c54e3cb0c | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
import abc
from typing import Any, Dict
class BoxInterface(abc.ABC):
""" Interface for box. """
@property # type: ignore
@abc.abstractmethod
def label(self) -> int:
"""
Label id.
:return: Label id.
"""
pass
@label.setter # type: ignore
@abc.abstractmethod
def label(self, label: int) -> None:
"""
Sets label id.
:param label: label id.
"""
pass
@property # type: ignore
@abc.abstractmethod
def score(self) -> float:
"""
Classification score.
:return: Classification score.
"""
pass
@score.setter # type: ignore
@abc.abstractmethod
def score(self, score: float) -> None:
"""
Sets classification score.
:param score: Classification score.
"""
pass
@abc.abstractmethod
def serialize(self) -> Dict[str, Any]:
"""
Serializes the box instance to a JSON-friendly vector representation.
:return: Encoding of the box.
"""
pass
@classmethod
@abc.abstractmethod
def deserialize(cls, data: Dict[str, Any]) -> BoxInterface:
"""
Instantiates a Box3D instance from serialized vector representation.
:param data: Output from serialize.
:return: Deserialized box.
"""
pass
| 22.619048 | 77 | 0.562105 | 140 | 1,425 | 5.692857 | 0.378571 | 0.12798 | 0.150565 | 0.135508 | 0.230866 | 0.230866 | 0.195734 | 0 | 0 | 0 | 0 | 0.001057 | 0.33614 | 1,425 | 62 | 78 | 22.983871 | 0.841438 | 0.342456 | 0 | 0.518519 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | false | 0.222222 | 0.111111 | 0 | 0.37037 | 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 |
830eef9810e77b134c4cc2e988eadd23436bf9ed | 4,637 | py | Python | gru/plugins/base/inventory.py | similarweb/gru | 49ef70c2b5e58302c84dbe7d984a7d49aebc0384 | [
"BSD-2-Clause-FreeBSD"
] | 7 | 2016-12-11T19:58:33.000Z | 2020-07-11T08:55:34.000Z | gru/plugins/base/inventory.py | similarweb/gru | 49ef70c2b5e58302c84dbe7d984a7d49aebc0384 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | gru/plugins/base/inventory.py | similarweb/gru | 49ef70c2b5e58302c84dbe7d984a7d49aebc0384 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2019-12-09T19:31:50.000Z | 2019-12-09T19:31:50.000Z |
from . import BasePlugin
from gru.config import settings
class Host(object):
def __init__(self, host_id, host_data=None):
self.host_id = host_id
if host_data:
self.host_data = host_data
else:
self.host_data = {}
def __repr__(self):
return 'Host(host_id="{}")'.format(
self.host_id,
self.host_data
)
def __str__(self):
return self.__repr__()
def get_identifier(self):
return self.host_id
def get_display_name(self):
display_name = self.field(settings.get('inventory.host_display_name_field'), None)
if not display_name:
display_name = self.host_id
return display_name
def field(self, field_name, default=None):
"""
Return a (possibly nested) field
:param field_name: the name of the field to return. If it contains periods ("."), a nested lookup will be
performed
:param default: a default value to return if the field is not found
:return: The value matching the field name inside the host data
"""
try:
return self.host_data[field_name]
except KeyError:
pass
parts = field_name.split('.')
current_val = self.host_data
for part in parts:
try:
current_val = current_val[part]
except (KeyError, TypeError):
return default
except TypeError:
return default
return current_val
class HostCategory(object):
def __init__(self, category, group, count=0):
self.category = category
self.group = group
self.count = count
def __repr__(self):
return 'HostCategory(category="{}", group="{}", count={})'.format(
self.category,
self.group,
self.count
)
def __str__(self):
return self.__repr__()
class HostList(object):
def __init__(self, hosts=None, total_hosts=0):
if hosts:
self.hosts = hosts
else:
self.hosts = []
self.total_hosts = total_hosts
def __repr__(self):
return 'HostList(hosts={}..., total_hosts={})'.format(
self.hosts[:5],
self.total_hosts
)
def append(self, host):
self.hosts.append(host)
def __str__(self):
return self.__repr__()
def __iter__(self):
for host in self.hosts:
yield host
def __nonzero__(self):
return self.hosts.__nonzero__()
def __len__(self):
return len(self.hosts)
class InventoryProvider(BasePlugin):
def host_group_breakdown(self, category):
"""
Returns a list of groups belonging to a category.
Example: if category = "datacenter", an expected return value would be ["us-east-1", "us-west-2"]
:param category: A category string to aggregate by
:return: A list of HostCategory objects
"""
raise NotImplementedError('override me')
def list(self, category, group, sort_by=None, from_ind=None, to_ind=None):
"""
Filter by a field and value.
Example: provider.list("datacenter", "us-east-1") will return all Hosts in the us-east-1 datacenter
:param category: Category to filter by (i.e. "datacenter")
:param group: group to filter by (i.e. "us-east-1")
:param sort_by: optional, a string representing a host attribute to sort by. hostname, for example
:param from_ind: to support pagination, you may return only a subset of the results. this is the start index
:param to_ind: to support pagination, you may return only a subset of the results. this is the end index
:return: a list of Host objects
"""
raise NotImplementedError('override me')
def host_search(self, query, from_ind=None, to_ind=None):
"""
Given a query string, perform a search of hosts
:param query: a query string to perform the lookup by
:param from_ind: to support pagination, you may return only a subset of the results. this is the start index
:param to_ind: to support pagination, you may return only a subset of the results. this is the end index
:return: a list of Host objects
"""
raise NotImplementedError('override me')
def get_host_by_id(self, host_id):
"""
Return a Host object by its ID
:param host_id: a host ID to query by
:return: a Host object
"""
raise NotImplementedError('override me')
| 31.120805 | 117 | 0.607505 | 594 | 4,637 | 4.540404 | 0.212121 | 0.035595 | 0.022247 | 0.050426 | 0.237301 | 0.228402 | 0.188357 | 0.168335 | 0.168335 | 0.168335 | 0 | 0.002485 | 0.305801 | 4,637 | 148 | 118 | 31.331081 | 0.835353 | 0.334052 | 0 | 0.228916 | 0 | 0 | 0.064746 | 0.028815 | 0 | 0 | 0 | 0 | 0 | 1 | 0.240964 | false | 0.012048 | 0.024096 | 0.108434 | 0.481928 | 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 |
8314cb28873762113bd7dff276be8513d9a062b7 | 8,543 | py | Python | pimux/function.py | pcpcpc1213/pimux | 6ce9c3a59ac04064d46217bcdad531c7171163da | [
"MIT"
] | null | null | null | pimux/function.py | pcpcpc1213/pimux | 6ce9c3a59ac04064d46217bcdad531c7171163da | [
"MIT"
] | null | null | null | pimux/function.py | pcpcpc1213/pimux | 6ce9c3a59ac04064d46217bcdad531c7171163da | [
"MIT"
] | null | null | null | from . import scrip as t
class misc():
'''
The class misc has miscellaneous methods
of termuxa-pi available.
Available methods are :
battery,
brightness,
vibrate,
contactlist,
torch,
downloadFile
'''
def __init__(self):
pass
def battery(self):
'''
This method return battery status info.
'''
self.batteryvalue=t.compute("termux-battery-status")
return self.batteryvalue["output"]
def brightness(self,Brightness):
'''
Set the brightness of your device.
It takes argument Brightness (int)
from 0 to 100.
'''
self.Brightness=Brightness
self.brightvalue=t.compute(f"termux-brightness {self.Brightness}")
return self.brightvalue["output"]
def vibrate(self,duration=1000):
'''
vibrates your phone.
Default duration is 1000ms.
'''
self.duration=duration
self.vibratevalue=t.compute(f"termux-vibrate -d {self.duration}")
return self.vibratevalue["output"]
def contactlist(self):
'''
Dumps all contact avalable on the phone.
'''
self.cvalue=t.compute("termux-contact-list")
return self.cvalue["output"]
def call(self,number):
'''
Calls a phone number.
'''
self.number=number
return t.compute(f"termux-telephony-call {self.number}")["output"]
def torch(self,switch=False):
'''
Toggles the torch on/off
Takes argument as:
True: turn on
False: turn off
'''
self.switch=switch
if self.switch == False:
self.torchvalue=t.compute("termux-torch off")
return self.torchvalue["output"]
else:
self.torchvalue=t.compute("termux-torch on")
return self.torchvalue["output"]
def downloadFile(self,description="From termux",title="Download",url=" "):
'''
This is the method for downloading anything
from the internet.
The arguments to be supplied are:
- description
- title
- url
'''
self.description=description
self.title=title
self.url=url
self.downloadF=t.compute(f"termux-download -t {self.title} {self.url}")
return self.downloadF["output"]
def fingerprint(self):
'''
This method uses the fingerprint
scanner for authentication. It
returns success or failure in JSON.
'''
self.result=t.compute("termux-fingerprint")["output"]
return self.result["output"]
class tts():
'''
This class is for getting tts-engine
info and for tts support.
There are two methods available:
ttsinfo
and
tts_speak
'''
def __init__(self):
pass
def ttsinfo(self):
'''
Gets tts-engines info as an output.
'''
self.ttsvalue=t.compute("termux-tts-engines")
return self.ttsvalue["output"]
def tts_speak(self,
eng="com.google.android.tts",
lang="eng",
regn="",
variant="",
pitch=1.0,
rate=1.0,
stream="",
text="Hello from termux"):
'''
This is a tts-engine api for conversion of text into speech.
It has arguments:
eng: engine
lang: language
pitch: pitch
rate: ratei
text: text to speak
#for now this feature isn't set
regn: region
variant: variant
stream: stream
for more info visit [termux wiki](https://wiki.termux.com/wiki/Termux-tts-speak)
'''
self.eng=eng
self.lang=lang
self.regn=regn
self.variant=variant
self.pitch=pitch
self.rate=rate
self.stream=stream
self.text=text
self.tvalue=t.compute(f"termux-tts-speak -e {self.eng} -l {self.lang} -p {self.pitch} -r {self.rate} {self.text}")
return self.tvalue["output"]
class camera:
'''
The class camera is for fetching
camera info or taking picture with the
camera on the android.
'''
def __init__(self):
pass
def camera(self):
'''
This method returns camera info
of the android device.It takes no argument.
'''
self.value=t.compute("termux-camera-info")
return self.value["output"]
def takephoto(self,cid=0,saveas="newimg.jpeg"):
'''
This method is for taking picture from the
available camera on the device.
It takes two argument:
cid : camera id in int default(0)
saveas: output file name in str format default("newimg.jpeg")
'''
self.value=t.compute(f"termux-camera-photo -c {cid} {saveas}")
return self.value["output"]
class clipboard:
'''
Clipboard on android stores copied value
for short time until next copy.
This class has two methods for
setting or getting the value from
clipboard.
'''
def __init__(self):
pass
def clipboardGet(self):
'''
The clipboardGet method returns
value stored in the clipboard.
'''
self.value=t.compute("termux-clipboard-get")
return self.value["output"]
def clipboardSet(self,readval=" "):
'''
The clipboardSet method is to be used
when required to store value in the
clipboard.
BY DEFAULT if no argument given
it sets empty value in the
clipboard.
This method takes an argument of readval variable
which is a string.
'''
self.readval=readval
self.value=t.compute(f"termux-clipboard-set {self.readval}")
return self.value["output"]
class wifi:
'''
The class wifi has two methods:
- toggle method switches wifi on or off
- connectInfo method gets wifi connection
info to stdout.
'''
def __init__(self):
pass
def toggle(self,switch=False):
'''
This method has switch as one argument
whose default boolean value is false.
supply True for true(turn on)
and False for false(turn off)
'''
self.switch=switch
if self.switch == False:
self.value=t.compute("termux-wifi-enable false")
return self.value["output"]
else:
self.value=t.compute("termux-wifi-enable true")
return self.value["output"]
def connectInfo(self):
'''
This method returns wifi connection
information in stringified format.
'''
self.value=t.compute(f"termux-wifi-connectioninfo")
return self.value["output"]
class volume:
'''
The class volume has two methods:
- volumeInfo
- volumeControl
'''
def __init__(self):
pass
def volumeInfo(self):
'''
This method returns
all volume info and takes no argument.
'''
self.value=t.compute(f"termux-volume")
return self.value["output"]
def volumeControl(self,stream="ring",volume=5):
'''
This method sets the volume of the
stream.
It takes two arguments:
- stream : in str format
- volume : in int format
'''
self.value=t.compute(f"termux-volume {stream} {volume}")
return self.value["output"]
class notification:
'''
The class notification has two methods:
- notification
- removeNotification
'''
def __init__(self):
pass
def notification(self,title="title",content="content", *args, **kwargs):
'''
This method creates a notification. 'title' and
'content' are mandatory, and all other flags in
termux-notification are optional arguments
'''
cargs=[]
for i in args:
cargs.append(f"--{i}")
for i in kwargs:
cargs.append(f"-{i} {kwargs[i]}" if len(i) == 1 else f"--{i} {kwargs[i]}")
self.value=t.compute(f"temux-notification -t {title} -c {content} {' '.join(cargs)}")
def removeNotification(self,id):
'''
This method removes a notification by the id
supplied as an argument
'''
self.value=t.compute(f"termux-notification-remove {id}")
return self.value["output"]
| 26.780564 | 122 | 0.570057 | 989 | 8,543 | 4.893832 | 0.228514 | 0.036364 | 0.022314 | 0.034091 | 0.170248 | 0.091942 | 0.069215 | 0.020248 | 0.020248 | 0.020248 | 0 | 0.003472 | 0.325764 | 8,543 | 318 | 123 | 26.86478 | 0.836806 | 0.336299 | 0 | 0.271186 | 0 | 0.008475 | 0.199349 | 0.02519 | 0 | 0 | 0 | 0 | 0 | 1 | 0.228814 | false | 0.059322 | 0.008475 | 0 | 0.474576 | 0.016949 | 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 |
8338456e9d4d6099460e1bd2a49c5b5cf56d90a9 | 223 | py | Python | 05/b_average.py | koshin117/python-learning | 68dd99e2f72fff7507a874c11511415fef3c9354 | [
"MIT"
] | 1 | 2021-03-29T08:30:19.000Z | 2021-03-29T08:30:19.000Z | 05/b_average.py | koshin117/python-learning | 68dd99e2f72fff7507a874c11511415fef3c9354 | [
"MIT"
] | null | null | null | 05/b_average.py | koshin117/python-learning | 68dd99e2f72fff7507a874c11511415fef3c9354 | [
"MIT"
] | null | null | null | #B
def average(As :list) -> float:
return float(sum(As)/len(As))
def main():
# input
As = list(map(int, input().split()))
# compute
# output
print(average(As))
if __name__ == '__main__':
main()
| 17.153846 | 40 | 0.565022 | 30 | 223 | 3.933333 | 0.633333 | 0.152542 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.246637 | 223 | 12 | 41 | 18.583333 | 0.702381 | 0.098655 | 0 | 0 | 0 | 0 | 0.040609 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.285714 | false | 0 | 0 | 0.142857 | 0.428571 | 0.142857 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 |
8340e8e017d3e1c1641789fc6d116198178f84f1 | 2,550 | py | Python | qiskit/pulse/instructions/delay.py | gadial/qiskit-terra | 0fc83f44a6e80969875c738b2cee7bc33223e45f | [
"Apache-2.0"
] | 1 | 2021-10-05T11:56:53.000Z | 2021-10-05T11:56:53.000Z | qiskit/pulse/instructions/delay.py | gadial/qiskit-terra | 0fc83f44a6e80969875c738b2cee7bc33223e45f | [
"Apache-2.0"
] | 24 | 2021-01-27T08:20:27.000Z | 2021-07-06T09:42:28.000Z | qiskit/pulse/instructions/delay.py | gadial/qiskit-terra | 0fc83f44a6e80969875c738b2cee7bc33223e45f | [
"Apache-2.0"
] | 4 | 2021-10-05T12:07:27.000Z | 2022-01-28T18:37:28.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.
"""An instruction for blocking time on a channel; useful for scheduling alignment."""
from typing import Optional, Union, Tuple
from qiskit.circuit import ParameterExpression
from qiskit.pulse.channels import Channel
from qiskit.pulse.instructions.instruction import Instruction
class Delay(Instruction):
"""A blocking instruction with no other effect. The delay is used for aligning and scheduling
other instructions.
Example:
To schedule an instruction at time = 10, on a channel assigned to the variable ``channel``,
the following could be used::
sched = Schedule(name="Delay instruction example")
sched += Delay(10, channel)
sched += Gaussian(duration, amp, sigma, channel)
The ``channel`` will output no signal from time=0 up until time=10.
"""
def __init__(self, duration: Union[int, ParameterExpression],
channel: Channel,
name: Optional[str] = None):
"""Create a new delay instruction.
No other instruction may be scheduled within a ``Delay``.
Args:
duration: Length of time of the delay in terms of dt.
channel: The channel that will have the delay.
name: Name of the delay for display purposes.
"""
super().__init__(operands=(duration, channel), name=name)
@property
def channel(self) -> Channel:
"""Return the :py:class:`~qiskit.pulse.channels.Channel` that this instruction is
scheduled on.
"""
return self.operands[1]
@property
def channels(self) -> Tuple[Channel]:
"""Returns the channels that this schedule uses."""
return (self.channel, )
@property
def duration(self) -> Union[int, ParameterExpression]:
"""Duration of this instruction."""
return self.operands[0]
def is_parameterized(self) -> bool:
"""Return ``True`` iff the instruction is parameterized."""
return isinstance(self.duration, ParameterExpression) or super().is_parameterized()
| 35.915493 | 99 | 0.671373 | 325 | 2,550 | 5.236923 | 0.409231 | 0.014101 | 0.011751 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008772 | 0.24 | 2,550 | 70 | 100 | 36.428571 | 0.869453 | 0.58549 | 0 | 0.15 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.2 | 0 | 0.7 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
8341a4470393cc4df708339799fbfe8844ec3b50 | 739 | py | Python | mosasaurus/chromaticlc/mptest.py | zkbt/mosasaurus | 8ddeaa359adda36e4c48c3c6c476c34fdc09d952 | [
"MIT"
] | 2 | 2018-08-03T16:22:27.000Z | 2018-09-03T22:46:31.000Z | mosasaurus/chromaticlc/mptest.py | zkbt/mosasaurus | 8ddeaa359adda36e4c48c3c6c476c34fdc09d952 | [
"MIT"
] | 15 | 2016-11-23T19:59:33.000Z | 2019-07-10T13:40:40.000Z | mosasaurus/chromaticlc/mptest.py | zkbt/mosasaurus | 8ddeaa359adda36e4c48c3c6c476c34fdc09d952 | [
"MIT"
] | 1 | 2016-12-02T20:53:08.000Z | 2016-12-02T20:53:08.000Z | import TransmissionSpectrum
import multiprocessing
obs = 'wasp94_140805.obs'
ncpu = multiprocessing.cpu_count()
def fastfit(i):
t = TransmissionSpectrum.TransmissionSpectrum(obs)
t.speak('starting fit for bin {0}'.format(i))
t.bins[i].fit(plot=False, slow=False, interactive=False, remake=True)
def slowfit(i):
t = TransmissionSpectrum.TransmissionSpectrum(obs)
t.speak('starting fit for bin {0}'.format(i))
t.bins[i].fit(plot=False, slow=True, interactive=False, nburnin=500, ninference=500)
pool = multiprocessing.Pool(ncpu)
t = TransmissionSpectrum.TransmissionSpectrum(obs)
for i in range(len(t.bins)):
fastfit(i)
#pool.map_async(fastfit, range(len(t.bins)))
#pool.map_async(slowfit, range(len(t.bins)))
| 33.590909 | 88 | 0.741543 | 103 | 739 | 5.281553 | 0.359223 | 0.045956 | 0.226103 | 0.242647 | 0.360294 | 0.360294 | 0.360294 | 0.360294 | 0.360294 | 0.360294 | 0 | 0.024465 | 0.11502 | 739 | 21 | 89 | 35.190476 | 0.807339 | 0.116373 | 0 | 0.3125 | 0 | 0 | 0.099846 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.125 | 0 | 0.25 | 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 |
83441a6b6c5d79e325330fcd2de68468db5ae8e3 | 8,923 | py | Python | Macro/WorkFeature/Utils/WF_curve.py | myao9494/FreeCAD_Factory | 6bf3209f2295d306d4c2c8c2ded25839c837e869 | [
"MIT"
] | null | null | null | Macro/WorkFeature/Utils/WF_curve.py | myao9494/FreeCAD_Factory | 6bf3209f2295d306d4c2c8c2ded25839c837e869 | [
"MIT"
] | null | null | null | Macro/WorkFeature/Utils/WF_curve.py | myao9494/FreeCAD_Factory | 6bf3209f2295d306d4c2c8c2ded25839c837e869 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Mar 1 06:59:10 2016
@author: laurent
"""
from __future__ import division
from math import factorial
# Pascal's triangle
p_t = [ [1], # n=0
[1,1], # n=1
[1,2,1], # n=2
[1,3,3,1], # n=3
[1,4,6,4,1], # n=4
[1,5,10,10,5,1], # n=5
[1,6,15,20,15,6,1]] # n=6
#==============================================================================
# binomial(n,k):
# while(n >= lut.length):
# s = lut.length
# nextRow = new array(size=s+1)
# nextRow[0] = 1
# for(i=1, prev=s-1; i<prev; i++):
# nextRow[i] = lut[prev][i-1] + lut[prev][i]
# nextRow[s] = 1
# lut.add(nextRow)
# return lut[n][k]
#==============================================================================
def binomial(n, i):
""" return binomial terms from Pascal triangle from predefined list or
calculate the terms if not already in the list.
"""
global p_t
m_l = len(p_t)
while n >= m_l:
m_next_row = []
m_next_row.append(1)
for m_i in range(1,m_l):
m_next_row.append(p_t[m_l-1][m_i-1]+p_t[m_l-1][m_i])
m_next_row.append(1)
# print m_next_row
p_t.append(m_next_row)
m_l = len(p_t)
return p_t[n][i]
def binomial_term(n, i):
""" binomial coefficient = n! / (i!(n - i)!)
"""
return factorial(n) / (factorial(i) * factorial(n - i))
#==============================================================================
# function Bezier(n,t):
# sum = 0
# for(k=0; k<n; k++):
# sum += n!/(k!*(n-k)!) * (1-t)^(n-k) * t^(k)
# return sum
#==============================================================================
def bezier_base(n, t):
""" Basis Bezier function.
"""
m_sum = 0.
m_C = binomial_term
for i in range(n):
m_sum += m_C(n, i) * (1 - t)**(n - i) * t**i
return m_sum
#==============================================================================
# function Bezier(2,t):
# t2 = t * t
# mt = 1-t
# mt2 = mt * mt
# return mt2 + 2*mt*t + t2
#==============================================================================
def bezier_quadratic_terms(t):
""" Simplified Bezier quadratic curve.
Return 3 terms in list ()
"""
m_terms = list()
# n=2 i=0
# m_C(n, i) * (1 - t)**(n - i) * t**i
# m_C(2, 0) * (1 - t)**(2 - 0) * t**0
# 1 * (1 - t)*(1 - t) * 1
m_terms.append((1 - t)*(1 - t))
# n=2 i=1
# m_C(n, i) * (1 - t)**(n - i) * t**i
# m_C(2, 1) * (1 - t)**(2 - 1) * t**1
# 2 * (1 - t) * t
m_terms.append(2 * (1 - t) * t)
m_terms.append(t*t)
return m_terms
#==============================================================================
# function Bezier(3,t):
# t2 = t * t
# t3 = t2 * t
# mt = 1-t
# mt2 = mt * mt
# mt3 = mt2 * mt
# return mt3 + 3*mt2*t + 3*mt*t2 + t3
#==============================================================================
def bezier_cubic_terms(t):
""" Simplified Bezier cubic curve.
Return 4 terms in list ()
"""
m_terms = list()
# n=3 i=0
# m_C(n, i) * (1 - t)**(n - i) * t**i
# m_C(3, 0) * (1 - t)**(3 - 0) * t**0
# (1 - t)*(1 - t)*(1 - t)
m_terms.append((1 - t)*(1 - t)*(1 - t))
# n=3 i=1
# m_C(n, i) * (1 - t)**(n - i) * t**i
# m_C(3, 1) * (1 - t)**(3 - 1) * t**1
# 3 * (1 - t)*(1 - t) * t
m_terms.append(3 * (1 - t)*(1 - t) * t)
# n=3 i=2
# m_C(n, i) * (1 - t)**(n - i) * t**i
# m_C(3, 2) * (1 - t)**(3 - 2) * t**2
# 3 * (1 - t) * t * t
m_terms.append(3 * (1 - t) * t * t)
m_terms.append(t * t * t)
return m_terms
def bezier_terms(n, t):
""" Bezier curve.
Return n+1 terms in list ()
"""
m_terms = list()
m_C = binomial_term
for i in range(n):
m_terms.append( m_C(n, i) * (1 - t)**(n - i) * t**i )
m_terms.append(t ** n)
return m_terms
#==============================================================================
# function Bezier(n,t,w[]):
# sum = 0
# for(k=0; k<n; k++):
# sum += w[k] * binomial(n,k) * (1-t)^(n-k) * t^(k)
# return sum
#==============================================================================
def bezier_curve(n, t, weigths):
""" Basis Bezier function.
"""
m_sum = 0.
m_C = binomial_term
for i,w in zip(range(n+1),weigths):
m_sum += m_C(n, i) * (1 - t)**(n - i) * t**i * w
return m_sum
#==============================================================================
# function Bezier(2,t,w[]):
# t2 = t * t
# mt = 1-t
# mt2 = mt * mt
# return w[0]*mt2 + w[1]*2*mt*t + w[2]*t2
#==============================================================================
def bezier_quadratic_curve(t, weigths):
if len(weigths) != 3:
return None
t2 = t * t
mt = 1-t
mt2 = mt * mt
return weigths[0]*mt2 + weigths[1]*2*mt*t + weigths[2]*t2
#==============================================================================
# function Bezier(3,t,w[]):
# t2 = t * t
# t3 = t2 * t
# mt = 1-t
# mt2 = mt * mt
# mt3 = mt2 * mt
# return w[0]*mt3 + 3*w[1]*mt2*t + 3*w[2]*mt*t2 + w[3]*t3
#==============================================================================
def bezier_cubic_curve(t, weigths):
if len(weigths) != 4:
return None
t2 = t * t
t3 = t2 * t
mt = 1-t
mt2 = mt * mt
mt3 = mt2 * mt
return weigths[0]*mt3 + weigths[1]*3*mt2*t + weigths[2]*3*mt*t2 + weigths[3]*t3
class Bezier():
""" bezier curve object
points : list of control points
points = [(-1,-1,0.0),(0,3,0.0)]
"""
def __init__(self, points):
if (None in [points]) :
print "\nERROR in : bezier.__init__"
print "'points' not defined !"
return None
n = len(t)
pass
if __name__ == "__main__":
import matplotlib.pyplot as plt
import numpy as np
t = np.arange(0.0, 1.0, 0.01)
b1 = bezier_base(1, t)
plt.plot(t, b1)
b2 = bezier_base(2, t)
plt.plot(t, b2)
b3 = bezier_base(3, t)
plt.plot(t, b3)
plt.xlabel('t values')
plt.ylabel('')
plt.title('Bezier basis functions : b1(blue), b2(green) and b3(red)')
plt.grid(True)
plt.show()
# print str(binomial(0, 0))
# print str(binomial(1, 0)),
# print str(binomial(1, 1))
print ("Pascal's triangle :")
for j in range(0,10):
for i in range(0,j+1):
print str(binomial(j, i)),
print ""
# m_points = [(-1,-1,0.0),(0,3,0.0)]
# bz=Bezier(m_points) t = np.arange(0.0, 1.0, 0.01)
t = np.arange(0.0, 1.0, 0.01)
b12,b22,b32 = bezier_quadratic_terms(t)
plt.plot(t, b12)
plt.plot(t, b22)
plt.plot(t, b32)
plt.xlabel('t values')
plt.ylabel('')
plt.title('Bezier basis functions terms : quadratic')
plt.grid(True)
plt.show()
t = np.arange(0.0, 1.0, 0.01)
b13,b23,b33,b43 = bezier_cubic_terms(t)
plt.plot(t, b13)
plt.plot(t, b23)
plt.plot(t, b33)
plt.plot(t, b43)
plt.title('Bezier basis functions terms : cubic')
plt.show()
t = np.arange(0.0, 1.0, 0.01)
m_terms = list()
m_terms = bezier_terms(15,t)
for term in m_terms:
plt.plot(t, term)
plt.title('Bezier basis functions terms : 15')
plt.show()
pt1 = (120,160)
pt2 = (35,200)
pt3 = (220,260)
pt4 = (220,40)
x = (120,35,220,220)
y = (160,200,260,40)
t = np.arange(0.0, 1.0, 0.01)
m_dim = len(x)-1
m_Xs = bezier_curve(m_dim, t, x)
m_Xs = bezier_cubic_curve(t, x)
plt.plot(t, m_Xs)
plt.title('Bezier curve : X')
plt.show()
m_dim = len(y)-1
m_Ys = bezier_curve(m_dim, t, y)
m_Ys = bezier_cubic_curve(t, y)
plt.plot(t, m_Ys)
plt.title('Bezier curve : Y')
plt.show()
plt.plot(m_Xs, m_Ys)
plt.plot(x, y, 'o-')
plt.show()
t = np.arange(-0.2, 1.1, 0.01)
m_Xs = bezier_curve(m_dim, t, x)
m_Ys = bezier_curve(m_dim, t, y)
plt.plot(m_Xs, m_Ys)
plt.plot(x, y, 'o-')
plt.show()
#==============================================================================
# import matplotlib as mpl
# from mpl_toolkits.mplot3d import Axes3D
# import numpy as np
# import matplotlib.pyplot as plt
#
# mpl.rcParams['legend.fontsize'] = 10
#
# fig = plt.figure()
# ax = fig.gca(projection='3d')
# theta = np.linspace(-4 * np.pi, 4 * np.pi, 100)
# z = np.linspace(-2, 2, 100)
# r = z**2 + 1
# x = r * np.sin(theta)
# y = r * np.cos(theta)
# ax.plot(x, y, z, label='parametric curve')
# ax.legend()
#
# plt.show()
#==============================================================================
| 27.625387 | 87 | 0.420262 | 1,347 | 8,923 | 2.679287 | 0.130661 | 0.023275 | 0.028817 | 0.008867 | 0.434192 | 0.349404 | 0.303131 | 0.25381 | 0.228872 | 0.187864 | 0 | 0.064063 | 0.274011 | 8,923 | 323 | 88 | 27.625387 | 0.493053 | 0.391124 | 0 | 0.368421 | 0 | 0 | 0.06262 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.006579 | 0.026316 | null | null | 0.032895 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
834c8fddbb55c2d6f805fb0cea2ee12883df1ec1 | 331 | py | Python | debug/read_depth_from_exr_file.py | ccj5351/hmr_rgbd | d1dcf81d72c11e1f502f2c494cd86425f384d9cc | [
"MIT"
] | null | null | null | debug/read_depth_from_exr_file.py | ccj5351/hmr_rgbd | d1dcf81d72c11e1f502f2c494cd86425f384d9cc | [
"MIT"
] | 1 | 2020-12-09T07:29:00.000Z | 2020-12-09T07:29:00.000Z | debug/read_depth_from_exr_file.py | ccj5351/hmr_rgbd | d1dcf81d72c11e1f502f2c494cd86425f384d9cc | [
"MIT"
] | null | null | null | # !/usr/bin/env python3
# -*-coding:utf-8-*-
# @file: read_depth_from_exr_file.py
# @brief:
# @author: Changjiang Cai, ccai1@stevens.edu, caicj5351@gmail.com
# @version: 0.0.1
# @creation date: 10-06-2019
# @last modified: Mon 10 Jun 2019 06:18:44 PM EDT
import cv2
dep = cv2.imread("0.exr",-1) # "-1" means any depth or channel;
| 27.583333 | 65 | 0.682779 | 58 | 331 | 3.827586 | 0.810345 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.122807 | 0.138973 | 331 | 11 | 66 | 30.090909 | 0.65614 | 0.818731 | 0 | 0 | 0 | 0 | 0.1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
835b2ca04f52a867e7d976e3a7d13af46d16320d | 624 | py | Python | adapters/base_adapter.py | juangallostra/moonboard | d4a35857d480ee4bed06faee44e0347e1070b6b8 | [
"MIT"
] | null | null | null | adapters/base_adapter.py | juangallostra/moonboard | d4a35857d480ee4bed06faee44e0347e1070b6b8 | [
"MIT"
] | null | null | null | adapters/base_adapter.py | juangallostra/moonboard | d4a35857d480ee4bed06faee44e0347e1070b6b8 | [
"MIT"
] | null | null | null | from models.problem import Problem
class BaseProblemAdapter():
"""
Map problem data to a Python object that the renderer can use.
"""
def map_problem(self, problem_data) -> Problem:
"""
Given the raw data of a problem, convert it to a Problem object and return it.
:param problem_data: Source from which to map the problem
:type problem_data: dict
:return: Problem object with the parsed problem data as attributes
:rtype: Problem
:raises NotImplementedError: If the method is not implemented
"""
raise NotImplementedError
| 31.2 | 86 | 0.658654 | 78 | 624 | 5.217949 | 0.564103 | 0.135135 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.285256 | 624 | 19 | 87 | 32.842105 | 0.912556 | 0.592949 | 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 |
8361ead530441db9333244ae0f2f8927bfbf291f | 2,305 | py | Python | bprof/profile.py | joelfrederico/bprof | 09ada1e8cb0b2ddee3e212e1721c81964fc5f7a4 | [
"MIT"
] | null | null | null | bprof/profile.py | joelfrederico/bprof | 09ada1e8cb0b2ddee3e212e1721c81964fc5f7a4 | [
"MIT"
] | null | null | null | bprof/profile.py | joelfrederico/bprof | 09ada1e8cb0b2ddee3e212e1721c81964fc5f7a4 | [
"MIT"
] | 1 | 2019-10-19T21:22:02.000Z | 2019-10-19T21:22:02.000Z | class BaseFunction:
def __init__(self, name, n_calls, internal_ns):
self._name = name
self._n_calls = n_calls
self._internal_ns = internal_ns
@property
def name(self):
return self._name
@property
def n_calls(self):
return self._n_calls
@property
def internal_ns(self):
return self._internal_ns
class Lines:
def __init__(self, line_str, n_calls, internal, external):
self._line_str = line_str
self._n_calls = n_calls
self._internal = internal
self._external = external
@property
def text(self):
return self._line_str
@property
def n_calls(self):
return self._n_calls
@property
def internal(self):
return self._internal
@property
def external(self):
return self._external
@property
def total(self):
return self.internal + self.external
class Function(BaseFunction):
def __init__(self, name, lines, n_calls, internal_ns):
self._name = name
self._lines = lines
self._n_calls = n_calls
self._internal_ns = internal_ns
@property
def lines(self):
return self._lines
@property
def name(self):
return self._name
@property
def n_calls(self):
return self._n_calls
@property
def internal_ns(self):
return self._internal_ns
@property
def total(self):
tot = 0
for line in self.lines:
tot += line.total
return tot + self.internal_ns
class Profile:
@staticmethod
def from_data(data):
profile = Profile()
profile._functions = []
for key, fdata in data['functions'].items():
lines = []
for line in fdata['lines']:
line = Lines(line['line_str'], line['n_calls'],
line['internal_ns'], line['external_ns'])
lines.append(line)
func = Function(lines=lines, name=fdata['name'],
n_calls=fdata['n_calls'],
internal_ns=fdata['internal_ns'])
profile._functions.append(func)
return profile
@property
def functions(self):
return self._functions
| 22.598039 | 70 | 0.577007 | 265 | 2,305 | 4.732075 | 0.124528 | 0.086124 | 0.145136 | 0.070175 | 0.413876 | 0.370813 | 0.370813 | 0.348485 | 0.300638 | 0.300638 | 0 | 0.000651 | 0.333623 | 2,305 | 101 | 71 | 22.821782 | 0.815755 | 0 | 0 | 0.474359 | 0 | 0 | 0.03167 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.230769 | false | 0 | 0 | 0.166667 | 0.474359 | 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 |
83638a87db865ba288d6ca6639d585c34a522b6e | 98 | py | Python | raspy/io/pwm_channel.py | cyrusbuilt/RasPy | 1e34840cc90ea7f19317e881162209d3d819eb09 | [
"MIT"
] | null | null | null | raspy/io/pwm_channel.py | cyrusbuilt/RasPy | 1e34840cc90ea7f19317e881162209d3d819eb09 | [
"MIT"
] | null | null | null | raspy/io/pwm_channel.py | cyrusbuilt/RasPy | 1e34840cc90ea7f19317e881162209d3d819eb09 | [
"MIT"
] | null | null | null | """The PWM channel to use."""
CHANNEL0 = 0
"""Channel zero."""
CHANNEL1 = 1
"""Channel one."""
| 10.888889 | 29 | 0.581633 | 13 | 98 | 4.384615 | 0.846154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.05 | 0.183673 | 98 | 8 | 30 | 12.25 | 0.6625 | 0.234694 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
83655e2b69ea8d94a79a740f034c0045712e2d9d | 97 | py | Python | ABC/131/a.py | fumiyanll23/AtCoder | 362ca9fcacb5415c1458bc8dee5326ba2cc70b65 | [
"MIT"
] | null | null | null | ABC/131/a.py | fumiyanll23/AtCoder | 362ca9fcacb5415c1458bc8dee5326ba2cc70b65 | [
"MIT"
] | null | null | null | ABC/131/a.py | fumiyanll23/AtCoder | 362ca9fcacb5415c1458bc8dee5326ba2cc70b65 | [
"MIT"
] | null | null | null | S = str(input())
if S[0]==S[1] or S[1]==S[2] or S[2]==S[3]:
print("Bad")
else:
print("Good") | 16.166667 | 42 | 0.494845 | 23 | 97 | 2.086957 | 0.565217 | 0.083333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.074074 | 0.164948 | 97 | 6 | 43 | 16.166667 | 0.518519 | 0 | 0 | 0 | 0 | 0 | 0.071429 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.4 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
55f05ed10bf6e796822641491b85dc1b12b2b7ba | 375 | py | Python | model/pet_breed.py | IDRISSOUM/hospital_management | 56a768f29269a77bc890d40479a8aacb90867189 | [
"Unlicense"
] | null | null | null | model/pet_breed.py | IDRISSOUM/hospital_management | 56a768f29269a77bc890d40479a8aacb90867189 | [
"Unlicense"
] | null | null | null | model/pet_breed.py | IDRISSOUM/hospital_management | 56a768f29269a77bc890d40479a8aacb90867189 | [
"Unlicense"
] | null | null | null | # # -*- coding: utf-8 -*-
# # Part of BrowseInfo. See LICENSE file for full copyright and licensing details.
#
# from odoo import api, fields, models, _
#
# class pet_breed(models.Model):
# _name = 'pet.breed'
#
# name = fields.Char('Name', required = True)
# code = fields.Char('Code')
#
#
# # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | 28.846154 | 82 | 0.653333 | 48 | 375 | 5.041667 | 0.770833 | 0.066116 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013115 | 0.186667 | 375 | 13 | 83 | 28.846154 | 0.780328 | 0.92 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
3613f877b238035dadd508a419d964a6d0b3a50e | 1,084 | py | Python | api/permissions.py | letsdowork/yamdb_api | f493309dc52528d980463047d311d898714f3111 | [
"MIT"
] | null | null | null | api/permissions.py | letsdowork/yamdb_api | f493309dc52528d980463047d311d898714f3111 | [
"MIT"
] | null | null | null | api/permissions.py | letsdowork/yamdb_api | f493309dc52528d980463047d311d898714f3111 | [
"MIT"
] | null | null | null | from rest_framework.permissions import BasePermission, SAFE_METHODS
from .models import User
class IsAdminOrReadOnly(BasePermission):
def has_permission(self, request, view):
return bool(
request.method in SAFE_METHODS or
request.user and request.user.is_authenticated and
request.user.is_admin() or
request.user.is_superuser)
class IsOwnerOrAdmin(BasePermission):
def has_object_permission(self, request, view, obj):
return bool(
obj.author == request.user or
request.user and request.user.is_authenticated and
request.user.is_admin() or
request.user.is_superuser)
class IsOwnerOrAllStaff(BasePermission):
ALLOWED_USER_ROLES = (User.Roles.MODERATOR, User.Roles.ADMIN)
def has_object_permission(self, request, view, obj):
return bool(
obj.author == request.user or
request.user and request.user.is_authenticated and
request.user.role in self.ALLOWED_USER_ROLES or
request.user.is_superuser)
| 31.882353 | 67 | 0.681734 | 129 | 1,084 | 5.573643 | 0.286822 | 0.214186 | 0.144645 | 0.111266 | 0.561892 | 0.528512 | 0.528512 | 0.528512 | 0.528512 | 0.528512 | 0 | 0 | 0.24631 | 1,084 | 33 | 68 | 32.848485 | 0.880049 | 0 | 0 | 0.625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.083333 | 0.125 | 0.5 | 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 | 1 | 0 | 0 | 0 | 2 |
3616727077997c5d64715fd00bfc6be4f8ba4ad8 | 1,323 | py | Python | steapy/velocity_field.py | Sparsh-Sharma/SteaPy | d6f3bee7eb1385c83f65f345d466ef740db4ed3b | [
"MIT"
] | 1 | 2017-04-28T13:05:13.000Z | 2017-04-28T13:05:13.000Z | steapy/velocity_field.py | Sparsh-Sharma/SteaPy | d6f3bee7eb1385c83f65f345d466ef740db4ed3b | [
"MIT"
] | null | null | null | steapy/velocity_field.py | Sparsh-Sharma/SteaPy | d6f3bee7eb1385c83f65f345d466ef740db4ed3b | [
"MIT"
] | null | null | null | import os
import numpy
from numpy import *
import math
from scipy import integrate, linalg
from matplotlib import pyplot
from pylab import *
from .integral import *
def get_velocity_field(panels, freestream, X, Y):
"""
Computes the velocity field on a given 2D mesh.
Parameters
---------
panels: 1D array of Panel objects
The source panels.
freestream: Freestream object
The freestream conditions.
X: 2D Numpy array of floats
x-coordinates of the mesh points.
Y: 2D Numpy array of floats
y-coordinate of the mesh points.
Returns
-------
u: 2D Numpy array of floats
x-component of the velocity vector field.
v: 2D Numpy array of floats
y-component of the velocity vector field.
"""
# freestream contribution
u = freestream.u_inf * math.cos(freestream.alpha) * numpy.ones_like(X, dtype=float)
v = freestream.u_inf * math.sin(freestream.alpha) * numpy.ones_like(X, dtype=float)
# add the contribution from each source (superposition powers!!!)
vec_intregral = numpy.vectorize(integral)
for panel in panels:
u += panel.sigma / (2.0 * math.pi) * vec_intregral(X, Y, panel, 1, 0)
v += panel.sigma / (2.0 * math.pi) * vec_intregral(X, Y, panel, 0, 1)
return u, v
| 29.4 | 87 | 0.652305 | 186 | 1,323 | 4.591398 | 0.370968 | 0.040984 | 0.056206 | 0.065574 | 0.35363 | 0.35363 | 0.177986 | 0.177986 | 0.086651 | 0.086651 | 0 | 0.014228 | 0.256236 | 1,323 | 44 | 88 | 30.068182 | 0.853659 | 0.432351 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.0625 | 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 |
3616ce719b349e94d2bd7c4da3e42707eb0de49d | 4,125 | py | Python | admin/hams_admin/container_manager.py | hku-systems/hams | 3a5720657252c650c9a6c5d9b674f7ea6153e557 | [
"Apache-2.0"
] | 6 | 2020-08-19T11:46:23.000Z | 2021-12-24T07:34:15.000Z | admin/hams_admin/container_manager.py | hku-systems/hams | 3a5720657252c650c9a6c5d9b674f7ea6153e557 | [
"Apache-2.0"
] | 1 | 2021-03-25T23:40:15.000Z | 2021-03-25T23:40:15.000Z | admin/hams_admin/container_manager.py | hku-systems/hams | 3a5720657252c650c9a6c5d9b674f7ea6153e557 | [
"Apache-2.0"
] | 2 | 2020-10-31T16:48:39.000Z | 2021-03-07T09:14:25.000Z | import abc
from .exceptions import HamsException
import logging
# Constants
HAMS_INTERNAL_QUERY_PORT = 1337
HAMS_INTERNAL_MANAGEMENT_PORT = 1338
HAMS_INTERNAL_RPC_PORT = 7000
HAMS_INTERNAL_METRIC_PORT = 1390
HAMS_INTERNAL_REDIS_PORT = 6379
HAMS_DOCKER_LABEL = "ai.hams.container.label"
HAMS_NAME_LABEL = "ai.hams.name"
HAMS_MODEL_CONTAINER_LABEL = "ai.hams.model_container.label"
HAMS_QUERY_FRONTEND_CONTAINER_LABEL = "ai.hams.query_frontend.label"
HAMS_MGMT_FRONTEND_CONTAINER_LABEL = "ai.hams.management_frontend.label"
HAMS_QUERY_FRONTEND_ID_LABEL = "ai.hams.query_frontend.id"
CONTAINERLESS_MODEL_IMAGE = "NO_CONTAINER"
HAMS_DOCKER_PORT_LABELS = {
'redis': 'ai.hams.redis.port',
'query_rest': 'ai.hams.query_frontend.query.port',
'query_rpc': 'ai.hams.query_frontend.rpc.port',
'management': 'ai.hams.management.port',
'metric': 'ai.hams.metric.port'
}
HAMS_METRIC_CONFIG_LABEL = 'ai.hams.metric.config'
# NOTE: we use '_' as the delimiter because kubernetes allows the use
# '_' in labels but not in deployment names. We force model names and
# versions to be compliant with both limitations, so this gives us an extra
# character to use when creating labels.
_MODEL_CONTAINER_LABEL_DELIMITER = "_"
class ClusterAdapter(logging.LoggerAdapter):
"""
This adapter adds cluster name to logging format.
Usage
-----
In ContainerManager init process, do:
self.logger = ClusterAdapter(logger, {'cluster_name': self.cluster_name})
"""
# def process(self, msg, kwargs):
# return "[{}] {}".format(self.extra['cluster_name'], msg), kwargs
def process(self, msg, kwargs):
return "{}".format(msg), kwargs
def create_model_container_label(name, version):
return "{name}{delim}{version}".format(
name=name, delim=_MODEL_CONTAINER_LABEL_DELIMITER, version=version)
def parse_model_container_label(label):
splits = label.split(_MODEL_CONTAINER_LABEL_DELIMITER)
if len(splits) != 2:
raise HamsException(
"Unable to parse model container label {}".format(label))
return splits
class ContainerManager(object):
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def start_hams(self, query_frontend_image, mgmt_frontend_image,
frontend_exporter_image, cache_size,
qf_http_thread_pool_size, qf_http_timeout_request,
qf_http_timeout_content,
num_frontend_replicas):
return
@abc.abstractmethod
def connect(self):
return
@abc.abstractmethod
def connect_host(self, host_ip, host_port):
return
@abc.abstractmethod
def deploy_model(self, name, version, input_type, image):
return
@abc.abstractmethod
def add_replica(self, name, version, input_type, image, proxy_name="", proxy_port="", remove=True, runtime=""):
return
@abc.abstractmethod
def set_proxy(self, image, model_container_label, model_ip, host_ip):
return
@abc.abstractmethod
def get_num_replicas(self, name, version):
return
@abc.abstractmethod
def get_logs(self, logging_dir):
return
@abc.abstractmethod
def stop_models(self, models):
return
@abc.abstractmethod
def stop_all_model_containers(self):
return
@abc.abstractmethod
def stop_all(self, graceful=True):
pass
@abc.abstractmethod
def get_admin_addr(self):
return
@abc.abstractmethod
def get_query_addr(self):
return
@abc.abstractmethod
def get_container_ip(self, host_ip, container_id):
return
@abc.abstractmethod
def grpc_client(self, image, arg_list):
return
@abc.abstractmethod
def check_container_status(self, host_ip, container_id, timeout, threshold):
return
@abc.abstractmethod
def get_docker_client(self, host_ip):
return
@abc.abstractmethod
def add_frontend(self, host_ip, image, runtime_dag_id, entry_proxy_ip, entry_proxy_port, max_workers=64,stateful=False, remove=True):
return
| 28.448276 | 137 | 0.701333 | 515 | 4,125 | 5.330097 | 0.293204 | 0.111475 | 0.131148 | 0.151548 | 0.241894 | 0.120947 | 0.052459 | 0 | 0 | 0 | 0 | 0.007027 | 0.206545 | 4,125 | 144 | 138 | 28.645833 | 0.831653 | 0.132606 | 0 | 0.364583 | 0 | 0 | 0.116417 | 0.075728 | 0 | 0 | 0 | 0 | 0 | 1 | 0.21875 | false | 0.010417 | 0.03125 | 0.197917 | 0.489583 | 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 |
3628f30f1da84eb0aeefd00f476c1a8932e5c523 | 1,245 | py | Python | src/attribute_generator.py | neutron101/cs231A-project | a147a3cc7de66c852dfc6b8cb9c65780c9d55d07 | [
"MIT"
] | null | null | null | src/attribute_generator.py | neutron101/cs231A-project | a147a3cc7de66c852dfc6b8cb9c65780c9d55d07 | [
"MIT"
] | null | null | null | src/attribute_generator.py | neutron101/cs231A-project | a147a3cc7de66c852dfc6b8cb9c65780c9d55d07 | [
"MIT"
] | null | null | null | import numpy as np
class AttributeGenerator:
def __init__(self, RTs, Ks, Ps):
self._RTs = RTs
self._Ks = Ks
self._Ps = Ps
def generate(self):
self._update_intrinsics()
self._update_translation_and_rotation()
self._updateProjection()
def use_default_translation_and_rotation(self):
self.rotation_translation = self._RTs
def _updateProjection(self):
self.projection = []
for i in range(len(self.rotation_translation)):
kr = self.intrinsics[i].dot(self.rotation_translation[i][0:3,0:3].transpose())
kt = np.reshape(self.intrinsics[i].dot(-1*self.rotation_translation[i][0:3,0:3].transpose().dot(self.rotation_translation[i][0:3,3])), [3,1])
new_projection = np.hstack((kr, kt))
self.projection.append(new_projection)
def _update_translation_and_rotation(self):
self.rotation_translation = []
base_rot = self._RTs[0][0:3,0:3]
base_trans = self._RTs[0][0:3,3]
for i in range(0, len(self._RTs)):
current = np.linalg.inv(base_rot).dot(self._RTs[i][0:3,0:3])
t = np.linalg.inv(current).dot(self._RTs[i][0:3,3] - base_trans)
rt = np.hstack((current, np.reshape(t, [3,1])))
self.rotation_translation.append(rt)
def _update_intrinsics(self):
self.intrinsics = self._Ks
| 24.411765 | 144 | 0.702811 | 195 | 1,245 | 4.25641 | 0.235897 | 0.026506 | 0.193976 | 0.019277 | 0.349398 | 0.277108 | 0.245783 | 0.089157 | 0.089157 | 0 | 0 | 0.030784 | 0.138956 | 1,245 | 51 | 145 | 24.411765 | 0.74347 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.033333 | 0 | 0.266667 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
362f493d8462bb8006f529fc1fed6929dd628362 | 1,206 | py | Python | providers/scoop_mock_provider.py | prezesp/scoop-viewer | 115f413979ba2e4e766e334f0240082a9343e314 | [
"MIT"
] | 86 | 2018-07-17T14:21:05.000Z | 2022-03-29T03:00:40.000Z | providers/scoop_mock_provider.py | prezesp/scoop-viewer | 115f413979ba2e4e766e334f0240082a9343e314 | [
"MIT"
] | 16 | 2018-04-24T22:45:24.000Z | 2021-12-15T08:37:38.000Z | providers/scoop_mock_provider.py | prezesp/scoop-viewer | 115f413979ba2e4e766e334f0240082a9343e314 | [
"MIT"
] | 5 | 2018-03-28T18:24:52.000Z | 2022-01-08T11:28:31.000Z | """ Module to interact with scoop. """
from subprocess import Popen, PIPE # nosec
import os
class ScoopMockProvider:
""" Module to interact with scoop. """
def __init__(self):
self.version = 'unknown'
def get_version(self):
pass
def __run_scoop(self, args, universal_newlines=False):
workdir = os.path.dirname(os.path.realpath(__file__))
return Popen(['python', os.path.join(workdir, 'mock', 'scoop.py')] + args,
stdin=PIPE, stdout=PIPE, stderr=PIPE,
universal_newlines=universal_newlines) # nosec
def get_installed(self): # pylint: disable=R0201
""" Get all installed app from scoop. """
stdout, _ = self.__run_scoop(['list']).communicate()
stdout = stdout.decode("utf-8")
return [a.strip().split(' ')[0] for a in stdout.split('\n')]
def install(self, app, file_size_wrapper): # pylint: disable=R0201
""" Install app through scoop. """
_, _ = self.__run_scoop(['install', app]).communicate()
def uninstall(self, app): # pylint: disable=R0201
""" Uninstal app. """
_, _ = self.__run_scoop(['uninstall', app]).communicate()
| 32.594595 | 82 | 0.609453 | 139 | 1,206 | 5.057554 | 0.453237 | 0.045519 | 0.076814 | 0.056899 | 0.071124 | 0 | 0 | 0 | 0 | 0 | 0 | 0.015385 | 0.245439 | 1,206 | 36 | 83 | 33.5 | 0.757143 | 0.182421 | 0 | 0 | 0 | 0 | 0.055731 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.3 | false | 0.05 | 0.1 | 0 | 0.55 | 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 |
362ff49962e9b464199213d8822138a4aa8efdf5 | 515 | py | Python | services/movies_streaming_converter/src/models/convertation.py | fuodorov/yacinema | 43ad869575fbaab7c7056229538638666aa87110 | [
"MIT"
] | null | null | null | services/movies_streaming_converter/src/models/convertation.py | fuodorov/yacinema | 43ad869575fbaab7c7056229538638666aa87110 | [
"MIT"
] | null | null | null | services/movies_streaming_converter/src/models/convertation.py | fuodorov/yacinema | 43ad869575fbaab7c7056229538638666aa87110 | [
"MIT"
] | 1 | 2021-09-30T09:49:40.000Z | 2021-09-30T09:49:40.000Z | import datetime
import uuid
from typing import Optional
from models.base import CustomBaseModel
class ConvertVideoIn(CustomBaseModel):
source_path: str
destination_path: str
resolution: str
codec_name: Optional[str] = None
display_aspect_ratio: Optional[str] = None
fps: Optional[int] = None
class ConvertVideoCreate(ConvertVideoIn):
id: uuid.UUID = uuid.uuid4()
created_at: datetime.datetime = datetime.datetime.now()
class ConvertVideoOut(CustomBaseModel):
result: bool
| 21.458333 | 59 | 0.751456 | 59 | 515 | 6.457627 | 0.559322 | 0.125984 | 0.07874 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002347 | 0.172816 | 515 | 23 | 60 | 22.391304 | 0.892019 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.25 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
3632e12e345819f464e0f6feced15ba246770c00 | 5,832 | py | Python | quadpy/triangle/_laursen_gellert.py | dariusarnold/quadpy | 9dc7c1ebff99d15ae57ed9195cde94d97a599be8 | [
"MIT"
] | null | null | null | quadpy/triangle/_laursen_gellert.py | dariusarnold/quadpy | 9dc7c1ebff99d15ae57ed9195cde94d97a599be8 | [
"MIT"
] | null | null | null | quadpy/triangle/_laursen_gellert.py | dariusarnold/quadpy | 9dc7c1ebff99d15ae57ed9195cde94d97a599be8 | [
"MIT"
] | null | null | null | from sympy import Rational as frac
from ..helpers import article
from ._helpers import TriangleScheme, concat, s1, s2, s3
citation = article(
authors=["M.E. Laursen", "M. Gellert"],
title="Some criteria for numerically integrated matrices and quadrature formulas for triangles",
journal="International Journal for Numerical Methods in Engineering",
volume="12",
number="1",
year="1978",
pages="67–76",
url="https://doi.org/10.1002/nme.1620120107",
)
def laursen_gellert_01():
weights, points = s3(1)
return TriangleScheme("Laursen-Gellert 1", weights, points, 1, citation)
def laursen_gellert_02a():
weights, points = s2([frac(1, 3), frac(1, 6)])
return TriangleScheme("Laursen-Gellert 2a", weights, points, 2, citation)
def laursen_gellert_02b():
weights, points = s2([frac(1, 3), frac(1, 2)])
return TriangleScheme("Laursen-Gellert 2b", weights, points, 2, citation)
def laursen_gellert_03():
weights, points = concat(s3(-frac(9, 16)), s2([frac(25, 48), frac(1, 5)]))
return TriangleScheme("Laursen-Gellert 3", weights, points, 3, citation)
def laursen_gellert_04():
weights, points = s1([1.0 / 6.0, 0.659027622374092, 0.231933368553031])
return TriangleScheme("Laursen-Gellert 4", weights, points, 3, citation)
def laursen_gellert_05():
weights, points = s2(
[0.109951743655322, 0.091576213509771], [0.223381589678011, 0.445948490915965]
)
return TriangleScheme("Laursen-Gellert 5", weights, points, 4, citation)
def laursen_gellert_06():
weights, points = concat(
s3(3.0 / 8.0), s1([5.0 / 48.0, 0.736712498968435, 0.237932366472434])
)
return TriangleScheme("Laursen-Gellert 6", weights, points, 4, citation)
def laursen_gellert_07():
weights, points = concat(
s3(9.0 / 40.0),
s2(
[0.125939180544827, 0.101286507323456],
[0.132394152788506, 0.470142064105115],
),
)
return TriangleScheme("Laursen-Gellert 7", weights, points, 5, citation)
def laursen_gellert_08():
weights, points = concat(
s2([0.205950504760887, 0.437525248383384]),
s1([0.063691414286223, 0.797112651860071, 0.165409927389841]),
)
return TriangleScheme("Laursen-Gellert 8", weights, points, 5, citation)
def laursen_gellert_09():
weights, points = concat(
s2(
[0.050844906370207, 0.063089014491502],
[0.116786275726379, 0.249286745170910],
),
s1([0.082851075618374, 0.636502499121399, 0.310352451033785]),
)
return TriangleScheme("Laursen-Gellert 9", weights, points, 6, citation)
def laursen_gellert_10():
weights, points = concat(
s3(-0.149570044467670),
s2(
[+0.175615257433204, 0.260345966079038],
[+0.053347235608839, 0.065130102902216],
),
s1([+0.077113760890257, 0.638444188569809, 0.312865496004875]),
)
return TriangleScheme("Laursen-Gellert 10", weights, points, 7, citation)
def laursen_gellert_11():
weights, points = concat(
s2([0.053077801790233, 0.064930513159165]),
s1(
[0.070853083692136, 0.284575584249173, 0.517039939069325],
[0.069274682079415, 0.313559184384932, 0.043863471792371],
),
)
return TriangleScheme("Laursen-Gellert 11", weights, points, 7, citation)
def laursen_gellert_12():
weights, points = concat(
s3(0.144315607677787),
s2(
[0.103217370534718, 0.170569307751761],
[0.032458497623198, 0.050547228317031],
[0.095091634267284, 0.459292588292723],
),
s1([0.027230314174435, 0.008394777409958, 0.263112829634638]),
)
return TriangleScheme("Laursen-Gellert 12", weights, points, 8, citation)
def laursen_gellert_13():
weights, points = concat(
s3(0.097135796282799),
s2(
[0.031334700227139, 0.489682519198738],
[0.077827541004774, 0.437089591492937],
[0.079647738927210, 0.188203535619033],
[0.025577675658698, 0.044729513394453],
),
s1([0.043283539377289, 0.036838412054736, 0.221962989160766]),
)
return TriangleScheme("Laursen-Gellert 13", weights, points, 9, citation)
def laursen_gellert_14():
weights, points = concat(
s2(
[0.051617202569021, 0.481519834783311],
[0.094080073458356, 0.403603979817940],
[0.025993571032320, 0.045189009784377],
),
s1(
[0.045469538047619, 0.136991201264904, 0.218290070971381],
[0.035351705089199, 0.030424361728820, 0.222063165537318],
),
)
return TriangleScheme("Laursen-Gellert 14", weights, points, 9, citation)
def laursen_gellert_15a():
weights, points = concat(
s3(0.079894504741240),
s2(
[0.071123802232377, 0.425086210602091],
[0.008223818690464, 0.023308867510000],
),
s1(
[0.045430592296170, 0.147925626209534, 0.223766973576973],
[0.037359856234305, 0.029946031954171, 0.358740141864431],
[0.030886656884564, 0.035632559587504, 0.143295370426867],
),
)
return TriangleScheme("Laursen-Gellert 15a", weights, points, 10, citation)
def laursen_gellert_15b():
weights, points = concat(
s3(0.081743329146286),
s2(
[0.045957963604745, 0.142161101056564],
[0.013352968813150, 0.032055373216944],
),
s1(
[0.063904906396424, 0.148132885783821, 0.321812995288835],
[0.034184648162959, 0.029619889488730, 0.369146781827811],
[0.025297757707288, 0.028367665339938, 0.163701733737182],
),
)
return TriangleScheme("Laursen-Gellert 15b", weights, points, 10, citation)
| 32.043956 | 100 | 0.641632 | 607 | 5,832 | 6.108731 | 0.313015 | 0.128371 | 0.07794 | 0.155879 | 0.250539 | 0.140237 | 0.140237 | 0.014024 | 0 | 0 | 0 | 0.403975 | 0.232167 | 5,832 | 181 | 101 | 32.220994 | 0.42385 | 0 | 0 | 0.241379 | 0 | 0 | 0.088649 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.117241 | false | 0 | 0.02069 | 0 | 0.255172 | 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 |
3645c7b92794db29663c1c763622e5f0554a803c | 1,771 | py | Python | src/commons/big_query/big_query_job_reference.py | Morgenz/bbq | f0fd3f626841c610aee80ad08a61123b7cccb775 | [
"Apache-2.0"
] | 41 | 2018-05-08T11:54:37.000Z | 2022-02-09T21:19:17.000Z | src/commons/big_query/big_query_job_reference.py | Morgenz/bbq | f0fd3f626841c610aee80ad08a61123b7cccb775 | [
"Apache-2.0"
] | 139 | 2018-06-07T13:45:21.000Z | 2021-04-30T20:44:06.000Z | src/commons/big_query/big_query_job_reference.py | Morgenz/bbq | f0fd3f626841c610aee80ad08a61123b7cccb775 | [
"Apache-2.0"
] | 5 | 2019-09-11T12:28:24.000Z | 2022-02-04T21:38:29.000Z | from src.commons.big_query.copy_job_async.result_check.result_check_request import \
ResultCheckRequest
from src.commons.big_query.copy_job_async.task_creator import TaskCreator
class BigQueryJobReference(object):
def __init__(self, project_id, job_id, location):
self.project_id = project_id
self.job_id = job_id
self.location = location
def __str__(self):
return "BigQueryJobReference(projectId:{}, job_id:{}, location: {})" \
.format(self.project_id, self.job_id, self.location)
def __repr__(self):
return self.__str__()
def __eq__(self, other):
return type(other) is BigQueryJobReference \
and self.project_id == other.project_id \
and self.job_id == other.job_id \
and self.location == other.location
def __ne__(self, other):
return not (self == other)
def create_post_copy_action(self, copy_job_request):
TaskCreator.create_copy_job_result_check(
ResultCheckRequest(
task_name_suffix=copy_job_request.task_name_suffix,
copy_job_type_id=copy_job_request.copy_job_type_id,
job_reference=self,
retry_count=copy_job_request.retry_count,
post_copy_action_request=copy_job_request.post_copy_action_request
)
)
def to_json(self):
return dict(project_id=self.project_id,
job_id=self.job_id,
location=self.location)
@classmethod
def from_json(cls, json):
return BigQueryJobReference(project_id=json["project_id"],
job_id=json["job_id"],
location=json["location"])
| 36.142857 | 84 | 0.631846 | 208 | 1,771 | 4.932692 | 0.240385 | 0.053606 | 0.063353 | 0.040936 | 0.177388 | 0.066277 | 0.066277 | 0.066277 | 0 | 0 | 0 | 0 | 0.285714 | 1,771 | 48 | 85 | 36.895833 | 0.811067 | 0 | 0 | 0 | 0 | 0 | 0.046866 | 0.019198 | 0 | 0 | 0 | 0 | 0 | 1 | 0.205128 | false | 0 | 0.051282 | 0.153846 | 0.435897 | 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 |
364be06117f32488ff211fd30ee702031b4b63f0 | 935 | py | Python | make_mozilla/events/tests/test_paginators.py | Mozilla-GitHub-Standards/54c69db06ef83bda60e995a6c34ecfd168ca028994e40ce817295415bb409f0c | f80e7c0cff97a1e9b301aa04015db983c7645778 | [
"BSD-3-Clause"
] | 4 | 2015-05-08T16:58:53.000Z | 2019-09-06T05:30:59.000Z | make_mozilla/events/tests/test_paginators.py | Mozilla-GitHub-Standards/54c69db06ef83bda60e995a6c34ecfd168ca028994e40ce817295415bb409f0c | f80e7c0cff97a1e9b301aa04015db983c7645778 | [
"BSD-3-Clause"
] | 2 | 2019-02-17T17:44:53.000Z | 2019-03-28T03:54:39.000Z | make_mozilla/events/tests/test_paginators.py | Mozilla-GitHub-Standards/54c69db06ef83bda60e995a6c34ecfd168ca028994e40ce817295415bb409f0c | f80e7c0cff97a1e9b301aa04015db983c7645778 | [
"BSD-3-Clause"
] | 7 | 2015-05-21T15:38:29.000Z | 2019-10-28T23:39:06.000Z | from django.utils import unittest
from nose.tools import eq_, ok_
from make_mozilla.events.paginators import results_page
sample_results = [1,2,3,4,5,6,7,8,9,0]
class TestResultsPage(unittest.TestCase):
def test_returns_page_1_if_page_unspecified(self):
page = results_page(sample_results, 4)
eq_(page.number, 1)
def test_returns_page_2_if_asked_for_it(self):
page = results_page(sample_results, 4, page = '2')
eq_(page.number, 2)
def test_returns_page_1_if_asked_for_a_non_number(self):
page = results_page(sample_results, 4, page = 'NaN')
eq_(page.number, 1)
def test_returns_page_3_if_asked_for_a_page_gt_3(self):
page = results_page(sample_results, 4, page = '4')
eq_(page.number, 3)
def test_still_returns_something_if_there_are_no_results(self):
page = results_page([], 4)
eq_(page.number, 1)
| 28.333333 | 67 | 0.686631 | 144 | 935 | 4.048611 | 0.333333 | 0.113208 | 0.145798 | 0.205832 | 0.478559 | 0.425386 | 0.353345 | 0.296741 | 0 | 0 | 0 | 0.036885 | 0.217112 | 935 | 32 | 68 | 29.21875 | 0.759563 | 0 | 0 | 0.15 | 0 | 0 | 0.005348 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.15 | 0 | 0.45 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
3657fec70ed8fedb4b5b14e5e0ae343bef42588d | 2,324 | py | Python | python/src/main/python/pygw/store/rocksdb/options.py | Maxar-Corp/sh-geowave | 675781d3898b50c09ee66f57e74cf788286b05d5 | [
"Apache-2.0"
] | null | null | null | python/src/main/python/pygw/store/rocksdb/options.py | Maxar-Corp/sh-geowave | 675781d3898b50c09ee66f57e74cf788286b05d5 | [
"Apache-2.0"
] | null | null | null | python/src/main/python/pygw/store/rocksdb/options.py | Maxar-Corp/sh-geowave | 675781d3898b50c09ee66f57e74cf788286b05d5 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2013-2020 Contributors to the Eclipse Foundation
#
# See the NOTICE file distributed with this work for additional information regarding copyright
# ownership. All rights reserved. This program and the accompanying materials are made available
# under the terms of the Apache License, Version 2.0 which accompanies this distribution and is
# available at http://www.apache.org/licenses/LICENSE-2.0.txt
#===============================================================================================
from pygw.config import geowave_pkg
from pygw.store import DataStoreOptions
class RocksDBOptions(DataStoreOptions):
"""
RocksDB data store options.
"""
def __init__(self):
"""
Initializes the RocksDB options class.
"""
super().__init__(geowave_pkg.datastore.rocksdb.config.RocksDBOptions())
def set_directory(self, directory):
"""
Sets the directory of the RocksDB database.
Args:
directory (str): The directory for the database.
"""
self._java_ref.setDirectory(directory)
def get_directory(self):
"""
Returns:
The directory for the RocksDB database.
"""
return self._java_ref.getDirectory()
def set_compact_on_write(self, compact_on_write):
"""
Sets whether or not to perform compaction on write.
Args:
compact_on_write (bool): Whether or not to perform compaction on write.
"""
self._java_ref.setCompactOnWrite(compact_on_write)
def is_compact_on_write(self):
"""
Returns:
True if compaction on write is enabled, False otherwise.
"""
return self._java_ref.isCompactOnWrite()
def set_batch_write_size(self, batch_write_size):
"""
Sets the number of entries to be gathered before performing a batch write
operation on the data store.
Args:
batch_write_size (int): The number of entries to write in batch write operations.
"""
self._java_ref.setBatchWriteSize(batch_write_size)
def get_batch_write_size(self):
"""
Returns:
The number of entries to write in batch write operations.
"""
return self._java_ref.getBatchWriteSize()
| 31.835616 | 96 | 0.63167 | 267 | 2,324 | 5.318352 | 0.419476 | 0.039437 | 0.046479 | 0.035915 | 0.133803 | 0.119718 | 0.119718 | 0.119718 | 0.066197 | 0.066197 | 0 | 0.006948 | 0.256885 | 2,324 | 72 | 97 | 32.277778 | 0.815287 | 0.51506 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.411765 | false | 0 | 0.117647 | 0 | 0.764706 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
3665bd678eff29512019ffaccbebf303e9c263a9 | 1,461 | py | Python | composer/trainer/devices/device_cpu.py | IanWorley/composer | e4d443012511b387ad495b4add3b3b101d729741 | [
"Apache-2.0"
] | null | null | null | composer/trainer/devices/device_cpu.py | IanWorley/composer | e4d443012511b387ad495b4add3b3b101d729741 | [
"Apache-2.0"
] | null | null | null | composer/trainer/devices/device_cpu.py | IanWorley/composer | e4d443012511b387ad495b4add3b3b101d729741 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 MosaicML. All Rights Reserved.
"""The CPU device used for training."""
from __future__ import annotations
import logging
from contextlib import contextmanager
from typing import Any, Dict, Generator, TypeVar, Union
import torch
from composer.core import Precision
from composer.trainer.devices.device import Device, T_nnModule
logger = logging.getLogger(__name__)
__all__ = ["DeviceCPU"]
T_nnModule = TypeVar("T_nnModule", bound=torch.nn.Module)
class DeviceCPU(Device):
"""An extension of :class:`~composer.trainer.devices.device.Device` for CPUs.
This class takes no arguments.
"""
dist_backend = "gloo"
_device = torch.device('cpu')
def module_to_device(self, module: T_nnModule) -> T_nnModule:
return module.to(self._device)
def tensor_to_device(self, tensor: torch.Tensor) -> torch.Tensor:
return tensor.to(self._device)
@contextmanager
def precision_context(self, precision: Union[str, Precision]) -> Generator[None, None, None]:
precision = Precision(precision)
if precision == Precision.FP32:
yield
else:
raise ValueError(f"Precision {precision} not supported for a CPU")
def state_dict(self) -> Dict[str, Any]:
# CPU device has no RNG state
return {}
def load_state_dict(self, state: Dict[str, Any]) -> None:
if len(state) != 0:
raise ValueError("CPU device has no state.")
| 27.566038 | 97 | 0.687201 | 184 | 1,461 | 5.298913 | 0.413043 | 0.046154 | 0.045128 | 0.057436 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006066 | 0.21013 | 1,461 | 52 | 98 | 28.096154 | 0.838821 | 0.147159 | 0 | 0 | 0 | 0 | 0.077551 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.172414 | false | 0 | 0.241379 | 0.103448 | 0.62069 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 2 |
36957809b7a097e9aca4a9f73c606e574242991c | 18,656 | py | Python | pysnmp-with-texts/SW-VLAN-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/SW-VLAN-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/SW-VLAN-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 SW-VLAN-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SW-VLAN-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:12:44 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ValueSizeConstraint, ConstraintsUnion, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ConstraintsIntersection", "SingleValueConstraint")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
enterprises, iso, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, Counter32, Integer32, Unsigned32, Gauge32, IpAddress, ObjectIdentity, MibIdentifier, Counter64, TimeTicks, NotificationType = mibBuilder.importSymbols("SNMPv2-SMI", "enterprises", "iso", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "Counter32", "Integer32", "Unsigned32", "Gauge32", "IpAddress", "ObjectIdentity", "MibIdentifier", "Counter64", "TimeTicks", "NotificationType")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
class MacAddress(OctetString):
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(6, 6)
fixedLength = 6
class VlanIndex(Integer32):
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 4094)
class PortList(OctetString):
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(12, 12)
fixedLength = 12
marconi = MibIdentifier((1, 3, 6, 1, 4, 1, 326))
systems = MibIdentifier((1, 3, 6, 1, 4, 1, 326, 2))
external = MibIdentifier((1, 3, 6, 1, 4, 1, 326, 2, 20))
dlink = MibIdentifier((1, 3, 6, 1, 4, 1, 326, 2, 20, 1))
dlinkcommon = MibIdentifier((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 1))
golf = MibIdentifier((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2))
golfproducts = MibIdentifier((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 1))
es2000 = MibIdentifier((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 1, 3))
golfcommon = MibIdentifier((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2))
marconi_mgmt = MibIdentifier((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2)).setLabel("marconi-mgmt")
es2000Mgmt = MibIdentifier((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28))
swL2Mgmt = MibIdentifier((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2))
swVlan = MibIdentifier((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8))
swVlanCtrl = MibIdentifier((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 1))
swMacBaseVlan = MibIdentifier((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 2))
swPortBaseVlan = MibIdentifier((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 3))
swVlanCtrlMode = MibScalar((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("mac-base", 3), ("ieee8021q", 4), ("port-base", 5)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swVlanCtrlMode.setStatus('mandatory')
if mibBuilder.loadTexts: swVlanCtrlMode.setDescription('This object controls which Vlan function will be enable (or disable) when the switch hub restart at the startup (power on) or warm start.')
swVlanInfoStatus = MibScalar((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("mac-base", 3), ("ieee8021q", 4), ("port-base", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: swVlanInfoStatus.setStatus('mandatory')
if mibBuilder.loadTexts: swVlanInfoStatus.setDescription('This object indicates which Vlan function be enable (or disable) in mandatoryly stage. There are no effect when change swVlanCtrlMode vlaue in the system running.')
swVlanSnmpPortVlan = MibScalar((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 1, 3), VlanIndex()).setMaxAccess("readonly")
if mibBuilder.loadTexts: swVlanSnmpPortVlan.setStatus('mandatory')
if mibBuilder.loadTexts: swVlanSnmpPortVlan.setDescription('Indicates the Vlan which the SNMP port belongs to. The value range is 1 to 4094.')
swMacBaseVlanInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 2, 1))
swMacBaseVlanMaxNum = MibScalar((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 2, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: swMacBaseVlanMaxNum.setStatus('mandatory')
if mibBuilder.loadTexts: swMacBaseVlanMaxNum.setDescription('The maximum number of Mac base Vlan allowed by the system.')
swMacBaseVlanAddrMaxNum = MibScalar((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 2, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: swMacBaseVlanAddrMaxNum.setStatus('mandatory')
if mibBuilder.loadTexts: swMacBaseVlanAddrMaxNum.setDescription('The maximum number of entries in Mac-based Vlan address table.')
swMacBaseVlanCtrlTable = MibTable((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 2, 2), )
if mibBuilder.loadTexts: swMacBaseVlanCtrlTable.setStatus('mandatory')
if mibBuilder.loadTexts: swMacBaseVlanCtrlTable.setDescription('A table that contains information about MAC base Vlan entries for which the switch has forwarding and/or filtering information. This information is used by the transparent switching function in determining how to propagate a received frame.')
swMacBaseVlanCtrlEntry = MibTableRow((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 2, 2, 1), ).setIndexNames((0, "SW-VLAN-MIB", "swMacBaseVlanDesc"))
if mibBuilder.loadTexts: swMacBaseVlanCtrlEntry.setStatus('mandatory')
if mibBuilder.loadTexts: swMacBaseVlanCtrlEntry.setDescription('A list of information about a specific MAC base Vlan configuration portlist for which the switch has some forwarding and/or filtering information.')
swMacBaseVlanDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 2, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 12))).setMaxAccess("readonly")
if mibBuilder.loadTexts: swMacBaseVlanDesc.setStatus('mandatory')
if mibBuilder.loadTexts: swMacBaseVlanDesc.setDescription('A textual description of the Mac Base Vlan for memorization. The string cannot set to empty string. There is a default value for this string.')
swMacBaseVlanMacMember = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 2, 2, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: swMacBaseVlanMacMember.setStatus('mandatory')
if mibBuilder.loadTexts: swMacBaseVlanMacMember.setDescription('This object indicates the total number of MAC addresses contained in the VLAN entry.')
swMacBaseVlanCtrlState = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 2, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swMacBaseVlanCtrlState.setStatus('mandatory')
if mibBuilder.loadTexts: swMacBaseVlanCtrlState.setDescription('This object indicates the MacBase Vlan state.')
swMacBaseVlanAddrTable = MibTable((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 2, 3), )
if mibBuilder.loadTexts: swMacBaseVlanAddrTable.setStatus('mandatory')
if mibBuilder.loadTexts: swMacBaseVlanAddrTable.setDescription('A table that contains information about unicast or multicast entries for which the switch has forwarding and/or filtering information. This information is used by the transparent switching function in determining how to propagate a received frame. Note that the priority of MacBaseVlanAddr table entries is lowest than Filtering Table and FDB Table, i.e. if there is a table hash collision between the entries of MacBaseVlanAddr Table and Filtering Table inside the switch H/W address table, then Filtering Table entry overwrite the colliding entry of MacBaseVlanAddr Table. This state is same of FDB table. See swFdbFilterTable and swFdbStaticTable description also.')
swMacBaseVlanAddrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 2, 3, 1), ).setIndexNames((0, "SW-VLAN-MIB", "swMacBaseVlanAddr"))
if mibBuilder.loadTexts: swMacBaseVlanAddrEntry.setStatus('mandatory')
if mibBuilder.loadTexts: swMacBaseVlanAddrEntry.setDescription('A list of information about a specific unicast or multicast MAC address for which the switch has some forwarding and/or filtering information.')
swMacBaseVlanAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 2, 3, 1, 1), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: swMacBaseVlanAddr.setStatus('mandatory')
if mibBuilder.loadTexts: swMacBaseVlanAddr.setDescription('This object indictaes a unicast or multicast MAC address for which the bridge has forwarding and/or filtering information.')
swMacBaseVlanAddrVlanDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 2, 3, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 64))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swMacBaseVlanAddrVlanDesc.setStatus('mandatory')
if mibBuilder.loadTexts: swMacBaseVlanAddrVlanDesc.setDescription('A textual description of the Mac Base Vlan for memorization.')
swMacBaseVlanAddrState = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 2, 3, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("invalid", 2), ("valid", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swMacBaseVlanAddrState.setStatus('mandatory')
if mibBuilder.loadTexts: swMacBaseVlanAddrState.setDescription('This object indicates the MacBase Vlan Address entry state. other(1) - this entry is currently in use but the conditions under which it will remain so are different from each of the following values. invalid(2) - writing this value to the object, and then the corresponding entry will be removed from the table. valid(3) - this entry is reside in the table.')
swMacBaseVlanAddrStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 2, 3, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("apply", 2), ("not-apply", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: swMacBaseVlanAddrStatus.setStatus('mandatory')
if mibBuilder.loadTexts: swMacBaseVlanAddrStatus.setDescription('This object indicates the MacBase Vlan Address entry state. other(1) - this entry is currently in use but the conditions under which it will remain so are different from each of the following values. apply(2) - this entry is currently in use and reside in the table. not-apply(3) - this entry is reside in the table but currently not in use due to conflict with filter table.')
swPortBaseVlanTotalNum = MibScalar((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 3, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: swPortBaseVlanTotalNum.setStatus('mandatory')
if mibBuilder.loadTexts: swPortBaseVlanTotalNum.setDescription('The total number of Port-Base Vlan which is in enabled state within this switch hub.')
swPortBaseVlanDefaultVlanTable = MibTable((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 3, 2), )
if mibBuilder.loadTexts: swPortBaseVlanDefaultVlanTable.setStatus('mandatory')
if mibBuilder.loadTexts: swPortBaseVlanDefaultVlanTable.setDescription('A table that contains default Port-Based VLAN list entries for the switch. The entry (Vid = 1,i.e. swPortBaseVlanDefaultPvid = 1) is defalut Port-Based VLAN , maintained by system.')
swPortBaseVlanDefaultVlanEntry = MibTableRow((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 3, 2, 1), ).setIndexNames((0, "SW-VLAN-MIB", "swPortBaseVlanDefaultPvid"))
if mibBuilder.loadTexts: swPortBaseVlanDefaultVlanEntry.setStatus('mandatory')
if mibBuilder.loadTexts: swPortBaseVlanDefaultVlanEntry.setDescription('A list of default Port-Based VLAN information in swPortBaseVlanDefaultVlanTable.')
swPortBaseVlanDefaultPvid = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 3, 2, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: swPortBaseVlanDefaultPvid.setStatus('mandatory')
if mibBuilder.loadTexts: swPortBaseVlanDefaultPvid.setDescription('This object indicates the default Port-Base Vlan ID. It occupies only 1 entry in VLAN table, with VID=1.')
swPortBaseVlanDefaultDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 3, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 12))).setMaxAccess("readonly")
if mibBuilder.loadTexts: swPortBaseVlanDefaultDesc.setStatus('mandatory')
if mibBuilder.loadTexts: swPortBaseVlanDefaultDesc.setDescription('A textual description of the Port-Base Vlan.')
swPortBaseVlanDefaultPortList = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 3, 2, 1, 3), PortList()).setMaxAccess("readonly")
if mibBuilder.loadTexts: swPortBaseVlanDefaultPortList.setStatus('mandatory')
if mibBuilder.loadTexts: swPortBaseVlanDefaultPortList.setDescription('This object indicates the port member set of the specified Vlan. Each Vlan has a octect string to indicate the port map. The most significant bit represents the lowest numbered port, and the least significant bit represents the highest numbered port.')
swPortBaseVlanDefaultPortNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 3, 2, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: swPortBaseVlanDefaultPortNumber.setStatus('mandatory')
if mibBuilder.loadTexts: swPortBaseVlanDefaultPortNumber.setDescription('This object indicates the number of ports of the entry.')
swPortBaseVlanConfigTable = MibTable((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 3, 3), )
if mibBuilder.loadTexts: swPortBaseVlanConfigTable.setStatus('mandatory')
if mibBuilder.loadTexts: swPortBaseVlanConfigTable.setDescription("A table that contains Port-Based VLAN list entries for the switch. The device can't support port overlapping in Port-Based VLAN.")
swPortBaseVlanConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 3, 3, 1), ).setIndexNames((0, "SW-VLAN-MIB", "swPortBaseVlanConfigPvid"))
if mibBuilder.loadTexts: swPortBaseVlanConfigEntry.setStatus('mandatory')
if mibBuilder.loadTexts: swPortBaseVlanConfigEntry.setDescription('A list of information about a specific Port-Based VLAN configuration in swPortBaseVlanConfigTable.')
swPortBaseVlanConfigPvid = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 3, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(2, 12))).setMaxAccess("readonly")
if mibBuilder.loadTexts: swPortBaseVlanConfigPvid.setStatus('mandatory')
if mibBuilder.loadTexts: swPortBaseVlanConfigPvid.setDescription('This object indicates the Port-Base Vlan ID. There are up to 11 entries for current product now. The object range varies from 2 to 12.')
swPortBaseVlanConfigDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 3, 3, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 12))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swPortBaseVlanConfigDesc.setStatus('mandatory')
if mibBuilder.loadTexts: swPortBaseVlanConfigDesc.setDescription('A textual description of the Port-Base Vlan. It cannot be a null string. And each description must be unique in the table.')
swPortBaseVlanConfigPortList = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 3, 3, 1, 3), PortList()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swPortBaseVlanConfigPortList.setStatus('mandatory')
if mibBuilder.loadTexts: swPortBaseVlanConfigPortList.setDescription('This object indicates which ports are belong to the Vlan. Each Vlan has a octect string to indicate with port map. The most significant bit represents the lowest numbered port, and the least significant bit represents the highest numbered port.')
swPortBaseVlanConfigPortNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 20, 1, 2, 2, 2, 28, 2, 8, 3, 3, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: swPortBaseVlanConfigPortNumber.setStatus('mandatory')
if mibBuilder.loadTexts: swPortBaseVlanConfigPortNumber.setDescription('This object indicates the number of ports of the entry.')
mibBuilder.exportSymbols("SW-VLAN-MIB", marconi=marconi, swPortBaseVlanDefaultVlanEntry=swPortBaseVlanDefaultVlanEntry, swVlan=swVlan, swPortBaseVlanConfigTable=swPortBaseVlanConfigTable, golf=golf, swVlanCtrl=swVlanCtrl, swMacBaseVlanAddrEntry=swMacBaseVlanAddrEntry, swPortBaseVlanDefaultDesc=swPortBaseVlanDefaultDesc, swMacBaseVlanAddr=swMacBaseVlanAddr, swMacBaseVlanMacMember=swMacBaseVlanMacMember, swPortBaseVlanConfigPortNumber=swPortBaseVlanConfigPortNumber, swPortBaseVlanDefaultVlanTable=swPortBaseVlanDefaultVlanTable, swPortBaseVlan=swPortBaseVlan, swMacBaseVlanAddrMaxNum=swMacBaseVlanAddrMaxNum, swL2Mgmt=swL2Mgmt, dlinkcommon=dlinkcommon, swPortBaseVlanConfigEntry=swPortBaseVlanConfigEntry, swPortBaseVlanConfigPortList=swPortBaseVlanConfigPortList, swVlanSnmpPortVlan=swVlanSnmpPortVlan, swMacBaseVlanCtrlState=swMacBaseVlanCtrlState, PortList=PortList, external=external, swMacBaseVlanAddrStatus=swMacBaseVlanAddrStatus, swPortBaseVlanTotalNum=swPortBaseVlanTotalNum, swMacBaseVlan=swMacBaseVlan, swVlanInfoStatus=swVlanInfoStatus, swMacBaseVlanDesc=swMacBaseVlanDesc, swPortBaseVlanDefaultPvid=swPortBaseVlanDefaultPvid, dlink=dlink, MacAddress=MacAddress, swVlanCtrlMode=swVlanCtrlMode, golfproducts=golfproducts, systems=systems, swMacBaseVlanCtrlTable=swMacBaseVlanCtrlTable, swMacBaseVlanAddrVlanDesc=swMacBaseVlanAddrVlanDesc, marconi_mgmt=marconi_mgmt, swMacBaseVlanMaxNum=swMacBaseVlanMaxNum, swMacBaseVlanCtrlEntry=swMacBaseVlanCtrlEntry, swPortBaseVlanDefaultPortList=swPortBaseVlanDefaultPortList, swMacBaseVlanAddrTable=swMacBaseVlanAddrTable, swPortBaseVlanConfigPvid=swPortBaseVlanConfigPvid, swPortBaseVlanConfigDesc=swPortBaseVlanConfigDesc, VlanIndex=VlanIndex, swPortBaseVlanDefaultPortNumber=swPortBaseVlanDefaultPortNumber, golfcommon=golfcommon, swMacBaseVlanAddrState=swMacBaseVlanAddrState, es2000Mgmt=es2000Mgmt, es2000=es2000, swMacBaseVlanInfo=swMacBaseVlanInfo)
| 143.507692 | 1,908 | 0.767206 | 2,434 | 18,656 | 5.879211 | 0.136812 | 0.011181 | 0.085115 | 0.012858 | 0.524109 | 0.377568 | 0.35856 | 0.337945 | 0.307407 | 0.269113 | 0 | 0.070702 | 0.109938 | 18,656 | 129 | 1,909 | 144.620155 | 0.791087 | 0.016938 | 0 | 0 | 0 | 0.142857 | 0.306912 | 0.009547 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.05042 | 0 | 0.117647 | 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 |
3696d9a0ae665b8ea6b0dd59b9953426ce1a1124 | 424 | py | Python | fastparquet/__init__.py | jorisvandenbossche/fastparquet | e783eca9499883a6f025f18cce709c226e21402f | [
"Apache-2.0"
] | null | null | null | fastparquet/__init__.py | jorisvandenbossche/fastparquet | e783eca9499883a6f025f18cce709c226e21402f | [
"Apache-2.0"
] | null | null | null | fastparquet/__init__.py | jorisvandenbossche/fastparquet | e783eca9499883a6f025f18cce709c226e21402f | [
"Apache-2.0"
] | null | null | null | """parquet - read parquet files."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from .thrift_structures import parquet_thrift
from .core import read_thrift
from .writer import write
from . import core, schema, converted_types, api
from .api import ParquetFile
from .util import ParquetException
__version__ = "0.3.2"
| 28.266667 | 48 | 0.823113 | 57 | 424 | 5.649123 | 0.491228 | 0.124224 | 0.198758 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008086 | 0.125 | 424 | 14 | 49 | 30.285714 | 0.859838 | 0.068396 | 0 | 0 | 0 | 0 | 0.012853 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.909091 | 0 | 0.909091 | 0.090909 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
369bd233d08fbdcd2a214a81e7c5f52a9ce6ed4e | 551 | py | Python | OSIx/modules/temp_file_manager.py | guibacellar/OSIx | 058714c1870bde0d794452b32ad0e62d544bdd90 | [
"Apache-2.0"
] | 1 | 2021-08-17T18:45:07.000Z | 2021-08-17T18:45:07.000Z | OSIx/modules/temp_file_manager.py | guibacellar/OSIx | 058714c1870bde0d794452b32ad0e62d544bdd90 | [
"Apache-2.0"
] | 12 | 2021-08-11T18:24:32.000Z | 2021-08-23T14:57:36.000Z | OSIx/modules/temp_file_manager.py | guibacellar/OSIx | 058714c1870bde0d794452b32ad0e62d544bdd90 | [
"Apache-2.0"
] | null | null | null | """Temporary Files Manager."""
import logging
from configparser import ConfigParser
from typing import Dict
from OSIx.core.base_module import BaseModule
from OSIx.core.temp_file import TempFileHandler
logger = logging.getLogger()
class TempFileManager(BaseModule):
"""Temporary File Manager."""
def run(self, config: ConfigParser, args: Dict, data: Dict) -> None:
"""Execute Module."""
if args['purge_temp_files']:
TempFileHandler.purge()
else:
TempFileHandler.remove_expired_entries()
| 22.04 | 72 | 0.69873 | 60 | 551 | 6.316667 | 0.583333 | 0.042216 | 0.063325 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.201452 | 551 | 24 | 73 | 22.958333 | 0.861364 | 0.116152 | 0 | 0 | 0 | 0 | 0.03397 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.083333 | false | 0 | 0.416667 | 0 | 0.583333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
369df66a1e15a4a67f881d9565ed02382eda4bee | 1,237 | py | Python | sysinv/sysinv/sysinv/sysinv/tests/helm/test_base.py | albailey/config | 40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9 | [
"Apache-2.0"
] | 10 | 2020-02-07T18:57:44.000Z | 2021-09-11T10:29:34.000Z | sysinv/sysinv/sysinv/sysinv/tests/helm/test_base.py | albailey/config | 40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9 | [
"Apache-2.0"
] | 1 | 2021-01-14T12:01:55.000Z | 2021-01-14T12:01:55.000Z | sysinv/sysinv/sysinv/sysinv/tests/helm/test_base.py | albailey/config | 40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9 | [
"Apache-2.0"
] | 10 | 2020-10-13T08:37:46.000Z | 2022-02-09T00:21:25.000Z | # Copyright (c) 2021 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
import mock
from sysinv.helm.base import BaseHelm
from sysinv.helm.helm import HelmOperator
from sysinv.tests import base as test_base
class TestHelmBase(test_base.TestCase):
def test_num_replicas_for_platform_app_0_controllers(self):
self.check_num_replicas_for_platform_app(num_provisioned_controllers=0, expected_replicas=1)
def test_num_replicas_for_platform_app_1_controllers(self):
self.check_num_replicas_for_platform_app(num_provisioned_controllers=1, expected_replicas=1)
def test_num_replicas_for_platform_app_2_controllers(self):
self.check_num_replicas_for_platform_app(num_provisioned_controllers=2, expected_replicas=2)
def check_num_replicas_for_platform_app(self, num_provisioned_controllers, expected_replicas):
mock_operator = mock.MagicMock(spec=HelmOperator)
mock_operator.dbapi = mock.MagicMock()
mock_operator.dbapi.count_hosts_matching_criteria.return_value = num_provisioned_controllers
base = BaseHelm(mock_operator)
actual_replicas = base._num_replicas_for_platform_app()
self.assertEqual(actual_replicas, expected_replicas)
| 37.484848 | 100 | 0.805174 | 166 | 1,237 | 5.560241 | 0.307229 | 0.095341 | 0.121343 | 0.190683 | 0.449621 | 0.449621 | 0.381365 | 0.346696 | 0.346696 | 0.346696 | 0 | 0.013953 | 0.130962 | 1,237 | 32 | 101 | 38.65625 | 0.844651 | 0.063864 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.055556 | 1 | 0.222222 | false | 0 | 0.222222 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
369eb5cfd592210dd63a2cf4b6ab2112394dc2c9 | 612 | py | Python | tests/test_as_decimal.py | lkattis-signal/SignalSDK | f085b9cae0495f4e016b9982df271efc6fd0a8f5 | [
"Apache-2.0"
] | 10 | 2020-09-29T06:36:45.000Z | 2022-03-14T18:15:50.000Z | tests/test_as_decimal.py | lkattis-signal/SignalSDK | f085b9cae0495f4e016b9982df271efc6fd0a8f5 | [
"Apache-2.0"
] | 53 | 2020-10-08T10:05:00.000Z | 2022-03-29T14:21:18.000Z | tests/test_as_decimal.py | lkattis-signal/SignalSDK | f085b9cae0495f4e016b9982df271efc6fd0a8f5 | [
"Apache-2.0"
] | 5 | 2020-09-25T07:48:04.000Z | 2021-11-23T07:08:56.000Z | from decimal import Decimal
from signal_ocean._internals import as_decimal
def test_handles_None():
assert as_decimal(None) is None
def test_handles_empty_strings():
assert as_decimal("") is None
def test_parses_strings():
assert as_decimal("12.345") == Decimal("12.345")
def test_handles_0():
assert as_decimal(0.0) == Decimal("0.0")
def test_converts_floats_to_decimals_exactly():
dec = as_decimal(24.390015)
# due to float imprecision, will be 24.39001599999...
assert dec != Decimal(24.390015)
# will be precisely 24.390015
assert dec == Decimal("24.390015")
| 20.4 | 57 | 0.714052 | 90 | 612 | 4.611111 | 0.377778 | 0.13012 | 0.144578 | 0.062651 | 0.115663 | 0 | 0 | 0 | 0 | 0 | 0 | 0.118812 | 0.174837 | 612 | 29 | 58 | 21.103448 | 0.70297 | 0.129085 | 0 | 0 | 0 | 0 | 0.045283 | 0 | 0 | 0 | 0 | 0 | 0.428571 | 1 | 0.357143 | false | 0 | 0.142857 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
36ae9333eaabebfa5f7eb2cc25d299b4c6d41d73 | 4,501 | py | Python | tests/test_hexamer/test_search_hexamer.py | zyxue/kleat3 | 861b02797937eea51e99f9c29d195fb3e7dea376 | [
"MIT"
] | null | null | null | tests/test_hexamer/test_search_hexamer.py | zyxue/kleat3 | 861b02797937eea51e99f9c29d195fb3e7dea376 | [
"MIT"
] | null | null | null | tests/test_hexamer/test_search_hexamer.py | zyxue/kleat3 | 861b02797937eea51e99f9c29d195fb3e7dea376 | [
"MIT"
] | null | null | null | import unittest
from kleat.hexamer.search import plus_search, minus_search, search
from kleat.hexamer.hexamer import extract_seq
class TestSearchHexamer(unittest.TestCase):
def test_plus_search(self):
self.assertEqual(plus_search('GGGAATAAAG', 9), ('AATAAA', 16, 3))
self.assertEqual(plus_search('GGGAATAAA', 9), ('AATAAA', 16, 4))
self.assertEqual(plus_search('GGGAATAAAGG', 9), ('AATAAA', 16, 2))
self.assertEqual(plus_search('GGGATTAAAGG', 9), ('ATTAAA', 15, 2))
self.assertEqual(plus_search('GGGAATAA', 9), None)
self.assertEqual(plus_search('GAATAAAC', 10), ('AATAAA', 16, 4))
self.assertEqual(plus_search('GGGGCTAC', 20), ('GGGGCT', 1, 13))
self.assertEqual(plus_search('GTTTATTC', 6), None)
def test_plus_search_lowercase(self):
seq = 'GAATaaaC'
# 4567890
# 1
self.assertEqual(plus_search(seq, 10), ('AATAAA', 16, 4))
def test_plus_search_take_right_most_hexamer(self):
self.assertEqual(plus_search('CAATAAANAATAAAC', 200), ('AATAAA', 16, 194))
def test_plus_search_take_right_most_hexamer_with_Ns(self):
self.assertEqual(plus_search('GCATTAAAAATNAAC', 200), ('ATTAAA', 15, 188))
def test_plus_search_take_the_strongest_hexamer(self):
self.assertEqual(plus_search('GCAATAAAATTAAAC', 200), ('AATAAA', 16, 188))
def test_minus_search(self):
seq = 'ATTTATTCCC'
# 90123456789 <- one coord
# 1 <- ten coord
self.assertEqual(minus_search(seq, 9), ('AATAAA', 16, 15))
seq = 'ATTTAATCCC'
# 90123456789 <- one coord
# 1 <- ten coord
self.assertEqual(minus_search(seq, 9), ('ATTAAA', 15, 15))
self.assertEqual(minus_search('GTTTATTC', 1), ('AATAAA', 16, 7))
self.assertEqual(minus_search('ATCGTATATTGC', 5), ('AATATA', 10, 14))
def test_minus_search_lowercase(self):
self.assertEqual(minus_search('GTttattc', 1), ('AATAAA', 16, 7))
def test_minus_search_take_left_most_hexamer(self):
self.assertEqual(minus_search('GTTTATTTTTATTCG', 10), ('AATAAA', 16, 16))
def test_minus_search_take_left_most_hexamer_with_Ns(self):
self.assertEqual(minus_search('GTTTATTNTTTATTNNNTGTATTCG', 10), ('AATAAA', 16, 16))
def test_minus_search_take_the_strongest_hexamer(self):
self.assertEqual(minus_search('GTTTAATNTTTATTNNNTGTATTCG', 20), ('AATAAA', 16, 33))
def test_minus_search_take_the_strongest_hexamer_in_lower_case(self):
self.assertEqual(minus_search('gtttaatntttattnnntgtattcg', 20), ('AATAAA', 16, 33))
class TestSearch(unittest.TestCase):
def test_plus_strand(self):
"""
CaataaaGT
0123456789 <-genome coord
| |
PAS clv
"""
seq = 'CaataaaGT'
clv = 9
self.assertEqual(search('+', clv, seq, 50), ('AATAAA', 16, 2))
def test_minus_strand(self):
"""
GGTTTATT
0123456789 <-genome coord
| |
clv PAS
"""
seq = 'GGTTTATT'
clv = 1
self.assertEqual(search('-', clv, seq, 50), ('AATAAA', 16, 8))
# Good drawing example, utilize them later
# def test_extract_seq_where_for_plus_strand_clv_supported_by_suffix():
# """
# AATAAA AA <-tail of suffix contig
# ACGG┘||||└CGGCC┘ <-suffix contig
# 0123456789012345 <-contig coord
# 1 |
# ...7890123456789012... <-genome coord
# 1 2|
# ^ref_clv
# """
# clv = 11
# strand = '+'
# contig = MagicMock()
# contig.query_sequence = 'ACGGAATAAACGGCCAA'
# contig.cigartuples = ((S.BAM_CMATCH, 15), (S.BAM_CSOFT_CLIP, 2))
# ref_fa = MagicMock()
# assert extract_seq(contig, strand, clv, ref_fa) == 'ACGGAATAAACGGCC'
# def test_extract_seq_where_for_minus_strand_clv_supported_by_suffix():
# """
# TTT TTTATT <-tail of suffix contig
# └AC┘||||└CGGC <-suffix contig
# 012345678901 <-contig coord
# | 1
# ...890123456789... <-genome coord
# | 1
# ^ref_clv
# """
# clv = 11
# strand = '+'
# contig = MagicMock()
# contig.query_sequence = 'TTACTTTATTCGC'
# contig.cigartuples = ((S.BAM_CMATCH, 15), (S.BAM_CSOFT_CLIP, 2))
# ref_fa = MagicMock()
# assert extract_seq(contig, strand, clv, ref_fa) == 'ACTTTATTCGC'
| 36.008 | 91 | 0.608309 | 513 | 4,501 | 5.109162 | 0.249513 | 0.131629 | 0.08699 | 0.11446 | 0.557802 | 0.47272 | 0.427318 | 0.382297 | 0.264784 | 0.205265 | 0 | 0.071322 | 0.255499 | 4,501 | 124 | 92 | 36.298387 | 0.709042 | 0.329038 | 0 | 0 | 0 | 0 | 0.141866 | 0.026015 | 0 | 0 | 0 | 0 | 0.479167 | 1 | 0.270833 | false | 0 | 0.0625 | 0 | 0.375 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
36b37042d59ea92a31e186729793c7340e94c845 | 773 | py | Python | tests/test_quaternionic.py | mhostetter/quaternionic | 159ba7caa41afe33172373ebe4119209577812c1 | [
"MIT"
] | 40 | 2020-08-11T22:13:49.000Z | 2022-03-25T08:10:19.000Z | tests/test_quaternionic.py | mhostetter/quaternionic | 159ba7caa41afe33172373ebe4119209577812c1 | [
"MIT"
] | 28 | 2020-08-27T17:09:34.000Z | 2022-03-27T19:56:57.000Z | tests/test_quaternionic.py | mhostetter/quaternionic | 159ba7caa41afe33172373ebe4119209577812c1 | [
"MIT"
] | 6 | 2020-09-05T13:12:51.000Z | 2022-03-10T02:59:05.000Z | import warnings
import numpy as np
import quaternionic
import pytest
def test_constants():
for const in ['one', 'x', 'y', 'z', 'i', 'j', 'k']:
assert hasattr(quaternionic, const)
c = getattr(quaternionic, const)
with pytest.raises(ValueError):
c *= 1.2
assert np.equal(quaternionic.one, quaternionic.array(1, 0, 0, 0))
assert np.equal(quaternionic.x, quaternionic.array(0, 1, 0, 0))
assert np.equal(quaternionic.i, quaternionic.array(0, 1, 0, 0))
assert np.equal(quaternionic.y, quaternionic.array(0, 0, 1, 0))
assert np.equal(quaternionic.j, quaternionic.array(0, 0, 1, 0))
assert np.equal(quaternionic.z, quaternionic.array(0, 0, 0, 1))
assert np.equal(quaternionic.k, quaternionic.array(0, 0, 0, 1))
| 38.65 | 69 | 0.659767 | 115 | 773 | 4.426087 | 0.278261 | 0.039293 | 0.178782 | 0.343811 | 0.497053 | 0.497053 | 0.361493 | 0.361493 | 0.361493 | 0.361493 | 0 | 0.047847 | 0.188875 | 773 | 19 | 70 | 40.684211 | 0.763955 | 0 | 0 | 0 | 0 | 0 | 0.011643 | 0 | 0 | 0 | 0 | 0 | 0.470588 | 1 | 0.058824 | false | 0 | 0.235294 | 0 | 0.294118 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
36b4217be63fc502a7a8b608b61caf14733e4c6e | 1,477 | py | Python | carla_ros_bridge/src/carla_ros_bridge/coordinate_converter.py | OlafOrangi/ros-bridge | 732d5f99e5e1f4d0ea7e4873ccc34f0a40f1203c | [
"MIT"
] | null | null | null | carla_ros_bridge/src/carla_ros_bridge/coordinate_converter.py | OlafOrangi/ros-bridge | 732d5f99e5e1f4d0ea7e4873ccc34f0a40f1203c | [
"MIT"
] | null | null | null | carla_ros_bridge/src/carla_ros_bridge/coordinate_converter.py | OlafOrangi/ros-bridge | 732d5f99e5e1f4d0ea7e4873ccc34f0a40f1203c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from geometry_msgs.msg import Pose, Point, Quaternion, Vector3
import numpy as np
import tf
def convert_pose(pose):
"""
convert pose between left and right-hand coordinate system
:param pose: pose to be converted
:return: converted pose
"""
data = Pose()
data.position = convert_vector3(pose.position)
data.orientation = convert_quaternion(pose.orientation)
return data
def convert_vector3(pt):
"""
convert vector3 between left and right-hand coordinate system
:param pt: point to be converted
:return: converted point
"""
return Vector3(pt.x, -pt.y, pt.z)
def convert_point(pt):
"""
convert point between left and right-hand coordinate system
:param pt: point to be converted
:return: converted point
"""
return Point(pt.x, -pt.y, pt.z)
def convert_quaternion(q):
"""
convert quaternion between left and right-hand coordinate system
:param q: quaternion to be converted
:return: converted quaternion
"""
euler = tf.transformations.euler_from_quaternion([q.x, q.y, q.z, q.w])
euler = (euler[0], euler[1], -euler[2])
return Quaternion(*tf.transformations.quaternion_from_euler(*euler))
def convert_euler(euler):
"""
convert euler angles between left and right-hand coordinate system
:param euler: euler angles to be converted
:return: converted euler angles
"""
return Vector3(euler.x, euler.y, -euler.z)
| 26.375 | 74 | 0.688558 | 201 | 1,477 | 5 | 0.228856 | 0.049751 | 0.069652 | 0.094527 | 0.431841 | 0.348259 | 0.348259 | 0.348259 | 0.179104 | 0.179104 | 0 | 0.007712 | 0.209885 | 1,477 | 55 | 75 | 26.854545 | 0.85347 | 0.439404 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.277778 | false | 0 | 0.166667 | 0 | 0.722222 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
36c29207131a5d0aabb533544ef1349cab67ea61 | 2,477 | py | Python | src/arch/riscv/RiscvCPU.py | yclin99/CS251A_final_gem5 | 391ca1d7c9484f4d58fce9a4424821dcbb2463ac | [
"BSD-3-Clause"
] | 1 | 2022-03-25T13:18:26.000Z | 2022-03-25T13:18:26.000Z | src/arch/riscv/RiscvCPU.py | yclin99/CS251A_final_gem5 | 391ca1d7c9484f4d58fce9a4424821dcbb2463ac | [
"BSD-3-Clause"
] | 1 | 2022-03-25T14:15:30.000Z | 2022-03-25T14:15:30.000Z | src/arch/riscv/RiscvCPU.py | ksco/gem5-xiangshan | 0baf1b5229885d81d689a677102f0665aaac5514 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2021 Google, Inc.
#
# 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 the copyright holders 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
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from m5.objects.BaseAtomicSimpleCPU import BaseAtomicSimpleCPU
from m5.objects.BaseNonCachingSimpleCPU import BaseNonCachingSimpleCPU
from m5.objects.BaseTimingSimpleCPU import BaseTimingSimpleCPU
from m5.objects.BaseO3CPU import BaseO3CPU
from m5.objects.BaseMinorCPU import BaseMinorCPU
from m5.objects.RiscvDecoder import RiscvDecoder
from m5.objects.RiscvMMU import RiscvMMU
from m5.objects.RiscvInterrupts import RiscvInterrupts
from m5.objects.RiscvISA import RiscvISA
class RiscvCPU:
ArchDecoder = RiscvDecoder
ArchMMU = RiscvMMU
ArchInterrupts = RiscvInterrupts
ArchISA = RiscvISA
class RiscvAtomicSimpleCPU(BaseAtomicSimpleCPU, RiscvCPU):
mmu = RiscvMMU()
class RiscvNonCachingSimpleCPU(BaseNonCachingSimpleCPU, RiscvCPU):
mmu = RiscvMMU()
class RiscvTimingSimpleCPU(BaseTimingSimpleCPU, RiscvCPU):
mmu = RiscvMMU()
class RiscvO3CPU(BaseO3CPU, RiscvCPU):
mmu = RiscvMMU()
class RiscvMinorCPU(BaseMinorCPU, RiscvCPU):
mmu = RiscvMMU()
| 44.232143 | 72 | 0.805006 | 312 | 2,477 | 6.391026 | 0.458333 | 0.027081 | 0.058676 | 0.048144 | 0.092277 | 0.068205 | 0.068205 | 0.068205 | 0.068205 | 0.068205 | 0 | 0.008045 | 0.146952 | 2,477 | 55 | 73 | 45.036364 | 0.935637 | 0.582156 | 0 | 0.208333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.375 | 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 |
36c4f0d8dd30675016f1cde8a4e0b430d5e215ed | 164 | py | Python | misc/validateInput.py | viju4you/Python | 3c4a3a46265e71fc21da62d2cb204d20dcd9ec62 | [
"CC0-1.0"
] | 110 | 2017-03-11T23:37:46.000Z | 2021-07-12T11:51:32.000Z | misc/validateInput.py | viju4you/Python | 3c4a3a46265e71fc21da62d2cb204d20dcd9ec62 | [
"CC0-1.0"
] | null | null | null | misc/validateInput.py | viju4you/Python | 3c4a3a46265e71fc21da62d2cb204d20dcd9ec62 | [
"CC0-1.0"
] | 52 | 2016-11-27T19:50:40.000Z | 2022-02-09T06:37:24.000Z | # Validate input
while True:
print('Enter your age:')
age = input()
if age.isdecimal():
break
print('Pleas enter a number for your age.')
| 16.4 | 47 | 0.597561 | 22 | 164 | 4.454545 | 0.681818 | 0.142857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.286585 | 164 | 9 | 48 | 18.222222 | 0.837607 | 0.085366 | 0 | 0 | 0 | 0 | 0.333333 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.333333 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
36cae8cc11223214274fe92b0ac8c6515461f9fe | 1,825 | py | Python | funing/_ui/about.py | larryw3i/Funing | 8ef88af8766f0246614517fa00f3b322ba722d6b | [
"MIT"
] | 1 | 2021-08-22T05:56:09.000Z | 2021-08-22T05:56:09.000Z | funing/_ui/about.py | larryw3i/Funing | 8ef88af8766f0246614517fa00f3b322ba722d6b | [
"MIT"
] | null | null | null | funing/_ui/about.py | larryw3i/Funing | 8ef88af8766f0246614517fa00f3b322ba722d6b | [
"MIT"
] | null | null | null |
import gettext
import os
import re
import subprocess
import sys
import time
import tkinter as tk
import tkinter.filedialog as tkf
import uuid
import webbrowser
from datetime import date, datetime
from enum import Enum
from tkinter import *
from tkinter import messagebox
from tkinter.ttk import *
import cv2
import numpy as np
import pygubu
import yaml
from PIL import Image, ImageTk
from funing import *
from funing.locale import _
from funing.settings import *
translator = _
class AboutTkApplication(pygubu.TkApplication):
def __init__(self):
# pygubu builder
self.builder = pygubu.Builder(translator)
# ui files
about_ui_path = os.path.join(
os.path.join(project_path, 'ui'), 'about.ui')
# add ui files
self.builder.add_from_file(about_ui_path)
self.mainwindow = None
self.is_showing = False
def on_about_ok_btn_clicked(self):
self.about_ok()
def about_ok(self):
self.trigger()
def quit(self, event=None):
self.mainwindow.withdraw()
self.is_showing = False
def run(self):
if not self.mainwindow:
self.mainwindow = self.builder.get_object('about_toplevel')
self.mainwindow.title(_('About Funing'))
self.builder.get_object('version_label')['text'] = version
self.mainwindow.protocol("WM_DELETE_WINDOW", self.on_closing)
# connect callbacks
self.builder.connect_callbacks(self)
else:
self.mainwindow.deiconify()
self.is_showing = True
def on_closing(self):
self.quit()
def trigger(self):
if not self.is_showing:
self.run()
else:
self.quit()
def view_source_code(self, *args):
webbrowser.open(source_page)
| 23.397436 | 73 | 0.656438 | 229 | 1,825 | 5.074236 | 0.375546 | 0.084337 | 0.04475 | 0.030981 | 0.036145 | 0 | 0 | 0 | 0 | 0 | 0 | 0.000741 | 0.260822 | 1,825 | 77 | 74 | 23.701299 | 0.860638 | 0.029589 | 0 | 0.103448 | 0 | 0 | 0.039093 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.137931 | false | 0 | 0.396552 | 0 | 0.551724 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
36d22a39c7974086f08155ff6bf52d3cb2267f62 | 574 | py | Python | blender/arm/logicnode/transform/LN_separate_quaternion.py | niacdoial/armory | 3f9b633fbf772017c576a3f77695a6c28d9956e1 | [
"Zlib"
] | null | null | null | blender/arm/logicnode/transform/LN_separate_quaternion.py | niacdoial/armory | 3f9b633fbf772017c576a3f77695a6c28d9956e1 | [
"Zlib"
] | null | null | null | blender/arm/logicnode/transform/LN_separate_quaternion.py | niacdoial/armory | 3f9b633fbf772017c576a3f77695a6c28d9956e1 | [
"Zlib"
] | null | null | null | from arm.logicnode.arm_nodes import *
class SeparateQuaternionNode(ArmLogicTreeNode):
"""TO DO."""
bl_idname = 'LNSeparateQuaternionNode'
bl_label = "Separate Quaternion"
arm_section = 'quaternions'
arm_version = 1
def init(self, context):
super(SeparateQuaternionNode, self).init(context)
self.add_input('NodeSocketVector', 'Quaternion')
self.add_output('NodeSocketFloat', 'X')
self.add_output('NodeSocketFloat', 'Y')
self.add_output('NodeSocketFloat', 'Z')
self.add_output('NodeSocketFloat', 'W')
| 31.888889 | 57 | 0.679443 | 58 | 574 | 6.551724 | 0.586207 | 0.092105 | 0.136842 | 0.294737 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.00216 | 0.19338 | 574 | 17 | 58 | 33.764706 | 0.818575 | 0.010453 | 0 | 0 | 0 | 0 | 0.256228 | 0.042705 | 0 | 0 | 0 | 0 | 0 | 1 | 0.076923 | 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 |
36d6b30d341d10b3fc5496de476fb8b78f692188 | 460 | py | Python | openapi/tests/matchers.py | suihanki/openapi | c67ee4ec0284bc1da5bda2c6b8497d6a33bb69a0 | [
"Apache-2.0"
] | 25 | 2016-08-09T18:40:42.000Z | 2019-07-15T20:37:13.000Z | openapi/tests/matchers.py | suihanki/openapi | c67ee4ec0284bc1da5bda2c6b8497d6a33bb69a0 | [
"Apache-2.0"
] | 5 | 2016-08-16T18:34:44.000Z | 2020-03-24T21:01:26.000Z | openapi/tests/matchers.py | suihanki/openapi | c67ee4ec0284bc1da5bda2c6b8497d6a33bb69a0 | [
"Apache-2.0"
] | 11 | 2016-09-14T09:12:49.000Z | 2020-01-31T19:27:07.000Z | """
Custom hamcrest matchers.
"""
from hamcrest.core.base_matcher import BaseMatcher
from json import dumps, loads
class JSONMatcher(BaseMatcher):
"""
Match JSON content.
"""
def __init__(self, s):
self.json = loads(s)
def _matches(self, item):
return loads(item) == self.json
def describe_to(self, description):
description.append_text("json ").append_text(dumps(self.json))
equal_to_json = JSONMatcher
| 18.4 | 70 | 0.671739 | 56 | 460 | 5.321429 | 0.517857 | 0.080537 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.213043 | 460 | 24 | 71 | 19.166667 | 0.823204 | 0.097826 | 0 | 0 | 0 | 0 | 0.012788 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.3 | false | 0 | 0.2 | 0.1 | 0.7 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
36d90f9194a3f4a5adea321bf4cf9176ed0ded59 | 250 | py | Python | Wyklad/OOP/Sheep.py | tborzyszkowski/PythonWorld | dc776d3ab4569297b6b6681e4390aeedf1262c78 | [
"MIT"
] | 3 | 2019-02-24T07:49:33.000Z | 2022-01-09T11:27:21.000Z | Wyklad/OOP/Sheep.py | tborzyszkowski/PythonWorld | dc776d3ab4569297b6b6681e4390aeedf1262c78 | [
"MIT"
] | null | null | null | Wyklad/OOP/Sheep.py | tborzyszkowski/PythonWorld | dc776d3ab4569297b6b6681e4390aeedf1262c78 | [
"MIT"
] | 17 | 2018-12-09T08:44:52.000Z | 2022-01-25T15:08:04.000Z | from Animal import Animal
class Sheep(Animal):
def __init__(self, sheep=None, position=None):
super(Sheep, self).__init__(sheep, position)
def clone(self):
return Sheep(self, None)
def initParams(self):
self.power = 3
self.sign = 'S'
| 16.666667 | 47 | 0.704 | 36 | 250 | 4.666667 | 0.5 | 0.107143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004808 | 0.168 | 250 | 14 | 48 | 17.857143 | 0.802885 | 0 | 0 | 0 | 0 | 0 | 0.004 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.111111 | 0.111111 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 |
7fc685dc97d5c6a0bef64129b54db775abc19da1 | 21,614 | py | Python | polyaxon_schemas/layers/core.py | gzcf/polyaxon-schemas | a381280cd7535f64158d52f0a9eff2afec997d90 | [
"MIT"
] | null | null | null | polyaxon_schemas/layers/core.py | gzcf/polyaxon-schemas | a381280cd7535f64158d52f0a9eff2afec997d90 | [
"MIT"
] | null | null | null | polyaxon_schemas/layers/core.py | gzcf/polyaxon-schemas | a381280cd7535f64158d52f0a9eff2afec997d90 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from marshmallow import fields, post_dump, post_load, validate
from polyaxon_schemas.constraints import ConstraintSchema
from polyaxon_schemas.initializations import (
GlorotNormalInitializerConfig,
InitializerSchema,
ZerosInitializerConfig
)
from polyaxon_schemas.layers.base import BaseLayerConfig, BaseLayerSchema
from polyaxon_schemas.regularizations import RegularizerSchema
from polyaxon_schemas.utils import ACTIVATION_VALUES, DType, StrOrFct
class MaskingSchema(BaseLayerSchema):
mask_value = fields.Int()
class Meta:
ordered = True
@post_load
def make(self, data):
return MaskingConfig(**data)
@post_dump
def unmake(self, data):
return MaskingConfig.remove_reduced_attrs(data)
class MaskingConfig(BaseLayerConfig):
"""Masks a sequence by using a mask value to skip timesteps.
For each timestep in the input tensor (dimension #1 in the tensor),
if all values in the input tensor at that timestep
are equal to `mask_value`, then the timestep will be masked (skipped)
in all downstream layers (as long as they support masking).
If any downstream layer does not support masking yet receives such
an input mask, an exception will be raised.
Example:
Consider a Numpy data array `x` of shape `(samples, timesteps, features)`,
to be fed to a LSTM layer.
You want to mask timestep #3 and #5 because you lack data for
these timesteps. You can:
- set `x[:, 3, :] = 0.` and `x[:, 5, :] = 0.`
- insert a `Masking` layer with `mask_value=0.` before the LSTM layer:
```python
x = Masking(mask_value=0., input_shape=(timesteps, features))(x)
x = LSTM(32)(x)
```
Polyaxonfile usage:
```yaml
Masking:
mask_value: 0
```
"""
IDENTIFIER = 'Masking'
SCHEMA = MaskingSchema
def __init__(self, mask_value=0., **kwargs):
super(MaskingConfig, self).__init__(**kwargs)
self.mask_value = mask_value
class DropoutSchema(BaseLayerSchema):
rate = fields.Float(validate=validate.Range(0, 1))
noise_shape = fields.List(fields.Int(), default=None, missing=None)
seed = fields.Int(default=None, missing=None)
class Meta:
ordered = True
@post_load
def make(self, data):
return DropoutConfig(**data)
@post_dump
def unmake(self, data):
return DropoutConfig.remove_reduced_attrs(data)
class DropoutConfig(BaseLayerConfig):
"""Applies Dropout to the input.
Dropout consists in randomly setting
a fraction `rate` of input units to 0 at each update during training time,
which helps prevent overfitting.
Args:
rate: float between 0 and 1. Fraction of the input units to drop.
noise_shape: 1D integer tensor representing the shape of the
binary dropout mask that will be multiplied with the input.
For instance, if your inputs have shape
`(batch_size, timesteps, features)` and
you want the dropout mask to be the same for all timesteps,
you can use `noise_shape=(batch_size, 1, features)`.
seed: A Python integer to use as random seed.
Polyaxonfile usage:
```yaml
Dropout:
rate: 0.5
```
"""
IDENTIFIER = 'Dropout'
SCHEMA = DropoutSchema
def __init__(self, rate, noise_shape=None, seed=None, **kwargs):
super(DropoutConfig, self).__init__(**kwargs)
self.rate = rate
self.noise_shape = noise_shape
self.seed = seed
class SpatialDropout1DSchema(DropoutSchema):
class Meta:
ordered = True
@post_load
def make(self, data):
return SpatialDropout1DConfig(**data)
@post_dump
def unmake(self, data):
return SpatialDropout1DConfig.remove_reduced_attrs(data)
class SpatialDropout1DConfig(DropoutConfig):
"""Spatial 1D version of Dropout.
This version performs the same function as Dropout, however it drops
entire 1D feature maps instead of individual elements. If adjacent frames
within feature maps are strongly correlated (as is normally the case in
early convolution layers) then regular dropout will not regularize the
activations and will otherwise just result in an effective learning rate
decrease. In this case, SpatialDropout1D will help promote independence
between feature maps and should be used instead.
Args:
rate: float between 0 and 1. Fraction of the input units to drop.
Input shape:
3D tensor with shape:
`(samples, timesteps, channels)`
Output shape:
Same as input
References:
- [Efficient Object Localization Using Convolutional
Networks](https://arxiv.org/abs/1411.4280)
Polyaxonfile usage:
```yaml
SpatialDropout1D:
rate: 0.5
```
"""
IDENTIFIER = 'SpatialDropout1D'
SCHEMA = SpatialDropout1DSchema
class SpatialDropout2DSchema(DropoutSchema):
data_format = fields.Str(default=None, missing=None,
validate=validate.OneOf('channels_first', 'channels_last'))
class Meta:
ordered = True
@post_load
def make(self, data):
return SpatialDropout2DConfig(**data)
@post_dump
def unmake(self, data):
return SpatialDropout2DConfig.remove_reduced_attrs(data)
class SpatialDropout2DConfig(DropoutConfig):
"""Spatial 2D version of Dropout.
This version performs the same function as Dropout, however it drops
entire 2D feature maps instead of individual elements. If adjacent pixels
within feature maps are strongly correlated (as is normally the case in
early convolution layers) then regular dropout will not regularize the
activations and will otherwise just result in an effective learning rate
decrease. In this case, SpatialDropout2D will help promote independence
between feature maps and should be used instead.
Args:
rate: float between 0 and 1. Fraction of the input units to drop.
data_format: 'channels_first' or 'channels_last'.
In 'channels_first' mode, the channels dimension
(the depth) is at index 1,
in 'channels_last' mode is it at index 3.
If you never set it, then it will be "channels_last".
Input shape:
4D tensor with shape:
`(samples, channels, rows, cols)` if data_format='channels_first'
or 4D tensor with shape:
`(samples, rows, cols, channels)` if data_format='channels_last'.
Output shape:
Same as input
References:
- [Efficient Object Localization Using Convolutional
Networks](https://arxiv.org/abs/1411.4280)
Polyaxonfile usage:
```yaml
SpatialDropout2D:
rate: 0.5
```
"""
IDENTIFIER = 'SpatialDropout2D'
SCHEMA = SpatialDropout2DSchema
def __init__(self, rate, data_format=None, **kwargs):
super(SpatialDropout2DConfig, self).__init__(rate, **kwargs)
self.data_format = data_format
class SpatialDropout3DSchema(DropoutSchema):
data_format = fields.Str(default=None, missing=None,
validate=validate.OneOf('channels_first', 'channels_last'))
class Meta:
ordered = True
@post_load
def make(self, data):
return SpatialDropout3DConfig(**data)
@post_dump
def unmake(self, data):
return SpatialDropout3DConfig.remove_reduced_attrs(data)
class SpatialDropout3DConfig(DropoutConfig):
"""Spatial 3D version of Dropout.
This version performs the same function as Dropout, however it drops
entire 3D feature maps instead of individual elements. If adjacent voxels
within feature maps are strongly correlated (as is normally the case in
early convolution layers) then regular dropout will not regularize the
activations and will otherwise just result in an effective learning rate
decrease. In this case, SpatialDropout3D will help promote independence
between feature maps and should be used instead.
Args:
rate: float between 0 and 1. Fraction of the input units to drop.
data_format: 'channels_first' or 'channels_last'.
In 'channels_first' mode, the channels dimension (the depth)
is at index 1, in 'channels_last' mode is it at index 4.
If you never set it, then it will be "channels_last".
Input shape:
5D tensor with shape:
`(samples, channels, dim1, dim2, dim3)` if data_format='channels_first'
or 5D tensor with shape:
`(samples, dim1, dim2, dim3, channels)` if data_format='channels_last'.
Output shape:
Same as input
References:
- [Efficient Object Localization Using Convolutional
Networks](https://arxiv.org/abs/1411.4280)
Polyaxonfile usage:
```yaml
SpatialDropout3D:
rate: 0.5
```
"""
IDENTIFIER = 'SpatialDropout3D'
SCHEMA = SpatialDropout3DSchema
def __init__(self, rate, data_format=None, **kwargs):
super(SpatialDropout3DConfig, self).__init__(rate, **kwargs)
self.data_format = data_format
class ActivationSchema(BaseLayerSchema):
activation = StrOrFct(allow_none=True, validate=validate.OneOf(ACTIVATION_VALUES))
class Meta:
ordered = True
@post_load
def make(self, data):
return ActivationConfig(**data)
@post_dump
def unmake(self, data):
return ActivationConfig.remove_reduced_attrs(data)
class ActivationConfig(BaseLayerConfig):
"""Applies an activation function to an output.
Args:
activation: name of activation function.
Input shape:
Arbitrary. Use the keyword argument `input_shape`
(tuple of integers, does not include the samples axis)
when using this layer as the first layer in a model.
Output shape:
Same shape as input.
Polyaxonfile usage:
```yaml
Activation:
activation: tanh
```
"""
IDENTIFIER = 'Activation'
SCHEMA = ActivationSchema
def __init__(self, activation, **kwargs):
super(ActivationConfig, self).__init__(**kwargs)
self.activation = activation
class ReshapeSchema(BaseLayerSchema):
target_shape = fields.List(fields.Int())
class Meta:
ordered = True
@post_load
def make(self, data):
return ReshapeConfig(**data)
@post_dump
def unmake(self, data):
return ReshapeConfig.remove_reduced_attrs(data)
class ReshapeConfig(BaseLayerConfig):
"""Reshapes an output to a certain shape.
Args:
target_shape: target shape. Tuple of integers,
does not include the samples dimension (batch size).
Input shape:
Arbitrary, although all dimensions in the input shaped must be fixed.
Use the keyword argument `input_shape`
(tuple of integers, does not include the samples axis)
when using this layer as the first layer in a model.
Output shape:
`(batch_size,) + target_shape`
Example:
```python
# as first layer in a Sequential model
x = Reshape((3, 4))(x)
# now: x.output_shape == (None, 3, 4)
# note: `None` is the batch dimension
# also supports shape inference using `-1` as dimension
x = Reshape((-1, 2, 2))(x)
# now: x.output_shape == (None, 3, 2, 2)
```
Polyaxonfile usage:
```yaml
Reshape:
target_shape: [-1, 2, 2]
```
"""
IDENTIFIER = 'Reshape'
SCHEMA = ReshapeSchema
def __init__(self, target_shape, **kwargs):
super(ReshapeConfig, self).__init__(**kwargs)
self.target_shape = target_shape
class PermuteSchema(BaseLayerSchema):
dims = fields.List(fields.Int())
class Meta:
ordered = True
@post_load
def make(self, data):
return PermuteConfig(**data)
@post_dump
def unmake(self, data):
return PermuteConfig.remove_reduced_attrs(data)
class PermuteConfig(BaseLayerConfig):
"""Permutes the dimensions of the input according to a given pattern.
Useful for e.g. connecting RNNs and convnets together.
Args:
dims: Tuple of integers. Permutation pattern, does not include the
samples dimension. Indexing starts at 1.
For instance, `(2, 1)` permutes the first and second dimension
of the input.
Input shape:
Arbitrary. Use the keyword argument `input_shape`
(tuple of integers, does not include the samples axis)
when using this layer as the first layer in a model.
Output shape:
Same as the input shape, but with the dimensions re-ordered according
to the specified pattern.
Example:
```python
x = Permute((2, 1), input_shape=(10, 64))(x)
# now: X.output_shape == (None, 64, 10)
# note: `None` is the batch dimension
```
Polyaxonfile usage:
```yaml
Reshape:
target_shape: [-1, 2, 2]
```
"""
IDENTIFIER = 'Permute'
SCHEMA = PermuteSchema
def __init__(self, dims, **kwargs):
super(PermuteConfig, self).__init__(**kwargs)
self.dims = dims
class FlattenSchema(BaseLayerSchema):
class Meta:
ordered = True
@post_load
def make(self, data):
return FlattenConfig(**data)
@post_dump
def unmake(self, data):
return FlattenConfig.remove_reduced_attrs(data)
class FlattenConfig(BaseLayerConfig):
"""Flattens the input. Does not affect the batch size.
Example:
```python
x = Convolution2D(64, 3, 3,
border_mode='same',
input_shape=(3, 32, 32))(x)
# now: x.output_shape == (None, 64, 32, 32)
x = Flatten()(x)
# now: x.output_shape == (None, 65536)
```
Polyaxonfile usage:
```yaml
Flatten:
```
"""
IDENTIFIER = 'Flatten'
SCHEMA = FlattenSchema
class RepeatVectorSchema(BaseLayerSchema):
n = fields.Int()
class Meta:
ordered = True
@post_load
def make(self, data):
return RepeatVectorConfig(**data)
@post_dump
def unmake(self, data):
return RepeatVectorConfig.remove_reduced_attrs(data)
class RepeatVectorConfig(BaseLayerConfig):
"""Repeats the input n times.
Example:
```python
x = Dense(32)(x)
# now: x.output_shape == (None, 32)
# note: `None` is the batch dimension
x = RepeatVector(3)(x)
# now: x.output_shape == (None, 3, 32)
```
Args:
n: integer, repetition factor.
Input shape:
2D tensor of shape `(num_samples, features)`.
Output shape:
3D tensor of shape `(num_samples, n, features)`.
Polyaxonfile usage:
```yaml
RepeatVector:
n: 32
```
"""
IDENTIFIER = 'RepeatVector'
SCHEMA = RepeatVectorSchema
def __init__(self, n, **kwargs):
super(RepeatVectorConfig, self).__init__(**kwargs)
self.n = n
# class LambdaSchema(BaseLayerSchema):
class DenseSchema(BaseLayerSchema):
units = fields.Int()
activation = StrOrFct(allow_none=True, validate=validate.OneOf(ACTIVATION_VALUES))
use_bias = fields.Bool(allow_none=True)
kernel_initializer = fields.Nested(InitializerSchema, allow_none=True)
bias_initializer = fields.Nested(InitializerSchema, allow_none=True)
kernel_regularizer = fields.Nested(RegularizerSchema, allow_none=True)
bias_regularizer = fields.Nested(RegularizerSchema, allow_none=True)
activity_regularizer = fields.Nested(RegularizerSchema, allow_none=True)
kernel_constraint = fields.Nested(ConstraintSchema, allow_none=True)
bias_constraint = fields.Nested(ConstraintSchema, allow_none=True)
class Meta:
ordered = True
@post_load
def make(self, data):
return DenseConfig(**data)
@post_dump
def unmake(self, data):
return DenseConfig.remove_reduced_attrs(data)
class DenseConfig(BaseLayerConfig):
"""Just your regular densely-connected NN layer.
`Dense` implements the operation:
`output = activation(dot(input, kernel) + bias)`
where `activation` is the element-wise activation function
passed as the `activation` argument, `kernel` is a weights matrix
created by the layer, and `bias` is a bias vector created by the layer
(only applicable if `use_bias` is `True`).
Note: if the input to the layer has a rank greater than 2, then
it is flattened prior to the initial dot product with `kernel`.
Example:
```python
# as first layer in a sequential model:
x = Dense(32)(x)
# now the model will take as input arrays of shape (*, 16)
# and output arrays of shape (*, 32)
```
Args:
units: Positive integer, dimensionality of the output space.
activation: Activation function to use.
If you don't specify anything, no activation is applied
(ie. "linear" activation: `a(x) = x`).
use_bias: Boolean, whether the layer uses a bias vector.
kernel_initializer: Initializer for the `kernel` weights matrix.
bias_initializer: Initializer for the bias vector.
kernel_regularizer: Regularizer function applied to
the `kernel` weights matrix.
bias_regularizer: Regularizer function applied to the bias vector.
activity_regularizer: Regularizer function applied to
the output of the layer (its "activation")..
kernel_constraint: Constraint function applied to
the `kernel` weights matrix.
bias_constraint: Constraint function applied to the bias vector.
Input shape:
nD tensor with shape: `(batch_size, ..., input_dim)`.
The most common situation would be
a 2D input with shape `(batch_size, input_dim)`.
Output shape:
nD tensor with shape: `(batch_size, ..., units)`.
For instance, for a 2D input with shape `(batch_size, input_dim)`,
the output would have shape `(batch_size, units)`.
Polyaxonfile usage:
```yaml
Dense:
units: 32
activation: sigmoid
```
"""
IDENTIFIER = 'Dense'
SCHEMA = DenseSchema
def __init__(self,
units,
activation=None,
use_bias=True,
kernel_initializer=GlorotNormalInitializerConfig(),
bias_initializer=ZerosInitializerConfig(),
kernel_regularizer=None,
bias_regularizer=None,
activity_regularizer=None,
kernel_constraint=None,
bias_constraint=None,
**kwargs):
super(DenseConfig, self).__init__(**kwargs)
self.units = units
self.activation = activation
self.use_bias = use_bias
self.kernel_initializer = kernel_initializer
self.bias_initializer = bias_initializer
self.kernel_regularizer = kernel_regularizer
self.bias_regularizer = bias_regularizer
self.activity_regularizer = activity_regularizer
self.kernel_constraint = kernel_constraint
self.bias_constraint = bias_constraint
class ActivityRegularizationSchema(BaseLayerSchema):
l1 = fields.Float(allow_none=True)
l2 = fields.Float(allow_none=True)
class Meta:
ordered = True
@post_load
def make(self, data):
return ActivityRegularizationConfig(**data)
@post_dump
def unmake(self, data):
return ActivityRegularizationConfig.remove_reduced_attrs(data)
class ActivityRegularizationConfig(BaseLayerConfig):
"""Layer that applies an update to the cost function based input activity.
Args:
l1: L1 regularization factor (positive float).
l2: L2 regularization factor (positive float).
Input shape:
Arbitrary. Use the keyword argument `input_shape`
(tuple of integers, does not include the samples axis)
when using this layer as the first layer in a model.
Output shape:
Same shape as input.
Polyaxonfile usage:
```yaml
ActivityRegularization:
l1: 0.1
l2: 0.2
```
"""
IDENTIFIER = 'ActivityRegularization'
SCHEMA = ActivityRegularizationSchema
def __init__(self, l1=0., l2=0., **kwargs):
super(ActivityRegularizationConfig, self).__init__(**kwargs)
self.l1 = l1
self.l2 = l2
class CastSchema(BaseLayerSchema):
dtype = DType()
class Meta:
ordered = True
@post_load
def make(self, data):
return CastConfig(**data)
@post_dump
def unmake(self, data):
return CastConfig.remove_reduced_attrs(data)
class CastConfig(BaseLayerConfig):
"""Casts a tensor to a new type.
The operation casts `x` (in case of `Tensor`) or `x.values`
(in case of `SparseTensor`) to `dtype`.
For example:
```python
x = tf.constant([1.8, 2.2], dtype=tf.float32)
x = Cast(dtype=tf.int32)(x) # [1, 2], dtype=tf.int32
```
Args:
x: A `Tensor` or `SparseTensor`.
dtype: The destination type.
name: A name for the operation (optional).
Returns:
A `Tensor` or `SparseTensor` with same shape as `x`.
Raises:
TypeError: If `x` cannot be cast to the `dtype`.
Polyaxonfile usage:
```yaml
Cast:
dtype: float32
```
"""
IDENTIFIER = 'Cast'
SCHEMA = CastSchema
def __init__(self, dtype, **kwargs):
super(CastConfig, self).__init__(**kwargs)
self.dtype = dtype
| 28.364829 | 88 | 0.659434 | 2,558 | 21,614 | 5.45817 | 0.162627 | 0.016044 | 0.026071 | 0.018622 | 0.46691 | 0.423435 | 0.391563 | 0.351382 | 0.302321 | 0.288569 | 0 | 0.013306 | 0.255899 | 21,614 | 761 | 89 | 28.402103 | 0.854816 | 0.506015 | 0 | 0.362903 | 0 | 0 | 0.020262 | 0.002346 | 0 | 0 | 0 | 0 | 0 | 1 | 0.149194 | false | 0 | 0.028226 | 0.104839 | 0.637097 | 0.004032 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 2 |
7fc71d742b9583424424ab4953dff97d093bc116 | 5,556 | py | Python | tests/unit/models/cardlesscredit/test_create_payment.py | glendaesutanto/xendit-python | f9b131882ff7d045f2e2c6518933d1594efba3e6 | [
"MIT"
] | 10 | 2020-10-31T23:34:34.000Z | 2022-03-08T19:08:55.000Z | tests/unit/models/cardlesscredit/test_create_payment.py | glendaesutanto/xendit-python | f9b131882ff7d045f2e2c6518933d1594efba3e6 | [
"MIT"
] | 22 | 2020-07-30T14:25:07.000Z | 2022-03-31T03:55:46.000Z | tests/unit/models/cardlesscredit/test_create_payment.py | glendaesutanto/xendit-python | f9b131882ff7d045f2e2c6518933d1594efba3e6 | [
"MIT"
] | 11 | 2020-07-28T08:09:40.000Z | 2022-03-18T00:14:02.000Z | import pytest
from ..model_base_test import ModelBaseTest
from tests.sampleresponse.cardless_credit import cardless_credit_payment_response
from xendit.models import CardlessCredit, CardlessCreditType
# fmt: off
class TestCreateCardlessCreditPayment(ModelBaseTest):
@pytest.fixture
def default_cardless_credit_data(self):
tested_class = CardlessCredit
class_name = "CardlessCredit"
method_name = "create_payment"
http_method_name = "post"
cardless_credit_items = []
cardless_credit_items.append(
CardlessCredit.helper_create_item(
id="item-123",
name="Phone Case",
price=200000,
type="Smartphone",
url="http://example.com/phone/phone_case",
quantity=2,
)
)
shipping_address = CardlessCredit.helper_create_shipping_address(
first_name="first name",
last_name="last name",
address="Jl Teknologi No. 12",
city="Jakarta",
postal_code="12345",
phone="081513114262",
country_code="IDN",
)
customer_details = CardlessCredit.helper_create_customer_details(
first_name="customer first name",
last_name="customer last name",
email="customer@email.com",
phone="0812332145",
)
args = ()
kwargs = {
"cardless_credit_type": CardlessCreditType.KREDIVO,
"external_id": "mock-id-123",
"amount": 10000,
"payment_type": "3_months",
"items": cardless_credit_items,
"customer_details": customer_details,
"shipping_address": shipping_address,
"redirect_url": "https://mock-my-shop.com/home",
"callback_url": "https://mock-my-shop.com/callback",
"x_idempotency_key": "test_idemp_123",
}
params = (args, kwargs)
url = "/cardless-credit"
expected_correct_result = cardless_credit_payment_response()
return (tested_class, class_name, method_name, http_method_name, url, params, expected_correct_result)
@pytest.fixture
def api_requestor_request_data(self, default_cardless_credit_data):
tested_class, class_name, method_name, http_method_name, url, params, _ = default_cardless_credit_data
headers = {"X-IDEMPOTENCY-KEY": "test_idemp_123"}
body = {
"cardless_credit_type": "KREDIVO",
"external_id": "mock-id-123",
"amount": 10000,
"payment_type": "3_months",
"items": [
{
"id": "item-123",
"name": "Phone Case",
"price": 200000,
"type": "Smartphone",
"url": "http://example.com/phone/phone_case",
"quantity": 2,
}
],
"customer_details": {
"first_name": "customer first name",
"last_name": "customer last name",
"email": "customer@email.com",
"phone": "0812332145",
},
"shipping_address": {
"first_name": "first name",
"last_name": "last name",
"address": "Jl Teknologi No. 12",
"city": "Jakarta",
"postal_code": "12345",
"phone": "081513114262",
"country_code": "IDN",
},
"redirect_url": "https://mock-my-shop.com/home",
"callback_url": "https://mock-my-shop.com/callback",
}
return (tested_class, class_name, method_name, http_method_name, url, params, headers, body)
@pytest.mark.parametrize("mock_correct_response", [cardless_credit_payment_response()], indirect=True)
def test_return_cardless_credit_payment_on_correct_params(
self, mocker, mock_correct_response, default_cardless_credit_data
):
self.run_success_return_test_on_xendit_instance(mocker, mock_correct_response, default_cardless_credit_data)
def test_raise_xendit_error_on_response_error(
self, mocker, mock_error_request_response, default_cardless_credit_data
):
self.run_raises_error_test_on_xendit_instance(mocker, mock_error_request_response, default_cardless_credit_data)
@pytest.mark.parametrize("mock_correct_response", [cardless_credit_payment_response()], indirect=True)
def test_return_cardless_credit_payment_on_correct_params_and_global_xendit(
self, mocker, mock_correct_response, default_cardless_credit_data
):
self.run_success_return_test_on_global_config(mocker, mock_correct_response, default_cardless_credit_data)
def test_raise_xendit_error_on_response_error_and_global_xendit(
self, mocker, mock_error_request_response, default_cardless_credit_data
):
self.run_raises_error_test_on_global_config(mocker, mock_error_request_response, default_cardless_credit_data)
@pytest.mark.parametrize("mock_correct_response", [cardless_credit_payment_response()], indirect=True)
def test_send_correct_request_to_api_requestor(self, mocker, mock_correct_response, api_requestor_request_data):
self.run_send_correct_request_to_api_requestor(mocker, mock_correct_response, api_requestor_request_data)
# fmt: on
| 44.095238 | 121 | 0.62203 | 572 | 5,556 | 5.622378 | 0.201049 | 0.108831 | 0.071828 | 0.08551 | 0.740983 | 0.721082 | 0.658893 | 0.658893 | 0.629042 | 0.629042 | 0 | 0.025641 | 0.284017 | 5,556 | 125 | 122 | 44.448 | 0.782805 | 0.00288 | 0 | 0.20354 | 0 | 0 | 0.196046 | 0.011641 | 0 | 0 | 0 | 0 | 0 | 1 | 0.061947 | false | 0 | 0.035398 | 0 | 0.123894 | 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 |
7fd64d5d9687aeafd41778f375063551f567e46f | 67 | py | Python | homeassistant/components/hardware/const.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | homeassistant/components/hardware/const.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 24,710 | 2016-04-13T08:27:26.000Z | 2020-03-02T12:59:13.000Z | homeassistant/components/hardware/const.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Constants for the Hardware integration."""
DOMAIN = "hardware"
| 16.75 | 45 | 0.716418 | 7 | 67 | 6.857143 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.134328 | 67 | 3 | 46 | 22.333333 | 0.827586 | 0.58209 | 0 | 0 | 0 | 0 | 0.363636 | 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 |
7fe3c41b5d4495299339fa6ac09fd4c855492415 | 1,577 | py | Python | b9_tools.py | eoinnoble/b9-indifference | a8b7f3c2268af162d5269a8ce7180be717bfb3fb | [
"Unlicense"
] | 9 | 2017-11-13T20:31:04.000Z | 2021-11-08T12:30:48.000Z | b9_tools.py | eoinnoble/b9-indifference | a8b7f3c2268af162d5269a8ce7180be717bfb3fb | [
"Unlicense"
] | 1 | 2021-11-30T20:24:26.000Z | 2021-11-30T20:24:26.000Z | b9_tools.py | eoinnoble/b9-indifference | a8b7f3c2268af162d5269a8ce7180be717bfb3fb | [
"Unlicense"
] | 1 | 2017-12-17T09:04:25.000Z | 2017-12-17T09:04:25.000Z | import re
from collections.abc import MutableMapping
from typing import Dict, List
import markovify
import nltk
class RangeDict(MutableMapping):
"""Enables a dictionary whose keys are ranges."""
def __init__(self, iterable: Dict):
if not isinstance(iterable, dict):
raise TypeError("You must pass a dictionary to RangeDict")
self.store = dict()
for (k, v) in iterable.items():
if not isinstance(k, range):
raise TypeError("Your dictionary keys must be ranges")
direction = {num: v for num in k}
self.store.update(direction)
def __getitem__(self, key):
return self.store[key]
def __setitem__(self, key, value):
self.store[key] = value
def __delitem__(self, key):
del self.store[key]
def __iter__(self):
return iter(self.store)
def __len__(self):
return len(self.store)
class POSifiedText(markovify.Text):
"""
A markovify.Text model that obeys sentence structure better than the naive model.
Uses NLTK's part-of-speech tagger (nltk.pos_tag), which is VERY slow but seems to do a better
job of parsing my text corpora than spaCy, which would be faster.
"""
def word_split(self, sentence: str) -> List:
words = re.split(self.word_split_pattern, sentence)
words = ["::".join(tag) for tag in nltk.pos_tag(words)]
return words
def word_join(self, words: List) -> str:
sentence = " ".join(word.split("::")[0] for word in words)
return sentence
| 27.666667 | 97 | 0.639822 | 211 | 1,577 | 4.63981 | 0.445498 | 0.064351 | 0.036772 | 0.030644 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.000858 | 0.261256 | 1,577 | 56 | 98 | 28.160714 | 0.839485 | 0.181357 | 0 | 0 | 0 | 0 | 0.062599 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.242424 | false | 0.030303 | 0.151515 | 0.090909 | 0.606061 | 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 |
3d0b63ff899d9630d5763b8599ddc075bb3c108f | 620 | py | Python | PycharmProjects/PythonValidacao/consome_api.py | FeFSRibeiro/learning-python | 4f642aa7e1c6523f5209f83ece7e974bfb3ef24e | [
"Apache-2.0"
] | null | null | null | PycharmProjects/PythonValidacao/consome_api.py | FeFSRibeiro/learning-python | 4f642aa7e1c6523f5209f83ece7e974bfb3ef24e | [
"Apache-2.0"
] | null | null | null | PycharmProjects/PythonValidacao/consome_api.py | FeFSRibeiro/learning-python | 4f642aa7e1c6523f5209f83ece7e974bfb3ef24e | [
"Apache-2.0"
] | null | null | null | import requests
class BuscaEndereco:
def __init__(self,cep):
if self.valida_cep(str(cep)):
self.cep = str(cep)
else:
raise ValueError("CEP Inválido !!!")
def __str__(self):
return self.formata_cep()
def valida_cep(self,cep):
if len(self.cep == 8):
return True
else:
return False
def formata_cep(self,cep):
return "{}-{}".format(self.cep[:5],self.cep[5:])
def busca_dados (self):
url = "https://viacep.com.br/ws/{}/json/".format(self.cep)
r = requests.get(url)
return r
| 22.142857 | 66 | 0.540323 | 78 | 620 | 4.128205 | 0.435897 | 0.173913 | 0.093168 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007092 | 0.317742 | 620 | 27 | 67 | 22.962963 | 0.754137 | 0 | 0 | 0.1 | 0 | 0 | 0.087097 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.05 | 0.1 | 0.6 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
3d11c0e83e935667e3b5fa635f505dab77f68c4f | 471 | py | Python | dataset_models/normalization/aroundZeroNormalizer.py | Zvezdin/blockchain-predictor | df6f939037471dd50b7b9c96673d89b04b646ef2 | [
"MIT"
] | 35 | 2017-10-25T17:10:35.000Z | 2022-03-20T18:12:06.000Z | dataset_models/normalization/aroundZeroNormalizer.py | Zvezdin/blockchain-predictor | df6f939037471dd50b7b9c96673d89b04b646ef2 | [
"MIT"
] | 2 | 2017-09-20T17:39:15.000Z | 2018-04-01T17:20:29.000Z | dataset_models/normalization/aroundZeroNormalizer.py | Zvezdin/blockchain-predictor | df6f939037471dd50b7b9c96673d89b04b646ef2 | [
"MIT"
] | 10 | 2017-12-01T13:47:04.000Z | 2021-12-16T06:53:17.000Z | import numpy as np
from .normalizer import Normalizer
class AroundZeroNormalizer(Normalizer):
def __init__(self, data):
self.minVal = np.min(data)
self.maxVal = np.max(data)
self.maxVal = max(abs(self.maxVal), abs(self.minVal))
def transform(self, data):
if self.maxVal == 0: #can't normalize if the whole array is zeroes
return data
return ((data / self.maxVal) + 1) / 2
def inverse_transform(self, data):
return ((data * 2) - 1) * self.maxVal
| 23.55 | 68 | 0.694268 | 70 | 471 | 4.6 | 0.457143 | 0.186335 | 0.130435 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012953 | 0.180467 | 471 | 19 | 69 | 24.789474 | 0.821244 | 0.093418 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.230769 | false | 0 | 0.153846 | 0.076923 | 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 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
3d162a8de2cf611aacdd649aadbeb0516127e28a | 461 | py | Python | arequests/exceptions.py | fhag/telegram2 | 65a685637b444e40ef47a17c2a3b83c2ddb81459 | [
"BSD-2-Clause"
] | null | null | null | arequests/exceptions.py | fhag/telegram2 | 65a685637b444e40ef47a17c2a3b83c2ddb81459 | [
"BSD-2-Clause"
] | null | null | null | arequests/exceptions.py | fhag/telegram2 | 65a685637b444e40ef47a17c2a3b83c2ddb81459 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Exceptions for Arequests
Created on Tue Nov 13 08:34:14 2018
@author: gfi
"""
class ArequestsError(Exception):
"""Basic exception for errors raised by Arequests"""
pass
class AuthorizationError(ArequestsError):
'''401 error new authentification required'''
pass
class SomeClientError(ArequestsError):
'''4xx client error'''
pass
class SomeServerError(ArequestsError):
'''5xx server error'''
pass
| 19.208333 | 56 | 0.694143 | 51 | 461 | 6.27451 | 0.72549 | 0.084375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.048 | 0.186551 | 461 | 23 | 57 | 20.043478 | 0.805333 | 0.472885 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.5 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
3d1bc451ecce134829f141f42c2d16c8641046f1 | 899 | py | Python | Aula37/Controller/squad_controller.py | PabloSchumacher/TrabalhosPython | 828edd35eb40442629211bc9f1477f75fb025d74 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | Aula37/Controller/squad_controller.py | PabloSchumacher/TrabalhosPython | 828edd35eb40442629211bc9f1477f75fb025d74 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | Aula37/Controller/squad_controller.py | PabloSchumacher/TrabalhosPython | 828edd35eb40442629211bc9f1477f75fb025d74 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | from Dao.squad_dao import SquadDao
from Model.squad import *
from Controller.backend_controller import BackendController
from Controller.frontend_controller import FrontendController
from Controller.sgbd_controller import SgbdController
class SquadController:
dao = SquadDao()
be = BackendController()
fro = FrontendController()
bd = SgbdController()
def listar_todos(self):
return self.dao.listar_todos()
def buscar_por_id(self, id):
return self.dao.buscar_por_id(id)
def salvar(self, squad:Squad):
squad.backend.idbackend = self.be.salvar(squad.backend)
squad.frontend.idfrontend = self.fro.salvar(squad.frontend)
squad.sgbd.idsgbd = self.bd.salvar(squad.sgbd)
return self.dao.salvar(squad)
def alterar(self, squad:Squad):
self.dao.alterar(squad)
def deletar(self, id):
self.dao.deletar(id)
| 29.966667 | 67 | 0.716352 | 111 | 899 | 5.711712 | 0.288288 | 0.055205 | 0.061514 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.190211 | 899 | 29 | 68 | 31 | 0.870879 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.217391 | false | 0 | 0.217391 | 0.086957 | 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 |
3d41aeb36fe4c0327c92ba2fb851e5ac557d9a0b | 960 | py | Python | typhon/oem/error.py | jmollard/typhon | 68d5ae999c340b60aa69e095b336d438632ad55c | [
"MIT"
] | null | null | null | typhon/oem/error.py | jmollard/typhon | 68d5ae999c340b60aa69e095b336d438632ad55c | [
"MIT"
] | null | null | null | typhon/oem/error.py | jmollard/typhon | 68d5ae999c340b60aa69e095b336d438632ad55c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Functions to estimate the different sources of retrieval error.
"""
from typhon.oem import common
__all__ = [
'smoothing_error',
'retrieval_noise',
]
def smoothing_error(x, x_a, A):
"""Return the smoothing error through the averaging kernel.
Parameters:
x (ndarray): Atmospherice profile.
x_a (ndarray): A priori profile.
A (ndarray): Averaging kernel matrix.
Returns:
ndarray: Smoothing error due to correlation between layers.
"""
return A @ (x - x_a)
def retrieval_noise(K, S_a, S_y, e_y):
"""Return the retrieval noise.
Parameters:
K (np.array): Simulated Jacobians.
S_a (np.array): A priori error covariance matrix.
S_y (np.array): Measurement covariance matrix.
e_y (ndarray): Total measurement error.
Returns:
ndarray: Retrieval noise.
"""
return common.retrieval_gain_matrix(K, S_a, S_y) @ e_y
| 23.414634 | 67 | 0.644792 | 125 | 960 | 4.776 | 0.4 | 0.093802 | 0.01005 | 0.0134 | 0.023451 | 0.023451 | 0.023451 | 0 | 0 | 0 | 0 | 0.001391 | 0.251042 | 960 | 40 | 68 | 24 | 0.828929 | 0.642708 | 0 | 0 | 0 | 0 | 0.113636 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | 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 |
3d4fb10a65167e4ffb44c4897ed5483e2f0d23c0 | 2,439 | py | Python | users/models.py | Mansi3546/CareerCradle | e040e763b1058aef937deb9eac4e1f9b2421ae25 | [
"MIT"
] | null | null | null | users/models.py | Mansi3546/CareerCradle | e040e763b1058aef937deb9eac4e1f9b2421ae25 | [
"MIT"
] | 1 | 2021-04-14T12:24:41.000Z | 2021-04-18T07:33:11.000Z | users/models.py | Mansi3546/CareerCradle | e040e763b1058aef937deb9eac4e1f9b2421ae25 | [
"MIT"
] | 3 | 2021-04-06T13:54:44.000Z | 2021-05-03T17:28:59.000Z | from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, PermissionsMixin
from django.db import models
from django.utils import timezone
from django.db.models import BooleanField
class UserManager(BaseUserManager):
def _create_user(self, email, password, usertype, is_staff, is_superuser, **extra_fields):
if not email:
raise ValueError('Users must have an email address')
now = timezone.now()
email = self.normalize_email(email)
user = self.model(
email=email,
usertype=usertype,
is_staff=is_staff,
is_active=True,
is_superuser=is_superuser,
last_login=now,
date_joined=now,
**extra_fields
)
user.set_password(password)
user.save(using=self._db)
return user
def create_candidate(self, email, password, **extra_fields):
return self._create_user(email, password, 1, False, False, **extra_fields)
def create_recruiter(self, email, password, **extra_fields):
return self._create_user(email, password, 0, False, False, **extra_fields)
def create_staff(self, email, password, **extra_fields):
return self._create_user(email, password, None, True, False, **extra_fields)
def create_superuser(self, email, password, **extra_fields):
user=self._create_user(email, password, None, True, True, **extra_fields)
user.save(using=self._db)
return user
class User(AbstractBaseUser, PermissionsMixin):
'''
Usertype can have 3 values:
Candidate - 1
Recruiter - 0
Staff - None
'''
USERTYPES = [
(1, 'Candidates'),
(0, 'Recruiters'),
(None, 'Staff'),
]
email = models.EmailField(max_length=254, unique=True)
name = models.CharField(max_length=254, null=True, blank=True)
usertype = models.PositiveSmallIntegerField(choices=USERTYPES, null=True)
is_staff = models.BooleanField(default=False)
is_superuser = models.BooleanField(default=False)
is_active = models.BooleanField(default=True)
last_login = models.DateTimeField(null=True, blank=True)
date_joined = models.DateTimeField(auto_now_add=True)
USERNAME_FIELD = 'email'
EMAIL_FIELD = 'email'
REQUIRED_FIELDS = []
objects = UserManager()
def get_absolute_url(self):
return "/users/%i/" % (self.pk)
| 33.410959 | 94 | 0.660107 | 281 | 2,439 | 5.548043 | 0.302491 | 0.070558 | 0.054522 | 0.056446 | 0.295702 | 0.220654 | 0.182168 | 0.117383 | 0.117383 | 0.117383 | 0 | 0.006982 | 0.236572 | 2,439 | 72 | 95 | 33.875 | 0.83029 | 0.0328 | 0 | 0.075472 | 0 | 0 | 0.033047 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.113208 | false | 0.188679 | 0.075472 | 0.075472 | 0.584906 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 2 |
3d5041bc56fbfaccca116aec98a24987eddba5f7 | 2,046 | py | Python | site_scons/site_tools/findPkgPath.py | fermi-lat/SConsFiles | 54124ec1031142b4fee76b12fdcfe839845e9fda | [
"BSD-3-Clause"
] | null | null | null | site_scons/site_tools/findPkgPath.py | fermi-lat/SConsFiles | 54124ec1031142b4fee76b12fdcfe839845e9fda | [
"BSD-3-Clause"
] | null | null | null | site_scons/site_tools/findPkgPath.py | fermi-lat/SConsFiles | 54124ec1031142b4fee76b12fdcfe839845e9fda | [
"BSD-3-Clause"
] | null | null | null | import os,platform,os.path
# Usual case: find where package is; add to env include path
# If 'subdir' argument, instead set construction env variable
# to point to it
def generate(env, **kw):
pkgName = kw.get('package', '')
if pkgName == '':
print 'findPkgPath called with no arg'
return None
path = None
subDir = kw.get('subDir', '')
usualCase = (subDir == '')
# paths all start with .\ so strip it off
#if forStatic.first == True:
# print 'findPkgPath called with argument ', pkgName
## First look in env['packageNameList']. If we *have* supersede,
## this is the supersede list. Otherwise it's the base list
for p in env['packageNameList']:
bname = os.path.basename(str(p[2:]))
if pkgName == bname:
if env.GetOption('supersede') == '.':
path = '#' + str(p[2:])
else:
path = os.path.join(str(env['absSuperPath']), pkgName)
if pkgName + '-' == bname[:len(bname)+1]:
if env.GetOption('supersede') == '.':
path = '#' + str(p[2:])
else: path = os.path.join(str(env['absSuperPath']), str(p[2:]))
# If not found up to this point, we must be in case
# -have supersede dir
# -package we have been called for is not in supersede area
if path == None and env.GetOption('supersede') != '.': # look in base
for p in env['basePackageNameList']:
bname = os.path.basename(str(p[2:]))
##if pkgName == bname: path = '#' + str(p[2:])
if pkgName == bname:
path = os.path.join(env['absBasePath'], str(p[2:]))
if pkgName + '-' == bname[:len(bname)+1]:
path = os.path.join(env['absBasePath'], str(p[2:]))
if path != None:
if usualCase:
env.AppendUnique(CPPPATH = [path])
else:
conVarName = pkgName + '_' + subDir
env[conVarName] = os.path.join(path, subDir)
def exists(env):
return 1
| 40.117647 | 75 | 0.544966 | 256 | 2,046 | 4.351563 | 0.332031 | 0.043088 | 0.035907 | 0.037702 | 0.313285 | 0.313285 | 0.273788 | 0.253142 | 0.253142 | 0.253142 | 0 | 0.007757 | 0.30694 | 2,046 | 50 | 76 | 40.92 | 0.777856 | 0.279081 | 0 | 0.4 | 1 | 0 | 0.108516 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.028571 | null | null | 0.028571 | 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 |
3d553fd4a5642d493db1017f36467ff8b535228c | 65 | py | Python | wave_1d_fwi_tf/__init__.py | ar4/wave_1d_fwi_tf | 0a543149dc3bd5ca6ec0e5bfe34add4796e0b879 | [
"MIT"
] | 2 | 2017-08-07T13:35:50.000Z | 2019-02-28T08:26:49.000Z | wave_1d_fwi_tf/__init__.py | ar4/wave_1d_fwi_tf | 0a543149dc3bd5ca6ec0e5bfe34add4796e0b879 | [
"MIT"
] | null | null | null | wave_1d_fwi_tf/__init__.py | ar4/wave_1d_fwi_tf | 0a543149dc3bd5ca6ec0e5bfe34add4796e0b879 | [
"MIT"
] | 5 | 2018-06-26T20:43:44.000Z | 2021-12-11T20:00:03.000Z | """1D FWI implemented using TensorFlow
"""
__version__ = '0.0.1'
| 16.25 | 38 | 0.692308 | 9 | 65 | 4.555556 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.071429 | 0.138462 | 65 | 3 | 39 | 21.666667 | 0.660714 | 0.538462 | 0 | 0 | 0 | 0 | 0.217391 | 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 |
3d58e1aeb6209bbf0ac5b1e7058c942f20cd4768 | 733 | py | Python | tests/test_missing_variable.py | specfault/GreenerPython | 976260c3e78969cfd3e1e40639325f104325c703 | [
"MIT"
] | null | null | null | tests/test_missing_variable.py | specfault/GreenerPython | 976260c3e78969cfd3e1e40639325f104325c703 | [
"MIT"
] | null | null | null | tests/test_missing_variable.py | specfault/GreenerPython | 976260c3e78969cfd3e1e40639325f104325c703 | [
"MIT"
] | null | null | null | from tests.framework import AbstractFilePair
from tests.framework import in_test_function
from tests.framework import standard_test_spec
from tests.framework import SavingFixesSUT
from tests.framework import fixing_test
variable_names = ('x', 'y')
def missing_variable_in_source(variable_name):
test_code = in_test_function('bla = blubb.' + variable_name)
return AbstractFilePair('blubb', test=test_code)
@fixing_test
class TestSavingFixesMissingVariables(SavingFixesSUT):
tests = [
standard_test_spec( # add several variables to SUT
"""
bla = blubb.x
bla = blubb.y
bla = blubb.z""")
] + [missing_variable_in_source(name) for name in variable_names]
| 29.32 | 73 | 0.718963 | 89 | 733 | 5.674157 | 0.370787 | 0.089109 | 0.178218 | 0.237624 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.203274 | 733 | 24 | 74 | 30.541667 | 0.864726 | 0.038199 | 0 | 0 | 0 | 0 | 0.030695 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.066667 | false | 0 | 0.333333 | 0 | 0.6 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
e9eed597103f69eb9973238f713e70a5ed271b2e | 551 | py | Python | stixpy/timeseries/tests/test_quicklook.py | nicHoch/stixpy | cdb86094995590da36f3ae5e01f4ca4b9aac819c | [
"BSD-3-Clause"
] | 4 | 2021-07-06T14:42:09.000Z | 2022-02-24T10:19:18.000Z | stixpy/timeseries/tests/test_quicklook.py | nicHoch/stixpy | cdb86094995590da36f3ae5e01f4ca4b9aac819c | [
"BSD-3-Clause"
] | 30 | 2020-10-02T20:24:28.000Z | 2022-03-31T18:29:07.000Z | stixpy/timeseries/tests/test_quicklook.py | nicHoch/stixpy | cdb86094995590da36f3ae5e01f4ca4b9aac819c | [
"BSD-3-Clause"
] | 8 | 2021-04-16T11:00:13.000Z | 2022-03-31T10:09:29.000Z | from pathlib import Path
import pytest
from sunpy.timeseries import TimeSeries
from stixpy.data import test
from stixpy.timeseries.quicklook import *
def test_ql_lightcurve():
ql_lc = TimeSeries(test.STIX_QL_LIGHTCURVE_TIMESERIES)
assert isinstance(ql_lc, QLLightCurve)
def test_qlbackground():
ql_lc = TimeSeries(test.STIX_QL_BACKGROUND_TIMESERIES)
assert isinstance(ql_lc, QLBackground)
def test_qlvariance():
ql_lc = TimeSeries(test.STIX_QL_VARIANCE_TIMESERIES)
ql_lc.peek()
assert isinstance(ql_lc, QLVariance)
| 22.958333 | 58 | 0.787659 | 73 | 551 | 5.671233 | 0.328767 | 0.067633 | 0.101449 | 0.130435 | 0.318841 | 0.173913 | 0 | 0 | 0 | 0 | 0 | 0 | 0.143376 | 551 | 23 | 59 | 23.956522 | 0.877119 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.2 | 1 | 0.2 | false | 0 | 0.333333 | 0 | 0.533333 | 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 |
e9fbb4ffd34a72b02bcdf9fee23d69719622bfd4 | 397 | py | Python | PythonDesafios/d107/teste.py | adaatii/Python-Curso-em-Video- | 30b37713b3685469558babb93b557b53210f010c | [
"MIT"
] | null | null | null | PythonDesafios/d107/teste.py | adaatii/Python-Curso-em-Video- | 30b37713b3685469558babb93b557b53210f010c | [
"MIT"
] | null | null | null | PythonDesafios/d107/teste.py | adaatii/Python-Curso-em-Video- | 30b37713b3685469558babb93b557b53210f010c | [
"MIT"
] | null | null | null | # Crie um módulo chamado moeda.py que tenha as funções incorporadas aumentar(), diminuir(), dobro() e metade(). Faça
# também um programa que importe esse módulo e use algumas dessas funções.
import moeda
p = float(input('Digite o preço: '))
print(f'A metade do {p} é R${moeda.metade(p)}')
print(f'O dobro de {p} é R${moeda.dobro(p)}')
print(f'Aumentando 10%, temos R${moeda.aumentar(p, 10)}')
| 36.090909 | 116 | 0.702771 | 69 | 397 | 4.043478 | 0.594203 | 0.064516 | 0.021505 | 0.057348 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011799 | 0.146096 | 397 | 10 | 117 | 39.7 | 0.811209 | 0.471033 | 0 | 0 | 0 | 0 | 0.65534 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.2 | 0 | 0.2 | 0.6 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 2 |
e9fe99f79d22866cd1c3d457b72379bf7128ed8c | 122,030 | py | Python | Line/beijing_aqi.py | Hansz00/pyecharts-gallery | a0a16d980e9d4f7d355c5ada938614579ee8d461 | [
"MIT"
] | 1 | 2020-08-25T07:41:10.000Z | 2020-08-25T07:41:10.000Z | Line/beijing_aqi.py | Hansz00/pyecharts-gallery | a0a16d980e9d4f7d355c5ada938614579ee8d461 | [
"MIT"
] | null | null | null | Line/beijing_aqi.py | Hansz00/pyecharts-gallery | a0a16d980e9d4f7d355c5ada938614579ee8d461 | [
"MIT"
] | 1 | 2022-03-10T09:05:44.000Z | 2022-03-10T09:05:44.000Z | import pyecharts.options as opts
from pyecharts.charts import Line
"""
Gallery 使用 pyecharts 1.1.0
参考地址: https://echarts.baidu.com/examples/editor.html?c=line-aqi
目前无法实现的功能:
1、dataZoom 放大的时候无法固定 Y 轴的上下限
"""
all_data = [
["2000-06-05", 116],
["2000-06-06", 129],
["2000-06-07", 135],
["2000-06-08", 86],
["2000-06-09", 73],
["2000-06-10", 85],
["2000-06-11", 73],
["2000-06-12", 68],
["2000-06-13", 92],
["2000-06-14", 130],
["2000-06-15", 245],
["2000-06-16", 139],
["2000-06-17", 115],
["2000-06-18", 111],
["2000-06-19", 309],
["2000-06-20", 206],
["2000-06-21", 137],
["2000-06-22", 128],
["2000-06-23", 85],
["2000-06-24", 94],
["2000-06-25", 71],
["2000-06-26", 106],
["2000-06-27", 84],
["2000-06-28", 93],
["2000-06-29", 85],
["2000-06-30", 73],
["2000-07-01", 83],
["2000-07-02", 125],
["2000-07-03", 107],
["2000-07-04", 82],
["2000-07-05", 44],
["2000-07-06", 72],
["2000-07-07", 106],
["2000-07-08", 107],
["2000-07-09", 66],
["2000-07-10", 91],
["2000-07-11", 92],
["2000-07-12", 113],
["2000-07-13", 107],
["2000-07-14", 131],
["2000-07-15", 111],
["2000-07-16", 64],
["2000-07-17", 69],
["2000-07-18", 88],
["2000-07-19", 77],
["2000-07-20", 83],
["2000-07-21", 111],
["2000-07-22", 57],
["2000-07-23", 55],
["2000-07-24", 60],
["2000-07-25", 44],
["2000-07-26", 127],
["2000-07-27", 114],
["2000-07-28", 86],
["2000-07-29", 73],
["2000-07-30", 52],
["2000-07-31", 69],
["2000-08-01", 86],
["2000-08-02", 118],
["2000-08-03", 56],
["2000-08-04", 91],
["2000-08-05", 121],
["2000-08-06", 127],
["2000-08-07", 78],
["2000-08-08", 79],
["2000-08-09", 46],
["2000-08-10", 108],
["2000-08-11", 80],
["2000-08-12", 79],
["2000-08-13", 69],
["2000-08-14", 80],
["2000-08-15", 105],
["2000-08-16", 119],
["2000-08-17", 105],
["2000-08-18", 55],
["2000-08-19", 74],
["2000-08-20", 41],
["2000-08-21", 62],
["2000-08-22", 104],
["2000-08-23", 118],
["2000-08-24", 121],
["2000-08-25", 126],
["2000-08-26", 99],
["2000-08-27", 92],
["2000-08-28", 75],
["2000-08-29", 91],
["2000-08-30", 94],
["2000-08-31", 69],
["2000-09-01", 93],
["2000-09-02", 124],
["2000-09-03", 120],
["2000-09-04", 93],
["2000-09-05", 26],
["2000-09-06", 32],
["2000-09-07", 70],
["2000-09-08", 89],
["2000-09-10", 117],
["2000-09-11", 144],
["2000-09-12", 111],
["2000-09-13", 120],
["2000-09-14", 97],
["2000-09-15", 108],
["2000-09-17", 74],
["2000-09-18", 105],
["2000-09-19", 127],
["2000-09-20", 143],
["2000-09-21", 62],
["2000-09-22", 80],
["2000-09-23", 136],
["2000-09-24", 29],
["2000-09-25", 91],
["2000-09-26", 93],
["2000-09-27", 114],
["2000-09-28", 45],
["2000-09-29", 102],
["2000-09-30", 111],
["2000-10-01", 93],
["2000-10-02", 117],
["2000-10-03", 78],
["2000-10-04", 76],
["2000-10-05", 100],
["2000-10-06", 75],
["2000-10-07", 169],
["2000-10-08", 59],
["2000-10-09", 89],
["2000-10-10", 91],
["2000-10-11", 75],
["2000-10-12", 28],
["2000-10-13", 47],
["2000-10-14", 92],
["2000-10-16", 72],
["2000-10-17", 149],
["2000-10-18", 86],
["2000-10-19", 88],
["2000-10-20", 104],
["2000-10-21", 91],
["2000-10-22", 88],
["2000-10-23", 55],
["2000-10-24", 63],
["2000-10-25", 41],
["2000-10-26", 85],
["2000-10-27", 99],
["2000-10-28", 121],
["2000-10-29", 96],
["2000-10-30", 90],
["2000-11-01", 80],
["2000-11-02", 116],
["2000-11-03", 207],
["2000-11-04", 306],
["2000-11-05", 283],
["2000-11-06", 200],
["2000-11-07", 93],
["2000-11-08", 49],
["2000-11-09", 78],
["2000-11-10", 40],
["2000-11-11", 74],
["2000-11-12", 67],
["2000-11-13", 118],
["2000-11-14", 196],
["2000-11-15", 101],
["2000-11-16", 59],
["2000-11-17", 83],
["2000-11-18", 83],
["2000-11-19", 124],
["2000-11-20", 57],
["2000-11-21", 78],
["2000-11-22", 113],
["2000-11-23", 172],
["2000-11-24", 129],
["2000-11-25", 103],
["2000-11-26", 75],
["2000-11-27", 125],
["2000-11-28", 121],
["2000-11-29", 204],
["2000-11-30", 141],
["2000-12-01", 106],
["2000-12-02", 146],
["2000-12-03", 95],
["2000-12-04", 149],
["2000-12-05", 71],
["2000-12-07", 157],
["2000-12-08", 141],
["2000-12-09", 197],
["2000-12-10", 43],
["2000-12-11", 81],
["2000-12-12", 109],
["2000-12-13", 118],
["2000-12-15", 115],
["2000-12-16", 92],
["2000-12-17", 123],
["2000-12-18", 147],
["2000-12-19", 59],
["2000-12-20", 103],
["2000-12-21", 146],
["2000-12-22", 137],
["2000-12-23", 74],
["2000-12-24", 64],
["2000-12-25", 67],
["2000-12-26", 107],
["2000-12-27", 101],
["2000-12-28", 79],
["2000-12-29", 137],
["2000-12-30", 165],
["2000-12-31", 81],
["2001-01-01", 100],
["2001-01-02", 126],
["2001-01-03", 56],
["2001-01-05", 108],
["2001-01-06", 88],
["2001-01-07", 78],
["2001-01-08", 105],
["2001-01-09", 77],
["2001-01-10", 105],
["2001-01-11", 93],
["2001-01-12", 107],
["2001-01-13", 128],
["2001-01-14", 53],
["2001-01-15", 81],
["2001-01-16", 128],
["2001-01-17", 179],
["2001-01-18", 225],
["2001-01-19", 116],
["2001-01-20", 153],
["2001-01-21", 161],
["2001-01-22", 149],
["2001-01-23", 115],
["2001-01-24", 136],
["2001-01-25", 101],
["2001-01-26", 109],
["2001-01-27", 108],
["2001-01-28", 86],
["2001-01-29", 101],
["2001-01-30", 109],
["2001-01-31", 139],
["2001-02-01", 110],
["2001-02-02", 113],
["2001-02-03", 130],
["2001-02-04", 62],
["2001-02-05", 88],
["2001-02-06", 105],
["2001-02-07", 87],
["2001-02-08", 140],
["2001-02-09", 116],
["2001-02-10", 100],
["2001-02-11", 83],
["2001-02-12", 102],
["2001-02-13", 106],
["2001-02-14", 157],
["2001-02-15", 131],
["2001-02-16", 77],
["2001-02-17", 101],
["2001-02-18", 148],
["2001-02-19", 227],
["2001-02-20", 105],
["2001-02-21", 155],
["2001-02-22", 293],
["2001-02-23", 99],
["2001-02-24", 57],
["2001-02-25", 97],
["2001-02-26", 104],
["2001-02-27", 117],
["2001-02-28", 125],
["2001-03-01", 216],
["2001-03-02", 149],
["2001-03-03", 256],
["2001-03-04", 172],
["2001-03-05", 113],
["2001-03-06", 338],
["2001-03-07", 57],
["2001-03-08", 48],
["2001-03-10", 111],
["2001-03-11", 87],
["2001-03-12", 175],
["2001-03-13", 186],
["2001-03-14", 201],
["2001-03-15", 76],
["2001-03-16", 131],
["2001-03-17", 127],
["2001-03-18", 128],
["2001-03-19", 152],
["2001-03-20", 144],
["2001-03-21", 162],
["2001-03-22", 500],
["2001-03-24", 358],
["2001-03-25", 128],
["2001-03-26", 54],
["2001-03-27", 57],
["2001-03-28", 54],
["2001-03-29", 80],
["2001-03-30", 71],
["2001-03-31", 73],
["2001-04-01", 139],
["2001-04-02", 224],
["2001-04-03", 107],
["2001-04-04", 150],
["2001-04-05", 180],
["2001-04-06", 77],
["2001-04-07", 95],
["2001-04-08", 194],
["2001-04-09", 143],
["2001-04-10", 205],
["2001-04-11", 129],
["2001-04-12", 64],
["2001-04-13", 61],
["2001-04-14", 79],
["2001-04-15", 121],
["2001-04-16", 130],
["2001-04-17", 150],
["2001-04-18", 205],
["2001-04-19", 154],
["2001-04-20", 81],
["2001-04-21", 140],
["2001-04-22", 119],
["2001-04-23", 156],
["2001-04-24", 72],
["2001-04-25", 108],
["2001-04-26", 124],
["2001-04-27", 94],
["2001-04-28", 157],
["2001-04-29", 100],
["2001-04-30", 158],
["2001-05-01", 277],
["2001-05-02", 332],
["2001-05-03", 303],
["2001-05-04", 238],
["2001-05-05", 500],
["2001-05-06", 99],
["2001-05-07", 93],
["2001-05-08", 104],
["2001-05-09", 74],
["2001-05-10", 68],
["2001-05-11", 90],
["2001-05-12", 114],
["2001-05-13", 142],
["2001-05-14", 126],
["2001-05-15", 185],
["2001-05-16", 402],
["2001-05-17", 189],
["2001-05-17", 189],
["2001-05-17", 189],
["2001-05-18", 112],
["2001-05-19", 137],
["2001-05-20", 158],
["2001-05-21", 158],
["2001-05-22", 116],
["2001-05-23", 132],
["2001-05-24", 110],
["2001-05-25", 82],
["2001-05-26", 56],
["2001-05-27", 54],
["2001-05-28", 71],
["2001-05-29", 101],
["2001-05-30", 57],
["2001-05-31", 88],
["2001-06-01", 99],
["2001-06-02", 84],
["2001-06-03", 139],
["2001-06-04", 132],
["2001-06-05", 141],
["2001-06-07", 159],
["2001-06-08", 131],
["2001-06-09", 180],
["2001-06-10", 164],
["2001-06-11", 134],
["2001-06-12", 163],
["2001-06-13", 105],
["2001-06-14", 74],
["2001-06-15", 50],
["2001-06-16", 60],
["2001-06-17", 82],
["2001-06-18", 111],
["2001-06-19", 89],
["2001-06-20", 81],
["2001-06-21", 76],
["2001-06-22", 70],
["2001-06-23", 74],
["2001-06-24", 99],
["2001-06-25", 91],
["2001-06-26", 113],
["2001-06-27", 93],
["2001-06-28", 69],
["2001-06-29", 74],
["2001-06-30", 75],
["2001-07-01", 108],
["2001-07-02", 115],
["2001-07-03", 86],
["2001-07-04", 67],
["2001-07-05", 68],
["2001-07-06", 74],
["2001-07-07", 69],
["2001-07-08", 95],
["2001-07-09", 99],
["2001-07-10", 92],
["2001-07-11", 84],
["2001-07-12", 77],
["2001-07-13", 69],
["2001-07-14", 62],
["2001-07-15", 83],
["2001-07-16", 101],
["2001-07-17", 98],
["2001-07-18", 89],
["2001-07-19", 82],
["2001-07-20", 105],
["2001-07-21", 79],
["2001-07-22", 48],
["2001-07-23", 119],
["2001-07-24", 126],
["2001-07-25", 44],
["2001-07-26", 42],
["2001-07-27", 86],
["2001-07-28", 68],
["2001-07-29", 93],
["2001-07-30", 89],
["2001-07-31", 76],
["2001-08-01", 54],
["2001-08-02", 53],
["2001-08-03", 35],
["2001-08-04", 65],
["2001-08-05", 108],
["2001-08-06", 114],
["2001-08-07", 90],
["2001-08-08", 63],
["2001-08-09", 79],
["2001-08-10", 102],
["2001-08-11", 100],
["2001-08-12", 107],
["2001-08-13", 81],
["2001-08-14", 79],
["2001-08-15", 116],
["2001-08-16", 98],
["2001-08-17", 96],
["2001-08-18", 94],
["2001-08-19", 63],
["2001-08-20", 39],
["2001-08-21", 81],
["2001-08-22", 73],
["2001-08-23", 66],
["2001-08-24", 52],
["2001-08-25", 64],
["2001-08-26", 61],
["2001-08-27", 83],
["2001-08-28", 85],
["2001-08-29", 99],
["2001-08-30", 97],
["2001-08-31", 93],
["2001-09-01", 86],
["2001-09-02", 105],
["2001-09-03", 98],
["2001-09-04", 109],
["2001-09-05", 92],
["2001-09-06", 68],
["2001-09-07", 92],
["2001-09-08", 72],
["2001-09-09", 64],
["2001-09-10", 88],
["2001-09-11", 97],
["2001-09-12", 102],
["2001-09-13", 103],
["2001-09-14", 120],
["2001-09-15", 94],
["2001-09-16", 95],
["2001-09-17", 93],
["2001-09-18", 56],
["2001-09-19", 98],
["2001-09-20", 81],
["2001-09-21", 100],
["2001-09-22", 75],
["2001-09-23", 84],
["2001-09-24", 91],
["2001-09-25", 70],
["2001-09-26", 96],
["2001-09-27", 128],
["2001-09-28", 92],
["2001-09-29", 107],
["2001-09-30", 95],
["2001-10-01", 63],
["2001-10-02", 115],
["2001-10-03", 69],
["2001-10-04", 47],
["2001-10-05", 86],
["2001-10-06", 122],
["2001-10-07", 104],
["2001-10-08", 122],
["2001-10-09", 49],
["2001-10-10", 36],
["2001-10-11", 83],
["2001-10-12", 107],
["2001-10-13", 126],
["2001-10-14", 126],
["2001-10-15", 78],
["2001-10-16", 72],
["2001-10-17", 76],
["2001-10-18", 87],
["2001-10-19", 143],
["2001-10-20", 259],
["2001-10-21", 183],
["2001-10-22", 276],
["2001-10-23", 232],
["2001-10-24", 167],
["2001-10-25", 105],
["2001-10-26", 129],
["2001-10-27", 140],
["2001-10-28", 61],
["2001-10-29", 85],
["2001-10-30", 155],
["2001-11-01", 38],
["2001-11-02", 106],
["2001-11-03", 134],
["2001-11-04", 57],
["2001-11-05", 51],
["2001-11-06", 68],
["2001-11-07", 129],
["2001-11-08", 158],
["2001-11-09", 85],
["2001-11-10", 121],
["2001-11-11", 161],
["2001-11-12", 94],
["2001-11-13", 58],
["2001-11-14", 57],
["2001-11-15", 71],
["2001-11-16", 105],
["2001-11-17", 66],
["2001-11-18", 117],
["2001-11-19", 87],
["2001-11-20", 88],
["2001-11-21", 131],
["2001-11-22", 151],
["2001-11-23", 310],
["2001-11-24", 161],
["2001-11-25", 23],
["2001-11-26", 52],
["2001-11-27", 82],
["2001-11-28", 128],
["2001-11-29", 115],
["2001-11-30", 63],
["2001-12-02", 102],
["2001-12-03", 96],
["2001-12-04", 107],
["2001-12-05", 89],
["2001-12-06", 59],
["2001-12-07", 100],
["2001-12-08", 136],
["2001-12-09", 137],
["2001-12-10", 119],
["2001-12-11", 112],
["2001-12-12", 186],
["2001-12-13", 192],
["2001-12-14", 83],
["2001-12-15", 97],
["2001-12-16", 113],
["2001-12-18", 89],
["2001-12-19", 106],
["2001-12-20", 119],
["2001-12-21", 62],
["2001-12-22", 79],
["2001-12-23", 58],
["2001-12-24", 61],
["2001-12-25", 64],
["2001-12-26", 108],
["2001-12-27", 101],
["2001-12-28", 82],
["2001-12-29", 85],
["2001-12-30", 98],
["2001-12-31", 132],
["2002-01-01", 88],
["2002-01-02", 97],
["2002-01-03", 116],
["2002-01-04", 111],
["2002-01-05", 81],
["2002-01-06", 78],
["2002-01-07", 138],
["2002-01-08", 100],
["2002-01-09", 157],
["2002-01-10", 349],
["2002-01-11", 196],
["2002-01-12", 190],
["2002-01-13", 100],
["2002-01-14", 103],
["2002-01-15", 160],
["2002-01-16", 97],
["2002-01-17", 103],
["2002-01-18", 123],
["2002-01-19", 137],
["2002-01-20", 268],
["2002-01-21", 52],
["2002-01-22", 44],
["2002-01-23", 66],
["2002-01-24", 106],
["2002-01-25", 94],
["2002-01-26", 96],
["2002-01-27", 58],
["2002-01-28", 62],
["2002-01-29", 56],
["2002-01-30", 62],
["2002-01-31", 109],
["2002-02-01", 96],
["2002-02-02", 95],
["2002-02-03", 126],
["2002-02-04", 161],
["2002-02-05", 138],
["2002-02-06", 106],
["2002-02-07", 99],
["2002-02-08", 113],
["2002-02-09", 80],
["2002-02-10", 90],
["2002-02-11", 86],
["2002-02-12", 142],
["2002-02-13", 93],
["2002-02-14", 125],
["2002-02-15", 135],
["2002-02-16", 138],
["2002-02-17", 111],
["2002-02-18", 70],
["2002-02-19", 101],
["2002-02-20", 153],
["2002-02-21", 146],
["2002-02-22", 97],
["2002-02-23", 82],
["2002-02-24", 99],
["2002-02-25", 131],
["2002-02-26", 88],
["2002-02-27", 74],
["2002-02-28", 96],
["2002-03-01", 133],
["2002-03-02", 105],
["2002-03-03", 86],
["2002-03-04", 105],
["2002-03-05", 89],
["2002-03-06", 70],
["2002-03-07", 87],
["2002-03-08", 109],
["2002-03-09", 161],
["2002-03-10", 83],
["2002-03-11", 129],
["2002-03-12", 107],
["2002-03-13", 89],
["2002-03-14", 186],
["2002-03-15", 108],
["2002-03-16", 500],
["2002-03-17", 188],
["2002-03-18", 102],
["2002-03-19", 139],
["2002-03-20", 155],
["2002-03-21", 500],
["2002-03-22", 370],
["2002-03-23", 164],
["2002-03-24", 105],
["2002-03-25", 156],
["2002-03-26", 180],
["2002-03-27", 105],
["2002-03-28", 126],
["2002-03-29", 120],
["2002-03-30", 122],
["2002-03-31", 118],
["2002-04-01", 188],
["2002-04-02", 260],
["2002-04-03", 296],
["2002-04-04", 118],
["2002-04-05", 132],
["2002-04-06", 80],
["2002-04-07", 500],
["2002-04-08", 500],
["2002-04-09", 253],
["2002-04-10", 67],
["2002-04-11", 110],
["2002-04-13", 133],
["2002-04-14", 246],
["2002-04-15", 324],
["2002-04-16", 225],
["2002-04-17", 120],
["2002-04-18", 121],
["2002-04-19", 131],
["2002-04-20", 148],
["2002-04-21", 174],
["2002-04-22", 106],
["2002-04-23", 32],
["2002-04-24", 86],
["2002-04-25", 92],
["2002-04-26", 117],
["2002-04-27", 110],
["2002-04-28", 90],
["2002-04-29", 86],
["2002-04-30", 106],
["2002-05-01", 84],
["2002-05-02", 76],
["2002-05-03", 92],
["2002-05-04", 85],
["2002-05-05", 79],
["2002-05-07", 92],
["2002-05-08", 99],
["2002-05-09", 105],
["2002-05-10", 105],
["2002-05-11", 78],
["2002-05-12", 125],
["2002-05-13", 113],
["2002-05-14", 90],
["2002-05-15", 89],
["2002-05-16", 99],
["2002-05-17", 94],
["2002-05-18", 109],
["2002-05-19", 105],
["2002-05-20", 115],
["2002-05-21", 110],
["2002-05-22", 54],
["2002-05-23", 76],
["2002-05-24", 83],
["2002-05-25", 75],
["2002-05-26", 89],
["2002-05-27", 97],
["2002-05-28", 113],
["2002-05-29", 106],
["2002-05-30", 86],
["2002-05-31", 108],
["2002-06-01", 115],
["2002-06-02", 106],
["2002-06-03", 99],
["2002-06-04", 151],
["2002-06-05", 118],
["2002-06-06", 139],
["2002-06-07", 161],
["2002-06-08", 77],
["2002-06-09", 72],
["2002-06-10", 36],
["2002-06-11", 81],
["2002-06-12", 67],
["2002-06-13", 56],
["2002-06-14", 73],
["2002-06-15", 75],
["2002-06-16", 80],
["2002-06-17", 122],
["2002-06-19", 142],
["2002-06-20", 77],
["2002-06-21", 68],
["2002-06-22", 77],
["2002-06-23", 50],
["2002-06-24", 51],
["2002-06-25", 40],
["2002-06-26", 46],
["2002-06-27", 65],
["2002-06-28", 110],
["2002-06-29", 104],
["2002-06-30", 85],
["2002-07-01", 126],
["2002-07-02", 88],
["2002-07-03", 112],
["2002-07-04", 108],
["2002-07-05", 98],
["2002-07-06", 88],
["2002-07-07", 68],
["2002-07-08", 87],
["2002-07-09", 83],
["2002-07-10", 87],
["2002-07-11", 127],
["2002-07-12", 111],
["2002-07-13", 108],
["2002-07-14", 91],
["2002-07-15", 89],
["2002-07-16", 75],
["2002-07-17", 88],
["2002-07-18", 76],
["2002-07-19", 62],
["2002-07-20", 55],
["2002-07-21", 66],
["2002-07-22", 67],
["2002-07-23", 62],
["2002-07-24", 113],
["2002-07-25", 81],
["2002-07-26", 66],
["2002-07-27", 86],
["2002-07-28", 47],
["2002-07-29", 44],
["2002-07-30", 79],
["2002-07-31", 137],
["2002-08-01", 160],
["2002-08-02", 89],
["2002-08-03", 96],
["2002-08-04", 63],
["2002-08-05", 53],
["2002-08-06", 50],
["2002-08-07", 44],
["2002-08-08", 74],
["2002-08-09", 64],
["2002-08-10", 72],
["2002-08-11", 94],
["2002-08-12", 71],
["2002-08-13", 124],
["2002-08-14", 129],
["2002-08-15", 155],
["2002-08-16", 156],
["2002-08-17", 125],
["2002-08-18", 130],
["2002-08-19", 66],
["2002-08-20", 91],
["2002-08-21", 114],
["2002-08-22", 112],
["2002-08-23", 102],
["2002-08-24", 72],
["2002-08-25", 76],
["2002-08-26", 77],
["2002-08-27", 86],
["2002-08-28", 92],
["2002-08-29", 108],
["2002-08-30", 100],
["2002-08-31", 122],
["2002-09-01", 164],
["2002-09-02", 111],
["2002-09-03", 52],
["2002-09-04", 70],
["2002-09-05", 59],
["2002-09-06", 82],
["2002-09-07", 96],
["2002-09-08", 92],
["2002-09-09", 124],
["2002-09-10", 98],
["2002-09-11", 45],
["2002-09-12", 37],
["2002-09-13", 81],
["2002-09-14", 90],
["2002-09-15", 98],
["2002-09-16", 97],
["2002-09-17", 111],
["2002-09-18", 125],
["2002-09-19", 83],
["2002-09-20", 41],
["2002-09-21", 87],
["2002-09-22", 56],
["2002-09-23", 72],
["2002-09-25", 182],
["2002-09-26", 183],
["2002-09-27", 70],
["2002-09-28", 44],
["2002-09-29", 62],
["2002-09-30", 100],
["2002-10-01", 121],
["2002-10-02", 62],
["2002-10-03", 70],
["2002-10-04", 99],
["2002-10-05", 89],
["2002-10-06", 52],
["2002-10-07", 37],
["2002-10-08", 64],
["2002-10-09", 135],
["2002-10-10", 232],
["2002-10-11", 365],
["2002-10-12", 198],
["2002-10-13", 53],
["2002-10-14", 121],
["2002-10-15", 83],
["2002-10-16", 100],
["2002-10-17", 169],
["2002-10-18", 75],
["2002-10-20", 72],
["2002-10-21", 51],
["2002-10-22", 50],
["2002-10-23", 95],
["2002-10-24", 88],
["2002-10-26", 59],
["2002-10-27", 30],
["2002-10-28", 48],
["2002-10-29", 109],
["2002-10-30", 146],
["2002-10-31", 76],
["2002-11-01", 33],
["2002-11-02", 52],
["2002-11-03", 54],
["2002-11-04", 70],
["2002-11-05", 107],
["2002-11-06", 96],
["2002-11-07", 76],
["2002-11-08", 37],
["2002-11-09", 94],
["2002-11-10", 182],
["2002-11-11", 452],
["2002-11-12", 66],
["2002-11-13", 56],
["2002-11-14", 80],
["2002-11-15", 85],
["2002-11-16", 104],
["2002-11-17", 43],
["2002-11-18", 52],
["2002-11-19", 115],
["2002-11-20", 143],
["2002-11-21", 75],
["2002-11-22", 110],
["2002-11-23", 134],
["2002-11-24", 129],
["2002-11-25", 153],
["2002-11-26", 54],
["2002-11-27", 114],
["2002-11-28", 145],
["2002-11-29", 87],
["2002-11-30", 138],
["2002-12-01", 198],
["2002-12-02", 273],
["2002-12-03", 395],
["2002-12-04", 498],
["2002-12-05", 97],
["2002-12-06", 112],
["2002-12-07", 97],
["2002-12-08", 86],
["2002-12-09", 97],
["2002-12-10", 99],
["2002-12-12", 151],
["2002-12-13", 135],
["2002-12-14", 193],
["2002-12-15", 153],
["2002-12-16", 95],
["2002-12-17", 91],
["2002-12-18", 137],
["2002-12-19", 98],
["2002-12-20", 77],
["2002-12-21", 95],
["2002-12-22", 96],
["2002-12-23", 83],
["2002-12-24", 71],
["2002-12-25", 53],
["2002-12-26", 69],
["2002-12-27", 75],
["2002-12-28", 106],
["2002-12-29", 90],
["2002-12-30", 106],
["2002-12-31", 64],
["2003-01-01", 105],
["2003-01-02", 100],
["2003-01-03", 69],
["2003-01-04", 55],
["2003-01-05", 65],
["2003-01-06", 112],
["2003-01-07", 83],
["2003-01-08", 131],
["2003-01-09", 151],
["2003-01-10", 93],
["2003-01-11", 97],
["2003-01-12", 104],
["2003-01-13", 92],
["2003-01-14", 53],
["2003-01-15", 105],
["2003-01-16", 159],
["2003-01-17", 106],
["2003-01-18", 89],
["2003-01-19", 88],
["2003-01-20", 87],
["2003-01-21", 99],
["2003-01-22", 117],
["2003-01-23", 72],
["2003-01-24", 109],
["2003-01-25", 91],
["2003-01-26", 100],
["2003-01-27", 48],
["2003-01-28", 58],
["2003-01-29", 65],
["2003-01-30", 105],
["2003-01-31", 87],
["2003-02-01", 148],
["2003-02-02", 109],
["2003-02-03", 96],
["2003-02-04", 87],
["2003-02-05", 56],
["2003-02-06", 105],
["2003-02-07", 126],
["2003-02-08", 164],
["2003-02-09", 113],
["2003-02-10", 54],
["2003-02-11", 47],
["2003-02-12", 93],
["2003-02-13", 83],
["2003-02-14", 91],
["2003-02-15", 135],
["2003-02-16", 65],
["2003-02-17", 100],
["2003-02-18", 147],
["2003-02-19", 56],
["2003-02-20", 89],
["2003-02-21", 107],
["2003-02-22", 99],
["2003-02-23", 124],
["2003-02-24", 152],
["2003-02-25", 115],
["2003-02-26", 87],
["2003-02-27", 76],
["2003-02-28", 93],
["2003-03-01", 172],
["2003-03-02", 235],
["2003-03-03", 65],
["2003-03-04", 55],
["2003-03-05", 93],
["2003-03-06", 96],
["2003-03-07", 127],
["2003-03-08", 71],
["2003-03-09", 88],
["2003-03-10", 81],
["2003-03-11", 115],
["2003-03-12", 54],
["2003-03-13", 94],
["2003-03-14", 92],
["2003-03-15", 98],
["2003-03-17", 73],
["2003-03-18", 69],
["2003-03-19", 156],
["2003-03-20", 93],
["2003-03-21", 37],
["2003-03-22", 92],
["2003-03-23", 114],
["2003-03-24", 124],
["2003-03-25", 108],
["2003-03-26", 106],
["2003-03-27", 39],
["2003-03-28", 66],
["2003-03-29", 126],
["2003-03-30", 282],
["2003-03-31", 136],
["2003-04-01", 92],
["2003-04-02", 54],
["2003-04-03", 81],
["2003-04-04", 89],
["2003-04-05", 115],
["2003-04-06", 108],
["2003-04-07", 100],
["2003-04-08", 55],
["2003-04-09", 75],
["2003-04-10", 88],
["2003-04-11", 94],
["2003-04-12", 143],
["2003-04-13", 62],
["2003-04-14", 138],
["2003-04-15", 187],
["2003-04-16", 157],
["2003-04-17", 154],
["2003-04-18", 56],
["2003-04-19", 54],
["2003-04-20", 57],
["2003-04-21", 46],
["2003-04-22", 82],
["2003-04-24", 179],
["2003-04-25", 138],
["2003-04-26", 147],
["2003-04-28", 147],
["2003-04-29", 106],
["2003-04-30", 95],
["2003-05-01", 107],
["2003-05-02", 102],
["2003-05-03", 120],
["2003-05-04", 117],
["2003-05-05", 87],
["2003-05-06", 71],
["2003-05-07", 58],
["2003-05-08", 95],
["2003-05-09", 117],
["2003-05-10", 142],
["2003-05-11", 104],
["2003-05-12", 124],
["2003-05-13", 100],
["2003-05-14", 82],
["2003-05-15", 77],
["2003-05-16", 70],
["2003-05-17", 34],
["2003-05-18", 60],
["2003-05-19", 83],
["2003-05-20", 107],
["2003-05-21", 126],
["2003-05-22", 93],
["2003-05-23", 100],
["2003-05-24", 96],
["2003-05-25", 87],
["2003-05-26", 116],
["2003-05-27", 111],
["2003-05-28", 90],
["2003-05-29", 68],
["2003-05-30", 96],
["2003-05-31", 86],
["2003-06-01", 131],
["2003-06-02", 110],
["2003-06-03", 119],
["2003-06-04", 126],
["2003-06-05", 67],
["2003-06-06", 86],
["2003-06-07", 81],
["2003-06-08", 104],
["2003-06-09", 71],
["2003-06-10", 35],
["2003-06-11", 57],
["2003-06-12", 56],
["2003-06-13", 57],
["2003-06-14", 40],
["2003-06-15", 72],
["2003-06-16", 96],
["2003-06-17", 137],
["2003-06-18", 180],
["2003-06-19", 171],
["2003-06-20", 167],
["2003-06-21", 173],
["2003-06-22", 124],
["2003-06-23", 79],
["2003-06-24", 29],
["2003-06-25", 76],
["2003-06-26", 96],
["2003-06-27", 89],
["2003-06-28", 67],
["2003-06-29", 51],
["2003-06-30", 92],
["2003-07-01", 94],
["2003-07-02", 100],
["2003-07-03", 129],
["2003-07-04", 128],
["2003-07-05", 44],
["2003-07-06", 64],
["2003-07-07", 59],
["2003-07-08", 75],
["2003-07-09", 41],
["2003-07-10", 85],
["2003-07-11", 91],
["2003-07-12", 125],
["2003-07-13", 108],
["2003-07-14", 116],
["2003-07-15", 135],
["2003-07-16", 111],
["2003-07-17", 95],
["2003-07-18", 79],
["2003-07-19", 75],
["2003-07-20", 104],
["2003-07-21", 82],
["2003-07-22", 80],
["2003-07-23", 99],
["2003-07-24", 110],
["2003-07-25", 96],
["2003-07-26", 163],
["2003-07-27", 126],
["2003-07-28", 69],
["2003-07-29", 98],
["2003-07-30", 68],
["2003-07-31", 75],
["2003-08-01", 109],
["2003-08-02", 75],
["2003-08-03", 102],
["2003-08-04", 115],
["2003-08-05", 110],
["2003-08-06", 93],
["2003-08-07", 80],
["2003-08-08", 65],
["2003-08-09", 64],
["2003-08-10", 64],
["2003-08-11", 58],
["2003-08-13", 123],
["2003-08-14", 87],
["2003-08-15", 88],
["2003-08-16", 89],
["2003-08-17", 86],
["2003-08-18", 91],
["2003-08-19", 132],
["2003-08-20", 85],
["2003-08-21", 96],
["2003-08-22", 90],
["2003-08-23", 78],
["2003-08-24", 79],
["2003-08-25", 76],
["2003-08-26", 84],
["2003-08-27", 88],
["2003-08-28", 57],
["2003-08-29", 44],
["2003-08-30", 78],
["2003-08-31", 95],
["2003-09-01", 93],
["2003-09-02", 86],
["2003-09-03", 108],
["2003-09-04", 124],
["2003-09-05", 70],
["2003-09-06", 113],
["2003-09-07", 82],
["2003-09-08", 111],
["2003-09-09", 59],
["2003-09-10", 60],
["2003-09-11", 89],
["2003-09-12", 132],
["2003-09-13", 133],
["2003-09-14", 112],
["2003-09-15", 69],
["2003-09-16", 132],
["2003-09-17", 75],
["2003-09-18", 37],
["2003-09-19", 37],
["2003-09-20", 79],
["2003-09-21", 89],
["2003-09-22", 121],
["2003-09-23", 74],
["2003-09-24", 88],
["2003-09-26", 66],
["2003-09-27", 32],
["2003-09-28", 73],
["2003-09-29", 92],
["2003-09-30", 57],
["2003-10-01", 67],
["2003-10-02", 34],
["2003-10-03", 45],
["2003-10-05", 115],
["2003-10-06", 153],
["2003-10-07", 127],
["2003-10-08", 116],
["2003-10-09", 152],
["2003-10-10", 130],
["2003-10-11", 24],
["2003-10-12", 17],
["2003-10-13", 60],
["2003-10-14", 56],
["2003-10-15", 51],
["2003-10-16", 56],
["2003-10-17", 80],
["2003-10-18", 56],
["2003-10-19", 98],
["2003-10-20", 145],
["2003-10-21", 121],
["2003-10-22", 41],
["2003-10-23", 86],
["2003-10-24", 121],
["2003-10-25", 69],
["2003-10-26", 116],
["2003-10-27", 165],
["2003-10-29", 120],
["2003-10-30", 171],
["2003-10-31", 289],
["2003-11-01", 500],
["2003-11-02", 181],
["2003-11-03", 28],
["2003-11-04", 92],
["2003-11-05", 146],
["2003-11-06", 44],
["2003-11-07", 22],
["2003-11-08", 25],
["2003-11-09", 51],
["2003-11-10", 74],
["2003-11-11", 51],
["2003-11-12", 106],
["2003-11-13", 149],
["2003-11-14", 213],
["2003-11-15", 130],
["2003-11-16", 32],
["2003-11-17", 116],
["2003-11-18", 162],
["2003-11-19", 173],
["2003-11-20", 118],
["2003-11-21", 20],
["2003-11-22", 85],
["2003-11-23", 161],
["2003-11-24", 186],
["2003-11-25", 147],
["2003-11-26", 57],
["2003-11-27", 88],
["2003-11-28", 107],
["2003-11-29", 159],
["2003-11-30", 147],
["2003-12-01", 153],
["2003-12-02", 135],
["2003-12-03", 99],
["2003-12-04", 92],
["2003-12-05", 109],
["2003-12-06", 99],
["2003-12-07", 57],
["2003-12-08", 64],
["2003-12-09", 79],
["2003-12-10", 143],
["2003-12-11", 93],
["2003-12-12", 52],
["2003-12-13", 95],
["2003-12-14", 141],
["2003-12-15", 59],
["2003-12-16", 109],
["2003-12-17", 58],
["2003-12-18", 60],
["2003-12-19", 52],
["2003-12-20", 71],
["2003-12-21", 110],
["2003-12-22", 107],
["2003-12-23", 114],
["2003-12-24", 98],
["2003-12-25", 96],
["2003-12-26", 48],
["2003-12-27", 89],
["2003-12-28", 130],
["2003-12-29", 90],
["2003-12-30", 106],
["2003-12-31", 111],
["2004-01-01", 128],
["2004-01-02", 83],
["2004-01-03", 60],
["2004-01-04", 109],
["2004-01-05", 137],
["2004-01-06", 147],
["2004-01-07", 99],
["2004-01-08", 73],
["2004-01-09", 126],
["2004-01-10", 73],
["2004-01-11", 72],
["2004-01-12", 87],
["2004-01-13", 85],
["2004-01-14", 115],
["2004-01-15", 121],
["2004-01-16", 97],
["2004-01-17", 109],
["2004-01-18", 74],
["2004-01-19", 52],
["2004-01-20", 49],
["2004-01-21", 41],
["2004-01-22", 64],
["2004-01-23", 80],
["2004-01-24", 38],
["2004-01-25", 58],
["2004-01-26", 106],
["2004-01-27", 57],
["2004-01-28", 106],
["2004-01-29", 111],
["2004-01-31", 118],
["2004-02-01", 109],
["2004-02-02", 53],
["2004-02-03", 50],
["2004-02-04", 59],
["2004-02-06", 56],
["2004-02-07", 68],
["2004-02-08", 52],
["2004-02-09", 68],
["2004-02-10", 130],
["2004-02-11", 95],
["2004-02-12", 103],
["2004-02-13", 124],
["2004-02-14", 95],
["2004-02-15", 92],
["2004-02-16", 95],
["2004-02-17", 135],
["2004-02-18", 242],
["2004-02-19", 451],
["2004-02-20", 140],
["2004-02-21", 109],
["2004-02-23", 88],
["2004-02-24", 164],
["2004-02-25", 145],
["2004-02-26", 46],
["2004-02-27", 85],
["2004-02-28", 125],
["2004-02-29", 54],
["2004-03-01", 83],
["2004-03-02", 73],
["2004-03-03", 60],
["2004-03-04", 85],
["2004-03-05", 73],
["2004-03-06", 51],
["2004-03-07", 56],
["2004-03-08", 108],
["2004-03-09", 179],
["2004-03-10", 446],
["2004-03-11", 84],
["2004-03-13", 104],
["2004-03-14", 87],
["2004-03-15", 143],
["2004-03-16", 206],
["2004-03-17", 77],
["2004-03-19", 114],
["2004-03-20", 87],
["2004-03-21", 92],
["2004-03-22", 165],
["2004-03-23", 104],
["2004-03-24", 33],
["2004-03-25", 88],
["2004-03-26", 137],
["2004-03-27", 151],
["2004-03-28", 338],
["2004-03-29", 239],
["2004-03-30", 139],
["2004-03-31", 79],
["2004-04-01", 123],
["2004-04-02", 64],
["2004-04-03", 51],
["2004-04-05", 133],
["2004-04-06", 93],
["2004-04-07", 39],
["2004-04-08", 111],
["2004-04-09", 145],
["2004-04-10", 193],
["2004-04-11", 131],
["2004-04-12", 131],
["2004-04-13", 108],
["2004-04-14", 95],
["2004-04-15", 141],
["2004-04-16", 186],
["2004-04-17", 156],
["2004-04-18", 260],
["2004-04-19", 138],
["2004-04-20", 133],
["2004-04-21", 107],
["2004-04-22", 143],
["2004-04-23", 61],
["2004-04-24", 109],
["2004-04-25", 151],
["2004-04-26", 63],
["2004-04-27", 63],
["2004-04-28", 79],
["2004-04-29", 138],
["2004-04-30", 47],
["2004-05-01", 67],
["2004-05-02", 84],
["2004-05-03", 95],
["2004-05-04", 73],
["2004-05-05", 89],
["2004-05-06", 91],
["2004-05-07", 152],
["2004-05-08", 189],
["2004-05-09", 92],
["2004-05-10", 97],
["2004-05-11", 107],
["2004-05-12", 81],
["2004-05-13", 89],
["2004-05-14", 93],
["2004-05-15", 92],
["2004-05-16", 50],
["2004-05-17", 61],
["2004-05-18", 66],
["2004-05-19", 77],
["2004-05-21", 56],
["2004-05-22", 65],
["2004-05-23", 86],
["2004-05-24", 134],
["2004-05-25", 141],
["2004-05-26", 30],
["2004-05-27", 83],
["2004-05-28", 111],
["2004-05-29", 56],
["2004-05-30", 66],
["2004-05-31", 56],
["2004-06-01", 100],
["2004-06-02", 109],
["2004-06-03", 118],
["2004-06-04", 107],
["2004-06-05", 74],
["2004-06-06", 58],
["2004-06-07", 88],
["2004-06-08", 100],
["2004-06-09", 109],
["2004-06-10", 125],
["2004-06-11", 114],
["2004-06-12", 110],
["2004-06-13", 118],
["2004-06-14", 135],
["2004-06-15", 147],
["2004-06-16", 99],
["2004-06-17", 29],
["2004-06-18", 75],
["2004-06-19", 73],
["2004-06-20", 97],
["2004-06-21", 102],
["2004-06-22", 93],
["2004-06-23", 78],
["2004-06-24", 58],
["2004-06-25", 61],
["2004-06-26", 100],
["2004-06-27", 106],
["2004-06-28", 139],
["2004-06-29", 152],
["2004-06-30", 49],
["2004-07-01", 46],
["2004-07-02", 85],
["2004-07-03", 97],
["2004-07-04", 58],
["2004-07-05", 56],
["2004-07-06", 59],
["2004-07-07", 74],
["2004-07-08", 63],
["2004-07-09", 59],
["2004-07-10", 91],
["2004-07-11", 70],
["2004-07-12", 53],
["2004-07-13", 55],
["2004-07-14", 67],
["2004-07-15", 97],
["2004-07-16", 123],
["2004-07-17", 118],
["2004-07-18", 100],
["2004-07-19", 80],
["2004-07-20", 135],
["2004-07-21", 67],
["2004-07-22", 70],
["2004-07-23", 105],
["2004-07-24", 55],
["2004-07-25", 78],
["2004-07-26", 78],
["2004-07-27", 59],
["2004-07-28", 111],
["2004-07-29", 78],
["2004-07-30", 30],
["2004-07-31", 78],
["2004-08-01", 91],
["2004-08-02", 119],
["2004-08-03", 95],
["2004-08-04", 73],
["2004-08-05", 76],
["2004-08-06", 89],
["2004-08-07", 117],
["2004-08-08", 145],
["2004-08-09", 143],
["2004-08-10", 84],
["2004-08-11", 84],
["2004-08-12", 51],
["2004-08-13", 31],
["2004-08-14", 83],
["2004-08-15", 76],
["2004-08-16", 51],
["2004-08-17", 67],
["2004-08-18", 75],
["2004-08-19", 68],
["2004-08-20", 80],
["2004-08-21", 99],
["2004-08-22", 70],
["2004-08-23", 60],
["2004-08-24", 105],
["2004-08-25", 122],
["2004-08-26", 100],
["2004-08-27", 125],
["2004-08-28", 70],
["2004-08-29", 57],
["2004-08-30", 79],
["2004-08-31", 68],
["2004-09-01", 61],
["2004-09-02", 67],
["2004-09-03", 77],
["2004-09-04", 64],
["2004-09-05", 96],
["2004-09-06", 101],
["2004-09-07", 24],
["2004-09-08", 61],
["2004-09-09", 80],
["2004-09-10", 85],
["2004-09-11", 88],
["2004-09-12", 95],
["2004-09-13", 101],
["2004-09-14", 140],
["2004-09-15", 34],
["2004-09-16", 81],
["2004-09-17", 89],
["2004-09-18", 86],
["2004-09-19", 71],
["2004-09-20", 94],
["2004-09-21", 40],
["2004-09-22", 84],
["2004-09-23", 122],
["2004-09-24", 197],
["2004-09-25", 179],
["2004-09-26", 111],
["2004-09-27", 114],
["2004-09-29", 134],
["2004-09-30", 141],
["2004-10-01", 17],
["2004-10-02", 59],
["2004-10-03", 83],
["2004-10-04", 118],
["2004-10-05", 153],
["2004-10-06", 166],
["2004-10-07", 325],
["2004-10-08", 402],
["2004-10-09", 263],
["2004-10-10", 374],
["2004-10-11", 127],
["2004-10-12", 37],
["2004-10-13", 62],
["2004-10-14", 67],
["2004-10-15", 99],
["2004-10-16", 116],
["2004-10-17", 110],
["2004-10-18", 126],
["2004-10-19", 149],
["2004-10-20", 110],
["2004-10-21", 56],
["2004-10-22", 59],
["2004-10-23", 97],
["2004-10-24", 146],
["2004-10-25", 142],
["2004-10-26", 34],
["2004-10-27", 79],
["2004-10-28", 154],
["2004-10-29", 191],
["2004-10-30", 219],
["2004-10-31", 157],
["2004-11-01", 35],
["2004-11-02", 39],
["2004-11-03", 124],
["2004-11-04", 164],
["2004-11-05", 56],
["2004-11-06", 92],
["2004-11-07", 133],
["2004-11-08", 173],
["2004-11-09", 86],
["2004-11-10", 77],
["2004-11-11", 62],
["2004-11-12", 45],
["2004-11-13", 93],
["2004-11-14", 160],
["2004-11-15", 54],
["2004-11-16", 67],
["2004-11-17", 65],
["2004-11-18", 99],
["2004-11-19", 97],
["2004-11-20", 47],
["2004-11-21", 93],
["2004-11-22", 165],
["2004-11-23", 156],
["2004-11-24", 89],
["2004-11-25", 41],
["2004-11-26", 53],
["2004-11-27", 89],
["2004-11-28", 99],
["2004-11-29", 81],
["2004-11-30", 139],
["2004-12-01", 275],
["2004-12-02", 270],
["2004-12-03", 330],
["2004-12-04", 97],
["2004-12-05", 37],
["2004-12-06", 97],
["2004-12-07", 89],
["2004-12-08", 170],
["2004-12-09", 248],
["2004-12-10", 97],
["2004-12-11", 181],
["2004-12-12", 123],
["2004-12-13", 89],
["2004-12-14", 198],
["2004-12-15", 305],
["2004-12-16", 86],
["2004-12-17", 92],
["2004-12-18", 143],
["2004-12-19", 82],
["2004-12-20", 23],
["2004-12-21", 81],
["2004-12-22", 88],
["2004-12-23", 75],
["2004-12-24", 99],
["2004-12-25", 150],
["2004-12-26", 97],
["2004-12-27", 44],
["2004-12-28", 49],
["2004-12-29", 61],
["2004-12-30", 80],
["2004-12-31", 45],
["2005-01-01", 63],
["2005-01-02", 118],
["2005-01-03", 100],
["2005-01-04", 52],
["2005-01-05", 104],
["2005-01-06", 147],
["2005-01-07", 48],
["2005-01-08", 56],
["2005-01-09", 44],
["2005-01-10", 96],
["2005-01-11", 67],
["2005-01-12", 52],
["2005-01-13", 83],
["2005-01-14", 65],
["2005-01-15", 67],
["2005-01-16", 87],
["2005-01-17", 111],
["2005-01-18", 47],
["2005-01-19", 55],
["2005-01-20", 57],
["2005-01-21", 85],
["2005-01-22", 119],
["2005-01-23", 174],
["2005-01-24", 143],
["2005-01-25", 95],
["2005-01-26", 115],
["2005-01-27", 173],
["2005-01-28", 163],
["2005-01-29", 95],
["2005-01-30", 50],
["2005-01-31", 69],
["2005-02-01", 69],
["2005-02-02", 47],
["2005-02-03", 96],
["2005-02-04", 79],
["2005-02-05", 46],
["2005-02-06", 68],
["2005-02-07", 71],
["2005-02-08", 68],
["2005-02-09", 84],
["2005-02-10", 38],
["2005-02-11", 71],
["2005-02-12", 102],
["2005-02-13", 122],
["2005-02-14", 153],
["2005-02-15", 150],
["2005-02-16", 69],
["2005-02-17", 105],
["2005-02-18", 60],
["2005-02-19", 42],
["2005-02-20", 47],
["2005-02-21", 87],
["2005-02-22", 102],
["2005-02-23", 30],
["2005-02-24", 55],
["2005-02-25", 46],
["2005-02-26", 64],
["2005-02-27", 95],
["2005-02-28", 61],
["2005-03-01", 64],
["2005-03-02", 74],
["2005-03-03", 57],
["2005-03-04", 46],
["2005-03-05", 58],
["2005-03-06", 114],
["2005-03-07", 108],
["2005-03-08", 82],
["2005-03-09", 80],
["2005-03-10", 110],
["2005-03-11", 67],
["2005-03-12", 59],
["2005-03-13", 36],
["2005-03-14", 69],
["2005-03-15", 99],
["2005-03-16", 120],
["2005-03-17", 109],
["2005-03-18", 52],
["2005-03-19", 96],
["2005-03-20", 119],
["2005-03-21", 94],
["2005-03-22", 151],
["2005-03-23", 90],
["2005-03-24", 63],
["2005-03-25", 99],
["2005-03-26", 133],
["2005-03-27", 161],
["2005-03-28", 141],
["2005-03-29", 48],
["2005-03-30", 122],
["2005-03-31", 113],
["2005-04-01", 83],
["2005-04-02", 82],
["2005-04-03", 82],
["2005-04-04", 116],
["2005-04-05", 332],
["2005-04-06", 352],
["2005-04-07", 156],
["2005-04-08", 100],
["2005-04-09", 64],
["2005-04-10", 64],
["2005-04-11", 95],
["2005-04-12", 92],
["2005-04-13", 90],
["2005-04-14", 179],
["2005-04-15", 88],
["2005-04-16", 213],
["2005-04-17", 143],
["2005-04-18", 159],
["2005-04-19", 132],
["2005-04-20", 173],
["2005-04-21", 69],
["2005-04-22", 58],
["2005-04-23", 107],
["2005-04-24", 106],
["2005-04-25", 73],
["2005-04-26", 115],
["2005-04-27", 122],
["2005-04-28", 418],
["2005-04-29", 98],
["2005-04-30", 138],
["2005-05-01", 183],
["2005-05-02", 122],
["2005-05-03", 139],
["2005-05-04", 160],
["2005-05-05", 97],
["2005-05-06", 48],
["2005-05-07", 80],
["2005-05-08", 130],
["2005-05-09", 63],
["2005-05-10", 62],
["2005-05-11", 86],
["2005-05-12", 110],
["2005-05-13", 81],
["2005-05-14", 85],
["2005-05-15", 113],
["2005-05-16", 83],
["2005-05-17", 49],
["2005-05-18", 51],
["2005-05-19", 53],
["2005-05-20", 80],
["2005-05-21", 120],
["2005-05-22", 46],
["2005-05-23", 59],
["2005-05-24", 82],
["2005-05-25", 88],
["2005-05-26", 107],
["2005-05-27", 83],
["2005-05-28", 120],
["2005-05-29", 100],
["2005-05-30", 109],
["2005-05-31", 95],
["2005-06-01", 93],
["2005-06-02", 54],
["2005-06-03", 58],
["2005-06-04", 77],
["2005-06-05", 75],
["2005-06-06", 53],
["2005-06-07", 86],
["2005-06-08", 96],
["2005-06-09", 81],
["2005-06-10", 85],
["2005-06-11", 136],
["2005-06-12", 106],
["2005-06-13", 94],
["2005-06-14", 69],
["2005-06-15", 56],
["2005-06-16", 83],
["2005-06-17", 79],
["2005-06-18", 92],
["2005-06-19", 116],
["2005-06-20", 131],
["2005-06-21", 113],
["2005-06-22", 116],
["2005-06-23", 120],
["2005-06-24", 148],
["2005-06-25", 141],
["2005-06-26", 79],
["2005-06-27", 52],
["2005-06-28", 84],
["2005-06-29", 86],
["2005-06-30", 100],
["2005-07-01", 97],
["2005-07-02", 76],
["2005-07-03", 87],
["2005-07-04", 64],
["2005-07-05", 63],
["2005-07-06", 70],
["2005-07-07", 89],
["2005-07-08", 98],
["2005-07-09", 91],
["2005-07-10", 79],
["2005-07-11", 69],
["2005-07-12", 81],
["2005-07-13", 93],
["2005-07-14", 93],
["2005-07-15", 97],
["2005-07-17", 150],
["2005-07-18", 103],
["2005-07-19", 114],
["2005-07-20", 125],
["2005-07-21", 104],
["2005-07-22", 79],
["2005-07-23", 51],
["2005-07-24", 23],
["2005-07-25", 75],
["2005-07-26", 109],
["2005-07-27", 73],
["2005-07-28", 63],
["2005-07-29", 57],
["2005-07-30", 95],
["2005-07-31", 79],
["2005-08-01", 81],
["2005-08-02", 68],
["2005-08-03", 72],
["2005-08-04", 46],
["2005-08-05", 63],
["2005-08-06", 86],
["2005-08-07", 71],
["2005-08-08", 72],
["2005-08-09", 62],
["2005-08-10", 60],
["2005-08-11", 146],
["2005-08-12", 141],
["2005-08-13", 63],
["2005-08-14", 98],
["2005-08-15", 100],
["2005-08-16", 46],
["2005-08-17", 26],
["2005-08-18", 53],
["2005-08-19", 59],
["2005-08-20", 79],
["2005-08-21", 110],
["2005-08-22", 91],
["2005-08-23", 97],
["2005-08-24", 90],
["2005-08-25", 85],
["2005-08-26", 110],
["2005-08-27", 94],
["2005-08-28", 154],
["2005-08-29", 136],
["2005-08-30", 113],
["2005-08-31", 152],
["2005-09-01", 118],
["2005-09-02", 42],
["2005-09-03", 68],
["2005-09-04", 80],
["2005-09-05", 90],
["2005-09-06", 99],
["2005-09-07", 98],
["2005-09-08", 83],
["2005-09-09", 141],
["2005-09-10", 164],
["2005-09-11", 182],
["2005-09-12", 107],
["2005-09-13", 76],
["2005-09-14", 62],
["2005-09-15", 104],
["2005-09-16", 78],
["2005-09-17", 73],
["2005-09-18", 66],
["2005-09-19", 99],
["2005-09-20", 92],
["2005-09-21", 71],
["2005-09-22", 60],
["2005-09-23", 110],
["2005-09-24", 112],
["2005-09-25", 134],
["2005-09-26", 168],
["2005-09-27", 97],
["2005-09-28", 115],
["2005-09-29", 100],
["2005-09-30", 47],
["2005-10-01", 88],
["2005-10-02", 72],
["2005-10-03", 70],
["2005-10-04", 77],
["2005-10-05", 103],
["2005-10-06", 136],
["2005-10-07", 82],
["2005-10-08", 42],
["2005-10-09", 93],
["2005-10-10", 167],
["2005-10-11", 152],
["2005-10-12", 183],
["2005-10-13", 155],
["2005-10-14", 50],
["2005-10-15", 73],
["2005-10-16", 120],
["2005-10-17", 57],
["2005-10-18", 96],
["2005-10-19", 94],
["2005-10-20", 151],
["2005-10-21", 96],
["2005-10-22", 92],
["2005-10-23", 135],
["2005-10-24", 139],
["2005-10-25", 99],
["2005-10-26", 176],
["2005-10-27", 156],
["2005-10-28", 24],
["2005-10-29", 48],
["2005-10-30", 54],
["2005-10-31", 97],
["2005-11-01", 134],
["2005-11-02", 252],
["2005-11-03", 334],
["2005-11-04", 330],
["2005-11-05", 472],
["2005-11-06", 191],
["2005-11-07", 141],
["2005-11-08", 45],
["2005-11-09", 104],
["2005-11-10", 156],
["2005-11-11", 79],
["2005-11-12", 95],
["2005-11-13", 70],
["2005-11-14", 80],
["2005-11-15", 60],
["2005-11-16", 104],
["2005-11-17", 160],
["2005-11-18", 184],
["2005-11-19", 126],
["2005-11-20", 91],
["2005-11-21", 73],
["2005-11-22", 134],
["2005-11-23", 76],
["2005-11-24", 108],
["2005-11-25", 127],
["2005-11-26", 131],
["2005-11-27", 163],
["2005-11-28", 220],
["2005-11-29", 73],
["2005-11-30", 154],
["2005-12-01", 97],
["2005-12-02", 58],
["2005-12-03", 99],
["2005-12-04", 61],
["2005-12-05", 60],
["2005-12-06", 37],
["2005-12-07", 39],
["2005-12-08", 72],
["2005-12-09", 121],
["2005-12-10", 99],
["2005-12-11", 44],
["2005-12-12", 49],
["2005-12-13", 40],
["2005-12-14", 53],
["2005-12-15", 50],
["2005-12-16", 49],
["2005-12-17", 44],
["2005-12-18", 77],
["2005-12-19", 129],
["2005-12-20", 114],
["2005-12-21", 57],
["2005-12-22", 86],
["2005-12-23", 120],
["2005-12-24", 102],
["2005-12-25", 146],
["2005-12-26", 61],
["2005-12-27", 57],
["2005-12-28", 122],
["2005-12-29", 113],
["2005-12-30", 157],
["2005-12-31", 76],
["2006-01-01", 108],
["2006-01-02", 100],
["2006-01-03", 119],
["2006-01-04", 69],
["2006-01-05", 53],
["2006-01-06", 54],
["2006-01-07", 62],
["2006-01-08", 100],
["2006-01-09", 103],
["2006-01-10", 147],
["2006-01-11", 100],
["2006-01-12", 110],
["2006-01-13", 98],
["2006-01-14", 107],
["2006-01-15", 252],
["2006-01-16", 243],
["2006-01-17", 116],
["2006-01-18", 110],
["2006-01-19", 181],
["2006-01-20", 273],
["2006-01-21", 310],
["2006-01-22", 136],
["2006-01-23", 110],
["2006-01-24", 146],
["2006-01-25", 119],
["2006-01-26", 157],
["2006-01-27", 153],
["2006-01-28", 69],
["2006-01-29", 143],
["2006-01-30", 54],
["2006-01-31", 65],
["2006-02-01", 83],
["2006-02-02", 75],
["2006-02-03", 56],
["2006-02-04", 73],
["2006-02-05", 114],
["2006-02-06", 138],
["2006-02-07", 61],
["2006-02-08", 34],
["2006-02-09", 70],
["2006-02-10", 93],
["2006-02-11", 99],
["2006-02-12", 110],
["2006-02-13", 228],
["2006-02-14", 178],
["2006-02-15", 64],
["2006-02-16", 93],
["2006-02-17", 59],
["2006-02-18", 87],
["2006-02-19", 95],
["2006-02-20", 133],
["2006-02-21", 215],
["2006-02-22", 75],
["2006-02-23", 93],
["2006-02-24", 74],
["2006-02-25", 112],
["2006-02-26", 54],
["2006-02-27", 81],
["2006-02-28", 83],
["2006-03-01", 62],
["2006-03-02", 49],
["2006-03-03", 89],
["2006-03-04", 154],
["2006-03-05", 99],
["2006-03-06", 80],
["2006-03-07", 90],
["2006-03-08", 98],
["2006-03-09", 91],
["2006-03-10", 408],
["2006-03-11", 95],
["2006-03-12", 85],
["2006-03-13", 90],
["2006-03-14", 88],
["2006-03-15", 109],
["2006-03-16", 91],
["2006-03-17", 135],
["2006-03-18", 256],
["2006-03-19", 84],
["2006-03-20", 226],
["2006-03-21", 197],
["2006-03-22", 181],
["2006-03-23", 66],
["2006-03-24", 97],
["2006-03-25", 206],
["2006-03-26", 99],
["2006-03-27", 347],
["2006-03-28", 98],
["2006-03-29", 124],
["2006-03-30", 92],
["2006-03-31", 96],
["2006-04-01", 183],
["2006-04-02", 122],
["2006-04-03", 187],
["2006-04-04", 162],
["2006-04-05", 99],
["2006-04-06", 78],
["2006-04-07", 158],
["2006-04-08", 186],
["2006-04-09", 500],
["2006-04-10", 500],
["2006-04-11", 166],
["2006-04-12", 95],
["2006-04-13", 60],
["2006-04-14", 149],
["2006-04-15", 128],
["2006-04-16", 84],
["2006-04-17", 500],
["2006-04-18", 168],
["2006-04-19", 319],
["2006-04-20", 79],
["2006-04-21", 123],
["2006-04-22", 145],
["2006-04-23", 203],
["2006-04-24", 94],
["2006-04-25", 128],
["2006-04-26", 210],
["2006-04-27", 98],
["2006-04-28", 99],
["2006-04-29", 131],
["2006-04-30", 165],
["2006-05-01", 432],
["2006-05-02", 94],
["2006-05-03", 92],
["2006-05-04", 147],
["2006-05-05", 95],
["2006-05-06", 93],
["2006-05-07", 138],
["2006-05-08", 123],
["2006-05-09", 79],
["2006-05-10", 71],
["2006-05-11", 61],
["2006-05-12", 63],
["2006-05-13", 44],
["2006-05-14", 93],
["2006-05-15", 95],
["2006-05-16", 98],
["2006-05-17", 500],
["2006-05-18", 168],
["2006-05-19", 240],
["2006-05-20", 82],
["2006-05-21", 96],
["2006-05-22", 96],
["2006-05-23", 95],
["2006-05-24", 84],
["2006-05-25", 91],
["2006-05-26", 78],
["2006-05-27", 32],
["2006-05-28", 51],
["2006-05-29", 84],
["2006-05-30", 98],
["2006-05-31", 118],
["2006-06-01", 96],
["2006-06-02", 112],
["2006-06-03", 69],
["2006-06-04", 100],
["2006-06-05", 137],
["2006-06-06", 147],
["2006-06-07", 86],
["2006-06-08", 65],
["2006-06-09", 92],
["2006-06-10", 39],
["2006-06-11", 61],
["2006-06-12", 96],
["2006-06-13", 77],
["2006-06-14", 43],
["2006-06-15", 78],
["2006-06-16", 86],
["2006-06-17", 50],
["2006-06-18", 68],
["2006-06-19", 97],
["2006-06-20", 84],
["2006-06-21", 152],
["2006-06-22", 118],
["2006-06-23", 123],
["2006-06-24", 76],
["2006-06-25", 68],
["2006-06-26", 84],
["2006-06-27", 75],
["2006-06-28", 90],
["2006-06-29", 66],
["2006-06-30", 42],
["2006-07-01", 57],
["2006-07-02", 52],
["2006-07-03", 81],
["2006-07-04", 75],
["2006-07-05", 97],
["2006-07-06", 60],
["2006-07-07", 65],
["2006-07-08", 67],
["2006-07-09", 82],
["2006-07-10", 99],
["2006-07-11", 66],
["2006-07-12", 72],
["2006-07-13", 44],
["2006-07-14", 78],
["2006-07-15", 70],
["2006-07-16", 69],
["2006-07-17", 58],
["2006-07-18", 43],
["2006-07-19", 55],
["2006-07-20", 74],
["2006-07-21", 76],
["2006-07-22", 36],
["2006-07-23", 72],
["2006-07-24", 61],
["2006-07-25", 46],
["2006-07-26", 50],
["2006-07-27", 65],
["2006-07-28", 98],
["2006-07-29", 115],
["2006-07-30", 138],
["2006-07-31", 88],
["2006-08-01", 47],
["2006-08-02", 39],
["2006-08-03", 61],
["2006-08-04", 64],
["2006-08-05", 74],
["2006-08-06", 100],
["2006-08-07", 82],
["2006-08-08", 84],
["2006-08-09", 64],
["2006-08-10", 89],
["2006-08-11", 75],
["2006-08-12", 98],
["2006-08-13", 69],
["2006-08-14", 27],
["2006-08-15", 70],
["2006-08-16", 84],
["2006-08-17", 91],
["2006-08-18", 85],
["2006-08-19", 97],
["2006-08-20", 77],
["2006-08-21", 45],
["2006-08-22", 69],
["2006-08-23", 67],
["2006-08-24", 99],
["2006-08-25", 131],
["2006-08-26", 69],
["2006-08-27", 66],
["2006-08-28", 93],
["2006-08-29", 62],
["2006-08-30", 59],
["2006-08-31", 64],
["2006-09-01", 89],
["2006-09-02", 100],
["2006-09-03", 109],
["2006-09-04", 28],
["2006-09-05", 71],
["2006-09-06", 87],
["2006-09-07", 112],
["2006-09-08", 71],
["2006-09-09", 37],
["2006-09-10", 67],
["2006-09-11", 86],
["2006-09-12", 89],
["2006-09-13", 100],
["2006-09-14", 107],
["2006-09-15", 109],
["2006-09-16", 116],
["2006-09-17", 134],
["2006-09-18", 100],
["2006-09-19", 132],
["2006-09-20", 151],
["2006-09-21", 99],
["2006-09-22", 95],
["2006-09-23", 118],
["2006-09-24", 121],
["2006-09-25", 119],
["2006-09-26", 49],
["2006-09-27", 91],
["2006-09-28", 98],
["2006-09-29", 70],
["2006-09-30", 100],
["2006-10-01", 139],
["2006-10-02", 152],
["2006-10-03", 143],
["2006-10-04", 73],
["2006-10-05", 99],
["2006-10-06", 194],
["2006-10-07", 100],
["2006-10-08", 91],
["2006-10-09", 77],
["2006-10-10", 131],
["2006-10-11", 65],
["2006-10-12", 73],
["2006-10-13", 121],
["2006-10-14", 135],
["2006-10-15", 100],
["2006-10-16", 146],
["2006-10-17", 59],
["2006-10-18", 86],
["2006-10-19", 121],
["2006-10-20", 71],
["2006-10-21", 97],
["2006-10-22", 87],
["2006-10-23", 46],
["2006-10-24", 99],
["2006-10-25", 139],
["2006-10-26", 64],
["2006-10-27", 99],
["2006-10-28", 163],
["2006-10-29", 77],
["2006-10-30", 130],
["2006-10-31", 154],
["2006-11-01", 96],
["2006-11-02", 98],
["2006-11-03", 140],
["2006-11-04", 180],
["2006-11-05", 48],
["2006-11-06", 93],
["2006-11-07", 94],
["2006-11-08", 148],
["2006-11-09", 61],
["2006-11-10", 89],
["2006-11-11", 72],
["2006-11-12", 136],
["2006-11-13", 98],
["2006-11-14", 37],
["2006-11-15", 78],
["2006-11-16", 99],
["2006-11-17", 100],
["2006-11-18", 129],
["2006-11-19", 147],
["2006-11-20", 249],
["2006-11-21", 414],
["2006-11-22", 97],
["2006-11-23", 74],
["2006-11-24", 153],
["2006-11-25", 124],
["2006-11-26", 129],
["2006-11-27", 47],
["2006-11-28", 58],
["2006-11-29", 61],
["2006-11-30", 96],
["2006-12-01", 88],
["2006-12-02", 49],
["2006-12-03", 66],
["2006-12-04", 111],
["2006-12-05", 94],
["2006-12-06", 78],
["2006-12-07", 86],
["2006-12-08", 97],
["2006-12-09", 81],
["2006-12-10", 105],
["2006-12-11", 256],
["2006-12-12", 500],
["2006-12-13", 88],
["2006-12-14", 118],
["2006-12-15", 94],
["2006-12-16", 76],
["2006-12-17", 52],
["2006-12-18", 100],
["2006-12-19", 140],
["2006-12-20", 180],
["2006-12-21", 180],
["2006-12-22", 88],
["2006-12-23", 95],
["2006-12-24", 85],
["2006-12-25", 136],
["2006-12-26", 160],
["2006-12-27", 80],
["2006-12-28", 47],
["2006-12-29", 90],
["2006-12-30", 157],
["2006-12-31", 139],
["2007-01-01", 158],
["2007-01-02", 150],
["2007-01-03", 133],
["2007-01-04", 170],
["2007-01-05", 322],
["2007-01-06", 73],
["2007-01-07", 47],
["2007-01-08", 45],
["2007-01-09", 86],
["2007-01-10", 98],
["2007-01-11", 75],
["2007-01-12", 56],
["2007-01-13", 74],
["2007-01-14", 102],
["2007-01-15", 170],
["2007-01-16", 64],
["2007-01-17", 84],
["2007-01-18", 52],
["2007-01-19", 93],
["2007-01-20", 147],
["2007-01-21", 98],
["2007-01-22", 58],
["2007-01-23", 96],
["2007-01-24", 118],
["2007-01-25", 140],
["2007-01-26", 68],
["2007-01-27", 55],
["2007-01-28", 55],
["2007-01-29", 114],
["2007-01-30", 85],
["2007-01-31", 76],
["2007-02-01", 50],
["2007-02-02", 100],
["2007-02-03", 115],
["2007-02-04", 93],
["2007-02-05", 175],
["2007-02-06", 67],
["2007-02-07", 110],
["2007-02-08", 99],
["2007-02-09", 67],
["2007-02-10", 61],
["2007-02-11", 55],
["2007-02-12", 103],
["2007-02-13", 181],
["2007-02-14", 74],
["2007-02-15", 75],
["2007-02-16", 97],
["2007-02-17", 98],
["2007-02-18", 115],
["2007-02-19", 99],
["2007-02-20", 160],
["2007-02-21", 200],
["2007-02-22", 173],
["2007-02-23", 78],
["2007-02-24", 75],
["2007-02-25", 123],
["2007-02-26", 169],
["2007-02-27", 172],
["2007-02-28", 108],
["2007-03-01", 98],
["2007-03-02", 85],
["2007-03-03", 87],
["2007-03-04", 28],
["2007-03-05", 34],
["2007-03-06", 35],
["2007-03-07", 51],
["2007-03-08", 54],
["2007-03-09", 105],
["2007-03-10", 75],
["2007-03-11", 34],
["2007-03-12", 68],
["2007-03-13", 133],
["2007-03-14", 157],
["2007-03-15", 106],
["2007-03-16", 78],
["2007-03-17", 100],
["2007-03-18", 121],
["2007-03-19", 119],
["2007-03-21", 138],
["2007-03-22", 145],
["2007-03-23", 202],
["2007-03-24", 192],
["2007-03-25", 79],
["2007-03-26", 78],
["2007-03-27", 84],
["2007-03-28", 98],
["2007-03-29", 99],
["2007-03-30", 66],
["2007-03-31", 103],
["2007-04-01", 63],
["2007-04-02", 48],
["2007-04-03", 40],
["2007-04-04", 95],
["2007-04-05", 110],
["2007-04-06", 148],
["2007-04-07", 46],
["2007-04-08", 43],
["2007-04-09", 96],
["2007-04-10", 133],
["2007-04-11", 88],
["2007-04-12", 107],
["2007-04-13", 55],
["2007-04-14", 74],
["2007-04-15", 72],
["2007-04-16", 81],
["2007-04-17", 74],
["2007-04-18", 100],
["2007-04-19", 173],
["2007-04-20", 155],
["2007-04-21", 62],
["2007-04-22", 58],
["2007-04-23", 81],
["2007-04-24", 78],
["2007-04-25", 72],
["2007-04-26", 90],
["2007-04-27", 113],
["2007-04-28", 115],
["2007-04-29", 190],
["2007-04-30", 151],
["2007-05-01", 61],
["2007-05-02", 87],
["2007-05-03", 96],
["2007-05-04", 97],
["2007-05-05", 123],
["2007-05-06", 91],
["2007-05-07", 139],
["2007-05-08", 147],
["2007-05-09", 98],
["2007-05-10", 116],
["2007-05-11", 116],
["2007-05-12", 99],
["2007-05-13", 100],
["2007-05-14", 72],
["2007-05-15", 97],
["2007-05-16", 100],
["2007-05-17", 84],
["2007-05-18", 58],
["2007-05-19", 60],
["2007-05-20", 98],
["2007-05-21", 82],
["2007-05-22", 116],
["2007-05-23", 60],
["2007-05-24", 169],
["2007-05-25", 250],
["2007-05-26", 98],
["2007-05-27", 118],
["2007-05-28", 96],
["2007-05-29", 98],
["2007-05-30", 126],
["2007-05-31", 119],
["2007-06-01", 75],
["2007-06-02", 107],
["2007-06-03", 99],
["2007-06-04", 84],
["2007-06-05", 99],
["2007-06-06", 146],
["2007-06-07", 195],
["2007-06-08", 194],
["2007-06-09", 134],
["2007-06-10", 97],
["2007-06-11", 136],
["2007-06-12", 168],
["2007-06-13", 142],
["2007-06-14", 52],
["2007-06-15", 91],
["2007-06-16", 98],
["2007-06-17", 123],
["2007-06-18", 138],
["2007-06-19", 202],
["2007-06-20", 151],
["2007-06-21", 123],
["2007-06-22", 85],
["2007-06-23", 121],
["2007-06-24", 97],
["2007-06-25", 72],
["2007-06-26", 98],
["2007-06-27", 135],
["2007-06-28", 52],
["2007-06-29", 95],
["2007-06-30", 87],
["2007-07-01", 28],
["2007-07-02", 77],
["2007-07-03", 99],
["2007-07-04", 82],
["2007-07-06", 145],
["2007-07-07", 80],
["2007-07-08", 75],
["2007-07-09", 115],
["2007-07-10", 58],
["2007-07-11", 65],
["2007-07-12", 78],
["2007-07-13", 74],
["2007-07-14", 83],
["2007-07-15", 93],
["2007-07-16", 96],
["2007-07-17", 169],
["2007-07-18", 98],
["2007-07-19", 47],
["2007-07-20", 76],
["2007-07-21", 98],
["2007-07-22", 99],
["2007-07-23", 117],
["2007-07-24", 99],
["2007-07-25", 119],
["2007-07-26", 151],
["2007-07-27", 150],
["2007-07-28", 98],
["2007-07-29", 80],
["2007-07-30", 138],
["2007-07-31", 26],
["2007-08-01", 52],
["2007-08-02", 42],
["2007-08-03", 70],
["2007-08-04", 85],
["2007-08-05", 98],
["2007-08-06", 107],
["2007-08-07", 93],
["2007-08-08", 88],
["2007-08-09", 86],
["2007-08-10", 79],
["2007-08-11", 74],
["2007-08-12", 66],
["2007-08-13", 56],
["2007-08-14", 76],
["2007-08-15", 86],
["2007-08-16", 115],
["2007-08-17", 91],
["2007-08-18", 93],
["2007-08-19", 95],
["2007-08-20", 95],
["2007-08-21", 116],
["2007-08-22", 88],
["2007-08-23", 77],
["2007-08-24", 83],
["2007-08-25", 95],
["2007-08-26", 78],
["2007-08-27", 49],
["2007-08-28", 78],
["2007-08-29", 64],
["2007-08-30", 75],
["2007-08-31", 98],
["2007-09-01", 108],
["2007-09-02", 95],
["2007-09-03", 73],
["2007-09-04", 77],
["2007-09-05", 94],
["2007-09-06", 100],
["2007-09-07", 98],
["2007-09-08", 94],
["2007-09-09", 98],
["2007-09-10", 142],
["2007-09-11", 171],
["2007-09-12", 133],
["2007-09-13", 97],
["2007-09-14", 58],
["2007-09-15", 66],
["2007-09-16", 99],
["2007-09-17", 138],
["2007-09-18", 60],
["2007-09-19", 24],
["2007-09-20", 62],
["2007-09-21", 79],
["2007-09-22", 99],
["2007-09-23", 97],
["2007-09-24", 98],
["2007-09-25", 95],
["2007-09-26", 80],
["2007-09-27", 40],
["2007-09-28", 63],
["2007-09-29", 80],
["2007-09-30", 64],
["2007-10-01", 75],
["2007-10-02", 52],
["2007-10-03", 78],
["2007-10-04", 94],
["2007-10-05", 34],
["2007-10-06", 48],
["2007-10-07", 28],
["2007-10-08", 22],
["2007-10-09", 44],
["2007-10-10", 69],
["2007-10-11", 88],
["2007-10-12", 119],
["2007-10-13", 95],
["2007-10-14", 35],
["2007-10-15", 53],
["2007-10-16", 66],
["2007-10-17", 95],
["2007-10-18", 82],
["2007-10-19", 49],
["2007-10-20", 60],
["2007-10-21", 98],
["2007-10-22", 100],
["2007-10-23", 89],
["2007-10-24", 96],
["2007-10-25", 143],
["2007-10-26", 184],
["2007-10-27", 179],
["2007-10-28", 27],
["2007-10-29", 47],
["2007-10-30", 121],
["2007-10-31", 95],
["2007-11-01", 18],
["2007-11-02", 83],
["2007-11-03", 57],
["2007-11-04", 76],
["2007-11-05", 119],
["2007-11-06", 172],
["2007-11-07", 253],
["2007-11-08", 186],
["2007-11-09", 35],
["2007-11-10", 54],
["2007-11-11", 90],
["2007-11-12", 159],
["2007-11-13", 153],
["2007-11-14", 58],
["2007-11-15", 31],
["2007-11-16", 76],
["2007-11-17", 112],
["2007-11-18", 45],
["2007-11-19", 88],
["2007-11-20", 83],
["2007-11-21", 98],
["2007-11-22", 144],
["2007-11-23", 119],
["2007-11-24", 117],
["2007-11-25", 269],
["2007-11-26", 55],
["2007-11-27", 85],
["2007-11-28", 100],
["2007-11-29", 81],
["2007-11-30", 78],
["2007-12-01", 136],
["2007-12-02", 96],
["2007-12-03", 71],
["2007-12-04", 68],
["2007-12-05", 88],
["2007-12-06", 129],
["2007-12-07", 54],
["2007-12-08", 77],
["2007-12-09", 118],
["2007-12-11", 110],
["2007-12-12", 46],
["2007-12-13", 56],
["2007-12-14", 91],
["2007-12-15", 59],
["2007-12-16", 89],
["2007-12-17", 78],
["2007-12-18", 104],
["2007-12-19", 155],
["2007-12-20", 153],
["2007-12-21", 114],
["2007-12-22", 166],
["2007-12-23", 98],
["2007-12-24", 124],
["2007-12-25", 280],
["2007-12-26", 269],
["2007-12-27", 421],
["2007-12-28", 500],
["2007-12-29", 156],
["2007-12-30", 72],
["2007-12-31", 58],
["2008-01-01", 32],
["2008-01-02", 57],
["2008-01-03", 75],
["2008-01-04", 90],
["2008-01-05", 147],
["2008-01-06", 146],
["2008-01-07", 115],
["2008-01-08", 121],
["2008-01-09", 94],
["2008-01-10", 95],
["2008-01-11", 113],
["2008-01-12", 46],
["2008-01-13", 39],
["2008-01-14", 87],
["2008-01-15", 119],
["2008-01-16", 72],
["2008-01-17", 80],
["2008-01-18", 122],
["2008-01-19", 149],
["2008-01-20", 134],
["2008-01-21", 66],
["2008-01-22", 79],
["2008-01-23", 51],
["2008-01-24", 50],
["2008-01-25", 54],
["2008-01-26", 67],
["2008-01-27", 70],
["2008-01-28", 77],
["2008-01-29", 48],
["2008-01-30", 44],
["2008-01-31", 45],
["2008-02-01", 57],
["2008-02-02", 64],
["2008-02-03", 52],
["2008-02-04", 65],
["2008-02-05", 83],
["2008-02-06", 35],
["2008-02-08", 37],
["2008-02-09", 38],
["2008-02-10", 64],
["2008-02-11", 61],
["2008-02-12", 64],
["2008-02-13", 55],
["2008-02-14", 55],
["2008-02-15", 68],
["2008-02-16", 69],
["2008-02-17", 70],
["2008-02-18", 72],
["2008-02-19", 111],
["2008-02-20", 88],
["2008-02-21", 152],
["2008-02-22", 160],
["2008-02-23", 85],
["2008-02-25", 65],
["2008-02-26", 78],
["2008-02-27", 75],
["2008-02-28", 84],
["2008-02-29", 82],
["2008-03-01", 82],
["2008-03-02", 126],
["2008-03-03", 46],
["2008-03-04", 55],
["2008-03-05", 86],
["2008-03-06", 80],
["2008-03-08", 129],
["2008-03-09", 158],
["2008-03-10", 238],
["2008-03-11", 174],
["2008-03-12", 128],
["2008-03-13", 99],
["2008-03-14", 82],
["2008-03-15", 110],
["2008-03-16", 72],
["2008-03-17", 126],
["2008-03-18", 304],
["2008-03-19", 286],
["2008-03-20", 147],
["2008-03-21", 98],
["2008-03-22", 120],
["2008-03-23", 69],
["2008-03-24", 76],
["2008-03-25", 52],
["2008-03-26", 46],
["2008-03-27", 55],
["2008-03-28", 74],
["2008-03-29", 59],
["2008-03-30", 81],
["2008-03-31", 53],
["2008-04-01", 90],
["2008-04-02", 63],
["2008-04-03", 55],
["2008-04-04", 88],
["2008-04-05", 145],
["2008-04-06", 161],
["2008-04-07", 131],
["2008-04-08", 177],
["2008-04-09", 93],
["2008-04-10", 94],
["2008-04-11", 65],
["2008-04-12", 79],
["2008-04-13", 71],
["2008-04-14", 98],
["2008-04-15", 129],
["2008-04-16", 173],
["2008-04-17", 159],
["2008-04-18", 139],
["2008-04-19", 138],
["2008-04-20", 97],
["2008-04-21", 19],
["2008-04-22", 32],
["2008-04-23", 43],
["2008-04-24", 76],
["2008-04-25", 100],
["2008-04-26", 72],
["2008-04-27", 79],
["2008-04-28", 94],
["2008-04-29", 176],
["2008-04-30", 155],
["2008-05-01", 140],
["2008-05-02", 144],
["2008-05-03", 185],
["2008-05-04", 32],
["2008-05-05", 81],
["2008-05-06", 134],
["2008-05-07", 138],
["2008-05-08", 95],
["2008-05-09", 89],
["2008-05-10", 62],
["2008-05-11", 54],
["2008-05-12", 24],
["2008-05-13", 57],
["2008-05-14", 87],
["2008-05-15", 77],
["2008-05-16", 107],
["2008-05-17", 117],
["2008-05-18", 91],
["2008-05-19", 83],
["2008-05-20", 112],
["2008-05-21", 408],
["2008-05-22", 153],
["2008-05-23", 186],
["2008-05-24", 161],
["2008-05-25", 121],
["2008-05-26", 138],
["2008-05-27", 463],
["2008-05-28", 253],
["2008-05-29", 395],
["2008-05-30", 95],
["2008-05-31", 115],
["2008-06-01", 92],
["2008-06-02", 50],
["2008-06-03", 74],
["2008-06-05", 78],
["2008-06-06", 94],
["2008-06-07", 81],
["2008-06-08", 126],
["2008-06-09", 97],
["2008-06-10", 100],
["2008-06-11", 80],
["2008-06-12", 89],
["2008-06-13", 105],
["2008-06-14", 96],
["2008-06-15", 93],
["2008-06-16", 84],
["2008-06-17", 55],
["2008-06-18", 61],
["2008-06-19", 120],
["2008-06-20", 165],
["2008-06-21", 81],
["2008-06-22", 125],
["2008-06-23", 81],
["2008-06-24", 75],
["2008-06-25", 109],
["2008-06-26", 87],
["2008-06-27", 88],
["2008-06-28", 89],
["2008-06-30", 98],
["2008-07-01", 72],
["2008-07-02", 61],
["2008-07-03", 92],
["2008-07-04", 100],
["2008-07-05", 66],
["2008-07-06", 39],
["2008-07-07", 69],
["2008-07-08", 98],
["2008-07-09", 62],
["2008-07-10", 85],
["2008-07-11", 112],
["2008-07-12", 74],
["2008-07-13", 59],
["2008-07-14", 84],
["2008-07-15", 31],
["2008-07-16", 66],
["2008-07-17", 77],
["2008-07-18", 66],
["2008-07-19", 64],
["2008-07-20", 55],
["2008-07-21", 64],
["2008-07-22", 66],
["2008-07-23", 89],
["2008-07-24", 113],
["2008-07-25", 109],
["2008-07-26", 118],
["2008-07-27", 113],
["2008-07-28", 96],
["2008-07-29", 90],
["2008-07-30", 43],
["2008-07-31", 69],
["2008-08-01", 27],
["2008-08-02", 34],
["2008-08-03", 35],
["2008-08-04", 83],
["2008-08-05", 88],
["2008-08-06", 85],
["2008-08-07", 95],
["2008-08-08", 94],
["2008-08-09", 78],
["2008-08-10", 82],
["2008-08-11", 37],
["2008-08-12", 32],
["2008-08-13", 60],
["2008-08-14", 61],
["2008-08-15", 17],
["2008-08-16", 23],
["2008-08-16", 84],
["2008-08-17", 42],
["2008-08-18", 25],
["2008-08-19", 42],
["2008-08-20", 53],
["2008-08-21", 60],
["2008-08-22", 36],
["2008-08-23", 41],
["2008-08-24", 45],
["2008-08-25", 67],
["2008-08-26", 64],
["2008-08-27", 56],
["2008-08-28", 79],
["2008-08-29", 110],
["2008-08-30", 64],
["2008-08-31", 24],
["2008-09-01", 25],
["2008-09-02", 37],
["2008-09-03", 72],
["2008-09-04", 57],
["2008-09-05", 58],
["2008-09-06", 59],
["2008-09-07", 86],
["2008-09-08", 49],
["2008-09-09", 64],
["2008-09-10", 51],
["2008-09-11", 46],
["2008-09-12", 58],
["2008-09-13", 57],
["2008-09-14", 56],
["2008-09-15", 58],
["2008-09-16", 63],
["2008-09-17", 62],
["2008-09-19", 66],
["2008-09-20", 59],
["2008-09-21", 88],
["2008-09-22", 59],
["2008-09-23", 12],
["2008-09-24", 26],
["2008-09-25", 30],
["2008-09-26", 17],
["2008-09-28", 71],
["2008-09-29", 83],
["2008-09-30", 106],
["2008-10-01", 104],
["2008-10-02", 126],
["2008-10-03", 108],
["2008-10-04", 63],
["2008-10-05", 49],
["2008-10-06", 25],
["2008-10-07", 58],
["2008-10-08", 75],
["2008-10-09", 47],
["2008-10-10", 58],
["2008-10-11", 44],
["2008-10-12", 59],
["2008-10-13", 92],
["2008-10-14", 114],
["2008-10-15", 85],
["2008-10-16", 61],
["2008-10-17", 93],
["2008-10-18", 174],
["2008-10-19", 86],
["2008-10-20", 86],
["2008-10-21", 134],
["2008-10-22", 111],
["2008-10-23", 43],
["2008-10-24", 14],
["2008-10-25", 58],
["2008-10-26", 32],
["2008-10-27", 32],
["2008-10-28", 67],
["2008-10-29", 80],
["2008-10-30", 58],
["2008-10-31", 79],
["2008-11-01", 71],
["2008-11-02", 60],
["2008-11-03", 54],
["2008-11-04", 68],
["2008-11-05", 109],
["2008-11-06", 97],
["2008-11-07", 55],
["2008-11-08", 65],
["2008-11-09", 86],
["2008-11-10", 94],
["2008-11-11", 131],
["2008-11-12", 186],
["2008-11-13", 161],
["2008-11-14", 34],
["2008-11-15", 120],
["2008-11-16", 54],
["2008-11-17", 46],
["2008-11-18", 28],
["2008-11-19", 40],
["2008-11-20", 103],
["2008-11-21", 52],
["2008-11-22", 91],
["2008-11-23", 95],
["2008-11-24", 97],
["2008-11-25", 59],
["2008-11-26", 89],
["2008-11-27", 40],
["2008-11-28", 77],
["2008-11-29", 53],
["2008-11-30", 84],
["2008-12-01", 146],
["2008-12-02", 87],
["2008-12-03", 144],
["2008-12-04", 51],
["2008-12-05", 59],
["2008-12-06", 51],
["2008-12-07", 112],
["2008-12-08", 169],
["2008-12-09", 246],
["2008-12-10", 162],
["2008-12-11", 96],
["2008-12-12", 154],
["2008-12-13", 57],
["2008-12-14", 86],
["2008-12-15", 109],
["2008-12-16", 135],
["2008-12-17", 134],
["2008-12-18", 46],
["2008-12-19", 98],
["2008-12-20", 45],
["2008-12-21", 67],
["2008-12-22", 49],
["2008-12-23", 89],
["2008-12-24", 115],
["2008-12-25", 55],
["2008-12-26", 66],
["2008-12-27", 129],
["2008-12-28", 134],
["2008-12-29", 69],
["2008-12-30", 36],
["2008-12-31", 29],
["2009-01-01", 42],
["2009-01-02", 79],
["2009-01-03", 90],
["2009-01-04", 69],
["2009-01-05", 64],
["2009-01-06", 71],
["2009-01-07", 56],
["2009-01-08", 100],
["2009-01-09", 32],
["2009-01-10", 54],
["2009-01-11", 51],
["2009-01-12", 36],
["2009-01-13", 59],
["2009-01-14", 43],
["2009-01-15", 72],
["2009-01-16", 90],
["2009-01-17", 74],
["2009-01-18", 97],
["2009-01-19", 76],
["2009-01-20", 137],
["2009-01-21", 109],
["2009-01-22", 117],
["2009-01-23", 97],
["2009-01-24", 67],
["2009-01-25", 48],
["2009-01-26", 88],
["2009-01-27", 95],
["2009-01-28", 129],
["2009-01-29", 135],
["2009-01-30", 131],
["2009-01-31", 133],
["2009-02-01", 91],
["2009-02-02", 107],
["2009-02-03", 87],
["2009-02-04", 80],
["2009-02-05", 98],
["2009-02-06", 78],
["2009-02-07", 90],
["2009-02-08", 71],
["2009-02-09", 112],
["2009-02-10", 307],
["2009-02-11", 89],
["2009-02-12", 139],
["2009-02-13", 82],
["2009-02-14", 72],
["2009-02-15", 53],
["2009-02-16", 55],
["2009-02-17", 56],
["2009-02-19", 64],
["2009-02-20", 99],
["2009-02-21", 86],
["2009-02-22", 80],
["2009-02-23", 59],
["2009-02-24", 84],
["2009-02-25", 36],
["2009-02-26", 68],
["2009-02-27", 96],
["2009-02-28", 67],
["2009-03-01", 93],
["2009-03-02", 59],
["2009-03-03", 98],
["2009-03-04", 161],
["2009-03-05", 96],
["2009-03-06", 19],
["2009-03-07", 73],
["2009-03-08", 119],
["2009-03-09", 64],
["2009-03-10", 74],
["2009-03-11", 85],
["2009-03-12", 88],
["2009-03-13", 99],
["2009-03-14", 81],
["2009-03-15", 119],
["2009-03-16", 100],
["2009-03-17", 169],
["2009-03-18", 268],
["2009-03-19", 195],
["2009-03-20", 80],
["2009-03-21", 82],
["2009-03-22", 77],
["2009-03-23", 64],
["2009-03-24", 59],
["2009-03-25", 44],
["2009-03-26", 58],
["2009-03-27", 79],
["2009-03-28", 69],
["2009-03-29", 69],
["2009-03-30", 71],
["2009-03-31", 51],
["2009-04-01", 27],
["2009-04-02", 72],
["2009-04-03", 91],
["2009-04-04", 96],
["2009-04-05", 72],
["2009-04-06", 53],
["2009-04-07", 94],
["2009-04-08", 140],
["2009-04-09", 117],
["2009-04-10", 115],
["2009-04-11", 113],
["2009-04-12", 122],
["2009-04-13", 148],
["2009-04-14", 75],
["2009-04-15", 81],
["2009-04-16", 69],
["2009-04-17", 84],
["2009-04-18", 116],
["2009-04-19", 97],
["2009-04-20", 63],
["2009-04-21", 34],
["2009-04-22", 59],
["2009-04-23", 70],
["2009-04-24", 77],
["2009-04-25", 54],
["2009-04-26", 34],
["2009-04-27", 57],
["2009-04-28", 78],
["2009-04-29", 73],
["2009-04-30", 95],
["2009-05-01", 95],
["2009-05-02", 54],
["2009-05-03", 82],
["2009-05-04", 96],
["2009-05-05", 106],
["2009-05-06", 100],
["2009-05-07", 109],
["2009-05-08", 125],
["2009-05-09", 106],
["2009-05-10", 57],
["2009-05-11", 72],
["2009-05-12", 75],
["2009-05-13", 63],
["2009-05-14", 91],
["2009-05-15", 64],
["2009-05-16", 81],
["2009-05-17", 78],
["2009-05-18", 90],
["2009-05-19", 97],
["2009-05-20", 98],
["2009-05-21", 85],
["2009-05-22", 27],
["2009-05-23", 65],
["2009-05-24", 95],
["2009-05-25", 128],
["2009-05-26", 81],
["2009-05-27", 105],
["2009-05-28", 94],
["2009-05-29", 59],
["2009-05-30", 45],
["2009-05-31", 56],
["2009-06-01", 79],
["2009-06-02", 55],
["2009-06-03", 61],
["2009-06-04", 71],
["2009-06-05", 68],
["2009-06-06", 67],
["2009-06-07", 63],
["2009-06-08", 77],
["2009-06-09", 34],
["2009-06-10", 21],
["2009-06-11", 66],
["2009-06-12", 60],
["2009-06-13", 58],
["2009-06-14", 61],
["2009-06-15", 70],
["2009-06-16", 89],
["2009-06-17", 75],
["2009-06-18", 104],
["2009-06-20", 165],
["2009-06-21", 98],
["2009-06-22", 42],
["2009-06-23", 60],
["2009-06-24", 67],
["2009-06-25", 81],
["2009-06-26", 104],
["2009-06-27", 116],
["2009-06-28", 96],
["2009-06-29", 90],
["2009-06-30", 48],
["2009-07-01", 30],
["2009-07-02", 51],
["2009-07-03", 73],
["2009-07-04", 103],
["2009-07-05", 110],
["2009-07-06", 70],
["2009-07-07", 93],
["2009-07-08", 85],
["2009-07-09", 48],
["2009-07-10", 79],
["2009-07-11", 94],
["2009-07-12", 72],
["2009-07-13", 104],
["2009-07-14", 57],
["2009-07-15", 71],
["2009-07-16", 100],
["2009-07-17", 60],
["2009-07-18", 45],
["2009-07-19", 74],
["2009-07-20", 69],
["2009-07-21", 60],
["2009-07-22", 101],
["2009-07-23", 64],
["2009-07-24", 36],
["2009-07-25", 29],
["2009-07-26", 59],
["2009-07-27", 81],
["2009-07-28", 79],
["2009-07-29", 107],
["2009-07-30", 109],
["2009-07-31", 71],
["2009-08-01", 89],
["2009-08-02", 59],
["2009-08-03", 75],
["2009-08-04", 97],
["2009-08-05", 74],
["2009-08-06", 58],
["2009-08-07", 74],
["2009-08-08", 75],
["2009-08-09", 81],
["2009-08-10", 60],
["2009-08-11", 75],
["2009-08-12", 68],
["2009-08-13", 82],
["2009-08-14", 123],
["2009-08-15", 115],
["2009-08-16", 113],
["2009-08-17", 63],
["2009-08-18", 76],
["2009-08-19", 77],
["2009-08-20", 38],
["2009-08-21", 62],
["2009-08-22", 58],
["2009-08-23", 71],
["2009-08-24", 97],
["2009-08-25", 90],
["2009-08-26", 97],
["2009-08-27", 69],
["2009-08-28", 36],
["2009-08-29", 61],
["2009-08-30", 69],
["2009-08-31", 78],
["2009-09-01", 88],
["2009-09-02", 98],
["2009-09-03", 109],
["2009-09-04", 99],
["2009-09-05", 92],
["2009-09-06", 32],
["2009-09-07", 20],
["2009-09-08", 51],
["2009-09-09", 66],
["2009-09-10", 77],
["2009-09-11", 69],
["2009-09-12", 42],
["2009-09-13", 65],
["2009-09-14", 91],
["2009-09-15", 72],
["2009-09-16", 93],
["2009-09-17", 117],
["2009-09-18", 121],
["2009-09-19", 75],
["2009-09-20", 101],
["2009-09-21", 111],
["2009-09-22", 79],
["2009-09-23", 90],
["2009-09-24", 108],
["2009-09-25", 130],
["2009-09-26", 98],
["2009-09-27", 66],
["2009-09-28", 74],
["2009-09-29", 97],
["2009-09-30", 112],
["2009-10-01", 88],
["2009-10-02", 22],
["2009-10-03", 29],
["2009-10-04", 44],
["2009-10-05", 69],
["2009-10-06", 83],
["2009-10-07", 74],
["2009-10-08", 72],
["2009-10-09", 88],
["2009-10-10", 73],
["2009-10-11", 94],
["2009-10-12", 108],
["2009-10-13", 37],
["2009-10-14", 42],
["2009-10-15", 72],
["2009-10-16", 114],
["2009-10-17", 57],
["2009-10-18", 92],
["2009-10-19", 90],
["2009-10-20", 77],
["2009-10-21", 76],
["2009-10-22", 100],
["2009-10-23", 111],
["2009-10-24", 141],
["2009-10-25", 147],
["2009-10-26", 77],
["2009-10-27", 68],
["2009-10-28", 100],
["2009-10-29", 137],
["2009-10-30", 120],
["2009-10-31", 51],
["2009-11-01", 48],
["2009-11-02", 12],
["2009-11-03", 66],
["2009-11-04", 111],
["2009-11-05", 136],
["2009-11-06", 186],
["2009-11-07", 276],
["2009-11-08", 259],
["2009-11-09", 84],
["2009-11-10", 20],
["2009-11-11", 34],
["2009-11-12", 53],
["2009-11-13", 59],
["2009-11-14", 53],
["2009-11-15", 26],
["2009-11-16", 29],
["2009-11-17", 35],
["2009-11-18", 66],
["2009-11-19", 47],
["2009-11-20", 74],
["2009-11-21", 63],
["2009-11-22", 121],
["2009-11-23", 149],
["2009-11-24", 184],
["2009-11-25", 79],
["2009-11-26", 107],
["2009-11-27", 132],
["2009-11-28", 99],
["2009-11-29", 167],
["2009-11-30", 117],
["2009-12-01", 86],
["2009-12-02", 133],
["2009-12-03", 36],
["2009-12-04", 99],
["2009-12-05", 62],
["2009-12-06", 94],
["2009-12-07", 141],
["2009-12-08", 186],
["2009-12-10", 167],
["2009-12-11", 147],
["2009-12-12", 31],
["2009-12-13", 80],
["2009-12-14", 96],
["2009-12-15", 49],
["2009-12-16", 55],
["2009-12-17", 45],
["2009-12-18", 42],
["2009-12-19", 44],
["2009-12-20", 48],
["2009-12-21", 63],
["2009-12-22", 94],
["2009-12-23", 93],
["2009-12-24", 133],
["2009-12-25", 500],
["2009-12-26", 96],
["2009-12-27", 94],
["2009-12-28", 89],
["2009-12-29", 160],
["2009-12-30", 55],
["2009-12-31", 55],
["2010-01-01", 91],
["2010-01-02", 105],
["2010-01-03", 90],
["2010-01-04", 49],
["2010-01-05", 47],
["2010-01-06", 59],
["2010-01-07", 64],
["2010-01-08", 80],
["2010-01-09", 100],
["2010-01-10", 60],
["2010-01-11", 52],
["2010-01-12", 30],
["2010-01-13", 54],
["2010-01-14", 76],
["2010-01-15", 58],
["2010-01-16", 85],
["2010-01-17", 124],
["2010-01-18", 143],
["2010-01-19", 183],
["2010-01-20", 140],
["2010-01-21", 24],
["2010-01-22", 57],
["2010-01-23", 78],
["2010-01-24", 66],
["2010-01-25", 99],
["2010-01-26", 76],
["2010-01-27", 128],
["2010-01-28", 63],
["2010-01-29", 43],
["2010-01-30", 58],
["2010-01-31", 56],
["2010-02-01", 65],
["2010-02-02", 61],
["2010-02-03", 54],
["2010-02-04", 54],
["2010-02-05", 63],
["2010-02-06", 70],
["2010-02-07", 61],
["2010-02-08", 87],
["2010-02-09", 109],
["2010-02-10", 50],
["2010-02-11", 23],
["2010-02-12", 31],
["2010-02-14", 137],
["2010-02-15", 38],
["2010-02-16", 52],
["2010-02-17", 94],
["2010-02-18", 58],
["2010-02-19", 98],
["2010-02-20", 87],
["2010-02-21", 118],
["2010-02-22", 82],
["2010-02-23", 92],
["2010-02-24", 152],
["2010-02-25", 153],
["2010-02-26", 76],
["2010-02-27", 65],
["2010-02-28", 80],
["2010-03-01", 56],
["2010-03-02", 72],
["2010-03-03", 113],
["2010-03-04", 140],
["2010-03-05", 97],
["2010-03-06", 27],
["2010-03-07", 71],
["2010-03-08", 68],
["2010-03-09", 25],
["2010-03-10", 56],
["2010-03-11", 89],
["2010-03-12", 98],
["2010-03-13", 76],
["2010-03-14", 90],
["2010-03-16", 77],
["2010-03-17", 66],
["2010-03-18", 76],
["2010-03-19", 145],
["2010-03-20", 500],
["2010-03-21", 136],
["2010-03-22", 245],
["2010-03-23", 157],
["2010-03-24", 92],
["2010-03-25", 60],
["2010-03-26", 83],
["2010-03-27", 110],
["2010-03-28", 82],
["2010-03-29", 100],
["2010-03-30", 159],
["2010-03-31", 94],
["2010-04-01", 99],
["2010-04-02", 63],
["2010-04-03", 73],
["2010-04-04", 147],
["2010-04-05", 125],
["2010-04-06", 56],
["2010-04-07", 77],
["2010-04-08", 147],
["2010-04-09", 163],
["2010-04-10", 69],
["2010-04-11", 77],
["2010-04-12", 66],
["2010-04-13", 61],
["2010-04-14", 59],
["2010-04-15", 93],
["2010-04-16", 147],
["2010-04-17", 94],
["2010-04-18", 109],
["2010-04-19", 150],
["2010-04-20", 74],
["2010-04-21", 60],
["2010-04-22", 31],
["2010-04-23", 40],
["2010-04-24", 72],
["2010-04-25", 100],
["2010-04-26", 45],
["2010-04-27", 50],
["2010-04-28", 52],
["2010-04-29", 46],
["2010-04-30", 54],
["2010-05-01", 90],
["2010-05-02", 116],
["2010-05-03", 97],
["2010-05-04", 149],
["2010-05-05", 119],
["2010-05-06", 17],
["2010-05-07", 86],
["2010-05-08", 145],
["2010-05-09", 144],
["2010-05-10", 146],
["2010-05-11", 58],
["2010-05-12", 59],
["2010-05-13", 78],
["2010-05-14", 95],
["2010-05-15", 133],
["2010-05-16", 121],
["2010-05-17", 52],
["2010-05-18", 53],
["2010-05-19", 61],
["2010-05-20", 75],
["2010-05-22", 127],
["2010-05-23", 122],
["2010-05-24", 91],
["2010-05-25", 46],
["2010-05-26", 76],
["2010-05-27", 82],
["2010-05-28", 63],
["2010-05-29", 84],
["2010-05-30", 39],
["2010-05-31", 58],
["2010-06-01", 69],
["2010-06-02", 68],
["2010-06-03", 83],
["2010-06-04", 88],
["2010-06-05", 96],
["2010-06-06", 114],
["2010-06-07", 118],
["2010-06-08", 98],
["2010-06-09", 86],
["2010-06-10", 64],
["2010-06-11", 58],
["2010-06-12", 81],
["2010-06-13", 82],
["2010-06-14", 66],
["2010-06-15", 95],
["2010-06-16", 77],
["2010-06-17", 56],
["2010-06-18", 47],
["2010-06-19", 77],
["2010-06-20", 71],
["2010-06-21", 71],
["2010-06-23", 77],
["2010-06-24", 83],
["2010-06-25", 99],
["2010-06-26", 112],
["2010-06-27", 93],
["2010-06-28", 94],
["2010-06-29", 123],
["2010-06-30", 100],
["2010-07-01", 118],
["2010-07-02", 40],
["2010-07-03", 63],
["2010-07-04", 86],
["2010-07-05", 66],
["2010-07-06", 54],
["2010-07-07", 73],
["2010-07-08", 80],
["2010-07-09", 74],
["2010-07-10", 59],
["2010-07-11", 68],
["2010-07-12", 73],
["2010-07-13", 84],
["2010-07-14", 78],
["2010-07-15", 89],
["2010-07-16", 115],
["2010-07-17", 84],
["2010-07-18", 87],
["2010-07-19", 121],
["2010-07-21", 63],
["2010-07-22", 90],
["2010-07-23", 123],
["2010-07-24", 88],
["2010-07-25", 100],
["2010-07-26", 121],
["2010-07-27", 139],
["2010-07-28", 100],
["2010-07-29", 119],
["2010-07-30", 113],
["2010-07-31", 92],
["2010-08-01", 48],
["2010-08-02", 68],
["2010-08-03", 83],
["2010-08-04", 98],
["2010-08-05", 26],
["2010-08-06", 31],
["2010-08-07", 71],
["2010-08-08", 57],
["2010-08-09", 94],
["2010-08-10", 90],
["2010-08-11", 94],
["2010-08-12", 64],
["2010-08-13", 83],
["2010-08-13", 83],
["2010-08-14", 84],
["2010-08-15", 57],
["2010-08-16", 66],
["2010-08-17", 94],
["2010-08-18", 137],
["2010-08-19", 73],
["2010-08-20", 76],
["2010-08-21", 56],
["2010-08-22", 23],
["2010-08-23", 54],
["2010-08-24", 87],
["2010-08-25", 65],
["2010-08-26", 66],
["2010-08-27", 52],
["2010-08-28", 55],
["2010-08-29", 76],
["2010-08-30", 79],
["2010-08-31", 78],
["2010-09-01", 67],
["2010-09-02", 54],
["2010-09-03", 73],
["2010-09-04", 64],
["2010-09-05", 80],
["2010-09-06", 87],
["2010-09-07", 95],
["2010-09-08", 67],
["2010-09-09", 89],
["2010-09-10", 75],
["2010-09-11", 49],
["2010-09-12", 67],
["2010-09-13", 84],
["2010-09-14", 97],
["2010-09-15", 134],
["2010-09-16", 122],
["2010-09-17", 62],
["2010-09-18", 19],
["2010-09-19", 50],
["2010-09-20", 60],
["2010-09-21", 23],
["2010-09-22", 24],
["2010-09-23", 52],
["2010-09-24", 72],
["2010-09-25", 93],
["2010-09-26", 84],
["2010-09-27", 57],
["2010-09-28", 32],
["2010-09-29", 65],
["2010-09-30", 92],
["2010-10-01", 125],
["2010-10-02", 88],
["2010-10-03", 17],
["2010-10-04", 36],
["2010-10-05", 63],
["2010-10-06", 95],
["2010-10-07", 186],
["2010-10-08", 192],
["2010-10-09", 177],
["2010-10-10", 202],
["2010-10-11", 70],
["2010-10-12", 27],
["2010-10-13", 65],
["2010-10-14", 58],
["2010-10-15", 30],
["2010-10-16", 80],
["2010-10-17", 65],
["2010-10-18", 80],
["2010-10-19", 50],
["2010-10-20", 66],
["2010-10-21", 83],
["2010-10-22", 95],
["2010-10-23", 103],
["2010-10-24", 96],
["2010-10-25", 17],
["2010-10-26", 15],
["2010-10-27", 63],
["2010-10-28", 92],
["2010-10-29", 67],
["2010-10-30", 62],
["2010-10-31", 70],
["2010-11-01", 65],
["2010-11-02", 36],
["2010-11-03", 86],
["2010-11-04", 81],
["2010-11-05", 86],
["2010-11-06", 107],
["2010-11-07", 142],
["2010-11-08", 34],
["2010-11-09", 34],
["2010-11-10", 85],
["2010-11-11", 139],
["2010-11-12", 51],
["2010-11-13", 66],
["2010-11-14", 39],
["2010-11-15", 34],
["2010-11-16", 96],
["2010-11-17", 122],
["2010-11-18", 243],
["2010-11-19", 313],
["2010-11-20", 165],
["2010-11-21", 192],
["2010-11-22", 37],
["2010-11-23", 100],
["2010-11-24", 141],
["2010-11-25", 42],
["2010-11-26", 88],
["2010-11-27", 130],
["2010-11-28", 72],
["2010-11-29", 143],
["2010-11-30", 132],
["2010-12-01", 177],
["2010-12-02", 199],
["2010-12-03", 52],
["2010-12-04", 97],
["2010-12-05", 125],
["2010-12-06", 37],
["2010-12-07", 65],
["2010-12-08", 81],
["2010-12-09", 97],
["2010-12-10", 176],
["2010-12-11", 50],
["2010-12-12", 85],
["2010-12-13", 72],
["2010-12-14", 31],
["2010-12-15", 53],
["2010-12-16", 92],
["2010-12-17", 105],
["2010-12-18", 156],
["2010-12-19", 182],
["2010-12-20", 100],
["2010-12-21", 165],
["2010-12-22", 222],
["2010-12-23", 30],
["2010-12-24", 40],
["2010-12-25", 57],
["2010-12-26", 66],
["2010-12-27", 82],
["2010-12-28", 70],
["2010-12-29", 63],
["2010-12-30", 67],
["2010-12-31", 47],
["2011-01-01", 34],
["2011-01-02", 41],
["2011-01-03", 82],
["2011-01-04", 96],
["2011-01-05", 55],
["2011-01-06", 35],
["2011-01-07", 36],
["2011-01-08", 78],
["2011-01-09", 35],
["2011-01-10", 34],
["2011-01-11", 67],
["2011-01-12", 49],
["2011-01-13", 90],
["2011-01-14", 73],
["2011-01-16", 35],
["2011-01-17", 62],
["2011-01-18", 30],
["2011-01-19", 39],
["2011-01-20", 36],
["2011-01-21", 61],
["2011-01-22", 76],
["2011-01-23", 50],
["2011-01-24", 35],
["2011-01-25", 61],
["2011-01-26", 41],
["2011-01-27", 59],
["2011-01-28", 41],
["2011-01-29", 30],
["2011-01-30", 25],
["2011-01-31", 48],
["2011-02-01", 53],
["2011-02-02", 58],
["2011-02-03", 83],
["2011-02-04", 111],
["2011-02-05", 75],
["2011-02-06", 84],
["2011-02-07", 77],
["2011-02-09", 83],
["2011-02-10", 58],
["2011-02-11", 58],
["2011-02-12", 21],
["2011-02-13", 53],
["2011-02-14", 41],
["2011-02-15", 74],
["2011-02-16", 146],
["2011-02-17", 132],
["2011-02-18", 115],
["2011-02-19", 112],
["2011-02-20", 100],
["2011-02-21", 333],
["2011-02-22", 270],
["2011-02-23", 208],
["2011-02-25", 56],
["2011-02-26", 56],
["2011-02-27", 60],
["2011-02-28", 30],
["2011-03-01", 21],
["2011-03-02", 33],
["2011-03-03", 34],
["2011-03-04", 59],
["2011-03-05", 77],
["2011-03-06", 65],
["2011-03-07", 26],
["2011-03-08", 41],
["2011-03-09", 33],
["2011-03-10", 64],
["2011-03-11", 58],
["2011-03-12", 135],
["2011-03-13", 197],
["2011-03-14", 54],
["2011-03-15", 56],
["2011-03-16", 72],
["2011-03-17", 98],
["2011-03-18", 161],
["2011-03-19", 123],
["2011-03-20", 250],
["2011-03-21", 121],
["2011-03-22", 67],
["2011-03-23", 51],
["2011-03-24", 51],
["2011-03-25", 48],
["2011-03-26", 78],
["2011-03-27", 41],
["2011-03-28", 71],
["2011-03-29", 86],
["2011-03-30", 98],
["2011-03-31", 140],
["2011-04-01", 137],
["2011-04-02", 38],
["2011-04-03", 59],
["2011-04-04", 67],
["2011-04-05", 88],
["2011-04-06", 95],
["2011-04-07", 96],
["2011-04-08", 70],
["2011-04-09", 108],
["2011-04-10", 142],
["2011-04-11", 53],
["2011-04-12", 88],
["2011-04-13", 157],
["2011-04-14", 138],
["2011-04-15", 98],
["2011-04-16", 128],
["2011-04-17", 164],
["2011-04-18", 99],
["2011-04-19", 83],
["2011-04-20", 127],
["2011-04-21", 154],
["2011-04-22", 44],
["2011-04-23", 49],
["2011-04-24", 26],
["2011-04-25", 76],
["2011-04-26", 111],
["2011-04-27", 60],
["2011-04-28", 76],
["2011-04-29", 119],
["2011-04-30", 141],
["2011-05-01", 500],
["2011-05-02", 85],
["2011-05-03", 60],
["2011-05-04", 79],
["2011-05-05", 87],
["2011-05-06", 99],
["2011-05-07", 57],
["2011-05-08", 74],
["2011-05-09", 53],
["2011-05-10", 50],
["2011-05-11", 80],
["2011-05-12", 197],
["2011-05-13", 52],
["2011-05-14", 70],
["2011-05-15", 76],
["2011-05-16", 90],
["2011-05-17", 91],
["2011-05-18", 155],
["2011-05-19", 64],
["2011-05-20", 59],
["2011-05-21", 54],
["2011-05-22", 83],
["2011-05-23", 98],
["2011-05-24", 94],
["2011-05-25", 75],
["2011-05-26", 86],
["2011-05-27", 65],
["2011-05-28", 102],
["2011-05-29", 98],
["2011-05-30", 75],
["2011-05-31", 47],
["2011-06-01", 28],
["2011-06-02", 75],
["2011-06-03", 75],
["2011-06-04", 66],
["2011-06-05", 79],
["2011-06-06", 83],
["2011-06-07", 98],
["2011-06-08", 51],
["2011-06-10", 105],
["2011-06-11", 75],
["2011-06-12", 28],
["2011-06-13", 71],
["2011-06-14", 99],
["2011-06-15", 107],
["2011-06-16", 77],
["2011-06-17", 81],
["2011-06-18", 97],
["2011-06-19", 119],
["2011-06-20", 122],
["2011-06-21", 130],
["2011-06-22", 128],
["2011-06-23", 123],
["2011-06-24", 24],
["2011-06-25", 38],
["2011-06-26", 57],
["2011-06-27", 56],
["2011-06-28", 90],
["2011-06-29", 129],
["2011-06-30", 99],
["2011-07-01", 94],
["2011-07-02", 71],
["2011-07-03", 71],
["2011-07-04", 55],
["2011-07-05", 80],
["2011-07-06", 115],
["2011-07-07", 73],
["2011-07-08", 42],
["2011-07-09", 37],
["2011-07-10", 75],
["2011-07-11", 112],
["2011-07-12", 88],
["2011-07-13", 83],
["2011-07-14", 83],
["2011-07-15", 65],
["2011-07-16", 65],
["2011-07-17", 67],
["2011-07-18", 65],
["2011-07-19", 83],
["2011-07-20", 42],
["2011-07-21", 53],
["2011-07-22", 71],
["2011-07-23", 148],
["2011-07-24", 159],
["2011-07-25", 19],
["2011-07-26", 28],
["2011-07-27", 52],
["2011-07-28", 92],
["2011-07-29", 113],
["2011-07-30", 21],
["2011-07-31", 54],
["2011-08-01", 78],
["2011-08-02", 94],
["2011-08-03", 69],
["2011-08-04", 82],
["2011-08-05", 98],
["2011-08-06", 91],
["2011-08-07", 74],
["2011-08-08", 77],
["2011-08-09", 108],
["2011-08-10", 58],
["2011-08-11", 68],
["2011-08-12", 90],
["2011-08-13", 93],
["2011-08-14", 78],
["2011-08-15", 73],
["2011-08-16", 29],
["2011-08-17", 58],
["2011-08-18", 28],
["2011-08-19", 65],
["2011-08-20", 72],
["2011-08-21", 80],
["2011-08-22", 78],
["2011-08-23", 88],
["2011-08-24", 95],
["2011-08-25", 80],
["2011-08-26", 61],
["2011-08-27", 63],
["2011-08-28", 65],
["2011-08-29", 80],
["2011-08-30", 99],
["2011-08-31", 117],
["2011-09-01", 89],
["2011-09-02", 54],
["2011-09-03", 69],
["2011-09-04", 77],
["2011-09-05", 76],
["2011-09-06", 76],
["2011-09-07", 126],
["2011-09-08", 48],
["2011-09-09", 39],
["2011-09-10", 35],
["2011-09-11", 24],
["2011-09-12", 61],
["2011-09-13", 81],
["2011-09-14", 87],
["2011-09-15", 93],
["2011-09-16", 52],
["2011-09-17", 22],
["2011-09-18", 35],
["2011-09-19", 45],
["2011-09-20", 50],
["2011-09-21", 52],
["2011-09-22", 58],
["2011-09-24", 96],
["2011-09-25", 125],
["2011-09-26", 160],
["2011-09-27", 121],
["2011-09-28", 128],
["2011-09-29", 94],
["2011-09-30", 30],
["2011-10-01", 56],
["2011-10-02", 33],
["2011-10-03", 47],
["2011-10-04", 79],
["2011-10-05", 157],
["2011-10-06", 61],
["2011-10-07", 84],
["2011-10-08", 106],
["2011-10-09", 159],
["2011-10-10", 137],
["2011-10-11", 87],
["2011-10-12", 130],
["2011-10-13", 98],
["2011-10-14", 32],
["2011-10-15", 33],
["2011-10-16", 31],
["2011-10-17", 35],
["2011-10-18", 72],
["2011-10-19", 87],
["2011-10-20", 149],
["2011-10-21", 146],
["2011-10-22", 139],
["2011-10-23", 155],
["2011-10-24", 19],
["2011-10-25", 28],
["2011-10-26", 78],
["2011-10-27", 129],
["2011-10-29", 97],
["2011-10-30", 147],
["2011-10-31", 131],
["2011-11-01", 128],
["2011-11-02", 53],
["2011-11-03", 68],
["2011-11-04", 82],
["2011-11-05", 60],
["2011-11-06", 52],
["2011-11-07", 63],
["2011-11-08", 73],
["2011-11-09", 49],
["2011-11-10", 60],
["2011-11-11", 84],
["2011-11-12", 99],
["2011-11-13", 65],
["2011-11-14", 73],
["2011-11-15", 124],
["2011-11-16", 128],
["2011-11-17", 97],
["2011-11-18", 62],
["2011-11-19", 36],
["2011-11-20", 27],
["2011-11-21", 80],
["2011-11-22", 131],
["2011-11-23", 40],
["2011-11-24", 68],
["2011-11-25", 120],
["2011-11-26", 142],
["2011-11-27", 135],
["2011-11-28", 109],
["2011-11-29", 66],
["2011-11-30", 81],
["2011-12-01", 71],
["2011-12-02", 144],
["2011-12-03", 97],
["2011-12-04", 80],
["2011-12-05", 193],
["2011-12-06", 131],
["2011-12-07", 111],
["2011-12-08", 17],
["2011-12-09", 19],
["2011-12-10", 23],
["2011-12-11", 77],
["2011-12-12", 56],
["2011-12-13", 76],
["2011-12-14", 84],
["2011-12-15", 19],
["2011-12-16", 27],
["2011-12-17", 63],
["2011-12-18", 63],
["2011-12-19", 53],
["2011-12-20", 70],
["2011-12-21", 67],
["2011-12-22", 31],
["2011-12-23", 61],
["2011-12-24", 27],
["2011-12-25", 59],
["2011-12-26", 69],
["2011-12-27", 100],
["2011-12-28", 114],
["2011-12-29", 81],
["2011-12-30", 75],
["2011-12-31", 109],
["2012-01-01", 81],
["2012-01-02", 74],
["2012-01-03", 35],
["2012-01-04", 30],
["2012-01-05", 63],
["2012-01-06", 95],
["2012-01-07", 65],
["2012-01-08", 89],
["2012-01-09", 102],
["2012-01-10", 161],
["2012-01-11", 25],
["2012-01-12", 86],
["2012-01-13", 79],
["2012-01-14", 60],
["2012-01-15", 70],
["2012-01-16", 106],
["2012-01-17", 111],
["2012-01-18", 193],
["2012-01-19", 269],
["2012-01-20", 131],
["2012-01-21", 21],
["2012-01-22", 23],
["2012-01-23", 149],
["2012-01-24", 49],
["2012-01-25", 45],
["2012-01-26", 78],
["2012-01-27", 67],
["2012-01-28", 74],
["2012-01-29", 62],
["2012-01-30", 66],
["2012-01-31", 92],
["2012-02-01", 30],
["2012-02-02", 26],
["2012-02-03", 60],
["2012-02-04", 52],
["2012-02-05", 84],
["2012-02-06", 112],
["2012-02-07", 64],
["2012-02-08", 34],
["2012-02-09", 58],
["2012-02-10", 49],
["2012-02-11", 73],
["2012-02-12", 75],
["2012-02-13", 100],
["2012-02-14", 125],
["2012-02-15", 62],
["2012-02-16", 61],
["2012-02-17", 34],
["2012-02-18", 29],
["2012-02-19", 68],
["2012-02-20", 73],
["2012-02-21", 118],
["2012-02-22", 118],
["2012-02-23", 73],
["2012-02-24", 73],
["2012-02-25", 57],
["2012-02-26", 57],
["2012-02-27", 95],
["2012-02-28", 152],
["2012-02-29", 118],
["2012-03-01", 142],
["2012-03-02", 111],
["2012-03-03", 68],
["2012-03-04", 90],
["2012-03-05", 97],
["2012-03-06", 63],
["2012-03-07", 38],
["2012-03-08", 31],
["2012-03-09", 65],
["2012-03-10", 78],
["2012-03-11", 36],
["2012-03-12", 62],
["2012-03-13", 104],
["2012-03-14", 57],
["2012-03-15", 64],
["2012-03-16", 109],
["2012-03-17", 144],
["2012-03-18", 61],
["2012-03-19", 57],
["2012-03-20", 81],
["2012-03-21", 105],
["2012-03-22", 146],
["2012-03-23", 55],
["2012-03-24", 56],
["2012-03-25", 30],
["2012-03-26", 90],
["2012-03-27", 112],
["2012-03-28", 65],
["2012-03-29", 90],
["2012-03-30", 76],
["2012-03-31", 159],
["2012-04-01", 78],
["2012-04-02", 103],
["2012-04-03", 73],
["2012-04-03", 73],
["2012-04-04", 73],
["2012-04-05", 64],
["2012-04-06", 70],
["2012-04-07", 71],
["2012-04-08", 119],
["2012-04-09", 118],
["2012-04-10", 138],
["2012-04-11", 41],
["2012-04-12", 69],
["2012-04-13", 81],
["2012-04-14", 100],
["2012-04-15", 109],
["2012-04-16", 84],
["2012-04-17", 100],
["2012-04-18", 140],
["2012-04-19", 98],
["2012-04-20", 133],
["2012-04-21", 81],
["2012-04-22", 102],
["2012-04-23", 140],
["2012-04-24", 133],
["2012-04-25", 32],
["2012-04-26", 60],
["2012-04-27", 147],
["2012-04-28", 164],
["2012-04-29", 473],
["2012-04-30", 268],
["2012-05-01", 208],
["2012-05-02", 111],
["2012-05-03", 106],
["2012-05-04", 100],
["2012-05-05", 99],
["2012-05-06", 100],
["2012-05-07", 100],
["2012-05-08", 111],
["2012-05-09", 107],
["2012-05-10", 129],
["2012-05-11", 133],
["2012-05-12", 90],
["2012-05-13", 96],
["2012-05-14", 64],
["2012-05-15", 58],
["2012-05-16", 58],
["2012-05-17", 78],
["2012-05-18", 84],
["2012-05-19", 143],
["2012-05-20", 85],
["2012-05-21", 97],
["2012-05-22", 109],
["2012-05-23", 64],
["2012-05-24", 69],
["2012-05-25", 63],
["2012-05-26", 90],
["2012-05-27", 88],
["2012-05-28", 133],
["2012-05-29", 116],
["2012-05-30", 29],
["2012-05-31", 64],
["2012-06-01", 54],
["2012-06-02", 90],
["2012-06-03", 112],
["2012-06-04", 80],
["2012-06-05", 65],
["2012-06-06", 98],
["2012-06-07", 71],
["2012-06-08", 77],
["2012-06-09", 91],
["2012-06-10", 32],
["2012-06-11", 50],
["2012-06-12", 58],
["2012-06-13", 62],
["2012-06-14", 50],
["2012-06-15", 22],
["2012-06-16", 33],
["2012-06-17", 69],
["2012-06-18", 137],
["2012-06-19", 132],
["2012-06-20", 105],
["2012-06-21", 112],
["2012-06-22", 84],
["2012-06-23", 81],
["2012-06-24", 95],
["2012-06-25", 49],
["2012-06-26", 65],
["2012-06-27", 55],
["2012-06-28", 54],
["2012-06-29", 60],
["2012-06-30", 46],
["2012-07-01", 70],
["2012-07-02", 69],
["2012-07-03", 59],
["2012-07-04", 71],
["2012-07-05", 70],
["2012-07-06", 59],
["2012-07-07", 86],
["2012-07-08", 84],
["2012-07-09", 64],
["2012-07-10", 50],
["2012-07-11", 44],
["2012-07-12", 46],
["2012-07-13", 31],
["2012-07-14", 48],
["2012-07-15", 53],
["2012-07-16", 70],
["2012-07-17", 78],
["2012-07-18", 71],
["2012-07-19", 82],
["2012-07-20", 111],
["2012-07-21", 131],
["2012-07-22", 15],
["2012-07-24", 60],
["2012-07-25", 72],
["2012-07-26", 55],
["2012-07-26", 55],
["2012-07-27", 50],
["2012-07-28", 56],
["2012-07-29", 57],
["2012-07-30", 30],
["2012-07-31", 28],
["2012-08-01", 20],
["2012-08-02", 17],
["2012-08-03", 53],
["2012-08-04", 40],
["2012-08-05", 48],
["2012-08-06", 60],
["2012-08-07", 59],
["2012-08-08", 68],
["2012-08-09", 43],
["2012-08-10", 72],
["2012-08-11", 80],
["2012-08-12", 41],
["2012-08-13", 36],
["2012-08-14", 62],
["2012-08-15", 60],
["2012-08-16", 68],
["2012-08-17", 83],
["2012-08-18", 110],
["2012-08-19", 84],
["2012-08-20", 92],
["2012-08-21", 25],
["2012-08-22", 40],
["2012-08-23", 74],
["2012-08-24", 94],
["2012-08-25", 92],
["2012-08-26", 117],
["2012-08-27", 100],
["2012-08-28", 59],
["2012-08-29", 84],
["2012-08-30", 135],
["2012-08-31", 150],
["2012-09-01", 128],
["2012-09-02", 52],
["2012-09-03", 15],
["2012-09-04", 22],
["2012-09-05", 50],
["2012-09-06", 70],
["2012-09-07", 77],
["2012-09-08", 40],
["2012-09-09", 79],
["2012-09-10", 96],
["2012-09-11", 93],
["2012-09-12", 44],
["2012-09-13", 28],
["2012-09-14", 31],
["2012-09-15", 50],
["2012-09-16", 65],
["2012-09-17", 63],
["2012-09-18", 61],
["2012-09-19", 56],
["2012-09-21", 128],
["2012-09-22", 93],
["2012-09-23", 85],
["2012-09-24", 74],
["2012-09-25", 78],
["2012-09-26", 26],
["2012-09-27", 65],
["2012-09-28", 15],
["2012-09-29", 24],
["2012-09-30", 38],
["2012-10-01", 52],
["2012-10-02", 78],
["2012-10-03", 108],
["2012-10-04", 28],
["2012-10-05", 41],
["2012-10-06", 74],
["2012-10-07", 83],
["2012-10-08", 123],
["2012-10-09", 140],
["2012-10-10", 18],
["2012-10-11", 73],
["2012-10-12", 121],
["2012-10-13", 97],
["2012-10-14", 40],
["2012-10-15", 83],
["2012-10-16", 78],
["2012-10-17", 23],
["2012-10-18", 65],
["2012-10-19", 79],
["2012-10-20", 139],
["2012-10-21", 81],
["2012-10-22", 26],
["2012-10-23", 54],
["2012-10-24", 89],
["2012-10-25", 90],
["2012-10-26", 163],
["2012-10-27", 154],
["2012-10-28", 22],
["2012-10-29", 59],
["2012-10-30", 36],
["2012-10-31", 51],
["2012-11-01", 67],
["2012-11-02", 103],
["2012-11-03", 135],
["2012-11-04", 20],
["2012-11-05", 16],
["2012-11-06", 48],
["2012-11-07", 80],
["2012-11-08", 62],
["2012-11-09", 93],
["2012-11-10", 82],
["2012-11-11", 17],
["2012-11-12", 27],
["2012-11-13", 30],
["2012-11-14", 26],
["2012-11-15", 71],
["2012-11-16", 92],
["2012-11-17", 47],
["2012-11-18", 96],
["2012-11-19", 55],
["2012-11-20", 74],
["2012-11-21", 123],
["2012-11-22", 156],
["2012-11-23", 22],
["2012-11-24", 80],
["2012-11-25", 133],
["2012-11-26", 44],
["2012-11-27", 105],
["2012-11-28", 151],
["2012-11-29", 54],
["2012-12-01", 50],
["2012-12-02", 96],
["2012-12-03", 123],
["2012-12-04", 50],
["2012-12-05", 64],
["2012-12-06", 50],
["2012-12-07", 73],
["2012-12-08", 53],
["2012-12-09", 38],
["2012-12-10", 53],
["2012-12-11", 86],
["2012-12-12", 103],
["2012-12-13", 130],
["2012-12-14", 107],
["2012-12-15", 114],
["2012-12-16", 108],
["2012-12-17", 45],
["2012-12-18", 22],
["2012-12-19", 72],
["2012-12-20", 121],
["2012-12-21", 120],
["2012-12-22", 24],
["2012-12-23", 36],
["2012-12-24", 53],
["2012-12-25", 58],
["2012-12-26", 67],
["2012-12-28", 137],
["2012-12-29", 94],
["2012-12-30", 38],
["2012-12-31", 57],
["2013-01-01", 71],
["2013-01-02", 27],
["2013-01-03", 35],
["2013-01-04", 57],
["2013-01-05", 79],
["2013-01-06", 58],
["2013-01-07", 105],
["2013-01-08", 124],
["2013-01-09", 32],
["2013-01-10", 87],
["2013-01-11", 232],
["2013-01-12", 174],
["2013-01-13", 498],
["2013-01-14", 184],
["2014-01-01", 85],
["2014-01-02", 158],
["2014-01-03", 74],
["2014-01-04", 165],
["2014-01-05", 113],
["2014-01-06", 190],
["2014-01-07", 122],
["2014-01-10", 95],
["2014-01-11", 159],
["2014-01-12", 52],
["2014-01-13", 117],
["2014-01-14", 113],
["2014-01-15", 180],
["2014-01-16", 403],
["2014-01-17", 209],
["2014-01-18", 113],
["2014-01-19", 149],
["2014-01-21", 68],
["2014-01-22", 162],
["2014-01-23", 276],
["2014-01-24", 195],
["2014-01-26", 77],
["2014-01-27", 114],
["2014-01-28", 67],
["2014-01-29", 165],
["2014-01-30", 93],
["2014-01-31", 188],
["2014-02-01", 178],
["2014-02-02", 85],
["2014-02-05", 119],
["2014-02-06", 158],
["2014-02-07", 124],
["2014-02-08", 84],
["2014-02-10", 53],
["2014-02-11", 142],
["2014-02-12", 150],
["2014-02-13", 242],
["2014-02-14", 329],
["2014-02-15", 429],
["2014-02-16", 348],
["2014-02-17", 118],
["2014-02-18", 98],
["2014-02-19", 92],
["2014-02-20", 270],
["2014-02-21", 311],
["2014-02-22", 311],
["2014-02-23", 255],
["2014-02-24", 313],
["2014-02-25", 404],
["2014-02-28", 113],
["2014-03-01", 68],
["2014-03-02", 189],
["2014-03-03", 268],
["2014-03-04", 67],
["2014-03-07", 70],
["2014-03-08", 179],
["2014-03-09", 127],
["2014-03-10", 110],
["2014-03-11", 195],
["2014-03-13", 69],
["2014-03-14", 64],
["2014-03-15", 133],
["2014-03-16", 145],
["2014-03-17", 142],
["2014-03-18", 85],
["2014-03-19", 73],
["2014-03-21", 62],
["2014-03-22", 86],
["2014-03-23", 186],
["2014-03-24", 271],
["2014-03-25", 255],
["2014-03-26", 331],
["2014-03-27", 285],
["2014-03-28", 169],
["2014-03-29", 63],
["2014-03-30", 77],
["2014-03-31", 183],
["2014-04-01", 147],
["2014-04-02", 133],
["2014-04-03", 66],
["2014-04-04", 91],
["2014-04-05", 68],
["2014-04-06", 98],
["2014-04-07", 135],
["2014-04-08", 223],
["2014-04-09", 156],
["2014-04-10", 246],
["2014-04-11", 83],
["2014-04-12", 133],
["2014-04-13", 212],
["2014-04-14", 270],
["2014-04-15", 109],
["2014-04-16", 90],
["2014-04-17", 124],
["2014-04-18", 182],
["2014-04-19", 84],
["2014-04-20", 84],
["2014-04-21", 73],
["2014-04-22", 85],
["2014-04-23", 156],
["2014-04-24", 156],
["2014-04-25", 163],
["2014-04-26", 69],
["2014-04-27", 74],
["2014-04-28", 83],
["2014-04-29", 122],
["2014-04-30", 139],
["2014-05-01", 156],
["2014-05-03", 93],
["2014-05-04", 57],
["2014-05-05", 54],
["2014-05-06", 105],
["2014-05-07", 82],
["2014-05-08", 104],
["2014-05-09", 84],
["2014-05-10", 69],
["2014-05-12", 74],
["2014-05-13", 86],
["2014-05-14", 59],
["2014-05-15", 122],
["2014-05-16", 92],
["2014-05-17", 124],
["2014-05-18", 171],
["2014-05-19", 146],
["2014-05-20", 113],
["2014-05-21", 170],
["2014-05-22", 183],
["2014-05-23", 140],
["2014-05-24", 104],
["2014-05-25", 91],
["2014-05-26", 77],
["2014-05-27", 107],
["2014-05-28", 121],
["2014-05-29", 120],
["2014-05-30", 192],
["2014-05-31", 177],
["2014-06-01", 130],
["2014-06-02", 90],
["2014-06-03", 117],
["2014-06-04", 124],
["2014-06-05", 157],
["2014-06-06", 103],
["2014-06-07", 51],
["2014-06-08", 70],
["2014-06-09", 87],
["2014-06-10", 95],
["2014-06-11", 74],
["2014-06-12", 90],
["2014-06-13", 116],
["2014-06-14", 165],
["2014-06-15", 178],
["2014-06-16", 178],
["2014-06-17", 104],
["2014-06-18", 116],
["2014-06-19", 116],
["2014-06-20", 84],
["2014-06-21", 96],
["2014-06-22", 91],
["2014-06-23", 115],
["2014-06-24", 161],
["2014-06-25", 138],
["2014-06-26", 163],
["2014-06-27", 68],
["2014-06-28", 77],
["2014-06-29", 161],
["2014-06-30", 185],
["2014-07-01", 172],
["2014-07-02", 80],
["2014-07-03", 248],
["2014-07-04", 237],
["2014-07-05", 165],
["2014-07-06", 256],
["2014-07-07", 216],
["2014-07-08", 134],
["2014-07-09", 63],
["2014-07-10", 114],
["2014-07-11", 77],
["2014-07-12", 80],
["2014-07-13", 64],
["2014-07-14", 156],
["2014-07-15", 140],
["2014-07-16", 133],
["2014-07-17", 186],
["2014-07-18", 182],
["2014-07-19", 106],
["2014-07-20", 119],
["2014-07-21", 68],
["2014-07-22", 54],
["2014-07-23", 82],
["2014-07-24", 90],
["2014-07-25", 134],
["2014-07-26", 188],
["2014-07-27", 194],
["2014-07-28", 159],
["2014-07-29", 159],
["2014-07-30", 169],
["2014-07-31", 244],
["2014-08-01", 199],
["2014-08-02", 163],
["2014-08-03", 149],
["2014-08-05", 80],
["2014-08-06", 67],
["2014-08-07", 162],
["2014-08-08", 140],
["2014-08-09", 143],
["2014-08-10", 125],
["2014-08-11", 76],
["2014-08-12", 119],
["2014-08-13", 70],
["2014-08-14", 104],
["2014-08-15", 109],
["2014-08-16", 159],
["2014-08-17", 124],
["2014-08-18", 135],
["2014-08-19", 150],
["2014-08-20", 164],
["2014-08-21", 169],
["2014-08-22", 83],
["2014-08-23", 155],
["2014-08-24", 75],
["2014-08-25", 59],
["2014-08-26", 78],
["2014-08-27", 136],
["2014-08-28", 103],
["2014-08-29", 104],
["2014-08-30", 176],
["2014-08-31", 89],
["2014-09-01", 127],
["2014-09-03", 54],
["2014-09-04", 100],
["2014-09-05", 140],
["2014-09-06", 186],
["2014-09-07", 200],
["2014-09-08", 61],
["2014-09-09", 109],
["2014-09-10", 111],
["2014-09-11", 114],
["2014-09-12", 97],
["2014-09-13", 94],
["2014-09-14", 66],
["2014-09-15", 54],
["2014-09-16", 87],
["2014-09-17", 80],
["2014-09-18", 84],
["2014-09-19", 117],
["2014-09-20", 168],
["2014-09-21", 129],
["2014-09-22", 127],
["2014-09-23", 64],
["2014-09-24", 60],
["2014-09-25", 144],
["2014-09-26", 170],
["2014-09-27", 58],
["2014-09-28", 87],
["2014-09-29", 70],
["2014-09-30", 53],
["2014-10-01", 92],
["2014-10-02", 78],
["2014-10-03", 123],
["2014-10-04", 95],
["2014-10-05", 54],
["2014-10-06", 68],
["2014-10-07", 200],
["2014-10-08", 314],
["2014-10-09", 379],
["2014-10-10", 346],
["2014-10-11", 233],
["2014-10-14", 80],
["2014-10-15", 73],
["2014-10-16", 76],
["2014-10-17", 132],
["2014-10-18", 211],
["2014-10-19", 289],
["2014-10-20", 250],
["2014-10-21", 82],
["2014-10-22", 99],
["2014-10-23", 163],
["2014-10-24", 267],
["2014-10-25", 353],
["2014-10-26", 78],
["2014-10-27", 72],
["2014-10-28", 88],
["2014-10-29", 140],
["2014-10-30", 206],
["2014-10-31", 204],
["2014-11-01", 65],
["2014-11-03", 59],
["2014-11-04", 150],
["2014-11-05", 79],
["2014-11-07", 63],
["2014-11-08", 93],
["2014-11-09", 80],
["2014-11-10", 95],
["2014-11-11", 59],
["2014-11-13", 65],
["2014-11-14", 77],
["2014-11-15", 143],
["2014-11-16", 98],
["2014-11-17", 64],
["2014-11-18", 93],
["2014-11-19", 282],
["2014-11-23", 155],
["2014-11-24", 94],
["2014-11-25", 196],
["2014-11-26", 293],
["2014-11-27", 83],
["2014-11-28", 114],
["2014-11-29", 276],
["2014-12-01", 54],
["2014-12-02", 65],
["2014-12-03", 51],
["2014-12-05", 62],
["2014-12-06", 89],
["2014-12-07", 65],
["2014-12-08", 82],
["2014-12-09", 276],
["2014-12-10", 153],
["2014-12-11", 52],
["2014-12-13", 69],
["2014-12-14", 113],
["2014-12-15", 82],
["2014-12-17", 99],
["2014-12-19", 53],
["2014-12-22", 103],
["2014-12-23", 100],
["2014-12-25", 73],
["2014-12-26", 155],
["2014-12-27", 243],
["2014-12-28", 155],
["2014-12-29", 125],
["2014-12-30", 65],
["2015-01-01", 65],
["2015-01-02", 79],
["2015-01-03", 200],
["2015-01-04", 226],
["2015-01-05", 122],
["2015-01-06", 60],
["2015-01-07", 85],
["2015-01-08", 190],
["2015-01-09", 105],
["2015-01-10", 208],
["2015-01-11", 59],
["2015-01-12", 160],
["2015-01-13", 211],
["2015-01-14", 265],
["2015-01-15", 386],
["2015-01-16", 118],
["2015-01-17", 89],
["2015-01-18", 94],
["2015-01-19", 77],
["2015-01-20", 113],
["2015-01-22", 143],
["2015-01-23", 257],
["2015-01-24", 117],
["2015-01-25", 185],
["2015-01-26", 119],
["2015-01-28", 65],
["2015-01-29", 87],
["2015-01-31", 60],
["2015-02-01", 108],
["2015-02-02", 188],
["2015-02-03", 143],
["2015-02-05", 62],
["2015-02-06", 100],
["2015-02-09", 152],
["2015-02-10", 166],
["2015-02-11", 55],
["2015-02-12", 59],
["2015-02-13", 175],
["2015-02-14", 293],
["2015-02-15", 326],
["2015-02-16", 153],
["2015-02-18", 73],
["2015-02-19", 267],
["2015-02-20", 183],
["2015-02-21", 394],
["2015-02-22", 158],
["2015-02-23", 86],
["2015-02-24", 207],
]
(
Line()
.add_xaxis(xaxis_data=[item[0] for item in all_data])
.add_yaxis(
series_name="",
y_axis=[item[1] for item in all_data],
yaxis_index=0,
is_smooth=True,
is_symbol_show=False,
)
.set_global_opts(
title_opts=opts.TitleOpts(title="Beijing AQI"),
tooltip_opts=opts.TooltipOpts(trigger="axis"),
datazoom_opts=[
opts.DataZoomOpts(yaxis_index=0),
opts.DataZoomOpts(type_="inside", yaxis_index=0),
],
visualmap_opts=opts.VisualMapOpts(
pos_top="10",
pos_right="10",
is_piecewise=True,
pieces=[
{"gt": 0, "lte": 50, "color": "#096"},
{"gt": 50, "lte": 100, "color": "#ffde33"},
{"gt": 100, "lte": 150, "color": "#ff9933"},
{"gt": 150, "lte": 200, "color": "#cc0033"},
{"gt": 200, "lte": 300, "color": "#660099"},
{"gt": 300, "color": "#7e0023"},
],
out_of_range={"color": "#999"},
),
xaxis_opts=opts.AxisOpts(type_="category"),
yaxis_opts=opts.AxisOpts(
type_="value",
name_location="start",
min_=0,
max_=500,
is_scale=True,
axistick_opts=opts.AxisTickOpts(is_inside=False),
),
)
.set_series_opts(
markline_opts=opts.MarkLineOpts(
data=[
{"yAxis": 50},
{"yAxis": 100},
{"yAxis": 150},
{"yAxis": 200},
{"yAxis": 300},
],
label_opts=opts.LabelOpts(position="end"),
)
)
.render("beijing_aqi.html")
)
| 24.410882 | 63 | 0.426575 | 19,922 | 122,030 | 2.610882 | 0.021484 | 0.003807 | 0.000692 | 0.000634 | 0.002865 | 0.002249 | 0.00075 | 0.00075 | 0.00075 | 0.00075 | 0 | 0.557354 | 0.247816 | 122,030 | 4,998 | 64 | 24.415766 | 0.009315 | 0 | 0 | 0.002807 | 0 | 0 | 0.405874 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.000401 | 0 | 0.000401 | 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 |
1815ed2b6c358f6414fe0404d22b0c279e749b59 | 1,520 | py | Python | study_roadmaps/python_sample_examples/gluon/3_aux_functions/train.py | Shreyashwaghe/monk_v1 | 4ee4d9483e8ffac9b73a41f3c378e5abf5fc799b | [
"Apache-2.0"
] | 7 | 2020-07-26T08:37:29.000Z | 2020-10-30T10:23:11.000Z | study_roadmaps/python_sample_examples/gluon/3_aux_functions/train.py | mursalfk/monk_v1 | 62f34a52f242772186ffff7e56764e958fbcd920 | [
"Apache-2.0"
] | 9 | 2020-01-28T21:40:39.000Z | 2022-02-10T01:24:06.000Z | study_roadmaps/python_sample_examples/gluon/3_aux_functions/train.py | mursalfk/monk_v1 | 62f34a52f242772186ffff7e56764e958fbcd920 | [
"Apache-2.0"
] | 1 | 2020-10-07T12:57:44.000Z | 2020-10-07T12:57:44.000Z | import os
import sys
sys.path.append("../../../monk/");
import psutil
from gluon_prototype import prototype
gtf = prototype(verbose=1);
gtf.Prototype("sample-project-1", "sample-experiment-1");
gtf.Default(dataset_path="../../../monk/system_check_tests/datasets/dataset_cats_dogs_train",
model_name="resnet18_v1", freeze_base_network=True, num_epochs=2);
######################################################## Summary #####################################################
gtf.Summary()
###########################################################################################################################
##################################################### EDA - Find Num images per class #####################################
gtf.EDA(show_img=True, save_img=True);
###########################################################################################################################
##################################################### EDA - Find Missing and corrupted images #####################################
gtf.EDA(check_missing=True, check_corrupt=True);
###########################################################################################################################
##################################################### Estimate Training Time #####################################
gtf.Estimate_Train_Time(num_epochs=50);
########################################################################################################################### | 33.043478 | 131 | 0.309211 | 92 | 1,520 | 4.902174 | 0.576087 | 0.053215 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006307 | 0.061184 | 1,520 | 46 | 132 | 33.043478 | 0.309741 | 0.071053 | 0 | 0 | 0 | 0 | 0.232342 | 0.120818 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.307692 | 0 | 0.307692 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
1829f18c9a4a6999de1f057e3d27520859bfe66b | 539 | py | Python | calplus/tests/unit/v1/test_utils.py | nghiadt16/CALplus | 68c108e6abf7eeac4937b870dc7462dd6ee2fcc3 | [
"Apache-2.0"
] | null | null | null | calplus/tests/unit/v1/test_utils.py | nghiadt16/CALplus | 68c108e6abf7eeac4937b870dc7462dd6ee2fcc3 | [
"Apache-2.0"
] | 4 | 2017-04-05T16:14:07.000Z | 2018-12-14T14:19:15.000Z | calplus/tests/unit/v1/test_utils.py | nghiadt16/CALplus | 68c108e6abf7eeac4937b870dc7462dd6ee2fcc3 | [
"Apache-2.0"
] | 2 | 2017-04-18T16:53:58.000Z | 2018-12-04T05:42:51.000Z | from calplus.tests import base
from calplus.v1 import utils
class TestUtils(base.TestCase):
"""docstring for TestUtils"""
def setUp(self):
super(TestUtils, self).setUp()
def test_get_all_driver(self):
drivers = utils.get_all_driver()
self.assertEqual([], drivers)
def test_validate_driver(self):
@utils.validate_driver
def test(request, drivers):
pass
import inspect
args = inspect.getargspec(test).args
self.assertEqual(['request'], args)
| 22.458333 | 44 | 0.641929 | 62 | 539 | 5.451613 | 0.451613 | 0.06213 | 0.071006 | 0.094675 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002488 | 0.254174 | 539 | 23 | 45 | 23.434783 | 0.838308 | 0.042672 | 0 | 0 | 0 | 0 | 0.013725 | 0 | 0 | 0 | 0 | 0 | 0.133333 | 1 | 0.266667 | false | 0.066667 | 0.2 | 0 | 0.533333 | 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 |
182e9e4609ddebb22d97860bec2e861331fa8d6e | 1,386 | py | Python | stubs.min/System/Windows/Media/Animation_parts/AnimationException.py | ricardyn/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | 1 | 2021-02-02T13:39:16.000Z | 2021-02-02T13:39:16.000Z | stubs.min/System/Windows/Media/Animation_parts/AnimationException.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | stubs.min/System/Windows/Media/Animation_parts/AnimationException.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | class AnimationException(SystemException,ISerializable,_Exception):
""" The exception that is thrown when an error occurs while animating a property. """
def add_SerializeObjectState(self,*args):
""" add_SerializeObjectState(self: Exception,value: EventHandler[SafeSerializationEventArgs]) """
pass
def remove_SerializeObjectState(self,*args):
""" remove_SerializeObjectState(self: Exception,value: EventHandler[SafeSerializationEventArgs]) """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __reduce_ex__(self,*args):
pass
def __str__(self,*args):
pass
Clock=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Gets the clock that generates the animated values.
Get: Clock(self: AnimationException) -> AnimationClock
"""
Property=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Gets the animated dependency property.
Get: Property(self: AnimationException) -> DependencyProperty
"""
Target=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Gets the animated object.
Get: Target(self: AnimationException) -> IAnimatable
"""
| 36.473684 | 215 | 0.730159 | 156 | 1,386 | 6.141026 | 0.339744 | 0.093946 | 0.050104 | 0.059499 | 0.495825 | 0.495825 | 0.495825 | 0.495825 | 0.322547 | 0.322547 | 0 | 0 | 0.148629 | 1,386 | 37 | 216 | 37.459459 | 0.811864 | 0.337662 | 0 | 0.357143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.357143 | false | 0.357143 | 0 | 0 | 0.642857 | 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 |
182f0fecd4c6abc4561282446bbffe0f48f4cc60 | 805 | py | Python | habitat_baselines/motion_planning/robot_target.py | srama2512/habitat-api | bc85d0961cef3b4a08bc9263869606109fb6ff0a | [
"MIT"
] | 355 | 2020-08-18T03:48:26.000Z | 2022-03-30T00:22:50.000Z | habitat_baselines/motion_planning/robot_target.py | srama2512/habitat-api | bc85d0961cef3b4a08bc9263869606109fb6ff0a | [
"MIT"
] | 328 | 2020-08-12T21:25:09.000Z | 2022-03-31T10:39:21.000Z | habitat_baselines/motion_planning/robot_target.py | srama2512/habitat-api | bc85d0961cef3b4a08bc9263869606109fb6ff0a | [
"MIT"
] | 159 | 2020-08-12T22:23:36.000Z | 2022-03-30T22:56:52.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import attr
import magnum as mn
import numpy as np
@attr.s(auto_attribs=True, slots=True)
class RobotTarget:
"""
Data class to define the target needed as input for the motion planner.
"""
# End-effector in world coordinate frame.
ee_target_pos: np.ndarray = None
obj_id_target: int = None
joints_target: np.ndarray = None
is_guess: bool = False
@attr.s(auto_attribs=True, slots=True)
class ObjectGraspTarget:
"""
Data class to define the target needed as input for the grasp planner.
"""
# Bounding Box
bb: mn.Range3D
translation: mn.Matrix4
| 23.676471 | 75 | 0.70559 | 121 | 805 | 4.628099 | 0.61157 | 0.035714 | 0.032143 | 0.057143 | 0.282143 | 0.282143 | 0.282143 | 0.282143 | 0.160714 | 0.160714 | 0 | 0.004762 | 0.217391 | 805 | 33 | 76 | 24.393939 | 0.884127 | 0.479503 | 0 | 0.153846 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.230769 | 0 | 0.846154 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
183c49112552415248f084e0c358b6ea11192708 | 2,771 | py | Python | tests/request/test_parameter_invalid.py | Colin-b/pyxelrest | 5c8db40d1537d0f9c29acd928ec9519b6bb557ec | [
"MIT"
] | 7 | 2018-12-07T10:08:53.000Z | 2021-03-24T07:52:36.000Z | tests/request/test_parameter_invalid.py | Colin-b/pyxelrest | 5c8db40d1537d0f9c29acd928ec9519b6bb557ec | [
"MIT"
] | 76 | 2018-12-07T10:29:48.000Z | 2021-11-17T00:54:24.000Z | tests/request/test_parameter_invalid.py | Colin-b/pyxelrest | 5c8db40d1537d0f9c29acd928ec9519b6bb557ec | [
"MIT"
] | null | null | null | import pytest
from responses import RequestsMock
from tests import loader
def test_parameter_cannot_be_parsed(responses: RequestsMock, tmpdir):
responses.add(
responses.GET,
url="http://test/",
json={
"swagger": "2.0",
"paths": {
"/test": {
"get": {
"parameters": [
{
"in": "query",
"name": "param",
"schema": {},
}
],
"responses": {
"200": {
"description": "return value",
"schema": {"type": "string"},
}
},
}
}
},
},
match_querystring=True,
)
with pytest.raises(Exception) as exception_info:
loader.load(
tmpdir,
{
"invalid": {
"open_api": {"definition": "http://test/"},
"formulas": {"dynamic_array": {"lock_excel": True}},
}
},
)
assert (
str(exception_info.value)
== "Unable to extract parameters from {'in': 'query', 'name': 'param', 'schema': {}, 'server_param_name': 'param'}"
)
def test_parameter_with_more_than_one_field_type(responses: RequestsMock, tmpdir):
responses.add(
responses.GET,
url="http://test/",
json={
"swagger": "2.0",
"paths": {
"/test": {
"get": {
"parameters": [
{
"in": "query",
"name": "param",
"type": ["string", "integer"],
}
],
"responses": {
"200": {
"description": "return value",
}
},
}
}
},
},
match_querystring=True,
)
with pytest.raises(Exception) as exception_info:
loader.load(
tmpdir,
{
"invalid": {
"open_api": {"definition": "http://test/"},
"formulas": {"dynamic_array": {"lock_excel": True}},
}
},
)
assert (
str(exception_info.value)
== "Unable to guess field type amongst ['string', 'integer']"
)
| 30.119565 | 123 | 0.339589 | 168 | 2,771 | 5.452381 | 0.392857 | 0.034935 | 0.036026 | 0.052402 | 0.735808 | 0.631004 | 0.631004 | 0.631004 | 0.631004 | 0.631004 | 0 | 0.007819 | 0.538434 | 2,771 | 91 | 124 | 30.450549 | 0.708366 | 0 | 0 | 0.55814 | 0 | 0.011628 | 0.192349 | 0 | 0 | 0 | 0 | 0 | 0.023256 | 1 | 0.023256 | false | 0 | 0.034884 | 0 | 0.05814 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
185ab66623ac277ebae7a53438dfbee88f107a07 | 4,450 | py | Python | pyaz/sql/instance_pool/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | null | null | null | pyaz/sql/instance_pool/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | null | null | null | pyaz/sql/instance_pool/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | 1 | 2022-02-03T09:12:01.000Z | 2022-02-03T09:12:01.000Z | from ... pyaz_utils import _call_az
def show(name, resource_group):
'''
Get the details for an instance pool.
Required Parameters:
- name -- Instance Pool Name
- resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>`
'''
return _call_az("az sql instance-pool show", locals())
def list(resource_group=None):
'''
List available instance pools.
Optional Parameters:
- resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>`
'''
return _call_az("az sql instance-pool list", locals())
def update(name, resource_group, add=None, force_string=None, remove=None, set=None, tags=None):
'''
Update an instance pool.
Required Parameters:
- name -- Instance Pool Name
- resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>`
Optional Parameters:
- add -- Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>
- force_string -- When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
- remove -- Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove
- set -- Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
- tags -- space-separated tags: key[=value] [key[=value] ...]. Use '' to clear existing tags.
'''
return _call_az("az sql instance-pool update", locals())
def delete(name, resource_group, no_wait=None, yes=None):
'''
Delete an instance pool.
Required Parameters:
- name -- Instance Pool Name
- resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>`
Optional Parameters:
- no_wait -- Do not wait for the long-running operation to finish.
- yes -- Do not prompt for confirmation.
'''
return _call_az("az sql instance-pool delete", locals())
def create(capacity, family, location, name, resource_group, subnet, tier, license_type=None, no_wait=None, tags=None, vnet_name=None):
'''
Create an instance pool.
Required Parameters:
- capacity -- Capacity of the instance pool in vcores.
- family -- The compute generation component of the sku. Allowed value: Gen5
- location -- Location. Values from: `az account list-locations`. You can configure the default location using `az configure --defaults location=<location>`.
- name -- Instance Pool Name
- resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>`
- subnet -- Name or ID of the subnet that allows access to an Instance Pool. If subnet name is provided, --vnet-name must be provided.
- tier -- The edition component of the sku. Allowed value: GeneralPurpose.
Optional Parameters:
- license_type -- The license type to apply for this instance pool.
- no_wait -- Do not wait for the long-running operation to finish.
- tags -- space-separated tags: key[=value] [key[=value] ...]. Use '' to clear existing tags.
- vnet_name -- The virtual network name
'''
return _call_az("az sql instance-pool create", locals())
def wait(name, resource_group, created=None, custom=None, deleted=None, exists=None, interval=None, timeout=None, updated=None):
'''
Wait for an instance pool to reach a desired state.
Required Parameters:
- name -- Instance Pool Name
- resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>`
Optional Parameters:
- created -- wait until created with 'provisioningState' at 'Succeeded'
- custom -- Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']
- deleted -- wait until deleted
- exists -- wait until the resource exists
- interval -- polling interval in seconds
- timeout -- maximum wait in seconds
- updated -- wait until updated with provisioningState at 'Succeeded'
'''
return _call_az("az sql instance-pool wait", locals())
| 45.408163 | 164 | 0.702472 | 598 | 4,450 | 5.165552 | 0.250836 | 0.07381 | 0.055034 | 0.04079 | 0.436711 | 0.418258 | 0.399482 | 0.371318 | 0.360635 | 0.360635 | 0 | 0.000842 | 0.198876 | 4,450 | 97 | 165 | 45.876289 | 0.865638 | 0.733034 | 0 | 0 | 0 | 0 | 0.169565 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.461538 | false | 0 | 0.076923 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
186a69b010242e5cd6623bba8225f28d59422edb | 943 | py | Python | alert/getinfo/model/configdata.py | xwwwb/genshin_task-resin-expedition_alert | cddaafc2723c5d9eea6fbd1db792ad70427344c8 | [
"MIT"
] | 2 | 2022-03-01T10:39:30.000Z | 2022-03-29T13:40:37.000Z | alert/getinfo/model/configdata.py | xwwwb/genshin_task-resin-expedition_alert | cddaafc2723c5d9eea6fbd1db792ad70427344c8 | [
"MIT"
] | null | null | null | alert/getinfo/model/configdata.py | xwwwb/genshin_task-resin-expedition_alert | cddaafc2723c5d9eea6fbd1db792ad70427344c8 | [
"MIT"
] | null | null | null | from typing import List, Literal
import pydantic
class ConfigData(pydantic.BaseModel):
UID: str
COOKIE:str
SCKEY:str
SCTKEY:str
BARK_KEY:str
BARK_GROUP:str
BARK_ICON:str
BARK_ARCHIVE:str
WW_ID: str
WW_APP_SECRET: str
WW_APP_USERID: str
WW_APP_AGENTID: str
WW_BOT_KEY: str
DD_BOT_TOKEN: str
DD_BOT_SECRET: str
DISCORD_WEBHOOK: str
IGOT_KEY: str
PUSH_PLUS_TOKEN: str
PUSH_PLUS_USER: str
TG_BOT_API: str
TG_BOT_TOKEN: str
TG_USER_ID: str
COOL_PUSH_SKEY: str
COOL_PUSH_MODE: Literal["send","psend","group","pgroup"]
COOL_PUSH_SENDID: str
QMSG_KEY: str
RESIN_ALERT_NUM: int
RECEIVE_RESIN_DATA: Literal["ON","OFF"]
RECEIVE_BOSS_COUNT: Literal["ON","OFF"]
RECEIVE_TASK_NUM: Literal["ON","OFF"]
REVEIVE_EXPEDITION_NUM: Literal["ON","OFF"]
INCOMPLETE_ALERT: str
SLEEP_TIME: int
ALERT_SUCCESS_SLEEP_TIME:int
| 23 | 60 | 0.688229 | 142 | 943 | 4.211268 | 0.429577 | 0.041806 | 0.080268 | 0.063545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.226935 | 943 | 41 | 61 | 23 | 0.820302 | 0 | 0 | 0 | 0 | 0 | 0.042373 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.054054 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
1874ca96a1f31b40d52d15b318f020ba7a9562e6 | 811 | py | Python | tests/test_linked_queue.py | dataloudlabs/dloud-ads | d0ad3f169c2384292db4097e00ba7858f37a8198 | [
"MIT"
] | null | null | null | tests/test_linked_queue.py | dataloudlabs/dloud-ads | d0ad3f169c2384292db4097e00ba7858f37a8198 | [
"MIT"
] | null | null | null | tests/test_linked_queue.py | dataloudlabs/dloud-ads | d0ad3f169c2384292db4097e00ba7858f37a8198 | [
"MIT"
] | null | null | null | """ Unit tests for linked_queue.LinkedQueue """
from dloud_ads import linked_queue
def test_dummy():
""" Test definition"""
the_queue = linked_queue.LinkedQueue()
assert the_queue.is_empty()
assert not the_queue
the_queue.enqueue(2)
assert not the_queue.is_empty()
assert len(the_queue) == 1
assert the_queue.dequeue() == 2
_ = [the_queue.enqueue(x) for x in range(4)]
assert len(the_queue) == 4
assert [the_queue.dequeue() for x in range(4)] == [0, 1, 2, 3]
assert not the_queue
_ = [the_queue.enqueue(x) for x in range(9)]
assert len(the_queue) == 9
_ = [the_queue.enqueue(x) for x in range(2)]
assert len(the_queue) == 11
expected = [0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1]
assert [the_queue.dequeue() for x in range(11)] == expected
| 26.16129 | 66 | 0.637485 | 132 | 811 | 3.719697 | 0.280303 | 0.260692 | 0.0611 | 0.112016 | 0.519348 | 0.395112 | 0.395112 | 0.295316 | 0 | 0 | 0 | 0.044657 | 0.22688 | 811 | 30 | 67 | 27.033333 | 0.738437 | 0.067818 | 0 | 0.105263 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.578947 | 1 | 0.052632 | false | 0 | 0.052632 | 0 | 0.105263 | 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 |
187dce0fab5d7dab6ce2381189b7af90777ddbc1 | 732 | py | Python | {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/cli.py | go-choppy/choppy-cookiecutter-pypackage | b5bfc226089bba7002397c4055199b7b57c773ea | [
"BSD-3-Clause"
] | 2 | 2019-07-09T14:03:02.000Z | 2019-07-09T14:18:55.000Z | {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/cli.py | yjcyxky/cookiecutter-pypackage | b5bfc226089bba7002397c4055199b7b57c773ea | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/cli.py | yjcyxky/cookiecutter-pypackage | b5bfc226089bba7002397c4055199b7b57c773ea | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# PYTHON_ARGCOMPLETE_OK
"""
{{cookiecutter.project_slug}}.cli
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{{ cookiecutter.project_short_description }}
:copyright: © 2019 by the Choppy Team.
:license: AGPLv3+, see LICENSE for more details.
"""
"""Console script for {{cookiecutter.project_slug}}."""
import sys
import click
@click.command()
def main(args=None):
"""Console script for {{cookiecutter.project_slug}}."""
click.echo("Replace this message by putting your code into "
"{{cookiecutter.project_slug}}.cli.main")
click.echo("See click documentation at http://click.pocoo.org/")
return 0
if __name__ == "__main__":
sys.exit(main()) # pragma: no cover
| 25.241379 | 68 | 0.64071 | 87 | 732 | 5.218391 | 0.643678 | 0.209251 | 0.202643 | 0.114537 | 0.171806 | 0.171806 | 0 | 0 | 0 | 0 | 0 | 0.00995 | 0.17623 | 732 | 28 | 69 | 26.142857 | 0.741294 | 0.42623 | 0 | 0 | 0 | 0 | 0.433333 | 0.115152 | 0 | 0 | 0 | 0 | 0 | 1 | 0.1 | false | 0 | 0.2 | 0 | 0.4 | 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 |
187e7d05e0f32e5a771a3ba903dffb0254e60e4c | 891 | py | Python | test/classes/test_players.py | teamvolik/teamvolik | 35acc1405d4f0211236631d0c5bbdbf4f948fcb6 | [
"MIT"
] | 6 | 2022-03-27T22:13:35.000Z | 2022-03-31T22:45:02.000Z | test/classes/test_players.py | teamvolik/teamvolik | 35acc1405d4f0211236631d0c5bbdbf4f948fcb6 | [
"MIT"
] | 15 | 2022-03-18T09:47:31.000Z | 2022-03-29T15:26:51.000Z | test/classes/test_players.py | teamvolik/teamvolik | 35acc1405d4f0211236631d0c5bbdbf4f948fcb6 | [
"MIT"
] | null | null | null | import unittest
import src.classes.player as player
class PlayersTest(unittest.TestCase):
def test_to_string(self):
self.assertTrue(str(player.Player()) == "Player(id=-1, name=UNDEFINED, is_adm=False, games=0, pitch=0.0, hold=0.0, passing=0.0, movement=0.0, attacking=0.0, rating=0.0)")
def test_to_sqlite_table(self):
empty_player = player.Player()
self.assertTrue(empty_player.to_sqlite_table() == (-1, "UNDEFINED", False, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0))
def test_from_sqlite_table(self):
self.assertTrue(str(player.Player.from_sqlite_table(None)) == str(player.Player()))
player_info = (1, "AF", True, 3, 9.0, 9.0, 9.0, 9.0, 9.0, 9.0)
self.assertTrue(str(player.Player.from_sqlite_table(player_info)) == str(player.Player(1, "AF", True, 3, 9.0, 9.0, 9.0, 9.0, 9.0, 9.0)))
if __name__ == "__main__":
unittest.main()
| 40.5 | 178 | 0.654321 | 153 | 891 | 3.633987 | 0.281046 | 0.064748 | 0.059353 | 0.071942 | 0.320144 | 0.320144 | 0.253597 | 0.253597 | 0.095324 | 0.095324 | 0 | 0.074967 | 0.161616 | 891 | 21 | 179 | 42.428571 | 0.669344 | 0 | 0 | 0 | 0 | 0.071429 | 0.166106 | 0 | 0 | 0 | 0 | 0 | 0.285714 | 1 | 0.214286 | false | 0.071429 | 0.142857 | 0 | 0.428571 | 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 |
43ee04853e52a2ff347eaf6785c0c115ae6ad8aa | 164 | py | Python | agc/agc007/agc007a.py | c-yan/atcoder | 940e49d576e6a2d734288fadaf368e486480a948 | [
"MIT"
] | 1 | 2019-08-21T00:49:34.000Z | 2019-08-21T00:49:34.000Z | agc/agc007/agc007a.py | c-yan/atcoder | 940e49d576e6a2d734288fadaf368e486480a948 | [
"MIT"
] | null | null | null | agc/agc007/agc007a.py | c-yan/atcoder | 940e49d576e6a2d734288fadaf368e486480a948 | [
"MIT"
] | null | null | null | H, W = map(int, input().split())
A = [input() for _ in range(H)]
if H + W - 1 == sum(a.count('#') for a in A):
print('Possible')
else:
print('Impossible')
| 20.5 | 45 | 0.542683 | 28 | 164 | 3.142857 | 0.642857 | 0.045455 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007813 | 0.219512 | 164 | 7 | 46 | 23.428571 | 0.679688 | 0 | 0 | 0 | 0 | 0 | 0.115854 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.333333 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
43f06ebbb7637e1e6c0f53bef04ad021c74daf38 | 2,188 | py | Python | relfs/relfs/fuse/mount_root.py | matus-chochlik/various | 2a9f5eddd964213f7d1e1ce8328e2e0b2a8e998b | [
"MIT"
] | 1 | 2020-10-25T12:28:50.000Z | 2020-10-25T12:28:50.000Z | relfs/relfs/fuse/mount_root.py | matus-chochlik/various | 2a9f5eddd964213f7d1e1ce8328e2e0b2a8e998b | [
"MIT"
] | null | null | null | relfs/relfs/fuse/mount_root.py | matus-chochlik/various | 2a9f5eddd964213f7d1e1ce8328e2e0b2a8e998b | [
"MIT"
] | null | null | null | # coding=utf-8
#------------------------------------------------------------------------------#
import os
import time
import fuse
import errno
from .item import RelFuseItem
from .static_dir import StaticDirectory
#------------------------------------------------------------------------------#
class MountRoot(RelFuseItem):
# --------------------------------------------------------------------------
def __init__(self):
RelFuseItem.__init__(self)
self._mount_time = time.time()
self._relfs_dir = StaticDirectory()
self._repos_backstage = self._relfs_dir.add("repos", StaticDirectory())
self._repos = dict()
# --------------------------------------------------------------------------
def add_repo_root(self, name, item):
self._repos[name] = item
# --------------------------------------------------------------------------
def repos_backstage(self):
return self._repos_backstage
# --------------------------------------------------------------------------
def find_item(self, split_path):
if not split_path or split_path == ["."]:
return self
if split_path[0] == ".relfs":
return self._relfs_dir.find_item(split_path[1:])
try:
repo = self._repos[split_path[0]]
return repo.find_item(split_path[1:])
except KeyError:
pass
# --------------------------------------------------------------------------
def readdir(self, fh):
yield ".."
yield "."
yield ".relfs"
for name in self._repos:
yield name
# --------------------------------------------------------------------------
def _modify_time(self):
return self._mount_time
# --------------------------------------------------------------------------
def access(self, mode):
if mode & os.X_OK:
return 0
return RelFuseItem.access(self, mode)
# --------------------------------------------------------------------------
def _get_mode(self):
return 0o40550
#------------------------------------------------------------------------------#
| 35.290323 | 80 | 0.359232 | 160 | 2,188 | 4.63125 | 0.33125 | 0.08502 | 0.048583 | 0.045884 | 0.048583 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006849 | 0.199269 | 2,188 | 61 | 81 | 35.868852 | 0.416096 | 0.386654 | 0 | 0 | 0 | 0 | 0.015837 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.195122 | false | 0.02439 | 0.146341 | 0.073171 | 0.560976 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
43fe8ce604f5be764fdbae5dfb8933ec293fcd26 | 187 | py | Python | App/softwares_env/wizard/wsd/main.py | Wizard-collab/wizard | c2ec623fe011626716493c232b895fb0513f68ff | [
"MIT"
] | null | null | null | App/softwares_env/wizard/wsd/main.py | Wizard-collab/wizard | c2ec623fe011626716493c232b895fb0513f68ff | [
"MIT"
] | null | null | null | App/softwares_env/wizard/wsd/main.py | Wizard-collab/wizard | c2ec623fe011626716493c232b895fb0513f68ff | [
"MIT"
] | null | null | null | import yaml
class wsd():
def __init__(self, file, dict):
self.file = file
self.dict = dict
def write_sd(self):
with open(self.file, 'w') as f:
f.write(yaml.dump(self.dict)) | 17 | 33 | 0.652406 | 32 | 187 | 3.65625 | 0.53125 | 0.205128 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.192513 | 187 | 11 | 34 | 17 | 0.774834 | 0 | 0 | 0 | 0 | 0 | 0.005319 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.125 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
a1081e4aca80f13d81fb5c284f116c973136197c | 608 | py | Python | libs/dispatch/dispatcher.py | eeshakumar/hythe | 52ca795c8370ddfb2aa6fb87ff3f63a85c55f913 | [
"MIT"
] | null | null | null | libs/dispatch/dispatcher.py | eeshakumar/hythe | 52ca795c8370ddfb2aa6fb87ff3f63a85c55f913 | [
"MIT"
] | null | null | null | libs/dispatch/dispatcher.py | eeshakumar/hythe | 52ca795c8370ddfb2aa6fb87ff3f63a85c55f913 | [
"MIT"
] | null | null | null | from abc import abstractmethod, ABC
class Dispatcher(ABC):
def __init__(self, dispatch_dict=None):
self._dispatch_dict = dispatch_dict
self._process_list = []
return
def set_dispatch_dict(self, dispatch_dict):
self._dispatch_dict = dispatch_dict
@abstractmethod
def dispatch(self):
raise NotImplementedError
@staticmethod
def execute(dispatch_obj):
try:
print("Running experiment with seed:", dispatch_obj[0])
dispatch_obj[1].run()
except IOError as io_error:
print(io_error.message)
| 22.518519 | 67 | 0.648026 | 68 | 608 | 5.485294 | 0.529412 | 0.225201 | 0.171582 | 0.128686 | 0.225201 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004535 | 0.274671 | 608 | 26 | 68 | 23.384615 | 0.84127 | 0 | 0 | 0.111111 | 0 | 0 | 0.047855 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | false | 0 | 0.055556 | 0 | 0.388889 | 0.111111 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
a111862555b1576ad0436f2aab598c4b8d1d29a9 | 708 | py | Python | report/api/hooks.py | Aaron-DH/openstack_sample_project | 711a56311806d52b632e4394743bd4bdbacb103a | [
"Apache-2.0"
] | null | null | null | report/api/hooks.py | Aaron-DH/openstack_sample_project | 711a56311806d52b632e4394743bd4bdbacb103a | [
"Apache-2.0"
] | null | null | null | report/api/hooks.py | Aaron-DH/openstack_sample_project | 711a56311806d52b632e4394743bd4bdbacb103a | [
"Apache-2.0"
] | null | null | null | from oslo_log import log
from oslo_config import cfg
from report import storage
from pecan import hooks
LOG = log.getLogger(__name__)
class RPCHook(hooks.PecanHook):
def __init__(self, rcp_client):
self._rpc_client = rcp_client
def before(self, state):
state.request.rpc_client = self._rpc_client
class DBHook(hooks.PecanHook):
def __init__(self):
self.storage_connection = storage.get_connection_from_config(cfg.CONF)
if not self.storage_connection:
raise Exception("Api failed to start. "
"Failed to connect to database.")
def before(self, state):
state.request.storage_conn = self.storage_connection
| 25.285714 | 78 | 0.69209 | 91 | 708 | 5.076923 | 0.428571 | 0.058442 | 0.136364 | 0.090909 | 0.238095 | 0.12987 | 0 | 0 | 0 | 0 | 0 | 0 | 0.233051 | 708 | 27 | 79 | 26.222222 | 0.850829 | 0 | 0 | 0.111111 | 0 | 0 | 0.072034 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | false | 0 | 0.222222 | 0 | 0.555556 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
a115499f10a5a3acf2f24d7e3dd1a76b57b5b137 | 245 | py | Python | Projects/Python_Python2_json/main.py | LiuOcean/luban_examples | 75d5fd7c1b15d79efc0ebbac21a74bf050aed1fb | [
"MIT"
] | 44 | 2021-05-06T06:16:55.000Z | 2022-03-30T06:27:25.000Z | Projects/Python_Python2_json/main.py | HFX-93/luban_examples | 5b90e392d404950d12ff803a186b26bdea5e0292 | [
"MIT"
] | 1 | 2021-07-25T16:35:32.000Z | 2021-08-23T04:59:49.000Z | Projects/Python_Python2_json/main.py | HFX-93/luban_examples | 5b90e392d404950d12ff803a186b26bdea5e0292 | [
"MIT"
] | 14 | 2021-06-09T10:38:59.000Z | 2022-03-30T06:27:24.000Z | import json
import gen.Types
def loader(f):
return json.load(open('../GenerateDatas/json/' + f + ".json", 'r'), encoding="utf-8")
tables = gen.Types.Tables(loader)
print(tables)
r = tables.TbFullTypes.getDataList()[0].__dict__
print(r)
| 18.846154 | 89 | 0.685714 | 35 | 245 | 4.685714 | 0.6 | 0.097561 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009346 | 0.126531 | 245 | 12 | 90 | 20.416667 | 0.757009 | 0 | 0 | 0 | 1 | 0 | 0.134694 | 0.089796 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.25 | 0.125 | 0.5 | 0.25 | 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 | 1 | 0 | 0 | 0 | 2 |
a122487d9193d1e9db5e1e4904c5779cf5ab0b4a | 1,713 | py | Python | Release/cyberbot-micropython/Examples/Terminal_DA_AD.py | parallaxinc/cyberbot | f7c4d355ee0310dcfef81027802cc41ac6ce90e1 | [
"MIT"
] | 4 | 2019-03-18T20:49:41.000Z | 2022-03-24T01:44:36.000Z | Release/cyberbot-micropython/Examples/Terminal_DA_AD.py | parallaxinc/cyberbot | f7c4d355ee0310dcfef81027802cc41ac6ce90e1 | [
"MIT"
] | 5 | 2019-06-07T18:09:27.000Z | 2021-04-08T17:16:55.000Z | Release/cyberbot-micropython/Examples/Terminal_DA_AD.py | parallaxinc/cyberbot | f7c4d355ee0310dcfef81027802cc41ac6ce90e1 | [
"MIT"
] | null | null | null | # Terminal_DA_AD.py
# Circuit
# D/A0---A/D0, D/A1---A/D1,
# pot A---3.3V, potB---GND, pot wiper---A/D2
# Procedure
# Run, then open REPL and then CTRL + D
# Twist pot input while program runs to see ad2 vary
# Notes
# micro:bit ground is 0.4 V below cyber:bot board ground
# micro:bit 3.3 V = 3.245 V WRT cyber:bot board ground
# cyber:bot 3.3 V = 3.326 V WRT cyber:bot board ground
# Output example
# da0 = 0, da1 = 1024, ad0 = 13, ad1 = 623, ad2 = 7
# da0 = 64, da1 = 960, ad0 = 72, ad1 = 998, ad2 = 7
# da0 = 128, da1 = 896, ad0 = 137, ad1 = 934, ad2 = 7
# da0 = 192, da1 = 832, ad0 = 203, ad1 = 871, ad2 = 7
# da0 = 256, da1 = 768, ad0 = 266, ad1 = 805, ad2 = 87
# da0 = 320, da1 = 704, ad0 = 332, ad1 = 744, ad2 = 150
# da0 = 384, da1 = 640, ad0 = 398, ad1 = 680, ad2 = 211
# da0 = 448, da1 = 576, ad0 = 461, ad1 = 617, ad2 = 261
# da0 = 512, da1 = 512, ad0 = 526, ad1 = 554, ad2 = 308
# da0 = 576, da1 = 448, ad0 = 588, ad1 = 490, ad2 = 372
# da0 = 640, da1 = 384, ad0 = 652, ad1 = 425, ad2 = 469
# da0 = 704, da1 = 320, ad0 = 716, ad1 = 360, ad2 = 629
# da0 = 768, da1 = 256, ad0 = 779, ad1 = 295, ad2 = 806
# da0 = 832, da1 = 192, ad0 = 845, ad1 = 231, ad2 = 867
# da0 = 896, da1 = 128, ad0 = 907, ad1 = 165, ad2 = 947
# da0 = 960, da1 = 64, ad0 = 970, ad1 = 100, ad2 = 1023
from cyberbot import *
bot(22).tone(2000, 300)
while True:
for da in range(0, 1024, 64):
bot(20).write_analog(da)
bot(21).write_analog(1024 - da)
sleep(20)
ad0 = pin0.read_analog()
ad1 = pin1.read_analog()
ad2 = pin2.read_analog()
print("da0 = %d, da1 = %d, ad0 = %d, ad1 = %d, ad2 = %d" % (da, 1024 - da, ad0, ad1, ad2))
sleep(150)
print(" ")
sleep(500) | 32.320755 | 92 | 0.565674 | 307 | 1,713 | 3.13355 | 0.449511 | 0.033264 | 0.029106 | 0.059252 | 0.047817 | 0.047817 | 0 | 0 | 0 | 0 | 0 | 0.302233 | 0.267951 | 1,713 | 53 | 93 | 32.320755 | 0.464912 | 0.742557 | 0 | 0 | 0 | 0.071429 | 0.118644 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.071429 | 0 | 0.071429 | 0.142857 | 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 |
a124c13c10af7bc999fd4983d83bef5b21b878ff | 64 | py | Python | notebooks/_solutions/13-raster-processing32.py | jorisvandenbossche/DS-python-geospatial | 893a12edc5c203a75815f6dcb5f1e18c577c8cd5 | [
"BSD-3-Clause"
] | 58 | 2020-10-09T10:10:59.000Z | 2022-03-07T14:58:07.000Z | notebooks/_solutions/13-raster-processing32.py | jorisvandenbossche/DS-python-geospatial | 893a12edc5c203a75815f6dcb5f1e18c577c8cd5 | [
"BSD-3-Clause"
] | 24 | 2020-09-30T19:57:14.000Z | 2021-10-05T07:21:09.000Z | notebooks/_solutions/13-raster-processing32.py | jorisvandenbossche/DS-python-geospatial | 893a12edc5c203a75815f6dcb5f1e18c577c8cd5 | [
"BSD-3-Clause"
] | 19 | 2020-10-05T09:32:18.000Z | 2022-03-20T00:09:14.000Z | roads_subset = roads[roads["frc_omschrijving"].isin(road_types)] | 64 | 64 | 0.8125 | 9 | 64 | 5.444444 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.03125 | 64 | 1 | 64 | 64 | 0.790323 | 0 | 0 | 0 | 0 | 0 | 0.246154 | 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 |
a128f73c987352e7a2b67ff853ae7ba81f0f3c24 | 198 | py | Python | py files/normalization.py | kilarinikhil/ComputerVision | 1cb2985f9c5e45bd0763cb676028ea97fce2b27b | [
"Apache-2.0"
] | null | null | null | py files/normalization.py | kilarinikhil/ComputerVision | 1cb2985f9c5e45bd0763cb676028ea97fce2b27b | [
"Apache-2.0"
] | null | null | null | py files/normalization.py | kilarinikhil/ComputerVision | 1cb2985f9c5e45bd0763cb676028ea97fce2b27b | [
"Apache-2.0"
] | 1 | 2020-06-04T18:39:00.000Z | 2020-06-04T18:39:00.000Z | import numpy as np
def normalize(image):
mean = np.mean(image)
meanSubtractedImage = image - mean
return np.divide(meanSubtractedImage,np.power(np.sum(np.power(meanSubtractedImage,2)),0.5))
| 22 | 92 | 0.752525 | 28 | 198 | 5.321429 | 0.571429 | 0.120805 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.017241 | 0.121212 | 198 | 8 | 93 | 24.75 | 0.83908 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.2 | 0 | 0.6 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
a130aee35a17b1d7653613de1de880f9a3444608 | 305 | py | Python | packages/grid/apps/worker/src/main/core/database/groups/groups.py | exityan/PySyft | 35166c487a5be57f9ad28929ed88a8ba6bdd5aeb | [
"Apache-2.0"
] | 425 | 2019-09-22T06:14:53.000Z | 2022-03-30T02:17:34.000Z | packages/grid/apps/worker/src/main/core/database/groups/groups.py | Metrix1010/PySyft | 6477f64b63dc285059c3766deab3993653cead2e | [
"Apache-2.0"
] | 352 | 2019-09-17T15:32:51.000Z | 2022-03-12T01:07:35.000Z | packages/grid/apps/worker/src/main/core/database/groups/groups.py | Metrix1010/PySyft | 6477f64b63dc285059c3766deab3993653cead2e | [
"Apache-2.0"
] | 208 | 2019-09-18T18:32:10.000Z | 2022-03-24T01:10:11.000Z | # grid relative
from .. import BaseModel
from .. import db
class Group(BaseModel):
__tablename__ = "group"
id = db.Column(db.Integer(), primary_key=True, autoincrement=True)
name = db.Column(db.String(255))
def __str__(self):
return f"<Group id: {self.id}, name: {self.name}>"
| 21.785714 | 70 | 0.655738 | 41 | 305 | 4.658537 | 0.585366 | 0.104712 | 0.104712 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012245 | 0.196721 | 305 | 13 | 71 | 23.461538 | 0.767347 | 0.042623 | 0 | 0 | 0 | 0 | 0.155172 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.25 | 0.125 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 2 |
a1423e6a2572b095e511d07a5f47171e04381471 | 4,579 | py | Python | aleph/tests/test_documents_api.py | gazeti/aleph | f6714c4be038471cfdc6408bfe88dc9e2ed28452 | [
"MIT"
] | 1 | 2017-07-28T12:54:09.000Z | 2017-07-28T12:54:09.000Z | aleph/tests/test_documents_api.py | gazeti/aleph | f6714c4be038471cfdc6408bfe88dc9e2ed28452 | [
"MIT"
] | 7 | 2017-08-16T12:49:23.000Z | 2018-02-16T10:22:11.000Z | aleph/tests/test_documents_api.py | gazeti/aleph | f6714c4be038471cfdc6408bfe88dc9e2ed28452 | [
"MIT"
] | 6 | 2017-07-26T12:29:53.000Z | 2017-08-18T09:35:50.000Z | import json
from aleph.tests.util import TestCase
class DocumentsApiTestCase(TestCase):
def setUp(self):
super(DocumentsApiTestCase, self).setUp()
self.load_fixtures('docs.yaml')
def test_index(self):
res = self.client.get('/api/1/documents')
assert res.status_code == 200, res
self.login(is_admin=True)
res = self.client.get('/api/1/documents')
assert res.status_code == 200, res
assert res.json['total'] == 4, res.json
fix = '720badc9cfa9a80fc455239f86c56273dc5c8291'
res = self.client.get('/api/1/documents?content_hash=%s' % fix)
assert res.status_code == 200, res
assert res.json['total'] == 1, res.json
assert res.json['results'][0]['content_hash'] == fix, res.json
def test_view(self):
doc_id = 1000
res = self.client.get('/api/1/documents/%s' % doc_id)
assert res.status_code == 200, res
assert res.json['foreign_id'] == 'test1', res
res = self.client.get('/api/1/documents/328984')
assert res.status_code == 404, res
def test_view_tables(self):
doc_id = 1003
res = self.client.get('/api/1/documents/%s/tables/0' % doc_id)
assert res.status_code == 200, res
assert 'sheet_name' in res.json, res.json
res = self.client.get('/api/1/documents/%s/tables/444' % doc_id)
assert res.status_code == 404, res
def test_view_records(self):
res = self.client.get('/api/1/documents/1003/records')
assert res.status_code == 200, res
assert 'results' in res.json, res.json
assert len(res.json['results']) == 10, res.json
def test_view_record_by_id(self):
doc_id = 1000
res = self.client.get('/api/1/documents/%s/records/1' % doc_id)
assert res.status_code == 200, res
assert 'banana' in res.json['text'], res
assert 'total' not in res.json['text'], res
res = self.client.get('/api/1/documents/%s/records/2' % doc_id)
assert 'total' in res.json['text'], res
res = self.client.get('/api/1/documents/%s/records/2000' % doc_id)
assert res.status_code == 404, res
def test_records_search(self):
res = self.client.get('/api/1/documents/1003/records?q=kwazulu')
assert res.status_code == 200, res
assert res.json['total'] == 1, res.json
def test_view_pdf(self):
res = self.client.get('/api/1/documents/1003/pdf')
assert res.status_code == 400, res
res = self.client.get('/api/1/documents/1000/pdf')
assert res.status_code == 404, res
def test_view_references(self):
doc_id = 1001
res = self.client.get('/api/1/documents/%s/references' % doc_id)
assert res.status_code == 403, res
self.login(is_admin=True)
res = self.client.get('/api/1/documents/%s/references' % doc_id)
assert res.status_code == 200, res
assert 'results' in res.json, res.json
# assert len(res.json['results']) == 2, res.json
def test_update_simple(self):
url = '/api/1/documents/1000'
res = self.client.get(url)
assert res.status_code == 200, res
data = res.json
res = self.client.post(url, data=json.dumps(data),
content_type='application/json')
assert res.status_code == 403, res.json
data['title'] = 'Eaten by a pumpkin'
self.login(is_admin=True)
res = self.client.post(url, data=json.dumps(data),
content_type='application/json')
assert res.status_code == 200, res.json
assert res.json['title'] == data['title'], res.json
def test_update_invalid(self):
url = '/api/1/documents/1000'
ores = self.client.get(url)
self.login(is_admin=True)
data = ores.json.copy()
data['countries'] = ['xz']
res = self.client.post(url, data=json.dumps(data),
content_type='application/json')
assert res.status_code == 400, res.json
data = ores.json.copy()
data['urls'] = ['lalala']
res = self.client.post(url, data=json.dumps(data),
content_type='application/json')
assert res.status_code == 400, res.json
data = ores.json.copy()
data['dates'] = ['2011-XX-XX']
res = self.client.post(url, data=json.dumps(data),
content_type='application/json')
assert res.status_code == 400, res.json
| 37.227642 | 74 | 0.592487 | 624 | 4,579 | 4.240385 | 0.153846 | 0.079365 | 0.108088 | 0.150794 | 0.801209 | 0.718821 | 0.677249 | 0.666289 | 0.633031 | 0.517007 | 0 | 0.051709 | 0.265123 | 4,579 | 122 | 75 | 37.532787 | 0.734621 | 0.010046 | 0 | 0.474227 | 0 | 0 | 0.172147 | 0.102185 | 0 | 0 | 0 | 0 | 0.350515 | 1 | 0.113402 | false | 0 | 0.020619 | 0 | 0.14433 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
a15ae079911483a5e3b82012f76254443eb7a059 | 339 | py | Python | counter-test-applications/lr100000/linear-regr-100k.py | EsperLiu/vPython | f1005f011d6d9fd079cf72e8f78bab6d95a9f993 | [
"0BSD"
] | 1 | 2021-11-21T03:31:32.000Z | 2021-11-21T03:31:32.000Z | counter-test-applications/lr100000/linear-regr-100k.py | EsperLiu/vPython | f1005f011d6d9fd079cf72e8f78bab6d95a9f993 | [
"0BSD"
] | null | null | null | counter-test-applications/lr100000/linear-regr-100k.py | EsperLiu/vPython | f1005f011d6d9fd079cf72e8f78bab6d95a9f993 | [
"0BSD"
] | 1 | 2021-11-28T05:57:55.000Z | 2021-11-28T05:57:55.000Z | def end_of_import():
return 0
def end_of_init():
return 0
def end_of_computing():
return 0
import numpy as np
from sklearn.linear_model import LinearRegression
end_of_import()
X = np.array(range(0,100000)).reshape(-1, 1)
# y = 2x + 3
y = np.dot(X, 2) + 3
end_of_init()
reg = LinearRegression().fit(X, y)
end_of_computing() | 16.95 | 49 | 0.696165 | 60 | 339 | 3.716667 | 0.483333 | 0.134529 | 0.107623 | 0.116592 | 0.134529 | 0 | 0 | 0 | 0 | 0 | 0 | 0.057143 | 0.174041 | 339 | 20 | 50 | 16.95 | 0.739286 | 0.029499 | 0 | 0.214286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.214286 | false | 0 | 0.285714 | 0.214286 | 0.714286 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 |
a15b3e54d6303597b66c9ac9aa7e5fefcc34013d | 262 | py | Python | python/bitcoin/ch04/04_08.py | gangserver/py_test | 869bdfa5c94c3b6a15b87e0c3de6b2cdaca821f4 | [
"Apache-2.0"
] | null | null | null | python/bitcoin/ch04/04_08.py | gangserver/py_test | 869bdfa5c94c3b6a15b87e0c3de6b2cdaca821f4 | [
"Apache-2.0"
] | null | null | null | python/bitcoin/ch04/04_08.py | gangserver/py_test | 869bdfa5c94c3b6a15b87e0c3de6b2cdaca821f4 | [
"Apache-2.0"
] | null | null | null | import requests
url = "https://api.korbit.co.kr/v1/ticker/detailed?currency_pair=btc_krw"
r = requests.get(url)
bitcoin = r.json()
print(bitcoin)
print(type(bitcoin))
print(bitcoin['last'])
print(bitcoin['bid'])
print(bitcoin['ask'])
print(bitcoin['volume'])
| 18.714286 | 73 | 0.725191 | 39 | 262 | 4.820513 | 0.641026 | 0.319149 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004132 | 0.076336 | 262 | 13 | 74 | 20.153846 | 0.772727 | 0 | 0 | 0 | 0 | 0 | 0.311538 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.1 | 0 | 0.1 | 0.6 | 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 |
a16aa7de0e511402c80303f34d1d2b678e7b0256 | 446 | py | Python | tests/LayoutTest.py | lakhman/restructuredWeb | a8aff9f96c63415fdefe6832f923a6d395d4ebdd | [
"MIT"
] | 2 | 2021-05-19T15:43:26.000Z | 2021-05-19T16:07:00.000Z | tests/LayoutTest.py | lakhman/restructuredWeb | a8aff9f96c63415fdefe6832f923a6d395d4ebdd | [
"MIT"
] | null | null | null | tests/LayoutTest.py | lakhman/restructuredWeb | a8aff9f96c63415fdefe6832f923a6d395d4ebdd | [
"MIT"
] | 1 | 2021-05-19T15:43:44.000Z | 2021-05-19T15:43:44.000Z | # -*- coding: utf-8 -*-
from .BaseTest import BaseTest
class LayoutTest(BaseTest):
def test_layout_switch(self):
"""
Test layout switch
"""
self.do_component_fixture_test_with_real_sphinx('layout', 'layout')
def test_layout_multiple(self):
"""
Test multiple layout directives throw an error
"""
self.do_component_fixture_test_with_real_sphinx('layout', 'multiple-error')
| 26.235294 | 83 | 0.650224 | 51 | 446 | 5.372549 | 0.470588 | 0.109489 | 0.094891 | 0.145985 | 0.335766 | 0.335766 | 0.335766 | 0.335766 | 0.335766 | 0 | 0 | 0.002959 | 0.242152 | 446 | 16 | 84 | 27.875 | 0.807692 | 0.197309 | 0 | 0 | 0 | 0 | 0.102894 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.166667 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
a17081dce9dfbf674f07300258797fe7e68a0847 | 1,746 | py | Python | 017. Letter Combinations of a Phone Number.py | youhusky/Facebook_Prepare | 4045bcb652537711b3680b2aa17204ae73c6bde8 | [
"MIT"
] | 6 | 2017-10-30T05:35:46.000Z | 2020-12-15T06:51:52.000Z | 017. Letter Combinations of a Phone Number.py | youhusky/Facebook_Prepare | 4045bcb652537711b3680b2aa17204ae73c6bde8 | [
"MIT"
] | 1 | 2017-10-30T04:11:31.000Z | 2017-10-30T05:46:24.000Z | 017. Letter Combinations of a Phone Number.py | youhusky/Facebook_Prepare | 4045bcb652537711b3680b2aa17204ae73c6bde8 | [
"MIT"
] | 2 | 2020-09-03T07:14:02.000Z | 2021-05-21T19:19:57.000Z | # Given a digit string, return all possible letter combinations that the number could represent.
# A mapping of digit to letters (just like on the telephone buttons) is given below.
# Input:Digit string "23"
# Output: ["ad", "ae", "af", "bd", "be", "bf", "cd", "ce", "cf"].
# DFS backtracking
class Solution(object):
def letterCombinations(self, digits):
"""
O(2^n)
:type digits: str
:rtype: List[str]
"""
if not digits:
return []
res = []
dic = {
'2': 'abc',
'3': 'def',
'4': 'ghi',
'5': 'jkl',
'6': 'mno',
'7': 'pqrs',
'8': 'tuv',
'9': 'wxyz'
}
self.dfs(res, '',dic,digits,0)
return res
def dfs(self, res, temp, dic,digits,index):
if len(temp) == len(digits):
res.append(temp)
return
# focus on !
# digits[index] -> 2: generate a,b,c
for letter in dic[digits[index]]:
self.dfs(res, temp+letter, dic, digits, index+1)
class Solution2(object):
def letterCombinations(self, password):
if not password:
return []
res = []
dic = {'a':"12", 'c':"34"}
for char in password:
if char not in dic:
dic[char] = char
self.dfs(res, "", dic, password, 0)
return res
def dfs(self, res, temp, dic, password, index):
if index == len(password):
res.append(temp)
return
for letter in dic[password[index]]:
self.dfs(res, temp+letter, dic, password, index+1)
m = Solution2()
print m.letterCombinations('abc')
| 27.28125 | 96 | 0.4874 | 206 | 1,746 | 4.131068 | 0.436893 | 0.042303 | 0.047004 | 0.072855 | 0.13631 | 0.13631 | 0.13631 | 0.070505 | 0.070505 | 0 | 0 | 0.019964 | 0.368843 | 1,746 | 63 | 97 | 27.714286 | 0.752269 | 0.187858 | 0 | 0.238095 | 0 | 0 | 0.03238 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.190476 | 0 | null | null | 0.02381 | 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 |
a1730ed2d00a6babe52f239de2d480281d939967 | 13,395 | py | Python | ixnetwork_restpy/testplatform/sessions/ixnetwork/topology/packetinlist_10d8adb40e4e05f4b37904f2c6428ca9.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 20 | 2019-05-07T01:59:14.000Z | 2022-02-11T05:24:47.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/topology/packetinlist_10d8adb40e4e05f4b37904f2c6428ca9.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 60 | 2019-04-03T18:59:35.000Z | 2022-02-22T12:05:05.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/topology/packetinlist_10d8adb40e4e05f4b37904f2c6428ca9.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 13 | 2019-05-20T10:48:31.000Z | 2021-10-06T07:45:44.000Z | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# 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.
from ixnetwork_restpy.base import Base
from ixnetwork_restpy.files import Files
from typing import List, Any, Union
class PacketInList(Base):
"""Openflow Switch PacketIn Configuration
The PacketInList class encapsulates a list of packetInList resources that are managed by the system.
A list of resources can be retrieved from the server using the PacketInList.find() method.
"""
__slots__ = ()
_SDM_NAME = 'packetInList'
_SDM_ATT_MAP = {
'AuxiliaryId': 'auxiliaryId',
'Count': 'count',
'DescriptiveName': 'descriptiveName',
'FlowTable': 'flowTable',
'InPort': 'inPort',
'Name': 'name',
'PacketInName': 'packetInName',
'PhysicalInPort': 'physicalInPort',
'SendPacketIn': 'sendPacketIn',
'SwitchName': 'switchName',
}
_SDM_ENUM_MAP = {
}
def __init__(self, parent, list_op=False):
super(PacketInList, self).__init__(parent, list_op)
@property
def AuxiliaryId(self):
# type: () -> 'Multivalue'
"""
Returns
-------
- obj(ixnetwork_restpy.multivalue.Multivalue): The identifier for auxiliary connections.
"""
from ixnetwork_restpy.multivalue import Multivalue
return Multivalue(self, self._get_attribute(self._SDM_ATT_MAP['AuxiliaryId']))
@property
def Count(self):
# type: () -> int
"""
Returns
-------
- number: Number of elements inside associated multiplier-scaled container object, e.g. number of devices inside a Device Group.
"""
return self._get_attribute(self._SDM_ATT_MAP['Count'])
@property
def DescriptiveName(self):
# type: () -> str
"""
Returns
-------
- str: Longer, more descriptive name for element. It's not guaranteed to be unique like -name-, but may offer more context.
"""
return self._get_attribute(self._SDM_ATT_MAP['DescriptiveName'])
@property
def FlowTable(self):
# type: () -> 'Multivalue'
"""
Returns
-------
- obj(ixnetwork_restpy.multivalue.Multivalue): If selected, the Switch looks up for each PacketIn configured in the Flow Table.
"""
from ixnetwork_restpy.multivalue import Multivalue
return Multivalue(self, self._get_attribute(self._SDM_ATT_MAP['FlowTable']))
@property
def InPort(self):
# type: () -> 'Multivalue'
"""
Returns
-------
- obj(ixnetwork_restpy.multivalue.Multivalue): The Switch Port on which, this Packet has come.
"""
from ixnetwork_restpy.multivalue import Multivalue
return Multivalue(self, self._get_attribute(self._SDM_ATT_MAP['InPort']))
@property
def Name(self):
# type: () -> str
"""
Returns
-------
- str: Name of NGPF element, guaranteed to be unique in Scenario
"""
return self._get_attribute(self._SDM_ATT_MAP['Name'])
@Name.setter
def Name(self, value):
# type: (str) -> None
self._set_attribute(self._SDM_ATT_MAP['Name'], value)
@property
def PacketInName(self):
# type: () -> 'Multivalue'
"""
Returns
-------
- obj(ixnetwork_restpy.multivalue.Multivalue): The description of the packet-in.
"""
from ixnetwork_restpy.multivalue import Multivalue
return Multivalue(self, self._get_attribute(self._SDM_ATT_MAP['PacketInName']))
@property
def PhysicalInPort(self):
# type: () -> 'Multivalue'
"""
Returns
-------
- obj(ixnetwork_restpy.multivalue.Multivalue): The physical In port value for this PacketIn range. It is the underlying physical port when packet is received on a logical port.
"""
from ixnetwork_restpy.multivalue import Multivalue
return Multivalue(self, self._get_attribute(self._SDM_ATT_MAP['PhysicalInPort']))
@property
def SendPacketIn(self):
# type: () -> 'Multivalue'
"""
Returns
-------
- obj(ixnetwork_restpy.multivalue.Multivalue): If selected, the Switch starts sending PacketIn messages when the session comes up.
"""
from ixnetwork_restpy.multivalue import Multivalue
return Multivalue(self, self._get_attribute(self._SDM_ATT_MAP['SendPacketIn']))
@property
def SwitchName(self):
# type: () -> str
"""
Returns
-------
- str: Parent Switch Name
"""
return self._get_attribute(self._SDM_ATT_MAP['SwitchName'])
def update(self, Name=None):
# type: (str) -> PacketInList
"""Updates packetInList resource on the server.
This method has some named parameters with a type: obj (Multivalue).
The Multivalue class has documentation that details the possible values for those named parameters.
Args
----
- Name (str): Name of NGPF element, guaranteed to be unique in Scenario
Raises
------
- ServerError: The server has encountered an uncategorized error condition
"""
return self._update(self._map_locals(self._SDM_ATT_MAP, locals()))
def add(self, Name=None):
# type: (str) -> PacketInList
"""Adds a new packetInList resource on the json, only valid with config assistant
Args
----
- Name (str): Name of NGPF element, guaranteed to be unique in Scenario
Returns
-------
- self: This instance with all currently retrieved packetInList resources using find and the newly added packetInList resources available through an iterator or index
Raises
------
- Exception: if this function is not being used with config assistance
"""
return self._add_xpath(self._map_locals(self._SDM_ATT_MAP, locals()))
def find(self, Count=None, DescriptiveName=None, Name=None, SwitchName=None):
# type: (int, str, str, str) -> PacketInList
"""Finds and retrieves packetInList resources from the server.
All named parameters are evaluated on the server using regex. The named parameters can be used to selectively retrieve packetInList resources from the server.
To retrieve an exact match ensure the parameter value starts with ^ and ends with $
By default the find method takes no parameters and will retrieve all packetInList resources from the server.
Args
----
- Count (number): Number of elements inside associated multiplier-scaled container object, e.g. number of devices inside a Device Group.
- DescriptiveName (str): Longer, more descriptive name for element. It's not guaranteed to be unique like -name-, but may offer more context.
- Name (str): Name of NGPF element, guaranteed to be unique in Scenario
- SwitchName (str): Parent Switch Name
Returns
-------
- self: This instance with matching packetInList resources retrieved from the server available through an iterator or index
Raises
------
- ServerError: The server has encountered an uncategorized error condition
"""
return self._select(self._map_locals(self._SDM_ATT_MAP, locals()))
def read(self, href):
"""Retrieves a single instance of packetInList data from the server.
Args
----
- href (str): An href to the instance to be retrieved
Returns
-------
- self: This instance with the packetInList resources from the server available through an iterator or index
Raises
------
- NotFoundError: The requested resource does not exist on the server
- ServerError: The server has encountered an uncategorized error condition
"""
return self._read(href)
def SendPause(self, *args, **kwargs):
# type: (*Any, **Any) -> Union[List[str], None]
"""Executes the sendPause operation on the server.
Pause Sending PacketIn
sendPause(Arg2=list, async_operation=bool)list
----------------------------------------------
- Arg2 (list(number)): List of PacketIn.
- async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete.
- Returns list(str): ID to associate each async action invocation
Raises
------
- NotFoundError: The requested resource does not exist on the server
- ServerError: The server has encountered an uncategorized error condition
"""
payload = { "Arg1": self.href }
for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i]
for item in kwargs.items(): payload[item[0]] = item[1]
return self._execute('sendPause', payload=payload, response_object=None)
def SendStart(self, *args, **kwargs):
# type: (*Any, **Any) -> Union[List[str], None]
"""Executes the sendStart operation on the server.
Start Sending PacketIn
sendStart(Arg2=list, async_operation=bool)list
----------------------------------------------
- Arg2 (list(number)): List of PacketIn.
- async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete.
- Returns list(str): ID to associate each async action invocation
Raises
------
- NotFoundError: The requested resource does not exist on the server
- ServerError: The server has encountered an uncategorized error condition
"""
payload = { "Arg1": self.href }
for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i]
for item in kwargs.items(): payload[item[0]] = item[1]
return self._execute('sendStart', payload=payload, response_object=None)
def SendStop(self, *args, **kwargs):
# type: (*Any, **Any) -> Union[List[str], None]
"""Executes the sendStop operation on the server.
Stop Sending PacketIn
sendStop(Arg2=list, async_operation=bool)list
---------------------------------------------
- Arg2 (list(number)): List of PacketIn.
- async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete.
- Returns list(str): ID to associate each async action invocation
Raises
------
- NotFoundError: The requested resource does not exist on the server
- ServerError: The server has encountered an uncategorized error condition
"""
payload = { "Arg1": self.href }
for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i]
for item in kwargs.items(): payload[item[0]] = item[1]
return self._execute('sendStop', payload=payload, response_object=None)
def get_device_ids(self, PortNames=None, AuxiliaryId=None, FlowTable=None, InPort=None, PacketInName=None, PhysicalInPort=None, SendPacketIn=None):
"""Base class infrastructure that gets a list of packetInList device ids encapsulated by this object.
Use the optional regex parameters in the method to refine the list of device ids encapsulated by this object.
Args
----
- PortNames (str): optional regex of port names
- AuxiliaryId (str): optional regex of auxiliaryId
- FlowTable (str): optional regex of flowTable
- InPort (str): optional regex of inPort
- PacketInName (str): optional regex of packetInName
- PhysicalInPort (str): optional regex of physicalInPort
- SendPacketIn (str): optional regex of sendPacketIn
Returns
-------
- list(int): A list of device ids that meets the regex criteria provided in the method parameters
Raises
------
- ServerError: The server has encountered an uncategorized error condition
"""
return self._get_ngpf_device_ids(locals())
| 40.468278 | 193 | 0.642255 | 1,567 | 13,395 | 5.407786 | 0.207403 | 0.024428 | 0.015931 | 0.021477 | 0.533514 | 0.502714 | 0.471678 | 0.467076 | 0.450555 | 0.438164 | 0 | 0.002607 | 0.255543 | 13,395 | 330 | 194 | 40.590909 | 0.847172 | 0.589026 | 0 | 0.290698 | 0 | 0 | 0.085553 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.232558 | false | 0 | 0.104651 | 0 | 0.604651 | 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 |
a173f091bd6a84a9640f8e5bfa3ab824665803fb | 1,038 | py | Python | django/contrib/contenttypes/tests/models.py | benjaoming/django | 6dbe979b4d9396e1b307c7d27388c97c13beb21c | [
"BSD-3-Clause"
] | 2 | 2015-01-21T15:45:07.000Z | 2015-02-21T02:38:13.000Z | env/lib/python2.7/site-packages/django/contrib/contenttypes/tests/models.py | luiscarlosgph/nas | e5acee61e8bbf12c34785fe971ce7df8dee775d4 | [
"MIT"
] | 10 | 2019-12-26T17:31:31.000Z | 2022-03-21T22:17:33.000Z | env/lib/python2.7/site-packages/django/contrib/contenttypes/tests/models.py | luiscarlosgph/nas | e5acee61e8bbf12c34785fe971ce7df8dee775d4 | [
"MIT"
] | 1 | 2020-05-25T08:55:19.000Z | 2020-05-25T08:55:19.000Z | from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.http import urlquote
class ConcreteModel(models.Model):
name = models.CharField(max_length=10)
class ProxyModel(ConcreteModel):
class Meta:
proxy = True
@python_2_unicode_compatible
class FooWithoutUrl(models.Model):
"""
Fake model not defining ``get_absolute_url`` for
ContentTypesTests.test_shortcut_view_without_get_absolute_url()
"""
name = models.CharField(max_length=30, unique=True)
def __str__(self):
return self.name
class FooWithUrl(FooWithoutUrl):
"""
Fake model defining ``get_absolute_url`` for
ContentTypesTests.test_shortcut_view().
"""
def get_absolute_url(self):
return "/users/%s/" % urlquote(self.name)
class FooWithBrokenAbsoluteUrl(FooWithoutUrl):
"""
Fake model defining a ``get_absolute_url`` method containing an error
"""
def get_absolute_url(self):
return "/users/%s/" % self.unknown_field
| 23.590909 | 73 | 0.716763 | 125 | 1,038 | 5.704 | 0.44 | 0.092567 | 0.117812 | 0.067321 | 0.333801 | 0.255259 | 0.255259 | 0.255259 | 0.162693 | 0 | 0 | 0.007092 | 0.184971 | 1,038 | 43 | 74 | 24.139535 | 0.835697 | 0.257225 | 0 | 0.105263 | 0 | 0 | 0.027894 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.157895 | false | 0 | 0.157895 | 0.157895 | 0.894737 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 2 |
a174c86a4c793d497c49fdd9127b5aea515b4346 | 400 | py | Python | utils/middleware.py | DavidRoldan523/elenas_test | 8b520fae68a275654a42ad761713c9c932d17a76 | [
"MIT"
] | null | null | null | utils/middleware.py | DavidRoldan523/elenas_test | 8b520fae68a275654a42ad761713c9c932d17a76 | [
"MIT"
] | null | null | null | utils/middleware.py | DavidRoldan523/elenas_test | 8b520fae68a275654a42ad761713c9c932d17a76 | [
"MIT"
] | null | null | null | from django.http import HttpResponse
from django.utils.deprecation import MiddlewareMixin
class HealthCheckMiddleware:
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request):
if request.META["PATH_INFO"] == "/health-check/":
return HttpResponse("ok")
response = self.get_response(request)
return response | 28.571429 | 57 | 0.7 | 44 | 400 | 6.068182 | 0.568182 | 0.164794 | 0.168539 | 0.172285 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.2125 | 400 | 14 | 58 | 28.571429 | 0.847619 | 0 | 0 | 0 | 0 | 0 | 0.062344 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.2 | 0 | 0.7 | 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 |
a17ef045f77adc98f9fc666a8b89d72884c7ebf6 | 287 | py | Python | tests/test_vsan/vars.py | wardy3/mdssdk | 393102fab146917a3893b6aa2bd6a0449ad491c5 | [
"Apache-2.0"
] | 4 | 2020-12-13T20:02:43.000Z | 2022-02-27T23:36:58.000Z | tests/test_vsan/vars.py | wardy3/mdssdk | 393102fab146917a3893b6aa2bd6a0449ad491c5 | [
"Apache-2.0"
] | 13 | 2020-09-23T07:30:15.000Z | 2022-03-30T01:12:25.000Z | tests/test_vsan/vars.py | wardy3/mdssdk | 393102fab146917a3893b6aa2bd6a0449ad491c5 | [
"Apache-2.0"
] | 12 | 2020-05-11T09:33:21.000Z | 2022-03-18T11:11:28.000Z | import logging
import random
log = logging.getLogger(__name__)
reserved_id = [4079, 4094]
boundary_id = [0, 4095]
# No need to have end=4094 as there are some inbetween vsans reserved for fport-channel-trunk
def get_random_id(start=2, end=400):
return random.randint(start, end)
| 22.076923 | 93 | 0.756098 | 46 | 287 | 4.543478 | 0.76087 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.08642 | 0.15331 | 287 | 12 | 94 | 23.916667 | 0.773663 | 0.317073 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.285714 | 0.142857 | 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 | 0 | 1 | 1 | 0 | 0 | 2 |
a18f308a306f458e03d32285aa21896641d7fc85 | 400 | py | Python | stackoverflow/venv/lib/python3.6/site-packages/scrapy/utils/markup.py | zhi-xianwei/learn_python3_spider | a3301f8112e4ded25c3578162db8c6a263a0693b | [
"MIT"
] | 9,953 | 2019-04-03T23:41:04.000Z | 2022-03-31T11:54:44.000Z | stackoverflow/venv/lib/python3.6/site-packages/scrapy/utils/markup.py | W4LKURE/learn_python3_spider | 98dd354a41598b31302641f9a0ea49d1ecfa0fb1 | [
"MIT"
] | 44 | 2019-05-27T10:59:29.000Z | 2022-03-31T14:14:29.000Z | stackoverflow/venv/lib/python3.6/site-packages/scrapy/utils/markup.py | W4LKURE/learn_python3_spider | 98dd354a41598b31302641f9a0ea49d1ecfa0fb1 | [
"MIT"
] | 2,803 | 2019-04-06T13:15:33.000Z | 2022-03-31T07:42:01.000Z | """
Transitional module for moving to the w3lib library.
For new code, always import from w3lib.html instead of this module
"""
import warnings
from scrapy.exceptions import ScrapyDeprecationWarning
from w3lib.html import *
warnings.warn("Module `scrapy.utils.markup` is deprecated. "
"Please import from `w3lib.html` instead.",
ScrapyDeprecationWarning, stacklevel=2) | 28.571429 | 66 | 0.7375 | 48 | 400 | 6.145833 | 0.604167 | 0.091525 | 0.132203 | 0.128814 | 0.176271 | 0 | 0 | 0 | 0 | 0 | 0 | 0.015337 | 0.185 | 400 | 14 | 67 | 28.571429 | 0.889571 | 0.3 | 0 | 0 | 0 | 0 | 0.307692 | 0.076923 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.666667 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
a1a9b8f9731ec54e8ec54f439eb2503d5d2d061e | 961 | py | Python | test/test_host.py | waylonwang/pure-python-adb | 417539119611f93cf079a7d0e05e575df3e3446e | [
"MIT"
] | null | null | null | test/test_host.py | waylonwang/pure-python-adb | 417539119611f93cf079a7d0e05e575df3e3446e | [
"MIT"
] | null | null | null | test/test_host.py | waylonwang/pure-python-adb | 417539119611f93cf079a7d0e05e575df3e3446e | [
"MIT"
] | 1 | 2020-10-08T10:18:13.000Z | 2020-10-08T10:18:13.000Z | def test_list_devices(client):
devices = client.devices()
assert len(devices) > 0
assert any(map(lambda device: device.serial == "emulator-5554", devices))
def test_list_devices_by_state(client):
devices = client.devices(client.BOOTLOADER)
assert len(devices) == 0
devices = client.devices(client.OFFLINE)
assert len(devices) == 0
devices = client.devices(client.DEVICE)
assert len(devices) == 1
def test_version(client):
version = client.version()
assert type(version) == int
assert version != 0
def test_list_forward(client, device):
client.killforward_all()
result = client.list_forward()
assert not result
device.forward("tcp:6000", "tcp:6000")
result = client.list_forward()
assert result["emulator-5554"]["tcp:6000"] == "tcp:6000"
client.killforward_all()
result = client.list_forward()
assert not result
def test_features(client):
assert client.features()
| 25.289474 | 77 | 0.689906 | 121 | 961 | 5.355372 | 0.256198 | 0.160494 | 0.154321 | 0.160494 | 0.356481 | 0.311728 | 0.311728 | 0.311728 | 0.179012 | 0.179012 | 0 | 0.037132 | 0.187305 | 961 | 37 | 78 | 25.972973 | 0.792574 | 0 | 0 | 0.333333 | 0 | 0 | 0.060354 | 0 | 0 | 0 | 0 | 0 | 0.407407 | 1 | 0.185185 | false | 0 | 0 | 0 | 0.185185 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
a1aa7f5e730996934c8876a85b426f2a47d1eacc | 799 | py | Python | appengine/experimental/crbadge/testdata/upload.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/experimental/crbadge/testdata/upload.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/experimental/crbadge/testdata/upload.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
import os, sys
import optparse
import json, urllib
import httplib2
import urlparse
def upload(filenames, url, password):
parsed = urlparse.urlparse(url)
http = httplib2.Http()
for filename in filenames:
with open(filename) as f:
# Load and validate JSON
o = json.load(f)
s = json.dumps(o)
resp, cont = http.request(url, method='POST', body=urllib.urlencode(
{'data': s, 'password': password}))
print 'sent data to %s' % url
print 'response (%s): %s: %s' % (resp['status'], resp, cont)
def main():
parser = optparse.OptionParser()
parser.add_option('-u', '--url')
parser.add_option('-p', '--password')
options, args = parser.parse_args()
upload(args, options.url, options.password)
if __name__ == '__main__':
main()
| 22.828571 | 72 | 0.649562 | 107 | 799 | 4.747664 | 0.523364 | 0.031496 | 0.059055 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.003106 | 0.193992 | 799 | 34 | 73 | 23.5 | 0.785714 | 0.048811 | 0 | 0 | 0 | 0 | 0.112285 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.166667 | 0.208333 | null | null | 0.083333 | 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 |
a1ade519e607956e6b09f57c472fa7d337099ebf | 138 | py | Python | goldmeister/__init__.py | USDA-ARS-NWRC/goldmeister | b4624a355e551c4610834a9dcb971524c45bb437 | [
"CC0-1.0"
] | null | null | null | goldmeister/__init__.py | USDA-ARS-NWRC/goldmeister | b4624a355e551c4610834a9dcb971524c45bb437 | [
"CC0-1.0"
] | 1 | 2020-09-17T16:16:13.000Z | 2020-09-17T16:21:00.000Z | goldmeister/__init__.py | USDA-ARS-NWRC/goldmeister | b4624a355e551c4610834a9dcb971524c45bb437 | [
"CC0-1.0"
] | null | null | null | """Top-level package for Goldmeister."""
__author__ = """Micah Johnson"""
__email__ = 'micah.johnson150@gmail.com'
__version__ = '0.2.0'
| 23 | 40 | 0.702899 | 17 | 138 | 5 | 0.882353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.04878 | 0.108696 | 138 | 5 | 41 | 27.6 | 0.642276 | 0.246377 | 0 | 0 | 0 | 0 | 0.44898 | 0.265306 | 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 |
a1b1b372ea41556cd122b9d3a8b1aaadf901cbd1 | 1,956 | py | Python | uvicore/http/OBSOLETE/routes-OLD.py | coboyoshi/uvicore | 9cfdeeac83000b156fe48f068b4658edaf51c8de | [
"MIT"
] | 11 | 2021-03-22T22:07:49.000Z | 2022-03-08T16:18:33.000Z | uvicore/http/OBSOLETE/routes-OLD.py | coboyoshi/uvicore | 9cfdeeac83000b156fe48f068b4658edaf51c8de | [
"MIT"
] | 12 | 2021-03-04T05:51:24.000Z | 2021-09-22T05:16:18.000Z | uvicore/http/OBSOLETE/routes-OLD.py | coboyoshi/uvicore | 9cfdeeac83000b156fe48f068b4658edaf51c8de | [
"MIT"
] | 2 | 2021-03-25T14:49:56.000Z | 2021-11-17T23:20:29.000Z |
# @uvicore.service()
# class Routes(RoutesInterface, Generic[R]):
# endpoints: str = None
# @property
# def app(self) -> ApplicationInterface:
# return self._app
# @property
# def package(self) -> PackageInterface:
# return self._package
# @property
# def Router(self) -> R:
# return self._Router
# @property
# def prefix(self) -> str:
# return self._prefix
# def __init__(self,
# app: ApplicationInterface,
# package: PackageInterface,
# Router: R,
# prefix: str
# ):
# self._app = app
# self._package = package
# self._Router = Router
# self._prefix = prefix
# def new_router(self):
# router = self.Router()
# # Add route context into Router
# router.uvicore = Dict({
# 'prefix': self.prefix,
# 'endpoints': self.endpoints,
# })
# return router
# def include(self, module, *, prefix: str = '', tags: List[str] = None) -> None:
# #self.http.controller(controller.route, prefix=self.prefix)
# if type(module) == str:
# # Using a string to point to an endpoint class controller
# controller = load(self.endpoints + '.' + module + '.route')
# uvicore.app.http.include_router(
# controller.object,
# prefix=self.prefix + str(prefix),
# tags=tags,
# )
# else:
# # Passing in an actual router class
# uvicore.app.http.include_router(
# module,
# prefix=self.prefix + str(prefix),
# tags=tags,
# )
# # def Router(self) -> R:
# # return self._Router()
# # IoC Class Instance
# #Routes: RoutesInterface = uvicore.ioc.make('Routes', _Routes)
# # Public API for import * and doc gens
# #__all__ = ['Routes', '_Routes']
| 25.736842 | 85 | 0.528119 | 188 | 1,956 | 5.37766 | 0.31383 | 0.059347 | 0.063304 | 0.027695 | 0.178042 | 0.124629 | 0.124629 | 0 | 0 | 0 | 0 | 0 | 0.345092 | 1,956 | 75 | 86 | 26.08 | 0.789227 | 0.927403 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
a1b77cdc1daef2b3d3ed0cc366bb55bdefa74e68 | 1,670 | py | Python | hard-gists/7880c101557297beeccda05978aeb278/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 21 | 2019-07-08T08:26:45.000Z | 2022-01-24T23:53:25.000Z | hard-gists/7880c101557297beeccda05978aeb278/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 5 | 2019-06-15T14:47:47.000Z | 2022-02-26T05:02:56.000Z | hard-gists/7880c101557297beeccda05978aeb278/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 17 | 2019-05-16T03:50:34.000Z | 2021-01-14T14:35:12.000Z | # Example of use of Afanasy's API to generate a summary of the state of the
# render farm.
# Copyright (c) 2016 rise|fx (Elie Michel) - Released under MIT License
import af
cmd = af.Cmd()
def isSysJob(job):
return job['st'] == 0
## Jobs ##
joblist = cmd.getJobList()
job_state_counters = {}
job_count = 0
for job in joblist:
if isSysJob(job):
continue
job_count += 1
for s in job['state'].split():
job_state_counters[s] = job_state_counters.get(s, 0) + 1
print("Out of %d jobs:" % job_count)
print(" * %d are running" % job_state_counters.get('RUN', 0))
print(" * %d have error" % job_state_counters.get('ERR', 0))
print(" * %d are skipped" % job_state_counters.get('SKP', 0))
print(" * %d are off" % job_state_counters.get('OFF', 0))
print(" * %d are ready" % job_state_counters.get('RDY', 0))
print(" * %d are done" % job_state_counters.get('DON', 0))
# Note that the sum may exceed the total number of jobs because a job can have
# several states
print("")
## Renders ##
renderlist = cmd.renderGetList()
render_state_counts = {}
for render in renderlist:
for s in render['state'].split():
render_state_counts[s] = render_state_counts.get(s, 0) + 1
print("Out of %d renders:" % len(renderlist))
print(" * %d are online" % render_state_counts.get('ONL', 0))
print(" * %d are offline" % render_state_counts.get('OFF', 0))
print(" * %d are nimby" % render_state_counts.get('NBY', 0))
print(" * %d are running" % render_state_counts.get('RUN', 0))
print(" * %d are dirty" % render_state_counts.get('DRT', 0))
# Note that the sum may exceed the total number of renders because a render can
# have several states
| 28.305085 | 79 | 0.669461 | 268 | 1,670 | 4.033582 | 0.317164 | 0.061055 | 0.083256 | 0.074006 | 0.159112 | 0.13506 | 0.105458 | 0.105458 | 0.074006 | 0.074006 | 0 | 0.016047 | 0.179042 | 1,670 | 58 | 80 | 28.793103 | 0.772429 | 0.216168 | 0 | 0 | 1 | 0 | 0.193498 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.03125 | false | 0 | 0.03125 | 0.03125 | 0.09375 | 0.4375 | 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 | 0 | 1 | 0 | 2 |
a1be04a80f83b1938545b09a34c0a9a1cda47ace | 1,285 | py | Python | server/newsWebsite/models.py | thiagobrez/newsWebsite | 130f01d29dd776eaa096080982274bb27d19ad8f | [
"MIT"
] | null | null | null | server/newsWebsite/models.py | thiagobrez/newsWebsite | 130f01d29dd776eaa096080982274bb27d19ad8f | [
"MIT"
] | 7 | 2020-09-07T18:44:00.000Z | 2022-02-10T19:05:41.000Z | server/newsWebsite/models.py | thiagobrez/newsWebsite | 130f01d29dd776eaa096080982274bb27d19ad8f | [
"MIT"
] | null | null | null | from django.db import models
def picture_upload_path(instance, filename):
# file will be saved at <MEDIA_ROOT>/authorPictures/<filename>
return 'authorPictures/{0}'.format(filename)
def hero_upload_path(instance, filename):
# file will be saved at <MEDIA_ROOT>/heroImages/<filename>
return 'heroImages/{0}'.format(filename)
class Subject(models.Model):
name = models.CharField(max_length=200)
color = models.CharField(max_length=10)
def __str__(self):
return self.name
class Author(models.Model):
name = models.CharField(max_length=200, unique=True)
picture = models.ImageField(upload_to=picture_upload_path, default='authorPictures/default_author.png')
def __str__(self):
return self.name
class Article(models.Model):
title = models.CharField(max_length=200)
slug = models.SlugField(max_length=500)
author = models.ForeignKey(Author, on_delete=models.CASCADE)
subject = models.ForeignKey(Subject, on_delete=models.CASCADE)
heroImage = models.ImageField(upload_to=hero_upload_path, blank=True, max_length=500, default='heroImages/default_article.png')
publishDate = models.DateTimeField('Publish date')
text = models.TextField(blank=True)
def __str__(self):
return self.title
| 31.341463 | 131 | 0.737743 | 164 | 1,285 | 5.573171 | 0.365854 | 0.059081 | 0.078775 | 0.105033 | 0.320569 | 0.269147 | 0.269147 | 0.205689 | 0.113786 | 0.113786 | 0 | 0.017447 | 0.152529 | 1,285 | 40 | 132 | 32.125 | 0.821855 | 0.091051 | 0 | 0.2 | 0 | 0 | 0.091845 | 0.054077 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.04 | 0.2 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 2 |
a1c2d77e61f6bdb0c438878369cd53216104adca | 365 | py | Python | Mundo2/lerSexo.py | DanieleMagalhaes/Exercicios-Python | 394c68e8f06a10ec16539addd888960d11d1318f | [
"MIT"
] | null | null | null | Mundo2/lerSexo.py | DanieleMagalhaes/Exercicios-Python | 394c68e8f06a10ec16539addd888960d11d1318f | [
"MIT"
] | null | null | null | Mundo2/lerSexo.py | DanieleMagalhaes/Exercicios-Python | 394c68e8f06a10ec16539addd888960d11d1318f | [
"MIT"
] | null | null | null | print('-'*60)
print('\33[35m[ F ] Feminino\33[m \n\33[32m[ M ] Masculino\33[m \n ')
sexo = str(input('Qual o seu sexo? ')).strip().upper()[0] # só pega a primeira letra
while sexo not in 'MF':
sexo = str(input('\33[31mDados inválidos.\33[m Por favor, informe seu sexo: ')).strip().upper()[0]
print('\nSexo {} registrado com sucesso!'.format(sexo))
print('-'*60) | 52.142857 | 102 | 0.641096 | 62 | 365 | 3.774194 | 0.612903 | 0.038462 | 0.034188 | 0.145299 | 0.153846 | 0 | 0 | 0 | 0 | 0 | 0 | 0.07571 | 0.131507 | 365 | 7 | 103 | 52.142857 | 0.662461 | 0.065753 | 0 | 0.285714 | 0 | 0.142857 | 0.505882 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.571429 | 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 |
a1c9ea67f9a8ebf42ecee72115e10b2677436a17 | 216 | py | Python | awesimsoss/__init__.py | spacetelescope/AWESim_SOSS | 75669276bd8ce22bc86d6845c771964ffec94d07 | [
"MIT"
] | 4 | 2019-12-17T19:04:25.000Z | 2020-09-22T15:53:09.000Z | awesimsoss/__init__.py | spacetelescope/awesimsoss | 75669276bd8ce22bc86d6845c771964ffec94d07 | [
"MIT"
] | 94 | 2018-10-17T18:03:57.000Z | 2021-03-01T07:34:21.000Z | awesimsoss/__init__.py | spacetelescope/awesimsoss | 75669276bd8ce22bc86d6845c771964ffec94d07 | [
"MIT"
] | 8 | 2018-10-17T20:45:49.000Z | 2021-04-14T11:41:41.000Z | # -*- coding: utf-8 -*-
"""Top-level package for awesimsoss."""
__author__ = """Joe Filippazzo"""
__email__ = 'jfilippazzo@stsci.edu'
__version__ = '0.3.5'
from .awesim import TSO, TestTSO, BlackbodyTSO, ModelTSO
| 21.6 | 56 | 0.689815 | 26 | 216 | 5.269231 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.02139 | 0.134259 | 216 | 9 | 57 | 24 | 0.71123 | 0.259259 | 0 | 0 | 0 | 0 | 0.25974 | 0.136364 | 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 |
a1cbe0620d09eccc4613b82d60775050479f1c1b | 6,565 | py | Python | keyboards/inline/in_processing/keyboards_sum_ready.py | itcosplay/cryptobot | 6890cfde64a631bf0e4db55f6873a2217212d801 | [
"MIT"
] | null | null | null | keyboards/inline/in_processing/keyboards_sum_ready.py | itcosplay/cryptobot | 6890cfde64a631bf0e4db55f6873a2217212d801 | [
"MIT"
] | null | null | null | keyboards/inline/in_processing/keyboards_sum_ready.py | itcosplay/cryptobot | 6890cfde64a631bf0e4db55f6873a2217212d801 | [
"MIT"
] | null | null | null |
from data import all_emoji
from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
from aiogram.utils.callback_data import CallbackData
from data import all_emoji
from utils.googlesheets import send_to_google
from utils.set_minus_and_plus_currences import set_minus_and_plus
from utils.get_minuses_sum_FGH import get_minus_FGH
from utils.get_values_FGH_MNO import get_plus_FGH
cb_what_sum = CallbackData('cb_ws', 'type_btn')
def create_kb_what_sum():
keyboard = InlineKeyboardMarkup()
keyboard.add (
InlineKeyboardButton (
text = 'скорректировать',
callback_data = cb_what_sum.new(type_btn='correct_sum')
)
)
keyboard.add (
InlineKeyboardButton (
text = 'подтвердить',
callback_data = cb_what_sum.new(type_btn='confirm_sum')
)
)
keyboard.add (
InlineKeyboardButton (
text = 'вернуться к заявке',
callback_data = cb_what_sum.new(type_btn='back_to_chosen_request')
)
)
back__main_menu = all_emoji['back__main_menu']
keyboard.add (
InlineKeyboardButton (
text=f'назад {back__main_menu} главное меню',
callback_data=cb_what_sum.new (
type_btn='back_main_menu'
)
)
)
return keyboard
cb_choose_currency = CallbackData('anprix', 'curr', 'type_btn')
def create_kb_choose_currency_processing(request):
emo_snail = all_emoji['back__main_menu']
# добавляет плюсы и оставляет минусы если операция - обмен
if request[3] == 'обмен':
if not request[5] == '0':
rub = request[5]
rub = str(rub)
if rub[0] != '-': rub = '+' + rub + ' ₽'
else: rub = rub + ' ₽'
else: rub = ''
if not request[6] == '0':
usd = request[6]
usd = str(usd)
if usd[0] != '-': usd = '+' + usd + ' $'
else: usd = usd + ' $'
else: usd = ''
if not request[7] == '0':
eur = request[7]
eur = str(eur)
if eur[0] != '-': eur = '+' + eur + ' €'
else: eur = eur + ' €'
else: eur = ''
else:
if not request[5] == '0':
rub = request[5]
rub = str(rub)
if rub[0] == '-': rub = rub[1:] + ' ₽'
else: rub = rub + ' ₽'
else: rub = ''
if not request[6] == '0':
usd = request[6]
usd = str(usd)
if usd[0] == '-': usd = usd[1:] + ' $'
else: usd = usd + ' $'
else: usd = ''
if not request[7] == '0':
eur = request[7]
eur = str(eur)
if eur[0] == '-': eur = eur[1:] + ' €'
else: eur = eur + ' €'
else: eur = ''
keyboard = InlineKeyboardMarkup()
if not request[5] == '0':
keyboard.add (
InlineKeyboardButton (
text = '{}'.format(rub),
callback_data = cb_choose_currency.new(curr='rub', type_btn='change_curr')
)
)
if not request[6] == '0':
keyboard.add (
InlineKeyboardButton (
text = '{}'.format(usd),
callback_data = cb_choose_currency.new(curr='usd', type_btn='change_curr')
)
)
if not request[7] == '0':
keyboard.add (
InlineKeyboardButton (
text = '{}'.format(eur),
callback_data = cb_choose_currency.new(curr='eur', type_btn='change_curr')
)
)
keyboard.add (
InlineKeyboardButton (
text=f'назад {emo_snail} главное меню',
callback_data=cb_choose_currency.new (
curr='-',
type_btn='back_main_menu'
)
)
)
return keyboard
cb_what_sum_correct = CallbackData('cbwsc', 'curr', 'type_btn')
def create_kb_what_sum_correct(request):
keyboard = InlineKeyboardMarkup()
rub, usd, eur = get_minus_FGH(request)
if rub != '':
keyboard.add (
InlineKeyboardButton (
text=rub,
callback_data = cb_what_sum_correct.new (
curr='rub',
type_btn='change_curr'
)
)
)
if usd != '':
keyboard.add (
InlineKeyboardButton (
text=usd,
callback_data = cb_what_sum_correct.new (
curr='usd',
type_btn='change_curr'
)
)
)
if eur != '':
keyboard.add (
InlineKeyboardButton (
text=eur,
callback_data = cb_what_sum_correct.new (
curr='eur',
type_btn='change_curr'
)
)
)
emo_snail = all_emoji['back__main_menu']
keyboard.add (
InlineKeyboardButton (
text=f'назад {emo_snail} главное меню',
callback_data=cb_what_sum_correct.new (
curr='-',
type_btn='back_main_menu'
)
)
)
return keyboard
cb_sum_correct_chunk = CallbackData('cbscc', 'curr', 'type_btn')
def create_kb_sum_correct_chunk(request):
keyboard = InlineKeyboardMarkup()
rub, usd, eur = get_plus_FGH(request)
if rub != '':
keyboard.add (
InlineKeyboardButton (
text=rub,
callback_data = cb_sum_correct_chunk.new (
curr='rub',
type_btn='change_curr'
)
)
)
if usd != '':
keyboard.add (
InlineKeyboardButton (
text=usd,
callback_data = cb_sum_correct_chunk.new (
curr='usd',
type_btn='change_curr'
)
)
)
if eur != '':
keyboard.add (
InlineKeyboardButton (
text=eur,
callback_data = cb_sum_correct_chunk.new (
curr='eur',
type_btn='change_curr'
)
)
)
emo_snail = all_emoji['back__main_menu']
keyboard.add (
InlineKeyboardButton (
text=f'назад {emo_snail} главное меню',
callback_data=cb_sum_correct_chunk.new (
curr='-',
type_btn='back_main_menu'
)
)
)
return keyboard | 26.795918 | 90 | 0.493374 | 659 | 6,565 | 4.657056 | 0.138088 | 0.045617 | 0.161616 | 0.18247 | 0.76507 | 0.735419 | 0.661779 | 0.542522 | 0.457804 | 0.421962 | 0 | 0.00859 | 0.397106 | 6,565 | 245 | 91 | 26.795918 | 0.76478 | 0.00853 | 0 | 0.594059 | 0 | 0 | 0.088674 | 0.003381 | 0.014851 | 0 | 0 | 0 | 0 | 1 | 0.019802 | false | 0 | 0.039604 | 0 | 0.079208 | 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.