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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7fc0d9e0ba6c94d04b71aaa66f9e7f224d0824ac
| 166
|
py
|
Python
|
apps/models/__init__.py
|
tao323/LittleScheduler
|
0507f6d5d4cdd41208af4bd856cc72bc6cfcc3ce
|
[
"Apache-2.0"
] | null | null | null |
apps/models/__init__.py
|
tao323/LittleScheduler
|
0507f6d5d4cdd41208af4bd856cc72bc6cfcc3ce
|
[
"Apache-2.0"
] | null | null | null |
apps/models/__init__.py
|
tao323/LittleScheduler
|
0507f6d5d4cdd41208af4bd856cc72bc6cfcc3ce
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
from forms import LoginForm, TaskForm
from models import User, Task, TaskLog
__all__ = ['LoginForm', 'User', 'Task', 'TaskLog', 'TaskForm']
| 23.714286
| 62
| 0.674699
| 20
| 166
| 5.4
| 0.65
| 0.148148
| 0.277778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007092
| 0.150602
| 166
| 6
| 63
| 27.666667
| 0.758865
| 0.126506
| 0
| 0
| 0
| 0
| 0.223776
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
7ff937ac5c62406e44031910d9e57bfeee24c53c
| 2,607
|
py
|
Python
|
tests/test_cube.py
|
pikesley/queube
|
d5d8e068e0c1f951f03a4794ca52b68eeeb10e04
|
[
"MIT"
] | null | null | null |
tests/test_cube.py
|
pikesley/queube
|
d5d8e068e0c1f951f03a4794ca52b68eeeb10e04
|
[
"MIT"
] | null | null | null |
tests/test_cube.py
|
pikesley/queube
|
d5d8e068e0c1f951f03a4794ca52b68eeeb10e04
|
[
"MIT"
] | null | null | null |
from unittest import TestCase
from cube import Cube, flatten, reorder
class TestCube(TestCase):
"""Test the Cube."""
def test_constructor(self):
"""Test it gets the right data."""
cube = Cube()
self.assertEqual(cube.grid, [(0, 0, 0)] * 27)
def test_data_parsing(self):
"""Test it correctly locates the lights."""
cube = Cube()
data = [
[
[[0, 0, 0], [0, 0, 0], [0, 0, 0]],
[[0, 0, 0], [0, 0, 0], [0, 0, 0]],
[[0, 0, 0], [0, 0, 0], [255, 0, 0]],
],
[
[[0, 0, 0], [0, 255, 0], [0, 0, 0]],
[[0, 0, 0], [0, 255, 0], [0, 0, 0]],
[[0, 0, 0], [0, 255, 0], [0, 0, 0]],
],
[
[[0, 0, 0], [0, 0, 0], [0, 0, 0]],
[[255, 0, 0], [0, 0, 0], [0, 0, 0]],
[[0, 0, 0], [0, 0, 0], [0, 0, 0]],
],
]
cube.display(data)
self.assertEqual(
cube.grid,
[
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[255, 0, 0],
[0, 0, 0],
[0, 255, 0],
[0, 0, 0],
[0, 0, 0],
[0, 255, 0],
[0, 0, 0],
[0, 0, 0],
[0, 255, 0],
[0, 0, 0],
[0, 0, 0],
[255, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
],
)
def test_flattening():
"""Test it flattens the 3x3x3 lists into a single list."""
data = [[["foo", "bar", "baz"], [1, 2, 3], [True, False, None]]]
assert flatten(data) == ["foo", "bar", "baz", 1, 2, 3, True, False, None]
def test_reorder():
"""Test it reorders a list."""
data = list(
map(lambda x: chr(x + 32), range(27))
) # the first 27 printable ASCII chars
assert reorder(data) == [
" ",
"#",
"&",
"'",
"$",
"!",
'"',
"%",
"(",
"1",
"0",
"/",
",",
"-",
".",
"+",
"*",
")",
"2",
"5",
"8",
"9",
"6",
"3",
"4",
"7",
":",
]
| 23.917431
| 77
| 0.272344
| 291
| 2,607
| 2.42268
| 0.216495
| 0.402837
| 0.548936
| 0.658156
| 0.409929
| 0.409929
| 0.409929
| 0.340426
| 0.340426
| 0.340426
| 0
| 0.169329
| 0.519755
| 2,607
| 108
| 78
| 24.138889
| 0.39377
| 0.074799
| 0
| 0.425532
| 0
| 0
| 0.01886
| 0
| 0
| 0
| 0
| 0
| 0.042553
| 1
| 0.042553
| false
| 0
| 0.021277
| 0
| 0.074468
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 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
| 5
|
e9e3f87527e53012221e8741bd22658040c0ff19
| 43
|
py
|
Python
|
hello.py
|
flyingdragonfly/hello-world
|
b584b52a2261397d00144eb2a72e0294602842d4
|
[
"Apache-2.0"
] | null | null | null |
hello.py
|
flyingdragonfly/hello-world
|
b584b52a2261397d00144eb2a72e0294602842d4
|
[
"Apache-2.0"
] | 1
|
2022-01-11T21:21:38.000Z
|
2022-01-11T21:21:38.000Z
|
hello.py
|
flyingdragonfly/hello-world
|
b584b52a2261397d00144eb2a72e0294602842d4
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/python3
print("Hello, world!")
| 10.75
| 22
| 0.651163
| 6
| 43
| 4.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025641
| 0.093023
| 43
| 3
| 23
| 14.333333
| 0.692308
| 0.395349
| 0
| 0
| 0
| 0
| 0.52
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
18013df847e7c838bf9d98347e766ff96907724a
| 133
|
py
|
Python
|
napari/_qt/tree/__init__.py
|
Zac-HD/napari
|
102a7e8f845893c874d2b86f9371d41130100b89
|
[
"BSD-3-Clause"
] | null | null | null |
napari/_qt/tree/__init__.py
|
Zac-HD/napari
|
102a7e8f845893c874d2b86f9371d41130100b89
|
[
"BSD-3-Clause"
] | null | null | null |
napari/_qt/tree/__init__.py
|
Zac-HD/napari
|
102a7e8f845893c874d2b86f9371d41130100b89
|
[
"BSD-3-Clause"
] | null | null | null |
from .qt_tree_model import QtNodeTreeModel
from .qt_tree_view import QtNodeTreeView
__all__ = ['QtNodeTreeModel', 'QtNodeTreeView']
| 26.6
| 47
| 0.827068
| 15
| 133
| 6.8
| 0.6
| 0.117647
| 0.196078
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.097744
| 133
| 4
| 48
| 33.25
| 0.85
| 0
| 0
| 0
| 0
| 0
| 0.218045
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
180ddb2a85cecdc6e51167bac1160ab0e50cda5d
| 168
|
py
|
Python
|
tests/test_web_site_kripta.py
|
krypta-oficial/web-site-krypta
|
a9b0ee3e098b4c4b89a1cad12a9d7fb04a350856
|
[
"MIT"
] | 1
|
2021-10-29T22:03:07.000Z
|
2021-10-29T22:03:07.000Z
|
tests/test_web_site_kripta.py
|
MarianoTupa/web-site-krypta
|
a9b0ee3e098b4c4b89a1cad12a9d7fb04a350856
|
[
"MIT"
] | null | null | null |
tests/test_web_site_kripta.py
|
MarianoTupa/web-site-krypta
|
a9b0ee3e098b4c4b89a1cad12a9d7fb04a350856
|
[
"MIT"
] | null | null | null |
"""Tests For Flask-App Web Site"""
def test_app_name(app_instance):
"""Test application name"""
assert app_instance.name == "web_site_kripta.web_site_kripta"
| 24
| 65
| 0.72619
| 25
| 168
| 4.56
| 0.52
| 0.184211
| 0.22807
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 168
| 6
| 66
| 28
| 0.791667
| 0.297619
| 0
| 0
| 0
| 0
| 0.28972
| 0.28972
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0.5
| false
| 0
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
18318cef9746f22562a9d129cb3da5fe1ef4fd14
| 914
|
py
|
Python
|
tests/__init__.py
|
aroig/nnutil
|
88df41ee89f592a28c1661ee8837dd8e8ca42cf3
|
[
"BSD-3-Clause"
] | null | null | null |
tests/__init__.py
|
aroig/nnutil
|
88df41ee89f592a28c1661ee8837dd8e8ca42cf3
|
[
"BSD-3-Clause"
] | null | null | null |
tests/__init__.py
|
aroig/nnutil
|
88df41ee89f592a28c1661ee8837dd8e8ca42cf3
|
[
"BSD-3-Clause"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# nnutil - Neural network utilities for tensorflow
# Copyright (c) 2018, Abdó Roig-Maranges <abdo.roig@gmail.com>
#
# This file is part of 'nnutil'.
#
# This file may be modified and distributed under the terms of the 3-clause BSD
# license. See the LICENSE file for details.
from .dataset_interleave import *
from .dataset_labelled import *
from .dataset_merge import *
from .dataset_parse_json import *
from .dataset_partition import *
from .dataset_random import *
from .dataset_image_files import *
from .dataset_text_files import *
from .dataset_json_files import *
from .dataset_attach_image import *
from .dataset_mutate_image import *
from .dataset_mutate_window import *
from .layers_reshape import *
from .layers_segment import *
from .layers_residual import *
from .layers_cylinder import *
from .util_slice_axis import *
from .image_rasterize import *
| 29.483871
| 79
| 0.777899
| 131
| 914
| 5.229008
| 0.503817
| 0.248175
| 0.272993
| 0.09635
| 0.081752
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007643
| 0.141138
| 914
| 30
| 80
| 30.466667
| 0.864968
| 0.332604
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a1225976468e815536345dffda5c396289fd53c5
| 517
|
py
|
Python
|
nsga2/metrics/problems/zdt.py
|
kadriand/aspen-optimization-nsga2
|
af8a16670413422adc9858e4f139028666ddb012
|
[
"MIT"
] | 6
|
2017-12-14T09:18:11.000Z
|
2022-03-29T10:45:15.000Z
|
nsga2/metrics/problems/zdt.py
|
rockming/aspen-optimization-nsga2
|
af8a16670413422adc9858e4f139028666ddb012
|
[
"MIT"
] | null | null | null |
nsga2/metrics/problems/zdt.py
|
rockming/aspen-optimization-nsga2
|
af8a16670413422adc9858e4f139028666ddb012
|
[
"MIT"
] | 4
|
2018-11-07T21:34:15.000Z
|
2021-09-28T12:55:44.000Z
|
from nsga2.metrics.hvr import HVR, HV
class ZDT1Metrics():
def HV(self, front):
return HV([11, 11])(front)
def HVR(self, front):
return HVR([11, 11], 120 + 2/3)(front)
class ZDT2Metrics():
def HV(self, front):
return HV([11, 11])(front)
def HVR(self, front):
return HVR([11, 11], 120 + 1/3)(front)
class ZDT3Metrics():
def HV(self, front):
return HV([11, 11])(front)
def HVR(self, front):
return HVR([11, 11], 128.77811613069076060)(front)
| 23.5
| 58
| 0.580271
| 75
| 517
| 4
| 0.28
| 0.18
| 0.3
| 0.14
| 0.61
| 0.61
| 0.61
| 0.61
| 0.61
| 0.61
| 0
| 0.150259
| 0.253385
| 517
| 22
| 58
| 23.5
| 0.626943
| 0
| 0
| 0.5625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.375
| false
| 0
| 0.0625
| 0.375
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
a1261b3b0866326dfb7cb19ae6868404820e33d0
| 46
|
py
|
Python
|
tests/__init__.py
|
ValletRomain/python_magnetgeo
|
d2f1eca5deb79b2caf3673e59a5ec87644511d91
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
ValletRomain/python_magnetgeo
|
d2f1eca5deb79b2caf3673e59a5ec87644511d91
|
[
"MIT"
] | 2
|
2021-11-15T13:54:15.000Z
|
2021-11-16T16:24:10.000Z
|
tests/__init__.py
|
ValletRomain/python_magnetgeo
|
d2f1eca5deb79b2caf3673e59a5ec87644511d91
|
[
"MIT"
] | 1
|
2021-11-02T10:23:03.000Z
|
2021-11-02T10:23:03.000Z
|
"""Unit test package for python_magnetgeo."""
| 23
| 45
| 0.73913
| 6
| 46
| 5.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108696
| 46
| 1
| 46
| 46
| 0.804878
| 0.847826
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a1317cfca2be586fda102840132ac3cd6011dba7
| 223
|
py
|
Python
|
tests/testapp/models.py
|
Stormheg/wagtail-live
|
a5eb79024d44c060079ae7d4707d6220ea66ff5b
|
[
"BSD-3-Clause"
] | 22
|
2021-06-07T20:36:18.000Z
|
2022-03-29T01:48:58.000Z
|
tests/testapp/models.py
|
Stormheg/wagtail-live
|
a5eb79024d44c060079ae7d4707d6220ea66ff5b
|
[
"BSD-3-Clause"
] | 73
|
2021-05-21T16:08:44.000Z
|
2022-03-20T23:59:59.000Z
|
tests/testapp/models.py
|
Stormheg/wagtail-live
|
a5eb79024d44c060079ae7d4707d6220ea66ff5b
|
[
"BSD-3-Clause"
] | 11
|
2021-06-10T10:05:13.000Z
|
2022-02-12T13:31:34.000Z
|
from wagtail.core.models import Page
from wagtail_live.models import LivePageMixin
class BlogPage(LivePageMixin, Page):
content_panels = Page.content_panels + LivePageMixin.panels
class RegularPage(Page):
pass
| 18.583333
| 63
| 0.793722
| 27
| 223
| 6.444444
| 0.518519
| 0.126437
| 0.195402
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.143498
| 223
| 11
| 64
| 20.272727
| 0.910995
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.166667
| 0.333333
| 0
| 0.833333
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
a14e426641035037de2a091b9179b1f14decb4de
| 41
|
py
|
Python
|
rd2lstats/constants/localconfig.py
|
SamDelaney/Rd2lStats
|
03264b0a6ba7d87b1c76b5e5cca780d2c39405cf
|
[
"MIT"
] | null | null | null |
rd2lstats/constants/localconfig.py
|
SamDelaney/Rd2lStats
|
03264b0a6ba7d87b1c76b5e5cca780d2c39405cf
|
[
"MIT"
] | null | null | null |
rd2lstats/constants/localconfig.py
|
SamDelaney/Rd2lStats
|
03264b0a6ba7d87b1c76b5e5cca780d2c39405cf
|
[
"MIT"
] | 2
|
2022-02-04T22:30:26.000Z
|
2022-02-18T22:59:09.000Z
|
admin_id = 257075432828960769 #discord ID
| 41
| 41
| 0.853659
| 5
| 41
| 6.8
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.486486
| 0.097561
| 41
| 1
| 41
| 41
| 0.432432
| 0.243902
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a1737083d34c02b85a2d89fd154a8860120c6a13
| 80
|
py
|
Python
|
mincrawler/crawlers/twitter/__init__.py
|
altescy/mincrawler
|
36d28172b37c6825d74ec9887bfabe440838d50f
|
[
"MIT"
] | 1
|
2020-05-31T02:16:40.000Z
|
2020-05-31T02:16:40.000Z
|
mincrawler/crawlers/twitter/__init__.py
|
altescy/mincrawler
|
36d28172b37c6825d74ec9887bfabe440838d50f
|
[
"MIT"
] | null | null | null |
mincrawler/crawlers/twitter/__init__.py
|
altescy/mincrawler
|
36d28172b37c6825d74ec9887bfabe440838d50f
|
[
"MIT"
] | 1
|
2021-09-21T22:36:42.000Z
|
2021-09-21T22:36:42.000Z
|
from mincrawler.crawlers.twitter.tweet_search import TwittwerTweetSearchCrawler
| 40
| 79
| 0.9125
| 8
| 80
| 9
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.05
| 80
| 1
| 80
| 80
| 0.947368
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a1849e471972fee4d3fcd3e0baafab2b23acc4fa
| 33
|
py
|
Python
|
Solutions/lambda/lambda_magic.py
|
UWPCE-PythonCert/InstructorResources
|
13b1cfa4cad6a8c3491f8a602c8afda5400c9ac7
|
[
"Unlicense"
] | null | null | null |
Solutions/lambda/lambda_magic.py
|
UWPCE-PythonCert/InstructorResources
|
13b1cfa4cad6a8c3491f8a602c8afda5400c9ac7
|
[
"Unlicense"
] | 1
|
2020-12-20T17:07:17.000Z
|
2020-12-20T17:07:17.000Z
|
Solutions/lambda/lambda_magic.py
|
UWPCE-PythonCert/InstructorResources
|
13b1cfa4cad6a8c3491f8a602c8afda5400c9ac7
|
[
"Unlicense"
] | null | null | null |
def function_builder(n):
pass
| 16.5
| 24
| 0.727273
| 5
| 33
| 4.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 33
| 2
| 25
| 16.5
| 0.851852
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
a1bb41483b7a3d807c72397554e72e038d71fefb
| 45
|
py
|
Python
|
config.py
|
TrueNobility303/image-classification-CIFAR10
|
e0200d9b4d4f6ceaf058177abebd3f6510aebd9a
|
[
"MIT"
] | 2
|
2021-06-10T16:19:50.000Z
|
2021-06-16T10:55:14.000Z
|
config.py
|
TrueNobility303/image-classification-CIFAR10
|
e0200d9b4d4f6ceaf058177abebd3f6510aebd9a
|
[
"MIT"
] | null | null | null |
config.py
|
TrueNobility303/image-classification-CIFAR10
|
e0200d9b4d4f6ceaf058177abebd3f6510aebd9a
|
[
"MIT"
] | null | null | null |
import torch
device = torch.device('cuda:0')
| 22.5
| 31
| 0.733333
| 7
| 45
| 4.714286
| 0.714286
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025
| 0.111111
| 45
| 2
| 31
| 22.5
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0.130435
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
a1c795caf4c56322206b009467214d54074dbdf8
| 77
|
py
|
Python
|
mypackage/mymultis/__init__.py
|
atorin/sample-package-python
|
526aa23b8162bfbf8eccfad407374b6ce43e6658
|
[
"CC-BY-4.0"
] | null | null | null |
mypackage/mymultis/__init__.py
|
atorin/sample-package-python
|
526aa23b8162bfbf8eccfad407374b6ce43e6658
|
[
"CC-BY-4.0"
] | null | null | null |
mypackage/mymultis/__init__.py
|
atorin/sample-package-python
|
526aa23b8162bfbf8eccfad407374b6ce43e6658
|
[
"CC-BY-4.0"
] | null | null | null |
print("Imported mymultis")
from .multitwo import *
from .multithree import *
| 19.25
| 26
| 0.766234
| 9
| 77
| 6.555556
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12987
| 77
| 3
| 27
| 25.666667
| 0.880597
| 0
| 0
| 0
| 0
| 0
| 0.220779
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a1e3ed0b6266d80ad87629492402b2d005703685
| 151
|
py
|
Python
|
plip-stable/plip/__init__.py
|
hassanmohsin/pdb_analysis
|
613d78a71959212ee9a68ebc78d1b72e944b80b0
|
[
"MIT"
] | 1
|
2020-09-09T14:43:48.000Z
|
2020-09-09T14:43:48.000Z
|
plip-stable/plip/modules/__init__.py
|
hassanmohsin/pdb_analysis
|
613d78a71959212ee9a68ebc78d1b72e944b80b0
|
[
"MIT"
] | null | null | null |
plip-stable/plip/modules/__init__.py
|
hassanmohsin/pdb_analysis
|
613d78a71959212ee9a68ebc78d1b72e944b80b0
|
[
"MIT"
] | null | null | null |
"""
Protein-Ligand Interaction Profiler - Analyze and visualize protein-ligand interactions in PDB files.
__init__.py - Needed for python modules.
"""
| 30.2
| 101
| 0.781457
| 19
| 151
| 6
| 0.894737
| 0.22807
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.13245
| 151
| 4
| 102
| 37.75
| 0.870229
| 0.940397
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
b81f30d93bea5213eec538c106e122bb8435a9b0
| 16,205
|
py
|
Python
|
heat/tests/test_nested_stack.py
|
citrix-openstack-build/heat
|
fa31873529481472e037e3ce157b87f8057fe622
|
[
"Apache-2.0"
] | null | null | null |
heat/tests/test_nested_stack.py
|
citrix-openstack-build/heat
|
fa31873529481472e037e3ce157b87f8057fe622
|
[
"Apache-2.0"
] | null | null | null |
heat/tests/test_nested_stack.py
|
citrix-openstack-build/heat
|
fa31873529481472e037e3ce157b87f8057fe622
|
[
"Apache-2.0"
] | null | null | null |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import copy
from oslo.config import cfg
cfg.CONF.import_opt('max_resources_per_stack', 'heat.common.config')
from heat.common import exception
from heat.common import template_format
from heat.common import urlfetch
from heat.db import api as db_api
from heat.engine import parser
from heat.engine import resource
from heat.engine import scheduler
from heat.tests import generic_resource as generic_rsrc
from heat.tests import utils
from heat.tests.common import HeatTestCase
class NestedStackTest(HeatTestCase):
test_template = '''
HeatTemplateFormatVersion: '2012-12-12'
Resources:
the_nested:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: https://server.test/the.template
Parameters:
KeyName: foo
'''
nested_template = '''
HeatTemplateFormatVersion: '2012-12-12'
Parameters:
KeyName:
Type: String
Outputs:
Foo:
Value: bar
'''
update_template = '''
HeatTemplateFormatVersion: '2012-12-12'
Parameters:
KeyName:
Type: String
Outputs:
Bar:
Value: foo
'''
def setUp(self):
super(NestedStackTest, self).setUp()
self.m.StubOutWithMock(urlfetch, 'get')
utils.setup_dummy_db()
def create_stack(self, template):
t = template_format.parse(template)
stack = self.parse_stack(t)
stack.create()
self.assertEqual(stack.state, (stack.CREATE, stack.COMPLETE))
return stack
def parse_stack(self, t):
ctx = utils.dummy_context('test_username', 'aaaa', 'password')
stack_name = 'test_stack'
tmpl = parser.Template(t)
stack = parser.Stack(ctx, stack_name, tmpl)
stack.store()
return stack
def test_nested_stack_create(self):
urlfetch.get('https://server.test/the.template').MultipleTimes().\
AndReturn(self.nested_template)
self.m.ReplayAll()
stack = self.create_stack(self.test_template)
rsrc = stack['the_nested']
nested_name = utils.PhysName(stack.name, 'the_nested')
self.assertEqual(nested_name, rsrc.physical_resource_name())
arn_prefix = ('arn:openstack:heat::aaaa:stacks/%s/' %
rsrc.physical_resource_name())
self.assertTrue(rsrc.FnGetRefId().startswith(arn_prefix))
self.assertEqual('bar', rsrc.FnGetAtt('Outputs.Foo'))
self.assertRaises(
exception.InvalidTemplateAttribute, rsrc.FnGetAtt, 'Foo')
self.assertRaises(
exception.InvalidTemplateAttribute, rsrc.FnGetAtt, 'Outputs.Bar')
self.assertRaises(
exception.InvalidTemplateAttribute, rsrc.FnGetAtt, 'Bar')
rsrc.delete()
self.assertTrue(rsrc.FnGetRefId().startswith(arn_prefix))
self.m.VerifyAll()
def test_nested_stack_create_exceeds_resource_limit(self):
cfg.CONF.set_override('max_resources_per_stack', 1)
resource._register_class('GenericResource',
generic_rsrc.GenericResource)
urlfetch.get('https://server.test/the.template').MultipleTimes().\
AndReturn('''
HeatTemplateFormatVersion: '2012-12-12'
Parameters:
KeyName:
Type: String
Resources:
NestedResource:
Type: GenericResource
Outputs:
Foo:
Value: bar
''')
self.m.ReplayAll()
t = template_format.parse(self.test_template)
stack = self.parse_stack(t)
stack.create()
self.assertEquals(stack.state, (stack.CREATE, stack.FAILED))
self.assertIn('Maximum resources per stack exceeded',
stack.status_reason)
self.m.VerifyAll()
def test_nested_stack_create_equals_resource_limit(self):
cfg.CONF.set_override('max_resources_per_stack', 2)
resource._register_class('GenericResource',
generic_rsrc.GenericResource)
urlfetch.get('https://server.test/the.template').MultipleTimes().\
AndReturn('''
HeatTemplateFormatVersion: '2012-12-12'
Parameters:
KeyName:
Type: String
Resources:
NestedResource:
Type: GenericResource
Outputs:
Foo:
Value: bar
''')
self.m.ReplayAll()
t = template_format.parse(self.test_template)
stack = self.parse_stack(t)
stack.create()
self.assertEquals(stack.state, (stack.CREATE, stack.COMPLETE))
self.assertIn('NestedResource',
stack.resources['the_nested'].nested().resources)
self.m.VerifyAll()
def test_nested_stack_update(self):
urlfetch.get('https://server.test/the.template').MultipleTimes().\
AndReturn(self.nested_template)
urlfetch.get('https://server.test/new.template').MultipleTimes().\
AndReturn(self.update_template)
self.m.ReplayAll()
stack = self.create_stack(self.test_template)
rsrc = stack['the_nested']
original_nested_id = rsrc.resource_id
t = template_format.parse(self.test_template)
new_res = copy.deepcopy(t['Resources']['the_nested'])
new_res['Properties']['TemplateURL'] = (
'https://server.test/new.template')
prop_diff = {'TemplateURL': 'https://server.test/new.template'}
updater = rsrc.handle_update(new_res, {}, prop_diff)
updater.run_to_completion()
self.assertEqual(True, rsrc.check_update_complete(updater))
# Expect the physical resource name staying the same after update,
# so that the nested was actually updated instead of replaced.
self.assertEqual(original_nested_id, rsrc.resource_id)
db_nested = db_api.stack_get(stack.context,
rsrc.resource_id)
# Owner_id should be preserved during the update process.
self.assertEqual(stack.id, db_nested.owner_id)
self.assertEqual('foo', rsrc.FnGetAtt('Outputs.Bar'))
self.assertRaises(
exception.InvalidTemplateAttribute, rsrc.FnGetAtt, 'Foo')
self.assertRaises(
exception.InvalidTemplateAttribute, rsrc.FnGetAtt, 'Outputs.Foo')
self.assertRaises(
exception.InvalidTemplateAttribute, rsrc.FnGetAtt, 'Bar')
rsrc.delete()
self.m.VerifyAll()
def test_nested_stack_update_equals_resource_limit(self):
resource._register_class('GenericResource',
generic_rsrc.GenericResource)
urlfetch.get('https://server.test/the.template').MultipleTimes().\
AndReturn(self.nested_template)
urlfetch.get('https://server.test/new.template').MultipleTimes().\
AndReturn('''
HeatTemplateFormatVersion: '2012-12-12'
Parameters:
KeyName:
Type: String
Resources:
NestedResource:
Type: GenericResource
Outputs:
Bar:
Value: foo
''')
self.m.ReplayAll()
stack = self.create_stack(self.test_template)
cfg.CONF.set_override('max_resources_per_stack', 2)
rsrc = stack['the_nested']
original_nested_id = rsrc.resource_id
t = template_format.parse(self.test_template)
new_res = copy.deepcopy(t['Resources']['the_nested'])
new_res['Properties']['TemplateURL'] = (
'https://server.test/new.template')
prop_diff = {'TemplateURL': 'https://server.test/new.template'}
updater = rsrc.handle_update(new_res, {}, prop_diff)
updater.run_to_completion()
self.assertEqual(True, rsrc.check_update_complete(updater))
self.assertEqual('foo', rsrc.FnGetAtt('Outputs.Bar'))
rsrc.delete()
self.m.VerifyAll()
def test_nested_stack_update_exceeds_limit(self):
resource._register_class('GenericResource',
generic_rsrc.GenericResource)
urlfetch.get('https://server.test/the.template').MultipleTimes().\
AndReturn(self.nested_template)
urlfetch.get('https://server.test/new.template').MultipleTimes().\
AndReturn('''
HeatTemplateFormatVersion: '2012-12-12'
Parameters:
KeyName:
Type: String
Resources:
NestedResource:
Type: GenericResource
Outputs:
Bar:
Value: foo
''')
self.m.ReplayAll()
stack = self.create_stack(self.test_template)
cfg.CONF.set_override('max_resources_per_stack', 1)
rsrc = stack['the_nested']
original_nested_id = rsrc.resource_id
t = template_format.parse(self.test_template)
new_res = copy.deepcopy(t['Resources']['the_nested'])
new_res['Properties']['TemplateURL'] = (
'https://server.test/new.template')
prop_diff = {'TemplateURL': 'https://server.test/new.template'}
ex = self.assertRaises(exception.RequestLimitExceeded,
rsrc.handle_update, new_res, {}, prop_diff)
self.assertIn(exception.StackResourceLimitExceeded.message,
str(ex))
rsrc.delete()
self.m.VerifyAll()
def test_nested_stack_suspend_resume(self):
urlfetch.get('https://server.test/the.template').AndReturn(
self.nested_template)
self.m.ReplayAll()
stack = self.create_stack(self.test_template)
rsrc = stack['the_nested']
scheduler.TaskRunner(rsrc.suspend)()
self.assertEqual(rsrc.state, (rsrc.SUSPEND, rsrc.COMPLETE))
scheduler.TaskRunner(rsrc.resume)()
self.assertEqual(rsrc.state, (rsrc.RESUME, rsrc.COMPLETE))
rsrc.delete()
self.m.VerifyAll()
def test_nested_stack_three_deep(self):
root_template = '''
HeatTemplateFormat: 2012-12-12
Resources:
Nested:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: 'https://server.test/depth1.template'
'''
depth1_template = '''
HeatTemplateFormat: 2012-12-12
Resources:
Nested:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: 'https://server.test/depth2.template'
'''
depth2_template = '''
HeatTemplateFormat: 2012-12-12
Resources:
Nested:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: 'https://server.test/depth3.template'
Parameters:
KeyName: foo
'''
urlfetch.get(
'https://server.test/depth1.template').AndReturn(
depth1_template)
urlfetch.get(
'https://server.test/depth2.template').AndReturn(
depth2_template)
urlfetch.get(
'https://server.test/depth3.template').AndReturn(
self.nested_template)
self.m.ReplayAll()
self.create_stack(root_template)
self.m.VerifyAll()
def test_nested_stack_four_deep(self):
root_template = '''
HeatTemplateFormat: 2012-12-12
Resources:
Nested:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: 'https://server.test/depth1.template'
'''
depth1_template = '''
HeatTemplateFormat: 2012-12-12
Resources:
Nested:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: 'https://server.test/depth2.template'
'''
depth2_template = '''
HeatTemplateFormat: 2012-12-12
Resources:
Nested:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: 'https://server.test/depth3.template'
'''
depth3_template = '''
HeatTemplateFormat: 2012-12-12
Resources:
Nested:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: 'https://server.test/depth4.template'
Parameters:
KeyName: foo
'''
urlfetch.get(
'https://server.test/depth1.template').AndReturn(
depth1_template)
urlfetch.get(
'https://server.test/depth2.template').AndReturn(
depth2_template)
urlfetch.get(
'https://server.test/depth3.template').AndReturn(
depth3_template)
urlfetch.get(
'https://server.test/depth4.template').AndReturn(
self.nested_template)
self.m.ReplayAll()
t = template_format.parse(root_template)
stack = self.parse_stack(t)
stack.create()
self.assertEqual((stack.CREATE, stack.FAILED), stack.state)
self.assertIn('Recursion depth exceeds', stack.status_reason)
self.m.VerifyAll()
def test_nested_stack_four_wide(self):
root_template = '''
HeatTemplateFormat: 2012-12-12
Resources:
Nested:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: 'https://server.test/depth1.template'
Parameters:
KeyName: foo
Nested2:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: 'https://server.test/depth2.template'
Parameters:
KeyName: foo
Nested3:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: 'https://server.test/depth3.template'
Parameters:
KeyName: foo
Nested4:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: 'https://server.test/depth4.template'
Parameters:
KeyName: foo
'''
urlfetch.get(
'https://server.test/depth1.template').InAnyOrder().AndReturn(
self.nested_template)
urlfetch.get(
'https://server.test/depth2.template').InAnyOrder().AndReturn(
self.nested_template)
urlfetch.get(
'https://server.test/depth3.template').InAnyOrder().AndReturn(
self.nested_template)
urlfetch.get(
'https://server.test/depth4.template').InAnyOrder().AndReturn(
self.nested_template)
self.m.ReplayAll()
self.create_stack(root_template)
self.m.VerifyAll()
def test_nested_stack_infinite_recursion(self):
template = '''
HeatTemplateFormat: 2012-12-12
Resources:
Nested:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: 'https://server.test/the.template'
'''
urlfetch.get(
'https://server.test/the.template').MultipleTimes().AndReturn(
template)
self.m.ReplayAll()
t = template_format.parse(template)
stack = self.parse_stack(t)
stack.create()
self.assertEqual(stack.state, (stack.CREATE, stack.FAILED))
self.assertIn('Recursion depth exceeds', stack.status_reason)
self.m.VerifyAll()
class ResDataResource(generic_rsrc.GenericResource):
def handle_create(self):
db_api.resource_data_set(self, "test", 'A secret value', True)
class ResDataNestedStackTest(NestedStackTest):
nested_template = '''
HeatTemplateFormatVersion: "2012-12-12"
Parameters:
KeyName:
Type: String
Resources:
nested_res:
Type: "res.data.resource"
Outputs:
Foo:
Value: bar
'''
def setUp(self):
resource._register_class("res.data.resource", ResDataResource)
super(ResDataNestedStackTest, self).setUp()
def test_res_data_delete(self):
urlfetch.get('https://server.test/the.template').AndReturn(
self.nested_template)
self.m.ReplayAll()
stack = self.create_stack(self.test_template)
res = stack['the_nested'].nested()['nested_res']
stack.delete()
self.assertEqual(stack.state, (stack.DELETE, stack.COMPLETE))
self.assertRaises(exception.NotFound, db_api.resource_data_get, res,
'test')
| 32.2167
| 78
| 0.638383
| 1,704
| 16,205
| 5.928404
| 0.135563
| 0.045734
| 0.062364
| 0.050089
| 0.746882
| 0.731934
| 0.726391
| 0.717977
| 0.681845
| 0.666403
| 0
| 0.014906
| 0.246529
| 16,205
| 502
| 79
| 32.280876
| 0.812449
| 0.047701
| 0
| 0.769412
| 0
| 0
| 0.342955
| 0.045148
| 0
| 0
| 0
| 0
| 0.072941
| 1
| 0.04
| false
| 0.002353
| 0.030588
| 0
| 0.091765
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
62c606982ea4c4cd2bef06e8a001bba59c50cf21
| 238
|
py
|
Python
|
Learn/Algorithms/Warmup/Time Conversion/timeconversion.py
|
Adriel-M/HackerRank
|
0f361bb7eaa3d2db3dd96de511c4b7fa02efa8c5
|
[
"MIT"
] | 1
|
2021-11-24T16:43:10.000Z
|
2021-11-24T16:43:10.000Z
|
Learn/Algorithms/Warmup/Time Conversion/timeconversion.py
|
Adriel-M/HackerRank
|
0f361bb7eaa3d2db3dd96de511c4b7fa02efa8c5
|
[
"MIT"
] | null | null | null |
Learn/Algorithms/Warmup/Time Conversion/timeconversion.py
|
Adriel-M/HackerRank
|
0f361bb7eaa3d2db3dd96de511c4b7fa02efa8c5
|
[
"MIT"
] | null | null | null |
time = input().strip().split(":")
if time[-1][-2:] == "PM" and time[0] != "12":
time[0] = str(int(time[0]) + 12)
elif time[-1][-2:] == "AM" and time[0] == "12":
time[0] = "00"
print("%s:%s:%s" % (time[0], time[1], time[2][:2]))
| 26.444444
| 51
| 0.462185
| 43
| 238
| 2.55814
| 0.418605
| 0.272727
| 0.190909
| 0.181818
| 0.272727
| 0.272727
| 0
| 0
| 0
| 0
| 0
| 0.107143
| 0.176471
| 238
| 8
| 52
| 29.75
| 0.454082
| 0
| 0
| 0
| 0
| 0
| 0.079832
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.166667
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
62cd6a4189849da0ba6833997eb2b723391fd02d
| 119
|
py
|
Python
|
src/core/__init__.py
|
simondotsh/WinRemoteEnum
|
f40cff76788709e54e7ed19157870dacfcaa0bc3
|
[
"MIT"
] | 2
|
2021-11-25T14:15:12.000Z
|
2022-02-02T04:27:17.000Z
|
src/core/__init__.py
|
simondotsh/WinRemoteEnum
|
f40cff76788709e54e7ed19157870dacfcaa0bc3
|
[
"MIT"
] | null | null | null |
src/core/__init__.py
|
simondotsh/WinRemoteEnum
|
f40cff76788709e54e7ed19157870dacfcaa0bc3
|
[
"MIT"
] | 2
|
2021-11-03T18:11:40.000Z
|
2022-02-02T15:11:30.000Z
|
from .orchestrator import Orchestrator
from .worker import Worker
from .mapper import Mapper
from .logger import Logger
| 29.75
| 38
| 0.840336
| 16
| 119
| 6.25
| 0.375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12605
| 119
| 4
| 39
| 29.75
| 0.961538
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1a05656cf0a080deffc711f1e6694ef63b98fa80
| 118
|
py
|
Python
|
stk/api/util/__init__.py
|
sayerhs/pystk
|
e211a13b45929b8bfbfe891532ea19990a19d324
|
[
"Apache-2.0"
] | null | null | null |
stk/api/util/__init__.py
|
sayerhs/pystk
|
e211a13b45929b8bfbfe891532ea19990a19d324
|
[
"Apache-2.0"
] | null | null | null |
stk/api/util/__init__.py
|
sayerhs/pystk
|
e211a13b45929b8bfbfe891532ea19990a19d324
|
[
"Apache-2.0"
] | 1
|
2021-04-28T20:10:54.000Z
|
2021-04-28T20:10:54.000Z
|
# -*- coding: utf-8 -*-
"""\
stk_util Python interface
=========================
"""
from .parallel import Parallel
| 13.111111
| 30
| 0.5
| 11
| 118
| 5.272727
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009901
| 0.144068
| 118
| 8
| 31
| 14.75
| 0.564356
| 0.627119
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1a15fcd8ecf1ca7c3a02012c0013a9ab1e0ffa24
| 115
|
py
|
Python
|
Django/api-basic2/photo/admin.py
|
sug5806/TIL
|
2309d8a270e4a7b8961268a40b6492c5db317e37
|
[
"MIT"
] | null | null | null |
Django/api-basic2/photo/admin.py
|
sug5806/TIL
|
2309d8a270e4a7b8961268a40b6492c5db317e37
|
[
"MIT"
] | 102
|
2020-02-12T00:10:33.000Z
|
2022-03-11T23:58:41.000Z
|
Django/api-basic2/photo/admin.py
|
sug5806/TIL
|
2309d8a270e4a7b8961268a40b6492c5db317e37
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Photo
# Register your models here.
admin.site.register(Photo)
| 23
| 32
| 0.808696
| 17
| 115
| 5.470588
| 0.647059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121739
| 115
| 5
| 33
| 23
| 0.920792
| 0.226087
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a7e3b5eb73715373f3c8a010b5d9847dda95f66f
| 122
|
py
|
Python
|
birthday/settings.py
|
joehalloran/birthday_project
|
c4da02bc21347ae4d1c6fb9b956f40a70f7bf6a5
|
[
"Apache-2.0"
] | null | null | null |
birthday/settings.py
|
joehalloran/birthday_project
|
c4da02bc21347ae4d1c6fb9b956f40a70f7bf6a5
|
[
"Apache-2.0"
] | null | null | null |
birthday/settings.py
|
joehalloran/birthday_project
|
c4da02bc21347ae4d1c6fb9b956f40a70f7bf6a5
|
[
"Apache-2.0"
] | null | null | null |
# [START app settings]
appSettings = {
"sender_address":"noreply@birthday-168214.appspotmail.com",
}
# [END app settings]
| 24.4
| 60
| 0.737705
| 14
| 122
| 6.357143
| 0.857143
| 0.247191
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.055046
| 0.106557
| 122
| 5
| 61
| 24.4
| 0.761468
| 0.319672
| 0
| 0
| 0
| 0
| 0.654321
| 0.481481
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a7e3dfb446d0313f6a9566e5b353938353631be6
| 87
|
py
|
Python
|
ontology/logistic_regression/sherlock/listify_circuits_k04_reverse.py
|
ehbeam/neuro-knowledge-engine
|
9dc56ade0bbbd8d14f0660774f787c3f46d7e632
|
[
"MIT"
] | 15
|
2020-07-17T07:10:26.000Z
|
2022-02-18T05:51:45.000Z
|
ontology/neural_network/sherlock/listify_circuits_k04_reverse.py
|
YifeiCAO/neuro-knowledge-engine
|
9dc56ade0bbbd8d14f0660774f787c3f46d7e632
|
[
"MIT"
] | 2
|
2022-01-14T09:10:12.000Z
|
2022-01-28T17:32:42.000Z
|
ontology/neural_network/sherlock/listify_circuits_k04_reverse.py
|
YifeiCAO/neuro-knowledge-engine
|
9dc56ade0bbbd8d14f0660774f787c3f46d7e632
|
[
"MIT"
] | 4
|
2021-12-22T13:27:32.000Z
|
2022-02-18T05:51:47.000Z
|
#!/bin/python
import listify_circuits
listify_circuits.optimize_circuits(4, 'reverse')
| 21.75
| 48
| 0.827586
| 11
| 87
| 6.272727
| 0.727273
| 0.434783
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012195
| 0.057471
| 87
| 4
| 48
| 21.75
| 0.829268
| 0.137931
| 0
| 0
| 0
| 0
| 0.093333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
a7ff4d4be826f31cbe93ce5299f2349286c7e725
| 70
|
py
|
Python
|
hw_tests/bluetooth.test.py
|
nancynobody/teddy
|
ac2bde38d2f9891e83b644e9092af63b9b33e705
|
[
"MIT"
] | null | null | null |
hw_tests/bluetooth.test.py
|
nancynobody/teddy
|
ac2bde38d2f9891e83b644e9092af63b9b33e705
|
[
"MIT"
] | null | null | null |
hw_tests/bluetooth.test.py
|
nancynobody/teddy
|
ac2bde38d2f9891e83b644e9092af63b9b33e705
|
[
"MIT"
] | null | null | null |
"""Test BLUETOOTH hardware
Send .wav file over bluetooth
"""
# TODO
| 10
| 29
| 0.7
| 9
| 70
| 5.444444
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.185714
| 70
| 6
| 30
| 11.666667
| 0.859649
| 0.857143
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0.166667
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
c52027e983d5821ea5f37fa1e8233a5072560846
| 114
|
py
|
Python
|
run_slow_tests.py
|
cmcmarrow/tamcolors
|
65a5f2455bbe35a739b98d14af158c3df7feb786
|
[
"Apache-2.0"
] | 29
|
2020-07-17T23:46:17.000Z
|
2022-02-06T05:36:44.000Z
|
run_slow_tests.py
|
sudo-nikhil/tamcolors
|
65a5f2455bbe35a739b98d14af158c3df7feb786
|
[
"Apache-2.0"
] | 42
|
2020-07-25T19:39:52.000Z
|
2021-02-24T01:19:58.000Z
|
run_slow_tests.py
|
sudo-nikhil/tamcolors
|
65a5f2455bbe35a739b98d14af158c3df7feb786
|
[
"Apache-2.0"
] | 8
|
2020-07-18T23:02:48.000Z
|
2020-12-30T04:07:35.000Z
|
from tamcolors.tests.all_tests import tests_main
if __name__ == "__main__":
exit(int(not tests_main(True)))
| 19
| 48
| 0.745614
| 17
| 114
| 4.352941
| 0.705882
| 0.243243
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140351
| 114
| 5
| 49
| 22.8
| 0.755102
| 0
| 0
| 0
| 0
| 0
| 0.070175
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
c5428b39b4de67a206d96707e476cd72675813a7
| 41
|
py
|
Python
|
build/lib/ctrlengine/controllers/__init__.py
|
0xJeremy/ctrl.engine
|
19abba70df149a05edc5722cc95ceacc538448e6
|
[
"MIT"
] | 3
|
2020-04-18T19:28:15.000Z
|
2021-02-25T18:48:08.000Z
|
build/lib/ctrlengine/controllers/__init__.py
|
0xJeremy/ctrl.engine
|
19abba70df149a05edc5722cc95ceacc538448e6
|
[
"MIT"
] | null | null | null |
build/lib/ctrlengine/controllers/__init__.py
|
0xJeremy/ctrl.engine
|
19abba70df149a05edc5722cc95ceacc538448e6
|
[
"MIT"
] | null | null | null |
from .pid import PID_ctrl
PID = PID_ctrl
| 13.666667
| 25
| 0.780488
| 8
| 41
| 3.75
| 0.5
| 0.466667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.170732
| 41
| 2
| 26
| 20.5
| 0.882353
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
c563dc298530f34b93b7dc4e3ee7adc8aef4e4a4
| 57
|
py
|
Python
|
examples/plot/plot_result.py
|
leilin-research/Time-series-prediction
|
97ca6a7525e2c6329276b66ece1747124da8ab42
|
[
"MIT"
] | 552
|
2019-07-23T10:17:49.000Z
|
2022-03-23T13:37:46.000Z
|
examples/plot/plot_result.py
|
leilin-research/Time-series-prediction
|
97ca6a7525e2c6329276b66ece1747124da8ab42
|
[
"MIT"
] | 12
|
2020-05-16T04:22:09.000Z
|
2022-03-23T13:38:45.000Z
|
examples/plot/plot_result.py
|
leilin-research/Time-series-prediction
|
97ca6a7525e2c6329276b66ece1747124da8ab42
|
[
"MIT"
] | 122
|
2019-09-09T11:34:19.000Z
|
2022-03-16T08:06:24.000Z
|
import matplotlib.pyplot as plt
import seaborn as sns
| 9.5
| 31
| 0.789474
| 9
| 57
| 5
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.192982
| 57
| 5
| 32
| 11.4
| 0.978261
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
c56746989cbc08d4ab48b49c6d30f970cc69ee6f
| 173
|
py
|
Python
|
reddit2telegram/channels/r_politicalmemes/app.py
|
mainyordle/reddit2telegram
|
1163e15aed3b6ff0fba65b222d3d9798f644c386
|
[
"MIT"
] | 187
|
2016-09-20T09:15:54.000Z
|
2022-03-29T12:22:33.000Z
|
reddit2telegram/channels/r_politicalmemes/app.py
|
mainyordle/reddit2telegram
|
1163e15aed3b6ff0fba65b222d3d9798f644c386
|
[
"MIT"
] | 84
|
2016-09-22T14:25:07.000Z
|
2022-03-19T01:26:17.000Z
|
reddit2telegram/channels/r_politicalmemes/app.py
|
mainyordle/reddit2telegram
|
1163e15aed3b6ff0fba65b222d3d9798f644c386
|
[
"MIT"
] | 172
|
2016-09-21T15:39:39.000Z
|
2022-03-16T15:15:58.000Z
|
#encoding:utf-8
subreddit = 'PoliticalHumor+PoliticalCompassMemes'
t_channel = '@r_PoliticalMemes'
def send_post(submission, r2t):
return r2t.send_simple(submission)
| 19.222222
| 50
| 0.786127
| 20
| 173
| 6.6
| 0.85
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019481
| 0.109827
| 173
| 8
| 51
| 21.625
| 0.837662
| 0.080925
| 0
| 0
| 0
| 0
| 0.335443
| 0.227848
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.25
| 0
| 0.25
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
|
0
| 5
|
c5753c9d7bdf15d5a907ea94c4f52026c6cae0ec
| 122
|
py
|
Python
|
src/friendlypics/__init__.py
|
TheFriendlyCoder/friendlypics
|
44629a1098e2a35b54fdf3370aaaca977083ebaf
|
[
"Apache-2.0"
] | null | null | null |
src/friendlypics/__init__.py
|
TheFriendlyCoder/friendlypics
|
44629a1098e2a35b54fdf3370aaaca977083ebaf
|
[
"Apache-2.0"
] | null | null | null |
src/friendlypics/__init__.py
|
TheFriendlyCoder/friendlypics
|
44629a1098e2a35b54fdf3370aaaca977083ebaf
|
[
"Apache-2.0"
] | null | null | null |
import logging
from friendlypics.version import __version__
logging.getLogger(__name__).addHandler(logging.NullHandler())
| 30.5
| 61
| 0.860656
| 13
| 122
| 7.461538
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.057377
| 122
| 3
| 62
| 40.666667
| 0.843478
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
3da61bd1801a6cdf76b5e65f38fe353dcbb4e879
| 272
|
py
|
Python
|
tests/tests.py
|
JordanReiter/django-impersonate-auth
|
5f91ca250460bcbf8638c42aef140999b04a0a90
|
[
"MIT"
] | 37
|
2018-07-09T02:14:38.000Z
|
2021-02-23T11:04:09.000Z
|
tests/tests.py
|
JordanReiter/django-impersonate-auth
|
5f91ca250460bcbf8638c42aef140999b04a0a90
|
[
"MIT"
] | null | null | null |
tests/tests.py
|
JordanReiter/django-impersonate-auth
|
5f91ca250460bcbf8638c42aef140999b04a0a90
|
[
"MIT"
] | 1
|
2018-07-19T14:42:57.000Z
|
2018-07-19T14:42:57.000Z
|
from django.test import TestCase, override_settings
from .base import BaseImpersonationBackendTest, AUTH_BACKEND
class TestImpersonationBackend(BaseImpersonationBackendTest, TestCase):
backends = [AUTH_BACKEND, 'django.contrib.auth.backends.ModelBackend']
pass
| 30.222222
| 74
| 0.827206
| 26
| 272
| 8.538462
| 0.653846
| 0.099099
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.106618
| 272
| 8
| 75
| 34
| 0.91358
| 0
| 0
| 0
| 0
| 0
| 0.150735
| 0.150735
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.2
| 0.4
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
3dcccac7ba8caa7b48c808fa08796284c7d1011d
| 237
|
py
|
Python
|
wagtail_to_ion/wagtail_hooks/__init__.py
|
anfema/wagtail_to_ion
|
2c042d220f4421f8a277c4bfcbdd65f89d76f4c7
|
[
"MIT"
] | 1
|
2022-02-22T08:13:16.000Z
|
2022-02-22T08:13:16.000Z
|
wagtail_to_ion/wagtail_hooks/__init__.py
|
anfema/wagtail_to_ion
|
2c042d220f4421f8a277c4bfcbdd65f89d76f4c7
|
[
"MIT"
] | 33
|
2020-11-05T10:30:27.000Z
|
2022-03-11T12:23:25.000Z
|
wagtail_to_ion/wagtail_hooks/__init__.py
|
anfema/wagtail_to_ion
|
2c042d220f4421f8a277c4bfcbdd65f89d76f4c7
|
[
"MIT"
] | null | null | null |
from .show_only_user_images import show_only_user_images
from .show_only_user_documents import show_only_user_documents
from .dual_range_slider import global_admin_css, global_admin_js
from .wagtail_admin_urls import register_admin_urls
| 47.4
| 64
| 0.907173
| 39
| 237
| 4.948718
| 0.435897
| 0.165803
| 0.248705
| 0.165803
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.07173
| 237
| 4
| 65
| 59.25
| 0.877273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
3debbbfa522ebaf2b3ddc8143a425dbb6138fbf8
| 92
|
py
|
Python
|
stubs/3.2/posix.py
|
TimSimpsonR/mypy
|
5e6fd6335e0662b0477e1d678269f33e6f4194ba
|
[
"PSF-2.0"
] | 1
|
2019-06-27T11:34:27.000Z
|
2019-06-27T11:34:27.000Z
|
stubs/3.2/posix.py
|
silky/mypy
|
de6a8d3710df9f49109cb682f2092e4967bfb92c
|
[
"PSF-2.0"
] | null | null | null |
stubs/3.2/posix.py
|
silky/mypy
|
de6a8d3710df9f49109cb682f2092e4967bfb92c
|
[
"PSF-2.0"
] | null | null | null |
# Stubs for posix
# NOTE: These are incomplete!
import typing
from os import stat_result
| 11.5
| 29
| 0.76087
| 14
| 92
| 4.928571
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.195652
| 92
| 7
| 30
| 13.142857
| 0.932432
| 0.467391
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
9a9ce9a6eb149125ba73846728fbc53bd6671695
| 386
|
py
|
Python
|
pykeg/backup/unknown_engine.py
|
theshiv303/kegbot-server
|
425b0f8779e0d97aa6ca032b29b2623d693f9fd4
|
[
"MIT"
] | 75
|
2015-01-12T22:51:20.000Z
|
2022-02-23T02:09:50.000Z
|
pykeg/backup/unknown_engine.py
|
theshiv303/kegbot-server
|
425b0f8779e0d97aa6ca032b29b2623d693f9fd4
|
[
"MIT"
] | 83
|
2015-01-03T19:04:46.000Z
|
2021-07-11T19:06:39.000Z
|
pykeg/backup/unknown_engine.py
|
theshiv303/kegbot-server
|
425b0f8779e0d97aa6ca032b29b2623d693f9fd4
|
[
"MIT"
] | 66
|
2015-01-05T01:55:06.000Z
|
2021-11-27T17:07:24.000Z
|
from .exceptions import BackupError
def engine_name():
return "unknown"
def is_installed(*args, **kwargs):
raise BackupError("Engine unsupported.")
def dump(*args, **kwargs):
raise BackupError("Engine unsupported.")
def restore(*args, **kwargs):
raise BackupError("Engine unsupported.")
def erase(*args, **kwargs):
raise BackupError("Engine unsupported.")
| 17.545455
| 44
| 0.699482
| 42
| 386
| 6.380952
| 0.428571
| 0.149254
| 0.223881
| 0.38806
| 0.675373
| 0.675373
| 0.514925
| 0
| 0
| 0
| 0
| 0
| 0.160622
| 386
| 21
| 45
| 18.380952
| 0.82716
| 0
| 0
| 0.363636
| 0
| 0
| 0.215026
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.454545
| true
| 0
| 0.090909
| 0.090909
| 0.636364
| 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
| 1
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
9aa6b0a8530f800e123f7c356f739c5755323d7a
| 270
|
py
|
Python
|
ice/llutil/test.py
|
tjyuyao/ice-learn
|
99087181d2d15cb55a3c34004550179366ce601a
|
[
"MIT"
] | 1
|
2022-03-29T11:06:36.000Z
|
2022-03-29T11:06:36.000Z
|
ice/llutil/test.py
|
tjyuyao/ice-learn
|
99087181d2d15cb55a3c34004550179366ce601a
|
[
"MIT"
] | null | null | null |
ice/llutil/test.py
|
tjyuyao/ice-learn
|
99087181d2d15cb55a3c34004550179366ce601a
|
[
"MIT"
] | null | null | null |
"""helps developers of ice to test."""
import torch
import pytest
requires_cuda = pytest.mark.skipif(not torch.cuda.is_available(), reason="cuda not available")
def requires_n_gpus(n): return pytest.mark.skipif(torch.cuda.device_count() < n, reason=f"need {n} gpus")
| 30
| 105
| 0.751852
| 43
| 270
| 4.604651
| 0.581395
| 0.10101
| 0.161616
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.107407
| 270
| 8
| 106
| 33.75
| 0.821577
| 0.118519
| 0
| 0
| 0
| 0
| 0.133621
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.5
| 0.25
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
9ae6d8eea3eb7a422c9d920eaad32c903cbc7bd6
| 281
|
py
|
Python
|
server/_server/adapters.py
|
manutero/evalytics
|
43a3ff771db40fc1754ba4b8a8f6af9ab6cd25dc
|
[
"Apache-2.0"
] | null | null | null |
server/_server/adapters.py
|
manutero/evalytics
|
43a3ff771db40fc1754ba4b8a8f6af9ab6cd25dc
|
[
"Apache-2.0"
] | null | null | null |
server/_server/adapters.py
|
manutero/evalytics
|
43a3ff771db40fc1754ba4b8a8f6af9ab6cd25dc
|
[
"Apache-2.0"
] | null | null | null |
from .models import OrgChart
class FakeAdapter():
def get_org_chart():
return OrgChart()
class GoogleSheetsAdapter():
def get_org_chart():
# TODO: This adapter talks with google sheets api and returns an OrgChart model
return OrgChart()
| 20.071429
| 87
| 0.669039
| 33
| 281
| 5.575758
| 0.727273
| 0.141304
| 0.097826
| 0.152174
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.263345
| 281
| 14
| 88
| 20.071429
| 0.888889
| 0.274021
| 0
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 0
| 1
| 0.285714
| true
| 0
| 0.142857
| 0.285714
| 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
| 1
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
b11ed006012f9e3df4a6a55f37c453e1a9f4b068
| 84
|
py
|
Python
|
challenge_0/python/whiterd/src/hello_world.py
|
rchicoli/2017-challenges
|
44f0b672e5dea34de1dde131b6df837d462f8e29
|
[
"Apache-2.0"
] | 271
|
2017-01-01T22:58:36.000Z
|
2021-11-28T23:05:29.000Z
|
challenge_0/python/whiterd/src/hello_world.py
|
AakashOfficial/2017Challenges
|
a8f556f1d5b43c099a0394384c8bc2d826f9d287
|
[
"Apache-2.0"
] | 283
|
2017-01-01T23:26:05.000Z
|
2018-03-23T00:48:55.000Z
|
challenge_0/python/whiterd/src/hello_world.py
|
AakashOfficial/2017Challenges
|
a8f556f1d5b43c099a0394384c8bc2d826f9d287
|
[
"Apache-2.0"
] | 311
|
2017-01-01T22:59:23.000Z
|
2021-09-23T00:29:12.000Z
|
#!/usr/bin/env python
from __future__ import print_function
print('Hello World!')
| 14
| 37
| 0.761905
| 12
| 84
| 4.916667
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119048
| 84
| 5
| 38
| 16.8
| 0.797297
| 0.238095
| 0
| 0
| 0
| 0
| 0.190476
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
b14fe8de1e326629ab0a50d5c1b8029df64bbd15
| 159
|
py
|
Python
|
emukit/test_functions/sensitivity/__init__.py
|
ndalchau/emukit
|
eb6754ea016a7cd82b275bb4075676b5ed662634
|
[
"Apache-2.0"
] | 272
|
2018-09-18T11:56:37.000Z
|
2020-10-10T22:21:25.000Z
|
emukit/test_functions/sensitivity/__init__.py
|
Tony-Chiong/emukit
|
a068c8d5e06b2ae8b038f67bf2e4f66c4d91651a
|
[
"Apache-2.0"
] | 278
|
2018-09-19T15:38:50.000Z
|
2020-10-14T13:45:24.000Z
|
emukit/test_functions/sensitivity/__init__.py
|
Tony-Chiong/emukit
|
a068c8d5e06b2ae8b038f67bf2e4f66c4d91651a
|
[
"Apache-2.0"
] | 88
|
2018-09-18T11:56:48.000Z
|
2020-09-23T13:33:55.000Z
|
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
from .ishigami import Ishigami # noqa: F401
| 26.5
| 73
| 0.754717
| 23
| 159
| 5.217391
| 0.956522
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 0.150943
| 159
| 5
| 74
| 31.8
| 0.822222
| 0.742138
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
b15c45851565d45cd4ac5775abec5f8c5f0ad12a
| 87
|
py
|
Python
|
pettingzoo/__init__.py
|
dkkim93/PettingZoo
|
45e9c8f202b80fbc509232a44a771fa7156b5937
|
[
"MIT"
] | 4
|
2021-12-17T08:00:28.000Z
|
2022-02-12T12:25:24.000Z
|
pettingzoo/pettingzoo/__init__.py
|
Sriram94/DMFG
|
9206d4302350bed165e6812e8874041335ecf8a8
|
[
"MIT"
] | null | null | null |
pettingzoo/pettingzoo/__init__.py
|
Sriram94/DMFG
|
9206d4302350bed165e6812e8874041335ecf8a8
|
[
"MIT"
] | null | null | null |
from pettingzoo.utils.env import AECEnv
import pettingzoo.utils
__version__ = "1.4.2"
| 17.4
| 39
| 0.793103
| 13
| 87
| 5
| 0.769231
| 0.461538
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.038961
| 0.114943
| 87
| 4
| 40
| 21.75
| 0.805195
| 0
| 0
| 0
| 0
| 0
| 0.057471
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
b1666e4401718906547afaf75f3bdc9d5257ff40
| 2,505
|
py
|
Python
|
tests/migrations/test_migration_creator.py
|
fenestron/lorator
|
1966f095a67ae65e816b1c8f7359b9f203cd5c4f
|
[
"MIT"
] | null | null | null |
tests/migrations/test_migration_creator.py
|
fenestron/lorator
|
1966f095a67ae65e816b1c8f7359b9f203cd5c4f
|
[
"MIT"
] | null | null | null |
tests/migrations/test_migration_creator.py
|
fenestron/lorator
|
1966f095a67ae65e816b1c8f7359b9f203cd5c4f
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
import tempfile
import os
from flexmock import flexmock, flexmock_teardown
from lorator.migrations import MigrationCreator
from lorator.migrations.stubs import CREATE_STUB, UPDATE_STUB, BLANK_STUB
from .. import OratorTestCase
class MigrationCreatorTestCase(OratorTestCase):
def tearDown(self):
flexmock_teardown()
def test_basic_create_method_stores_migration_file(self):
expected = os.path.join(tempfile.gettempdir(), "foo_create_bar.py")
if os.path.exists(expected):
os.remove(expected)
creator = self.get_creator()
creator.should_receive("_get_date_prefix").and_return("foo")
creator.create("create_bar", tempfile.gettempdir())
self.assertTrue(os.path.exists(expected))
with open(expected) as fh:
content = fh.read()
self.assertEqual(content, BLANK_STUB.replace("DummyClass", "CreateBar"))
os.remove(expected)
def test_table_update_migration_stores_migration_file(self):
expected = os.path.join(tempfile.gettempdir(), "foo_create_bar.py")
if os.path.exists(expected):
os.remove(expected)
creator = self.get_creator()
creator.should_receive("_get_date_prefix").and_return("foo")
creator.create("create_bar", tempfile.gettempdir(), "baz")
self.assertTrue(os.path.exists(expected))
with open(expected) as fh:
content = fh.read()
self.assertEqual(
content,
UPDATE_STUB.replace("DummyClass", "CreateBar").replace(
"dummy_table", "baz"
),
)
os.remove(expected)
def test_table_create_migration_stores_migration_file(self):
expected = os.path.join(tempfile.gettempdir(), "foo_create_bar.py")
if os.path.exists(expected):
os.remove(expected)
creator = self.get_creator()
creator.should_receive("_get_date_prefix").and_return("foo")
creator.create("create_bar", tempfile.gettempdir(), "baz", True)
self.assertTrue(os.path.exists(expected))
with open(expected) as fh:
content = fh.read()
self.assertEqual(
content,
CREATE_STUB.replace("DummyClass", "CreateBar").replace(
"dummy_table", "baz"
),
)
os.remove(expected)
def get_creator(self):
return flexmock(MigrationCreator())
| 33.4
| 84
| 0.630739
| 271
| 2,505
| 5.623616
| 0.225092
| 0.035433
| 0.047244
| 0.07874
| 0.73294
| 0.73294
| 0.708661
| 0.708661
| 0.708661
| 0.708661
| 0
| 0.000537
| 0.256687
| 2,505
| 74
| 85
| 33.851351
| 0.817938
| 0.008383
| 0
| 0.614035
| 0
| 0
| 0.092264
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 1
| 0.087719
| false
| 0
| 0.105263
| 0.017544
| 0.22807
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 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
| 5
|
b18a1fab75df32f05f06620381bd48821b8d6c57
| 122
|
py
|
Python
|
bot/exceptions.py
|
rafaelpivatto/my-instants-discord-bot
|
e02a61e68995400fd4da4e7d8d9d10ed2ebb8ea0
|
[
"MIT"
] | 1
|
2021-06-20T20:02:21.000Z
|
2021-06-20T20:02:21.000Z
|
bot/exceptions.py
|
rafaelpivatto/my-instants-discord-bot
|
e02a61e68995400fd4da4e7d8d9d10ed2ebb8ea0
|
[
"MIT"
] | null | null | null |
bot/exceptions.py
|
rafaelpivatto/my-instants-discord-bot
|
e02a61e68995400fd4da4e7d8d9d10ed2ebb8ea0
|
[
"MIT"
] | 2
|
2021-08-25T01:15:51.000Z
|
2022-02-08T13:56:59.000Z
|
class VoiceError(Exception):
pass
class YTDLError(Exception):
pass
class MissingBotToken(Exception):
pass
| 11.090909
| 33
| 0.721311
| 12
| 122
| 7.333333
| 0.5
| 0.443182
| 0.409091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.204918
| 122
| 10
| 34
| 12.2
| 0.907216
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 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
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
b19975371f01294d79715a6a90d249aa07b02d20
| 21
|
py
|
Python
|
test.py
|
mitchell011/csws-week1
|
4d2817e6b31987df54250811107ae9f2ff4a8cdb
|
[
"Apache-2.0"
] | null | null | null |
test.py
|
mitchell011/csws-week1
|
4d2817e6b31987df54250811107ae9f2ff4a8cdb
|
[
"Apache-2.0"
] | null | null | null |
test.py
|
mitchell011/csws-week1
|
4d2817e6b31987df54250811107ae9f2ff4a8cdb
|
[
"Apache-2.0"
] | null | null | null |
print ("Test branch")
| 21
| 21
| 0.714286
| 3
| 21
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095238
| 21
| 1
| 21
| 21
| 0.789474
| 0
| 0
| 0
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
b1a945f00b1e76c33a864182664f4f2748108055
| 479
|
py
|
Python
|
temboo/core/Library/Google/Drive/Revisions/__init__.py
|
jordanemedlock/psychtruths
|
52e09033ade9608bd5143129f8a1bfac22d634dd
|
[
"Apache-2.0"
] | 7
|
2016-03-07T02:07:21.000Z
|
2022-01-21T02:22:41.000Z
|
temboo/core/Library/Google/Drive/Revisions/__init__.py
|
jordanemedlock/psychtruths
|
52e09033ade9608bd5143129f8a1bfac22d634dd
|
[
"Apache-2.0"
] | null | null | null |
temboo/core/Library/Google/Drive/Revisions/__init__.py
|
jordanemedlock/psychtruths
|
52e09033ade9608bd5143129f8a1bfac22d634dd
|
[
"Apache-2.0"
] | 8
|
2016-06-14T06:01:11.000Z
|
2020-04-22T09:21:44.000Z
|
from temboo.Library.Google.Drive.Revisions.Delete import Delete, DeleteInputSet, DeleteResultSet, DeleteChoreographyExecution
from temboo.Library.Google.Drive.Revisions.Get import Get, GetInputSet, GetResultSet, GetChoreographyExecution
from temboo.Library.Google.Drive.Revisions.List import List, ListInputSet, ListResultSet, ListChoreographyExecution
from temboo.Library.Google.Drive.Revisions.Update import Update, UpdateInputSet, UpdateResultSet, UpdateChoreographyExecution
| 95.8
| 125
| 0.874739
| 48
| 479
| 8.729167
| 0.479167
| 0.095465
| 0.162291
| 0.21957
| 0.353222
| 0.353222
| 0
| 0
| 0
| 0
| 0
| 0
| 0.058455
| 479
| 4
| 126
| 119.75
| 0.929047
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
490cd423da82c0ed963e71e90d128d1a475a572f
| 38
|
py
|
Python
|
tests/__init__.py
|
dib-lab/charcoal
|
b9c2b8d920f7b144c28daae5eba7ee46646ac287
|
[
"BSD-3-Clause"
] | 21
|
2020-05-08T20:51:19.000Z
|
2022-02-04T23:00:17.000Z
|
tests/__init__.py
|
dib-lab/charcoal
|
b9c2b8d920f7b144c28daae5eba7ee46646ac287
|
[
"BSD-3-Clause"
] | 162
|
2020-03-11T21:32:28.000Z
|
2022-03-09T01:02:14.000Z
|
tests/__init__.py
|
dib-lab/charcoal
|
b9c2b8d920f7b144c28daae5eba7ee46646ac287
|
[
"BSD-3-Clause"
] | 1
|
2020-03-11T21:24:13.000Z
|
2020-03-11T21:24:13.000Z
|
# this file intentionally left blank
| 12.666667
| 36
| 0.789474
| 5
| 38
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.184211
| 38
| 2
| 37
| 19
| 0.967742
| 0.894737
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
492d5cc0745fc25b277ec1fa71119f694f9dcba9
| 12,358
|
py
|
Python
|
test/hummingbot/connector/derivative/binance_perpetual/test_binance_perpetual_derivative.py
|
vraptor75011/hummingbot
|
9bf8e0cc16c00e7458185a2a772a46f1b08f56db
|
[
"Apache-2.0"
] | 1
|
2021-09-25T11:59:12.000Z
|
2021-09-25T11:59:12.000Z
|
test/hummingbot/connector/derivative/binance_perpetual/test_binance_perpetual_derivative.py
|
vraptor75011/hummingbot
|
9bf8e0cc16c00e7458185a2a772a46f1b08f56db
|
[
"Apache-2.0"
] | null | null | null |
test/hummingbot/connector/derivative/binance_perpetual/test_binance_perpetual_derivative.py
|
vraptor75011/hummingbot
|
9bf8e0cc16c00e7458185a2a772a46f1b08f56db
|
[
"Apache-2.0"
] | null | null | null |
import asyncio
import json
import unittest
from typing import Any, List, Dict
from unittest.mock import patch, AsyncMock
import pandas as pd
from hummingbot.connector.derivative.binance_perpetual.binance_perpetual_derivative import BinancePerpetualDerivative
from test.hummingbot.connector.network_mocking_assistant import NetworkMockingAssistant
class BinancePerpetualDerivativeUnitTest(unittest.TestCase):
start_timestamp: float = pd.Timestamp("2021-01-01", tz="UTC").timestamp()
@classmethod
def setUpClass(cls) -> None:
super().setUpClass()
cls.base_asset = "COINALPHA"
cls.quote_asset = "HBOT"
cls.trading_pair = f"{cls.base_asset}-{cls.quote_asset}"
cls.symbol = f"{cls.base_asset}{cls.quote_asset}"
@patch("hummingbot.connector.exchange.binance.binance_time.BinanceTime.start")
def setUp(self, mocked_binance_time_start) -> None:
super().setUp()
self.ev_loop = asyncio.get_event_loop()
self.api_responses = asyncio.Queue()
self.ws_sent_messages = []
self.ws_incoming_messages = asyncio.Queue()
self.resume_test_event = asyncio.Event()
self._finalMessage = 'FinalDummyMessage'
self.exchange = BinancePerpetualDerivative(
binance_perpetual_api_key="testAPIKey",
binance_perpetual_api_secret="testSecret",
trading_pairs=[self.trading_pair],
)
self.mocking_assistant = NetworkMockingAssistant()
async def _get_next_api_response(self):
message = await self.api_responses.get()
self.api_responses.task_done()
return message
def _set_mock_response(self, mock_api, status: int, json_data: Any, text_data: str = ""):
self.api_responses.put_nowait(json_data)
mock_api.return_value.status = status
mock_api.return_value.json.side_effect = self._get_next_api_response
mock_api.return_value.text = AsyncMock(return_value=text_data)
async def _await_all_api_responses_delivered(self):
await self.api_responses.join()
def _get_position_risk_api_endpoint_single_position_list(self) -> List[Dict[str, Any]]:
positions = [
{
"symbol": self.symbol,
"positionAmt": "1",
"entryPrice": "10",
"markPrice": "11",
"unRealizedProfit": "1",
"liquidationPrice": "100",
"leverage": "1",
"maxNotionalValue": "9",
"marginType": "cross",
"isolatedMargin": "0",
"isAutoAddMargin": "false",
"positionSide": "BOTH",
"notional": "11",
"isolatedWallet": "0",
"updateTime": int(self.start_timestamp),
}
]
return positions
def _create_ws_mock(self):
ws = AsyncMock()
ws.send.side_effect = lambda sent_message: self.ws_sent_messages.append(sent_message)
ws.recv.side_effect = self._get_next_ws_received_message
return ws
async def _get_next_ws_received_message(self):
message = await self.ws_incoming_messages.get()
if json.loads(message) == self._finalMessage:
self.resume_test_event.set()
return message
def _get_account_update_ws_event_single_position_dict(self) -> Dict[str, Any]:
account_update = {
"e": "ACCOUNT_UPDATE",
"E": 1564745798939,
"T": 1564745798938,
"a": {
"m": "POSITION",
"B": [
{
"a": "USDT",
"wb": "122624.12345678",
"cw": "100.12345678",
"bc": "50.12345678"
},
],
"P": [
{
"s": self.symbol,
"pa": "1",
"ep": "10",
"cr": "200",
"up": "1",
"mt": "cross",
"iw": "0.00000000",
"ps": "BOTH"
},
]
}
}
return account_update
@patch("aiohttp.ClientSession.request", new_callable=AsyncMock)
def test_existing_account_position_detected_on_positions_update(self, req_mock):
positions = self._get_position_risk_api_endpoint_single_position_list()
self.mocking_assistant.configure_http_request_mock(req_mock)
self.mocking_assistant.add_http_response(req_mock, 200, positions)
task = self.ev_loop.create_task(self.exchange._update_positions())
self.ev_loop.run_until_complete(task)
self.assertEqual(len(self.exchange.account_positions), 1)
pos = list(self.exchange.account_positions.values())[0]
self.assertEqual(pos.trading_pair.replace("-", ""), self.symbol)
@patch("aiohttp.ClientSession.request", new_callable=AsyncMock)
def test_account_position_updated_on_positions_update(self, req_mock):
positions = self._get_position_risk_api_endpoint_single_position_list()
self.mocking_assistant.configure_http_request_mock(req_mock)
self.mocking_assistant.add_http_response(req_mock, 200, positions)
task = self.ev_loop.create_task(self.exchange._update_positions())
self.ev_loop.run_until_complete(task)
self.assertEqual(len(self.exchange.account_positions), 1)
pos = list(self.exchange.account_positions.values())[0]
self.assertEqual(pos.amount, 1)
positions[0]["positionAmt"] = "2"
self.mocking_assistant.add_http_response(req_mock, 200, positions)
task = self.ev_loop.create_task(self.exchange._update_positions())
self.ev_loop.run_until_complete(task)
pos = list(self.exchange.account_positions.values())[0]
self.assertEqual(pos.amount, 2)
@patch("aiohttp.ClientSession.request", new_callable=AsyncMock)
def test_new_account_position_detected_on_positions_update(self, req_mock):
self.mocking_assistant.configure_http_request_mock(req_mock)
self.mocking_assistant.add_http_response(req_mock, 200, [])
task = self.ev_loop.create_task(self.exchange._update_positions())
self.ev_loop.run_until_complete(task)
self.assertEqual(len(self.exchange.account_positions), 0)
positions = self._get_position_risk_api_endpoint_single_position_list()
self.mocking_assistant.add_http_response(req_mock, 200, positions)
task = self.ev_loop.create_task(self.exchange._update_positions())
self.ev_loop.run_until_complete(task)
self.assertEqual(len(self.exchange.account_positions), 1)
@patch("aiohttp.ClientSession.request", new_callable=AsyncMock)
def test_closed_account_position_removed_on_positions_update(self, req_mock):
positions = self._get_position_risk_api_endpoint_single_position_list()
self.mocking_assistant.configure_http_request_mock(req_mock)
self.mocking_assistant.add_http_response(req_mock, 200, positions)
task = self.ev_loop.create_task(self.exchange._update_positions())
self.ev_loop.run_until_complete(task)
self.assertEqual(len(self.exchange.account_positions), 1)
positions[0]["positionAmt"] = "0"
self.mocking_assistant.add_http_response(req_mock, 200, positions)
task = self.ev_loop.create_task(self.exchange._update_positions())
self.ev_loop.run_until_complete(task)
self.assertEqual(len(self.exchange.account_positions), 0)
@patch("aiohttp.ClientSession.request", new_callable=AsyncMock)
@patch("websockets.connect", new_callable=AsyncMock)
@patch("aiohttp.ClientSession.post", new_callable=AsyncMock)
def test_new_account_position_detected_on_stream_event(self, post_mock, ws_connect_mock, req_mock):
self.mocking_assistant.configure_http_request_mock(post_mock)
self.mocking_assistant.add_http_response(post_mock, 200, {"listenKey": "someListenKey"})
ws_connect_mock.return_value = self.mocking_assistant.create_websocket_mock()
self.ev_loop.create_task(self.exchange._user_stream_tracker.start())
self.assertEqual(len(self.exchange.account_positions), 0)
account_update = self._get_account_update_ws_event_single_position_dict()
self.mocking_assistant.add_websocket_text_message(ws_connect_mock.return_value, json.dumps(account_update))
positions = self._get_position_risk_api_endpoint_single_position_list()
self.mocking_assistant.configure_http_request_mock(req_mock)
self.mocking_assistant.add_http_response(req_mock, 200, positions)
self.ev_loop.create_task(self.exchange._user_stream_event_listener())
asyncio.get_event_loop().run_until_complete(asyncio.sleep(0.3))
self.assertEqual(len(self.exchange.account_positions), 1)
@patch("aiohttp.ClientSession.request", new_callable=AsyncMock)
@patch("websockets.connect", new_callable=AsyncMock)
@patch("aiohttp.ClientSession.post", new_callable=AsyncMock)
def test_account_position_updated_on_stream_event(self, post_mock, ws_connect_mock, req_mock):
positions = self._get_position_risk_api_endpoint_single_position_list()
self.mocking_assistant.configure_http_request_mock(req_mock)
self.mocking_assistant.add_http_response(req_mock, 200, positions)
task = self.ev_loop.create_task(self.exchange._update_positions())
self.ev_loop.run_until_complete(task)
self.mocking_assistant.configure_http_request_mock(post_mock)
self.mocking_assistant.add_http_response(post_mock, 200, {"listenKey": "someListenKey"})
ws_connect_mock.return_value = self.mocking_assistant.create_websocket_mock()
self.ev_loop.create_task(self.exchange._user_stream_tracker.start())
self.ev_loop.run_until_complete(self._await_all_api_responses_delivered())
self.assertEqual(len(self.exchange.account_positions), 1)
pos = list(self.exchange.account_positions.values())[0]
self.assertEqual(pos.amount, 1)
account_update = self._get_account_update_ws_event_single_position_dict()
account_update["a"]["P"][0]["pa"] = 2
self.mocking_assistant.add_websocket_text_message(ws_connect_mock.return_value, json.dumps(account_update))
self.ev_loop.create_task(self.exchange._user_stream_event_listener())
self.ev_loop.run_until_complete(asyncio.sleep(0.3))
self.assertEqual(len(self.exchange.account_positions), 1)
pos = list(self.exchange.account_positions.values())[0]
self.assertEqual(pos.amount, 2)
@patch("aiohttp.ClientSession.request", new_callable=AsyncMock)
@patch("websockets.connect", new_callable=AsyncMock)
@patch("aiohttp.ClientSession.post", new_callable=AsyncMock)
def test_closed_account_position_removed_on_stream_event(self, post_mock, ws_connect_mock, req_mock):
positions = self._get_position_risk_api_endpoint_single_position_list()
self.mocking_assistant.configure_http_request_mock(req_mock)
self.mocking_assistant.add_http_response(req_mock, 200, positions)
task = self.ev_loop.create_task(self.exchange._update_positions())
self.ev_loop.run_until_complete(task)
self.mocking_assistant.configure_http_request_mock(post_mock)
self.mocking_assistant.add_http_response(post_mock, 200, {"listenKey": "someListenKey"})
ws_connect_mock.return_value = self.mocking_assistant.create_websocket_mock()
self.ev_loop.create_task(self.exchange._user_stream_tracker.start())
self.ev_loop.run_until_complete(self._await_all_api_responses_delivered())
self.assertEqual(len(self.exchange.account_positions), 1)
account_update = self._get_account_update_ws_event_single_position_dict()
account_update["a"]["P"][0]["pa"] = 0
self.mocking_assistant.add_websocket_text_message(ws_connect_mock.return_value, json.dumps(account_update))
self.ev_loop.create_task(self.exchange._user_stream_event_listener())
self.ev_loop.run_until_complete(asyncio.sleep(0.3))
self.assertEqual(len(self.exchange.account_positions), 0)
| 45.77037
| 117
| 0.690727
| 1,468
| 12,358
| 5.432561
| 0.135559
| 0.049655
| 0.075235
| 0.059687
| 0.735549
| 0.72464
| 0.720502
| 0.713981
| 0.708464
| 0.670345
| 0
| 0.017742
| 0.206425
| 12,358
| 269
| 118
| 45.94052
| 0.795452
| 0
| 0
| 0.46789
| 0
| 0
| 0.077278
| 0.033662
| 0
| 0
| 0
| 0
| 0.077982
| 1
| 0.059633
| false
| 0
| 0.036697
| 0
| 0.12844
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 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
| 5
|
4943d7de4bf5d3b7872ae78a61e6852d4a8dad58
| 34
|
py
|
Python
|
livemark/plugins/cleanup/__init__.py
|
AyrtonB/livemark
|
f8c49d449ea6242c674cf345823468aaabea6e6b
|
[
"MIT"
] | 73
|
2021-06-07T13:28:36.000Z
|
2022-03-26T05:37:59.000Z
|
livemark/plugins/cleanup/__init__.py
|
AyrtonB/livemark
|
f8c49d449ea6242c674cf345823468aaabea6e6b
|
[
"MIT"
] | 120
|
2021-06-04T12:51:01.000Z
|
2022-03-21T11:11:36.000Z
|
livemark/plugins/cleanup/__init__.py
|
AyrtonB/livemark
|
f8c49d449ea6242c674cf345823468aaabea6e6b
|
[
"MIT"
] | 7
|
2021-09-22T11:38:26.000Z
|
2022-03-26T05:35:58.000Z
|
from .plugin import CleanupPlugin
| 17
| 33
| 0.852941
| 4
| 34
| 7.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 34
| 1
| 34
| 34
| 0.966667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
4956d39c1c390a6001a4d8f3da44d4fd18dc72bf
| 255
|
py
|
Python
|
django_contact_form/contact/forms.py
|
bakanao/django-contact-form
|
8d3a729140af29dd1ef1a2f1ee1695ec5f050af7
|
[
"MIT"
] | null | null | null |
django_contact_form/contact/forms.py
|
bakanao/django-contact-form
|
8d3a729140af29dd1ef1a2f1ee1695ec5f050af7
|
[
"MIT"
] | null | null | null |
django_contact_form/contact/forms.py
|
bakanao/django-contact-form
|
8d3a729140af29dd1ef1a2f1ee1695ec5f050af7
|
[
"MIT"
] | null | null | null |
from django import forms
class ContactForm(forms.Form):
first_name = forms.CharField(max_length=100, required=True)
last_name = forms.CharField(max_length=100, required=True)
email = forms.CharField(widget=forms.EmailInput(), required=True)
| 31.875
| 69
| 0.764706
| 34
| 255
| 5.617647
| 0.558824
| 0.219895
| 0.188482
| 0.219895
| 0.439791
| 0.439791
| 0.439791
| 0.439791
| 0
| 0
| 0
| 0.026906
| 0.12549
| 255
| 7
| 70
| 36.428571
| 0.829596
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
49607bb513cc5a94b71eeb77d93d2bc70940ec9d
| 95
|
py
|
Python
|
ed_bgs/elitebgs_app/__init__.py
|
Athanasius/edbgs-mgr
|
1bb5d34730c15ea486c68d82ff8dac8620da2a68
|
[
"CC-BY-4.0"
] | 1
|
2022-02-09T07:12:50.000Z
|
2022-02-09T07:12:50.000Z
|
ed_bgs/elitebgs_app/__init__.py
|
Athanasius/edbgs-mgr
|
1bb5d34730c15ea486c68d82ff8dac8620da2a68
|
[
"CC-BY-4.0"
] | null | null | null |
ed_bgs/elitebgs_app/__init__.py
|
Athanasius/edbgs-mgr
|
1bb5d34730c15ea486c68d82ff8dac8620da2a68
|
[
"CC-BY-4.0"
] | null | null | null |
"""elitebgs.app API module."""
from ed_bgs.elitebgs_app.elitebgs import EliteBGS # noqa: F401
| 31.666667
| 63
| 0.757895
| 14
| 95
| 5
| 0.714286
| 0.314286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.035714
| 0.115789
| 95
| 2
| 64
| 47.5
| 0.797619
| 0.378947
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
4971c6e7b8e34d53358e71f96606c2022753c169
| 59
|
py
|
Python
|
baseq/mgt/__init__.py
|
basedata10/baseq
|
0f1786c3392a51a6ec7cb0f32355cd28eaa5df29
|
[
"MIT"
] | 1
|
2018-08-30T20:29:17.000Z
|
2018-08-30T20:29:17.000Z
|
baseq/mgt/__init__.py
|
basedata10/baseq
|
0f1786c3392a51a6ec7cb0f32355cd28eaa5df29
|
[
"MIT"
] | null | null | null |
baseq/mgt/__init__.py
|
basedata10/baseq
|
0f1786c3392a51a6ec7cb0f32355cd28eaa5df29
|
[
"MIT"
] | null | null | null |
from .config import get_config
from .command import run_cmd
| 29.5
| 30
| 0.847458
| 10
| 59
| 4.8
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.118644
| 59
| 2
| 31
| 29.5
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
499f94120baddb88d860d9637549421a0679c514
| 140
|
py
|
Python
|
vit/formatter/entry_remaining.py
|
kinifwyne/vit
|
e2cbafce922b1e09c4a66e7dc9592c51fe628e9d
|
[
"MIT"
] | 179
|
2020-07-28T08:21:51.000Z
|
2022-03-30T21:39:37.000Z
|
vit/formatter/entry_remaining.py
|
kinifwyne/vit
|
e2cbafce922b1e09c4a66e7dc9592c51fe628e9d
|
[
"MIT"
] | 255
|
2017-02-01T11:49:12.000Z
|
2020-07-26T22:31:25.000Z
|
vit/formatter/entry_remaining.py
|
kinifwyne/vit
|
e2cbafce922b1e09c4a66e7dc9592c51fe628e9d
|
[
"MIT"
] | 26
|
2017-01-17T20:31:13.000Z
|
2020-06-17T13:09:01.000Z
|
from vit.formatter.entry import Entry
class EntryRemaining(Entry):
def format(self, entry, task):
return self.remaining(entry)
| 23.333333
| 37
| 0.728571
| 18
| 140
| 5.666667
| 0.722222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.178571
| 140
| 5
| 38
| 28
| 0.886957
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.25
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
b8deedc4b8e3bb157db3297847c092a0e35d29be
| 206
|
py
|
Python
|
fastai/vision/all.py
|
sky1ove/fastai
|
2e786feb54c2b990a98d7fbbc084e893e309ab61
|
[
"Apache-2.0"
] | 23,140
|
2017-09-09T18:23:40.000Z
|
2022-03-31T11:49:36.000Z
|
fastai/vision/all.py
|
sky1ove/fastai
|
2e786feb54c2b990a98d7fbbc084e893e309ab61
|
[
"Apache-2.0"
] | 3,077
|
2017-09-16T07:08:31.000Z
|
2022-03-31T20:14:16.000Z
|
fastai/vision/all.py
|
sky1ove/fastai
|
2e786feb54c2b990a98d7fbbc084e893e309ab61
|
[
"Apache-2.0"
] | 8,740
|
2017-09-11T02:19:40.000Z
|
2022-03-31T11:29:18.000Z
|
from . import models
from ..basics import *
from ..callback.all import *
from .augment import *
from .core import *
from .data import *
from .models.all import *
from .learner import *
from .utils import *
| 20.6
| 28
| 0.723301
| 29
| 206
| 5.137931
| 0.37931
| 0.469799
| 0.174497
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.174757
| 206
| 9
| 29
| 22.888889
| 0.876471
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
b8fc8ccc7df8e5dc8652b904690029050bc96b3a
| 96
|
py
|
Python
|
venv/lib/python3.8/site-packages/poetry/console/commands/env/use.py
|
GiulianaPola/select_repeats
|
17a0d053d4f874e42cf654dd142168c2ec8fbd11
|
[
"MIT"
] | 2
|
2022-03-13T01:58:52.000Z
|
2022-03-31T06:07:54.000Z
|
venv/lib/python3.8/site-packages/poetry/console/commands/env/use.py
|
DesmoSearch/Desmobot
|
b70b45df3485351f471080deb5c785c4bc5c4beb
|
[
"MIT"
] | 19
|
2021-11-20T04:09:18.000Z
|
2022-03-23T15:05:55.000Z
|
venv/lib/python3.8/site-packages/poetry/console/commands/env/use.py
|
DesmoSearch/Desmobot
|
b70b45df3485351f471080deb5c785c4bc5c4beb
|
[
"MIT"
] | null | null | null |
/home/runner/.cache/pip/pool/25/a1/9f/70ee6cfdde3c30eff065df37aef29f108be5735ab6bb87de91303cc443
| 96
| 96
| 0.895833
| 9
| 96
| 9.555556
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.364583
| 0
| 96
| 1
| 96
| 96
| 0.53125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
7706064b7af5987a43056dedda6d06fb3d89f83a
| 66
|
py
|
Python
|
timerecorder/baseTracker.py
|
fenugrec/dirt-rally-time-recorder
|
0f91fc49e9ed9b34afd9a11676ecd51a58a6d596
|
[
"CC-BY-3.0",
"Apache-2.0",
"MIT"
] | null | null | null |
timerecorder/baseTracker.py
|
fenugrec/dirt-rally-time-recorder
|
0f91fc49e9ed9b34afd9a11676ecd51a58a6d596
|
[
"CC-BY-3.0",
"Apache-2.0",
"MIT"
] | null | null | null |
timerecorder/baseTracker.py
|
fenugrec/dirt-rally-time-recorder
|
0f91fc49e9ed9b34afd9a11676ecd51a58a6d596
|
[
"CC-BY-3.0",
"Apache-2.0",
"MIT"
] | null | null | null |
class BaseTracker():
def track(self, stats):
pass
| 16.5
| 27
| 0.560606
| 7
| 66
| 5.285714
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 66
| 4
| 28
| 16.5
| 0.840909
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.333333
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
770b7622edc0e033f94a22ed1113857ac09fa827
| 106
|
py
|
Python
|
config/test_run.py
|
ibalagurov/selenoid_workshop
|
39a3d9348e41fe508cbfa46954d2e3aecb05e638
|
[
"MIT"
] | 1
|
2020-08-24T07:41:29.000Z
|
2020-08-24T07:41:29.000Z
|
config/test_run.py
|
ibalagurov/selenoid_workshop
|
39a3d9348e41fe508cbfa46954d2e3aecb05e638
|
[
"MIT"
] | null | null | null |
config/test_run.py
|
ibalagurov/selenoid_workshop
|
39a3d9348e41fe508cbfa46954d2e3aecb05e638
|
[
"MIT"
] | null | null | null |
from config import env
ONE_SESSION = env.get_bool("ONE_SESSION", False)
GGR = env.get_bool("GGR", False)
| 21.2
| 48
| 0.745283
| 18
| 106
| 4.166667
| 0.555556
| 0.266667
| 0.266667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122642
| 106
| 4
| 49
| 26.5
| 0.806452
| 0
| 0
| 0
| 0
| 0
| 0.132075
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
7712ea193d070bd27f73798c89535581822667d0
| 11,931
|
py
|
Python
|
lib/utils/track_pose.py
|
ZXin0305/hri
|
b91d89158fc2d05ca4d3ea3ba4a7b9f69b0221a2
|
[
"Apache-2.0"
] | null | null | null |
lib/utils/track_pose.py
|
ZXin0305/hri
|
b91d89158fc2d05ca4d3ea3ba4a7b9f69b0221a2
|
[
"Apache-2.0"
] | null | null | null |
lib/utils/track_pose.py
|
ZXin0305/hri
|
b91d89158fc2d05ca4d3ea3ba4a7b9f69b0221a2
|
[
"Apache-2.0"
] | null | null | null |
import sys
sys.path.append('/home/xuchengjun/ZXin/smap')
import numpy as np
from track import *
from IPython import embed
from lib.utils.one_euro_filter import OneEuroFilter
color_list = [(255,0,255),(255,255,0),(0,255,255),(0,200,200),(100,0,200),(150,250,200),
(120,120,40),(200,255,120),(155,120,0),(150,200,200),(255,255,170),(180,147,250),
(255,120,40),(170,165,110),(200,120,200),(200,200,200),(180,255,104),(100,200,100),
(70,80,90),(255,200,137),(98,30,24),(100,200,255),(165,168,200),(240,125,250)]
def pose_color(human_id, max_human):
color = (200,200,0)
if human_id >= 0 and human_id < max_human:
color = color_list[human_id]
return color
class HumanPoseID:
num_kpts = 15
def __init__(self, human_pose, human_id):
self.human_id = human_id
self.human_pose = self.change_pose_to_mat(human_pose)
self.filter = [[OneEuroFilter(),OneEuroFilter(),OneEuroFilter()] for _ in range(HumanPoseID.num_kpts)]
def change_pose_to_mat(self, human_pose):
pose_mat = np.zeros(shape=(3,15,15),dtype=np.float)
for i in range(3):
row, col = np.diag_indices_from(pose_mat[i])
pose_mat[i][row, col] = human_pose[:, i]
return pose_mat
# def track_pose(last_pose_list, current_pose_list, last_id, thres=0.75, max_human = 10):
# if len(last_pose_list) >= len(current_pose_list): # 前面一帧的姿态大于或者等于当前帧的
# is_occupy = [0] * len(last_pose_list)
# for current_human_pose in current_pose_list:
# similar_list = []
# for i, last_human_pose in enumerate(last_pose_list):
# dis_mat = current_human_pose.human_pose - last_human_pose.human_pose
# numera = np.sum(dis_mat ** 2, axis=(1, 2))
# denom = np.sum(last_human_pose.human_pose ** 2, axis=(1, 2))
# similar = np.sum([1.0,1.0,1.0] - (numera / denom)) / 3 # 一共三个通道 x/y/z
# similar_list.append((i,similar))
# similar_list.sort(key=lambda x: x[1],reverse=True)
# if similar_list[0][1] >= thres and is_occupy[similar_list[0][0]] == 0: # 相似度 和 是否已经匹配
# is_occupy[similar_list[0][0]] = 1
# current_human_pose.human_id = last_pose_list[similar_list[0][0]].human_id #注意这里,如果是前面一帧的姿态大于当前帧的,那么这里的是直接用对应的current_human_pose
# elif len(last_pose_list) < len(current_pose_list): # 前面一帧的姿态小于当前帧的
# is_occupy = [0] * len(current_pose_list)
# for last_human_pose in last_pose_list:
# similar_list = []
# for i, current_human_pose in enumerate(current_pose_list):
# dis_mat = current_human_pose.human_pose - last_human_pose.human_pose
# numera = np.sum(dis_mat ** 2, axis=(1, 2))
# denom = np.sum(last_human_pose.human_pose ** 2, axis=(1, 2))
# similar = np.sum([1.0,1.0,1.0] - (numera / denom)) / 3
# similar_list.append((i,similar))
# similar_list.sort(key=lambda x: x[1],reverse=True) #利用相似度进行排序
# #选取相似度最大的进行排序
# if similar_list[0][1] >= thres and is_occupy[similar_list[0][0]] == 0: # 相似度 和 是否已经匹配
# is_occupy[similar_list[0][0]] = 1
# current_pose_list[similar_list[0][0]].human_id = last_human_pose.human_id
# # 可以匹配的已经完成了匹配
# # 对于未匹配的,赋予全新的id, 不过是根据last_id
# for current_human_pose in current_pose_list:
# if current_human_pose.human_id == -1 and last_id < max_human:
# current_human_pose.human_id = last_id
# last_id += 1
# return last_id
class TRACK:
def __init__(self):
pass
def track_pose(self, consec_list, last_pose_list, current_pose_list, last_id, thres=0.75, max_human = 10):
have_paired = []
#姿态列表中的数量小于最大搜索帧
#当前帧中的值会与上一帧中的序列进行逐一匹配
is_occupy = [0] * len(last_pose_list)
for current_human_pose in current_pose_list:
similar_list = [] #每次循环都初始化这个相似性列表
for i, last_human_pose in enumerate(last_pose_list):
similar = self.cal_sim(last_human_pose.human_pose, current_human_pose.human_pose)
similar_list.append((i,similar))
similar_list.sort(key=lambda x: x[1],reverse=True)
if similar_list[0][1] >= thres and is_occupy[similar_list[0][0]] == 0: # 相似度 和 是否已经匹配
is_occupy[similar_list[0][0]] = 1
current_human_pose.human_id = last_pose_list[similar_list[0][0]].human_id
# if current_human_pose.human_id == 0:
# print(similar_list)
current_human_pose.filter = last_pose_list[similar_list[0][0]].filter
have_paired.append(current_human_pose.human_id) #当前帧中的这个已经匹配了
#告诉后面搜索的范围排除掉这些已经经过匹配的
# 进入姿态列表中进行向前搜索
for current_human_pose in current_pose_list:
if current_human_pose.human_id == -1: #如果当前帧中还存在未匹配的帧数,那么就会进行向前搜索
frame_ptr = -2 #定义搜索的帧,值会越来越小
#搜索的主体
while frame_ptr >= -len(consec_list):
last_pose_list = consec_list[frame_ptr] #更新上一帧的姿态列表元素
is_occupy = [0] * len(last_pose_list)
similar_list = [] #对当前的id仍为-1的进行搜索
for i, last_human_pose in enumerate(last_pose_list):
tmp_id = last_human_pose.human_id
if tmp_id in have_paired: #如果匹配过了,会继续与last中别的姿态进行匹配
is_occupy[i] = 1
continue
similar = self.cal_sim(last_human_pose.human_pose, current_human_pose.human_pose)
similar_list.append((i,similar))
#如果last中的所有姿态都是已经匹配了的,那么similar_list的长度就会为0
#此时就直接往前搜索了
if len(similar_list) > 0:
similar_list.sort(key=lambda x: x[1],reverse=True)
if similar_list[0][1] >= thres and is_occupy[similar_list[0][0]] == 0: # 相似度 和 是否已经匹配
is_occupy[similar_list[0][0]] = 1
current_human_pose.human_id = last_pose_list[similar_list[0][0]].human_id
current_human_pose.filter = last_pose_list[similar_list[0][0]].filter
have_paired.append(current_human_pose.human_id)
frame_ptr -= 1
for current_human_pose in current_pose_list:
if current_human_pose.human_id == -1 and last_id < max_human:
current_human_pose.human_id = last_id
last_id += 1
return last_id
def cal_sim(self, last_human_pose, current_human_pose, sigma=2):
#计算相似性
dis_mat = current_human_pose - last_human_pose
numera = np.sum(dis_mat ** 2, axis=(1, 2))
denom = np.sum(last_human_pose ** 2, axis=(1, 2))
similar = np.exp( (-1) * np.sum(numera / denom) / sigma** 2) # 一共三个通道 x/y/z
# similar = np.sum([1.0,1.0,1.0] - (numera / denom)) / 3 # 一共三个通道 x/y/z
# temp = [1.0,1.0,1.0] - (numera / denom)
# similar = 0.2 * temp[0] + 0.2 * temp[1] + 0.6 * temp[2]
return similar
def track_pose(consec_list, last_pose_list, current_pose_list, last_id, thres=0.75, max_human = 10):
have_paired = []
#姿态列表中的数量小于最大搜索帧
#当前帧中的值会与上一帧中的序列进行逐一匹配
is_occupy = [0] * len(last_pose_list)
for current_human_pose in current_pose_list:
similar_list = [] #每次循环都初始化这个相似性列表
for i, last_human_pose in enumerate(last_pose_list):
#计算相似性
dis_mat = current_human_pose.human_pose - last_human_pose.human_pose
numera = np.sum(dis_mat ** 2, axis=(1, 2))
denom = np.sum(last_human_pose.human_pose ** 2, axis=(1, 2))
similar = np.sum([1.0,1.0,1.0] - (numera / denom)) / 3 # 一共三个通道 x/y/z
# temp = [1.0,1.0,1.0] - (numera / denom)
# similar = 0.2 * temp[0] + 0.2 * temp[1] + 0.6 * temp[2]
similar_list.append((i,similar))
similar_list.sort(key=lambda x: x[1],reverse=True)
print(similar_list)
if similar_list[0][1] >= thres and is_occupy[similar_list[0][0]] == 0: # 相似度 和 是否已经匹配
is_occupy[similar_list[0][0]] = 1
current_human_pose.human_id = last_pose_list[similar_list[0][0]].human_id
have_paired.append(current_human_pose.human_id) #当前帧中的这个已经匹配了
#告诉后面搜索的范围排除掉这些已经经过匹配的
# 进入姿态列表中进行向前搜索
for current_human_pose in current_pose_list:
if current_human_pose.human_id == -1: #如果当前帧中还存在未匹配的帧数,那么就会进行向前搜索
frame_ptr = -3 #定义搜索的帧,值会越来越小
#搜索的主体
while frame_ptr >= -len(consec_list):
last_pose_list = consec_list[frame_ptr] #更新上一帧的姿态列表元素
is_occupy = [0] * len(last_pose_list)
similar_list = [] #对当前的id仍为-1的进行搜索
for i, last_human_pose in enumerate(last_pose_list):
tmp_id = last_human_pose.human_id
if tmp_id in have_paired: #如果匹配过了,会继续与last中别的姿态进行匹配
is_occupy[i] = 1
continue
#相似性
dis_mat = current_human_pose.human_pose - last_human_pose.human_pose
numera = np.sum(dis_mat ** 2, axis=(1, 2))
denom = np.sum(last_human_pose.human_pose ** 2, axis=(1, 2))
similar = np.sum([1.0,1.0,1.0] - (numera / denom)) / 3 # 一共三个通道 x/y/z
# temp = [1.0,1.0,1.0] - (numera / denom)
# similar = 0.2 * temp[0] + 0.2 * temp[1] + 0.6 * temp[2]
similar_list.append((i,similar))
#如果last中的所有姿态都是已经匹配了的,那么similar_list的长度就会为0
#此时就直接往前搜索了
if len(similar_list) > 0:
similar_list.sort(key=lambda x: x[1],reverse=True)
if similar_list[0][1] >= thres and is_occupy[similar_list[0][0]] == 0: # 相似度 和 是否已经匹配
is_occupy[similar_list[0][0]] = 1
current_human_pose.human_id = last_pose_list[similar_list[0][0]].human_id
have_paired.append(current_human_pose.human_id)
frame_ptr -= 1
for current_human_pose in current_pose_list:
if current_human_pose.human_id == -1 and last_id < max_human:
current_human_pose.human_id = last_id
last_id += 1
return last_id
if __name__ == "__main__":
#这里是得到的每次的pose列表 --> numpy
#运行demo的时候,这里记得
last_id = 0
thres = 0.75
frame = 1
last_frame_human = [test, last_frame] #这两个到时候只用到一个就可以了 new_pred_bodys_3d
current_frame_human = [first_frame, test_1]
last_pose_list = [] #这个是作为全局变量的,在进行所有的排序之后,用current_pose_list进行更新
current_pose_list = [] #这个是用来作为局部变量的,会在每一次循环的时候先进行更新
if frame == 0:
for i in range(len(current_frame_human)):
human = HumanPoseID(current_frame_human[i], i)
current_pose_list.append(human)
last_id += 1
last_pose_list = current_pose_list
else:
for i in range(len(last_frame_human)):
human = HumanPoseID(last_frame_human[i], i)
last_pose_list.append(human)
last_id += 1
for i in range(len(current_frame_human)):
human = HumanPoseID(current_frame_human[i], -1)
current_pose_list.append(human)
track_pose(last_pose_list, current_pose_list, last_id, thres)
last_pose_list = current_pose_list
embed()
| 47.158103
| 146
| 0.57623
| 1,595
| 11,931
| 4.009404
| 0.110972
| 0.113995
| 0.08319
| 0.078812
| 0.776388
| 0.756216
| 0.732134
| 0.724003
| 0.706802
| 0.706802
| 0
| 0.054748
| 0.31414
| 11,931
| 252
| 147
| 47.345238
| 0.726751
| 0.287989
| 0
| 0.614865
| 0
| 0
| 0.004051
| 0.003097
| 0
| 0
| 0
| 0
| 0
| 1
| 0.047297
| false
| 0.006757
| 0.033784
| 0
| 0.135135
| 0.006757
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 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
| 5
|
771467346774d57e64234ebaf6a385d50433ea67
| 4,205
|
py
|
Python
|
Seth/permission_utils.py
|
Inf1n1te/Seth
|
4ccfcba6226f3d284fd955cd0a81316402e8d043
|
[
"BSD-3-Clause"
] | 1
|
2020-08-09T01:26:31.000Z
|
2020-08-09T01:26:31.000Z
|
Seth/permission_utils.py
|
Inf1n1te/Seth
|
4ccfcba6226f3d284fd955cd0a81316402e8d043
|
[
"BSD-3-Clause"
] | 17
|
2017-11-15T10:06:02.000Z
|
2019-02-13T15:32:41.000Z
|
Seth/permission_utils.py
|
Inf1n1te/Seth
|
4ccfcba6226f3d284fd955cd0a81316402e8d043
|
[
"BSD-3-Clause"
] | null | null | null |
from django.db.models import Q
from Grades.models import Coordinator, Teacher, Studying, Study, Test, ModulePart
# Role checks. Only usable in overview pages.
def is_coordinator(person):
return person and Coordinator.objects.filter(person=person, is_assistant=False).count() > 0
def is_coordinator_assistant(person):
return person and Coordinator.objects.filter(person=person, is_assistant=True).count() > 0
def is_coordinator_or_assistant(person):
return person and is_coordinator(person) or is_coordinator_assistant(person)
def is_teacher(person):
return person and Teacher.objects.filter(person=person, role='T').count() > 0
def is_teaching_assistant(person):
result = Teacher.objects.filter(person=person, role='A')
return person and result.count() > 0
# Role checkers for specific modules and module parts
def is_coordinator_of_module(person, module_edition):
return person and Coordinator.objects.filter(person=person, module_edition=module_edition, is_assistant=False).count() > 0
def u_is_coordinator_of_module(user, module_edition):
return user and Coordinator.objects.filter(person__user=user, module_edition=module_edition, is_assistant=False).count() > 0
def is_coordinator_assistant_of_module(person, module_edition):
return person and Coordinator.objects.filter(person=person, is_assistant=True, module_edition=module_edition).count() > 0
def u_is_coordinator_assistant_of_module(user, module_edition):
return user and Coordinator.objects.filter(person__user=user, is_assistant=True, module_edition=module_edition).count() > 0
def is_coordinator_or_assistant_of_module(person, module_edition):
return person and is_coordinator_of_module(person, module_edition) or is_coordinator_assistant_of_module(person,
module_edition)
def u_is_coordinator_or_assistant_of_module(user, module_edition):
return user and u_is_coordinator_of_module(user, module_edition) or u_is_coordinator_assistant_of_module(user,
module_edition)
def is_teacher_of_part(person, module_part):
return person and Teacher.objects.filter(person=person, module_part=module_part, role='T').count() > 0
def u_is_teacher_of_part(user, module_part):
return user and Teacher.objects.filter(person__user=user, module_part=module_part, role='T').count() > 0
def is_teaching_assistant_of_part(person, module_part):
return person and Teacher.objects.filter(person=person, role='A', module_part=module_part).count() > 0
def u_is_teaching_assistant_of_part(user, module_part):
return user and Teacher.objects.filter(person__user=user, role='A', module_part=module_part).count() > 0
def is_student(person):
result = Studying.objects.filter(person=person)
return person and result.count() > 0
def is_student_of_module(person, module_part):
result = Studying.objects.filter(person=person, module_edition=module_part)
return person and result.count() > 0
def is_study_adviser(person):
result = Study.objects.filter(advisers=person)
return person and result.count() > 0
def is_study_adviser_of_study(person, study):
return person and Study.objects.filter(advisers=person).filter(
pk=study.pk).count() > 0
# Test related queries
# untested
def is_coordinator_or_teacher_of_test(person, test):
""" Tests whether a person is coordinator (assistant) or teacher of a test.
"""
if person is None:
return False
return Test.objects.filter(
Q(module_part__teachers=person) |
Q(module_part__module_edition__coordinator__person=person)
).filter(pk=test.pk).count() > 0
# Test related queries
# untested
def is_coordinator_or_teacher_of_module_part(person, module_part):
""" Tests whether a person is coordinator (assistant) or teacher of a test.
"""
if person is None:
return False
return ModulePart.objects.filter(
Q(teachers=person) |
Q(module_edition__coordinator__person=person)
).filter(pk=module_part.pk).count() > 0
| 35.336134
| 128
| 0.735315
| 573
| 4,205
| 5.122164
| 0.104712
| 0.093015
| 0.07155
| 0.085179
| 0.821124
| 0.775128
| 0.744804
| 0.652811
| 0.601704
| 0.445656
| 0
| 0.00519
| 0.175268
| 4,205
| 118
| 129
| 35.635593
| 0.841119
| 0.073722
| 0
| 0.163934
| 0
| 0
| 0.001548
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.344262
| false
| 0
| 0.032787
| 0.245902
| 0.754098
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
77252de09089e10fc1dfa918621cfa4f70abd67d
| 132
|
py
|
Python
|
tests/skalmodule_nodoc.py
|
mollstam/skal
|
af2ce460d9addd07ad2459125511308cfa7cdb44
|
[
"Apache-2.0"
] | 3
|
2016-01-20T06:52:39.000Z
|
2019-01-18T09:06:32.000Z
|
tests/skalmodule_nodoc.py
|
mollstam/skal
|
af2ce460d9addd07ad2459125511308cfa7cdb44
|
[
"Apache-2.0"
] | null | null | null |
tests/skalmodule_nodoc.py
|
mollstam/skal
|
af2ce460d9addd07ad2459125511308cfa7cdb44
|
[
"Apache-2.0"
] | 3
|
2015-09-30T22:04:28.000Z
|
2020-12-26T10:36:20.000Z
|
from skal import command
@command
def first(**args):
"""first command, second instance"""
print('first, second instance')
| 16.5
| 40
| 0.681818
| 16
| 132
| 5.625
| 0.625
| 0.311111
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 132
| 7
| 41
| 18.857143
| 0.833333
| 0.227273
| 0
| 0
| 0
| 0
| 0.229167
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.25
| 0
| 0.5
| 0.25
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
774ac65a8fcfb417d65cb3a952eac36a659989d4
| 47
|
py
|
Python
|
tests/__init__.py
|
mmatthews06/connect_four
|
c6ab580eb1560f024bd3cc6c41ff962f8255e404
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
mmatthews06/connect_four
|
c6ab580eb1560f024bd3cc6c41ff962f8255e404
|
[
"MIT"
] | 28
|
2021-11-18T18:26:39.000Z
|
2022-03-28T18:32:15.000Z
|
tests/__init__.py
|
mmatthews06/connect_four
|
c6ab580eb1560f024bd3cc6c41ff962f8255e404
|
[
"MIT"
] | null | null | null |
"""Test suite for the connect_four package."""
| 23.5
| 46
| 0.723404
| 7
| 47
| 4.714286
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12766
| 47
| 1
| 47
| 47
| 0.804878
| 0.851064
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
623031ff24e0a21fef8aad23e2bbd8cfb7c9a37c
| 483
|
py
|
Python
|
polyaxon/libs/exceptions.py
|
chandu088/p
|
878456367105924accc5b235263b0bb209d877c8
|
[
"MIT"
] | 7
|
2018-03-05T08:01:45.000Z
|
2021-03-12T09:00:11.000Z
|
polyaxon/libs/exceptions.py
|
chandu088/p
|
878456367105924accc5b235263b0bb209d877c8
|
[
"MIT"
] | 23
|
2017-07-10T16:52:25.000Z
|
2018-01-01T15:17:32.000Z
|
polyaxon/libs/exceptions.py
|
chandu088/p
|
878456367105924accc5b235263b0bb209d877c8
|
[
"MIT"
] | 4
|
2018-01-25T14:08:49.000Z
|
2021-12-03T07:11:29.000Z
|
class ConfigurationError(Exception):
"""Exception class to raise if a Configurable object has an issue."""
pass
class NotFoundError(Exception):
"""Exception class to raise if a file was not found."""
pass
class EstimatorNotTrainedError(Exception):
"""Exception class to raise if estimator is used before being trained."""
pass
class ModuleNotBuiltError(Exception):
"""Exception class to raise if graph module is used before being built."""
pass
| 25.421053
| 78
| 0.722567
| 60
| 483
| 5.816667
| 0.483333
| 0.206304
| 0.26361
| 0.286533
| 0.372493
| 0.372493
| 0.189112
| 0
| 0
| 0
| 0
| 0
| 0.194617
| 483
| 18
| 79
| 26.833333
| 0.897172
| 0.517598
| 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 | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
6256787d4003ac4ad50330a24facc1576fe1c56b
| 1,228
|
py
|
Python
|
tests/python/pants_test/util/test_strutil.py
|
WamBamBoozle/pants
|
98cadfa1a5d337146903eb66548cfe955f2627b3
|
[
"Apache-2.0"
] | null | null | null |
tests/python/pants_test/util/test_strutil.py
|
WamBamBoozle/pants
|
98cadfa1a5d337146903eb66548cfe955f2627b3
|
[
"Apache-2.0"
] | null | null | null |
tests/python/pants_test/util/test_strutil.py
|
WamBamBoozle/pants
|
98cadfa1a5d337146903eb66548cfe955f2627b3
|
[
"Apache-2.0"
] | null | null | null |
# coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import unittest
from pants.util.strutil import camelcase
# TODO(Eric Ayers): Backfill tests for other methods in strutil.py
class StrutilTest(unittest.TestCase):
def test_camelcase(self):
self.assertEquals('Foo', camelcase('foo'))
self.assertEquals('Foo', camelcase('_foo'))
self.assertEquals('Foo', camelcase('foo_'))
self.assertEquals('FooBar', camelcase('foo_bar'))
self.assertEquals('FooBar', camelcase('foo_bar_'))
self.assertEquals('FooBar', camelcase('_foo_bar'))
self.assertEquals('FooBar', camelcase('foo__bar'))
self.assertEquals('Foo', camelcase('-foo'))
self.assertEquals('Foo', camelcase('foo-'))
self.assertEquals('FooBar', camelcase('foo-bar'))
self.assertEquals('FooBar', camelcase('foo-bar-'))
self.assertEquals('FooBar', camelcase('-foo-bar'))
self.assertEquals('FooBar', camelcase('foo--bar'))
self.assertEquals('FooBar', camelcase('foo-_bar'))
| 37.212121
| 93
| 0.711726
| 142
| 1,228
| 6.014085
| 0.394366
| 0.262295
| 0.23185
| 0.326698
| 0.571429
| 0.571429
| 0.571429
| 0.571429
| 0.571429
| 0.571429
| 0
| 0.006604
| 0.136808
| 1,228
| 32
| 94
| 38.375
| 0.799057
| 0.166124
| 0
| 0
| 0
| 0
| 0.155054
| 0
| 0
| 0
| 0
| 0.03125
| 0.7
| 1
| 0.05
| false
| 0
| 0.15
| 0
| 0.25
| 0.05
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
656583ce4c0c939e8abcaa21e3988a235f347e17
| 7,044
|
py
|
Python
|
tests/unit/test_charm.py
|
jnsgruk/traefik-k8s-operator
|
24ad59609af5cf7d1d4f109c856e1270c8ed26f0
|
[
"Apache-2.0"
] | null | null | null |
tests/unit/test_charm.py
|
jnsgruk/traefik-k8s-operator
|
24ad59609af5cf7d1d4f109c856e1270c8ed26f0
|
[
"Apache-2.0"
] | null | null | null |
tests/unit/test_charm.py
|
jnsgruk/traefik-k8s-operator
|
24ad59609af5cf7d1d4f109c856e1270c8ed26f0
|
[
"Apache-2.0"
] | null | null | null |
# Copyright 2021 Canonical Ltd.
# See LICENSE file for licensing details.
#
# Learn more about testing at: https://juju.is/docs/sdk/testing
import unittest
from unittest.mock import patch
from charms.traefik_k8s.v0.ingress_per_unit.testing import MockIPURequirer
from ops.model import ActiveStatus, WaitingStatus
from ops.testing import Harness
from charm import TraefikIngressCharm
class TestTraefikIngressCharm(unittest.TestCase):
def setUp(self):
self.harness = Harness(TraefikIngressCharm)
self.addCleanup(self.harness.cleanup)
@patch("charm.KubernetesServicePatch", lambda **unused: None)
def test_pebble_ready_with_gateway_address_from_config(self):
"""Test round-trip bootstrap and relation with a consumer."""
self.harness.update_config({"external_hostname": "testhostname"})
self.harness.set_leader(True)
self.harness.begin_with_initial_hooks()
self.harness.container_pebble_ready("traefik")
self.assertEqual(self.harness.charm.unit.status, ActiveStatus())
requirer = MockIPURequirer(self.harness)
relation = requirer.relate()
requirer.request(hostname="10.1.10.1", port=9000)
assert requirer.is_available(relation)
traefik_container = self.harness.charm.unit.get_container("traefik")
self.assertEqual(
traefik_container.pull(
f"/opt/traefik/juju/juju_ingress_{relation.name}_{relation.id}_{relation.app.name}.yaml"
).read(),
"""http:
routers:
juju-test-model-ingress-per-unit-remote-0-router:
entryPoints:
- web
rule: PathPrefix(`/test-model-ingress-per-unit-remote-0`)
service: juju-test-model-ingress-per-unit-remote-0-service
services:
juju-test-model-ingress-per-unit-remote-0-service:
loadBalancer:
servers:
- url: http://10.1.10.1:9000
""",
)
self.assertEqual(
requirer.urls,
{
"ingress-per-unit-remote/0": "http://testhostname:80/test-model-ingress-per-unit-remote-0"
},
)
self.assertEqual(self.harness.charm.unit.status, ActiveStatus())
@patch("charm._get_loadbalancer_status", lambda **unused: None)
@patch("charm.KubernetesServicePatch", lambda **unused: None)
def test_pebble_ready_without_gateway_address(self):
"""Test that requirers do not get addresses until the gateway address is available."""
self.harness.set_leader(True)
self.harness.begin_with_initial_hooks()
self.assertEqual(
self.harness.charm.unit.status, WaitingStatus("gateway address not available")
)
self.harness.container_pebble_ready("traefik")
requirer = MockIPURequirer(self.harness)
relation = requirer.relate()
requirer.request(hostname="10.1.10.1", port=9000)
assert requirer.is_available(relation)
assert not requirer.is_ready(relation)
self.assertEqual(
self.harness.charm.unit.status, WaitingStatus("gateway address not available")
)
@patch("charm._get_loadbalancer_status", lambda **unused: "10.0.0.1")
@patch("charm.KubernetesServicePatch", lambda **unused: None)
def test_pebble_ready_with_joined_relations(self):
self.harness.set_leader(True)
self.harness.begin_with_initial_hooks()
requirer = MockIPURequirer(self.harness)
relation = requirer.relate()
requirer.request(hostname="10.1.10.1", port=9000)
self.harness.container_pebble_ready("traefik")
self.assertEqual(self.harness.charm.unit.status, ActiveStatus())
assert requirer.is_available(relation)
self.assertEqual(
requirer.urls,
{
"ingress-per-unit-remote/0": "http://10.0.0.1:80/test-model-ingress-per-unit-remote-0"
},
)
self.assertEqual(self.harness.charm.unit.status, ActiveStatus())
@patch("charm._get_loadbalancer_status", lambda **unused: "10.0.0.1")
@patch("charm.KubernetesServicePatch", lambda **unused: None)
def test_gateway_address_change_with_joined_relations(self):
self.harness.set_leader(True)
self.harness.begin_with_initial_hooks()
requirer = MockIPURequirer(self.harness)
relation = requirer.relate()
requirer.request(hostname="10.1.10.1", port=9000)
self.harness.container_pebble_ready("traefik")
self.assertEqual(self.harness.charm.unit.status, ActiveStatus())
assert requirer.is_available(relation)
self.assertEqual(
requirer.urls,
{
"ingress-per-unit-remote/0": "http://10.0.0.1:80/test-model-ingress-per-unit-remote-0"
},
)
self.assertEqual(self.harness.charm.unit.status, ActiveStatus())
self.harness.update_config({"external_hostname": "testhostname"})
self.assertEqual(
requirer.urls,
{
"ingress-per-unit-remote/0": "http://testhostname:80/test-model-ingress-per-unit-remote-0"
},
)
self.assertEqual(self.harness.charm.unit.status, ActiveStatus())
@patch("charm._get_loadbalancer_status", lambda **unused: None)
@patch("charm.KubernetesServicePatch", lambda **unused: None)
def test_gateway_address_becomes_unavailable_after_relation_join(self):
self.harness.update_config({"external_hostname": "testhostname"})
self.harness.set_leader(True)
self.harness.begin_with_initial_hooks()
self.harness.container_pebble_ready("traefik")
requirer = MockIPURequirer(self.harness)
relation = requirer.relate()
requirer.request(hostname="10.1.10.1", port=9000)
assert requirer.is_available(relation)
assert requirer.is_ready(relation)
self.assertEqual(
requirer.urls,
{
"ingress-per-unit-remote/0": "http://testhostname:80/test-model-ingress-per-unit-remote-0"
},
)
self.assertEqual(self.harness.charm.unit.status, ActiveStatus())
self.harness.update_config(unset=["external_hostname"])
self.assertEqual(
self.harness.charm.unit.status, WaitingStatus("gateway address not available")
)
self.assertEqual(
requirer.urls,
{"ingress-per-unit-remote/0": ""},
)
def test_relation_broken(self):
self.test_pebble_ready_with_gateway_address_from_config()
relation = self.harness.model.relations["ingress-per-unit"][0]
self.harness.remove_relation(relation.id)
traefik_container = self.harness.charm.unit.get_container("traefik")
try:
traefik_container.pull(
f"/opt/traefik/juju/juju_ingress_{relation.name}_{relation.id}_{relation.app.name}.yaml"
).read()
raise Exception("The line above should fail")
except FileNotFoundError:
pass
| 35.575758
| 106
| 0.65971
| 791
| 7,044
| 5.730721
| 0.178255
| 0.099493
| 0.052504
| 0.066181
| 0.794176
| 0.794176
| 0.785793
| 0.785793
| 0.749173
| 0.69711
| 0
| 0.020434
| 0.221891
| 7,044
| 197
| 107
| 35.756345
| 0.806605
| 0.038189
| 0
| 0.62963
| 0
| 0.02963
| 0.189566
| 0.090866
| 0
| 0
| 0
| 0
| 0.185185
| 1
| 0.051852
| false
| 0.007407
| 0.044444
| 0
| 0.103704
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 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
| 5
|
6580b4fb8d360f6e07631c78a2ede963025f8661
| 171
|
py
|
Python
|
clu/importing/__main__.py
|
fish2000/CLU
|
80bc2df5f001b5639d79ba979e19ec77a9931425
|
[
"BSD-3-Clause"
] | 1
|
2019-07-02T08:17:59.000Z
|
2019-07-02T08:17:59.000Z
|
clu/importing/__main__.py
|
fish2000/CLU
|
80bc2df5f001b5639d79ba979e19ec77a9931425
|
[
"BSD-3-Clause"
] | 13
|
2019-12-17T02:28:30.000Z
|
2021-11-17T03:46:10.000Z
|
clu/importing/__main__.py
|
fish2000/CLU
|
80bc2df5f001b5639d79ba979e19ec77a9931425
|
[
"BSD-3-Clause"
] | null | null | null |
# -*- coding: utf-8 -*-
from __future__ import print_function
from clu.importing import test
import sys # pragma: no cover
if __name__ == '__main__':
sys.exit(test())
| 24.428571
| 37
| 0.707602
| 24
| 171
| 4.5
| 0.791667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006993
| 0.163743
| 171
| 7
| 38
| 24.428571
| 0.748252
| 0.222222
| 0
| 0
| 0
| 0
| 0.061069
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.6
| 0
| 0.6
| 0.2
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
65b2cf53656bac829ddc6a86d12b9a8b87b7bbfa
| 189
|
py
|
Python
|
Mundo 1_Fundamentos/Desafio_07.py
|
VictorOliveira02/Desafios-Python3-Curso-em-Video
|
53ee8bd814b816f3a21936677ef3f155b582843f
|
[
"MIT"
] | null | null | null |
Mundo 1_Fundamentos/Desafio_07.py
|
VictorOliveira02/Desafios-Python3-Curso-em-Video
|
53ee8bd814b816f3a21936677ef3f155b582843f
|
[
"MIT"
] | null | null | null |
Mundo 1_Fundamentos/Desafio_07.py
|
VictorOliveira02/Desafios-Python3-Curso-em-Video
|
53ee8bd814b816f3a21936677ef3f155b582843f
|
[
"MIT"
] | null | null | null |
a = input('Digite o nome do aluno: ')
n1 = int(input('Digite a nota da primeira prova: '))
n2 = int(input('Digite a nota da segunda prova: '))
print(f'A média do aluno {a} é {(n1+n2)/2}')
| 31.5
| 52
| 0.640212
| 36
| 189
| 3.361111
| 0.555556
| 0.272727
| 0.231405
| 0.247934
| 0.347107
| 0.347107
| 0
| 0
| 0
| 0
| 0
| 0.032258
| 0.179894
| 189
| 5
| 53
| 37.8
| 0.748387
| 0
| 0
| 0
| 0
| 0
| 0.650794
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.25
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
65ba0aeae6737074dad173b40c1a5b883ddf3eed
| 92
|
py
|
Python
|
ext/datawald_nsagency/datawald_nsagency/__init__.py
|
ideabosque/DataWald-AWS
|
3ea905a40526dad3cb0eff92167c1e4230aa4aa9
|
[
"MIT"
] | null | null | null |
ext/datawald_nsagency/datawald_nsagency/__init__.py
|
ideabosque/DataWald-AWS
|
3ea905a40526dad3cb0eff92167c1e4230aa4aa9
|
[
"MIT"
] | null | null | null |
ext/datawald_nsagency/datawald_nsagency/__init__.py
|
ideabosque/DataWald-AWS
|
3ea905a40526dad3cb0eff92167c1e4230aa4aa9
|
[
"MIT"
] | null | null | null |
__all__ = ["datawald_nsagency"]
from .nsagency import NSAgency
from .nsagent import NSAgent
| 23
| 31
| 0.804348
| 11
| 92
| 6.272727
| 0.545455
| 0.347826
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119565
| 92
| 3
| 32
| 30.666667
| 0.851852
| 0
| 0
| 0
| 0
| 0
| 0.184783
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
65ce39740bc1f3b5d831e573daf6a074e832989c
| 77
|
py
|
Python
|
boot.py
|
akd001/RPi
|
020900b93f51471c2174c8cc61127e702a8fdbdb
|
[
"MIT"
] | 1
|
2016-12-22T11:49:06.000Z
|
2016-12-22T11:49:06.000Z
|
boot.py
|
akd001/RPi
|
020900b93f51471c2174c8cc61127e702a8fdbdb
|
[
"MIT"
] | null | null | null |
boot.py
|
akd001/RPi
|
020900b93f51471c2174c8cc61127e702a8fdbdb
|
[
"MIT"
] | null | null | null |
import subprocess
def reboot():
subprocess.call(['sudo', 'reboot', 'now'])
| 15.4
| 43
| 0.675325
| 9
| 77
| 5.777778
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116883
| 77
| 4
| 44
| 19.25
| 0.764706
| 0
| 0
| 0
| 0
| 0
| 0.168831
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
65d07eab909adac42980edfa57fc1430b5e40826
| 53
|
py
|
Python
|
1/1/11382/11382.py
|
chr0m3/boj-codes
|
d71d0a22d0a3ae62c225f382442461275f56fe8f
|
[
"MIT"
] | 3
|
2017-07-08T16:29:06.000Z
|
2020-07-20T00:17:45.000Z
|
1/1/11382/11382.py
|
chr0m3/boj-codes
|
d71d0a22d0a3ae62c225f382442461275f56fe8f
|
[
"MIT"
] | null | null | null |
1/1/11382/11382.py
|
chr0m3/boj-codes
|
d71d0a22d0a3ae62c225f382442461275f56fe8f
|
[
"MIT"
] | 2
|
2017-11-20T14:06:06.000Z
|
2020-07-20T00:17:47.000Z
|
a, b, c = map(int, input().split())
print(a + b + c)
| 17.666667
| 35
| 0.509434
| 11
| 53
| 2.454545
| 0.727273
| 0.148148
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.207547
| 53
| 2
| 36
| 26.5
| 0.642857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
65eb74f0bfacd3d0cd19bcfc824777d917d0e68b
| 174
|
py
|
Python
|
src/api/models/__init__.py
|
mlbench/mlbench-dashboard
|
27dcd631b708c8afbbb593aabcd4ceef33ae9b42
|
[
"Apache-2.0"
] | null | null | null |
src/api/models/__init__.py
|
mlbench/mlbench-dashboard
|
27dcd631b708c8afbbb593aabcd4ceef33ae9b42
|
[
"Apache-2.0"
] | 109
|
2018-12-06T15:00:46.000Z
|
2022-03-01T16:01:06.000Z
|
src/api/models/__init__.py
|
mlbench/mlbench-dashboard
|
27dcd631b708c8afbbb593aabcd4ceef33ae9b42
|
[
"Apache-2.0"
] | 1
|
2020-02-26T14:26:50.000Z
|
2020-02-26T14:26:50.000Z
|
from api.models.kubemetric import KubeMetric
from api.models.kubepod import KubePod
from api.models.modelrun import ModelRun
__all__ = ["KubePod", "KubeMetric", "ModelRun"]
| 29
| 47
| 0.798851
| 22
| 174
| 6.136364
| 0.363636
| 0.155556
| 0.288889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103448
| 174
| 5
| 48
| 34.8
| 0.865385
| 0
| 0
| 0
| 0
| 0
| 0.143678
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
02c4d4864f74f68f0baa4710b6a75132648e8a05
| 115
|
py
|
Python
|
util/printing.py
|
deanwampler/ray-tutorials
|
151ff2f464b532a58215bb41296e90ad3c1c0c01
|
[
"Apache-2.0"
] | 1
|
2021-06-23T17:55:58.000Z
|
2021-06-23T17:55:58.000Z
|
util/printing.py
|
deanwampler/ray-tutorials
|
151ff2f464b532a58215bb41296e90ad3c1c0c01
|
[
"Apache-2.0"
] | null | null | null |
util/printing.py
|
deanwampler/ray-tutorials
|
151ff2f464b532a58215bb41296e90ad3c1c0c01
|
[
"Apache-2.0"
] | null | null | null |
# Convenience utilities for printing
def p(n, duration):
print('{:2d}: {:6.3f} seconds'.format(n, duration))
| 19.166667
| 55
| 0.66087
| 16
| 115
| 4.75
| 0.875
| 0.236842
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030928
| 0.156522
| 115
| 5
| 56
| 23
| 0.752577
| 0.295652
| 0
| 0
| 0
| 0
| 0.282051
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
02d740c042968a84457d8d59b527aa391b2dccc3
| 123
|
py
|
Python
|
battlesnake_builder/exceptions.py
|
Tch1b0/battlesnake-builder
|
fa2f69147444b2f2d53a7954bfc9487b1ca84f54
|
[
"MIT"
] | null | null | null |
battlesnake_builder/exceptions.py
|
Tch1b0/battlesnake-builder
|
fa2f69147444b2f2d53a7954bfc9487b1ca84f54
|
[
"MIT"
] | 1
|
2022-03-21T19:32:27.000Z
|
2022-03-21T19:32:27.000Z
|
battlesnake_builder/exceptions.py
|
Tch1b0/battlesnake-builder
|
fa2f69147444b2f2d53a7954bfc9487b1ca84f54
|
[
"MIT"
] | null | null | null |
class GameNotStarted(Exception):
def __str__(self) -> str:
return "interacted with game before it was started"
| 30.75
| 59
| 0.707317
| 15
| 123
| 5.533333
| 0.933333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.211382
| 123
| 3
| 60
| 41
| 0.85567
| 0
| 0
| 0
| 0
| 0
| 0.341463
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.333333
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
02de3c4c269816d6a41dbb02431a552be35f1d47
| 338
|
py
|
Python
|
13-testing/calculator.py
|
johnehunt/PythonIntroDS
|
7e9d5c5494191cd68bc71e140df5fb30290a8da6
|
[
"Apache-2.0"
] | 1
|
2021-09-20T11:22:47.000Z
|
2021-09-20T11:22:47.000Z
|
13-testing/calculator.py
|
johnehunt/PythonIntroDS
|
7e9d5c5494191cd68bc71e140df5fb30290a8da6
|
[
"Apache-2.0"
] | null | null | null |
13-testing/calculator.py
|
johnehunt/PythonIntroDS
|
7e9d5c5494191cd68bc71e140df5fb30290a8da6
|
[
"Apache-2.0"
] | null | null | null |
def add(x, y):
return x + y
class Calculator:
def __init__(self):
self.current = 0
self.total = 0
def set(self, value):
self.current = value
def add(self):
self.total += self.current
def sub(self):
self.total -= self.current
def total(self):
return self.total
| 16.095238
| 34
| 0.550296
| 45
| 338
| 4.044444
| 0.333333
| 0.241758
| 0.142857
| 0.186813
| 0.296703
| 0.296703
| 0
| 0
| 0
| 0
| 0
| 0.008969
| 0.340237
| 338
| 20
| 35
| 16.9
| 0.807175
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.428571
| false
| 0
| 0
| 0.142857
| 0.642857
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
02e493ecfb3300d17617f6711a1793a02b5101a6
| 22,033
|
py
|
Python
|
tests/test_server.py
|
jiweix/open-everything
|
63880cb43bbfda05b8cff22b7c444d097f8e80d9
|
[
"Apache-2.0"
] | null | null | null |
tests/test_server.py
|
jiweix/open-everything
|
63880cb43bbfda05b8cff22b7c444d097f8e80d9
|
[
"Apache-2.0"
] | null | null | null |
tests/test_server.py
|
jiweix/open-everything
|
63880cb43bbfda05b8cff22b7c444d097f8e80d9
|
[
"Apache-2.0"
] | null | null | null |
import unittest
from datetime import datetime, timedelta
import app
from app import models, server
from app.models import db, User, Reservation, Resource, Tag
from flask import url_for
class TestModels(unittest.TestCase):
def setUp(self):
self.app = app.get_app("TEST")
self.app.config.update(SERVER_NAME='localhost')
self.app_context = self.app.app_context()
self.app_context.push()
self.setup_dummy_data()
self.client = self.app.test_client(use_cookies=True)
self.user_data = { 'email': "a@a.com",
'password': "hard_to_guess_pw"}
def tearDown(self):
db.session.remove()
db.drop_all()
self.app_context.pop()
# ---------------------- User tests ----------------------------------------
def test_can_access_login_page(self):
response = self.client.get('/login')
self.assertEqual(response.status_code, 200)
self.assertTrue("Please Login" in response.data)
def test_can_access_register_page(self):
response = self.client.get('/register')
self.assertEqual(response.status_code, 200)
self.assertTrue("Please Register" in response.data)
def test_user_can_login(self):
response = self.client.post('/login',
data=self.user_data)
self.assertEqual(response.status_code, 302)
self.assertEqual(response.location, url_for('list'))
def test_user_can_logout(self):
self.client.post('/login',
data=self.user_data)
response = self.client.get('/logout')
self.assertEqual(response.status_code, 302)
self.assertEqual(response.location, url_for('login'))
response = self.client.get('/home')
self.assertEqual(response.status_code, 200)
self.assertTrue("You need to log in" in response.data)
def test_invalid_user_can_not_login(self):
response = self.client.post('/login',
data={ 'email': "a@a.com",
'password': "wrong_password"})
self.assertEqual(response.status_code, 200)
self.assertTrue("User name or password invalid, Please try again" in response.data)
def test_register_and_login_a_user(self):
response = self.client.post('/register',
data={ 'email': "b@b.com",
'password': "hard_to_guess_pw"})
self.assertEqual(response.status_code, 302)
self.assertEqual(response.location, url_for('login'))
response = self.client.post('/login',
data={ 'email': "b@b.com",
'password': "hard_to_guess_pw"})
self.assertEqual(response.status_code, 302)
self.assertEqual(response.location, url_for('list'))
def test_register_with_duplicate_email(self):
response = self.client.post('/register',
data=self.user_data)
self.assertEqual(response.status_code, 200)
self.assertTrue("Email already taken" in response.data)
def test_retrieve_user_by_user_id(self):
self.client.post('/login',
data=self.user_data)
response = self.client.get('/users/'+str(self.test_user_id))
self.assertEqual(response.status_code, 200)
self.assertTrue("test_res" in response.data)
def test_retrieve_user_by_invalid_user_id(self):
self.client.post('/login',
data=self.user_data)
response = self.client.get('/users/'+str(99999))
self.assertEqual(response.status_code, 404)
# ----------------------End User tests -------------------------------------
# ----------------------Home page tests ------------------------------------
def test_login_user_can_access_home_page(self):
self.client.post('/login',
data=self.user_data)
response = self.client.get('/home')
self.assertEqual(response.status_code, 200)
self.assertTrue("test_res" in response.data)
def test_anonymous_user_can_not_access_home_page(self):
response = self.client.get('/home')
self.assertEqual(response.status_code, 200)
self.assertTrue("You need to log in" in response.data)
# ----------------------End Home page tests --------------------------------
# ----------------------Index page tests -----------------------------------
def test_login_user_access_index_page(self):
self.client.post('/login',
data=self.user_data)
response = self.client.get('/')
self.assertEqual(response.status_code, 302)
self.assertEqual(response.location, url_for('list'))
def test_anonymous_user_access_index_page(self):
response = self.client.get('/home')
self.assertEqual(response.status_code, 200)
# ----------------------End Index page tests -------------------------------
# ----------------------Resource tests -------------------------------------
def test_access_add_resource_page(self):
self.client.post('/login',
data=self.user_data)
response = self.client.get('/resources/add')
self.assertEqual(response.status_code, 200)
self.assertTrue("Add resource" in response.data)
def test_add_new_resource(self):
self.client.post('/login',
data=self.user_data)
response = self.client.post('/resources/add',
data={ 'name': 'resource_2',
'owner_id': self.test_user_id,
'available_start': '01:00',
'available_end': '23:00',
'tag': 'test a b'},
follow_redirects=True)
self.assertEqual(response.status_code, 200)
self.assertTrue("resource_2" in response.data)
def test_add_new_resource_end_before_start(self):
self.client.post('/login',
data=self.user_data)
response = self.client.post('/resources/add',
data={ 'name': 'resource_2',
'owner_id': self.test_user_id,
'available_start': '10:00',
'available_end': '9:00',
'tag': 'test a b'})
self.assertEqual(response.status_code, 200)
self.assertTrue("Add resource" in response.data)
self.assertTrue("resource_2" not in response.data)
def test_add_new_resource_without_name(self):
self.client.post('/login',
data=self.user_data)
response = self.client.post('/resources/add',
data={ 'name': '',
'owner_id': self.test_user_id,
'available_start': '10:00',
'available_end': '19:00',
'tag': 'test a b'})
self.assertEqual(response.status_code, 200)
self.assertTrue("Add resource" in response.data)
def test_add_invalid_resource(self):
self.client.post('/login',
data=self.user_data)
response = self.client.post('/resources/add',
data={ 'name': 'resource_2',
'owner_id': self.test_user_id,
'available_start': 'wrong_time',
'available_end': '23:00',
'tag': ''})
self.assertEqual(response.status_code, 200)
self.assertTrue("Input Invalid" in response.data)
def test_retrieve_resource_by_id(self):
self.client.post('/login',
data=self.user_data)
response = self.client.get('/resources/'+str(self.test_resource_id))
self.assertEqual(response.status_code, 200)
self.assertTrue("test_res" in response.data)
def test_access_edit_resource_page(self):
self.client.post('/login',
data=self.user_data)
response = self.client.get('/resources/'+str(self.test_resource_id)+'/edit')
self.assertEqual(response.status_code, 200)
self.assertTrue("Edit resource" in response.data)
def test_edit_resource(self):
self.client.post('/login',
data=self.user_data)
response = self.client.post('/resources/'+str(self.test_resource_id)+'/edit',
data={ 'name': 'resource_2',
'available_start': '01:00',
'available_end': '23:00',
'tag': 'test_tag' },
follow_redirects=True)
self.assertEqual(response.status_code, 200)
self.assertTrue("test_tag" in response.data)
def test_edit_resource_invalid_user(self):
self.client.post('/register',
data={ 'email': "b@b.com",
'password': "hard_to_guess_pw"})
self.client.post('/login',
data={ 'email': "b@b.com",
'password': "hard_to_guess_pw"})
response = self.client.post('/resources/'+str(self.test_resource_id)+'/edit',
data={ 'name': 'resource_2',
'available_start': '01:00',
'available_end': '23:00',
'tag': 'test_tag' })
self.assertEqual(response.status_code, 302)
self.assertEqual(response.location, url_for('list'))
def test_delete_resource(self):
self.client.post('/login',
data=self.user_data)
response = self.client.get('/resources/'+str(self.test_resource_id)+'/delete')
self.assertEqual(response.status_code, 302)
self.assertEqual(response.location, url_for('list'))
response = self.client.get('/resources/'+str(self.test_resource_id))
self.assertEqual(response.status_code, 404)
# ----------------------End Resource tests ---------------------------------
# ----------------------Reservation tests ----------------------------------
def test_retrieve_reservation_by_id(self):
self.client.post('/login',
data=self.user_data)
response = self.client.get('/reservations/'+str(self.test_reservation_id))
self.assertEqual(response.status_code, 200)
self.assertTrue("test_res" in response.data)
def test_retrieve_reservation_by_invalid_id(self):
self.client.post('/login',
data=self.user_data)
response = self.client.get('/reservations/'+str(9999999))
self.assertEqual(response.status_code, 404)
def test_access_add_reservation_page(self):
self.client.post('/login',
data=self.user_data)
response = self.client.get('/resources/'+str(self.test_resource_id)+'/add_reservation')
self.assertEqual(response.status_code, 200)
self.assertTrue("Add Reservation" in response.data)
def test_add_new_reservation(self):
self.client.post('/login',
data=self.user_data)
response = self.client.post('/resources/'+str(self.test_resource_id)+'/add_reservation',
data={ 'date': (datetime.now()+timedelta(days=1)).strftime('%Y-%m-%d'),
'start': '10:00',
'duration': '01:00'})
self.assertEqual(response.status_code, 302)
def test_add_new_reservation_invalid_time(self):
self.client.post('/login',
data=self.user_data)
response = self.client.post('/resources/'+str(self.test_resource_id)+'/add_reservation',
data={ 'date': (datetime.now()+timedelta(days=1)).strftime('%Y-%m-%d'),
'start': 'not_time',
'duration': '01:00'})
self.assertEqual(response.status_code, 200)
self.assertTrue("Time Input Invalid" in response.data)
def test_add_new_reservation_out_of_range_time(self):
self.client.post('/login',
data=self.user_data)
response = self.client.post('/resources/'+str(self.test_resource_id)+'/add_reservation',
data={ 'date': (datetime.now()+timedelta(days=1)).strftime('%Y-%m-%d'),
'start': '0:00',
'duration': '01:00'})
self.assertEqual(response.status_code, 200)
self.assertTrue("Start time is before the resource available start" in response.data)
def test_add_new_reservation_out_of_range_time_2(self):
self.client.post('/login',
data=self.user_data)
response = self.client.post('/resources/'+str(self.test_resource_id)+'/add_reservation',
data={ 'date': (datetime.now()+timedelta(days=1)).strftime('%Y-%m-%d'),
'start': '18:00',
'duration': '01:00'})
self.assertEqual(response.status_code, 200)
self.assertTrue("End time is after the resource available end" in response.data)
def test_add_new_reservation_past_time(self):
self.client.post('/login',
data=self.user_data)
response = self.client.post('/resources/'+str(self.test_resource_id)+'/add_reservation',
data={ 'date': (datetime.now()-timedelta(days=1)).strftime('%Y-%m-%d'),
'start': '10:00',
'duration': '01:00'})
self.assertEqual(response.status_code, 200)
self.assertTrue("Add Reservation" in response.data)
def test_get_reservations_with_resource_id(self):
self.client.post('/login',
data=self.user_data)
response = self.client.get('/resources/'+str(self.test_resource_id)+'/get_reservations')
self.assertEqual(response.status_code, 200)
self.assertTrue(("Reservation Id: " +str(self.test_reservation_id)) in response.data)
def test_get_reservations_with_invalid_resource_id(self):
self.client.post('/login',
data=self.user_data)
response = self.client.get('/resources/'+str(99999)+'/get_reservations')
self.assertEqual(response.status_code, 404)
def test_delete_reservation(self):
self.client.post('/login',
data=self.user_data)
response = self.client.get('/reservations/'+str(self.test_reservation_id)+'/delete')
self.assertEqual(response.status_code, 302)
self.assertEqual(response.location, url_for('list'))
response = self.client.get('/reservations/'+str(self.test_reservation_id))
self.assertEqual(response.status_code, 404)
# ----------------------End Reservation tests ------------------------------
# ----------------------Tag tests ------------------------------------------
def test_retrieve_tag_by_id(self):
self.client.post('/login',
data=self.user_data)
response = self.client.get('/tags/'+str(self.tag_id_1))
self.assertEqual(response.status_code, 200)
self.assertTrue("test_res" in response.data)
def test_retrieve_tag_by_invalid_id(self):
self.client.post('/login',
data=self.user_data)
response = self.client.get('/tags/'+str(99999))
self.assertEqual(response.status_code, 404)
# ----------------------End Tag tests --------------------------------------
# ----------------------RSS tests ------------------------------------------
def test_get_RSS_by_resource_id(self):
self.client.post('/login',
data=self.user_data)
response = self.client.get('/resources/'+str(self.test_resource_id)+'/rss')
self.assertEqual(response.status_code, 200)
self.assertTrue(("All reservations for test_res") in response.data)
def test_get_RSS_by_invalid_resource_id(self):
self.client.post('/login',
data=self.user_data)
response = self.client.get('/resources/'+str(99999)+'/rss')
self.assertEqual(response.status_code, 404)
# ----------------------End RSS tests --------------------------------------
# ----------------------Search tests ---------------------------------------
def test_get_search_page(self):
self.client.post('/login',
data=self.user_data)
response = self.client.get('/search')
self.assertEqual(response.status_code, 200)
self.assertTrue(("Search Resource") in response.data)
def test_search_resource_should_have_result(self):
self.client.post('/login',
data=self.user_data)
response = self.client.post('/search',
data={ 'date': (datetime.now()+timedelta(days=2)).strftime('%Y-%m-%d'),
'start': '6:00',
'duration': '01:00'})
self.assertEqual(response.status_code, 200)
self.assertTrue(("test_res") in response.data)
def test_search_resource_should_not_have_result(self):
self.client.post('/login',
data=self.user_data)
response = self.client.post('/search',
data={ 'date': (datetime.now()+timedelta(days=2)).strftime('%Y-%m-%d'),
'start': '4:30',
'duration': '0:30'})
self.assertEqual(response.status_code, 200)
self.assertTrue(("test_res") not in response.data)
def test_search_resource_invalid_input(self):
self.client.post('/login',
data=self.user_data)
response = self.client.post('/search',
data={ 'date': (datetime.now()+timedelta(days=2)).strftime('%Y-%m-%d'),
'start': 'not_time',
'duration': '01:00'})
self.assertEqual(response.status_code, 200)
self.assertTrue(("Time Input Invalid") in response.data)
def test_search_resource_user_has_reservation_during_that_time(self):
self.client.post('/login',
data=self.user_data)
response = self.client.post('/search',
data={ 'date': datetime.now().strftime('%Y-%m-%d'),
'start': (datetime.now()+timedelta(minutes=30)).strftime('%H:%M'),
'duration': '01:00'})
self.assertEqual(response.status_code, 200)
self.assertTrue(("You already have a reservation during that time") in response.data)
# ----------------------End Search tests -----------------------------------
# ---------------------- SET UP --------------------------------------------
def setup_dummy_data(self):
self.test_user_id = self.add_one_user()
self.test_resource = self.add_one_resource()
self.test_resource_id, self.test_resource_name = self.test_resource.id, self.test_resource.name
self.test_reservation_id = self.add_one_reservation(
self.test_resource_id,
self.test_resource_name,
self.test_user_id)
self.tag = Tag("tag_1")
self.tag_2 = Tag("tag_2")
self.test_resource.tags.append(self.tag)
self.test_resource.tags.append(self.tag_2)
db.session.add(self.tag)
db.session.add(self.tag_2)
db.session.add(self.test_resource)
db.session.commit()
self.tag_id_1 = self.tag.id
def add_one_user(self):
user = User("a@a.com", "hard_to_guess_pw")
db.session.add(user)
db.session.commit()
return user.id
# must call add_one_user before using this method, should not called twice in one test
def add_one_resource(self):
user = User.query.filter_by(email="a@a.com").first()
resource = Resource()
resource.deserialize({
'name' : "test_res",
'owner_id' : user.id,
'available_start': "5:00",
'available_end' : "17:00"
})
db.session.add(resource)
db.session.commit()
return resource
def add_one_reservation(self, resource_id, resource_name, user_id):
reservation = Reservation()
reservation.deserialize({
'resource_id' : resource_id,
'resource_name' : resource_name,
'user_id' : user_id,
'start_time' : datetime.now(),
'end_time': datetime.now() + timedelta(minutes=90),
'duration': '01:30'
})
db.session.add(reservation)
db.session.commit()
return reservation.id
if __name__ == '__main__':
unittest.main()
| 48.530837
| 109
| 0.526619
| 2,295
| 22,033
| 4.84488
| 0.075381
| 0.075546
| 0.07051
| 0.122583
| 0.806637
| 0.77498
| 0.756903
| 0.721018
| 0.650598
| 0.626135
| 0
| 0.02016
| 0.313348
| 22,033
| 453
| 110
| 48.637969
| 0.714786
| 0.06168
| 0
| 0.575521
| 0
| 0
| 0.12152
| 0
| 0
| 0
| 0
| 0
| 0.223958
| 1
| 0.127604
| false
| 0.018229
| 0.015625
| 0
| 0.153646
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 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
| 5
|
02fe9cdf2472ded94fc476d810120e120cdf3d6d
| 96
|
py
|
Python
|
boa3_test/test_sc/arithmetic_test/StringMultiplication.py
|
hal0x2328/neo3-boa
|
6825a3533384cb01660773050719402a9703065b
|
[
"Apache-2.0"
] | 25
|
2020-07-22T19:37:43.000Z
|
2022-03-08T03:23:55.000Z
|
boa3_test/test_sc/arithmetic_test/StringMultiplication.py
|
hal0x2328/neo3-boa
|
6825a3533384cb01660773050719402a9703065b
|
[
"Apache-2.0"
] | 419
|
2020-04-23T17:48:14.000Z
|
2022-03-31T13:17:45.000Z
|
boa3_test/test_sc/arithmetic_test/StringMultiplication.py
|
hal0x2328/neo3-boa
|
6825a3533384cb01660773050719402a9703065b
|
[
"Apache-2.0"
] | 15
|
2020-05-21T21:54:24.000Z
|
2021-11-18T06:17:24.000Z
|
from boa3.builtin import public
@public
def str_mult(a: str, b: int) -> str:
return a * b
| 13.714286
| 36
| 0.65625
| 17
| 96
| 3.647059
| 0.705882
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013514
| 0.229167
| 96
| 6
| 37
| 16
| 0.824324
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.25
| 0.75
| 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
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
f30a61c67624010f08464d56dfa7fee916c4384d
| 56
|
py
|
Python
|
osf/features.py
|
rdm-dev12/RDM-osf.io
|
14d9a924b8c6bc7d79fd34b87830ffa29acafed1
|
[
"Apache-2.0"
] | null | null | null |
osf/features.py
|
rdm-dev12/RDM-osf.io
|
14d9a924b8c6bc7d79fd34b87830ffa29acafed1
|
[
"Apache-2.0"
] | 20
|
2020-03-24T16:48:03.000Z
|
2022-03-08T22:38:38.000Z
|
osf/features.py
|
rdm-dev12/RDM-osf.io
|
14d9a924b8c6bc7d79fd34b87830ffa29acafed1
|
[
"Apache-2.0"
] | null | null | null |
DISABLE_ENGAGEMENT_EMAILS = 'disable_engagement_emails'
| 28
| 55
| 0.892857
| 6
| 56
| 7.666667
| 0.5
| 0.73913
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.053571
| 56
| 1
| 56
| 56
| 0.867925
| 0
| 0
| 0
| 0
| 0
| 0.446429
| 0.446429
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f31bc8b504a117fd6d7c2a74c8f32c89c255fe64
| 282
|
py
|
Python
|
pex/vendor/_vendored/setuptools/easy_install.py
|
alexey-tereshenkov-oxb/pex
|
2e2d1e50e604fdee48b0d51aea482ca255521ff0
|
[
"Apache-2.0"
] | null | null | null |
pex/vendor/_vendored/setuptools/easy_install.py
|
alexey-tereshenkov-oxb/pex
|
2e2d1e50e604fdee48b0d51aea482ca255521ff0
|
[
"Apache-2.0"
] | null | null | null |
pex/vendor/_vendored/setuptools/easy_install.py
|
alexey-tereshenkov-oxb/pex
|
2e2d1e50e604fdee48b0d51aea482ca255521ff0
|
[
"Apache-2.0"
] | null | null | null |
"""Run the EasyInstall command"""
if __name__ == '__main__':
if "__PEX_UNVENDORED__" in __import__("os").environ:
from setuptools.command.easy_install import main # vendor:skip
else:
from pex.third_party.setuptools.command.easy_install import main
main()
| 28.2
| 70
| 0.712766
| 35
| 282
| 5.171429
| 0.628571
| 0.187845
| 0.232044
| 0.309392
| 0.41989
| 0.41989
| 0
| 0
| 0
| 0
| 0
| 0
| 0.180851
| 282
| 9
| 71
| 31.333333
| 0.78355
| 0.141844
| 0
| 0
| 0
| 0
| 0.118644
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
f31def61dc809959dda9dd35088b652f459f6fb5
| 52
|
py
|
Python
|
src/OTLMOW/Facility/Exceptions/MethodNotApplicableError.py
|
davidvlaminck/OTLClassPython
|
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
|
[
"MIT"
] | 2
|
2022-02-01T08:58:11.000Z
|
2022-02-08T13:35:17.000Z
|
src/OTLMOW/Facility/Exceptions/MethodNotApplicableError.py
|
davidvlaminck/OTLMOW
|
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
|
[
"MIT"
] | null | null | null |
src/OTLMOW/Facility/Exceptions/MethodNotApplicableError.py
|
davidvlaminck/OTLMOW
|
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
|
[
"MIT"
] | null | null | null |
class MethodNotApplicableError(Exception):
pass
| 17.333333
| 42
| 0.807692
| 4
| 52
| 10.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134615
| 52
| 2
| 43
| 26
| 0.933333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
b82a2db93b8bb5d6b20b3c3c5e4d9397cb2e2f20
| 75
|
py
|
Python
|
by-session/class-921/week3/global_var.py
|
amiraliakbari/sharif-mabani-python
|
5d14a08d165267fe71c28389ddbafe29af7078c5
|
[
"MIT"
] | 2
|
2015-04-29T20:59:35.000Z
|
2018-09-26T13:33:43.000Z
|
by-session/class-921/week3/global_var.py
|
amiraliakbari/sharif-mabani-python
|
5d14a08d165267fe71c28389ddbafe29af7078c5
|
[
"MIT"
] | null | null | null |
by-session/class-921/week3/global_var.py
|
amiraliakbari/sharif-mabani-python
|
5d14a08d165267fe71c28389ddbafe29af7078c5
|
[
"MIT"
] | null | null | null |
def a():
print k
global k
k = 1
print k
k = 10
a()
print k
| 8.333333
| 12
| 0.466667
| 15
| 75
| 2.333333
| 0.466667
| 0.514286
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 0.44
| 75
| 9
| 13
| 8.333333
| 0.761905
| 0
| 0
| 0.375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.375
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
b832bd44e02228a8b7ae62eb094e2ecffe32861f
| 12,948
|
py
|
Python
|
Sol_HW4/Q4/gen/MiniJavaLexer.py
|
kamyab78/IUSTCompiler
|
2a2edafdac3496e55f3985f3683f4e176456b560
|
[
"MIT"
] | null | null | null |
Sol_HW4/Q4/gen/MiniJavaLexer.py
|
kamyab78/IUSTCompiler
|
2a2edafdac3496e55f3985f3683f4e176456b560
|
[
"MIT"
] | null | null | null |
Sol_HW4/Q4/gen/MiniJavaLexer.py
|
kamyab78/IUSTCompiler
|
2a2edafdac3496e55f3985f3683f4e176456b560
|
[
"MIT"
] | null | null | null |
# Generated from /home/kamyab/Desktop/compiler/IUSTCompiler/Sol_HW4/Q2/MiniJava.g4 by ANTLR 4.9.1
from antlr4 import *
from io import StringIO
from typing.io import TextIO
import sys
def serializedATN():
with StringIO() as buf:
buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2.")
buf.write("\u013d\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7")
buf.write("\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r")
buf.write("\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22\4\23")
buf.write("\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30")
buf.write("\4\31\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36")
buf.write("\t\36\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%")
buf.write("\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4,\t,\4-\t-\4.")
buf.write("\t.\4/\t/\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2")
buf.write("\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3")
buf.write("\3\3\3\3\3\3\4\3\4\3\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5")
buf.write("\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3")
buf.write("\7\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\n")
buf.write("\3\n\3\13\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\f\3\r\3\r")
buf.write("\3\r\3\r\3\r\3\r\3\r\3\16\3\16\3\16\3\16\3\16\3\16\3\16")
buf.write("\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\20\3\20\3\20\3\20")
buf.write("\3\20\3\20\3\20\3\21\3\21\3\21\3\21\3\21\3\22\3\22\3\22")
buf.write("\3\22\3\22\3\23\3\23\3\23\3\23\3\23\3\24\3\24\3\24\3\24")
buf.write("\3\24\3\24\3\25\3\25\3\26\3\26\3\27\3\27\3\30\3\30\3\30")
buf.write("\3\31\3\31\3\31\3\32\3\32\3\33\3\33\3\34\3\34\3\35\3\35")
buf.write("\3\36\3\36\3\36\3\37\3\37\3\37\3 \3 \3!\3!\3\"\3\"\3#")
buf.write("\3#\3$\3$\3%\3%\3&\3&\3\'\3\'\3(\3(\3)\3)\3)\7)\u010b")
buf.write("\n)\f)\16)\u010e\13)\3*\3*\3*\7*\u0113\n*\f*\16*\u0116")
buf.write("\13*\5*\u0118\n*\3+\3+\3,\3,\3-\6-\u011f\n-\r-\16-\u0120")
buf.write("\3-\3-\3.\3.\3.\3.\7.\u0129\n.\f.\16.\u012c\13.\3.\3.")
buf.write("\3.\3.\3.\3/\3/\3/\3/\7/\u0137\n/\f/\16/\u013a\13/\3/")
buf.write("\3/\3\u012a\2\60\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23")
buf.write("\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25")
buf.write(")\26+\27-\30/\31\61\32\63\33\65\34\67\359\36;\37= ?!A")
buf.write("\"C#E$G%I&K\'M(O)Q*S+U\2W\2Y,[-].\3\2\7\3\2\63;\5\2C\\")
buf.write("aac|\3\2\62;\5\2\13\f\17\17\"\"\4\2\f\f\17\17\2\u0141")
buf.write("\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13")
buf.write("\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3")
buf.write("\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2")
buf.write("\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2")
buf.write("%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2")
buf.write("\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67")
buf.write("\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2")
buf.write("A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2")
buf.write("\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S\3\2\2")
buf.write("\2\2Y\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2\3_\3\2\2\2\5r\3\2")
buf.write("\2\2\7z\3\2\2\2\t\u0080\3\2\2\2\13\u0085\3\2\2\2\r\u008d")
buf.write("\3\2\2\2\17\u0093\3\2\2\2\21\u0096\3\2\2\2\23\u009a\3")
buf.write("\2\2\2\25\u00a1\3\2\2\2\27\u00a6\3\2\2\2\31\u00aa\3\2")
buf.write("\2\2\33\u00b1\3\2\2\2\35\u00b8\3\2\2\2\37\u00bf\3\2\2")
buf.write("\2!\u00c6\3\2\2\2#\u00cb\3\2\2\2%\u00d0\3\2\2\2\'\u00d5")
buf.write("\3\2\2\2)\u00db\3\2\2\2+\u00dd\3\2\2\2-\u00df\3\2\2\2")
buf.write("/\u00e1\3\2\2\2\61\u00e4\3\2\2\2\63\u00e7\3\2\2\2\65\u00e9")
buf.write("\3\2\2\2\67\u00eb\3\2\2\29\u00ed\3\2\2\2;\u00ef\3\2\2")
buf.write("\2=\u00f2\3\2\2\2?\u00f5\3\2\2\2A\u00f7\3\2\2\2C\u00f9")
buf.write("\3\2\2\2E\u00fb\3\2\2\2G\u00fd\3\2\2\2I\u00ff\3\2\2\2")
buf.write("K\u0101\3\2\2\2M\u0103\3\2\2\2O\u0105\3\2\2\2Q\u0107\3")
buf.write("\2\2\2S\u0117\3\2\2\2U\u0119\3\2\2\2W\u011b\3\2\2\2Y\u011e")
buf.write("\3\2\2\2[\u0124\3\2\2\2]\u0132\3\2\2\2_`\7U\2\2`a\7{\2")
buf.write("\2ab\7u\2\2bc\7v\2\2cd\7g\2\2de\7o\2\2ef\7\60\2\2fg\7")
buf.write("q\2\2gh\7w\2\2hi\7v\2\2ij\7\60\2\2jk\7r\2\2kl\7t\2\2l")
buf.write("m\7k\2\2mn\7p\2\2no\7v\2\2op\7n\2\2pq\7p\2\2q\4\3\2\2")
buf.write("\2rs\7d\2\2st\7q\2\2tu\7q\2\2uv\7n\2\2vw\7g\2\2wx\7c\2")
buf.write("\2xy\7p\2\2y\6\3\2\2\2z{\7e\2\2{|\7n\2\2|}\7c\2\2}~\7")
buf.write("u\2\2~\177\7u\2\2\177\b\3\2\2\2\u0080\u0081\7g\2\2\u0081")
buf.write("\u0082\7n\2\2\u0082\u0083\7u\2\2\u0083\u0084\7g\2\2\u0084")
buf.write("\n\3\2\2\2\u0085\u0086\7g\2\2\u0086\u0087\7z\2\2\u0087")
buf.write("\u0088\7v\2\2\u0088\u0089\7g\2\2\u0089\u008a\7p\2\2\u008a")
buf.write("\u008b\7f\2\2\u008b\u008c\7u\2\2\u008c\f\3\2\2\2\u008d")
buf.write("\u008e\7h\2\2\u008e\u008f\7c\2\2\u008f\u0090\7n\2\2\u0090")
buf.write("\u0091\7u\2\2\u0091\u0092\7g\2\2\u0092\16\3\2\2\2\u0093")
buf.write("\u0094\7k\2\2\u0094\u0095\7h\2\2\u0095\20\3\2\2\2\u0096")
buf.write("\u0097\7k\2\2\u0097\u0098\7p\2\2\u0098\u0099\7v\2\2\u0099")
buf.write("\22\3\2\2\2\u009a\u009b\7n\2\2\u009b\u009c\7g\2\2\u009c")
buf.write("\u009d\7p\2\2\u009d\u009e\7i\2\2\u009e\u009f\7v\2\2\u009f")
buf.write("\u00a0\7j\2\2\u00a0\24\3\2\2\2\u00a1\u00a2\7o\2\2\u00a2")
buf.write("\u00a3\7c\2\2\u00a3\u00a4\7k\2\2\u00a4\u00a5\7p\2\2\u00a5")
buf.write("\26\3\2\2\2\u00a6\u00a7\7p\2\2\u00a7\u00a8\7g\2\2\u00a8")
buf.write("\u00a9\7y\2\2\u00a9\30\3\2\2\2\u00aa\u00ab\7r\2\2\u00ab")
buf.write("\u00ac\7w\2\2\u00ac\u00ad\7d\2\2\u00ad\u00ae\7n\2\2\u00ae")
buf.write("\u00af\7k\2\2\u00af\u00b0\7e\2\2\u00b0\32\3\2\2\2\u00b1")
buf.write("\u00b2\7t\2\2\u00b2\u00b3\7g\2\2\u00b3\u00b4\7v\2\2\u00b4")
buf.write("\u00b5\7w\2\2\u00b5\u00b6\7t\2\2\u00b6\u00b7\7p\2\2\u00b7")
buf.write("\34\3\2\2\2\u00b8\u00b9\7u\2\2\u00b9\u00ba\7v\2\2\u00ba")
buf.write("\u00bb\7c\2\2\u00bb\u00bc\7v\2\2\u00bc\u00bd\7k\2\2\u00bd")
buf.write("\u00be\7e\2\2\u00be\36\3\2\2\2\u00bf\u00c0\7U\2\2\u00c0")
buf.write("\u00c1\7v\2\2\u00c1\u00c2\7t\2\2\u00c2\u00c3\7k\2\2\u00c3")
buf.write("\u00c4\7p\2\2\u00c4\u00c5\7i\2\2\u00c5 \3\2\2\2\u00c6")
buf.write("\u00c7\7v\2\2\u00c7\u00c8\7j\2\2\u00c8\u00c9\7k\2\2\u00c9")
buf.write("\u00ca\7u\2\2\u00ca\"\3\2\2\2\u00cb\u00cc\7v\2\2\u00cc")
buf.write("\u00cd\7t\2\2\u00cd\u00ce\7w\2\2\u00ce\u00cf\7g\2\2\u00cf")
buf.write("$\3\2\2\2\u00d0\u00d1\7x\2\2\u00d1\u00d2\7q\2\2\u00d2")
buf.write("\u00d3\7k\2\2\u00d3\u00d4\7f\2\2\u00d4&\3\2\2\2\u00d5")
buf.write("\u00d6\7y\2\2\u00d6\u00d7\7j\2\2\u00d7\u00d8\7k\2\2\u00d8")
buf.write("\u00d9\7n\2\2\u00d9\u00da\7g\2\2\u00da(\3\2\2\2\u00db")
buf.write("\u00dc\7?\2\2\u00dc*\3\2\2\2\u00dd\u00de\7@\2\2\u00de")
buf.write(",\3\2\2\2\u00df\u00e0\7>\2\2\u00e0.\3\2\2\2\u00e1\u00e2")
buf.write("\7@\2\2\u00e2\u00e3\7?\2\2\u00e3\60\3\2\2\2\u00e4\u00e5")
buf.write("\7>\2\2\u00e5\u00e6\7?\2\2\u00e6\62\3\2\2\2\u00e7\u00e8")
buf.write("\7-\2\2\u00e8\64\3\2\2\2\u00e9\u00ea\7/\2\2\u00ea\66\3")
buf.write("\2\2\2\u00eb\u00ec\7,\2\2\u00ec8\3\2\2\2\u00ed\u00ee\7")
buf.write("#\2\2\u00ee:\3\2\2\2\u00ef\u00f0\7(\2\2\u00f0\u00f1\7")
buf.write("(\2\2\u00f1<\3\2\2\2\u00f2\u00f3\7~\2\2\u00f3\u00f4\7")
buf.write("~\2\2\u00f4>\3\2\2\2\u00f5\u00f6\7*\2\2\u00f6@\3\2\2\2")
buf.write("\u00f7\u00f8\7+\2\2\u00f8B\3\2\2\2\u00f9\u00fa\7]\2\2")
buf.write("\u00faD\3\2\2\2\u00fb\u00fc\7_\2\2\u00fcF\3\2\2\2\u00fd")
buf.write("\u00fe\7}\2\2\u00feH\3\2\2\2\u00ff\u0100\7\177\2\2\u0100")
buf.write("J\3\2\2\2\u0101\u0102\7.\2\2\u0102L\3\2\2\2\u0103\u0104")
buf.write("\7\60\2\2\u0104N\3\2\2\2\u0105\u0106\7=\2\2\u0106P\3\2")
buf.write("\2\2\u0107\u010c\5U+\2\u0108\u010b\5U+\2\u0109\u010b\5")
buf.write("W,\2\u010a\u0108\3\2\2\2\u010a\u0109\3\2\2\2\u010b\u010e")
buf.write("\3\2\2\2\u010c\u010a\3\2\2\2\u010c\u010d\3\2\2\2\u010d")
buf.write("R\3\2\2\2\u010e\u010c\3\2\2\2\u010f\u0118\7\62\2\2\u0110")
buf.write("\u0114\t\2\2\2\u0111\u0113\5W,\2\u0112\u0111\3\2\2\2\u0113")
buf.write("\u0116\3\2\2\2\u0114\u0112\3\2\2\2\u0114\u0115\3\2\2\2")
buf.write("\u0115\u0118\3\2\2\2\u0116\u0114\3\2\2\2\u0117\u010f\3")
buf.write("\2\2\2\u0117\u0110\3\2\2\2\u0118T\3\2\2\2\u0119\u011a")
buf.write("\t\3\2\2\u011aV\3\2\2\2\u011b\u011c\t\4\2\2\u011cX\3\2")
buf.write("\2\2\u011d\u011f\t\5\2\2\u011e\u011d\3\2\2\2\u011f\u0120")
buf.write("\3\2\2\2\u0120\u011e\3\2\2\2\u0120\u0121\3\2\2\2\u0121")
buf.write("\u0122\3\2\2\2\u0122\u0123\b-\2\2\u0123Z\3\2\2\2\u0124")
buf.write("\u0125\7\61\2\2\u0125\u0126\7,\2\2\u0126\u012a\3\2\2\2")
buf.write("\u0127\u0129\13\2\2\2\u0128\u0127\3\2\2\2\u0129\u012c")
buf.write("\3\2\2\2\u012a\u012b\3\2\2\2\u012a\u0128\3\2\2\2\u012b")
buf.write("\u012d\3\2\2\2\u012c\u012a\3\2\2\2\u012d\u012e\7,\2\2")
buf.write("\u012e\u012f\7\61\2\2\u012f\u0130\3\2\2\2\u0130\u0131")
buf.write("\b.\2\2\u0131\\\3\2\2\2\u0132\u0133\7\61\2\2\u0133\u0134")
buf.write("\7\61\2\2\u0134\u0138\3\2\2\2\u0135\u0137\n\6\2\2\u0136")
buf.write("\u0135\3\2\2\2\u0137\u013a\3\2\2\2\u0138\u0136\3\2\2\2")
buf.write("\u0138\u0139\3\2\2\2\u0139\u013b\3\2\2\2\u013a\u0138\3")
buf.write("\2\2\2\u013b\u013c\b/\2\2\u013c^\3\2\2\2\n\2\u010a\u010c")
buf.write("\u0114\u0117\u0120\u012a\u0138\3\b\2\2")
return buf.getvalue()
class MiniJavaLexer(Lexer):
atn = ATNDeserializer().deserialize(serializedATN())
decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ]
T__0 = 1
BOOLEAN = 2
CLASS = 3
ELSE = 4
EXTENDS = 5
FALSE = 6
IF = 7
INT = 8
LENGTH = 9
MAIN = 10
NEW = 11
PUBLIC = 12
RETURN = 13
STATIC = 14
STRING = 15
THIS = 16
TRUE = 17
VOID = 18
WHILE = 19
ASSIGN = 20
GREAT = 21
LITTLE = 22
GREAT_EQUAL = 23
LITTLE_EQUAL = 24
PLUS = 25
MINUS = 26
TIMES = 27
BANG = 28
AND = 29
OR = 30
LEFT_PARANTEZ = 31
RIGHT_PARANTEZ = 32
LEFT_BRACKET = 33
RIGHT_BRACKET = 34
LEFT_BRACE = 35
RIGHT_BRACE = 36
COMMA = 37
DOT = 38
SEMICOLEM = 39
ID = 40
INT_VALUE = 41
WS = 42
COMMENT = 43
LINE_COMMENT = 44
channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ]
modeNames = [ "DEFAULT_MODE" ]
literalNames = [ "<INVALID>",
"'System.out.println'", "'boolean'", "'class'", "'else'", "'extends'",
"'false'", "'if'", "'int'", "'length'", "'main'", "'new'", "'public'",
"'return'", "'static'", "'String'", "'this'", "'true'", "'void'",
"'while'", "'='", "'>'", "'<'", "'>='", "'<='", "'+'", "'-'",
"'*'", "'!'", "'&&'", "'||'", "'('", "')'", "'['", "']'", "'{'",
"'}'", "','", "'.'", "';'" ]
symbolicNames = [ "<INVALID>",
"BOOLEAN", "CLASS", "ELSE", "EXTENDS", "FALSE", "IF", "INT",
"LENGTH", "MAIN", "NEW", "PUBLIC", "RETURN", "STATIC", "STRING",
"THIS", "TRUE", "VOID", "WHILE", "ASSIGN", "GREAT", "LITTLE",
"GREAT_EQUAL", "LITTLE_EQUAL", "PLUS", "MINUS", "TIMES", "BANG",
"AND", "OR", "LEFT_PARANTEZ", "RIGHT_PARANTEZ", "LEFT_BRACKET",
"RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "COMMA", "DOT",
"SEMICOLEM", "ID", "INT_VALUE", "WS", "COMMENT", "LINE_COMMENT" ]
ruleNames = [ "T__0", "BOOLEAN", "CLASS", "ELSE", "EXTENDS", "FALSE",
"IF", "INT", "LENGTH", "MAIN", "NEW", "PUBLIC", "RETURN",
"STATIC", "STRING", "THIS", "TRUE", "VOID", "WHILE", "ASSIGN",
"GREAT", "LITTLE", "GREAT_EQUAL", "LITTLE_EQUAL", "PLUS",
"MINUS", "TIMES", "BANG", "AND", "OR", "LEFT_PARANTEZ",
"RIGHT_PARANTEZ", "LEFT_BRACKET", "RIGHT_BRACKET", "LEFT_BRACE",
"RIGHT_BRACE", "COMMA", "DOT", "SEMICOLEM", "ID", "INT_VALUE",
"LETTER", "NUMS", "WS", "COMMENT", "LINE_COMMENT" ]
grammarFileName = "MiniJava.g4"
def __init__(self, input=None, output:TextIO = sys.stdout):
super().__init__(input, output)
self.checkVersion("4.9.1")
self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache())
self._actions = None
self._predicates = None
| 55.810345
| 103
| 0.546725
| 2,886
| 12,948
| 2.434858
| 0.158351
| 0.134339
| 0.076846
| 0.080831
| 0.275793
| 0.20592
| 0.15042
| 0.138751
| 0.135193
| 0.125516
| 0
| 0.310383
| 0.160952
| 12,948
| 231
| 104
| 56.051948
| 0.336432
| 0.007337
| 0
| 0
| 1
| 0.549296
| 0.594599
| 0.52292
| 0.004695
| 0
| 0
| 0
| 0
| 1
| 0.00939
| false
| 0
| 0.018779
| 0
| 0.28169
| 0.004695
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
b834a98f4bdb57ecb9a49b9505092b518a38aea6
| 66
|
py
|
Python
|
variables.py
|
alenak2006/python-training
|
ed45b40bb4a9eb9d770eae25e1591a7525176e14
|
[
"MIT"
] | null | null | null |
variables.py
|
alenak2006/python-training
|
ed45b40bb4a9eb9d770eae25e1591a7525176e14
|
[
"MIT"
] | 1
|
2021-05-06T17:03:17.000Z
|
2021-05-06T17:03:17.000Z
|
variables.py
|
alenak2006/python-training
|
ed45b40bb4a9eb9d770eae25e1591a7525176e14
|
[
"MIT"
] | null | null | null |
#test1
#this is change1 on local
#this is change2 on local branch
| 16.5
| 32
| 0.772727
| 12
| 66
| 4.25
| 0.666667
| 0.235294
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.055556
| 0.181818
| 66
| 3
| 33
| 22
| 0.888889
| 0.909091
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
b876b1d91cae00ee75bb89cec2aceb4c47d0abec
| 113
|
py
|
Python
|
crashcourse/10.py
|
Itsaadarsh/python-crash-course
|
0e7cbf118e477815e3df2e79c42c7ea37b6da5e9
|
[
"MIT"
] | 1
|
2020-09-28T16:54:14.000Z
|
2020-09-28T16:54:14.000Z
|
crashcourse/10.py
|
Itsaadarsh/python-crash-course
|
0e7cbf118e477815e3df2e79c42c7ea37b6da5e9
|
[
"MIT"
] | null | null | null |
crashcourse/10.py
|
Itsaadarsh/python-crash-course
|
0e7cbf118e477815e3df2e79c42c7ea37b6da5e9
|
[
"MIT"
] | null | null | null |
import math
import myModule
print('PI =>', math.pi)
print('ADDING USING MODULES =>', myModule.adding(100, 200))
| 18.833333
| 59
| 0.707965
| 16
| 113
| 5
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.060606
| 0.123894
| 113
| 5
| 60
| 22.6
| 0.747475
| 0
| 0
| 0
| 0
| 0
| 0.247788
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
b88421c5156ba1b9399ab49e409a5b7145a24cab
| 207
|
py
|
Python
|
leapYear.py
|
bjoffficial/Python
|
73e6fdc19a1bec18488405c4a60c30ba68581ce5
|
[
"Apache-2.0"
] | null | null | null |
leapYear.py
|
bjoffficial/Python
|
73e6fdc19a1bec18488405c4a60c30ba68581ce5
|
[
"Apache-2.0"
] | null | null | null |
leapYear.py
|
bjoffficial/Python
|
73e6fdc19a1bec18488405c4a60c30ba68581ce5
|
[
"Apache-2.0"
] | null | null | null |
n=int(input("Enter the year"))
if n%4==0:
print("Leap year")
if n%100==0:
print("Not Leap Year")
if n%400==0:
print("Leap year")
else:
print("Not Leap year")
| 20.7
| 31
| 0.492754
| 33
| 207
| 3.090909
| 0.454545
| 0.313725
| 0.205882
| 0.27451
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072464
| 0.333333
| 207
| 9
| 32
| 23
| 0.666667
| 0
| 0
| 0.222222
| 0
| 0
| 0.292929
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.444444
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
b26a314adeaf43a5418b0079d2c9f0d609dc045a
| 66
|
py
|
Python
|
src/ex_struct/__init__.py
|
VRGhost/jsJson
|
d9deb9692044b303e6b3dd7e5487f06c2e6cd466
|
[
"MIT"
] | null | null | null |
src/ex_struct/__init__.py
|
VRGhost/jsJson
|
d9deb9692044b303e6b3dd7e5487f06c2e6cd466
|
[
"MIT"
] | null | null | null |
src/ex_struct/__init__.py
|
VRGhost/jsJson
|
d9deb9692044b303e6b3dd7e5487f06c2e6cd466
|
[
"MIT"
] | null | null | null |
from . import commands, context, exc, main, resource_loader, util
| 33
| 65
| 0.772727
| 9
| 66
| 5.555556
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136364
| 66
| 1
| 66
| 66
| 0.877193
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
b277c2ca6ada929d9c1b6d4495a2394073fab243
| 39
|
py
|
Python
|
wowair/error.py
|
acupy/wowair_api
|
b61bbcde365c04a13e0a71d6205e025d2981493f
|
[
"MIT"
] | 1
|
2019-01-01T13:56:03.000Z
|
2019-01-01T13:56:03.000Z
|
wowair/error.py
|
acupy/wowair_api
|
b61bbcde365c04a13e0a71d6205e025d2981493f
|
[
"MIT"
] | 3
|
2017-06-04T15:16:09.000Z
|
2017-06-04T15:46:59.000Z
|
wowair/error.py
|
acupy/wowair_api
|
b61bbcde365c04a13e0a71d6205e025d2981493f
|
[
"MIT"
] | null | null | null |
class WowAirError(Exception):
pass
| 13
| 29
| 0.74359
| 4
| 39
| 7.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.179487
| 39
| 2
| 30
| 19.5
| 0.90625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
b293322dc28a84a7a33210db2d4538fb6d04d9a5
| 108
|
py
|
Python
|
edera/managers/__init__.py
|
thoughteer/edera
|
c4ddb5d8a25906c3bd773c91afb3260fc0b704f2
|
[
"MIT"
] | 3
|
2018-11-27T15:45:19.000Z
|
2018-12-21T20:32:10.000Z
|
edera/managers/__init__.py
|
thoughteer/edera
|
c4ddb5d8a25906c3bd773c91afb3260fc0b704f2
|
[
"MIT"
] | 18
|
2018-12-02T18:38:59.000Z
|
2020-02-05T22:09:37.000Z
|
edera/managers/__init__.py
|
thoughteer/edera
|
c4ddb5d8a25906c3bd773c91afb3260fc0b704f2
|
[
"MIT"
] | null | null | null |
from .cascade import CascadeManager
from .mongo import MongoManager
from .zookeeper import ZooKeeperManager
| 27
| 39
| 0.861111
| 12
| 108
| 7.75
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 108
| 3
| 40
| 36
| 0.96875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a22c406d2111240609122a8d30703b19a55cc361
| 161
|
py
|
Python
|
redemption/tools/sesman/tests/__init__.py
|
DianaAssistant/DIANA
|
6a4c51c1861f6a936941b21c2c905fc291c229d7
|
[
"MIT"
] | null | null | null |
redemption/tools/sesman/tests/__init__.py
|
DianaAssistant/DIANA
|
6a4c51c1861f6a936941b21c2c905fc291c229d7
|
[
"MIT"
] | null | null | null |
redemption/tools/sesman/tests/__init__.py
|
DianaAssistant/DIANA
|
6a4c51c1861f6a936941b21c2c905fc291c229d7
|
[
"MIT"
] | null | null | null |
import sys
import os
from unittest.mock import Mock
sys.modules["logger"] = Mock()
sys.path.append(os.path.join(os.path.dirname(__file__), "../sesmanworker"))
| 20.125
| 75
| 0.73913
| 24
| 161
| 4.791667
| 0.583333
| 0.121739
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.093168
| 161
| 7
| 76
| 23
| 0.787671
| 0
| 0
| 0
| 0
| 0
| 0.130435
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.6
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a23b3920368203e5327c18b638e4b2d171d85ca9
| 112
|
py
|
Python
|
Scripts/dk/ui/layouter.py
|
hhg128/DKGL
|
c61bc6546ac5655da97462cc532a9034ba08516d
|
[
"PSF-2.0",
"BSD-3-Clause"
] | 14
|
2015-09-12T01:32:05.000Z
|
2021-10-13T02:52:53.000Z
|
Scripts/dk/ui/layouter.py
|
hhg128/DKGL
|
c61bc6546ac5655da97462cc532a9034ba08516d
|
[
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null |
Scripts/dk/ui/layouter.py
|
hhg128/DKGL
|
c61bc6546ac5655da97462cc532a9034ba08516d
|
[
"PSF-2.0",
"BSD-3-Clause"
] | 3
|
2015-11-10T03:12:49.000Z
|
2018-10-15T15:38:31.000Z
|
import _dk_core as core
'''
layouter
assume view's origin(0,0) is left-bottom
'''
class Layouter:
pass
| 8.615385
| 40
| 0.678571
| 18
| 112
| 4.111111
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.022727
| 0.214286
| 112
| 12
| 41
| 9.333333
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
a2602bde0fcc4bb4a6f69f5460d4be138c495b14
| 125
|
py
|
Python
|
glearn/nerualnetworks/__init__.py
|
ggutierrez545/neuralnetworks
|
891fc622515af765b8529091b99e377215e195ca
|
[
"MIT"
] | null | null | null |
glearn/nerualnetworks/__init__.py
|
ggutierrez545/neuralnetworks
|
891fc622515af765b8529091b99e377215e195ca
|
[
"MIT"
] | 7
|
2020-07-17T23:58:40.000Z
|
2020-08-17T21:28:21.000Z
|
glearn/nerualnetworks/__init__.py
|
ggutierrez545/neuralnetworks
|
891fc622515af765b8529091b99e377215e195ca
|
[
"MIT"
] | null | null | null |
# Make primary neural nets available in this namespace
from .nn import NeuralNetwork
from .cnn import ConvolutionalNeuralNet
| 31.25
| 54
| 0.84
| 16
| 125
| 6.5625
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136
| 125
| 3
| 55
| 41.666667
| 0.972222
| 0.416
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a271f1a43cca1d2f8cb46f454db1a10d64280164
| 247
|
py
|
Python
|
myapp/views.py
|
Rabindratmg/Django-channels-simple-chat-app
|
8f363fe8697faae6c6000c23cdf3b4abd5d9b431
|
[
"MIT"
] | 2
|
2021-06-26T09:49:00.000Z
|
2021-06-26T09:50:00.000Z
|
myapp/views.py
|
Rabindratmg/Django-channels-simple-chat-app
|
8f363fe8697faae6c6000c23cdf3b4abd5d9b431
|
[
"MIT"
] | null | null | null |
myapp/views.py
|
Rabindratmg/Django-channels-simple-chat-app
|
8f363fe8697faae6c6000c23cdf3b4abd5d9b431
|
[
"MIT"
] | 1
|
2021-09-14T17:44:23.000Z
|
2021-09-14T17:44:23.000Z
|
from django.shortcuts import render
from django.http import request
# Create your views here.
def Home(request):
return render(request,'index.html')
def Chat(request,room_name):
return render(request,'chat.html',{'room_name':room_name})
| 24.7
| 62
| 0.757085
| 36
| 247
| 5.111111
| 0.527778
| 0.130435
| 0.206522
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125506
| 247
| 10
| 62
| 24.7
| 0.851852
| 0.093117
| 0
| 0
| 0
| 0
| 0.125561
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
a27323f16248fad1c8f172e60985df4a92157245
| 58
|
py
|
Python
|
datainfo/__init__.py
|
hong-chen/datainfo
|
55a3d334844c0194ede99e67d8d23fbe3feca251
|
[
"MIT"
] | null | null | null |
datainfo/__init__.py
|
hong-chen/datainfo
|
55a3d334844c0194ede99e67d8d23fbe3feca251
|
[
"MIT"
] | null | null | null |
datainfo/__init__.py
|
hong-chen/datainfo
|
55a3d334844c0194ede99e67d8d23fbe3feca251
|
[
"MIT"
] | null | null | null |
from . import file_hdf4, file_hdf5, file_idl, file_netcdf
| 29
| 57
| 0.810345
| 10
| 58
| 4.3
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.039216
| 0.12069
| 58
| 1
| 58
| 58
| 0.803922
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a2b4573c009cd86b8de0b0f8fcf54f4fb0c584b3
| 92
|
py
|
Python
|
EduNLP/SIF/tokenization/__init__.py
|
karin0018/EduNLP
|
172c36a2cd2c41a1f1c5833d7b1abcbc5e3bbd5f
|
[
"Apache-2.0"
] | 18
|
2021-02-15T13:10:42.000Z
|
2022-03-17T12:57:34.000Z
|
EduNLP/SIF/tokenization/__init__.py
|
karin0018/EduNLP
|
172c36a2cd2c41a1f1c5833d7b1abcbc5e3bbd5f
|
[
"Apache-2.0"
] | 81
|
2021-06-02T07:45:20.000Z
|
2022-03-29T15:21:32.000Z
|
EduNLP/SIF/tokenization/__init__.py
|
karin0018/EduNLP
|
172c36a2cd2c41a1f1c5833d7b1abcbc5e3bbd5f
|
[
"Apache-2.0"
] | 29
|
2021-05-18T08:34:58.000Z
|
2022-03-12T00:19:09.000Z
|
# coding: utf-8
# 2021/5/18 @ tongshiwei
from .tokenization import tokenize, link_formulas
| 18.4
| 49
| 0.76087
| 13
| 92
| 5.307692
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.101266
| 0.141304
| 92
| 4
| 50
| 23
| 0.772152
| 0.391304
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a2bf480c4940d3343ccd4a5420678bcaff7817bb
| 104
|
py
|
Python
|
python/testData/intentions/PyConvertToFStringIntentionTest/formatMethodAttributeReferences.py
|
jnthn/intellij-community
|
8fa7c8a3ace62400c838e0d5926a7be106aa8557
|
[
"Apache-2.0"
] | 2
|
2019-04-28T07:48:50.000Z
|
2020-12-11T14:18:08.000Z
|
python/testData/intentions/PyConvertToFStringIntentionTest/formatMethodAttributeReferences.py
|
jnthn/intellij-community
|
8fa7c8a3ace62400c838e0d5926a7be106aa8557
|
[
"Apache-2.0"
] | 173
|
2018-07-05T13:59:39.000Z
|
2018-08-09T01:12:03.000Z
|
python/testData/intentions/PyConvertToFStringIntentionTest/formatMethodAttributeReferences.py
|
jnthn/intellij-community
|
8fa7c8a3ace62400c838e0d5926a7be106aa8557
|
[
"Apache-2.0"
] | 2
|
2020-03-15T08:57:37.000Z
|
2020-04-07T04:48:14.000Z
|
'{0.foo.bar:#} {key1.baz} {1.foo!r} {2.foo!r:3.5}'.format(object(), something(), another(), key1='foo')
| 52
| 103
| 0.586538
| 19
| 104
| 3.210526
| 0.736842
| 0.131148
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072165
| 0.067308
| 104
| 1
| 104
| 104
| 0.556701
| 0
| 0
| 0
| 0
| 1
| 0.490385
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a2f9a0dcdae1f09aba94bd4f204b2b11f3bd4665
| 437
|
py
|
Python
|
create_gradient_walk_variant.py
|
SanjoSolutions/mathematics
|
277b775b4331e3b7de34175e9822daa0b75ff77b
|
[
"Unlicense"
] | null | null | null |
create_gradient_walk_variant.py
|
SanjoSolutions/mathematics
|
277b775b4331e3b7de34175e9822daa0b75ff77b
|
[
"Unlicense"
] | null | null | null |
create_gradient_walk_variant.py
|
SanjoSolutions/mathematics
|
277b775b4331e3b7de34175e9822daa0b75ff77b
|
[
"Unlicense"
] | null | null | null |
from gradient_walk import gradient_walk
def create_gradient_walk_variant(update):
def gradient_walk_variant(variables, calculate_slopes, max_steps=None, after_step=None):
variables = tuple(variable.copy() for variable in variables)
for variable in variables:
variable['update'] = update
return gradient_walk(variables, calculate_slopes, max_steps, after_step)
return gradient_walk_variant
| 33.615385
| 92
| 0.75286
| 54
| 437
| 5.796296
| 0.407407
| 0.230032
| 0.182109
| 0.172524
| 0.204473
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.183066
| 437
| 12
| 93
| 36.416667
| 0.876751
| 0
| 0
| 0
| 0
| 0
| 0.01373
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.125
| 0
| 0.625
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
0c493a7ff6a761fe320479fb6b6df5912ee8e327
| 67
|
py
|
Python
|
archive_box/search/__init__.py
|
fyhuang/archive_box
|
1cbbd839012fed5e12341b78027d132c72dd01df
|
[
"BSD-3-Clause"
] | null | null | null |
archive_box/search/__init__.py
|
fyhuang/archive_box
|
1cbbd839012fed5e12341b78027d132c72dd01df
|
[
"BSD-3-Clause"
] | null | null | null |
archive_box/search/__init__.py
|
fyhuang/archive_box
|
1cbbd839012fed5e12341b78027d132c72dd01df
|
[
"BSD-3-Clause"
] | null | null | null |
from .search_index import SqliteDocumentSearchIndex as SearchIndex
| 33.5
| 66
| 0.895522
| 7
| 67
| 8.428571
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.089552
| 67
| 1
| 67
| 67
| 0.967213
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a756210b18d95bff2d1e06bb0da3860cde5d23ef
| 221
|
py
|
Python
|
democelery/network/apps.py
|
alexdzul/democelery
|
4627d155ccc3a6daf21ec4e4b8d554891446288d
|
[
"MIT"
] | 1
|
2021-12-02T05:29:37.000Z
|
2021-12-02T05:29:37.000Z
|
democelery/network/apps.py
|
alexdzul/democelery
|
4627d155ccc3a6daf21ec4e4b8d554891446288d
|
[
"MIT"
] | null | null | null |
democelery/network/apps.py
|
alexdzul/democelery
|
4627d155ccc3a6daf21ec4e4b8d554891446288d
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class NetworkConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'democelery.network'
def ready(self):
import democelery.network.signals
| 22.1
| 56
| 0.737557
| 25
| 221
| 6.44
| 0.8
| 0.21118
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 221
| 9
| 57
| 24.555556
| 0.884615
| 0
| 0
| 0
| 0
| 0
| 0.21267
| 0.131222
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a76d7cfa99ab3dcb2d0a83afae4e75f936cef741
| 5,807
|
py
|
Python
|
tests/tf-keras-vis/test_gradcam.py
|
Zhao-Kuangshi/tf-keras-vis
|
ddd951396f16e7f5b7a0e8619f43f99c599628fb
|
[
"MIT"
] | 1
|
2020-11-05T07:14:20.000Z
|
2020-11-05T07:14:20.000Z
|
tests/tf-keras-vis/test_gradcam.py
|
Zhao-Kuangshi/tf-keras-vis
|
ddd951396f16e7f5b7a0e8619f43f99c599628fb
|
[
"MIT"
] | null | null | null |
tests/tf-keras-vis/test_gradcam.py
|
Zhao-Kuangshi/tf-keras-vis
|
ddd951396f16e7f5b7a0e8619f43f99c599628fb
|
[
"MIT"
] | null | null | null |
import numpy as np
import pytest
import tensorflow as tf
from tensorflow.keras import backend as K
from tensorflow.keras.layers import (Conv2D, Dense, GlobalAveragePooling2D, Input)
from tensorflow.keras.models import Model
from tf_keras_vis.gradcam import Gradcam
from tf_keras_vis.utils.losses import CategoricalScore
@pytest.fixture(scope="function", autouse=True)
def dense_model():
inputs = Input((3, ))
x = Dense(5, activation='relu')(inputs)
x = Dense(2, activation='softmax')(x)
return Model(inputs=inputs, outputs=x)
@pytest.fixture(scope="function", autouse=True)
def model():
inputs = Input((8, 8, 3))
x = Conv2D(2, 3, activation='relu')(inputs)
x = GlobalAveragePooling2D()(x)
x = Dense(2, activation='softmax')(x)
return Model(inputs=inputs, outputs=x)
@pytest.fixture(scope="function", autouse=True)
def multiple_inputs_model():
inputs1 = Input((8, 8, 3))
inputs2 = Input((10, 10, 3))
x1 = Conv2D(2, 3, padding='same', activation='relu')(inputs1)
x2 = Conv2D(2, 3, activation='relu')(inputs2)
x = K.concatenate([x1, x2], axis=-1)
x = GlobalAveragePooling2D()(x)
x = Dense(2, activation='softmax')(x)
return Model(inputs=[inputs1, inputs2], outputs=x)
@pytest.fixture(scope="function", autouse=True)
def multiple_outputs_model():
inputs = Input((8, 8, 3))
x = Conv2D(2, 3, activation='relu')(inputs)
x = GlobalAveragePooling2D()(x)
x1 = Dense(2, activation='softmax')(x)
x2 = Dense(1)(x)
return Model(inputs=inputs, outputs=[x1, x2])
@pytest.fixture(scope="function", autouse=True)
def multiple_io_model():
inputs1 = Input((8, 8, 3))
inputs2 = Input((10, 10, 3))
x1 = Conv2D(2, 3, padding='same', activation='relu')(inputs1)
x2 = Conv2D(2, 3, activation='relu')(inputs2)
x = K.concatenate([x1, x2], axis=-1)
x = GlobalAveragePooling2D()(x)
x1 = Dense(2, activation='softmax')(x)
x2 = Dense(1)(x)
return Model(inputs=[inputs1, inputs2], outputs=[x1, x2])
def test__call__if_loss_is_None(model):
gradcam = Gradcam(model)
with pytest.raises(ValueError):
gradcam(None, None)
def test__call__if_seed_input_is_None(model):
gradcam = Gradcam(model)
with pytest.raises(ValueError):
gradcam(CategoricalScore(1, 2), None)
def test__call__if_seed_input_shape_is_invalid(model):
gradcam = Gradcam(model)
try:
gradcam(CategoricalScore(1, 2), np.random.sample((8, )))
assert False
except (ValueError, tf.errors.InvalidArgumentError):
# TF became to raise InvalidArgumentError from ver.2.0.2.
assert True
def test__call__if_seed_input_has_not_batch_dim(model):
gradcam = Gradcam(model)
result = gradcam(CategoricalScore(1, 2), np.random.sample((8, 8, 3)))
assert result.shape == (1, 8, 8)
def test__call__(model):
gradcam = Gradcam(model)
result = gradcam(CategoricalScore(1, 2), np.random.sample((1, 8, 8, 3)))
assert result.shape == (1, 8, 8)
def test__call__if_penultimate_layer_is_None(model):
gradcam = Gradcam(model)
result = gradcam(CategoricalScore(1, 2), np.random.sample((1, 8, 8, 3)), penultimate_layer=None)
assert result.shape == (1, 8, 8)
def test__call__if_penultimate_layer_is_no_exist_index(model):
gradcam = Gradcam(model)
with pytest.raises(ValueError):
gradcam(CategoricalScore(1, 2), np.random.sample((1, 8, 8, 3)), penultimate_layer=100000)
def test__call__if_penultimate_layer_is_no_exist_name(model):
gradcam = Gradcam(model)
with pytest.raises(ValueError):
gradcam(CategoricalScore(1, 2), np.random.sample((1, 8, 8, 3)), penultimate_layer='hoge')
def test__call__if_model_has_only_dense_layer(dense_model):
gradcam = Gradcam(dense_model)
with pytest.raises(ValueError):
gradcam(CategoricalScore(1, 2), np.random.sample((1, 3)))
def test__call__if_model_has_multiple_inputs(multiple_inputs_model):
gradcam = Gradcam(multiple_inputs_model)
result = gradcam(CategoricalScore(
1, 2), [np.random.sample(
(1, 8, 8, 3)), np.random.sample((1, 10, 10, 3))])
assert len(result) == 2
assert result[0].shape == (1, 8, 8)
assert result[1].shape == (1, 10, 10)
def test__call__if_model_has_multiple_outputs(multiple_outputs_model):
gradcam = Gradcam(multiple_outputs_model)
result = gradcam([CategoricalScore(1, 2), lambda x: x], np.random.sample((1, 8, 8, 3)))
assert result.shape == (1, 8, 8)
def test__call__if_model_has_multiple_io(multiple_io_model):
gradcam = Gradcam(multiple_io_model)
result = gradcam(
[CategoricalScore(1, 2), lambda x: x],
[np.random.sample(
(1, 8, 8, 3)), np.random.sample((1, 10, 10, 3))])
assert len(result) == 2
assert result[0].shape == (1, 8, 8)
assert result[1].shape == (1, 10, 10)
def test__call__if_model_has_multiple_io_when_batchsize_is_2(multiple_io_model):
gradcam = Gradcam(multiple_io_model)
result = gradcam(
[CategoricalScore([1, 0], 2), lambda x: x],
[np.random.sample(
(2, 8, 8, 3)), np.random.sample((2, 10, 10, 3))])
assert len(result) == 2
assert result[0].shape == (2, 8, 8)
assert result[1].shape == (2, 10, 10)
def test__call__if_expand_cam_is_False(model):
gradcam = Gradcam(model)
result = gradcam(CategoricalScore(1, 2), np.random.sample((1, 8, 8, 3)), expand_cam=False)
assert result.shape == (1, 6, 6)
def test__call__if_expand_cam_is_False_and_model_has_multiple_inputs(multiple_inputs_model):
gradcam = Gradcam(multiple_inputs_model)
result = gradcam(CategoricalScore(
1, 2), [np.random.sample(
(1, 8, 8, 3)), np.random.sample((1, 10, 10, 3))],
expand_cam=False)
assert result.shape == (1, 8, 8)
| 33.566474
| 100
| 0.673325
| 827
| 5,807
| 4.52237
| 0.11971
| 0.012299
| 0.063636
| 0.048663
| 0.819519
| 0.819519
| 0.791979
| 0.748396
| 0.686898
| 0.674866
| 0
| 0.051546
| 0.181505
| 5,807
| 172
| 101
| 33.761628
| 0.735325
| 0.009471
| 0
| 0.553846
| 0
| 0
| 0.02
| 0
| 0
| 0
| 0
| 0
| 0.130769
| 1
| 0.153846
| false
| 0
| 0.061538
| 0
| 0.253846
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 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
| 5
|
a78008a800e14abc8fb0547529155b1806ee4462
| 22
|
py
|
Python
|
saau/sections/income/poverty-rate.py
|
Mause/statistical_atlas_of_au
|
9a1e46cdb1075f993086640827dabb0f4df4fd17
|
[
"MIT"
] | null | null | null |
saau/sections/income/poverty-rate.py
|
Mause/statistical_atlas_of_au
|
9a1e46cdb1075f993086640827dabb0f4df4fd17
|
[
"MIT"
] | null | null | null |
saau/sections/income/poverty-rate.py
|
Mause/statistical_atlas_of_au
|
9a1e46cdb1075f993086640827dabb0f4df4fd17
|
[
"MIT"
] | null | null | null |
# income-poverty-rate
| 11
| 21
| 0.772727
| 3
| 22
| 5.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 22
| 1
| 22
| 22
| 0.85
| 0.863636
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a7bdd5b6d913c49d60c2babe92e7b8a656c2af95
| 70
|
py
|
Python
|
PICO-8/games/spin/repack/rle_nibblewise.py
|
VyrCossont/Pinput
|
53acf9a0eaf1a64ae263826ea36108150ad0bfbe
|
[
"MIT"
] | 9
|
2021-10-03T06:49:23.000Z
|
2022-02-17T22:10:21.000Z
|
PICO-8/games/spin/repack/rle_nibblewise.py
|
VyrCossont/Pinput
|
53acf9a0eaf1a64ae263826ea36108150ad0bfbe
|
[
"MIT"
] | null | null | null |
PICO-8/games/spin/repack/rle_nibblewise.py
|
VyrCossont/Pinput
|
53acf9a0eaf1a64ae263826ea36108150ad0bfbe
|
[
"MIT"
] | null | null | null |
# TODO: take advantage of sub-byte structure in current delta encoder
| 35
| 69
| 0.8
| 11
| 70
| 5.090909
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157143
| 70
| 1
| 70
| 70
| 0.949153
| 0.957143
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 1
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a7ccc46f678f2ac4ab8cfbbec4132f4cc0d3d003
| 229
|
py
|
Python
|
fparser/setup.py
|
pemryan/f2py
|
40c1bfcfe698fcf13444bf51439e99c3c6993a4b
|
[
"BSD-3-Clause"
] | 2
|
2015-01-15T16:18:37.000Z
|
2015-01-23T05:56:41.000Z
|
fparser/setup.py
|
pemryan/f2py
|
40c1bfcfe698fcf13444bf51439e99c3c6993a4b
|
[
"BSD-3-Clause"
] | null | null | null |
fparser/setup.py
|
pemryan/f2py
|
40c1bfcfe698fcf13444bf51439e99c3c6993a4b
|
[
"BSD-3-Clause"
] | null | null | null |
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('fparser',parent_package,top_path)
config.add_data_files('log.config')
return config
| 32.714286
| 61
| 0.772926
| 29
| 229
| 5.862069
| 0.689655
| 0.152941
| 0.188235
| 0.235294
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126638
| 229
| 6
| 62
| 38.166667
| 0.85
| 0
| 0
| 0
| 0
| 0
| 0.074561
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
ac3a90aeed6ea622830515934c692f295cfb1c04
| 6,032
|
py
|
Python
|
security_monkey/tests/sso/test_azure.py
|
alvaroaleman/security_monkey
|
b174a705124f12aeee612f9ef93820f2b4227e0e
|
[
"Apache-2.0"
] | 1
|
2018-06-29T08:05:19.000Z
|
2018-06-29T08:05:19.000Z
|
security_monkey/tests/sso/test_azure.py
|
alvaroaleman/security_monkey
|
b174a705124f12aeee612f9ef93820f2b4227e0e
|
[
"Apache-2.0"
] | 9
|
2019-01-11T17:55:08.000Z
|
2021-06-25T15:17:38.000Z
|
security_monkey/tests/sso/test_azure.py
|
alvaroaleman/security_monkey
|
b174a705124f12aeee612f9ef93820f2b4227e0e
|
[
"Apache-2.0"
] | 2
|
2018-10-07T14:59:01.000Z
|
2018-10-08T13:07:15.000Z
|
# Copyright 2017 Netflix, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
.. module: security_monkey.tests.sso.test_azure
:platform: Unix
.. version:: $$VERSION$$
.. moduleauthor:: Juan Leaniz <juan.leaniz@ubisoft.com>
"""
from security_monkey.tests import SecurityMonkeyTestCase
from security_monkey.sso.views import AzureAD
TEST_CONFIG = {
'clientID': '8d24cc89-0f6c-44aa-82c4-6b483f00cbb5',
'jwksUrl': 'https://login.microsoftonline.com/common/discovery/keys'
}
decoded_id_token = {u'nonce': u'd9cf2561563e4ec3bc18ea3373bad543', u'family_name': u'Leaniz', u'sub': u'ISSDOLYIFn5GPZBN0S6PfdBx-haA2KVK4lLZbci3C-s', u'c_hash': u'y_9iMybdDKd7iEN4w_14iw', u'aud': u'8d24cc89-0f6c-44aa-82c4-xxxxxxxx', u'iss': u'https://sts.windows.net/6a1af301-b747-43c1-80ac-xxxxxxxx/', u'oid': u'5b32bcc6-b57d-4914-9074-2c8a17c18abe', u'ipaddr': u'10.11.11.1', u'unique_name': u'juan.leaniz_ubisoft.com#EXT#@ubisoftsrm.onmicrosoft.com', u'idp': u'https://sts.windows.net/e01bd386-fa51-4210-a2a4-xxxx/', u'email': u'juan.leaniz_ubisoft.com#EXT#@ubisoftsrm.onmicrosoft.com', u'aio': u'ATQAy/8EAAAAFhmfvc4rjeMQ3f2xFN0/g0+ea8ss3n9mUH/xT9HDtA6qsIt84FFK1h7gNRSaJz4S', u'given_name': u'Juan', u'exp': 1504811806, u'in_corp': u'true', u'tid': u'6a1af301-b747-43c1-80ac-4e944b56b779', u'iat': 1504807906, u'amr': [u'wia'], u'nbf': 1504807906, u'ver': u'1.0', u'name': u'Juan Leaniz'}
encoded_id_token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkhIQnlLVS0wRHFBcU1aaDZaRlBkMlZXYU90ZyIsImtpZCI6IkhIQnlLVS0wRHFBcU1aaDZaRlBkMlZXYU90ZyJ9.eyJhdWQiOiI4ZDI0Y2M4OS0wZjZjLTQ0YWEtODJjNC02YjQ4M2YwMGNiYjUiLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC82YTFhZjMwMS1iNzQ3LTQzYzEtODBhYy00ZTk0NGI1NmI3NzkvIiwiaWF0IjoxNTA0ODA3OTA2LCJuYmYiOjE1MDQ4MDc5MDYsImV4cCI6MTUwNDgxMTgwNiwiYWlvIjoiQVRRQXkvOEVBQUFBRmhtZnZjNHJqZU1RM2YyeEZOMC9nMCtlYThzczNuOW1VSC94VDlIRHRBNnFzSXQ4NEZGSzFoN2dOUlNhSno0UyIsImFtciI6WyJ3aWEiXSwiY19oYXNoIjoieV85aU15YmRES2Q3aUVONHdfMTRpdyIsImVtYWlsIjoianVhbi5sZWFuaXpfdWJpc29mdC5jb20jRVhUI0B1Ymlzb2Z0c3JtLm9ubWljcm9zb2Z0LmNvbSIsImZhbWlseV9uYW1lIjoiTGVhbml6IiwiZ2l2ZW5fbmFtZSI6Ikp1YW4iLCJpZHAiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC9lMDFiZDM4Ni1mYTUxLTQyMTAtYTJhNC0yOWU1YWI2ZjdhYjEvIiwiaW5fY29ycCI6InRydWUiLCJpcGFkZHIiOiIxOTguMTYuMjQzLjYiLCJuYW1lIjoiSnVhbiBMZWFuaXoiLCJub25jZSI6ImQ5Y2YyNTYxNTYzZTRlYzNiYzE4ZWEzMzczYmFkNTQzIiwib2lkIjoiNWIzMmJjYzYtYjU3ZC00OTE0LTkwNzQtMmM4YTE3YzE4YWJlIiwic3ViIjoiSVNTRE9MWUlGbjVHUFpCTjBTNlBmZEJ4LWhhQTJLVks0bExaYmNpM0MtcyIsInRpZCI6IjZhMWFmMzAxLWI3NDctNDNjMS04MGFjLTRlOTQ0YjU2Yjc3OSIsInVuaXF1ZV9uYW1lIjoianVhbi5sZWFuaXpfdWJpc29mdC5jb20jRVhUI0B1Ymlzb2Z0c3JtLm9ubWljcm9zb2Z0LmNvbSIsInZlciI6IjEuMCJ9.OvAfv-PNTkeRkcSiM_ZtXFrxIYD6NDiStgXRaNKjqzcNYUJsLpVll_ZRI_uY1Hmj3FTqHMTF2J7piLHQFzXDDte8dJYCG-WpysQWOTJdd5cml2_-dSqqPnYAGI6f6uG23KgGQJb-xKTRWXRz42od6xukKcWRCwTZDu6P_cCATFiMrccQNpeV2_OuzzmAXCZ-EbY4EyJmBjwhHF6hdNZqdH95omurCutyhSgg0tv5oU-YJlHVVw1al2136mD4l0biO53yAJ2WjOW7tYFBLva3W8XDuhFberk-4JauwnsaEejL476ZF64ssIzNwuzh00OOngEx2UXKUneOaEqzhXCjuA'
fake_keys_response = {
"keys": [
{
"kty": "RSA",
"use": "sig",
"kid": "HHByKU-0DqAqMZh6ZFPd2VWaOtg",
"x5t": "HHByKU-0DqAqMZh6ZFPd2VWaOtg",
"n": "1V3C8iuyrUY_7HMyDWisNGLa5GEEkvCczQtQqTH3Mr0P4hyw2usihJuh3Q_eop5juZR3oy_HTVsVbDvLVkZ7BZZ4-M4UhcNARooYg3RZcdZymasHbVW5GBGvpGetW8pUmVniCYV2R9UZjWmdGpPO2O_2UrkNpOuiceeFEvAZqOsodWc28yo5VhsIlAUPqkJOh5XnpGUP2p49VVhKlm6XmQsaRcius1urXT3gp3W_7TtHpiJ8XD06L5i8hdBXybMZrO8uGfEkUH5Nc8HCqNA4POiCTq_N_P0NkYrGEpgMeH4oHTVhYq5eh-8MaopmsLiZgC3tNkZri0wI3DBL8Xrlrw",
"e": "AQAB",
"x5c": [
"MIIDBTCCAe2gAwIBAgIQLplyYn9yyqlCiJ/PVTna6TANBgkqhkiG9w0BAQsFADAtMSswKQYDVQQDEyJhY2NvdW50cy5hY2Nlc3Njb250cm9sLndpbmRvd3MubmV0MB4XDTE3MDcyNzAwMDAwMFoXDTE5MDcyODAwMDAwMFowLTErMCkGA1UEAxMiYWNjb3VudHMuYWNjZXNzY29udHJvbC53aW5kb3dzLm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANVdwvIrsq1GP+xzMg1orDRi2uRhBJLwnM0LUKkx9zK9D+IcsNrrIoSbod0P3qKeY7mUd6Mvx01bFWw7y1ZGewWWePjOFIXDQEaKGIN0WXHWcpmrB21VuRgRr6RnrVvKVJlZ4gmFdkfVGY1pnRqTztjv9lK5DaTronHnhRLwGajrKHVnNvMqOVYbCJQFD6pCToeV56RlD9qePVVYSpZul5kLGkXIrrNbq1094Kd1v+07R6YifFw9Oi+YvIXQV8mzGazvLhnxJFB+TXPBwqjQODzogk6vzfz9DZGKxhKYDHh+KB01YWKuXofvDGqKZrC4mYAt7TZGa4tMCNwwS/F65a8CAwEAAaMhMB8wHQYDVR0OBBYEFJnvdZTJC0SLogTiajqLhDJabFtUMA0GCSqGSIb3DQEBCwUAA4IBAQAq9cwse+hSpZ/19bX54EftSJkpgAeV3RoVX/y+zCfH8hvOKYFKiNucx7k32KNGxnfaSkkMQ/xtJWxwQhFg93/n+YfjEg3bljW5tAQ3CgaB+h3h9EEDnUAHh7Tv3W4X4/hbqRa6NiTJWVUFRM7KDY3wwXaxttfyVAG6F9zmJZaqvsNFxrSnG+Pg+B1B+YtBYy0aeUoI7kSTx++WLtcKLlb+Ie5j26QOijsLCp/4vWi3OBuZptexgTmTCeQpCU7NLKiZZdN6076+lHJYYhTENjuoIP74KZnoJxBTHpp3iR0GpmR66ssCSL2LHBug3GmBaJ32EyC1AifOWLudp1M8/nn2"
]
}
]
}
secret = "-----BEGIN PUBLIC KEY-----"
"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1V3C8iuyrUY/7HMyDWis"
"NGLa5GEEkvCczQtQqTH3Mr0P4hyw2usihJuh3Q/eop5juZR3oy/HTVsVbDvLVkZ7"
"BZZ4+M4UhcNARooYg3RZcdZymasHbVW5GBGvpGetW8pUmVniCYV2R9UZjWmdGpPO"
"2O/2UrkNpOuiceeFEvAZqOsodWc28yo5VhsIlAUPqkJOh5XnpGUP2p49VVhKlm6X"
"mQsaRcius1urXT3gp3W/7TtHpiJ8XD06L5i8hdBXybMZrO8uGfEkUH5Nc8HCqNA4"
"POiCTq/N/P0NkYrGEpgMeH4oHTVhYq5eh+8MaopmsLiZgC3tNkZri0wI3DBL8Xrl"
"rwIDAQAB"
"-----END PUBLIC KEY-----"
class AzureADTestCase(SecurityMonkeyTestCase):
def test_azure_post(self):
aad = AzureAD()
(test_secret, test_algo) = aad.get_idp_cert(encoded_id_token, TEST_CONFIG['jwksUrl'])
self.assertEqual(secret, test_secret)
test_username = aad.validate_id_token(encoded_id_token, TEST_CONFIG['clientID'],TEST_CONFIG['jwksUrl'])
self.assertEqual(test_username, decoded_id_token['email'])
| 86.171429
| 1,577
| 0.853282
| 428
| 6,032
| 11.901869
| 0.595794
| 0.011779
| 0.010012
| 0.011779
| 0.046722
| 0.019238
| 0.019238
| 0.019238
| 0.019238
| 0.019238
| 0
| 0.114454
| 0.068634
| 6,032
| 69
| 1,578
| 87.42029
| 0.792275
| 0.122845
| 0
| 0
| 0
| 0.025641
| 0.803531
| 0.720387
| 0
| 1
| 0
| 0
| 0.051282
| 1
| 0.025641
| false
| 0
| 0.051282
| 0
| 0.102564
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
3ba76923471cf1cb8cf0d5d59ef7866e9e1e67b9
| 26
|
py
|
Python
|
liquepy/spatial/__init__.py
|
geosharma/liquepy
|
d567f6a7eb93eb76218f718375f2d34355d7edd4
|
[
"MIT"
] | 4
|
2020-04-12T14:49:24.000Z
|
2020-09-22T09:28:10.000Z
|
liquepy/spatial/__init__.py
|
geosharma/liquepy
|
d567f6a7eb93eb76218f718375f2d34355d7edd4
|
[
"MIT"
] | null | null | null |
liquepy/spatial/__init__.py
|
geosharma/liquepy
|
d567f6a7eb93eb76218f718375f2d34355d7edd4
|
[
"MIT"
] | 4
|
2019-11-02T02:11:34.000Z
|
2021-04-30T06:06:41.000Z
|
from .map_coords import *
| 13
| 25
| 0.769231
| 4
| 26
| 4.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 26
| 1
| 26
| 26
| 0.863636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
3ba8c896da3dccaaa93537551360873f6b9af5e4
| 758
|
py
|
Python
|
fabscript/example/management_status/task_status.py
|
syunkitada/fabkit-repo
|
126d3507c3d395ca70662eb18d1c12d4588eb3ec
|
[
"MIT"
] | null | null | null |
fabscript/example/management_status/task_status.py
|
syunkitada/fabkit-repo
|
126d3507c3d395ca70662eb18d1c12d4588eb3ec
|
[
"MIT"
] | null | null | null |
fabscript/example/management_status/task_status.py
|
syunkitada/fabkit-repo
|
126d3507c3d395ca70662eb18d1c12d4588eb3ec
|
[
"MIT"
] | null | null | null |
# coding: utf-8
from fabkit import task, env
@task(is_bootstrap=False)
def setup():
if env.host.find('success') > -1:
return {'task_status': 0}
elif env.host.find('warning') > -1:
return {'task_status': 101}
else:
return {'task_status': 10001}
@task(is_bootstrap=False)
def check():
if env.host.find('success') > -1:
return {'task_status': 0}
elif env.host.find('warning') > -1:
return {'task_status': 201}
else:
return {'task_status': 20001}
@task(is_bootstrap=False)
def manage():
if env.host.find('success') > -1:
return {'task_status': 0}
elif env.host.find('warning') > -1:
return {'task_status': 301}
else:
return {'task_status': 30001}
| 22.294118
| 39
| 0.587071
| 101
| 758
| 4.287129
| 0.316832
| 0.207852
| 0.332564
| 0.235566
| 0.692841
| 0.533487
| 0.533487
| 0.533487
| 0.533487
| 0.533487
| 0
| 0.059441
| 0.245383
| 758
| 33
| 40
| 22.969697
| 0.697552
| 0.01715
| 0
| 0.6
| 0
| 0
| 0.189771
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.12
| true
| 0
| 0.04
| 0
| 0.52
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
3bd6f40833e23a12c9a0c99347f9cea2bc4f5d46
| 130
|
py
|
Python
|
examples/gallery/_playback.py
|
rkube/mpl-interactions
|
b08e3933dcd60db43551c4c6b90055d64566b56e
|
[
"BSD-3-Clause"
] | 67
|
2020-08-09T16:41:32.000Z
|
2022-03-31T20:46:20.000Z
|
examples/gallery/_playback.py
|
rkube/mpl-interactions
|
b08e3933dcd60db43551c4c6b90055d64566b56e
|
[
"BSD-3-Clause"
] | 172
|
2020-08-04T00:31:19.000Z
|
2022-03-17T19:19:03.000Z
|
examples/gallery/_playback.py
|
rkube/mpl-interactions
|
b08e3933dcd60db43551c4c6b90055d64566b56e
|
[
"BSD-3-Clause"
] | 17
|
2020-08-06T17:26:01.000Z
|
2022-01-04T23:46:01.000Z
|
from mpl_playback.playback import playback_file
playback_file("_heatmap_slicer-playback.json", "heatmap_slicer.py", "ohboi.gif")
| 32.5
| 80
| 0.823077
| 18
| 130
| 5.611111
| 0.611111
| 0.237624
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.061538
| 130
| 3
| 81
| 43.333333
| 0.827869
| 0
| 0
| 0
| 0
| 0
| 0.423077
| 0.223077
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
3be6b953b419c44f00df55d27146f16d90d9fc72
| 270
|
py
|
Python
|
flask_arch/builtins/__init__.py
|
ToraNova/flask-arch
|
ff95c4b49a2d954ae69d21853f646792a72918ed
|
[
"MIT"
] | null | null | null |
flask_arch/builtins/__init__.py
|
ToraNova/flask-arch
|
ff95c4b49a2d954ae69d21853f646792a72918ed
|
[
"MIT"
] | null | null | null |
flask_arch/builtins/__init__.py
|
ToraNova/flask-arch
|
ff95c4b49a2d954ae69d21853f646792a72918ed
|
[
"MIT"
] | null | null | null |
from .auth import Arch as AuthArch
from .user_manage import Arch as UserManageArch
from .cms import Arch as CMSArch
from .password import Auth as PasswordAuth
from .sql import default_base as default_sql_declarative_base
from .sql import DefaultRole as DefaultSQLRole
| 30
| 61
| 0.837037
| 41
| 270
| 5.390244
| 0.463415
| 0.135747
| 0.162896
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140741
| 270
| 8
| 62
| 33.75
| 0.952586
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.166667
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.